summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2008-06-17 06:04:07 +0000
committermlelstv <mlelstv@NetBSD.org>2008-06-17 06:04:07 +0000
commitf1f0ceb1ae2451497c373db47f66f8ceea61fb4e (patch)
tree54e2d12f0eaf2c26632f9cd21bc830ee413330c8 /sys/dev
parent2f9ef1b142dbcf29509c01d6e897785e12deb19e (diff)
No longer try to start sending packets from status change handler.
This is already handled by the general status change code. For non-TBI devices always call mii_tick(). This fixes ifwatchd signalling.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_bge.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index a70e5c5d2d5..fb42167e738 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bge.c,v 1.146 2008/06/08 11:41:26 mlelstv Exp $ */
+/* $NetBSD: if_bge.c,v 1.147 2008/06/17 06:04:07 mlelstv Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.146 2008/06/08 11:41:26 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.147 2008/06/17 06:04:07 mlelstv Exp $");
#include "bpfilter.h"
#include "vlan.h"
@@ -3290,38 +3290,20 @@ bge_tick(void *xsc)
{
struct bge_softc *sc = xsc;
struct mii_data *mii = &sc->bge_mii;
- struct ifnet *ifp = &sc->ethercom.ec_if;
int s;
s = splnet();
bge_stats_update(sc);
callout_reset(&sc->bge_timeout, hz, bge_tick, sc);
- if (sc->bge_link) {
- splx(s);
- return;
- }
if (sc->bge_tbi) {
if (CSR_READ_4(sc, BGE_MAC_STS) &
BGE_MACSTAT_TBI_PCS_SYNCHED) {
- sc->bge_link++;
CSR_WRITE_4(sc, BGE_MAC_STS, 0xFFFFFFFF);
- if (!IFQ_IS_EMPTY(&ifp->if_snd))
- bge_start(ifp);
}
- splx(s);
- return;
- }
-
- mii_tick(mii);
-
- if (!sc->bge_link && mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
- sc->bge_link++;
- if (!IFQ_IS_EMPTY(&ifp->if_snd))
- bge_start(ifp);
- }
+ } else
+ mii_tick(mii);
splx(s);
}