summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-05-12 03:50:56 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-05-12 03:50:56 +0000
commit9d3303d7a51b7d78b5c2e9057307342c9820921c (patch)
tree245c9b8e92d6a0a4940ddefdd8f09b7dccf5c273 /sys
parent99517932c1dd75b4a71a9be65c772b461e9fd22e (diff)
Call mii_pollstat() instead of bge_tick() in bge_link_upd() so that link
state transitions are noticed and the appropriate routing socket messages are generated. ok kettenis@ krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_bge.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 1010c2c1a36..cc9d8644232 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.229 2008/05/11 09:56:11 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.230 2008/05/12 03:50:55 brad Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3465,12 +3465,7 @@ bge_stop(struct bge_softc *sc)
sc->bge_tx_saved_considx = BGE_TXCONS_UNSET;
- /*
- * We can't just call bge_link_upd() cause chip is almost stopped so
- * bge_link_upd -> bge_tick_locked -> bge_stats_update sequence may
- * lead to hardware deadlock. So we just clearing MAC's link state
- * (PHY may still have link UP).
- */
+ /* Clear MAC's link state (PHY may still have link UP). */
BGE_STS_CLRBIT(sc, BGE_STS_LINK);
}
@@ -3513,8 +3508,7 @@ bge_link_upd(struct bge_softc *sc)
if (BGE_ASICREV(sc->bge_chipid) == BGE_ASICREV_BCM5700) {
status = CSR_READ_4(sc, BGE_MAC_STS);
if (status & BGE_MACSTAT_MI_INTERRUPT) {
- timeout_del(&sc->bge_timeout);
- bge_tick(sc);
+ mii_pollstat(mii);
if (!BGE_STS_BIT(sc, BGE_STS_LINK) &&
mii->mii_media_status & IFM_ACTIVE &&
@@ -3571,8 +3565,7 @@ bge_link_upd(struct bge_softc *sc)
BGE_STS_LINK : 0;
if (BGE_STS_BIT(sc, BGE_STS_LINK) != link) {
- timeout_del(&sc->bge_timeout);
- bge_tick(sc);
+ mii_pollstat(mii);
if (!BGE_STS_BIT(sc, BGE_STS_LINK) &&
mii->mii_media_status & IFM_ACTIVE &&