diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-09-19 09:54:43 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-09-19 09:54:43 +0000 |
commit | 6f3beff0ed61c4dd99f705958a5ae95ea659e832 (patch) | |
tree | 523eea33c0e737d4d8ad0709662d8d748c819599 /sys/dev | |
parent | 1f9888769a65bff07cc6ce401b02ec20ecfdce7c (diff) |
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@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/uhidev.c | 4 |
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) { |