Documentation/driver-api/usb/error-codes.rst
Source file repositories/reference/linux-study-clean/Documentation/driver-api/usb/error-codes.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/driver-api/usb/error-codes.rst- Extension
.rst- Size
- 7456 bytes
- Lines
- 211
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. _usb-error-codes:
USB Error codes
~~~~~~~~~~~~~~~
:Revised: 2004-Oct-21
This is the documentation of (hopefully) all possible error codes (and
their interpretation) that can be returned from usbcore.
Some of them are returned by the Host Controller Drivers (HCDs), which
device drivers only see through usbcore. As a rule, all the HCDs should
behave the same except for transfer speed dependent behaviors and the
way certain faults are reported.
Error codes returned by :c:func:`usb_submit_urb`
================================================
Non-USB-specific:
=============== ===============================================
0 URB submission went fine
``-ENOMEM`` no memory for allocation of internal structures
=============== ===============================================
USB-specific:
======================= =======================================================
``-EBUSY`` The URB is already active.
``-ENODEV`` specified USB-device or bus doesn't exist
``-ENOENT`` specified interface or endpoint does not exist or
is not enabled
``-ENXIO`` host controller driver does not support queuing of
this type of urb. (treat as a host controller bug.)
``-EINVAL`` a) Invalid transfer type specified (or not supported)
b) Invalid or unsupported periodic transfer interval
c) ISO: attempted to change transfer interval
d) ISO: ``number_of_packets`` is < 0
e) various other cases
``-EXDEV`` ISO: ``URB_ISO_ASAP`` wasn't specified and all the
frames the URB would be scheduled in have already
expired.
``-EFBIG`` Host controller driver can't schedule that many ISO
frames.
``-EPIPE`` The pipe type specified in the URB doesn't match the
endpoint's actual type.
``-EMSGSIZE`` (a) endpoint maxpacket size is zero; it is not usable
in the current interface altsetting.
(b) ISO packet is larger than the endpoint maxpacket.
(c) requested data transfer length is invalid: negative
or too large for the host controller.
``-EBADR`` The wLength value in a control URB's setup packet does
not match the URB's transfer_buffer_length.
``-ENOSPC`` This request would overcommit the usb bandwidth reserved
for periodic transfers (interrupt, isochronous).
``-ESHUTDOWN`` The device or host controller has been disabled due to
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.