summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-05-11 03:44:28 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-05-11 03:44:28 +0000
commite0ecd0ae3e4c8a25a6431534747b344af3c1fa46 (patch)
tree7afce9375b4e3005f4fcda83990da448c0985e4b /sys
parent78364602ffe5aaebe62e74ccfd3270cefe2b8735 (diff)
Do not call mii_pollstat() from within device tick routines; the status
information is updated by mii_tick(). From FreeBSD
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_sf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/if_sf.c b/sys/dev/pci/if_sf.c
index 21342f180a2..d37fe6643d1 100644
--- a/sys/dev/pci/if_sf.c
+++ b/sys/dev/pci/if_sf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sf.c,v 1.28 2005/01/15 05:24:11 brad Exp $ */
+/* $OpenBSD: if_sf.c,v 1.29 2005/05/11 03:44:27 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1364,11 +1364,9 @@ void sf_stats_update(xsc)
stats.sf_tx_multi_colls + stats.sf_tx_excess_colls;
mii_tick(mii);
- if (!sc->sf_link) {
- mii_pollstat(mii);
- if (mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE)
- sc->sf_link++;
+ if (!sc->sf_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ sc->sf_link++;
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
sf_start(ifp);
}