summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sf.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2001-09-29 19:28:31 +0000
committerjlemon <jlemon@FreeBSD.org>2001-09-29 19:28:31 +0000
commit7265fc9a25abf1e7ce5c2f861868d50ff0cb7ac7 (patch)
tree059d83b39e680ff22f9e9aee5eb54410ca5ecbe3 /sys/pci/if_sf.c
parent7ec889372d0e5b4a87c80ff2e066f5c6419b2b28 (diff)
downloadFreeBSD-src-7265fc9a25abf1e7ce5c2f861868d50ff0cb7ac7.zip
FreeBSD-src-7265fc9a25abf1e7ce5c2f861868d50ff0cb7ac7.tar.gz
Do not call mii_pollstat() from within device tick routines; the status
information is updated by mii_tick(). Pointed out by: wpaul (a while back)
Diffstat (limited to 'sys/pci/if_sf.c')
-rw-r--r--sys/pci/if_sf.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c
index c0c05d5..487b48f 100644
--- a/sys/pci/if_sf.c
+++ b/sys/pci/if_sf.c
@@ -1489,13 +1489,12 @@ static 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 (ifp->if_snd.ifq_head != NULL)
- sf_start(ifp);
+
+ if (!sc->sf_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ sc->sf_link++;
+ if (ifp->if_snd.ifq_head != NULL)
+ sf_start(ifp);
}
sc->sf_stat_ch = timeout(sf_stats_update, sc, hz);
OpenPOWER on IntegriCloud