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.

Dependency Surface

Detected Declarations

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

Implementation Notes