drivers/scsi/lpfc/lpfc_hw4.h
Source file repositories/reference/linux-study-clean/drivers/scsi/lpfc/lpfc_hw4.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/lpfc/lpfc_hw4.h- Extension
.h- Size
- 177930 bytes
- Lines
- 5065
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/scsi/fc/fc_fs.huapi/scsi/fc/fc_els.h
Detected Declarations
struct dma_addressstruct lpfc_sli_intfstruct lpfc_asic_idstruct ulp_bde64_lestruct ulp_bde64struct lpfc_sli4_flagsstruct sli4_bls_rspstruct lpfc_eqestruct lpfc_cqestruct lpfc_wcqe_completestruct lpfc_wcqe_releasestruct sli4_wcqe_xri_abortedstruct lpfc_rcqestruct lpfc_rqestruct lpfc_bde4struct lpfc_registerstruct lpfc_sli4_cfg_mhdrstruct mbox_headerstruct eq_contextstruct eq_delay_infostruct sgl_page_pairsstruct lpfc_mbx_post_sgl_pagesstruct lpfc_mbx_post_uembed_sgl_page1struct lpfc_mbx_sgestruct lpfc_mbx_host_bufstruct lpfc_mbx_nembed_cmdstruct lpfc_mbx_nembed_sge_virtstruct lpfc_mbx_read_objectstruct lpfc_mbx_eq_createstruct lpfc_mbx_modify_eq_delaystruct lpfc_mbx_eq_destroystruct lpfc_mbx_nopstruct lpfc_mbx_set_ras_fwlogstruct cq_contextstruct lpfc_mbx_cq_createstruct lpfc_mbx_cq_create_setstruct lpfc_mbx_cq_destroystruct wq_contextstruct lpfc_mbx_wq_createstruct lpfc_mbx_wq_destroystruct rq_contextstruct lpfc_mbx_rq_createstruct lpfc_mbx_rq_create_v2struct lpfc_mbx_rq_destroystruct mq_contextstruct lpfc_mbx_mq_createstruct lpfc_mbx_mq_create_extstruct lpfc_mbx_mq_destroy
Annotated Snippet
struct dma_address {
uint32_t addr_lo;
uint32_t addr_hi;
};
struct lpfc_sli_intf {
uint32_t word0;
#define lpfc_sli_intf_valid_SHIFT 29
#define lpfc_sli_intf_valid_MASK 0x00000007
#define lpfc_sli_intf_valid_WORD word0
#define LPFC_SLI_INTF_VALID 6
#define lpfc_sli_intf_sli_hint2_SHIFT 24
#define lpfc_sli_intf_sli_hint2_MASK 0x0000001F
#define lpfc_sli_intf_sli_hint2_WORD word0
#define LPFC_SLI_INTF_SLI_HINT2_NONE 0
#define lpfc_sli_intf_sli_hint1_SHIFT 16
#define lpfc_sli_intf_sli_hint1_MASK 0x000000FF
#define lpfc_sli_intf_sli_hint1_WORD word0
#define LPFC_SLI_INTF_SLI_HINT1_NONE 0
#define LPFC_SLI_INTF_SLI_HINT1_1 1
#define LPFC_SLI_INTF_SLI_HINT1_2 2
#define lpfc_sli_intf_if_type_SHIFT 12
#define lpfc_sli_intf_if_type_MASK 0x0000000F
#define lpfc_sli_intf_if_type_WORD word0
#define LPFC_SLI_INTF_IF_TYPE_0 0
#define LPFC_SLI_INTF_IF_TYPE_1 1
#define LPFC_SLI_INTF_IF_TYPE_2 2
#define LPFC_SLI_INTF_IF_TYPE_6 6
#define lpfc_sli_intf_sli_family_SHIFT 8
#define lpfc_sli_intf_sli_family_MASK 0x0000000F
#define lpfc_sli_intf_sli_family_WORD word0
#define LPFC_SLI_INTF_FAMILY_BE2 0x0
#define LPFC_SLI_INTF_ASIC_ID 0x1 /* Refer to ASIC_ID register */
#define LPFC_SLI_INTF_FAMILY_BE3 0x3
#define LPFC_SLI_INTF_FAMILY_LNCR_A0 0xa
#define LPFC_SLI_INTF_FAMILY_LNCR_B0 0xb
#define LPFC_SLI_INTF_FAMILY_G6 0xc
#define LPFC_SLI_INTF_FAMILY_G7 0xd
#define LPFC_SLI_INTF_FAMILY_G7P 0xe
#define lpfc_sli_intf_slirev_SHIFT 4
#define lpfc_sli_intf_slirev_MASK 0x0000000F
#define lpfc_sli_intf_slirev_WORD word0
#define LPFC_SLI_INTF_REV_SLI3 3
#define LPFC_SLI_INTF_REV_SLI4 4
#define lpfc_sli_intf_func_type_SHIFT 0
#define lpfc_sli_intf_func_type_MASK 0x00000001
#define lpfc_sli_intf_func_type_WORD word0
#define LPFC_SLI_INTF_IF_TYPE_PHYS 0
#define LPFC_SLI_INTF_IF_TYPE_VIRT 1
};
struct lpfc_asic_id {
u32 word0;
#define lpfc_asic_id_gen_num_SHIFT 8
#define lpfc_asic_id_gen_num_MASK 0x000000FF
#define lpfc_asic_id_gen_num_WORD word0
#define LPFC_SLI_INTF_FAMILY_G8 0x10
#define lpfc_asic_id_rev_num_SHIFT 0
#define lpfc_asic_id_rev_num_MASK 0x000000FF
#define lpfc_asic_id_rev_num_WORD word0
};
#define LPFC_SLI4_MBX_EMBED true
#define LPFC_SLI4_MBX_NEMBED false
#define LPFC_SLI4_MB_WORD_COUNT 64
#define LPFC_MAX_MQ_PAGE 8
#define LPFC_MAX_WQ_PAGE_V0 4
#define LPFC_MAX_WQ_PAGE 8
#define LPFC_MAX_RQ_PAGE 8
#define LPFC_MAX_CQ_PAGE 4
#define LPFC_MAX_EQ_PAGE 8
#define LPFC_VIR_FUNC_MAX 32 /* Maximum number of virtual functions */
#define LPFC_PCI_FUNC_MAX 5 /* Maximum number of PCI functions */
#define LPFC_VFR_PAGE_SIZE 0x1000 /* 4KB BAR2 per-VF register page size */
/* Define SLI4 Alignment requirements. */
#define LPFC_ALIGN_16_BYTE 16
#define LPFC_ALIGN_64_BYTE 64
#define SLI4_PAGE_SIZE 4096
/* Define SLI4 specific definitions. */
#define LPFC_MQ_CQE_BYTE_OFFSET 256
#define LPFC_MBX_CMD_HDR_LENGTH 16
#define LPFC_MBX_ERROR_RANGE 0x4000
#define LPFC_BMBX_BIT1_ADDR_HI 0x2
#define LPFC_BMBX_BIT1_ADDR_LO 0
#define LPFC_RPI_HDR_COUNT 64
#define LPFC_HDR_TEMPLATE_SIZE 4096
Annotation
- Immediate include surface: `uapi/scsi/fc/fc_fs.h`, `uapi/scsi/fc/fc_els.h`.
- Detected declarations: `struct dma_address`, `struct lpfc_sli_intf`, `struct lpfc_asic_id`, `struct ulp_bde64_le`, `struct ulp_bde64`, `struct lpfc_sli4_flags`, `struct sli4_bls_rsp`, `struct lpfc_eqe`, `struct lpfc_cqe`, `struct lpfc_wcqe_complete`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source 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.