More fully implement the state machine.
When a command is finished running, we must transition it from INQUEUE to busy state. We were failing to do that, so we hit a panic when the commands were freed. This only affects mpr, mps already did simmilar things. Now both the polling and interrupt paths properly set BUSY as appropriate.
This commit is contained in:
parent
1cf999a5f3
commit
4b1ac5c2d8
@ -2367,6 +2367,7 @@ mpr_complete_command(struct mpr_softc *sc, struct mpr_command *cm)
|
||||
return;
|
||||
}
|
||||
|
||||
cm->cm_state = MPR_CM_STATE_BUSY;
|
||||
if (cm->cm_flags & MPR_CM_FLAGS_POLLED)
|
||||
cm->cm_flags |= MPR_CM_FLAGS_COMPLETE;
|
||||
|
||||
@ -3879,7 +3880,7 @@ mpr_request_polled(struct mpr_softc *sc, struct mpr_command **cmp)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cm->cm_state = MPR_CM_STATE_BUSY;
|
||||
if (error) {
|
||||
mpr_dprint(sc, MPR_FAULT, "Calling Reinit from %s\n", __func__);
|
||||
rc = mpr_reinit(sc);
|
||||
|
Loading…
Reference in New Issue
Block a user