svn commit: r212594 - head/sys/dev/aac
Ed Maste
emaste at FreeBSD.org
Tue Sep 14 01:51:05 UTC 2010
Author: emaste
Date: Tue Sep 14 01:51:04 2010
New Revision: 212594
URL: http://svn.freebsd.org/changeset/base/212594
Log:
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
Modified:
head/sys/dev/aac/aac.c
Modified: head/sys/dev/aac/aac.c
==============================================================================
--- head/sys/dev/aac/aac.c Tue Sep 14 01:48:01 2010 (r212593)
+++ head/sys/dev/aac/aac.c Tue Sep 14 01:51:04 2010 (r212594)
@@ -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",
More information about the svn-src-all
mailing list