this makes mfi(4) print details about itself like mfii(4) does.
instead of:

instead of this:

mfi0 at pci10 dev 14 function 0 "Dell PERC 5" rev 0x00: apic 10 int 14, 
0x1f031028
mfi0: logical drives 2, version 5.2.2-0072, 256MB RAM
scsibus0 at mfi0: 2 targets
sd0 at scsibus0 targ 0 lun 0: <DELL, PERC 5/i, 1.03> SCSI3 0/direct fixed 
naa.600188b03accac0016f418dd0a7f7f12
sd0: 69376MB, 512 bytes/sector, 142082048 sectors
sd1 at scsibus0 targ 1 lun 0: <DELL, PERC 5/i, 1.03> SCSI3 0/direct fixed 
naa.600188b03accac0016f418f8e8a0a5aa
sd1: 1905664MB, 512 bytes/sector, 3902799872 sectors

itll now print this:

mfi0 at pci10 dev 14 function 0 "Dell PERC 5" rev 0x00: apic 10 int 14, 
0x1f031028
mfi0: "PERC 5/i Integrated", firmware 5.2.2-0072, 256MB cache
scsibus0 at mfi0: 2 targets
sd0 at scsibus0 targ 0 lun 0: <DELL, PERC 5/i, 1.03> SCSI3 0/direct fixed 
naa.600188b03accac0016f418dd0a7f7f12
sd0: 69376MB, 512 bytes/sector, 142082048 sectors
sd1 at scsibus0 targ 1 lun 0: <DELL, PERC 5/i, 1.03> SCSI3 0/direct fixed 
naa.600188b03accac0016f418f8e8a0a5aa
sd1: 1905664MB, 512 bytes/sector, 3902799872 sectors

cos we get the board name out of the firmware i can then get rid of the table 
of subtypes in mfi_pci.c later on. gotta love a space saving.

Index: mfi.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/mfi.c,v
retrieving revision 1.126
diff -u -p -r1.126 mfi.c
--- mfi.c       13 Aug 2012 06:19:15 -0000      1.126
+++ mfi.c       14 Aug 2012 03:30:07 -0000
@@ -736,11 +736,11 @@ mfi_attach(struct mfi_softc *sc, enum mf
                goto noinit;
        }
 
-       printf("%s: logical drives %d, version %s, %dMB RAM\n",
-           DEVNAME(sc),
-           sc->sc_info.mci_lds_present,
-           sc->sc_info.mci_package_version,
-           sc->sc_info.mci_memory_size);
+       printf("%s: \"%s\", firmware %s", DEVNAME(sc),
+           sc->sc_info.mci_product_name, sc->sc_info.mci_package_version);
+       if (letoh16(sc->sc_info.mci_memory_size) > 0)
+               printf(", %uMB cache", letoh16(sc->sc_info.mci_memory_size));
+       printf("\n");
 
        sc->sc_ld_cnt = sc->sc_info.mci_lds_present;
        sc->sc_max_ld = sc->sc_ld_cnt;

Reply via email to