summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-07-02 22:17:59 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-07-02 22:17:59 +0000
commitdf57327f728f0553ddc0b9f1ef216734458efa96 (patch)
tree7bed7477b81ceb369aad220ce7b814165723e12d /sys/dev
parent9e114205afca8455e8216af39d0674a0ad821322 (diff)
don't call mii_pollstat() right after mii_tick() in foo_tick_task()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_aue.c19
-rw-r--r--sys/dev/usb/if_axe.c19
-rw-r--r--sys/dev/usb/if_udav.c19
-rw-r--r--sys/dev/usb/if_url.c19
4 files changed, 32 insertions, 44 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 17db7d88f39..af8a8022801 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.39 2005/06/08 17:03:01 henning Exp $ */
+/* $OpenBSD: if_aue.c,v 1.40 2005/07/02 22:17:57 brad Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1262,16 +1262,13 @@ aue_tick_task(void *xsc)
s = splnet();
mii_tick(mii);
- if (!sc->aue_link) {
- mii_pollstat(mii); /* XXX FreeBSD has removed this call */
- if (mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
- DPRINTFN(2,("%s: %s: got link\n",
- USBDEVNAME(sc->aue_dev),__func__));
- sc->aue_link++;
- if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
- aue_start(ifp);
- }
+ if (!sc->aue_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ DPRINTFN(2,("%s: %s: got link\n",
+ USBDEVNAME(sc->aue_dev),__func__));
+ sc->aue_link++;
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
+ aue_start(ifp);
}
usb_callout(sc->aue_stat_ch, hz, aue_tick, sc);
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index a187c737078..812d3d48f64 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_axe.c,v 1.25 2005/06/08 17:03:01 henning Exp $ */
+/* $OpenBSD: if_axe.c,v 1.26 2005/07/02 22:17:57 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003
@@ -985,16 +985,13 @@ axe_tick_task(void *xsc)
s = splnet();
mii_tick(mii);
- if (!sc->axe_link) {
- mii_pollstat(mii);
- if (mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
- DPRINTF(("%s: %s: got link\n",
- USBDEVNAME(sc->axe_dev), __func__));
- sc->axe_link++;
- if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
- axe_start(ifp);
- }
+ if (!sc->axe_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ DPRINTF(("%s: %s: got link\n",
+ USBDEVNAME(sc->axe_dev), __func__));
+ sc->axe_link++;
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
+ axe_start(ifp);
}
usb_callout(sc->axe_stat_ch, hz, axe_tick, sc);
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 9f89b62f3b5..5cf06ee4ae3 100644
--- a/sys/dev/usb/if_udav.c
+++ b/sys/dev/usb/if_udav.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_udav.c,v 1.10 2005/06/08 17:03:02 henning Exp $ */
+/* $OpenBSD: if_udav.c,v 1.11 2005/07/02 22:17:58 brad Exp $ */
/* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -1486,16 +1486,13 @@ udav_tick_task(void *xsc)
s = splnet();
mii_tick(mii);
- if (!sc->sc_link) {
- mii_pollstat(mii);
- if (mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
- DPRINTF(("%s: %s: got link\n",
- USBDEVNAME(sc->sc_dev), __func__));
- sc->sc_link++;
- if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
- udav_start(ifp);
- }
+ if (!sc->sc_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ DPRINTF(("%s: %s: got link\n",
+ USBDEVNAME(sc->sc_dev), __func__));
+ sc->sc_link++;
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
+ udav_start(ifp);
}
usb_callout(sc->sc_stat_ch, hz, udav_tick, sc);
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 2318151e4c4..8cfe7121c6b 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.22 2005/06/08 17:03:02 henning Exp $ */
+/* $OpenBSD: if_url.c,v 1.23 2005/07/02 22:17:58 brad Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -1406,16 +1406,13 @@ url_tick_task(void *xsc)
s = splnet();
mii_tick(mii);
- if (!sc->sc_link) {
- mii_pollstat(mii);
- if (mii->mii_media_status & IFM_ACTIVE &&
- IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
- DPRINTF(("%s: %s: got link\n",
- USBDEVNAME(sc->sc_dev), __func__));
- sc->sc_link++;
- if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
- url_start(ifp);
- }
+ if (!sc->sc_link && mii->mii_media_status & IFM_ACTIVE &&
+ IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
+ DPRINTF(("%s: %s: got link\n",
+ USBDEVNAME(sc->sc_dev), __func__));
+ sc->sc_link++;
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
+ url_start(ifp);
}
usb_callout(sc->sc_stat_ch, hz, url_tick, sc);