drivers/memstick/host/r592.c
Source file repositories/reference/linux-study-clean/drivers/memstick/host/r592.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/memstick/host/r592.c- Extension
.c- Size
- 21802 bytes
- Lines
- 895
- Domain
- Driver Families
- Bucket
- drivers/memstick
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/freezer.hlinux/jiffies.hlinux/interrupt.hlinux/pci.hlinux/pci_ids.hlinux/delay.hlinux/slab.hlinux/kthread.hlinux/sched.hlinux/highmem.hasm/byteorder.hlinux/swab.hr592.h
Detected Declarations
function r592_read_regfunction r592_write_regfunction r592_read_reg_raw_befunction r592_write_reg_raw_befunction r592_set_reg_maskfunction r592_clear_reg_maskfunction r592_wait_statusfunction r592_enable_devicefunction r592_set_modefunction r592_host_resetfunction r592_clear_interruptsfunction r592_test_io_errorfunction r592_test_fifo_emptyfunction r592_start_dmafunction r592_stop_dmafunction r592_check_dmafunction r592_transfer_fifo_dmafunction r592_write_fifo_piofunction r592_flush_fifo_writefunction r592_read_fifo_piofunction r592_transfer_fifo_piofunction r592_execute_tpcfunction r592_process_threadfunction r592_update_card_detectfunction r592_detect_timerfunction r592_irqfunction r592_set_paramfunction r592_submit_reqfunction r592_probefunction r592_removefunction r592_suspendfunction r592_resume
Annotated Snippet
static struct pci_driver r592_pci_driver = {
.name = DRV_NAME,
.id_table = r592_pci_id_tbl,
.probe = r592_probe,
.remove = r592_remove,
.driver.pm = &r592_pm_ops,
};
module_pci_driver(r592_pci_driver);
module_param_named(enable_dma, r592_enable_dma, bool, S_IRUGO);
MODULE_PARM_DESC(enable_dma, "Enable usage of the DMA (default)");
module_param(debug, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(debug, "Debug level (0-3)");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Maxim Levitsky <maximlevitsky@gmail.com>");
MODULE_DESCRIPTION("Ricoh R5C592 Memstick/Memstick PRO card reader driver");
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/freezer.h`, `linux/jiffies.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/pci_ids.h`, `linux/delay.h`.
- Detected declarations: `function r592_read_reg`, `function r592_write_reg`, `function r592_read_reg_raw_be`, `function r592_write_reg_raw_be`, `function r592_set_reg_mask`, `function r592_clear_reg_mask`, `function r592_wait_status`, `function r592_enable_device`, `function r592_set_mode`, `function r592_host_reset`.
- Atlas domain: Driver Families / drivers/memstick.
- 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.