mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
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
This commit is contained in:
parent
d6436d0f22
commit
b40cbf61a7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74936
@ -1573,9 +1573,43 @@ amr_describe_controller(struct amr_softc *sc)
|
||||
} else {
|
||||
prod = "unsupported controller";
|
||||
}
|
||||
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user