summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/bge/if_bge.c19
-rw-r--r--sys/dev/bge/if_bgereg.h5
2 files changed, 20 insertions, 4 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 90ef61d..bd7adb5 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -57,7 +57,7 @@
* function in a 32-bit/64-bit 33/66Mhz bus, or a 64-bit/133Mhz bus.
*
* The BCM5701 is a single-chip solution incorporating both the BCM5700
- * MAC and a BCM5401 10/100/1000 PHY. Unlike the BCM5700, the BCM5700
+ * MAC and a BCM5401 10/100/1000 PHY. Unlike the BCM5700, the BCM5701
* does not support external SSRAM.
*
* Broadcom also produces a variation of the BCM5700 under the "Altima"
@@ -479,6 +479,9 @@ bge_miibus_readreg(dev, phy, reg)
sc = device_get_softc(dev);
ifp = &sc->arpcom.ac_if;
+ if (sc->bge_asicrev == BGE_ASICREV_BCM5701_B5 && phy != 1)
+ return(0);
+
if (ifp->if_flags & IFF_RUNNING)
BGE_CLRBIT(sc, BGE_MI_MODE, BGE_MIMODE_AUTOPOLL);
@@ -1623,6 +1626,12 @@ bge_attach(dev)
ifp->if_capabilities = IFCAP_HWCSUM;
ifp->if_capenable = ifp->if_capabilities;
+ /* Save ASIC rev. */
+
+ sc->bge_asicrev =
+ pci_read_config(dev, BGE_PCI_MISC_CTL, 4) &
+ BGE_PCIMISCCTL_ASICREV;
+
/* The SysKonnect SK-9D41 is a 1000baseSX card. */
if ((pci_read_config(dev, BGE_PCI_SUBSYS, 4) >> 16) == SK_SUBSYSID_9D41)
sc->bge_tbi = 1;
@@ -1981,9 +1990,11 @@ bge_intr(xsc)
/* Process link state changes. */
if (sc->bge_rdata->bge_status_block.bge_status &
BGE_STATFLAG_LINKSTATE_CHANGED) {
- sc->bge_link = 0;
- untimeout(bge_tick, sc, sc->bge_stat_ch);
- bge_tick(sc);
+ if (sc->bge_asicrev != BGE_ASICREV_BCM5701_B5) {
+ sc->bge_link = 0;
+ untimeout(bge_tick, sc, sc->bge_stat_ch);
+ bge_tick(sc);
+ }
/* ack the event to clear/reset it */
CSR_WRITE_4(sc, BGE_MAC_STS, BGE_MACSTAT_SYNC_CHANGED|
BGE_MACSTAT_CFG_CHANGED);
diff --git a/sys/dev/bge/if_bgereg.h b/sys/dev/bge/if_bgereg.h
index 1436baf..39ea6bb 100644
--- a/sys/dev/bge/if_bgereg.h
+++ b/sys/dev/bge/if_bgereg.h
@@ -217,6 +217,10 @@
#define BGE_ASICREV_BCM5700_B2 0x71030000
#define BGE_ASICREV_BCM5700_ALTIMA 0x71040000
#define BGE_ASICREV_BCM5700_C0 0x72000000
+#define BGE_ASICREV_BCM5701_A0 0x00000000 /* grrrr */
+#define BGE_ASICREV_BCM5701_B0 0x01000000
+#define BGE_ASICREV_BCM5701_B2 0x01020000
+#define BGE_ASICREV_BCM5701_B5 0x01050000
/* PCI DMA Read/Write Control register */
#define BGE_PCIDMARWCTL_MINDMA 0x000000FF
@@ -2109,6 +2113,7 @@ struct bge_softc {
u_int8_t bge_unit; /* interface number */
u_int8_t bge_extram; /* has external SSRAM */
u_int8_t bge_tbi;
+ u_int32_t bge_asicrev;
struct bge_ring_data *bge_rdata; /* rings */
struct bge_chain_data bge_cdata; /* mbufs */
u_int16_t bge_tx_saved_considx;
OpenPOWER on IntegriCloud