diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-22 16:31:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-03-22 16:31:20 +0000 |
commit | 5525d549e356a1e8e4e0c2db511fd54213a84222 (patch) | |
tree | 059c3f0c34de32deb81196b4a8ed69e1379cbf13 /sys/dev/usb | |
parent | fe81924596466cacd295d2f4e29461e75b9adbba (diff) |
silently clear the endpoint when the device has failed; ok jakemsr
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ueagle.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 7 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c index c9a3f524686..592a5166869 100644 --- a/sys/dev/usb/ueagle.c +++ b/sys/dev/usb/ueagle.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ueagle.c,v 1.32 2011/01/25 20:03:36 jakemsr Exp $ */ +/* $OpenBSD: ueagle.c,v 1.33 2011/03/22 16:31:19 deraadt Exp $ */ /*- * Copyright (c) 2003-2006 @@ -696,12 +696,10 @@ ueagle_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: abnormal interrupt status: %s\n", - sc->sc_dev.dv_xname, usbd_errstr(status)); - - if (status == USBD_STALLED) - usbd_clear_endpoint_stall_async(sc->pipeh_intr); + DPRINTF(("%s: abnormal interrupt status: %s\n", + sc->sc_dev.dv_xname, usbd_errstr(status))); + usbd_clear_endpoint_stall_async(sc->pipeh_intr); return; } diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 4387b4eac2f..49abeedaeda 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.42 2011/02/17 16:12:22 jakemsr Exp $ */ +/* $OpenBSD: umodem.c,v 1.43 2011/03/22 16:31:19 deraadt Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -457,8 +457,9 @@ umodem_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: abnormal status: %s\n", sc->sc_dev.dv_xname, - usbd_errstr(status)); + DPRINTF(("%s: abnormal status: %s\n", sc->sc_dev.dv_xname, + usbd_errstr(status))); + usbd_clear_endpoint_stall_async(sc->sc_notify_pipe); return; } |