diff options
author | hselasky <hselasky@FreeBSD.org> | 2014-01-13 15:06:03 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2014-01-13 15:06:03 +0000 |
commit | 94e08728590f78ad237a584e9176b460c7d3e331 (patch) | |
tree | db5298092e2de00d6a088d8170d0549300b22f20 /sys/dev/usb/controller/uhci.c | |
parent | 7744502d299c74323f7b3a8b4fcfac0f91d6512d (diff) | |
download | FreeBSD-src-94e08728590f78ad237a584e9176b460c7d3e331.zip FreeBSD-src-94e08728590f78ad237a584e9176b460c7d3e331.tar.gz |
Separate I/O errors from reception of STALL PID.
MFC after: 1 week
Diffstat (limited to 'sys/dev/usb/controller/uhci.c')
-rw-r--r-- | sys/dev/usb/controller/uhci.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/uhci.c b/sys/dev/usb/controller/uhci.c index de65df5..134a447 100644 --- a/sys/dev/usb/controller/uhci.c +++ b/sys/dev/usb/controller/uhci.c @@ -1179,8 +1179,13 @@ uhci_non_isoc_done_sub(struct usb_xfer *xfer) (status & UHCI_TD_SPD) ? "[SPD]" : ""); } #endif - return (status & UHCI_TD_STALLED) ? - USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION; + if (status & UHCI_TD_STALLED) { + /* try to separate I/O errors from STALL */ + if (UHCI_TD_GET_ERRCNT(status) == 0) + return (USB_ERR_IOERROR); + return (USB_ERR_STALLED); + } + return (USB_ERR_NORMAL_COMPLETION); } static void |