drivers/scsi/bfa/bfa_ioc.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bfa/bfa_ioc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bfa/bfa_ioc.h- Extension
.h- Size
- 34534 bytes
- Lines
- 1086
- 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.hbfi.h
Detected Declarations
struct bfa_timer_sstruct bfa_timer_mod_sstruct bfa_sge_sstruct bfa_mem_dma_sstruct bfa_mem_kva_sstruct bfa_meminfo_sstruct bfa_pcidev_sstruct bfa_dma_sstruct bfa_ioc_regs_sstruct bfa_mbox_cmd_sstruct bfa_ioc_mbox_mod_sstruct bfa_ioc_cbfn_sstruct bfa_ioc_sstruct bfa_ioc_notify_sstruct bfa_iocpf_sstruct bfa_iocpf_sstruct bfa_ioc_sstruct bfa_ioc_hwif_sstruct bfa_reqq_wait_sstruct bfa_cb_qe_sstruct bfa_ablk_sstruct bfa_sfp_sstruct bfa_flash_sstruct bfa_diag_results_fwpingstruct bfa_diag_qtest_result_sstruct bfa_diag_fwping_sstruct bfa_diag_results_tempsensor_sstruct bfa_diag_tsensor_sstruct bfa_diag_sfpshow_sstruct bfa_diag_led_sstruct bfa_diag_beacon_sstruct bfa_diag_sstruct bfa_phy_sstruct bfa_fru_sstruct bfa_dconf_hdr_sstruct bfa_dconf_sstruct bfa_dconf_mod_sstruct bfa_dconf_mod_senum ioc_eventenum bfa_ioc_event_eenum iocpf_eventenum bfa_dconf_eventfunction bfa_mem_dma_setupfunction bfa_mem_kva_setupfunction __bfa_dma_be_addr_setfunction __bfa_alen_setfunction bfi_image_cb_get_chunkfunction bfi_image_ct_get_chunk
Annotated Snippet
struct bfa_timer_s {
struct list_head qe;
bfa_timer_cbfn_t timercb;
void *arg;
int timeout; /* in millisecs */
};
/*
* Timer module structure
*/
struct bfa_timer_mod_s {
struct list_head timer_q;
};
#define BFA_TIMER_FREQ 200 /* specified in millisecs */
void bfa_timer_beat(struct bfa_timer_mod_s *mod);
void bfa_timer_begin(struct bfa_timer_mod_s *mod, struct bfa_timer_s *timer,
bfa_timer_cbfn_t timercb, void *arg,
unsigned int timeout);
void bfa_timer_stop(struct bfa_timer_s *timer);
/*
* Generic Scatter Gather Element used by driver
*/
struct bfa_sge_s {
u32 sg_len;
void *sg_addr;
};
#define bfa_sge_word_swap(__sge) do { \
((u32 *)(__sge))[0] = swab32(((u32 *)(__sge))[0]); \
((u32 *)(__sge))[1] = swab32(((u32 *)(__sge))[1]); \
((u32 *)(__sge))[2] = swab32(((u32 *)(__sge))[2]); \
} while (0)
#define bfa_swap_words(_x) ( \
((u64)(_x) << 32) | ((u64)(_x) >> 32))
#ifdef __BIG_ENDIAN
#define bfa_sge_to_be(_x)
#define bfa_sge_to_le(_x) bfa_sge_word_swap(_x)
#define bfa_sgaddr_le(_x) bfa_swap_words(_x)
#else
#define bfa_sge_to_be(_x) bfa_sge_word_swap(_x)
#define bfa_sge_to_le(_x)
#define bfa_sgaddr_le(_x) (_x)
#endif
/*
* BFA memory resources
*/
struct bfa_mem_dma_s {
struct list_head qe; /* Queue of DMA elements */
u32 mem_len; /* Total Length in Bytes */
u8 *kva; /* kernel virtual address */
u64 dma; /* dma address if DMA memory */
u8 *kva_curp; /* kva allocation cursor */
u64 dma_curp; /* dma allocation cursor */
};
#define bfa_mem_dma_t struct bfa_mem_dma_s
struct bfa_mem_kva_s {
struct list_head qe; /* Queue of KVA elements */
u32 mem_len; /* Total Length in Bytes */
u8 *kva; /* kernel virtual address */
u8 *kva_curp; /* kva allocation cursor */
};
#define bfa_mem_kva_t struct bfa_mem_kva_s
struct bfa_meminfo_s {
struct bfa_mem_dma_s dma_info;
struct bfa_mem_kva_s kva_info;
};
/* BFA memory segment setup helpers */
static inline void bfa_mem_dma_setup(struct bfa_meminfo_s *meminfo,
struct bfa_mem_dma_s *dm_ptr,
size_t seg_sz)
{
dm_ptr->mem_len = seg_sz;
if (seg_sz)
list_add_tail(&dm_ptr->qe, &meminfo->dma_info.qe);
}
static inline void bfa_mem_kva_setup(struct bfa_meminfo_s *meminfo,
struct bfa_mem_kva_s *kva_ptr,
size_t seg_sz)
{
kva_ptr->mem_len = seg_sz;
Annotation
- Immediate include surface: `bfad_drv.h`, `bfa_cs.h`, `bfi.h`.
- Detected declarations: `struct bfa_timer_s`, `struct bfa_timer_mod_s`, `struct bfa_sge_s`, `struct bfa_mem_dma_s`, `struct bfa_mem_kva_s`, `struct bfa_meminfo_s`, `struct bfa_pcidev_s`, `struct bfa_dma_s`, `struct bfa_ioc_regs_s`, `struct bfa_mbox_cmd_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.