r329522 created problemss with commands that enter the TIMEDOUT state but

are successfully returned by the card (usually due to an abort being issued
as part of timeout recovery). Remove what amounts to an insufficient
KASSERT, and don't overwrite the state value. State should probably be
re-designed, and that will be done with a future commit.

Reported by:	phk, bei.io
Reviewed by:	imp, mav
Differential Revision:	D19677
This commit is contained in:
scottl 2019-03-24 19:09:50 +00:00
parent 37338fb0d0
commit 136e1d1535
2 changed files with 4 additions and 7 deletions

View File

@ -2617,9 +2617,7 @@ mpr_intr_locked(void *data)
} else { } else {
cm = &sc->commands[ cm = &sc->commands[
le16toh(desc->AddressReply.SMID)]; le16toh(desc->AddressReply.SMID)];
KASSERT(cm->cm_state == MPR_CM_STATE_INQUEUE, if (cm->cm_state != MPR_CM_STATE_TIMEDOUT)
("command SMID %d not inqueue\n",
desc->AddressReply.SMID));
cm->cm_state = MPR_CM_STATE_BUSY; cm->cm_state = MPR_CM_STATE_BUSY;
cm->cm_reply = reply; cm->cm_reply = reply;
cm->cm_reply_data = cm->cm_reply_data =

View File

@ -2481,8 +2481,7 @@ mps_intr_locked(void *data)
} else { } else {
cm = &sc->commands[ cm = &sc->commands[
le16toh(desc->AddressReply.SMID)]; le16toh(desc->AddressReply.SMID)];
KASSERT(cm->cm_state == MPS_CM_STATE_INQUEUE, if (cm->cm_state != MPS_MPS_STATE_TIMEDOUT)
("command not inqueue\n"));
cm->cm_state = MPS_CM_STATE_BUSY; cm->cm_state = MPS_CM_STATE_BUSY;
cm->cm_reply = reply; cm->cm_reply = reply;
cm->cm_reply_data = le32toh( cm->cm_reply_data = le32toh(