drivers/firewire/core-cdev.c
Source file repositories/reference/linux-study-clean/drivers/firewire/core-cdev.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/firewire/core-cdev.c- Extension
.c- Size
- 52613 bytes
- Lines
- 1989
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/bug.hlinux/compat.hlinux/delay.hlinux/device.hlinux/dma-mapping.hlinux/err.hlinux/errno.hlinux/firewire.hlinux/firewire-cdev.hlinux/irqflags.hlinux/jiffies.hlinux/kernel.hlinux/kref.hlinux/mm.hlinux/module.hlinux/mutex.hlinux/poll.hlinux/sched.hlinux/slab.hlinux/spinlock.hlinux/string.hlinux/time.hlinux/uaccess.hlinux/vmalloc.hlinux/wait.hlinux/workqueue.hcore.htrace/events/firewire.hpacket-header-definitions.h
Detected Declarations
struct clientstruct client_resourcestruct client_resourcestruct address_handler_resourcestruct outbound_transaction_resourcestruct inbound_transaction_resourcestruct descriptor_resourcestruct iso_resource_paramsstruct iso_resource_autostruct iso_resource_oncestruct eventstruct bus_reset_eventstruct outbound_transaction_eventstruct inbound_transaction_eventstruct iso_interrupt_eventstruct iso_interrupt_mc_eventstruct iso_resource_eventstruct outbound_phy_packet_eventstruct inbound_phy_packet_eventfunction client_getfunction client_releasefunction client_putfunction is_iso_resource_autofunction is_outbound_transaction_resourcefunction schedule_iso_resource_autofunction uptr_to_u64function uptr_to_u64function fw_device_op_openfunction queue_eventfunction scoped_guardfunction dequeue_eventfunction scoped_guardfunction fw_device_op_readfunction fill_bus_reset_eventfunction for_each_clientfunction queue_bus_reset_eventfunction xa_for_eachfunction fw_device_cdev_updatefunction wake_up_clientfunction fw_device_cdev_removefunction ioctl_get_infofunction scoped_guardfunction add_client_resourcefunction release_client_resourcefunction scoped_guardfunction release_transactionfunction scoped_guardfunction init_request
Annotated Snippet
const struct file_operations fw_device_ops = {
.owner = THIS_MODULE,
.open = fw_device_op_open,
.read = fw_device_op_read,
.unlocked_ioctl = fw_device_op_ioctl,
.mmap = fw_device_op_mmap,
.release = fw_device_op_release,
.poll = fw_device_op_poll,
.compat_ioctl = compat_ptr_ioctl,
};
Annotation
- Immediate include surface: `linux/bug.h`, `linux/compat.h`, `linux/delay.h`, `linux/device.h`, `linux/dma-mapping.h`, `linux/err.h`, `linux/errno.h`, `linux/firewire.h`.
- Detected declarations: `struct client`, `struct client_resource`, `struct client_resource`, `struct address_handler_resource`, `struct outbound_transaction_resource`, `struct inbound_transaction_resource`, `struct descriptor_resource`, `struct iso_resource_params`, `struct iso_resource_auto`, `struct iso_resource_once`.
- Atlas domain: Driver Families / drivers/firewire.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.