drivers/usb/host/ohci-pci.c
Source file repositories/reference/linux-study-clean/drivers/usb/host/ohci-pci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/usb/host/ohci-pci.c- Extension
.c- Size
- 9061 bytes
- Lines
- 359
- Domain
- Driver Families
- Bucket
- drivers/usb
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/io.hlinux/kernel.hlinux/module.hlinux/pci.hlinux/usb.hlinux/usb/hcd.hohci.hpci-quirks.h
Detected Declarations
function broken_suspendfunction ohci_quirk_amd756function ohci_quirk_optifunction USBfunction finish_unlinksfunction ohci_quirk_toshiba_sccfunction ohci_quirk_nec_workerfunction ohci_quirk_necfunction ohci_quirk_amd700function ohci_quirk_loongsonfunction ohci_quirk_qemufunction ohci_pci_resetfunction ohci_pci_probefunction ohci_pci_resumefunction ohci_pci_initfunction ohci_pci_cleanupmodule init ohci_pci_init
Annotated Snippet
static struct pci_driver ohci_pci_driver = {
.name = hcd_name,
.id_table = pci_ids,
.probe = ohci_pci_probe,
.remove = usb_hcd_pci_remove,
.shutdown = usb_hcd_pci_shutdown,
#ifdef CONFIG_PM
.driver = {
.pm = &usb_hcd_pci_pm_ops
},
#endif
};
#ifdef CONFIG_PM
static int ohci_pci_resume(struct usb_hcd *hcd, pm_message_t msg)
{
return ohci_resume(hcd, msg.event == PM_EVENT_RESTORE);
}
#endif
static int __init ohci_pci_init(void)
{
if (usb_disabled())
return -ENODEV;
ohci_init_driver(&ohci_pci_hc_driver, &pci_overrides);
#ifdef CONFIG_PM
/* Entries for the PCI suspend/resume callbacks are special */
ohci_pci_hc_driver.pci_suspend = ohci_suspend;
ohci_pci_hc_driver.pci_resume = ohci_pci_resume;
#endif
return pci_register_driver(&ohci_pci_driver);
}
module_init(ohci_pci_init);
static void __exit ohci_pci_cleanup(void)
{
pci_unregister_driver(&ohci_pci_driver);
}
module_exit(ohci_pci_cleanup);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
MODULE_SOFTDEP("pre: ehci_pci");
Annotation
- Immediate include surface: `linux/io.h`, `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/usb.h`, `linux/usb/hcd.h`, `ohci.h`, `pci-quirks.h`.
- Detected declarations: `function broken_suspend`, `function ohci_quirk_amd756`, `function ohci_quirk_opti`, `function USB`, `function finish_unlinks`, `function ohci_quirk_toshiba_scc`, `function ohci_quirk_nec_worker`, `function ohci_quirk_nec`, `function ohci_quirk_amd700`, `function ohci_quirk_loongson`.
- Atlas domain: Driver Families / drivers/usb.
- Implementation status: pattern 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.