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.
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/errno.hlinux/types.hlinux/debugfs.hlinux/list.hlinux/netdevice.hlinux/if_vlan.hlinux/scatterlist.hlinux/skbuff.hlinux/vmalloc.hscsi/scsi_device.hscsi/libiscsi_tcp.hlibcxgb_ppm.h
Detected Declarations
struct sge_opaque_hdrstruct cxgbi_sockstruct cxgbi_skb_rx_cbstruct cxgbi_skb_tx_cbstruct cxgbi_skb_cbstruct cxgbi_hbastruct cxgbi_ports_mapstruct cxgbi_devicestruct cxgbi_connstruct cxgbi_endpointstruct cxgbi_task_datastruct cxgbi_iso_infoenum cxgbi_dbg_flagenum cxgbi_sock_statesenum cxgbi_sock_flagsenum cxgbi_skcb_flagsfunction cxgbi_ulp_extra_lenfunction cxgbi_skcb_set_flagfunction cxgbi_skcb_clear_flagfunction cxgbi_skcb_test_flagfunction cxgbi_sock_set_flagfunction cxgbi_sock_clear_flagfunction cxgbi_sock_flagfunction cxgbi_sock_set_statefunction cxgbi_sock_freefunction __cxgbi_sock_putfunction __cxgbi_sock_getfunction cxgbi_sock_is_closingfunction cxgbi_sock_is_establishedfunction cxgbi_sock_purge_write_queuefunction cxgbi_sock_compute_wscalefunction cxgbi_sock_reset_wr_listfunction cxgbi_sock_enqueue_wrfunction cxgbi_sock_count_pending_wrsfunction cxgbi_set_iscsi_ipv4
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
- Immediate include surface: `linux/kernel.h`, `linux/errno.h`, `linux/types.h`, `linux/debugfs.h`, `linux/list.h`, `linux/netdevice.h`, `linux/if_vlan.h`, `linux/scatterlist.h`.
- Detected declarations: `struct sge_opaque_hdr`, `struct cxgbi_sock`, `struct cxgbi_skb_rx_cb`, `struct cxgbi_skb_tx_cb`, `struct cxgbi_skb_cb`, `struct cxgbi_hba`, `struct cxgbi_ports_map`, `struct cxgbi_device`, `struct cxgbi_conn`, `struct cxgbi_endpoint`.
- 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.