drivers/scsi/cxgbi/libcxgbi.h

Source file repositories/reference/linux-study-clean/drivers/scsi/cxgbi/libcxgbi.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/cxgbi/libcxgbi.h
Extension
.h
Size
18004 bytes
Lines
644
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 sge_opaque_hdr {
	void *dev;
	dma_addr_t addr[MAX_SKB_FRAGS + 1];
};

struct cxgbi_sock {
	struct cxgbi_device *cdev;

	int tid;
	int atid;
	unsigned long flags;
	unsigned int mtu;
	unsigned short rss_qid;
	unsigned short txq_idx;
	unsigned short advmss;
	unsigned int tx_chan;
	unsigned int rx_chan;
	unsigned int mss_idx;
	unsigned int smac_idx;
	unsigned char port_id;
	int wr_max_cred;
	int wr_cred;
	int wr_una_cred;
#ifdef CONFIG_CHELSIO_T4_DCB
	u8 dcb_priority;
#endif
	unsigned char hcrc_len;
	unsigned char dcrc_len;

	void *l2t;
	struct sk_buff *wr_pending_head;
	struct sk_buff *wr_pending_tail;
	struct sk_buff *cpl_close;
	struct sk_buff *cpl_abort_req;
	struct sk_buff *cpl_abort_rpl;
	struct sk_buff *skb_ulp_lhdr;
	spinlock_t lock;
	struct kref refcnt;
	unsigned int state;
	unsigned int csk_family;
	union {
		struct sockaddr_in saddr;
		struct sockaddr_in6 saddr6;
	};
	union {
		struct sockaddr_in daddr;
		struct sockaddr_in6 daddr6;
	};
	struct dst_entry *dst;
	struct sk_buff_head receive_queue;
	struct sk_buff_head write_queue;
	struct timer_list retry_timer;
	struct completion cmpl;
	int err;
	rwlock_t callback_lock;
	void *user_data;

	u32 rcv_nxt;
	u32 copied_seq;
	u32 rcv_wup;
	u32 snd_nxt;
	u32 snd_una;
	u32 write_seq;
	u32 snd_win;
	u32 rcv_win;

	bool disable_iso;
	u32 no_tx_credits;
	unsigned long prev_iso_ts;
};

/*
 * connection states
 */
enum cxgbi_sock_states{
	CTP_CLOSED,
	CTP_CONNECTING,
	CTP_ACTIVE_OPEN,
	CTP_ESTABLISHED,
	CTP_ACTIVE_CLOSE,
	CTP_PASSIVE_CLOSE,
	CTP_CLOSE_WAIT_1,
	CTP_CLOSE_WAIT_2,
	CTP_ABORTING,
};

/*
 * Connection flags -- many to track some close related events.
 */
enum cxgbi_sock_flags {

Annotation

Implementation Notes