Avoid repeatedly spamming the console while a timed out command is waiting

to complete.  Instead, print one message after the timeout period expires,
and one more when (if) the command eventually completes.

MFC after:	1 month
This commit is contained in:
Ed Maste 2010-09-14 01:51:04 +00:00
parent c895b6e6ee
commit 3e50771086
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212594

View File

@ -1129,6 +1129,11 @@ aac_complete(void *context, int pending)
AAC_PRINT_FIB(sc, fib);
break;
}
if ((cm->cm_flags & AAC_CMD_TIMEDOUT) != 0)
device_printf(sc->aac_dev,
"COMMAND %p COMPLETED AFTER %d SECONDS\n",
cm, (int)(time_uptime-cm->cm_timestamp));
aac_remove_busy(cm);
aac_unmap_command(cm);
@ -2348,7 +2353,7 @@ aac_timeout(struct aac_softc *sc)
deadline = time_uptime - AAC_CMD_TIMEOUT;
TAILQ_FOREACH(cm, &sc->aac_busy, cm_link) {
if ((cm->cm_timestamp < deadline)
/* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) {
&& !(cm->cm_flags & AAC_CMD_TIMEDOUT)) {
cm->cm_flags |= AAC_CMD_TIMEDOUT;
device_printf(sc->aac_dev,
"COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n",