Page MenuHomeFreeBSD

nvme: escalate to an NVM Subsystem Reset when the controller will not disable
Needs ReviewPublic

Authored by seuros on Thu, Sep 24, 9:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 3, 4:20 PM
Unknown Object (File)
Fri, Oct 2, 1:23 PM
Unknown Object (File)
Fri, Oct 2, 7:05 AM
Unknown Object (File)
Thu, Oct 1, 12:03 PM
Unknown Object (File)
Thu, Oct 1, 7:35 AM
Unknown Object (File)
Wed, Sep 30, 2:01 PM
Unknown Object (File)
Wed, Sep 30, 12:30 PM
Unknown Object (File)
Tue, Sep 29, 6:02 PM
Subscribers

Details

Reviewers
imp
ngie
adrian
Summary

A controller that will not clear CSTS.RDY after CC.EN is cleared leaves
nvme_ctrlr_hw_reset() with nothing left to try, so the reset fails and
the controller is marked failed. Controllers that set CAP.NSSRS accept
a write of "NVMe" to NSSR.NSSRC, which resets the whole NVM subsystem
and is a stronger reset than a Controller Level Reset.

Try it once, then retry the disable. The subsystem reset drops every
PCIe link in the subsystem to Detect, so the PCI register space is saved
and restored around it.

Refer to NVM Express Base Specification, Revision 2.4, section 3.7.1 and
Figure 43.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 77292
Build 74175: arc lint + arc unit

Event Timeline

sys/dev/nvme/nvme_ctrlr.c
486

Do you want to check here if we are still in reset by checking the RDY bit != 0? Or is this meant to unwedge things and we'll call ctrlr_disable to try again?