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.

Dependency Surface

Detected Declarations

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

Implementation Notes