Page MenuHomeFreeBSD

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

Authored by seuros on Sep 13 2026, 9:24 AM.
Referenced Files
Unknown Object (File)
Sat, Oct 10, 2:51 PM
Unknown Object (File)
Thu, Oct 8, 7:33 PM
Unknown Object (File)
Thu, Oct 8, 5:10 PM
Unknown Object (File)
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
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 Passed
Unit
No Test Coverage
Build Status
Buildable 76824
Build 73707: arc lint + arc unit

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