summaryrefslogtreecommitdiff
path: root/sys/dev/mxge
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2013-02-22 19:21:29 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2013-02-22 19:21:29 +0000
commita4b233dd068cda269db3fa9f8fe8479234a91730 (patch)
treeded88c67886034e437e7c69717607a598450bd54 /sys/dev/mxge
parent3cd4155386e48d783af0cde911ae9416c5f47f8f (diff)
Notes
Diffstat (limited to 'sys/dev/mxge')
-rw-r--r--sys/dev/mxge/if_mxge.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/mxge/if_mxge.c b/sys/dev/mxge/if_mxge.c
index ee2ca2fb3ad2..e8a794335c88 100644
--- a/sys/dev/mxge/if_mxge.c
+++ b/sys/dev/mxge/if_mxge.c
@@ -291,11 +291,12 @@ mxge_parse_strings(mxge_softc_t *sc)
#define MXGE_NEXT_STRING(p) while(ptr < limit && *ptr++)
char *ptr, *limit;
- int i, found_mac;
+ int i, found_mac, found_sn2;
ptr = sc->eeprom_strings;
limit = sc->eeprom_strings + MXGE_EEPROM_STRINGS_SIZE;
found_mac = 0;
+ found_sn2 = 0;
while (ptr < limit && *ptr != '\0') {
if (memcmp(ptr, "MAC=", 4) == 0) {
ptr += 1;
@@ -311,10 +312,16 @@ mxge_parse_strings(mxge_softc_t *sc)
ptr += 3;
strncpy(sc->product_code_string, ptr,
sizeof (sc->product_code_string) - 1);
- } else if (memcmp(ptr, "SN=", 3) == 0) {
+ } else if (!found_sn2 && (memcmp(ptr, "SN=", 3) == 0)) {
ptr += 3;
strncpy(sc->serial_number_string, ptr,
sizeof (sc->serial_number_string) - 1);
+ } else if (memcmp(ptr, "SN2=", 4) == 0) {
+ /* SN2 takes precedence over SN */
+ ptr += 4;
+ found_sn2 = 1;
+ strncpy(sc->serial_number_string, ptr,
+ sizeof (sc->serial_number_string) - 1);
}
MXGE_NEXT_STRING(ptr);
}
@@ -581,9 +588,10 @@ mxge_firmware_probe(mxge_softc_t *sc)
/*
* Run a DMA test which watches for unaligned completions and
- * aborts on the first one seen.
+ * aborts on the first one seen. Not required on Z8ES or newer.
*/
-
+ if (pci_get_revid(sc->dev) >= MXGE_PCI_REV_Z8ES)
+ return 0;
status = mxge_dma_test(sc, MXGEFW_CMD_UNALIGNED_TEST);
if (status == 0)
return 0; /* keep the aligned firmware */