drivers/usb/host/xen-hcd.c
Source file repositories/reference/linux-study-clean/drivers/usb/host/xen-hcd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/host/xen-hcd.c- Extension
.c- Size
- 38628 bytes
- Lines
- 1612
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/usb.hlinux/list.hlinux/usb/hcd.hlinux/io.hxen/xen.hxen/xenbus.hxen/grant_table.hxen/events.hxen/page.hxen/interface/io/usbif.h
Detected Declarations
struct urb_privstruct rhport_statusstruct vdevice_statusstruct usb_shadowstruct xenhcd_infoenum xenhcd_timer_actionfunction xenhcd_set_errorfunction xenhcd_timer_action_donefunction xenhcd_timer_actionfunction xenhcd_set_connect_statefunction xenhcd_rhport_connectfunction SetPortFeaturefunction ClearPortFeaturefunction SetPortFeaturefunction ClearPortFeaturefunction ClearPortFeaturefunction SetPortFeaturefunction xenhcd_bus_suspendfunction xenhcd_bus_resumefunction xenhcd_hub_descriptorfunction lengthfunction xenhcd_hub_controlfunction xenhcd_free_urb_privfunction xenhcd_get_id_from_freelistfunction xenhcd_add_id_to_freelistfunction xenhcd_count_pagesfunction xenhcd_gnttab_mapfunction xenhcd_pipe_urb_to_xenusbfunction xenhcd_map_urb_for_requestfunction xenhcd_gnttab_donefunction xenhcd_translate_statusfunction xenhcd_giveback_urbfunction xenhcd_do_requestfunction xenhcd_kick_pending_urbsfunction xenhcd_cancel_all_enqueued_urbsfunction list_for_each_entry_safefunction xenhcd_giveback_unlinked_urbsfunction xenhcd_submit_urbfunction xenhcd_unlink_urbfunction xenhcd_res_to_urbfunction xenhcd_urb_request_donefunction xenhcd_conn_notifyfunction xenhcd_intfunction xenhcd_destroy_ringsfunction xenhcd_setup_ringsfunction xenhcd_talk_to_backendfunction xenhcd_connectfunction xenhcd_disconnect
Annotated Snippet
module_init(xenhcd_init);
static void __exit xenhcd_exit(void)
{
kmem_cache_destroy(xenhcd_urbp_cachep);
xenbus_unregister_driver(&xenhcd_driver);
}
module_exit(xenhcd_exit);
MODULE_ALIAS("xen:vusb");
MODULE_AUTHOR("Juergen Gross <jgross@suse.com>");
MODULE_DESCRIPTION("Xen USB Virtual Host Controller driver (xen-hcd)");
MODULE_LICENSE("Dual BSD/GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/usb.h`, `linux/list.h`, `linux/usb/hcd.h`, `linux/io.h`, `xen/xen.h`, `xen/xenbus.h`, `xen/grant_table.h`.
- Detected declarations: `struct urb_priv`, `struct rhport_status`, `struct vdevice_status`, `struct usb_shadow`, `struct xenhcd_info`, `enum xenhcd_timer_action`, `function xenhcd_set_error`, `function xenhcd_timer_action_done`, `function xenhcd_timer_action`, `function xenhcd_set_connect_state`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.