[PATCH] nvme-pci: fix missed admin queue sq doorbell write
Keith Busch
kbusch at meta.com
Tue Apr 21 09:18:55 PDT 2026
From: Keith Busch <kbusch at kernel.org>
We can batch admin commands, which means bd->last may be false, skipping
the doorbell write so that we aggregate multiple commands per write. If
a subsequent command can't be dispatched for whatever reason, we have to
provide the blk-mq ops' commit_rqs callback in order to ensure we
properly update the doorbell.
Fixes: 58e5bdeb9c2b ("nvme: enable uring-passthrough for admin commands")
Signed-off-by: Keith Busch <kbusch at kernel.org>
---
drivers/nvme/host/pci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index db5fc9bf66272..4c052ed18cb8d 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2241,6 +2241,7 @@ static int nvme_create_queue(struct nvme_queue *nvmeq, int qid, bool polled)
static const struct blk_mq_ops nvme_mq_admin_ops = {
.queue_rq = nvme_queue_rq,
.complete = nvme_pci_complete_rq,
+ .commit_rqs = nvme_commit_rqs,
.init_hctx = nvme_admin_init_hctx,
.init_request = nvme_pci_init_request,
.timeout = nvme_timeout,
--
2.52.0
More information about the Linux-nvme
mailing list