summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2013-09-19 09:54:42 +0000
committermpi <mpi@openbsd.org>2013-09-19 09:54:42 +0000
commit443b25915405622ebb9052e9c609a0bc234cc5be (patch)
tree59f24a2258082ca95e7f7bfcdad8fb7525940c09
parentadjust the names to more accurately reflect the names of structs (diff)
downloadwireguard-openbsd-443b25915405622ebb9052e9c609a0bc234cc5be.tar.xz
wireguard-openbsd-443b25915405622ebb9052e9c609a0bc234cc5be.zip
Do no try to clear the endpoint, as it if has stalled, if the
USB transfer reported an I/O error. This is more likely to have no effect apart generating more errors because when this happens, the device is generally already physically detached but the *detach() task has not run yet. So simply return and wait for the device to be removed like ucom(4) does. Partially fix an issue reported by RD Thrush rt at thrush.com. ok miod@
-rw-r--r--sys/dev/usb/uhidev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index 2e8d377bece..10acbb9092c 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.44 2013/05/07 08:44:38 mpi Exp $ */
+/* $OpenBSD: uhidev.c,v 1.45 2013/09/19 09:54:42 mpi Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -393,7 +393,7 @@ uhidev_intr(struct usbd_xfer *xfer, void *addr, usbd_status status)
}
#endif
- if (status == USBD_CANCELLED)
+ if (status == USBD_CANCELLED || status == USBD_IOERROR)
return;
if (status != USBD_NORMAL_COMPLETION) {