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 (*, **) CRC mismatch
88 -EPIPE (**) Endpoint stalled. For non-control endpoints,
89 reset this status with usb_clear_halt().
91 -ECOMM During an IN transfer, the host controller
92 received data from an endpoint faster than it
93 could be written to system memory
95 -ENOSR During an OUT transfer, the host controller
96 could not retrieve data from system memory fast
97 enough to keep up with the USB data rate
99 -EOVERFLOW (*) The amount of data returned by the endpoint was
100 greater than either the max packet size of the
101 endpoint or the remaining buffer size. "Babble".
103 -EREMOTEIO The data read from the endpoint did not fill the
104 specified buffer, and URB_SHORT_NOT_OK was set in
107 -ETIMEDOUT (**) transfer timed out, NAK
109 -ENODEV Device was removed. Often preceded by a burst of
110 other errors, since the hub driver does't detect
111 device removal events immediately.
113 -EXDEV ISO transfer only partially completed
114 look at individual frame status for details
116 -EINVAL ISO madness, if this happens: Log off and go home
118 -ECONNRESET URB was asynchronously unlinked by usb_unlink_urb
120 -ESHUTDOWN The device or host controller has been disabled due
121 to some problem that could not be worked around,
122 such as a physical disconnect.
125 (*) Error codes like -EPROTO, -EILSEQ and -EOVERFLOW normally indicate
126 hardware problems such as bad devices (including firmware) or cables.
128 (**) This is also one of several codes that different kinds of host
129 controller use to to indicate a transfer has failed because of device
130 disconnect. In the interval before the hub driver starts disconnect
131 processing, devices may receive such fault reports for every request.
135 **************************************************************************
136 * Error codes returned by usbcore-functions *
137 * (expect also other submit and transfer status codes) *
138 **************************************************************************
141 -EINVAL error during registering new driver
143 usb_get_*/usb_set_*():
146 All USB errors (submit/status) can occur