summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-09-16 02:37:40 +0000
committerscottl <scottl@FreeBSD.org>2004-09-16 02:37:40 +0000
commitab1b0390a392629c779953217aa0d4f8139e4fe2 (patch)
treed588288edb1c4ed7906d442f725737b3be2623b4 /sys/dev/aac
parent591b9b7da0831115593669d020d1854529e4c582 (diff)
downloadFreeBSD-src-ab1b0390a392629c779953217aa0d4f8139e4fe2.zip
FreeBSD-src-ab1b0390a392629c779953217aa0d4f8139e4fe2.tar.gz
If the timeout handler runs and notices that commands are timed out, check
the firmware status register on the card to see if the firmware is still running. There is no way to recover from this, but at least it can give a hint as whether the car has crashed (which happens all too often). MFC after: 3 days
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c10
-rw-r--r--sys/dev/aac/aacreg.h1
2 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 44ec352..0cf61de 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -1992,11 +1992,13 @@ aac_timeout(struct aac_softc *sc)
{
struct aac_command *cm;
time_t deadline;
+ int timedout, code;
/*
* Traverse the busy command list, bitch about late commands once
* only.
*/
+ timedout = 0;
deadline = time_second - AAC_CMD_TIMEOUT;
TAILQ_FOREACH(cm, &sc->aac_busy, cm_link) {
if ((cm->cm_timestamp < deadline)
@@ -2006,9 +2008,17 @@ aac_timeout(struct aac_softc *sc)
"COMMAND %p TIMEOUT AFTER %d SECONDS\n",
cm, (int)(time_second-cm->cm_timestamp));
AAC_PRINT_FIB(sc, cm->cm_fib);
+ timedout++;
}
}
+ if (timedout) {
+ code = AAC_GET_FWSTATUS(sc);
+ if (code != AAC_UP_AND_RUNNING) {
+ device_printf(sc->aac_dev, "WARNING! Controller is no "
+ "longer running! code= 0x%x\n", code);
+ }
+ }
return;
}
diff --git a/sys/dev/aac/aacreg.h b/sys/dev/aac/aacreg.h
index 426601b..a1b08b0 100644
--- a/sys/dev/aac/aacreg.h
+++ b/sys/dev/aac/aacreg.h
@@ -551,6 +551,7 @@ struct aac_adapter_info {
* state of the adapter.
*/
#define AAC_SELF_TEST_FAILED 0x00000004
+#define AAC_MONITOR_PANIC 0x00000020
#define AAC_UP_AND_RUNNING 0x00000080
#define AAC_KERNEL_PANIC 0x00000100
OpenPOWER on IntegriCloud