A Tour of USB Device Controller (UDC) in Linux
summary
Covers the Linux UDC implementation for USB 2.0 EP0 control handling, explains how gadget core, UDC driver and endpoints interact, and shows queuing/completion of transfer requests and reset/address/configure sequences. Demonstrates testing with usbtest and gadget0 plus prebuilt gadgets (mass storage, Ethernet, serial) and reports practical behaviors: per-device 16 in + 16 out endpoint limit, CDC ACM uses three endpoints, functionfs vs raw gadget tradeoffs, and common failure modes that can hang the host requiring reboots.
AI-written summary · about
chapters (16)
- 0:00USB Device Controller intro
- 12:48USB Gadget architecture
- 13:53UDC driver core
- 15:00UDC start/stop & pull-up
- 16:25Endpoint management
- 17:29Endpoint control
- 18:37Request handling
- 22:35UDC data structures
- 23:38Driver initialization
- 24:20USB bus events
- 25:26USB enumeration
- 26:31Endpoint zero transfers
- 28:43Data transfers on endpoints
- 29:06Testing UDC tools
- 31:57Practical gadget examples
- 34:07Q&A
related talks
52mDebugging Usually Slightly Broken (USB) Devices and Drivers
43mUCSI, TCPM, PD, AltModes: Demystifying USB-C and Its Support in Linux
43mUCSI, TCPM, PD, AltModes: Demystifying USB-C and Its Support in Linux
42mOverview of Universal Flash Storage Subsystem
38mWriting Your Own Gadget with Zephyr OS
35mIntroducing UACCE Bus of DPDK
20mWhat's new in USBGuard 1.0?
19mPower Sequencing for Enumerable Busses - What's Still Missing From the Device Tree...
