[PATCH] nvme-pci: fix race between pci reset and nvme probe

Keith Busch kbusch at kernel.org
Mon Aug 1 19:22:51 PDT 2022


On Tue, Aug 02, 2022 at 08:05:09AM +0800, Ming Lei wrote:
> > 
> > If you are encountering a nvme_reset_prepare() condition during scanning, that
> > might indicate a failure to communicate with the end device. The scan work may
> > need the error handling to unblock it.
> 
> Not sure I get your point. nvme_reset_prepare() is called from storing
> to pci device's reset sysfs attr, so it can come any time, including
> scanning.

Oh, I mean these .reset_prepare/done callbacks are also used by the PCIe AER
driver when the root port sees an uncorrectable error. In some cases, you won't
be able to successfuly use the PCIe bus downstream that root port until after
resetting it. I was just considering that scan_work may be stuck because of
such an error.



More information about the Linux-nvme mailing list