drivers/scsi/qedf/qedf_dbg.h
Source file repositories/reference/linux-study-clean/drivers/scsi/qedf/qedf_dbg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/qedf/qedf_dbg.h- Extension
.h- Size
- 4915 bytes
- Lines
- 159
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/kernel.hlinux/compiler.hlinux/string.hlinux/pci.hlinux/delay.hscsi/scsi_transport.hlinux/fs.hlinux/qed/common_hsi.hlinux/qed/qed_if.h
Detected Declarations
struct qedf_dbg_ctxstruct Scsi_Hoststruct sysfs_bin_attrsstruct qedf_debugfs_opsstruct qedf_list_of_funcs
Annotated Snippet
extern const struct file_operations qedf_dbg_fops[];
#ifdef CONFIG_DEBUG_FS
/* DebugFS related code */
struct qedf_list_of_funcs {
char *oper_str;
ssize_t (*oper_func)(struct qedf_dbg_ctx *qedf);
};
#define qedf_dbg_fileops(drv, ops) \
{ \
.owner = THIS_MODULE, \
.open = simple_open, \
.read = drv##_dbg_##ops##_cmd_read, \
.write = drv##_dbg_##ops##_cmd_write \
}
/* Used for debugfs sequential files */
#define qedf_dbg_fileops_seq(drv, ops) \
{ \
.owner = THIS_MODULE, \
.open = drv##_dbg_##ops##_open, \
.read = seq_read, \
.llseek = seq_lseek, \
.release = single_release, \
}
extern void qedf_dbg_host_init(struct qedf_dbg_ctx *qedf,
const struct qedf_debugfs_ops *dops,
const struct file_operations *fops);
extern void qedf_dbg_host_exit(struct qedf_dbg_ctx *qedf);
extern void qedf_dbg_init(char *drv_name);
extern void qedf_dbg_exit(void);
#endif /* CONFIG_DEBUG_FS */
#endif /* _QEDF_DBG_H_ */
Annotation
- Immediate include surface: `linux/types.h`, `linux/kernel.h`, `linux/compiler.h`, `linux/string.h`, `linux/pci.h`, `linux/delay.h`, `scsi/scsi_transport.h`, `linux/fs.h`.
- Detected declarations: `struct qedf_dbg_ctx`, `struct Scsi_Host`, `struct sysfs_bin_attrs`, `struct qedf_debugfs_ops`, `struct qedf_list_of_funcs`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: pattern implementation candidate.
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.