mpr/mps: Minor state machine fix

When a DMA chain can't be loaded, set the state to STATE_INQUEUE so that
the mp[rs]_complete_command can properly fail the command.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2021-06-03 13:46:19 -06:00
parent 175ad3d003
commit 33755dbb20
2 changed files with 2 additions and 0 deletions

View file

@ -3703,6 +3703,7 @@ mpr_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
mpr_dprint(sc, MPR_INFO, "Out of chain frames, "
"consider increasing hw.mpr.max_chains.\n");
cm->cm_flags |= MPR_CM_FLAGS_CHAIN_FAILED;
cm->cm_state = MPR_CM_STATE_INQUEUE;
mpr_complete_command(sc, cm);
return;
}

View file

@ -2978,6 +2978,7 @@ mps_data_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error)
mps_dprint(sc, MPS_INFO, "Out of chain frames, "
"consider increasing hw.mps.max_chains.\n");
cm->cm_flags |= MPS_CM_FLAGS_CHAIN_FAILED;
cm->cm_state = MPS_CM_STATE_INQUEUE;
mps_complete_command(sc, cm);
return;
}