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

(cherry picked from commit fc9a0840231770bc7e7dcfe4616babdc6d4389a6)

Details

Provenance
impAuthored on Jul 15 2021, 10:17 PM
Reviewer
mav
Differential Revision
D31182: nvme: Enable interrupts after qpair fully constructed
Parents
rG7028ae849a54: boot: fix OBJS to not include BTX's crt0.o
Branches
Unknown
Tags
Unknown