aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/bge
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2004-09-17 04:58:17 +0000
committerBill Paul <wpaul@FreeBSD.org>2004-09-17 04:58:17 +0000
commitdc961de0b415d3928821fdeee5a24ae76b969cb0 (patch)
treeef8d2020be9c7840c1c292c15b64d49d09e099ff /sys/dev/bge
parentd6970563b6dcf67bdc3981fc31d8c713e49a1612 (diff)
Notes
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 5468423d7593..71ad6ab36938 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2802,7 +2802,7 @@ bge_intr(xsc)
struct bge_softc *sc;
struct ifnet *ifp;
u_int32_t statusword;
- u_int32_t status;
+ u_int32_t status, mimode;
sc = xsc;
ifp = &sc->arpcom.ac_if;
@@ -2863,10 +2863,19 @@ bge_intr(xsc)
* that sometimes appear on fiber NICs during
* periods of heavy traffic. (There should be no
* effect on copper NICs.)
+ *
+ * If we do have a copper NIC (bge_tbi == 0) then
+ * check that the AUTOPOLL bit is set before
+ * processing the event as a real link change.
+ * Turning AUTOPOLL on and off in the MII read/write
+ * functions will often trigger a link status
+ * interrupt for no reason.
*/
status = CSR_READ_4(sc, BGE_MAC_STS);
+ mimode = CSR_READ_4(sc, BGE_MI_MODE);
if (!(status & (BGE_MACSTAT_PORT_DECODE_ERROR|
- BGE_MACSTAT_MI_COMPLETE))) {
+ BGE_MACSTAT_MI_COMPLETE)) && (!sc->bge_tbi &&
+ (mimode & BGE_MIMODE_AUTOPOLL))) {
sc->bge_link = 0;
callout_stop(&sc->bge_stat_ch);
bge_tick_locked(sc);