drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h- Extension
.h- Size
- 35561 bytes
- Lines
- 1404
- Domain
- Driver Families
- Bucket
- drivers/net
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/pci.hlinux/netdevice.hlinux/etherdevice.hlinux/irq.hbnx2x.hbnx2x_sriov.h
Detected Declarations
function bnx2x_update_rx_prodfunction bnx2x_update_fpsb_idxfunction bnx2x_igu_ack_sb_genfunction bnx2x_hc_ack_sbfunction bnx2x_ack_sbfunction bnx2x_hc_ack_intfunction bnx2x_igu_ack_intfunction bnx2x_ack_intfunction bnx2x_has_tx_work_unloadfunction bnx2x_tx_availfunction bnx2x_tx_queue_has_workfunction bnx2x_has_tx_workfunction bnx2x_has_rx_workfunction bnx2x_tx_disablefunction bnx2x_free_rx_sgefunction bnx2x_del_all_napi_cnicfunction for_each_rx_queue_cnicfunction bnx2x_del_all_napifunction for_each_eth_queuefunction bnx2x_disable_msifunction bnx2x_clear_sge_mask_next_elemsfunction bnx2x_init_sge_ring_bit_maskfunction dma_mapping_errorfunction func_by_vnfunction bnx2x_config_rss_ethfunction bnx2x_func_startfunction bnx2x_set_fw_mac_addrfunction bnx2x_free_rx_mem_poolfunction bnx2x_free_rx_sge_rangefunction bnx2x_set_next_page_rx_bdfunction bnx2x_stats_idfunction bnx2x_init_vlan_mac_fp_objsfunction activefunction bnx2x_init_bp_objsfunction bnx2x_fp_qzone_idfunction bnx2x_init_txdatafunction bnx2x_cnic_eth_cl_idfunction bnx2x_cnic_fw_sb_idfunction bnx2x_cnic_igu_sb_idfunction bnx2x_clean_tx_queuefunction __storm_memset_structfunction bnx2x_wait_sp_compfunction bnx2x_extract_max_cfgfunction bnx2x_mtu_allows_grofunction bnx2x_link_sync_notifyfunction bnx2x_update_drv_flags
Annotated Snippet
if (x) { \
dma_free_coherent(&bp->pdev->dev, size, (void *)x, y); \
x = NULL; \
y = 0; \
} \
} while (0)
#define BNX2X_FREE(x) \
do { \
if (x) { \
kfree((void *)x); \
x = NULL; \
} \
} while (0)
#define BNX2X_PCI_ALLOC(y, size) \
({ \
void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
if (x) \
DP(NETIF_MSG_HW, \
"BNX2X_PCI_ALLOC: Physical %Lx Virtual %p\n", \
(unsigned long long)(*y), x); \
x; \
})
#define BNX2X_PCI_FALLOC(y, size) \
({ \
void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
if (x) { \
memset(x, 0xff, size); \
DP(NETIF_MSG_HW, \
"BNX2X_PCI_FALLOC: Physical %Lx Virtual %p\n", \
(unsigned long long)(*y), x); \
} \
x; \
})
/*********************** Interfaces ****************************
* Functions that need to be implemented by each driver version
*/
/* Init */
/**
* bnx2x_send_unload_req - request unload mode from the MCP.
*
* @bp: driver handle
* @unload_mode: requested function's unload mode
*
* Return unload mode returned by the MCP: COMMON, PORT or FUNC.
*/
u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode);
/**
* bnx2x_send_unload_done - send UNLOAD_DONE command to the MCP.
*
* @bp: driver handle
* @keep_link: true iff link should be kept up
*/
void bnx2x_send_unload_done(struct bnx2x *bp, bool keep_link);
/**
* bnx2x_config_rss_pf - configure RSS parameters in a PF.
*
* @bp: driver handle
* @rss_obj: RSS object to use
* @ind_table: indirection table to configure
* @config_hash: re-configure RSS hash keys configuration
* @enable: enabled or disabled configuration
*/
int bnx2x_rss(struct bnx2x *bp, struct bnx2x_rss_config_obj *rss_obj,
bool config_hash, bool enable);
/**
* bnx2x__init_func_obj - init function object
*
* @bp: driver handle
*
* Initializes the Function Object with the appropriate
* parameters which include a function slow path driver
* interface.
*/
void bnx2x__init_func_obj(struct bnx2x *bp);
/**
* bnx2x_setup_queue - setup eth queue.
*
* @bp: driver handle
* @fp: pointer to the fastpath structure
* @leading: boolean
*
*/
Annotation
- Immediate include surface: `linux/types.h`, `linux/pci.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/irq.h`, `bnx2x.h`, `bnx2x_sriov.h`.
- Detected declarations: `function bnx2x_update_rx_prod`, `function bnx2x_update_fpsb_idx`, `function bnx2x_igu_ack_sb_gen`, `function bnx2x_hc_ack_sb`, `function bnx2x_ack_sb`, `function bnx2x_hc_ack_int`, `function bnx2x_igu_ack_int`, `function bnx2x_ack_int`, `function bnx2x_has_tx_work_unload`, `function bnx2x_tx_avail`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.