summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2007-01-15 21:43:43 +0000
committerjkim <jkim@FreeBSD.org>2007-01-15 21:43:43 +0000
commitffb38d52f7b3579a1efb44a06318b0faa572bcc8 (patch)
tree95041596e03942ebeb6200154a4e90f1599203b3 /sys/dev/bge
parent9ca9d354d98eb12e0acd1619a9545f682a7ec672 (diff)
downloadFreeBSD-src-ffb38d52f7b3579a1efb44a06318b0faa572bcc8.zip
FreeBSD-src-ffb38d52f7b3579a1efb44a06318b0faa572bcc8.tar.gz
- Fix BCM5754 support found in Dell PowerEdge SC440.
- Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits. PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c25
-rw-r--r--sys/dev/bge/if_bgereg.h30
2 files changed, 36 insertions, 19 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index a036cfe..f1ba0a4 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -1686,7 +1686,7 @@ bge_probe(device_t dev)
br != NULL ? "" : "unknown ", id >> 16);
device_set_desc_copy(dev, buf);
if (pci_get_subvendor(dev) == DELL_VENDORID)
- sc->bge_flags |= BGE_FLAG_NO3LED;
+ sc->bge_flags |= BGE_FLAG_NO_3LED;
return (0);
}
t++;
@@ -2197,25 +2197,36 @@ bge_attach(device_t dev)
case BGE_ASICREV_BCM5704:
sc->bge_flags |= BGE_FLAG_5700_FAMILY | BGE_FLAG_JUMBO;
break;
-
case BGE_ASICREV_BCM5714_A0:
case BGE_ASICREV_BCM5780:
case BGE_ASICREV_BCM5714:
sc->bge_flags |= BGE_FLAG_5714_FAMILY /* | BGE_FLAG_JUMBO */;
- /* Fall through */
-
+ /* FALLTHRU */
case BGE_ASICREV_BCM5750:
case BGE_ASICREV_BCM5752:
case BGE_ASICREV_BCM5755:
case BGE_ASICREV_BCM5787:
sc->bge_flags |= BGE_FLAG_575X_PLUS;
- /* Fall through */
-
+ /* FALLTHRU */
case BGE_ASICREV_BCM5705:
sc->bge_flags |= BGE_FLAG_5705_PLUS;
break;
}
+ /* Set various bug flags. */
+ if (sc->bge_chiprev == BGE_CHIPREV_5703_AX ||
+ sc->bge_chiprev == BGE_CHIPREV_5704_AX)
+ sc->bge_flags |= BGE_FLAG_ADC_BUG;
+ if (sc->bge_chipid == BGE_CHIPID_BCM5704_A0)
+ sc->bge_flags |= BGE_FLAG_5704_A0_BUG;
+ if (BGE_IS_5705_PLUS(sc)) {
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5755 ||
+ sc->bge_asicrev == BGE_ASICREV_BCM5787)
+ sc->bge_flags |= BGE_FLAG_JITTER_BUG;
+ else
+ sc->bge_flags |= BGE_FLAG_BER_BUG;
+ }
+
/*
* Check if this is a PCI-X or PCI Express device.
*/
@@ -4190,7 +4201,7 @@ bge_sysctl_debug_info(SYSCTL_HANDLER_ARGS)
printf(" - PCI-X Bus\n");
if (sc->bge_flags & BGE_FLAG_PCIE)
printf(" - PCI Express Bus\n");
- if (sc->bge_flags & BGE_FLAG_NO3LED)
+ if (sc->bge_flags & BGE_FLAG_NO_3LED)
printf(" - No 3 LEDs\n");
if (sc->bge_flags & BGE_FLAG_RX_ALIGNBUG)
printf(" - RX Alignment Bug\n");
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 3dd9106..80a04f6 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -303,6 +303,9 @@
#define BGE_CHIPREV_5700_BX 0x71
#define BGE_CHIPREV_5700_CX 0x72
#define BGE_CHIPREV_5701_AX 0x00
+#define BGE_CHIPREV_5703_AX 0x10
+#define BGE_CHIPREV_5704_AX 0x20
+#define BGE_CHIPREV_5704_BX 0x21
#define BGE_CHIPREV_5750_AX 0x40
#define BGE_CHIPREV_5750_BX 0x41
@@ -2445,18 +2448,21 @@ struct bge_softc {
struct resource *bge_res;
struct ifmedia bge_ifmedia; /* TBI media info */
uint32_t bge_flags;
-#define BGE_FLAG_EXTRAM 0x00000001 /* External SSRAM (unused) */
-#define BGE_FLAG_TBI 0x00000002
-#define BGE_FLAG_RX_ALIGNBUG 0x00000004
-#define BGE_FLAG_NO3LED 0x00000008
-#define BGE_FLAG_PCIX 0x00000010
-#define BGE_FLAG_PCIE 0x00000020
-#define BGE_FLAG_JUMBO 0x00000040
-#define BGE_FLAG_5700_FAMILY 0x00000100
-#define BGE_FLAG_5705_PLUS 0x00000200
-#define BGE_FLAG_5714_FAMILY 0x00000400
-#define BGE_FLAG_575X_PLUS 0x00000800
-#define BGE_FLAG_MSI 0x00001000
+#define BGE_FLAG_TBI 0x00000001
+#define BGE_FLAG_JUMBO 0x00000002
+#define BGE_FLAG_MSI 0x00000100
+#define BGE_FLAG_PCIX 0x00000200
+#define BGE_FLAG_PCIE 0x00000400
+#define BGE_FLAG_5700_FAMILY 0x00001000
+#define BGE_FLAG_5705_PLUS 0x00002000
+#define BGE_FLAG_5714_FAMILY 0x00004000
+#define BGE_FLAG_575X_PLUS 0x00008000
+#define BGE_FLAG_RX_ALIGNBUG 0x00100000
+#define BGE_FLAG_NO_3LED 0x00200000
+#define BGE_FLAG_ADC_BUG 0x00400000
+#define BGE_FLAG_5704_A0_BUG 0x00800000
+#define BGE_FLAG_JITTER_BUG 0x01000000
+#define BGE_FLAG_BER_BUG 0x02000000
uint32_t bge_chipid;
uint8_t bge_asicrev;
uint8_t bge_chiprev;
OpenPOWER on IntegriCloud