diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-11-19 23:13:12 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-11-19 23:13:12 +0000 |
commit | 6d0d993f423606d2d7fbf8c26589c166c3b920fc (patch) | |
tree | 60ebc7a98c066d65b3937188925ff878d6c0b787 /sys/dev/mpt | |
parent | 1f0ec567adb47a05205f4597034c1694ce547a6b (diff) | |
download | FreeBSD-src-6d0d993f423606d2d7fbf8c26589c166c3b920fc.zip FreeBSD-src-6d0d993f423606d2d7fbf8c26589c166c3b920fc.tar.gz |
If a TMF request fails to start, make sure that we pull it off the
pending list and set the state back to free prior to calling mpt_reset
so we don't panic at a later point.
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r-- | sys/dev/mpt/mpt_cam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 6c31f2f..8f9a721 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -2327,7 +2327,7 @@ mpt_scsi_tmf_reply_handler(struct mpt_softc *mpt, request_t *req, req->IOCStatus = le16toh(tmf_reply->IOCStatus); req->ResponseCode = tmf_reply->ResponseCode; - mpt_lprt(mpt, MPT_PRT_INFO, "TMF complete: req %p:%u status 0x%x\n", + mpt_lprt(mpt, MPT_PRT_DEBUG, "TMF complete: req %p:%u status 0x%x\n", req, req->serno, le16toh(tmf_reply->IOCStatus)); TAILQ_REMOVE(&mpt->request_pending_list, req, links); if ((req->state & REQ_STATE_NEED_WAKEUP) != 0) { @@ -3566,7 +3566,7 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt, u_int type, u_int flags, } tmf_req->TaskMsgContext = abort_ctx; - mpt_lprt(mpt, MPT_PRT_INFO, + mpt_lprt(mpt, MPT_PRT_DEBUG, "Issuing TMF %p:%u with MsgContext of 0x%x\n", mpt->tmf_req, mpt->tmf_req->serno, tmf_req->MsgContext); if (mpt->verbose > MPT_PRT_DEBUG) { @@ -3578,6 +3578,8 @@ mpt_scsi_send_tmf(struct mpt_softc *mpt, u_int type, u_int flags, TAILQ_INSERT_HEAD(&mpt->request_pending_list, mpt->tmf_req, links); error = mpt_send_handshake_cmd(mpt, sizeof(*tmf_req), tmf_req); if (error != MPT_OK) { + TAILQ_REMOVE(&mpt->request_pending_list, mpt->tmf_req, links); + mpt->tmf_req->state = REQ_STATE_FREE; mpt_reset(mpt, TRUE); } return (error); |