public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme: Inform controller of doorbell config before unquiescing IO queues
@ 2024-01-10 18:28 William Butler
  2024-01-10 18:40 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: William Butler @ 2024-01-10 18:28 UTC (permalink / raw)
  To: Keith Busch, Pavel Emelyanov, Christoph Hellwig, Sagi Grimberg
  Cc: Jens Axboe, linux-kernel, linux-nvme, William Butler

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>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 61af7ff1a9d6..f87c51a946b3 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2743,10 +2743,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");
-- 
2.43.0.275.g3460e3d667-goog



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-10 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-10 18:28 [PATCH] nvme: Inform controller of doorbell config before unquiescing IO queues William Butler
2024-01-10 18:40 ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox