Page MenuHomeFreeBSD

nvme: Remove pause while resetting
ClosedPublic

Authored by imp on Oct 1 2021, 3:28 AM.
Tags
None
Referenced Files
F96000441: D32248.diff
Mon, Sep 23, 7:32 AM
F95841561: D32248.diff
Sun, Sep 22, 7:46 PM
F95762230: D32248.diff
Sun, Sep 22, 1:08 PM
F95734995: D32248.diff
Sun, Sep 22, 9:52 AM
Unknown Object (File)
Wed, Sep 18, 4:15 AM
Unknown Object (File)
Tue, Sep 17, 5:04 PM
Unknown Object (File)
Mon, Sep 16, 6:12 PM
Unknown Object (File)
Sun, Sep 15, 8:32 PM
Subscribers

Details

Summary

After some study of the code and the standard, I think we can just drop
the pause(), unconditionally. If we're not initialized, then there's
nothing to wait for from a software perspective. If we are initialized,
then there might be outstanding I/O. If so, then the qpair 'recovery
state' will transition to WAITING in nvme_ctrlr_disable_qpairs, which
will ignore any interrupts for items that complete before we complete
the reset by setting cc.en=0.

If we go on to fail the controller, we'll cancel the outstanding I/O
transactions. If we reset the controller, the hardware throws away
pending transactions and we retry all the pending I/O transactions. Any
transactions that happend to complete before cc.en=0 will have the same
effect in the end (doing the same transaction twice is just inefficient,
it won't affect the state of the device any differently than having done
it once).

The standard imposes no wait times here, so it isn't needed from that
perspective.

Unanswered Question: Do we may need to disable interrupts while we
disable in legacy mode since those are level-sensitive.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41887
Build 38775: arc lint + arc unit