drivers/scsi/lpfc/lpfc_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/scsi/lpfc/lpfc_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/lpfc/lpfc_debugfs.c- Extension
.c- Size
- 188045 bytes
- Lines
- 6480
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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.
- 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/blkdev.hlinux/delay.hlinux/module.hlinux/dma-mapping.hlinux/idr.hlinux/interrupt.hlinux/kthread.hlinux/slab.hlinux/pci.hlinux/spinlock.hlinux/ctype.hlinux/vmalloc.hscsi/scsi.hscsi/scsi_device.hscsi/scsi_host.hscsi/scsi_transport_fc.hscsi/fc/fc_fs.hlpfc_hw4.hlpfc_hw.hlpfc_sli.hlpfc_sli4.hlpfc_nl.hlpfc_disc.hlpfc.hlpfc_scsi.hlpfc_nvme.hlpfc_logmsg.hlpfc_crtn.hlpfc_vport.hlpfc_version.hlpfc_compat.hlpfc_debugfs.h
Detected Declarations
function lpfc_debugfs_disc_trc_datafunction lpfc_debugfs_slow_ring_trc_datafunction lpfc_debugfs_hbqinfo_datafunction list_for_each_entryfunction lpfc_debugfs_commonxripools_datafunction lpfc_debugfs_multixripools_datafunction lpfc_debugfs_lockstat_datafunction lpfc_debugfs_dumpHBASlim_datafunction lpfc_debugfs_dumpHostSlim_datafunction lpfc_debugfs_nodelist_datafunction lpfc_debugfs_nvmestat_datafunction list_for_each_entry_safefunction list_for_each_entry_safefunction lpfc_debugfs_scsistat_datafunction lpfc_io_ktimefunction lpfc_debugfs_ioktime_datafunction lpfc_debugfs_nvmeio_trc_datafunction lpfc_debugfs_hdwqstat_datafunction for_each_present_cpufunction lpfc_debugfs_disc_trcfunction lpfc_debugfs_slow_ring_trcfunction lpfc_debugfs_nvme_trcfunction lpfc_debugfs_disc_trc_openfunction lpfc_debugfs_slow_ring_trc_openfunction lpfc_debugfs_hbqinfo_openfunction lpfc_debugfs_multixripools_openfunction lpfc_debugfs_lockstat_openfunction lpfc_debugfs_lockstat_writefunction lpfc_debugfs_ras_log_datafunction list_for_each_entry_safefunction lpfc_debugfs_ras_log_releasefunction lpfc_debugfs_ras_log_openfunction lpfc_debugfs_dumpHBASlim_openfunction lpfc_debugfs_dumpHostSlim_openfunction lpfc_debugfs_dif_err_readfunction lpfc_debugfs_dif_err_writefunction lpfc_debugfs_dif_err_releasefunction lpfc_debugfs_nodelist_openfunction lpfc_debugfs_lseekfunction readfunction lpfc_debugfs_releasefunction lpfc_debugfs_multixripools_writefunction lpfc_debugfs_nvmestat_openfunction lpfc_debugfs_nvmestat_writefunction lpfc_debugfs_scsistat_openfunction lpfc_debugfs_scsistat_writefunction lpfc_debugfs_ioktime_openfunction lpfc_debugfs_ioktime_write
Annotated Snippet
static const struct file_operations lpfc_debugfs_op_disc_trc = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_disc_trc_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_nodelist
static const struct file_operations lpfc_debugfs_op_nodelist = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_nodelist_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_multixripools
static const struct file_operations lpfc_debugfs_op_multixripools = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_multixripools_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.write = lpfc_debugfs_multixripools_write,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_hbqinfo
static const struct file_operations lpfc_debugfs_op_hbqinfo = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_hbqinfo_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_release,
};
#ifdef LPFC_HDWQ_LOCK_STAT
#undef lpfc_debugfs_op_lockstat
static const struct file_operations lpfc_debugfs_op_lockstat = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_lockstat_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.write = lpfc_debugfs_lockstat_write,
.release = lpfc_debugfs_release,
};
#endif
#undef lpfc_debugfs_ras_log
static const struct file_operations lpfc_debugfs_ras_log = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_ras_log_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_ras_log_release,
};
#undef lpfc_debugfs_op_dumpHBASlim
static const struct file_operations lpfc_debugfs_op_dumpHBASlim = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_dumpHBASlim_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_dumpHostSlim
static const struct file_operations lpfc_debugfs_op_dumpHostSlim = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_dumpHostSlim_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_nvmestat
static const struct file_operations lpfc_debugfs_op_nvmestat = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_nvmestat_open,
.llseek = lpfc_debugfs_lseek,
.read = lpfc_debugfs_read,
.write = lpfc_debugfs_nvmestat_write,
.release = lpfc_debugfs_release,
};
#undef lpfc_debugfs_op_scsistat
static const struct file_operations lpfc_debugfs_op_scsistat = {
.owner = THIS_MODULE,
.open = lpfc_debugfs_scsistat_open,
.llseek = lpfc_debugfs_lseek,
Annotation
- Immediate include surface: `linux/blkdev.h`, `linux/delay.h`, `linux/module.h`, `linux/dma-mapping.h`, `linux/idr.h`, `linux/interrupt.h`, `linux/kthread.h`, `linux/slab.h`.
- Detected declarations: `function lpfc_debugfs_disc_trc_data`, `function lpfc_debugfs_slow_ring_trc_data`, `function lpfc_debugfs_hbqinfo_data`, `function list_for_each_entry`, `function lpfc_debugfs_commonxripools_data`, `function lpfc_debugfs_multixripools_data`, `function lpfc_debugfs_lockstat_data`, `function lpfc_debugfs_dumpHBASlim_data`, `function lpfc_debugfs_dumpHostSlim_data`, `function lpfc_debugfs_nodelist_data`.
- Atlas domain: Driver Families / drivers/scsi.
- 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.
- 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.