drivers/usb/usbip/vudc.h
Source file repositories/reference/linux-study-clean/drivers/usb/usbip/vudc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/usbip/vudc.h- Extension
.h- Size
- 3651 bytes
- Lines
- 179
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/platform_device.hlinux/usb.hlinux/usb/gadget.hlinux/usb/ch9.hlinux/list.hlinux/timer.hlinux/time.hlinux/sysfs.husbip_common.h
Detected Declarations
struct vepstruct vrequeststruct urbpstruct v_unlinkstruct tx_itemstruct transfer_timerstruct vudcstruct vudc_deviceenum tx_typeenum tr_state
Annotated Snippet
struct vep {
struct usb_ep ep;
unsigned type:2; /* type, as USB_ENDPOINT_XFER_* */
char name[8]; /* space for ep name */
const struct usb_endpoint_descriptor *desc;
struct usb_gadget *gadget;
struct list_head req_queue; /* Request queue */
unsigned halted:1;
unsigned wedged:1;
unsigned already_seen:1;
unsigned setup_stage:1;
};
struct vrequest {
struct usb_request req;
struct vudc *udc;
struct list_head req_entry; /* Request queue */
};
struct urbp {
struct urb *urb;
struct vep *ep;
struct list_head urb_entry; /* urb queue */
unsigned long seqnum;
unsigned type:2; /* for tx, since ep type can change after */
unsigned new:1;
};
struct v_unlink {
unsigned long seqnum;
__u32 status;
};
enum tx_type {
TX_UNLINK,
TX_SUBMIT,
};
struct tx_item {
struct list_head tx_entry;
enum tx_type type;
union {
struct urbp *s;
struct v_unlink *u;
};
};
enum tr_state {
VUDC_TR_RUNNING,
VUDC_TR_IDLE,
VUDC_TR_STOPPED,
};
struct transfer_timer {
struct timer_list timer;
enum tr_state state;
unsigned long frame_start;
int frame_limit;
};
struct vudc {
struct usb_gadget gadget;
struct usb_gadget_driver *driver;
struct platform_device *pdev;
struct usb_device_descriptor dev_desc;
struct usbip_device ud;
struct transfer_timer tr_timer;
struct timespec64 start_time;
struct list_head urb_queue;
spinlock_t lock_tx;
struct list_head tx_queue;
wait_queue_head_t tx_waitq;
spinlock_t lock;
struct vep *ep;
int address;
u16 devstatus;
unsigned pullup:1;
unsigned connected:1;
unsigned desc_cached:1;
};
struct vudc_device {
struct platform_device *pdev;
Annotation
- Immediate include surface: `linux/platform_device.h`, `linux/usb.h`, `linux/usb/gadget.h`, `linux/usb/ch9.h`, `linux/list.h`, `linux/timer.h`, `linux/time.h`, `linux/sysfs.h`.
- Detected declarations: `struct vep`, `struct vrequest`, `struct urbp`, `struct v_unlink`, `struct tx_item`, `struct transfer_timer`, `struct vudc`, `struct vudc_device`, `enum tx_type`, `enum tr_state`.
- Atlas domain: Driver Families / drivers/usb.
- 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.