aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorWilliam Butler <wab@google.com>2024-01-10 18:28:55 +0000
committerKeith Busch <kbusch@kernel.org>2024-01-10 10:36:12 -0800
commit06c59d427017fcde3107c236177fcc74c9db7909 (patch)
tree2698b549131f5f196eaa266395e698358bb480e1 /drivers/nvme
parent9a1abc24850eb759e36a2f8869161c3b7254c904 (diff)
downloadlinux-06c59d427017fcde3107c236177fcc74c9db7909.tar.gz
nvme-pci: set doorbell config before unquiescing
During resets, if queues are unquiesced first, then the host can submit IOs to the controller using shadow doorbell logic but the controller won't be aware. This can lead to necessary MMIO doorbells from being not issued, causing requests to be delayed and timed-out. Signed-off-by: William Butler <wab@google.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 75e763ce09aa0..46d3897b8986a 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2746,10 +2746,10 @@ static void nvme_reset_work(struct work_struct *work)
* controller around but remove all namespaces.
*/
if (dev->online_queues > 1) {
+ nvme_dbbuf_set(dev);
nvme_unquiesce_io_queues(&dev->ctrl);
nvme_wait_freeze(&dev->ctrl);
nvme_pci_update_nr_queues(dev);
- nvme_dbbuf_set(dev);
nvme_unfreeze(&dev->ctrl);
} else {
dev_warn(dev->ctrl.device, "IO queues lost\n");