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

(cherry picked from commit 7d5eebe0f4a0f2aa5c8c7dfdd1a9ce1513849da8)

Details

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