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.
50 -EPERM Submission failed because urb->reject was set.
53 **************************************************************************
54 * Error codes returned by in urb->status *
55 * or in iso_frame_desc[n].status (for ISO) *
56 **************************************************************************
58 USB device drivers may only test urb status values in completion handlers.
59 This is because otherwise there would be a race between HCDs updating
60 these values on one CPU, and device drivers testing them on another CPU.
62 A transfer's actual_length may be positive even when an error has been
63 reported. That's because transfers often involve several packets, so that
64 one or more packets could finish before an error stops further endpoint I/O.
67 0 Transfer completed successfully
69 -ENOENT URB was synchronously unlinked by usb_unlink_urb
71 -EINPROGRESS URB still pending, no results yet
72 (That is, if drivers see this it's a bug.)
74 -EPROTO (*) a) bitstuff error
75 b) no response packet received within the
76 prescribed bus turn-around time
79 -EILSEQ (*) CRC mismatch
81 -EPIPE Endpoint stalled. For non-control endpoints,
82 reset this status with usb_clear_halt().
84 -ECOMM During an IN transfer, the host controller
85 received data from an endpoint faster than it
86 could be written to system memory
88 -ENOSR During an OUT transfer, the host controller
89 could not retrieve data from system memory fast
90 enough to keep up with the USB data rate
92 -EOVERFLOW (*) The amount of data returned by the endpoint was
93 greater than either the max packet size of the
94 endpoint or the remaining buffer size. "Babble".
96 -EREMOTEIO The data read from the endpoint did not fill the
97 specified buffer, and URB_SHORT_NOT_OK was set in
100 -ETIMEDOUT transfer timed out, NAK
102 -ENODEV Device was removed. Often preceded by a burst of
103 other errors, since the hub driver does't detect
104 device removal events immediately.
106 -EXDEV ISO transfer only partially completed
107 look at individual frame status for details
109 -EINVAL ISO madness, if this happens: Log off and go home
111 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb
113 -ESHUTDOWN The host controller has been disabled due to some
114 problem that could not be worked around.
117 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate
118 hardware problems such as bad devices (including firmware) or cables.
122 **************************************************************************
123 * Error codes returned by usbcore-functions *
124 * (expect also other submit and transfer status codes) *
125 **************************************************************************
128 -EINVAL error during registering new driver
130 usb_get_*/usb_set_*():
133 All USB errors (submit/status) can occur