NVME Subsystem Reset Question

Keith Busch keith.busch at intel.com
Wed Oct 12 10:34:11 PDT 2016


On Wed, Oct 12, 2016 at 05:04:40PM +0000, Jeffrey Lien wrote:
> Keith, Jens,
> I have a question on what the state of the nvme device should be after a subsystem reset (ie. Writing "NVMe" to NSSR).   The spec says it should be in LTSSM detect state which seems to mean it no longer showing up on the PCI bus which requires a pci bus rescan to get it back.   Does that match your interpretation?
>
> If so, who's responsible for initiating the bus rescan to get the device back?  I didn't see anything in the driver code that would do this so I'm assuming it would be the App's (that issued the subsystem reset ioctl) responsibility.  Agree?  Or is there something else that should initiate the rescan?

A bus rescan shouldn't be necessary. The device is supposed to go
from detect to polling automatically if a receiver is detected,
then configuration, recovery and finally L0 without the kernel doing
anything. At least that's my understanding.

Since power is never lost, the controllers in the subsystem should have
CSTS.NSSRO set to 1 so the driver can observe this after the controller
completes link training.

It wouldn't make much sense to require the host do anything to initiate
a rescan to detect the pci device after a subsystem reset. Different
controllers in the subsystem could be connected to different hosts,
and you can't ensure that's coordinated from the host that initiated the
subsystem reset.



More information about the Linux-nvme mailing list