]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nvme-pci: fix missed admin queue sq doorbell write
authorKeith Busch <kbusch@kernel.org>
Tue, 21 Apr 2026 16:14:02 +0000 (09:14 -0700)
committerKeith Busch <kbusch@kernel.org>
Wed, 22 Apr 2026 17:07:30 +0000 (10:07 -0700)
We can batch admin commands submitted through io_uring_cmd passthrough,
which means bd->last may be false and skips the doorbell write to
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")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c

index bcf68c198f74041b0b7ee6281eb2fddfd5e5299b..f953237922dad2379171303da3dc30d1abdbded1 100644 (file)
@@ -2239,6 +2239,7 @@ release_cq:
 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,