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 and the
9 way certain faults are reported.
12 **************************************************************************
13 * Error codes returned by usb_submit_urb *
14 **************************************************************************
18 0 URB submission went fine
20 -ENOMEM no memory for allocation of internal structures
24 -ENODEV specified USB-device or bus doesn't exist
26 -ENXIO host controller driver does not support queuing of this type
27 of urb. (treat as a host controller bug.)
29 -EINVAL a) Invalid transfer type specified (or not supported)
30 b) Invalid or unsupported periodic transfer interval
31 c) ISO: attempted to change transfer interval
32 d) ISO: number_of_packets is < 0
33 e) various other cases
35 -EAGAIN a) specified ISO start frame too early
36 b) (using ISO-ASAP) too much scheduled for the future
37 wait some time and try again.
39 -EFBIG Host controller driver can't schedule that many ISO frames.
41 -EPIPE Specified endpoint is stalled. For non-control endpoints,
42 reset this status with usb_clear_halt().
44 -EMSGSIZE (a) endpoint maxpacket size is zero; it is not usable
45 in the current interface altsetting.
46 (b) ISO packet is biger than endpoint maxpacket
47 (c) requested data transfer size is invalid (negative)
49 -ENOSPC This request would overcommit the usb bandwidth reserved
50 for periodic transfers (interrupt, isochronous).
52 -ESHUTDOWN The device or host controller has been disabled due to some
53 problem that could not be worked around.
55 -EPERM Submission failed because urb->reject was set.
57 -EHOSTUNREACH URB was rejected because the device is suspended.
60 **************************************************************************
61 * Error codes returned by in urb->status *
62 * or in iso_frame_desc[n].status (for ISO) *
63 **************************************************************************
65 USB device drivers may only test urb status values in completion handlers.
66 This is because otherwise there would be a race between HCDs updating
67 these values on one CPU, and device drivers testing them on another CPU.
69 A transfer's actual_length may be positive even when an error has been
70 reported. That's because transfers often involve several packets, so that
71 one or more packets could finish before an error stops further endpoint I/O.
74 0 Transfer completed successfully
76 -ENOENT URB was synchronously unlinked by usb_unlink_urb
78 -EINPROGRESS URB still pending, no results yet
79 (That is, if drivers see this it's a bug.)
81 -EPROTO (*, **) a) bitstuff error
82 b) no response packet received within the
83 prescribed bus turn-around time
86 -EILSEQ (*, **) a) CRC mismatch
87 b) no response packet received within the
88 prescribed bus turn-around time
91 In cases b) and c) either -EPROTO or -EILSEQ
92 may be returned. Note that often the controller
93 hardware does not distinguish among cases a),
94 b), and c), so a driver cannot tell whether
95 there was a protocol error, a failure to respond
96 (often caused by device disconnect), or some
99 -EPIPE (**) Endpoint stalled. For non-control endpoints,
100 reset this status with usb_clear_halt().
102 -ECOMM During an IN transfer, the host controller
103 received data from an endpoint faster than it
104 could be written to system memory
106 -ENOSR During an OUT transfer, the host controller
107 could not retrieve data from system memory fast
108 enough to keep up with the USB data rate
110 -EOVERFLOW (*) The amount of data returned by the endpoint was
111 greater than either the max packet size of the
112 endpoint or the remaining buffer size. "Babble".
114 -EREMOTEIO The data read from the endpoint did not fill the
115 specified buffer, and URB_SHORT_NOT_OK was set in
118 -ENODEV Device was removed. Often preceded by a burst of
119 other errors, since the hub driver does't detect
120 device removal events immediately.
122 -EXDEV ISO transfer only partially completed
123 look at individual frame status for details
125 -EINVAL ISO madness, if this happens: Log off and go home
127 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb
129 -ESHUTDOWN The device or host controller has been disabled due
130 to some problem that could not be worked around,
131 such as a physical disconnect.
134 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate
135 hardware problems such as bad devices (including firmware) or cables.
137 (**) This is also one of several codes that different kinds of host
138 controller use to to indicate a transfer has failed because of device
139 disconnect. In the interval before the hub driver starts disconnect
140 processing, devices may receive such fault reports for every request.
144 **************************************************************************
145 * Error codes returned by usbcore-functions *
146 * (expect also other submit and transfer status codes) *
147 **************************************************************************
150 -EINVAL error during registering new driver
152 usb_get_*/usb_set_*():
155 -ETIMEDOUT timeout expired before the transfer completed