3 This is the documentation of (hopefully) all possible error codes (and
4 their interpretation) that can be returned from usbcore.
6 Some of them are returned by the Host Controller Drivers (HCDs), which
7 device drivers only see through usbcore. As a rule, all the HCDs should
8 behave the same except for transfer speed dependent behaviors.
11 **************************************************************************
12 * Error codes returned by usb_submit_urb *
13 **************************************************************************
17 0 URB submission went fine
19 -ENOMEM no memory for allocation of internal structures
23 -ENODEV specified USB-device or bus doesn't exist
25 -ENXIO host controller driver does not support queuing of this type
26 of urb. (treat as a host controller bug.)
28 -EINVAL a) Invalid transfer type specified (or not supported)
29 b) Invalid interrupt interval (0<=n<256)
30 c) more than one interrupt packet requested
31 d) ISO: number_of_packets is < 0
33 -EAGAIN a) specified ISO start frame too early
34 b) (using ISO-ASAP) too much scheduled for the future
35 wait some time and try again.
37 -EFBIG too much ISO frames requested (currently uhci>900)
39 -EPIPE Specified endpoint is stalled. For non-control endpoints,
40 reset this status with usb_clear_halt().
42 -EMSGSIZE endpoint message size is zero, do interface/alternate setting
44 -ENOSPC The host controller's bandwidth is already consumed and
45 this request would push it past its allowed limit.
47 -ESHUTDOWN The host controller has been disabled due to some
48 problem that could not be worked around.
51 **************************************************************************
52 * Error codes returned by in urb->status *
53 * or in iso_frame_desc[n].status (for ISO) *
54 **************************************************************************
56 USB device drivers may only test urb status values in completion handlers.
57 This is because otherwise there would be a race between HCDs updating
58 these values on one CPU, and device drivers testing them on another CPU.
60 A transfer's actual_length may be positive even when an error has been
61 reported. That's because transfers often involve several packets, so that
62 one or more packets could finish before an error stops further endpoint I/O.
65 0 Transfer completed successfully
67 -ENOENT URB was synchronously unlinked by usb_unlink_urb
69 -EINPROGRESS URB still pending, no results yet
70 (That is, if drivers see this it's a bug.)
72 -EPROTO (*) a) bitstuff error
73 b) no response packet received within the
74 prescribed bus turn-around time
77 -EILSEQ (*) CRC mismatch
79 -EPIPE Endpoint stalled. For non-control endpoints,
80 reset this status with usb_clear_halt().
82 -ECOMM During an IN transfer, the host controller
83 received data from an endpoint faster than it
84 could be written to system memory
86 -ENOSR During an OUT transfer, the host controller
87 could not retrieve data from system memory fast
88 enough to keep up with the USB data rate
90 -EOVERFLOW (*) The amount of data returned by the endpoint was
91 greater than either the max packet size of the
92 endpoint or the remaining buffer size. "Babble".
94 -EREMOTEIO The data read from the endpoint did not fill the
95 specified buffer, and URB_SHORT_NOT_OK was set in
98 -ETIMEDOUT transfer timed out, NAK
100 -ENODEV Device was removed. Often preceded by a burst of
101 other errors, since the hub driver does't detect
102 device removal events immediately.
104 -EXDEV ISO transfer only partially completed
105 look at individual frame status for details
107 -EINVAL ISO madness, if this happens: Log off and go home
109 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb
111 -ESHUTDOWN The host controller has been disabled due to some
112 problem that could not be worked around.
115 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate
116 hardware problems such as bad devices (including firmware) or cables.
120 **************************************************************************
121 * Error codes returned by usbcore-functions *
122 * (expect also other submit and transfer status codes) *
123 **************************************************************************
126 -EINVAL error during registering new driver
128 usb_get_*/usb_set_*():
131 All USB errors (submit/status) can occur