diff options
author | mjacob <mjacob@FreeBSD.org> | 2006-02-26 07:46:09 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2006-02-26 07:46:09 +0000 |
commit | fa5ef61ca892ef1aac767c5f4ae1f280b3c7a86c (patch) | |
tree | a4fa0ee33d66bf4d00de30d47e4548cb9212a3f1 | |
parent | cca241c522a48822ec36d9bcfd5bf8d65821fccf (diff) | |
download | FreeBSD-src-fa5ef61ca892ef1aac767c5f4ae1f280b3c7a86c.zip FreeBSD-src-fa5ef61ca892ef1aac767c5f4ae1f280b3c7a86c.tar.gz |
Shorten the time for waiting for TMF commands to complete- let's
not hang the system for 5 seconds. If a TMF doesn't complete within,
oh, say 500ms, that's enough.
Put in a printout to catch mpt_recover_commands being activated with
no commands.
-rw-r--r-- | sys/dev/mpt/mpt_cam.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c index 2632d3a..ac755a2 100644 --- a/sys/dev/mpt/mpt_cam.c +++ b/sys/dev/mpt/mpt_cam.c @@ -2038,10 +2038,17 @@ mpt_recover_commands(struct mpt_softc *mpt) int error; MPT_LOCK(mpt); + if (TAILQ_EMPTY(&mpt->request_timeout_list) != 0) { + /* + * No work to do- leave. + */ + mpt_prt(mpt, "mpt_recover_commands: no requests.\n"); + MPT_UNLOCK(mpt); + return; + } /* - * Flush any commands whose completion coincides - * with their timeout. + * Flush any commands whose completion coincides with their timeout. */ mpt_intr(mpt); @@ -2088,7 +2095,7 @@ mpt_recover_commands(struct mpt_softc *mpt) } error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, - REQ_STATE_DONE, /*sleep_ok*/TRUE, /*time_ms*/5000); + REQ_STATE_DONE, /*sleep_ok*/TRUE, /*time_ms*/500); status = mpt->tmf_req->IOCStatus; if (error != 0) { @@ -2097,7 +2104,7 @@ mpt_recover_commands(struct mpt_softc *mpt) * If we've errored out and the transaction is still * pending, reset the controller. */ - mpt_prt(mpt, "mpt_recover_commands: Abort timed-out." + mpt_prt(mpt, "mpt_recover_commands: Abort timed-out. " "Resetting controller\n"); mpt_reset(mpt, /*reinit*/TRUE); continue; |