drivers/ata/sata_svw.c
Source file repositories/reference/linux-study-clean/drivers/ata/sata_svw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ata/sata_svw.c- Extension
.c- Size
- 14509 bytes
- Lines
- 527
- Domain
- Driver Families
- Bucket
- drivers/ata
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/module.hlinux/pci.hlinux/blkdev.hlinux/delay.hlinux/interrupt.hlinux/device.hscsi/scsi_host.hscsi/scsi_cmnd.hscsi/scsi.hlinux/libata.hlinux/of.hlinux/of_address.h
Detected Declarations
function k2_sata_check_atapi_dmafunction k2_sata_scr_readfunction k2_sata_scr_writefunction k2_sata_softresetfunction k2_sata_hardresetfunction k2_sata_tf_loadfunction k2_sata_tf_readfunction spin_lock_irqsavefunction spin_lock_irqsavefunction k2_stat_check_statusfunction k2_sata_show_infofunction k2_sata_setup_portfunction k2_sata_init_onefunction all
Annotated Snippet
static struct pci_driver k2_sata_pci_driver = {
.name = DRV_NAME,
.id_table = k2_sata_pci_tbl,
.probe = k2_sata_init_one,
.remove = ata_pci_remove_one,
};
module_pci_driver(k2_sata_pci_driver);
MODULE_AUTHOR("Benjamin Herrenschmidt");
MODULE_DESCRIPTION("low-level driver for K2 SATA controller");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, k2_sata_pci_tbl);
MODULE_VERSION(DRV_VERSION);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/module.h`, `linux/pci.h`, `linux/blkdev.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/device.h`, `scsi/scsi_host.h`.
- Detected declarations: `function k2_sata_check_atapi_dma`, `function k2_sata_scr_read`, `function k2_sata_scr_write`, `function k2_sata_softreset`, `function k2_sata_hardreset`, `function k2_sata_tf_load`, `function k2_sata_tf_read`, `function spin_lock_irqsave`, `function spin_lock_irqsave`, `function k2_stat_check_status`.
- Atlas domain: Driver Families / drivers/ata.
- Implementation status: pattern implementation candidate.
- 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.