Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb ALTQ'ify.
details: https://anonhg.NetBSD.org/src/rev/f9b0b81cf81e
branches: trunk
changeset: 500593:f9b0b81cf81e
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Dec 14 07:51:36 2000 +0000
description:
ALTQ'ify.
diffstat:
sys/dev/usb/if_aue.c | 15 +++++++++------
sys/dev/usb/if_cue.c | 13 ++++++++-----
sys/dev/usb/if_kue.c | 13 ++++++++-----
3 files changed, 25 insertions(+), 16 deletions(-)
diffs (177 lines):
diff -r 60d4c65f47be -r f9b0b81cf81e sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Thu Dec 14 07:27:21 2000 +0000
+++ b/sys/dev/usb/if_aue.c Thu Dec 14 07:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.49 2000/12/13 02:49:22 augustss Exp $ */
+/* $NetBSD: if_aue.c,v 1.50 2000/12/14 07:51:36 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -886,6 +886,8 @@
#endif
strncpy(ifp->if_xname, USBDEVNAME(sc->aue_dev), IFNAMSIZ);
+ IFQ_SET_READY(&ifp->if_snd);
+
/* Initialize MII/media info. */
mii = &sc->aue_mii;
mii->mii_ifp = ifp;
@@ -1309,7 +1311,7 @@
m_freem(c->aue_mbuf);
c->aue_mbuf = NULL;
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
aue_start(ifp);
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1347,7 +1349,7 @@
DPRINTFN(2,("%s: %s: got link\n",
USBDEVNAME(sc->aue_dev),__FUNCTION__));
sc->aue_link++;
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
aue_start(ifp);
}
}
@@ -1423,16 +1425,17 @@
if (ifp->if_flags & IFF_OACTIVE)
return;
- IF_DEQUEUE(&ifp->if_snd, m_head);
+ IFQ_POLL(&ifp->if_snd, m_head);
if (m_head == NULL)
return;
if (aue_send(sc, m_head, 0)) {
- IF_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
return;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m_head);
+
#if NBPFILTER > 0
/*
* If there's a BPF listener, bounce a copy of this frame
@@ -1748,7 +1751,7 @@
aue_init(sc);
usbd_set_polling(sc->aue_udev, 0);
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
aue_start(ifp);
}
diff -r 60d4c65f47be -r f9b0b81cf81e sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Thu Dec 14 07:27:21 2000 +0000
+++ b/sys/dev/usb/if_cue.c Thu Dec 14 07:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.26 2000/11/15 01:02:19 thorpej Exp $ */
+/* $NetBSD: if_cue.c,v 1.27 2000/12/14 07:51:36 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -701,6 +701,8 @@
#endif
strncpy(ifp->if_xname, USBDEVNAME(sc->cue_dev), IFNAMSIZ);
+ IFQ_SET_READY(&ifp->if_snd);
+
/* Attach the interface. */
if_attach(ifp);
Ether_ifattach(ifp, eaddr);
@@ -1061,7 +1063,7 @@
m_freem(c->cue_mbuf);
c->cue_mbuf = NULL;
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
cue_start(ifp);
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1156,16 +1158,17 @@
if (ifp->if_flags & IFF_OACTIVE)
return;
- IF_DEQUEUE(&ifp->if_snd, m_head);
+ IFQ_POLL(&ifp->if_snd, m_head);
if (m_head == NULL)
return;
if (cue_send(sc, m_head, 0)) {
- IF_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
return;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m_head);
+
#if NBPFILTER > 0
/*
* If there's a BPF listener, bounce a copy of this frame
@@ -1433,7 +1436,7 @@
cue_init(sc);
usbd_set_polling(sc->cue_udev, 0);
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
cue_start(ifp);
}
diff -r 60d4c65f47be -r f9b0b81cf81e sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Thu Dec 14 07:27:21 2000 +0000
+++ b/sys/dev/usb/if_kue.c Thu Dec 14 07:51:36 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.33 2000/12/06 21:44:08 jdolecek Exp $ */
+/* $NetBSD: if_kue.c,v 1.34 2000/12/14 07:51:36 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -664,6 +664,8 @@
#endif
strncpy(ifp->if_xname, USBDEVNAME(sc->kue_dev), IFNAMSIZ);
+ IFQ_SET_READY(&ifp->if_snd);
+
/* Attach the interface. */
if_attach(ifp);
Ether_ifattach(ifp, sc->kue_desc.kue_macaddr);
@@ -1030,7 +1032,7 @@
m_freem(c->kue_mbuf);
c->kue_mbuf = NULL;
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
kue_start(ifp);
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
@@ -1094,16 +1096,17 @@
if (ifp->if_flags & IFF_OACTIVE)
return;
- IF_DEQUEUE(&ifp->if_snd, m_head);
+ IFQ_POLL(&ifp->if_snd, m_head);
if (m_head == NULL)
return;
if (kue_send(sc, m_head, 0)) {
- IF_PREPEND(&ifp->if_snd, m_head);
ifp->if_flags |= IFF_OACTIVE;
return;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m_head);
+
#if NBPFILTER > 0
/*
* If there's a BPF listener, bounce a copy of this frame
@@ -1361,7 +1364,7 @@
kue_init(sc);
usbd_set_polling(sc->kue_udev, 0);
- if (ifp->if_snd.ifq_head != NULL)
+ if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
kue_start(ifp);
}
Home |
Main Index |
Thread Index |
Old Index