summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorSASANO Takayoshi <uaa@cvs.openbsd.org>2018-03-15 21:37:00 +0000
committerSASANO Takayoshi <uaa@cvs.openbsd.org>2018-03-15 21:37:00 +0000
commitdf6b4c95d49d82605b5ac9ab7fe7fd187b651fe1 (patch)
treef11a74ff8b06f9bf6bd26f12c161a1087f6476f5 /sys/dev
parenta5bcd2dc9e06cf5f7b16560d642cce2bd9ebc037 (diff)
bug fix (I found it when comparing with if_upl.c)
- remove extra blank line - call ifq_deq_rollback() when ugl_send() failed - call ifq_clr_oactive() before splx() ok mpi@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_ugl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/usb/if_ugl.c b/sys/dev/usb/if_ugl.c
index 2ebc4b634ab..fd176cf7334 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.21 2017/01/22 10:17:39 dlg Exp $ */
+/* $OpenBSD: if_ugl.c,v 1.22 2018/03/15 21:36:59 uaa 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>
@@ -215,7 +215,6 @@ ugl_attach(struct device *parent, struct device *self, void *aux)
DPRINTFN(5,(" : ugl_attach: sc=%p, dev=%p", sc, dev));
-
sc->sc_udev = dev;
sc->sc_iface = iface;
id = usbd_get_interface_descriptor(iface);
@@ -595,7 +594,7 @@ ugl_start(struct ifnet *ifp)
return;
if (ugl_send(sc, m_head, 0)) {
- ifq_deq_commit(&ifp->if_snd, m_head);
+ ifq_deq_rollback(&ifp->if_snd, m_head);
ifq_set_oactive(&ifp->if_snd);
return;
}
@@ -655,9 +654,9 @@ ugl_init(void *xsc)
}
ifp->if_flags |= IFF_RUNNING;
- splx(s);
-
ifq_clr_oactive(&ifp->if_snd);
+
+ splx(s);
}
int