[PATCH RFC 3/5] nvme: pci: use admin queue timeout over NVME_ADMIN_TIMEOUT
Heyne, Maximilian
mheyne at amazon.de
Wed Feb 18 05:10:55 PST 2026
On Thu, Feb 12, 2026 at 01:09:49PM +0100, Maurizio Lombardi wrote:
> From: David Jeffery <djeffery at redhat.com>
>
> While tearing down its queues, nvme-pci uses NVME_ADMIN_TIMEOUT as its
> timeout target. Instead, use the configured admin queue's timeout value
> when available to match the device's existing timeout setting.
>
> Signed-off-by: David Jeffery <djeffery at redhat.com>
> ---
> drivers/nvme/host/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 58f3097888a7..853cd57e4480 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2911,9 +2911,10 @@ static bool __nvme_delete_io_queues(struct nvme_dev *dev, u8 opcode)
> {
> int nr_queues = dev->online_queues - 1, sent = 0;
> unsigned long timeout;
> + struct request_queue *q = dev->ctrl.admin_q;
>
> retry:
> - timeout = NVME_ADMIN_TIMEOUT;
> + timeout = q ? q->rq_timeout : NVME_ADMIN_TIMEOUT;
Skimming over the code I think the check is unnecessary since
ctrl.admin_q is only changed in nvme_alloc_admin_tag_set. Only when this
succeeds, we'll setup io queues. When they get deleted we will still
have the ctrl.admin_q being valid.
> while (nr_queues > 0) {
> if (nvme_delete_queue(&dev->queues[nr_queues], opcode))
> break;
> --
> 2.53.0
>
>
Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597
More information about the Linux-nvme
mailing list