include/uapi/linux/usb/ch9.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/usb/ch9.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/usb/ch9.h- Extension
.h- Size
- 41079 bytes
- Lines
- 1307
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hasm/byteorder.h
Detected Declarations
struct usb_ctrlrequeststruct usb_descriptor_headerstruct usb_device_descriptorstruct usb_config_descriptorstruct usb_string_descriptorstruct usb_interface_descriptorstruct usb_endpoint_descriptorstruct usb_eusb2_isoc_ep_comp_descriptorstruct usb_ssp_isoc_ep_comp_descriptorstruct usb_ss_ep_comp_descriptorstruct usb_qualifier_descriptorstruct usb_otg_descriptorstruct usb_otg20_descriptorstruct usb_debug_descriptorstruct usb_interface_assoc_descriptorstruct usb_security_descriptorstruct usb_key_descriptorstruct usb_encryption_descriptorstruct usb_bos_descriptorstruct usb_dev_cap_headerstruct usb_wireless_cap_descriptorstruct usb_ext_cap_descriptorstruct usb_ss_cap_descriptorstruct usb_ss_container_id_descriptorstruct usb_plat_dev_cap_descriptorstruct usb_ssp_cap_descriptorstruct usb_pd_cap_descriptorstruct usb_pd_cap_battery_info_descriptorstruct usb_pd_cap_consumer_port_descriptorstruct usb_pd_cap_provider_port_descriptorstruct usb_ptm_cap_descriptorstruct usb_authentication_capability_descriptorstruct usb_wireless_ep_comp_descriptorstruct usb_handshakestruct usb_connection_contextstruct usb_set_sel_reqenum usb_device_speedenum usb_device_stateenum usb3_link_statefunction usb_endpoint_numfunction usb_endpoint_typefunction usb_endpoint_dir_infunction usb_endpoint_dir_outfunction usb_endpoint_xfer_bulkfunction usb_endpoint_xfer_controlfunction usb_endpoint_xfer_intfunction usb_endpoint_xfer_isocfunction usb_endpoint_is_bulk_in
Annotated Snippet
struct usb_ctrlrequest {
__u8 bRequestType;
__u8 bRequest;
__le16 wValue;
__le16 wIndex;
__le16 wLength;
} __attribute__ ((packed));
/*-------------------------------------------------------------------------*/
/*
* STANDARD DESCRIPTORS ... as returned by GET_DESCRIPTOR, or
* (rarely) accepted by SET_DESCRIPTOR.
*
* Note that all multi-byte values here are encoded in little endian
* byte order "on the wire". Within the kernel and when exposed
* through the Linux-USB APIs, they are not converted to cpu byte
* order; it is the responsibility of the client code to do this.
* The single exception is when device and configuration descriptors (but
* not other descriptors) are read from character devices
* (i.e. /dev/bus/usb/BBB/DDD);
* in this case the fields are converted to host endianness by the kernel.
*/
/*
* Descriptor types ... USB 2.0 spec table 9.5
*/
#define USB_DT_DEVICE 0x01
#define USB_DT_CONFIG 0x02
#define USB_DT_STRING 0x03
#define USB_DT_INTERFACE 0x04
#define USB_DT_ENDPOINT 0x05
#define USB_DT_DEVICE_QUALIFIER 0x06
#define USB_DT_OTHER_SPEED_CONFIG 0x07
#define USB_DT_INTERFACE_POWER 0x08
/* these are from a minor usb 2.0 revision (ECN) */
#define USB_DT_OTG 0x09
#define USB_DT_DEBUG 0x0a
#define USB_DT_INTERFACE_ASSOCIATION 0x0b
/* these are from the Wireless USB spec */
#define USB_DT_SECURITY 0x0c
#define USB_DT_KEY 0x0d
#define USB_DT_ENCRYPTION_TYPE 0x0e
#define USB_DT_BOS 0x0f
#define USB_DT_DEVICE_CAPABILITY 0x10
#define USB_DT_WIRELESS_ENDPOINT_COMP 0x11
/* From the eUSB2 spec */
#define USB_DT_EUSB2_ISOC_ENDPOINT_COMP 0x12
/* From Wireless USB spec */
#define USB_DT_WIRE_ADAPTER 0x21
/* From USB Device Firmware Upgrade Specification, Revision 1.1 */
#define USB_DT_DFU_FUNCTIONAL 0x21
/* these are from the Wireless USB spec */
#define USB_DT_RPIPE 0x22
#define USB_DT_CS_RADIO_CONTROL 0x23
/* From the T10 UAS specification */
#define USB_DT_PIPE_USAGE 0x24
/* From the USB 3.0 spec */
#define USB_DT_SS_ENDPOINT_COMP 0x30
/* From the USB 3.1 spec */
#define USB_DT_SSP_ISOC_ENDPOINT_COMP 0x31
/* Conventional codes for class-specific descriptors. The convention is
* defined in the USB "Common Class" Spec (3.11). Individual class specs
* are authoritative for their usage, not the "common class" writeup.
*/
#define USB_DT_CS_DEVICE (USB_TYPE_CLASS | USB_DT_DEVICE)
#define USB_DT_CS_CONFIG (USB_TYPE_CLASS | USB_DT_CONFIG)
#define USB_DT_CS_STRING (USB_TYPE_CLASS | USB_DT_STRING)
#define USB_DT_CS_INTERFACE (USB_TYPE_CLASS | USB_DT_INTERFACE)
#define USB_DT_CS_ENDPOINT (USB_TYPE_CLASS | USB_DT_ENDPOINT)
/* All standard descriptors have these 2 fields at the beginning */
struct usb_descriptor_header {
__u8 bLength;
__u8 bDescriptorType;
} __attribute__ ((packed));
/*-------------------------------------------------------------------------*/
/* USB_DT_DEVICE: Device descriptor */
struct usb_device_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__le16 bcdUSB;
__u8 bDeviceClass;
__u8 bDeviceSubClass;
__u8 bDeviceProtocol;
Annotation
- Immediate include surface: `linux/types.h`, `asm/byteorder.h`.
- Detected declarations: `struct usb_ctrlrequest`, `struct usb_descriptor_header`, `struct usb_device_descriptor`, `struct usb_config_descriptor`, `struct usb_string_descriptor`, `struct usb_interface_descriptor`, `struct usb_endpoint_descriptor`, `struct usb_eusb2_isoc_ep_comp_descriptor`, `struct usb_ssp_isoc_ep_comp_descriptor`, `struct usb_ss_ep_comp_descriptor`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.