diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_aue.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_axen.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_cdce.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_cdcef.c | 9 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_kue.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_mos.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_smsc.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_ugl.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_upl.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_url.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_urndis.c | 7 |
14 files changed, 57 insertions, 43 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index f65900d2c73..78b906dd237 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.101 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_aue.c,v 1.102 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1244,16 +1244,17 @@ aue_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (aue_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 /* diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 0f39523f49d..1912c057923 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.133 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_axe.c,v 1.134 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -1253,15 +1253,16 @@ axe_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (axe_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); /* * If there's a BPF listener, bounce a copy of this frame diff --git a/sys/dev/usb/if_axen.c b/sys/dev/usb/if_axen.c index 2e84cbe50b5..e02c06bf6fa 100644 --- a/sys/dev/usb/if_axen.c +++ b/sys/dev/usb/if_axen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axen.c,v 1.17 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_axen.c,v 1.18 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 2013 Yojiro UO <yuo@openbsd.org> @@ -1273,15 +1273,16 @@ axen_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (axen_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); /* * If there's a BPF listener, bounce a copy of this frame diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index 596371f65ca..d8435a28d67 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.66 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.67 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -389,16 +389,17 @@ cdce_start(struct ifnet *ifp) if (usbd_is_dying(sc->cdce_udev) || (ifp->if_flags & IFF_OACTIVE)) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (cdce_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/usb/if_cdcef.c b/sys/dev/usb/if_cdcef.c index 8b32dfec7fe..4f3c0a9e9d1 100644 --- a/sys/dev/usb/if_cdcef.c +++ b/sys/dev/usb/if_cdcef.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdcef.c,v 1.38 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_cdcef.c,v 1.39 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 2007 Dale Rahn <drahn@openbsd.org> @@ -277,7 +277,7 @@ cdcef_start(struct ifnet *ifp) if(ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd, m_head); if (m_head == NULL) { return; } @@ -287,17 +287,18 @@ cdcef_start(struct ifnet *ifp) * drop packet because receiver is not listening, * or if packet is larger than xmit buffer */ - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); m_freem(m_head); return; } if (cdcef_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index e4c17ddb7c9..eb85e2bb574 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.72 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_cue.c,v 1.73 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -887,16 +887,17 @@ cue_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (cue_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 /* diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 5abe5cf9729..d8497babd1a 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.81 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_kue.c,v 1.82 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -858,16 +858,17 @@ kue_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (kue_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 /* diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c index 3d41c10a20e..beebf669e71 100644 --- a/sys/dev/usb/if_mos.c +++ b/sys/dev/usb/if_mos.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_mos.c,v 1.32 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_mos.c,v 1.33 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net> @@ -1138,15 +1138,16 @@ mos_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (mos_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); /* * If there's a BPF listener, bounce a copy of this frame diff --git a/sys/dev/usb/if_smsc.c b/sys/dev/usb/if_smsc.c index aff4fd8732f..2c812bd70ea 100644 --- a/sys/dev/usb/if_smsc.c +++ b/sys/dev/usb/if_smsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_smsc.c,v 1.21 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_smsc.c,v 1.22 2015/11/20 03:35:23 dlg Exp $ */ /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */ /*- * Copyright (c) 2012 @@ -610,15 +610,16 @@ smsc_start(struct ifnet *ifp) return; } - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (smsc_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index e4ddd0ad63d..ec0531eba92 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.73 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_udav.c,v 1.74 2015/11/20 03:35:23 dlg 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 $ */ /* @@ -918,16 +918,17 @@ udav_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (udav_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/usb/if_ugl.c b/sys/dev/usb/if_ugl.c index e7595880f4b..599c8dec796 100644 --- a/sys/dev/usb/if_ugl.c +++ b/sys/dev/usb/if_ugl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ugl.c,v 1.14 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_ugl.c,v 1.15 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2013 SASANO Takayoshi <uaa@uaa.org.uk> @@ -604,16 +604,17 @@ ugl_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (ugl_send(sc, m_head, 0)) { + ifq_deq_commit(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 /* diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 87b37296e9c..2c58fa65fd8 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.67 2015/06/30 13:54:42 mpi Exp $ */ +/* $OpenBSD: if_upl.c,v 1.68 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -580,16 +580,17 @@ upl_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (upl_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 /* diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index a9a4cbe113c..a60397df06b 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.76 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_url.c,v 1.77 2015/11/20 03:35:23 dlg Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -791,16 +791,17 @@ url_start(struct ifnet *ifp) if (ifp->if_flags & IFF_OACTIVE) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (url_send(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); #if NBPFILTER > 0 if (ifp->if_bpf) diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c index 73036bc8ff5..3e6fa3634b8 100644 --- a/sys/dev/usb/if_urndis.c +++ b/sys/dev/usb/if_urndis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_urndis.c,v 1.56 2015/10/25 12:11:56 mpi Exp $ */ +/* $OpenBSD: if_urndis.c,v 1.57 2015/11/20 03:35:23 dlg Exp $ */ /* * Copyright (c) 2010 Jonathan Armani <armani@openbsd.org> @@ -1148,15 +1148,16 @@ urndis_start(struct ifnet *ifp) if (usbd_is_dying(sc->sc_udev) || (ifp->if_flags & IFF_OACTIVE)) return; - IFQ_POLL(&ifp->if_snd, m_head); + m_head = ifq_deq_begin(&ifp->if_snd); if (m_head == NULL) return; if (urndis_encap(sc, m_head, 0)) { + ifq_deq_rollback(&ifp->if_snd, m_head); ifp->if_flags |= IFF_OACTIVE; return; } - IFQ_DEQUEUE(&ifp->if_snd, m_head); + ifq_deq_commit(&ifp->if_snd, m_head); /* * If there's a BPF listener, bounce a copy of this frame |