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.

Dependency Surface

Detected Declarations

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

Implementation Notes