drivers/scsi/bfa/bfa.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfa.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bfa/bfa.h- Extension
.h- Size
- 15709 bytes
- Lines
- 457
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
bfad_drv.hbfa_cs.hbfa_plog.hbfa_defs_svc.hbfi.hbfa_ioc.h
Detected Declarations
struct bfa_sstruct bfa_iocfc_regs_sstruct bfa_msix_sstruct bfa_hwif_sstruct bfa_faa_cbfn_sstruct bfa_faa_attr_sstruct bfa_faa_args_sstruct bfa_iocfc_sstruct bfa_iocfc_sstruct bfa_cb_pending_q_senum iocfc_eventfunction bfa_reqq_winit
Annotated Snippet
struct bfa_iocfc_regs_s {
void __iomem *intr_status;
void __iomem *intr_mask;
void __iomem *cpe_q_pi[BFI_IOC_MAX_CQS];
void __iomem *cpe_q_ci[BFI_IOC_MAX_CQS];
void __iomem *cpe_q_ctrl[BFI_IOC_MAX_CQS];
void __iomem *rme_q_ci[BFI_IOC_MAX_CQS];
void __iomem *rme_q_pi[BFI_IOC_MAX_CQS];
void __iomem *rme_q_ctrl[BFI_IOC_MAX_CQS];
};
/*
* MSIX vector handlers
*/
#define BFA_MSIX_MAX_VECTORS 22
typedef void (*bfa_msix_handler_t)(struct bfa_s *bfa, int vec);
struct bfa_msix_s {
int nvecs;
bfa_msix_handler_t handler[BFA_MSIX_MAX_VECTORS];
};
/*
* Chip specific interfaces
*/
struct bfa_hwif_s {
void (*hw_reginit)(struct bfa_s *bfa);
void (*hw_reqq_ack)(struct bfa_s *bfa, int reqq);
void (*hw_rspq_ack)(struct bfa_s *bfa, int rspq, u32 ci);
void (*hw_msix_init)(struct bfa_s *bfa, int nvecs);
void (*hw_msix_ctrl_install)(struct bfa_s *bfa);
void (*hw_msix_queue_install)(struct bfa_s *bfa);
void (*hw_msix_uninstall)(struct bfa_s *bfa);
void (*hw_isr_mode_set)(struct bfa_s *bfa, bfa_boolean_t msix);
void (*hw_msix_getvecs)(struct bfa_s *bfa, u32 *vecmap,
u32 *nvecs, u32 *maxvec);
void (*hw_msix_get_rme_range) (struct bfa_s *bfa, u32 *start,
u32 *end);
int cpe_vec_q0;
int rme_vec_q0;
};
typedef void (*bfa_cb_iocfc_t) (void *cbarg, enum bfa_status status);
struct bfa_faa_cbfn_s {
bfa_cb_iocfc_t faa_cbfn;
void *faa_cbarg;
};
#define BFA_FAA_ENABLED 1
#define BFA_FAA_DISABLED 2
/*
* FAA attributes
*/
struct bfa_faa_attr_s {
wwn_t faa;
u8 faa_state;
u8 pwwn_source;
u8 rsvd[6];
};
struct bfa_faa_args_s {
struct bfa_faa_attr_s *faa_attr;
struct bfa_faa_cbfn_s faa_cb;
u8 faa_state;
bfa_boolean_t busy;
};
/*
* IOCFC state machine definitions/declarations
*/
enum iocfc_event {
IOCFC_E_INIT = 1, /* IOCFC init request */
IOCFC_E_START = 2, /* IOCFC mod start request */
IOCFC_E_STOP = 3, /* IOCFC stop request */
IOCFC_E_ENABLE = 4, /* IOCFC enable request */
IOCFC_E_DISABLE = 5, /* IOCFC disable request */
IOCFC_E_IOC_ENABLED = 6, /* IOC enabled message */
IOCFC_E_IOC_DISABLED = 7, /* IOC disabled message */
IOCFC_E_IOC_FAILED = 8, /* failure notice by IOC sm */
IOCFC_E_DCONF_DONE = 9, /* dconf read/write done */
IOCFC_E_CFG_DONE = 10, /* IOCFC config complete */
};
struct bfa_iocfc_s;
typedef void (*bfa_iocfs_fsm_t)(struct bfa_iocfc_s *, enum iocfc_event);
struct bfa_iocfc_s {
bfa_iocfs_fsm_t fsm;
struct bfa_s *bfa;
struct bfa_iocfc_cfg_s cfg;
Annotation
- Immediate include surface: `bfad_drv.h`, `bfa_cs.h`, `bfa_plog.h`, `bfa_defs_svc.h`, `bfi.h`, `bfa_ioc.h`.
- Detected declarations: `struct bfa_s`, `struct bfa_iocfc_regs_s`, `struct bfa_msix_s`, `struct bfa_hwif_s`, `struct bfa_faa_cbfn_s`, `struct bfa_faa_attr_s`, `struct bfa_faa_args_s`, `struct bfa_iocfc_s`, `struct bfa_iocfc_s`, `struct bfa_cb_pending_q_s`.
- 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.