HomeFreeBSD

nvme: Add sanity check for phase on startup.

Description

nvme: Add sanity check for phase on startup.

The proper phase for the qpiar right after reset in the first interrupt
is 1. For it, make sure that we're not still in phase 0. This is an
illegal state to be processing interrupts and indicates that we've
failed to properly protect against a race between initializing our state
and processing interrupts. Modify stat resetting code so it resets the
number of interrpts to 1 instead of 0 so we don't trigger a false
positive panic.

Sponsored by: Netflix
Reviewed by: cperciva, mav (prior version)
Differential Revision: https://reviews.freebsd.org/D32211

Details

Provenance
impAuthored on Sep 29 2021, 3:11 AM
Reviewer
cperciva
Differential Revision
D32211: nvme: Add sanity check for phase on startup.
Parents
rGfa81f3731d1a: nvme: start qpair in state RECOVERY_WAITING
Branches
Unknown
Tags
Unknown