HomeFreeBSD

Add asserts for some state transitions

Description

Add asserts for some state transitions

For the PROBEWP and PROBERC* states, add assertiosn that both the da device
state is in the right state, as well as the ccb state is the right one when we
enter dadone_probe{wp,rc}. This will ensure that we don't sneak through when
we're re-probing the size and write protection status of the device and thereby
leak a reference which can later lead to an invalidated peripheral going away
before all references are released (and resulting panic).

Reviewed by: scottl, ken
Differential Revision: https://reviews.freebsd.org/D22295

Details

Committed
impNov 11 2019, 5:36 PM
Reviewer
scottl
Differential Revision
D22295: Fix panic message to indicate right action that was improper.
Parents
rS354622: Update the softc state of the da driver before releasing the CCB.
Branches
Unknown
Tags
Unknown