drivers/scsi/bfa/bfad_drv.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfad_drv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bfa/bfad_drv.h- Extension
.h- Size
- 9086 bytes
- Lines
- 355
- Domain
- Driver Families
- Bucket
- drivers/scsi
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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/types.hlinux/pci.hlinux/dma-mapping.hlinux/idr.hlinux/interrupt.hlinux/cdev.hlinux/fs.hlinux/delay.hlinux/vmalloc.hlinux/workqueue.hlinux/bitops.hscsi/scsi.hscsi/scsi_host.hscsi/scsi_tcq.hscsi/scsi_transport_fc.hscsi/scsi_transport.hscsi/scsi_bsg_fc.hscsi/scsi_devinfo.hbfa_modules.hbfa_fcs.hbfa_defs_fcs.hbfa_plog.hbfa_cs.h
Detected Declarations
struct bfad_msix_sstruct bfad_port_sstruct bfad_vport_sstruct bfad_vf_sstruct bfad_cfg_param_sstruct bfad_sstruct bfad_sstruct bfad_rport_sstruct bfad_buf_infostruct bfad_fcxpstruct bfad_hal_compenum bfad_port_pvb_typeenum bfad_sm_event
Annotated Snippet
struct bfad_msix_s {
struct bfad_s *bfad;
struct msix_entry msix;
char name[32];
};
/*
* Only append to the enums defined here to avoid any versioning
* needed between trace utility and driver version
*/
enum {
BFA_TRC_LDRV_BFAD = 1,
BFA_TRC_LDRV_IM = 2,
BFA_TRC_LDRV_BSG = 3,
};
enum bfad_port_pvb_type {
BFAD_PORT_PHYS_BASE = 0,
BFAD_PORT_PHYS_VPORT = 1,
BFAD_PORT_VF_BASE = 2,
BFAD_PORT_VF_VPORT = 3,
};
/*
* PORT data structure
*/
struct bfad_port_s {
struct list_head list_entry;
struct bfad_s *bfad;
struct bfa_fcs_lport_s *fcs_port;
u32 roles;
s32 flags;
u32 supported_fc4s;
enum bfad_port_pvb_type pvb_type;
struct bfad_im_port_s *im_port; /* IM specific data */
/* port debugfs specific data */
struct dentry *port_debugfs_root;
};
/*
* VPORT data structure
*/
struct bfad_vport_s {
struct bfad_port_s drv_port;
struct bfa_fcs_vport_s fcs_vport;
struct completion *comp_del;
struct list_head list_entry;
};
/*
* VF data structure
*/
struct bfad_vf_s {
bfa_fcs_vf_t fcs_vf;
struct bfad_port_s base_port; /* base port for vf */
struct bfad_s *bfad;
};
struct bfad_cfg_param_s {
u32 rport_del_timeout;
u32 ioc_queue_depth;
u32 lun_queue_depth;
u32 io_max_sge;
u32 binding_method;
};
union bfad_tmp_buf {
/* From struct bfa_adapter_attr_s */
char manufacturer[BFA_ADAPTER_MFG_NAME_LEN];
char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN];
char model[BFA_ADAPTER_MODEL_NAME_LEN];
char fw_ver[BFA_VERSION_LEN];
char optrom_ver[BFA_VERSION_LEN];
/* From struct bfa_ioc_pci_attr_s */
u8 chip_rev[BFA_IOC_CHIP_REV_LEN]; /* chip revision */
wwn_t wwn[BFA_FCS_MAX_LPORTS];
};
/* BFAD state machine events */
enum bfad_sm_event {
BFAD_E_CREATE = 1,
BFAD_E_KTHREAD_CREATE_FAILED = 2,
BFAD_E_INIT = 3,
BFAD_E_INIT_SUCCESS = 4,
BFAD_E_HAL_INIT_FAILED = 5,
BFAD_E_INIT_FAILED = 6,
BFAD_E_FCS_EXIT_COMP = 7,
BFAD_E_EXIT_COMP = 8,
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/dma-mapping.h`, `linux/idr.h`, `linux/interrupt.h`, `linux/cdev.h`, `linux/fs.h`, `linux/delay.h`.
- Detected declarations: `struct bfad_msix_s`, `struct bfad_port_s`, `struct bfad_vport_s`, `struct bfad_vf_s`, `struct bfad_cfg_param_s`, `struct bfad_s`, `struct bfad_s`, `struct bfad_rport_s`, `struct bfad_buf_info`, `struct bfad_fcxp`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- 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.