drivers/scsi/elx/libefc_sli/sli4.h
Source file repositories/reference/linux-study-clean/drivers/scsi/elx/libefc_sli/sli4.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/elx/libefc_sli/sli4.h- Extension
.h- Size
- 96038 bytes
- Lines
- 4133
- 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
linux/pci.hlinux/delay.hscsi/fc/fc_els.hscsi/fc/fc_fs.h../include/efc_common.h
Detected Declarations
struct sli4_asic_entry_tstruct sli4_regstruct sli4_dmaaddrstruct sli4_bufptrstruct sli4_bdestruct sli4_sgestruct sli4_dif_sgestruct sli4_diseed_sgestruct sli4_lsp_sgestruct sli4_eqestruct sli4_mcqestruct sli4_acqestruct sli4_rqst_hdrstruct sli4_rsp_hdrstruct sli4_rqst_cmn_create_cq_v2struct sli4_rqst_cmn_create_cq_set_v0struct sli4_rsp_cmn_create_queuestruct sli4_rsp_cmn_create_queue_setstruct sli4_rqst_cmn_destroy_qstruct sli4_rsp_cmn_destroy_qstruct sli4_eqdelay_recstruct sli4_rqst_cmn_modify_eq_delaystruct sli4_rsp_cmn_modify_eq_delaystruct sli4_rqst_cmn_create_eqstruct sli4_rsp_cmn_create_eqstruct sli4_rqst_cmn_create_mq_extstruct sli4_rsp_cmn_create_mq_extstruct sli4_rqst_cmn_create_cq_v0struct sli4_rqst_rq_createstruct sli4_rsp_rq_createstruct sli4_rqst_rq_create_v1struct sli4_rsp_rq_create_v1struct sli4_rqst_rq_create_v2struct sli4_rsp_rq_create_v2struct sli4_rqst_wq_createstruct sli4_rsp_wq_createstruct sli4_link_attentionstruct sli4_fc_wcqestruct sli4_fc_wqecstruct sli4_generic_wqestruct sli4_abort_wqestruct sli4_els_request64_wqestruct sli4_fcp_icmnd64_wqestruct sli4_fcp_iread64_wqestruct sli4_fcp_iwrite64_wqestruct sli4_fcp_128byte_wqestruct sli4_fcp_treceive64_wqestruct sli4_fcp_trsp64_wqe
Annotated Snippet
struct sli4_asic_entry_t {
u32 rev_id;
u32 family;
};
/* BMBX - Bootstrap Mailbox Register */
#define SLI4_BMBX_REG 0x0160
enum sli4_bmbx {
SLI4_BMBX_MASK_HI = 0x3,
SLI4_BMBX_MASK_LO = 0xf,
SLI4_BMBX_RDY = 1 << 0,
SLI4_BMBX_HI = 1 << 1,
SLI4_BMBX_SIZE = 256,
};
static inline u32
sli_bmbx_write_hi(u64 addr) {
u32 val;
val = upper_32_bits(addr) & ~SLI4_BMBX_MASK_HI;
val |= SLI4_BMBX_HI;
return val;
}
static inline u32
sli_bmbx_write_lo(u64 addr) {
u32 val;
val = (upper_32_bits(addr) & SLI4_BMBX_MASK_HI) << 30;
val |= ((addr) & ~SLI4_BMBX_MASK_LO) >> 2;
return val;
}
/* SLIPORT_CONTROL - SLI Port Control Register */
#define SLI4_PORT_CTRL_REG 0x0408
enum sli4_port_ctrl {
SLI4_PORT_CTRL_IP = 1u << 27,
SLI4_PORT_CTRL_IDIS = 1u << 22,
SLI4_PORT_CTRL_FDD = 1u << 31,
};
/* SLI4_SLIPORT_ERROR - SLI Port Error Register */
#define SLI4_PORT_ERROR1 0x040c
#define SLI4_PORT_ERROR2 0x0410
/* EQCQ_DOORBELL - EQ and CQ Doorbell Register */
#define SLI4_EQCQ_DB_REG 0x120
enum sli4_eqcq_e {
SLI4_EQ_ID_LO_MASK = 0x01ff,
SLI4_CQ_ID_LO_MASK = 0x03ff,
SLI4_EQCQ_CI_EQ = 0x0200,
SLI4_EQCQ_QT_EQ = 0x00000400,
SLI4_EQCQ_QT_CQ = 0x00000000,
SLI4_EQCQ_ID_HI_SHIFT = 11,
SLI4_EQCQ_ID_HI_MASK = 0xf800,
SLI4_EQCQ_NUM_SHIFT = 16,
SLI4_EQCQ_NUM_MASK = 0x1fff0000,
SLI4_EQCQ_ARM = 0x20000000,
SLI4_EQCQ_UNARM = 0x00000000,
};
static inline u32
sli_format_eq_db_data(u16 num_popped, u16 id, u32 arm) {
u32 reg;
reg = (id & SLI4_EQ_ID_LO_MASK) | SLI4_EQCQ_QT_EQ;
reg |= (((id) >> 9) << SLI4_EQCQ_ID_HI_SHIFT) & SLI4_EQCQ_ID_HI_MASK;
reg |= ((num_popped) << SLI4_EQCQ_NUM_SHIFT) & SLI4_EQCQ_NUM_MASK;
reg |= arm | SLI4_EQCQ_CI_EQ;
return reg;
}
static inline u32
sli_format_cq_db_data(u16 num_popped, u16 id, u32 arm) {
u32 reg;
reg = ((id) & SLI4_CQ_ID_LO_MASK) | SLI4_EQCQ_QT_CQ;
reg |= (((id) >> 10) << SLI4_EQCQ_ID_HI_SHIFT) & SLI4_EQCQ_ID_HI_MASK;
reg |= ((num_popped) << SLI4_EQCQ_NUM_SHIFT) & SLI4_EQCQ_NUM_MASK;
reg |= arm;
Annotation
- Immediate include surface: `linux/pci.h`, `linux/delay.h`, `scsi/fc/fc_els.h`, `scsi/fc/fc_fs.h`, `../include/efc_common.h`.
- Detected declarations: `struct sli4_asic_entry_t`, `struct sli4_reg`, `struct sli4_dmaaddr`, `struct sli4_bufptr`, `struct sli4_bde`, `struct sli4_sge`, `struct sli4_dif_sge`, `struct sli4_diseed_sge`, `struct sli4_lsp_sge`, `struct sli4_eqe`.
- 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.