[PATCH v3 0/1] nvme: Fix problem when booting from NVMe drive was leading to a hang.
Keith Busch
kbusch at kernel.org
Tue Mar 12 07:38:59 PDT 2024
On Mon, Mar 11, 2024 at 03:08:11PM -0700, Michael Kropaczek wrote:
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index e6267a6aa380..bda7cf5ff674 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -2593,6 +2593,9 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
> nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
> }
>
> + if (shutdown && dev->hmb)
> + nvme_set_host_mem(dev, 0);
> +
As I said last time, this deadlocks if the controller doesn't respond to
the command. While that shouldn't happen with a properly functioning
controller, we can't count on that to prevent a deadlock.
> nvme_quiesce_io_queues(&dev->ctrl);
>
> if (!dead && dev->ctrl.queue_count > 0) {
> --
More information about the Linux-nvme
mailing list