drivers/scsi/bnx2i/bnx2i.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bnx2i/bnx2i.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bnx2i/bnx2i.h- Extension
.h- Size
- 26758 bytes
- Lines
- 872
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/moduleparam.hlinux/errno.hlinux/pci.hlinux/spinlock.hlinux/interrupt.hlinux/delay.hlinux/sched/signal.hlinux/in.hlinux/kfifo.hlinux/netdevice.hlinux/completion.hlinux/kthread.hlinux/cpu.hscsi/scsi_cmnd.hscsi/scsi_device.hscsi/scsi_eh.hscsi/scsi_host.hscsi/scsi.hscsi/iscsi_proto.hscsi/libiscsi.hscsi/scsi_transport_iscsi.h../../net/ethernet/broadcom/cnic_if.h57xx_iscsi_hsi.h57xx_iscsi_constants.h../../net/ethernet/broadcom/bnx2x/bnx2x_mfw_req.h
Detected Declarations
struct generic_pdu_rescstruct bd_resc_pagestruct io_bdtstruct bnx2i_cmdstruct bnx2i_connstruct iscsi_cid_queuestruct bnx2i_stats_infostruct bnx2i_hbastruct sqestruct rqestruct cqestruct bnx2x_iscsi_cq_pend_cmplstruct bnx2i_5771x_cq_dbstruct bnx2i_5771x_sq_rq_dbstruct bnx2i_5771x_dbell_hdrstruct bnx2i_5771x_dbellstruct qp_infostruct ep_handlesstruct bnx2i_endpointstruct bnx2i_workstruct bnx2i_percpu_s
Annotated Snippet
struct generic_pdu_resc {
char *req_buf;
dma_addr_t req_dma_addr;
u32 req_buf_size;
char *req_wr_ptr;
struct iscsi_hdr resp_hdr;
char *resp_buf;
dma_addr_t resp_dma_addr;
u32 resp_buf_size;
char *resp_wr_ptr;
char *req_bd_tbl;
dma_addr_t req_bd_dma;
char *resp_bd_tbl;
dma_addr_t resp_bd_dma;
};
/**
* struct bd_resc_page - tracks DMA'able memory allocated for BD tables
*
* @link: list head to link elements
* @max_ptrs: maximun pointers that can be stored in this page
* @num_valid: number of pointer valid in this page
* @page: base addess for page pointer array
*
* structure to track DMA'able memory allocated for command BD tables
*/
struct bd_resc_page {
struct list_head link;
u32 max_ptrs;
u32 num_valid;
void *page[1];
};
/**
* struct io_bdt - I/O buffer destricptor table
*
* @bd_tbl: BD table's virtual address
* @bd_tbl_dma: BD table's dma address
* @bd_valid: num valid BD entries
*
* IO BD table
*/
struct io_bdt {
struct iscsi_bd *bd_tbl;
dma_addr_t bd_tbl_dma;
u16 bd_valid;
};
/**
* bnx2i_cmd - iscsi command structure
*
* @hdr: iSCSI header
* @conn: iscsi_conn pointer
* @scsi_cmd: SCSI-ML task pointer corresponding to this iscsi cmd
* @sg: SG list
* @io_tbl: buffer descriptor (BD) table
* @bd_tbl_dma: buffer descriptor (BD) table's dma address
* @req: bnx2i specific command request struct
*/
struct bnx2i_cmd {
struct iscsi_hdr hdr;
struct bnx2i_conn *conn;
struct scsi_cmnd *scsi_cmd;
struct scatterlist *sg;
struct io_bdt io_tbl;
dma_addr_t bd_tbl_dma;
struct bnx2i_cmd_request req;
};
/**
* struct bnx2i_conn - iscsi connection structure
*
* @cls_conn: pointer to iscsi cls conn
* @hba: adapter structure pointer
* @iscsi_conn_cid: iscsi conn id
* @fw_cid: firmware iscsi context id
* @ep: endpoint structure pointer
* @gen_pdu: login/nopout/logout pdu resources
* @violation_notified: bit mask used to track iscsi error/warning messages
* already printed out
* @work_cnt: keeps track of the number of outstanding work
*
* iSCSI connection structure
*/
struct bnx2i_conn {
struct iscsi_cls_conn *cls_conn;
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/errno.h`, `linux/pci.h`, `linux/spinlock.h`, `linux/interrupt.h`, `linux/delay.h`, `linux/sched/signal.h`.
- Detected declarations: `struct generic_pdu_resc`, `struct bd_resc_page`, `struct io_bdt`, `struct bnx2i_cmd`, `struct bnx2i_conn`, `struct iscsi_cid_queue`, `struct bnx2i_stats_info`, `struct bnx2i_hba`, `struct sqe`, `struct rqe`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.