Page MenuHomeFreeBSD

nvme: do not complete a command when its Abort is not performed
ClosedPublic

Authored by seuros on Sun, Sep 13, 9:24 AM.
Referenced Files
F174897982: D59634.diff
Tue, Oct 6, 8:29 PM
Unknown Object (File)
Tue, Oct 6, 5:03 AM
Unknown Object (File)
Tue, Oct 6, 3:19 AM
Unknown Object (File)
Sun, Oct 4, 5:44 PM
Unknown Object (File)
Sun, Oct 4, 4:34 PM
Unknown Object (File)
Fri, Oct 2, 12:53 PM
Unknown Object (File)
Thu, Oct 1, 10:04 PM
Unknown Object (File)
Thu, Oct 1, 9:19 AM
Subscribers

Details

Summary

An Abort completion with cdw0 bit 0 set means the controller did not
abort the command; the command can still complete later. The driver
treated this as aborted anyway: it completed the command itself and
freed the CID. When the controller completed the command later,
the CID may already belong to a new command, so the new command
finished with the old command's status, or the unknown-cid assertion
fired on INVARIANTS kernels. The watchdog also kept sending a new
Abort for the same command every half second while the first one was
still pending.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Aborting isn't on by default, so we have few miles on that code....

Does the watchdog we have for resetting the controller need to change because of this?

This diff implement it , the watchdog change is already here.

There is only one scenario missing if the Abort succeeds but the controller never posts the original command's completion, abort_state stays SENT forever.

I will add it in a followup diff as i finishing mapping the state machine from the spec.

This is OK, but contingent on the followup.

This revision is now accepted and ready to land.Fri, Sep 25, 5:13 PM