drivers/scsi/bnx2fc/bnx2fc.h
Source file repositories/reference/linux-study-clean/drivers/scsi/bnx2fc/bnx2fc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/bnx2fc/bnx2fc.h- Extension
.h- Size
- 16879 bytes
- Lines
- 605
- 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/kernel.hlinux/skbuff.hlinux/netdevice.hlinux/etherdevice.hlinux/if_ether.hlinux/if_vlan.hlinux/kthread.hlinux/crc32.hlinux/cpu.hlinux/types.hlinux/list.hlinux/delay.hlinux/timer.hlinux/errno.hlinux/pci.hlinux/init.hlinux/dma-mapping.hlinux/workqueue.hlinux/mutex.hlinux/spinlock.hlinux/bitops.hlinux/log2.hlinux/interrupt.hlinux/sched/signal.hlinux/io.hscsi/scsi.hscsi/scsi_host.hscsi/scsi_device.hscsi/scsi_cmnd.hscsi/scsi_eh.h
Detected Declarations
struct bnx2fc_percpu_sstruct bnx2fc_fw_statsstruct bnx2fc_hbastruct bnx2fc_interfacestruct bnx2fc_lportstruct bnx2fc_cmd_mgrstruct bnx2fc_rportstruct bnx2fc_mp_reqstruct bnx2fc_els_cb_argstruct bnx2fc_cmdstruct io_bdtstruct bnx2fc_workstruct bnx2fc_unsol_elsstruct bnx2fc_priv
Annotated Snippet
struct bnx2fc_percpu_s {
struct task_struct *iothread;
struct list_head work_list;
spinlock_t fp_work_lock;
};
struct bnx2fc_fw_stats {
u64 fc_crc_cnt;
u64 fcoe_tx_pkt_cnt;
u64 fcoe_rx_pkt_cnt;
u64 fcoe_tx_byte_cnt;
u64 fcoe_rx_byte_cnt;
};
struct bnx2fc_hba {
struct list_head list;
struct cnic_dev *cnic;
struct pci_dev *pcidev;
struct net_device *phys_dev;
unsigned long reg_with_cnic;
#define BNX2FC_CNIC_REGISTERED 1
struct bnx2fc_cmd_mgr *cmd_mgr;
spinlock_t hba_lock;
struct mutex hba_mutex;
struct mutex hba_stats_mutex;
unsigned long adapter_state;
#define ADAPTER_STATE_UP 0
#define ADAPTER_STATE_GOING_DOWN 1
#define ADAPTER_STATE_LINK_DOWN 2
#define ADAPTER_STATE_READY 3
unsigned long flags;
#define BNX2FC_FLAG_FW_INIT_DONE 0
#define BNX2FC_FLAG_DESTROY_CMPL 1
u32 next_conn_id;
/* xid resources */
u16 max_xid;
u32 max_tasks;
u32 max_outstanding_cmds;
u32 elstm_xids;
struct fcoe_task_ctx_entry **task_ctx;
dma_addr_t *task_ctx_dma;
struct regpair *task_ctx_bd_tbl;
dma_addr_t task_ctx_bd_dma;
int hash_tbl_segment_count;
void **hash_tbl_segments;
void *hash_tbl_pbl;
dma_addr_t hash_tbl_pbl_dma;
struct fcoe_t2_hash_table_entry *t2_hash_tbl;
dma_addr_t t2_hash_tbl_dma;
char *t2_hash_tbl_ptr;
dma_addr_t t2_hash_tbl_ptr_dma;
char *dummy_buffer;
dma_addr_t dummy_buf_dma;
/* Active list of offloaded sessions */
struct bnx2fc_rport **tgt_ofld_list;
/* statistics */
struct bnx2fc_fw_stats bfw_stats;
struct fcoe_statistics_params prev_stats;
struct fcoe_statistics_params *stats_buffer;
dma_addr_t stats_buf_dma;
struct completion stat_req_done;
struct fcoe_capabilities fcoe_cap;
/*destroy handling */
struct timer_list destroy_timer;
wait_queue_head_t destroy_wait;
/* linkdown handling */
wait_queue_head_t shutdown_wait;
int wait_for_link_down;
int num_ofld_sess;
struct list_head vports;
char chip_num[BCM_CHIP_LEN];
};
struct bnx2fc_interface {
struct list_head list;
unsigned long if_flags;
#define BNX2FC_CTLR_INIT_DONE 0
struct bnx2fc_hba *hba;
struct net_device *netdev;
struct packet_type fcoe_packet_type;
struct packet_type fip_packet_type;
Annotation
- Immediate include surface: `linux/module.h`, `linux/moduleparam.h`, `linux/kernel.h`, `linux/skbuff.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/if_ether.h`, `linux/if_vlan.h`.
- Detected declarations: `struct bnx2fc_percpu_s`, `struct bnx2fc_fw_stats`, `struct bnx2fc_hba`, `struct bnx2fc_interface`, `struct bnx2fc_lport`, `struct bnx2fc_cmd_mgr`, `struct bnx2fc_rport`, `struct bnx2fc_mp_req`, `struct bnx2fc_els_cb_arg`, `struct bnx2fc_cmd`.
- 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.