summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2010-09-14 01:51:04 +0000
committeremaste <emaste@FreeBSD.org>2010-09-14 01:51:04 +0000
commit2b6d501a6e7646a0be53d48eb59bf60cbe378738 (patch)
treece2ff863c0a8fdcb5d03118c5d397d84eb08a7e0 /sys/dev/aac
parenteb7e545e67ec1af5b14e3b48d16296b1fa250715 (diff)
downloadFreeBSD-src-2b6d501a6e7646a0be53d48eb59bf60cbe378738.zip
FreeBSD-src-2b6d501a6e7646a0be53d48eb59bf60cbe378738.tar.gz
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
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index b928dba..3699617 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -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",
OpenPOWER on IntegriCloud