[PATCH v1 0/1] nvme: Fix problem when booting from NVMe drive was leading to a hang.

Keith Busch kbusch at kernel.org
Thu Feb 22 08:27:48 PST 2024


On Wed, Feb 21, 2024 at 12:43:40AM -0800, Michael Kropaczek wrote:
> @@ -2593,6 +2593,16 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
>  			nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
>  	}
>  
> +	/*
> +	 * On certain host architectures/HW, DRAM was keeping memory contents over reboot-cycles.
> +	 * It was observed that certain controllers were accessing host memory after
> +	 * resetting which led to undefined state preventing proper initialization.
> +	 */
> +	if (dev->hmb)
> +		nvme_set_host_mem(dev, 0);
> +
> +	nvme_free_host_mem(dev);
> +

Shouldn't this go in nvme_shutdown() instead? I don't think we want to
tear down the controller's host memory on every controller reset.



More information about the Linux-nvme mailing list