drivers/firewire/ohci.c
Source file repositories/reference/linux-study-clean/drivers/firewire/ohci.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firewire/ohci.c- Extension
.c- Size
- 108531 bytes
- Lines
- 3834
- Domain
- Driver Families
- Bucket
- drivers/firewire
- 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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/bug.hlinux/compiler.hlinux/delay.hlinux/device.hlinux/dma-mapping.hlinux/firewire.hlinux/firewire-constants.hlinux/init.hlinux/interrupt.hlinux/io.hlinux/kernel.hlinux/list.hlinux/mm.hlinux/module.hlinux/moduleparam.hlinux/mutex.hlinux/pci.hlinux/pci_ids.hlinux/slab.hlinux/spinlock.hlinux/string.hlinux/time.hlinux/vmalloc.hlinux/workqueue.hasm/byteorder.hasm/page.hasm/pmac_feature.hcore.hohci.hpacket-header-definitions.hphy-packet-definitions.h
Detected Declarations
struct descriptorstruct ar_contextstruct contextstruct descriptor_bufferstruct contextstruct at_contextstruct iso_contextstruct fw_ohcistruct driver_datafunction has_reboot_by_cycle_timer_read_quirkfunction detect_vt630x_with_asm1083_on_amd_ryzen_machinefunction reg_writefunction reg_readfunction flush_writesfunction read_paged_phy_regfunction write_phy_regfunction update_phy_regfunction read_paged_phy_regfunction ohci_read_phy_regfunction ohci_update_phy_regfunction ar_context_link_pagefunction ar_context_releasefunction ar_context_abortfunction ar_next_buffer_indexfunction ar_first_buffer_indexfunction ar_search_last_active_bufferfunction ar_sync_buffers_for_cpufunction cond_le32_to_cpufunction has_be_header_quirkfunction cond_le32_to_cpufunction has_be_header_quirkfunction timefunction ar_recycle_buffersfunction ohci_ar_context_workfunction ar_context_initfunction ar_context_runfunction context_retire_descriptorsfunction ohci_at_context_workfunction ohci_isoc_context_workfunction context_add_bufferfunction context_initfunction context_releasefunction list_for_each_entry_safefunction context_runfunction context_appendfunction cpu_to_le16function context_stopfunction at_context_queue_packet
Annotated Snippet
static struct pci_driver fw_ohci_pci_driver = {
.name = ohci_driver_name,
.id_table = pci_table,
.probe = pci_probe,
.remove = pci_remove,
.driver.pm = &pci_pm_ops,
};
static int __init fw_ohci_init(void)
{
return pci_register_driver(&fw_ohci_pci_driver);
}
static void __exit fw_ohci_cleanup(void)
{
pci_unregister_driver(&fw_ohci_pci_driver);
}
module_init(fw_ohci_init);
module_exit(fw_ohci_cleanup);
MODULE_AUTHOR("Kristian Hoegsberg <krh@bitplanet.net>");
MODULE_DESCRIPTION("Driver for PCI OHCI IEEE1394 controllers");
MODULE_LICENSE("GPL");
/* Provide a module alias so root-on-sbp2 initrds don't break. */
MODULE_ALIAS("ohci1394");
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/bug.h`, `linux/compiler.h`, `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/firewire.h`, `linux/firewire-constants.h`.
- Detected declarations: `struct descriptor`, `struct ar_context`, `struct context`, `struct descriptor_buffer`, `struct context`, `struct at_context`, `struct iso_context`, `struct fw_ohci`, `struct driver_data`, `function has_reboot_by_cycle_timer_read_quirk`.
- Atlas domain: Driver Families / drivers/firewire.
- Implementation status: pattern 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.