summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorhm <hm@FreeBSD.org>2001-03-28 14:11:15 +0000
committerhm <hm@FreeBSD.org>2001-03-28 14:11:15 +0000
commitde858d3f3800ce4b503f38487fb57684daf65447 (patch)
tree5fca05c6b55a9b45840808ff06f7d064c14508fe /sys
parentc549f7c37c5589bdf28a0866a71808587b51d9b4 (diff)
downloadFreeBSD-src-de858d3f3800ce4b503f38487fb57684daf65447.zip
FreeBSD-src-de858d3f3800ce4b503f38487fb57684daf65447.tar.gz
In case the driver runs on an HP NetRaid controller, attempt to properly
decode the BIOS and firmware version and announce the board as HP NetRaid. This has been tested with a NetRaid 3si controller, the BIOS/firmware printout should also work for other NetRaid controllers but the type detection for other NetRaids (such as the 1si) will not work due to the lack of hardware. Reviewed by: msmith
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/amr/amr.c40
1 files changed, 37 insertions, 3 deletions
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index e17f38a..a8be136 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -1573,9 +1573,43 @@ amr_describe_controller(struct amr_softc *sc)
} else {
prod = "unsupported controller";
}
- device_printf(sc->amr_dev, "<%s> Firmware %.4s, BIOS %.4s, %dMB RAM\n",
- prod, ae->ae_adapter.aa_firmware, ae->ae_adapter.aa_bios,
- ae->ae_adapter.aa_memorysize);
+
+ /*
+ * HP NetRaid controllers have a special encoding of the firmware and
+ * BIOS versions. The AMI version seems to have it as strings whereas
+ * the HP version does it with a leading uppercase character and two
+ * binary numbers.
+ */
+
+ if(ae->ae_adapter.aa_firmware[2] >= 'A' &&
+ ae->ae_adapter.aa_firmware[2] <= 'Z' &&
+ ae->ae_adapter.aa_firmware[1] < ' ' &&
+ ae->ae_adapter.aa_firmware[0] < ' ' &&
+ ae->ae_adapter.aa_bios[2] >= 'A' &&
+ ae->ae_adapter.aa_bios[2] <= 'Z' &&
+ ae->ae_adapter.aa_bios[1] < ' ' &&
+ ae->ae_adapter.aa_bios[0] < ' ') {
+
+ /* this looks like we have an HP NetRaid version of the MegaRaid */
+
+ if(ae->ae_signature == AMR_SIG_438) {
+ /* the AMI 438 is an NetRaid 3si in HP-land */
+ prod = "HP NetRaid 3si";
+ }
+
+ device_printf(sc->amr_dev, "<%s> Firmware %c.%02d.%02d, BIOS %c.%02d.%02d, %dMB RAM\n",
+ prod, ae->ae_adapter.aa_firmware[2],
+ ae->ae_adapter.aa_firmware[1],
+ ae->ae_adapter.aa_firmware[0],
+ ae->ae_adapter.aa_bios[2],
+ ae->ae_adapter.aa_bios[1],
+ ae->ae_adapter.aa_bios[0],
+ ae->ae_adapter.aa_memorysize);
+ } else {
+ device_printf(sc->amr_dev, "<%s> Firmware %.4s, BIOS %.4s, %dMB RAM\n",
+ prod, ae->ae_adapter.aa_firmware, ae->ae_adapter.aa_bios,
+ ae->ae_adapter.aa_memorysize);
+ }
free(ae, M_DEVBUF);
}
OpenPOWER on IntegriCloud