HomeFreeBSD

nvme: Enable interrupts after qpair fully constructed

Description

nvme: Enable interrupts after qpair fully constructed

To guard against the ill effects of a spurious interrupt during
construction (or one that was bogusly pending), enable interrupts after
the qpair is completely constructed. Otherwise, we can die with null
pointer dereferences in nvme_qpair_process_completions. This has been
observed in at least one pre-release NVMe drive where the MSIX interrupt
fired while the queue was being created, before we'd started the NVMe
controller card.

The alternative of only turning on the interrupts after the rest was
tried, but was insufficient to work around this bug and made the code
more complicated w/o benefit.

Reviewed by: mav, chuck
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31182

Details

Provenance
impAuthored on Jul 15 2021, 10:17 PM
Reviewer
mav
Differential Revision
D31182: nvme: Enable interrupts after qpair fully constructed
Parents
R10:998abf5a1274: nanobsd: Bump rescue size to 8GB
Branches
Unknown
Tags
Unknown