Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
bnx2x.h File Reference
#include <linux/netdevice.h>
#include <linux/dma-mapping.h>
#include <linux/types.h>
#include "bnx2x_hsi.h"
#include <linux/mdio.h>
#include "bnx2x_reg.h"
#include "bnx2x_fw_defs.h"
#include "bnx2x_mfw_req.h"
#include "bnx2x_link.h"
#include "bnx2x_sp.h"
#include "bnx2x_dcb.h"
#include "bnx2x_stats.h"

Go to the source code of this file.

Data Structures

struct  sw_rx_bd
 
struct  sw_tx_bd
 
struct  sw_rx_page
 
union  db_prod
 
union  host_hc_status_block
 
struct  bnx2x_agg_info
 
struct  bnx2x_fp_txdata
 
struct  bnx2x_fastpath
 
struct  bnx2x_common
 
struct  bnx2x_port
 
union  cdu_context
 
struct  bnx2x_slowpath
 
struct  attn_route
 
struct  iro
 
struct  hw_context
 
struct  bnx2x_link_report_data
 
struct  bnx2x_fw_stats_req
 
struct  bnx2x_fw_stats_data
 
struct  bnx2x_prev_path_list
 
struct  bnx2x_sp_objs
 
struct  bnx2x_fp_stats
 
struct  bnx2x
 
struct  bnx2x_func_init_params
 

Macros

#define DRV_MODULE_VERSION   "1.78.00-0"
 
#define DRV_MODULE_RELDATE   "2012/09/27"
 
#define BNX2X_BC_VER   0x040200
 
#define BNX2X_MIN_MSIX_VEC_CNT   2
 
#define BNX2X_MSIX_VEC_FP_START   1
 
#define DRV_MODULE_NAME   "bnx2x"
 
#define BNX2X_MSG_OFF   0x0
 
#define BNX2X_MSG_MCP   0x0010000 /* was: NETIF_MSG_HW */
 
#define BNX2X_MSG_STATS   0x0020000 /* was: NETIF_MSG_TIMER */
 
#define BNX2X_MSG_NVM   0x0040000 /* was: NETIF_MSG_HW */
 
#define BNX2X_MSG_DMAE   0x0080000 /* was: NETIF_MSG_HW */
 
#define BNX2X_MSG_SP   0x0100000 /* was: NETIF_MSG_INTR */
 
#define BNX2X_MSG_FP   0x0200000 /* was: NETIF_MSG_INTR */
 
#define BNX2X_MSG_IOV   0x0800000
 
#define BNX2X_MSG_IDLE   0x2000000 /* used for idle check*/
 
#define BNX2X_MSG_ETHTOOL   0x4000000
 
#define BNX2X_MSG_DCB   0x8000000
 
#define DP(__mask, fmt,...)
 
#define DP_CONT(__mask, fmt,...)
 
#define BNX2X_DBG_ERR(fmt,...)
 
#define BNX2X_ERR(fmt,...)
 
#define BNX2X_ERROR(fmt,...)   pr_err("[%s:%d]" fmt, __func__, __LINE__, ##__VA_ARGS__)
 
#define BNX2X_DEV_INFO(fmt,...)
 
#define bnx2x_panic()
 
#define bnx2x_mc_addr(ha)   ((ha)->addr)
 
#define bnx2x_uc_addr(ha)   ((ha)->addr)
 
#define U64_LO(x)   (u32)(((u64)(x)) & 0xffffffff)
 
#define U64_HI(x)   (u32)(((u64)(x)) >> 32)
 
#define HILO_U64(hi, lo)   ((((u64)(hi)) << 32) + (lo))
 
#define REG_ADDR(bp, offset)   ((bp->regview) + (offset))
 
#define REG_RD(bp, offset)   readl(REG_ADDR(bp, offset))
 
#define REG_RD8(bp, offset)   readb(REG_ADDR(bp, offset))
 
#define REG_RD16(bp, offset)   readw(REG_ADDR(bp, offset))
 
#define REG_WR(bp, offset, val)   writel((u32)val, REG_ADDR(bp, offset))
 
#define REG_WR8(bp, offset, val)   writeb((u8)val, REG_ADDR(bp, offset))
 
#define REG_WR16(bp, offset, val)   writew((u16)val, REG_ADDR(bp, offset))
 
#define REG_RD_IND(bp, offset)   bnx2x_reg_rd_ind(bp, offset)
 
#define REG_WR_IND(bp, offset, val)   bnx2x_reg_wr_ind(bp, offset, val)
 
#define REG_RD_DMAE(bp, offset, valp, len32)
 
#define REG_WR_DMAE(bp, offset, valp, len32)
 
#define REG_WR_DMAE_LEN(bp, offset, valp, len32)   REG_WR_DMAE(bp, offset, valp, len32)
 
#define VIRT_WR_DMAE_LEN(bp, data, addr, len32, le32_swap)
 
#define SHMEM_ADDR(bp, field)
 
#define SHMEM_RD(bp, field)   REG_RD(bp, SHMEM_ADDR(bp, field))
 
#define SHMEM_WR(bp, field, val)   REG_WR(bp, SHMEM_ADDR(bp, field), val)
 
#define SHMEM2_ADDR(bp, field)
 
#define SHMEM2_RD(bp, field)   REG_RD(bp, SHMEM2_ADDR(bp, field))
 
#define SHMEM2_WR(bp, field, val)   REG_WR(bp, SHMEM2_ADDR(bp, field), val)
 
#define MF_CFG_ADDR(bp, field)
 
#define MF2_CFG_ADDR(bp, field)
 
#define MF_CFG_RD(bp, field)   REG_RD(bp, MF_CFG_ADDR(bp, field))
 
#define MF_CFG_WR(bp, field, val)
 
#define MF2_CFG_RD(bp, field)   REG_RD(bp, MF2_CFG_ADDR(bp, field))
 
#define SHMEM2_HAS(bp, field)
 
#define EMAC_RD(bp, reg)   REG_RD(bp, emac_base + reg)
 
#define EMAC_WR(bp, reg, val)   REG_WR(bp, emac_base + reg, val)
 
#define HC_SP_INDEX_ETH_DEF_CONS   3
 
#define HC_SP_INDEX_EQ_CONS   7
 
#define HC_SP_INDEX_ETH_FCOE_TX_CQ_CONS   6
 
#define HC_SP_INDEX_ETH_FCOE_RX_CQ_CONS   4
 
#define HC_SP_INDEX_ETH_ISCSI_CQ_CONS   5
 
#define HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS   1
 
#define BNX2X_FCOE_L2_RX_INDEX
 
#define BNX2X_FCOE_L2_TX_INDEX
 
#define BNX2X_CNIC_START_ETH_CID(bp)
 
#define BNX2X_ISCSI_ETH_CID(bp)   (BNX2X_CNIC_START_ETH_CID(bp))
 
#define BNX2X_FCOE_ETH_CID(bp)   (BNX2X_CNIC_START_ETH_CID(bp) + 1)
 
#define CNIC_PRESENT   0
 
#define FCOE_PRESENT   0
 
#define NON_ETH_CONTEXT_USE   (FCOE_PRESENT)
 
#define AEU_IN_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR   AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR
 
#define SM_RX_ID   0
 
#define SM_TX_ID   1
 
#define FIRST_TX_ONLY_COS_INDEX   1
 
#define FIRST_TX_COS_INDEX   0
 
#define CID_TO_FP(cid, bp)   ((cid) % BNX2X_NUM_NON_CNIC_QUEUES(bp))
 
#define CID_COS_TO_TX_ONLY_CID(cid, cos, bp)   (cid + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp))
 
#define FP_COS_TO_TXQ(fp, cos, bp)   ((fp)->index + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp))
 
#define MAX_ETH_TXQ_IDX(bp)   (BNX2X_NUM_NON_CNIC_QUEUES(bp) * (bp)->max_cos)
 
#define BNX2X_TSO_SPLIT_BD   (1<<0)
 
#define BRB_SIZE(bp)   (CHIP_IS_E3(bp) ? 1024 : 512)
 
#define MAX_AGG_QS(bp)
 
#define FW_DROP_LEVEL(bp)   (3 + MAX_SPQ_PENDING + MAX_AGG_QS(bp))
 
#define FW_PREFETCH_CNT   16
 
#define DROPLESS_FC_HEADROOM   100
 
#define BCM_PAGE_SHIFT   12
 
#define BCM_PAGE_SIZE   (1 << BCM_PAGE_SHIFT)
 
#define BCM_PAGE_MASK   (~(BCM_PAGE_SIZE - 1))
 
#define BCM_PAGE_ALIGN(addr)   (((addr) + BCM_PAGE_SIZE - 1) & BCM_PAGE_MASK)
 
#define PAGES_PER_SGE_SHIFT   0
 
#define PAGES_PER_SGE   (1 << PAGES_PER_SGE_SHIFT)
 
#define SGE_PAGE_SIZE   PAGE_SIZE
 
#define SGE_PAGE_SHIFT   PAGE_SHIFT
 
#define SGE_PAGE_ALIGN(addr)   PAGE_ALIGN((typeof(PAGE_SIZE))(addr))
 
#define NUM_RX_SGE_PAGES   2
 
#define RX_SGE_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge))
 
#define NEXT_PAGE_SGE_DESC_CNT   2
 
#define MAX_RX_SGE_CNT   (RX_SGE_CNT - NEXT_PAGE_SGE_DESC_CNT)
 
#define RX_SGE_MASK   (RX_SGE_CNT - 1)
 
#define NUM_RX_SGE   (RX_SGE_CNT * NUM_RX_SGE_PAGES)
 
#define MAX_RX_SGE   (NUM_RX_SGE - 1)
 
#define NEXT_SGE_IDX(x)
 
#define RX_SGE(x)   ((x) & MAX_RX_SGE)
 
#define NUM_SGE_REQ
 
#define NUM_SGE_PG_REQ
 
#define SGE_TH_LO(bp)
 
#define SGE_TH_HI(bp)   (SGE_TH_LO(bp) + DROPLESS_FC_HEADROOM)
 
#define BIT_VEC64_ELEM_SZ   64
 
#define BIT_VEC64_ELEM_SHIFT   6
 
#define BIT_VEC64_ELEM_MASK   ((u64)BIT_VEC64_ELEM_SZ - 1)
 
#define __BIT_VEC64_SET_BIT(el, bit)
 
#define __BIT_VEC64_CLEAR_BIT(el, bit)
 
#define BIT_VEC64_SET_BIT(vec64, idx)
 
#define BIT_VEC64_CLEAR_BIT(vec64, idx)
 
#define BIT_VEC64_TEST_BIT(vec64, idx)
 
#define BIT_VEC64_ONES_MASK(idx)   (((u64)0x1 << (((idx) & BIT_VEC64_ELEM_MASK) + 1)) - 1)
 
#define BIT_VEC64_ELEM_ONE_MASK   ((u64)(~0))
 
#define RX_SGE_MASK_LEN   (NUM_RX_SGE / BIT_VEC64_ELEM_SZ)
 
#define RX_SGE_MASK_LEN_MASK   (RX_SGE_MASK_LEN - 1)
 
#define NEXT_SGE_MASK_ELEM(el)   (((el) + 1) & RX_SGE_MASK_LEN_MASK)
 
#define BNX2X_TPA_START   1
 
#define BNX2X_TPA_STOP   2
 
#define BNX2X_TPA_ERROR   3
 
#define Q_STATS_OFFSET32(stat_name)   (offsetof(struct bnx2x_eth_q_stats, stat_name) / 4)
 
#define BNX2X_NAPI_WEIGHT   128
 
#define FP_NAME_SIZE   (sizeof(((struct net_device *)0)->name) + 8)
 
#define bnx2x_fp(bp, nr, var)   ((bp)->fp[(nr)].var)
 
#define bnx2x_sp_obj(bp, fp)   ((bp)->sp_objs[(fp)->index])
 
#define bnx2x_fp_stats(bp, fp)   (&((bp)->fp_stats[(fp)->index]))
 
#define bnx2x_fp_qstats(bp, fp)   (&((bp)->fp_stats[(fp)->index].eth_q_stats))
 
#define BNX2X_FCOE_MINI_JUMBO_MTU   2500
 
#define FCOE_IDX_OFFSET   0
 
#define FCOE_IDX(bp)
 
#define bnx2x_fcoe_fp(bp)   (&bp->fp[FCOE_IDX(bp)])
 
#define bnx2x_fcoe(bp, var)   (bnx2x_fcoe_fp(bp)->var)
 
#define bnx2x_fcoe_inner_sp_obj(bp)   (&bp->sp_objs[FCOE_IDX(bp)])
 
#define bnx2x_fcoe_sp_obj(bp, var)   (bnx2x_fcoe_inner_sp_obj(bp)->var)
 
#define bnx2x_fcoe_tx(bp, var)
 
#define IS_ETH_FP(fp)
 
#define IS_FCOE_FP(fp)   false
 
#define IS_FCOE_IDX(idx)   false
 
#define MAX_FETCH_BD   13 /* HW max BDs per packet */
 
#define RX_COPY_THRESH   92
 
#define NUM_TX_RINGS   16
 
#define TX_DESC_CNT   (BCM_PAGE_SIZE / sizeof(union eth_tx_bd_types))
 
#define NEXT_PAGE_TX_DESC_CNT   1
 
#define MAX_TX_DESC_CNT   (TX_DESC_CNT - NEXT_PAGE_TX_DESC_CNT)
 
#define NUM_TX_BD   (TX_DESC_CNT * NUM_TX_RINGS)
 
#define MAX_TX_BD   (NUM_TX_BD - 1)
 
#define MAX_TX_AVAIL   (MAX_TX_DESC_CNT * NUM_TX_RINGS - 2)
 
#define NEXT_TX_IDX(x)
 
#define TX_BD(x)   ((x) & MAX_TX_BD)
 
#define TX_BD_POFF(x)   ((x) & MAX_TX_DESC_CNT)
 
#define NEXT_CNT_PER_TX_PKT(bds)
 
#define BDS_PER_TX_PKT   3
 
#define MAX_BDS_PER_TX_PKT   (MAX_SKB_FRAGS + BDS_PER_TX_PKT)
 
#define MAX_DESC_PER_TX_PKT
 
#define NUM_RX_RINGS   8
 
#define RX_DESC_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_rx_bd))
 
#define NEXT_PAGE_RX_DESC_CNT   2
 
#define MAX_RX_DESC_CNT   (RX_DESC_CNT - NEXT_PAGE_RX_DESC_CNT)
 
#define RX_DESC_MASK   (RX_DESC_CNT - 1)
 
#define NUM_RX_BD   (RX_DESC_CNT * NUM_RX_RINGS)
 
#define MAX_RX_BD   (NUM_RX_BD - 1)
 
#define MAX_RX_AVAIL   (MAX_RX_DESC_CNT * NUM_RX_RINGS - 2)
 
#define NUM_BD_REQ   BRB_SIZE(bp)
 
#define NUM_BD_PG_REQ
 
#define BD_TH_LO(bp)
 
#define BD_TH_HI(bp)   (BD_TH_LO(bp) + DROPLESS_FC_HEADROOM)
 
#define MIN_RX_AVAIL   ((bp)->dropless_fc ? BD_TH_HI(bp) + 128 : 128)
 
#define MIN_RX_SIZE_TPA_HW
 
#define MIN_RX_SIZE_NONTPA_HW   ETH_MIN_RX_CQES_WITHOUT_TPA
 
#define MIN_RX_SIZE_TPA   (max_t(u32, MIN_RX_SIZE_TPA_HW, MIN_RX_AVAIL))
 
#define MIN_RX_SIZE_NONTPA
 
#define NEXT_RX_IDX(x)
 
#define RX_BD(x)   ((x) & MAX_RX_BD)
 
#define CQE_BD_REL   (sizeof(union eth_rx_cqe) / sizeof(struct eth_rx_bd))
 
#define NUM_RCQ_RINGS   (NUM_RX_RINGS * CQE_BD_REL)
 
#define RCQ_DESC_CNT   (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe))
 
#define NEXT_PAGE_RCQ_DESC_CNT   1
 
#define MAX_RCQ_DESC_CNT   (RCQ_DESC_CNT - NEXT_PAGE_RCQ_DESC_CNT)
 
#define NUM_RCQ_BD   (RCQ_DESC_CNT * NUM_RCQ_RINGS)
 
#define MAX_RCQ_BD   (NUM_RCQ_BD - 1)
 
#define MAX_RCQ_AVAIL   (MAX_RCQ_DESC_CNT * NUM_RCQ_RINGS - 2)
 
#define NEXT_RCQ_IDX(x)
 
#define RCQ_BD(x)   ((x) & MAX_RCQ_BD)
 
#define NUM_RCQ_REQ   BRB_SIZE(bp)
 
#define NUM_RCQ_PG_REQ
 
#define RCQ_TH_LO(bp)
 
#define RCQ_TH_HI(bp)   (RCQ_TH_LO(bp) + DROPLESS_FC_HEADROOM)
 
#define SUB_S16(a, b)   (s16)((s16)(a) - (s16)(b))
 
#define SUB_S32(a, b)   (s32)((s32)(a) - (s32)(b))
 
#define BNX2X_SWCID_SHIFT   17
 
#define BNX2X_SWCID_MASK   ((0x1 << BNX2X_SWCID_SHIFT) - 1)
 
#define SW_CID(x)   (le32_to_cpu(x) & BNX2X_SWCID_MASK)
 
#define CQE_CMD(x)
 
#define BD_UNMAP_ADDR(bd)
 
#define BD_UNMAP_LEN(bd)   (le16_to_cpu((bd)->nbytes))
 
#define BNX2X_DB_MIN_SHIFT   3 /* 8 bytes */
 
#define BNX2X_DB_SHIFT   7 /* 128 bytes*/
 
#define DPM_TRIGER_TYPE   0x40
 
#define DOORBELL(bp, cid, val)
 
#define SKB_CS_OFF(skb)
 
#define SKB_CS(skb)
 
#define pbd_tcp_flags(skb)   (ntohl(tcp_flag_word(tcp_hdr(skb)))>>16 & 0xff)
 
#define XMIT_PLAIN   0
 
#define XMIT_CSUM_V4   0x1
 
#define XMIT_CSUM_V6   0x2
 
#define XMIT_CSUM_TCP   0x4
 
#define XMIT_GSO_V4   0x8
 
#define XMIT_GSO_V6   0x10
 
#define XMIT_CSUM   (XMIT_CSUM_V4 | XMIT_CSUM_V6)
 
#define XMIT_GSO   (XMIT_GSO_V4 | XMIT_GSO_V6)
 
#define CQE_TYPE(cqe_fp_flags)   ((cqe_fp_flags) & ETH_FAST_PATH_RX_CQE_TYPE)
 
#define CQE_TYPE_START(cqe_type)   ((cqe_type) == RX_ETH_CQE_TYPE_ETH_START_AGG)
 
#define CQE_TYPE_STOP(cqe_type)   ((cqe_type) == RX_ETH_CQE_TYPE_ETH_STOP_AGG)
 
#define CQE_TYPE_SLOW(cqe_type)   ((cqe_type) == RX_ETH_CQE_TYPE_ETH_RAMROD)
 
#define CQE_TYPE_FAST(cqe_type)   ((cqe_type) == RX_ETH_CQE_TYPE_ETH_FASTPATH)
 
#define ETH_RX_ERROR_FALGS   ETH_FAST_PATH_RX_CQE_PHY_DECODE_ERR_FLG
 
#define BNX2X_PRS_FLAG_OVERETH_IPV4(flags)
 
#define BNX2X_RX_SUM_FIX(cqe)   BNX2X_PRS_FLAG_OVERETH_IPV4(cqe->fast_path_cqe.pars_flags.flags)
 
#define FP_USB_FUNC_OFF   offsetof(struct cstorm_status_block_u, func)
 
#define FP_CSB_FUNC_OFF   offsetof(struct cstorm_status_block_c, func)
 
#define HC_INDEX_ETH_RX_CQ_CONS   1
 
#define HC_INDEX_OOO_TX_CQ_CONS   4
 
#define HC_INDEX_ETH_TX_CQ_CONS_COS0   5
 
#define HC_INDEX_ETH_TX_CQ_CONS_COS1   6
 
#define HC_INDEX_ETH_TX_CQ_CONS_COS2   7
 
#define HC_INDEX_ETH_FIRST_TX_CQ_CONS   HC_INDEX_ETH_TX_CQ_CONS_COS0
 
#define BNX2X_RX_SB_INDEX   (&fp->sb_index_values[HC_INDEX_ETH_RX_CQ_CONS])
 
#define BNX2X_TX_SB_INDEX_BASE   BNX2X_TX_SB_INDEX_COS0
 
#define BNX2X_TX_SB_INDEX_COS0   (&fp->sb_index_values[HC_INDEX_ETH_TX_CQ_CONS_COS0])
 
#define CHIP_ID(bp)   (bp->common.chip_id & 0xfffffff0)
 
#define CHIP_NUM(bp)   (bp->common.chip_id >> 16)
 
#define CHIP_NUM_57710   0x164e
 
#define CHIP_NUM_57711   0x164f
 
#define CHIP_NUM_57711E   0x1650
 
#define CHIP_NUM_57712   0x1662
 
#define CHIP_NUM_57712_MF   0x1663
 
#define CHIP_NUM_57713   0x1651
 
#define CHIP_NUM_57713E   0x1652
 
#define CHIP_NUM_57800   0x168a
 
#define CHIP_NUM_57800_MF   0x16a5
 
#define CHIP_NUM_57810   0x168e
 
#define CHIP_NUM_57810_MF   0x16ae
 
#define CHIP_NUM_57811   0x163d
 
#define CHIP_NUM_57811_MF   0x163e
 
#define CHIP_NUM_57840_OBSOLETE   0x168d
 
#define CHIP_NUM_57840_MF_OBSOLETE   0x16ab
 
#define CHIP_NUM_57840_4_10   0x16a1
 
#define CHIP_NUM_57840_2_20   0x16a2
 
#define CHIP_NUM_57840_MF   0x16a4
 
#define CHIP_IS_E1(bp)   (CHIP_NUM(bp) == CHIP_NUM_57710)
 
#define CHIP_IS_57711(bp)   (CHIP_NUM(bp) == CHIP_NUM_57711)
 
#define CHIP_IS_57711E(bp)   (CHIP_NUM(bp) == CHIP_NUM_57711E)
 
#define CHIP_IS_57712(bp)   (CHIP_NUM(bp) == CHIP_NUM_57712)
 
#define CHIP_IS_57712_MF(bp)   (CHIP_NUM(bp) == CHIP_NUM_57712_MF)
 
#define CHIP_IS_57800(bp)   (CHIP_NUM(bp) == CHIP_NUM_57800)
 
#define CHIP_IS_57800_MF(bp)   (CHIP_NUM(bp) == CHIP_NUM_57800_MF)
 
#define CHIP_IS_57810(bp)   (CHIP_NUM(bp) == CHIP_NUM_57810)
 
#define CHIP_IS_57810_MF(bp)   (CHIP_NUM(bp) == CHIP_NUM_57810_MF)
 
#define CHIP_IS_57811(bp)   (CHIP_NUM(bp) == CHIP_NUM_57811)
 
#define CHIP_IS_57811_MF(bp)   (CHIP_NUM(bp) == CHIP_NUM_57811_MF)
 
#define CHIP_IS_57840(bp)
 
#define CHIP_IS_57840_MF(bp)
 
#define CHIP_IS_E1H(bp)
 
#define CHIP_IS_E2(bp)
 
#define CHIP_IS_E3(bp)
 
#define CHIP_IS_E1x(bp)   (CHIP_IS_E1((bp)) || CHIP_IS_E1H((bp)))
 
#define USES_WARPCORE(bp)   (CHIP_IS_E3(bp))
 
#define IS_E1H_OFFSET   (!CHIP_IS_E1(bp))
 
#define CHIP_REV_SHIFT   12
 
#define CHIP_REV_MASK   (0xF << CHIP_REV_SHIFT)
 
#define CHIP_REV_VAL(bp)   (bp->common.chip_id & CHIP_REV_MASK)
 
#define CHIP_REV_Ax   (0x0 << CHIP_REV_SHIFT)
 
#define CHIP_REV_Bx   (0x1 << CHIP_REV_SHIFT)
 
#define CHIP_REV_IS_SLOW(bp)   (CHIP_REV_VAL(bp) > 0x00005000)
 
#define CHIP_REV_IS_EMUL(bp)
 
#define CHIP_REV_IS_FPGA(bp)
 
#define CHIP_TIME(bp)
 
#define CHIP_METAL(bp)   (bp->common.chip_id & 0x00000ff0)
 
#define CHIP_BOND_ID(bp)   (bp->common.chip_id & 0x0000000f)
 
#define CHIP_REV_SIM(bp)
 
#define CHIP_REV(bp)
 
#define CHIP_IS_E3B0(bp)
 
#define CHIP_IS_E3A0(bp)
 
#define BNX2X_NVRAM_1MB_SIZE   0x20000 /* 1M bit in bytes */
 
#define BNX2X_NVRAM_TIMEOUT_COUNT   30000
 
#define BNX2X_NVRAM_PAGE_SIZE   256
 
#define INT_BLOCK_HC   0
 
#define INT_BLOCK_IGU   1
 
#define INT_BLOCK_MODE_NORMAL   0
 
#define INT_BLOCK_MODE_BW_COMP   2
 
#define CHIP_INT_MODE_IS_NBC(bp)
 
#define CHIP_INT_MODE_IS_BC(bp)   (!CHIP_INT_MODE_IS_NBC(bp))
 
#define CHIP_4_PORT_MODE   0x0
 
#define CHIP_2_PORT_MODE   0x1
 
#define CHIP_PORT_MODE_NONE   0x2
 
#define CHIP_MODE(bp)   (bp->common.chip_port_mode)
 
#define CHIP_MODE_IS_4_PORT(bp)   (CHIP_MODE(bp) == CHIP_4_PORT_MODE)
 
#define BNX2X_IGU_STAS_MSG_VF_CNT   64
 
#define BNX2X_IGU_STAS_MSG_PF_CNT   4
 
#define SUPPORTED_2500baseX_Full   (1 << 15)
 
#define ADVERTISED_2500baseX_Full   (1 << 15)
 
#define STATS_OFFSET32(stat_name)   (offsetof(struct bnx2x_eth_stats, stat_name) / 4)
 
#define BNX2X_MAX_NUM_OF_VFS   64
 
#define BNX2X_VF_ID_INVALID   0xFF
 
#define FP_SB_MAX_E1x   16
 
#define FP_SB_MAX_E2   HC_SB_MAX_SB_E2
 
#define CDU_ILT_PAGE_SZ_HW   2
 
#define CDU_ILT_PAGE_SZ   (8192 << CDU_ILT_PAGE_SZ_HW) /* 32K */
 
#define ILT_PAGE_CIDS   (CDU_ILT_PAGE_SZ / sizeof(union cdu_context))
 
#define QM_ILT_PAGE_SZ_HW   0
 
#define QM_ILT_PAGE_SZ   (4096 << QM_ILT_PAGE_SZ_HW) /* 4K */
 
#define QM_CID_ROUND   1024
 
#define MAX_DMAE_C   8
 
#define bnx2x_sp(bp, var)   (&bp->slowpath->var)
 
#define bnx2x_sp_mapping(bp, var)   (bp->slowpath_mapping + offsetof(struct bnx2x_slowpath, var))
 
#define MAX_DYNAMIC_ATTN_GRPS   8
 
#define NUM_EQ_PAGES   1
 
#define EQ_DESC_CNT_PAGE   (BCM_PAGE_SIZE / sizeof(union event_ring_elem))
 
#define EQ_DESC_MAX_PAGE   (EQ_DESC_CNT_PAGE - 1)
 
#define NUM_EQ_DESC   (EQ_DESC_CNT_PAGE * NUM_EQ_PAGES)
 
#define EQ_DESC_MASK   (NUM_EQ_DESC - 1)
 
#define MAX_EQ_AVAIL   (EQ_DESC_MAX_PAGE * NUM_EQ_PAGES - 2)
 
#define NEXT_EQ_IDX(x)
 
#define EQ_DESC(x)   ((x) & EQ_DESC_MASK)
 
#define BNX2X_EQ_INDEX
 
#define BP_PATH(bp)   (CHIP_IS_E1x(bp) ? 0 : (bp->pf_num & 1))
 
#define BP_PORT(bp)   (bp->pfid & 1)
 
#define BP_FUNC(bp)   (bp->pfid)
 
#define BP_ABS_FUNC(bp)   (bp->pf_num)
 
#define BP_VN(bp)   ((bp)->pfid >> 1)
 
#define BP_MAX_VN_NUM(bp)   (CHIP_MODE_IS_4_PORT(bp) ? 2 : 4)
 
#define BP_L_ID(bp)   (BP_VN(bp) << 2)
 
#define BP_FW_MB_IDX_VN(bp, vn)
 
#define BP_FW_MB_IDX(bp)   BP_FW_MB_IDX_VN(bp, BP_VN(bp))
 
#define IRO   (bp->iro_arr)
 
#define ETH_OVREHEAD   (ETH_HLEN + 8 + 8)
 
#define ETH_MIN_PACKET_SIZE   60
 
#define ETH_MAX_PACKET_SIZE   1500
 
#define ETH_MAX_JUMBO_PACKET_SIZE   9600
 
#define ETH_MAX_TPA_HEADER_SIZE   72
 
#define BNX2X_RX_ALIGN_SHIFT   min(8, L1_CACHE_SHIFT)
 
#define BNX2X_FW_RX_ALIGN_START   (1UL << BNX2X_RX_ALIGN_SHIFT)
 
#define BNX2X_FW_RX_ALIGN_END
 
#define BNX2X_PXP_DRAM_ALIGN   (BNX2X_RX_ALIGN_SHIFT - 5)
 
#define DEF_SB_IGU_ID   16
 
#define DEF_SB_ID   HC_SP_SB_ID
 
#define PCIX_FLAG   (1 << 0)
 
#define PCI_32BIT_FLAG   (1 << 1)
 
#define ONE_PORT_FLAG   (1 << 2)
 
#define NO_WOL_FLAG   (1 << 3)
 
#define USING_DAC_FLAG   (1 << 4)
 
#define USING_MSIX_FLAG   (1 << 5)
 
#define USING_MSI_FLAG   (1 << 6)
 
#define DISABLE_MSI_FLAG   (1 << 7)
 
#define TPA_ENABLE_FLAG   (1 << 8)
 
#define NO_MCP_FLAG   (1 << 9)
 
#define BP_NOMCP(bp)   (bp->flags & NO_MCP_FLAG)
 
#define GRO_ENABLE_FLAG   (1 << 10)
 
#define MF_FUNC_DIS   (1 << 11)
 
#define OWN_CNIC_IRQ   (1 << 12)
 
#define NO_ISCSI_OOO_FLAG   (1 << 13)
 
#define NO_ISCSI_FLAG   (1 << 14)
 
#define NO_FCOE_FLAG   (1 << 15)
 
#define BC_SUPPORTS_PFC_STATS   (1 << 17)
 
#define BC_SUPPORTS_FCOE_FEATURES   (1 << 19)
 
#define USING_SINGLE_MSIX_FLAG   (1 << 20)
 
#define BC_SUPPORTS_DCBX_MSG_NON_PMF   (1 << 21)
 
#define NO_ISCSI(bp)   ((bp)->flags & NO_ISCSI_FLAG)
 
#define NO_ISCSI_OOO(bp)   ((bp)->flags & NO_ISCSI_OOO_FLAG)
 
#define NO_FCOE(bp)   ((bp)->flags & NO_FCOE_FLAG)
 
#define IS_MF(bp)   (bp->mf_mode != 0)
 
#define IS_MF_SI(bp)   (bp->mf_mode == MULTI_FUNCTION_SI)
 
#define IS_MF_SD(bp)   (bp->mf_mode == MULTI_FUNCTION_SD)
 
#define IS_MF_AFEX(bp)   (bp->mf_mode == MULTI_FUNCTION_AFEX)
 
#define BNX2X_MAX_COALESCE_TOUT   (0xf0*12)
 
#define BNX2X_STATE_CLOSED   0
 
#define BNX2X_STATE_OPENING_WAIT4_LOAD   0x1000
 
#define BNX2X_STATE_OPENING_WAIT4_PORT   0x2000
 
#define BNX2X_STATE_OPEN   0x3000
 
#define BNX2X_STATE_CLOSING_WAIT4_HALT   0x4000
 
#define BNX2X_STATE_CLOSING_WAIT4_DELETE   0x5000
 
#define BNX2X_STATE_DIAG   0xe000
 
#define BNX2X_STATE_ERROR   0xf000
 
#define BNX2X_MAX_PRIORITY   8
 
#define BNX2X_MAX_ENTRIES_PER_PRI   16
 
#define BNX2X_MAX_COS   3
 
#define BNX2X_MAX_TX_COS   2
 
#define BNX2X_RX_MODE_NONE   0
 
#define BNX2X_RX_MODE_NORMAL   1
 
#define BNX2X_RX_MODE_ALLMULTI   2
 
#define BNX2X_RX_MODE_PROMISC   3
 
#define BNX2X_MAX_MULTICAST   64
 
#define ILT_MAX_L2_LINES   8
 
#define BP_ILT(bp)   ((bp)->ilt)
 
#define ILT_MAX_LINES   256
 
#define BNX2X_MAX_RSS_COUNT(bp)   ((bp)->igu_sb_cnt - CNIC_PRESENT)
 
#define BNX2X_L2_CID_COUNT(bp)
 
#define BNX2X_L2_MAX_CID(bp)
 
#define L2_ILT_LINES(bp)
 
#define FW_BUF_SIZE   0x8000
 
#define GUNZIP_BUF(bp)   (bp->gunzip_buf)
 
#define GUNZIP_PHYS(bp)   (bp->gunzip_mapping)
 
#define GUNZIP_OUTLEN(bp)   (bp->gunzip_outlen)
 
#define INIT_MODE_FLAGS(bp)   (bp->init_mode_flags)
 
#define INIT_OPS(bp)   (bp->init_ops)
 
#define INIT_OPS_OFFSETS(bp)   (bp->init_ops_offsets)
 
#define INIT_DATA(bp)   (bp->init_data)
 
#define INIT_TSEM_INT_TABLE_DATA(bp)   (bp->tsem_int_table_data)
 
#define INIT_TSEM_PRAM_DATA(bp)   (bp->tsem_pram_data)
 
#define INIT_USEM_INT_TABLE_DATA(bp)   (bp->usem_int_table_data)
 
#define INIT_USEM_PRAM_DATA(bp)   (bp->usem_pram_data)
 
#define INIT_XSEM_INT_TABLE_DATA(bp)   (bp->xsem_int_table_data)
 
#define INIT_XSEM_PRAM_DATA(bp)   (bp->xsem_pram_data)
 
#define INIT_CSEM_INT_TABLE_DATA(bp)   (bp->csem_int_table_data)
 
#define INIT_CSEM_PRAM_DATA(bp)   (bp->csem_pram_data)
 
#define PHY_FW_VER_LEN   20
 
#define BNX2X_DCB_STATE_OFF   0
 
#define BNX2X_DCB_STATE_ON   1
 
#define BNX2X_DCBX_ENABLED_OFF   0
 
#define BNX2X_DCBX_ENABLED_ON_NEG_OFF   1
 
#define BNX2X_DCBX_ENABLED_ON_NEG_ON   2
 
#define BNX2X_DCBX_ENABLED_INVALID   (-1)
 
#define BNX2X_NUM_QUEUES(bp)   (bp->num_queues)
 
#define BNX2X_NUM_ETH_QUEUES(bp)   (BNX2X_NUM_QUEUES(bp) - NON_ETH_CONTEXT_USE)
 
#define BNX2X_NUM_NON_CNIC_QUEUES(bp)
 
#define BNX2X_NUM_RX_QUEUES(bp)   BNX2X_NUM_QUEUES(bp)
 
#define is_multi(bp)   (BNX2X_NUM_QUEUES(bp) > 1)
 
#define BNX2X_MAX_QUEUES(bp)   BNX2X_MAX_RSS_COUNT(bp)
 
#define RSS_IPV4_CAP_MASK   TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_CAPABILITY
 
#define RSS_IPV4_TCP_CAP_MASK   TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV4_TCP_CAPABILITY
 
#define RSS_IPV6_CAP_MASK   TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_CAPABILITY
 
#define RSS_IPV6_TCP_CAP_MASK   TSTORM_ETH_FUNCTION_COMMON_CONFIG_RSS_IPV6_TCP_CAPABILITY
 
#define FUNC_FLG_RSS   0x0001
 
#define FUNC_FLG_STATS   0x0002
 
#define FUNC_FLG_TPA   0x0008
 
#define FUNC_FLG_SPQ   0x0010
 
#define FUNC_FLG_LEADING   0x0020 /* PF only */
 
#define for_each_eth_queue(bp, var)   for ((var) = 0; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++)
 
#define for_each_nondefault_eth_queue(bp, var)   for ((var) = 1; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++)
 
#define for_each_queue(bp, var)
 
#define for_each_rx_queue(bp, var)
 
#define for_each_tx_queue(bp, var)
 
#define for_each_nondefault_queue(bp, var)
 
#define for_each_cos_in_tx_queue(fp, var)   for ((var) = 0; (var) < (fp)->max_cos; (var)++)
 
#define skip_rx_queue(bp, idx)   (NO_FCOE(bp) && IS_FCOE_IDX(idx))
 
#define skip_tx_queue(bp, idx)   (NO_FCOE(bp) && IS_FCOE_IDX(idx))
 
#define skip_queue(bp, idx)   (NO_FCOE(bp) && IS_FCOE_IDX(idx))
 
#define BNX2X_ILT_ZALLOC(x, y, size)
 
#define BNX2X_ILT_FREE(x, y, size)
 
#define ILOG2(x)   (ilog2((x)))
 
#define ILT_NUM_PAGE_ENTRIES   (3072)
 
#define ILT_PER_FUNC   (ILT_NUM_PAGE_ENTRIES/8)
 
#define FUNC_ILT_BASE(func)   (func * ILT_PER_FUNC)
 
#define ONCHIP_ADDR1(x)   ((u32)(((u64)x >> 12) & 0xFFFFFFFF))
 
#define ONCHIP_ADDR2(x)   ((u32)((1 << 20) | ((u64)x >> 44)))
 
#define LOAD_NORMAL   0
 
#define LOAD_OPEN   1
 
#define LOAD_DIAG   2
 
#define LOAD_LOOPBACK_EXT   3
 
#define UNLOAD_NORMAL   0
 
#define UNLOAD_CLOSE   1
 
#define UNLOAD_RECOVERY   2
 
#define DMAE_TIMEOUT   -1
 
#define DMAE_PCI_ERROR   -2 /* E2 and onward */
 
#define DMAE_NOT_RDY   -3
 
#define DMAE_PCI_ERR_FLAG   0x80000000
 
#define DMAE_SRC_PCI   0
 
#define DMAE_SRC_GRC   1
 
#define DMAE_DST_NONE   0
 
#define DMAE_DST_PCI   1
 
#define DMAE_DST_GRC   2
 
#define DMAE_COMP_PCI   0
 
#define DMAE_COMP_GRC   1
 
#define DMAE_COMP_REGULAR   0
 
#define DMAE_COM_SET_ERR   1
 
#define DMAE_CMD_SRC_PCI
 
#define DMAE_CMD_SRC_GRC
 
#define DMAE_CMD_DST_PCI
 
#define DMAE_CMD_DST_GRC
 
#define DMAE_CMD_C_DST_PCI
 
#define DMAE_CMD_C_DST_GRC
 
#define DMAE_CMD_C_ENABLE   DMAE_COMMAND_C_TYPE_ENABLE
 
#define DMAE_CMD_ENDIANITY_NO_SWAP   (0 << DMAE_COMMAND_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_B_SWAP   (1 << DMAE_COMMAND_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_DW_SWAP   (2 << DMAE_COMMAND_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_B_DW_SWAP   (3 << DMAE_COMMAND_ENDIANITY_SHIFT)
 
#define DMAE_CMD_PORT_0   0
 
#define DMAE_CMD_PORT_1   DMAE_COMMAND_PORT
 
#define DMAE_CMD_SRC_RESET   DMAE_COMMAND_SRC_RESET
 
#define DMAE_CMD_DST_RESET   DMAE_COMMAND_DST_RESET
 
#define DMAE_CMD_E1HVN_SHIFT   DMAE_COMMAND_E1HVN_SHIFT
 
#define DMAE_SRC_PF   0
 
#define DMAE_SRC_VF   1
 
#define DMAE_DST_PF   0
 
#define DMAE_DST_VF   1
 
#define DMAE_C_SRC   0
 
#define DMAE_C_DST   1
 
#define DMAE_LEN32_RD_MAX   0x80
 
#define DMAE_LEN32_WR_MAX(bp)   (CHIP_IS_E1(bp) ? 0x400 : 0x2000)
 
#define DMAE_COMP_VAL
 
#define MAX_DMAE_C_PER_PORT   8
 
#define INIT_DMAE_C(bp)
 
#define PMF_DMAE_C(bp)
 
#define PCICFG_LINK_WIDTH   0x1f00000
 
#define PCICFG_LINK_WIDTH_SHIFT   20
 
#define PCICFG_LINK_SPEED   0xf0000
 
#define PCICFG_LINK_SPEED_SHIFT   16
 
#define BNX2X_NUM_TESTS_SF   7
 
#define BNX2X_NUM_TESTS_MF   3
 
#define BNX2X_NUM_TESTS(bp)
 
#define BNX2X_PHY_LOOPBACK   0
 
#define BNX2X_MAC_LOOPBACK   1
 
#define BNX2X_EXT_LOOPBACK   2
 
#define BNX2X_PHY_LOOPBACK_FAILED   1
 
#define BNX2X_MAC_LOOPBACK_FAILED   2
 
#define BNX2X_EXT_LOOPBACK_FAILED   3
 
#define BNX2X_LOOPBACK_FAILED
 
#define STROM_ASSERT_ARRAY_SIZE   50
 
#define HW_CID(bp, x)
 
#define SP_DESC_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_spe))
 
#define MAX_SP_DESC_CNT   (SP_DESC_CNT - 1)
 
#define BNX2X_BTR   4
 
#define MAX_SPQ_PENDING   8
 
#define DEF_MIN_RATE   100
 
#define RS_PERIODIC_TIMEOUT_USEC   400
 
#define QM_ARB_BYTES   160000
 
#define MIN_RES   100
 
#define MIN_ABOVE_THRESH   32768
 
#define T_FAIR_COEF   ((MIN_ABOVE_THRESH + QM_ARB_BYTES) * 8 * MIN_RES)
 
#define FAIR_MEM   2
 
#define ATTN_NIG_FOR_FUNC   (1L << 8)
 
#define ATTN_SW_TIMER_4_FUNC   (1L << 9)
 
#define GPIO_2_FUNC   (1L << 10)
 
#define GPIO_3_FUNC   (1L << 11)
 
#define GPIO_4_FUNC   (1L << 12)
 
#define ATTN_GENERAL_ATTN_1   (1L << 13)
 
#define ATTN_GENERAL_ATTN_2   (1L << 14)
 
#define ATTN_GENERAL_ATTN_3   (1L << 15)
 
#define ATTN_GENERAL_ATTN_4   (1L << 13)
 
#define ATTN_GENERAL_ATTN_5   (1L << 14)
 
#define ATTN_GENERAL_ATTN_6   (1L << 15)
 
#define ATTN_HARD_WIRED_MASK   0xff00
 
#define ATTENTION_ID   4
 
#define BNX2X_PMF_LINK_ASSERT   GENERAL_ATTEN_OFFSET(LINK_SYNC_ATTENTION_BIT_FUNC_0 + BP_FUNC(bp))
 
#define BNX2X_MC_ASSERT_BITS
 
#define BNX2X_MCP_ASSERT   GENERAL_ATTEN_OFFSET(MCP_FATAL_ASSERT_ATTENTION_BIT)
 
#define BNX2X_GRC_TIMEOUT   GENERAL_ATTEN_OFFSET(LATCHED_ATTN_TIMEOUT_GRC)
 
#define BNX2X_GRC_RSV
 
#define HW_INTERRUT_ASSERT_SET_0
 
#define HW_PRTY_ASSERT_SET_0
 
#define HW_INTERRUT_ASSERT_SET_1
 
#define HW_PRTY_ASSERT_SET_1
 
#define HW_INTERRUT_ASSERT_SET_2
 
#define HW_PRTY_ASSERT_SET_2
 
#define HW_PRTY_ASSERT_SET_3
 
#define HW_PRTY_ASSERT_SET_4
 
#define MULTI_MASK   0x7f
 
#define DEF_USB_FUNC_OFF   offsetof(struct cstorm_def_status_block_u, func)
 
#define DEF_CSB_FUNC_OFF   offsetof(struct cstorm_def_status_block_c, func)
 
#define DEF_XSB_FUNC_OFF   offsetof(struct xstorm_def_status_block, func)
 
#define DEF_TSB_FUNC_OFF   offsetof(struct tstorm_def_status_block, func)
 
#define DEF_USB_IGU_INDEX_OFF   offsetof(struct cstorm_def_status_block_u, igu_index)
 
#define DEF_CSB_IGU_INDEX_OFF   offsetof(struct cstorm_def_status_block_c, igu_index)
 
#define DEF_XSB_IGU_INDEX_OFF   offsetof(struct xstorm_def_status_block, igu_index)
 
#define DEF_TSB_IGU_INDEX_OFF   offsetof(struct tstorm_def_status_block, igu_index)
 
#define DEF_USB_SEGMENT_OFF   offsetof(struct cstorm_def_status_block_u, segment)
 
#define DEF_CSB_SEGMENT_OFF   offsetof(struct cstorm_def_status_block_c, segment)
 
#define DEF_XSB_SEGMENT_OFF   offsetof(struct xstorm_def_status_block, segment)
 
#define DEF_TSB_SEGMENT_OFF   offsetof(struct tstorm_def_status_block, segment)
 
#define BNX2X_SP_DSB_INDEX
 
#define SET_FLAG(value, mask, flag)
 
#define GET_FLAG(value, mask)   (((value) & (mask)) >> (mask##_SHIFT))
 
#define GET_FIELD(value, fname)   (((value) & (fname##_MASK)) >> (fname##_SHIFT))
 
#define CAM_IS_INVALID(x)
 
#define MC_HASH_SIZE   8
 
#define MC_HASH_OFFSET(bp, i)
 
#define PXP2_REG_PXP2_INT_STS   PXP2_REG_PXP2_INT_STS_0
 
#define BNX2X_VPD_LEN   128
 
#define VENDOR_ID_LEN   4
 
#define CMNG_FNS_NONE   0
 
#define CMNG_FNS_MINMAX   1
 
#define HC_SEG_ACCESS_DEF   0 /*Driver decision 0-3*/
 
#define HC_SEG_ACCESS_ATTN   4
 
#define HC_SEG_ACCESS_NORM   0 /*Driver decision 0-1*/
 
#define BNX2X_MF_SD_PROTOCOL(bp)   ((bp)->mf_config[BP_VN(bp)] & FUNC_MF_CFG_PROTOCOL_MASK)
 
#define IS_MF_FCOE_AFEX(bp)   false
 

Enumerations

enum  { BNX2X_ISCSI_ETH_CL_ID_IDX, BNX2X_FCOE_ETH_CL_ID_IDX, BNX2X_MAX_CNIC_ETH_CL_ID_IDX }
 
enum  { FCOE_TXQ_IDX_OFFSET, FWD_TXQ_IDX_OFFSET, OOO_TXQ_IDX_OFFSET }
 
enum  bnx2x_tpa_mode_t { TPA_MODE_LRO, TPA_MODE_GRO }
 
enum  bnx2x_recovery_state {
  BNX2X_RECOVERY_DONE, BNX2X_RECOVERY_INIT, BNX2X_RECOVERY_WAIT, BNX2X_RECOVERY_FAILED,
  BNX2X_RECOVERY_NIC_LOADING
}
 
enum  { BNX2X_LINK_REPORT_FD, BNX2X_LINK_REPORT_LINK_DOWN, BNX2X_LINK_REPORT_RX_FC_ON, BNX2X_LINK_REPORT_TX_FC_ON }
 
enum  { BNX2X_PORT_QUERY_IDX, BNX2X_PF_QUERY_IDX, BNX2X_FCOE_QUERY_IDX, BNX2X_FIRST_QUEUE_QUERY_IDX }
 
enum  { BNX2X_SP_RTNL_SETUP_TC, BNX2X_SP_RTNL_TX_TIMEOUT, BNX2X_SP_RTNL_AFEX_F_UPDATE, BNX2X_SP_RTNL_FAN_FAILURE }
 

Functions

int bnx2x_set_mac_one (struct bnx2x *bp, u8 *mac, struct bnx2x_vlan_mac_obj *obj, bool set, int mac_type, unsigned long *ramrod_flags)
 
int bnx2x_del_all_macs (struct bnx2x *bp, struct bnx2x_vlan_mac_obj *mac_obj, int mac_type, bool wait_for_comp)
 
void bnx2x_func_init (struct bnx2x *bp, struct bnx2x_func_init_params *p)
 
int bnx2x_get_gpio (struct bnx2x *bp, int gpio_num, u8 port)
 
int bnx2x_set_gpio (struct bnx2x *bp, int gpio_num, u32 mode, u8 port)
 
int bnx2x_set_mult_gpio (struct bnx2x *bp, u8 pins, u32 mode)
 
int bnx2x_set_gpio_int (struct bnx2x *bp, int gpio_num, u32 mode, u8 port)
 
void bnx2x_read_mf_cfg (struct bnx2x *bp)
 
void bnx2x_read_dmae (struct bnx2x *bp, u32 src_addr, u32 len32)
 
void bnx2x_write_dmae (struct bnx2x *bp, dma_addr_t dma_addr, u32 dst_addr, u32 len32)
 
void bnx2x_post_dmae (struct bnx2x *bp, struct dmae_command *dmae, int idx)
 
u32 bnx2x_dmae_opcode_add_comp (u32 opcode, u8 comp_type)
 
u32 bnx2x_dmae_opcode_clr_src_reset (u32 opcode)
 
u32 bnx2x_dmae_opcode (struct bnx2x *bp, u8 src_type, u8 dst_type, bool with_comp, u8 comp_type)
 
void bnx2x_calc_fc_adv (struct bnx2x *bp)
 
int bnx2x_sp_post (struct bnx2x *bp, int command, int cid, u32 data_hi, u32 data_lo, int cmd_type)
 
void bnx2x_update_coalesce (struct bnx2x *bp)
 
int bnx2x_get_cur_phy_idx (struct bnx2x *bp)
 
void bnx2x_set_ethtool_ops (struct net_device *netdev)
 
void bnx2x_notify_link_changed (struct bnx2x *bp)
 

Variables

struct workqueue_structbnx2x_wq
 
int num_queues
 

Macro Definition Documentation

#define __BIT_VEC64_CLEAR_BIT (   el,
  bit 
)
Value:
do { \
el = ((el) & (~((u64)0x1 << (bit)))); \
} while (0)

Definition at line 399 of file bnx2x.h.

#define __BIT_VEC64_SET_BIT (   el,
  bit 
)
Value:
do { \
el = ((el) | ((u64)0x1 << (bit))); \
} while (0)

Definition at line 394 of file bnx2x.h.

#define ADVERTISED_2500baseX_Full   (1 << 15)

Definition at line 943 of file bnx2x.h.

#define AEU_IN_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR   AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR

Definition at line 269 of file bnx2x.h.

#define ATTENTION_ID   4

Definition at line 2007 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_1   (1L << 13)

Definition at line 1999 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_2   (1L << 14)

Definition at line 2000 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_3   (1L << 15)

Definition at line 2001 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_4   (1L << 13)

Definition at line 2002 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_5   (1L << 14)

Definition at line 2003 of file bnx2x.h.

#define ATTN_GENERAL_ATTN_6   (1L << 15)

Definition at line 2004 of file bnx2x.h.

#define ATTN_HARD_WIRED_MASK   0xff00

Definition at line 2006 of file bnx2x.h.

#define ATTN_NIG_FOR_FUNC   (1L << 8)

Definition at line 1994 of file bnx2x.h.

#define ATTN_SW_TIMER_4_FUNC   (1L << 9)

Definition at line 1995 of file bnx2x.h.

#define BC_SUPPORTS_DCBX_MSG_NON_PMF   (1 << 21)

Definition at line 1347 of file bnx2x.h.

#define BC_SUPPORTS_FCOE_FEATURES   (1 << 19)

Definition at line 1345 of file bnx2x.h.

#define BC_SUPPORTS_PFC_STATS   (1 << 17)

Definition at line 1344 of file bnx2x.h.

#define BCM_PAGE_ALIGN (   addr)    (((addr) + BCM_PAGE_SIZE - 1) & BCM_PAGE_MASK)

Definition at line 346 of file bnx2x.h.

#define BCM_PAGE_MASK   (~(BCM_PAGE_SIZE - 1))

Definition at line 345 of file bnx2x.h.

#define BCM_PAGE_SHIFT   12

Definition at line 343 of file bnx2x.h.

#define BCM_PAGE_SIZE   (1 << BCM_PAGE_SHIFT)

Definition at line 344 of file bnx2x.h.

#define BD_TH_HI (   bp)    (BD_TH_LO(bp) + DROPLESS_FC_HEADROOM)

Definition at line 655 of file bnx2x.h.

#define BD_TH_LO (   bp)
Value:
NUM_BD_PG_REQ * NEXT_PAGE_RX_DESC_CNT + \
FW_DROP_LEVEL(bp))

Definition at line 652 of file bnx2x.h.

#define BD_UNMAP_ADDR (   bd)
Value:
HILO_U64(le32_to_cpu((bd)->addr_hi), \
le32_to_cpu((bd)->addr_lo))

Definition at line 719 of file bnx2x.h.

#define BD_UNMAP_LEN (   bd)    (le16_to_cpu((bd)->nbytes))

Definition at line 721 of file bnx2x.h.

#define BDS_PER_TX_PKT   3

Definition at line 627 of file bnx2x.h.

#define BIT_VEC64_CLEAR_BIT (   vec64,
  idx 
)
Value:

Definition at line 409 of file bnx2x.h.

#define BIT_VEC64_ELEM_MASK   ((u64)BIT_VEC64_ELEM_SZ - 1)

Definition at line 391 of file bnx2x.h.

#define BIT_VEC64_ELEM_ONE_MASK   ((u64)(~0))

Definition at line 421 of file bnx2x.h.

#define BIT_VEC64_ELEM_SHIFT   6

Definition at line 390 of file bnx2x.h.

#define BIT_VEC64_ELEM_SZ   64

Definition at line 389 of file bnx2x.h.

#define BIT_VEC64_ONES_MASK (   idx)    (((u64)0x1 << (((idx) & BIT_VEC64_ELEM_MASK) + 1)) - 1)

Definition at line 419 of file bnx2x.h.

#define BIT_VEC64_SET_BIT (   vec64,
  idx 
)
Value:

Definition at line 405 of file bnx2x.h.

#define BIT_VEC64_TEST_BIT (   vec64,
  idx 
)
Value:
(((vec64)[(idx) >> BIT_VEC64_ELEM_SHIFT] >> \
((idx) & BIT_VEC64_ELEM_MASK)) & 0x1)

Definition at line 413 of file bnx2x.h.

#define BNX2X_BC_VER   0x040200

Definition at line 28 of file bnx2x.h.

#define BNX2X_BTR   4

Definition at line 1972 of file bnx2x.h.

#define BNX2X_CNIC_START_ETH_CID (   bp)
Value:
(bp)->max_cos)

Definition at line 252 of file bnx2x.h.

#define BNX2X_DB_MIN_SHIFT   3 /* 8 bytes */

Definition at line 723 of file bnx2x.h.

#define BNX2X_DB_SHIFT   7 /* 128 bytes*/

Definition at line 724 of file bnx2x.h.

#define BNX2X_DBG_ERR (   fmt,
  ... 
)
Value:
do { \
pr_err("[%s:%d(%s)]" fmt, \
__func__, __LINE__, \
bp->dev ? (bp->dev->name) : "?", \
##__VA_ARGS__); \
} while (0)

Definition at line 95 of file bnx2x.h.

#define BNX2X_DCB_STATE_OFF   0

Definition at line 1591 of file bnx2x.h.

#define BNX2X_DCB_STATE_ON   1

Definition at line 1592 of file bnx2x.h.

#define BNX2X_DCBX_ENABLED_INVALID   (-1)

Definition at line 1599 of file bnx2x.h.

#define BNX2X_DCBX_ENABLED_OFF   0

Definition at line 1596 of file bnx2x.h.

#define BNX2X_DCBX_ENABLED_ON_NEG_OFF   1

Definition at line 1597 of file bnx2x.h.

#define BNX2X_DCBX_ENABLED_ON_NEG_ON   2

Definition at line 1598 of file bnx2x.h.

#define BNX2X_DEV_INFO (   fmt,
  ... 
)
Value:
do { \
dev_info(&bp->pdev->dev, fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 118 of file bnx2x.h.

#define BNX2X_EQ_INDEX
Value:
(&bp->def_status_blk->sp_sb.\ index_values[HC_SP_INDEX_EQ_CONS])

Definition at line 1149 of file bnx2x.h.

#define BNX2X_ERR (   fmt,
  ... 
)
Value:
do { \
pr_err("[%s:%d(%s)]" fmt, \
__func__, __LINE__, \
bp->dev ? (bp->dev->name) : "?", \
##__VA_ARGS__); \
} while (0)

Definition at line 105 of file bnx2x.h.

#define BNX2X_ERROR (   fmt,
  ... 
)    pr_err("[%s:%d]" fmt, __func__, __LINE__, ##__VA_ARGS__)

Definition at line 113 of file bnx2x.h.

#define BNX2X_EXT_LOOPBACK   2

Definition at line 1952 of file bnx2x.h.

#define BNX2X_EXT_LOOPBACK_FAILED   3

Definition at line 1955 of file bnx2x.h.

#define bnx2x_fcoe (   bp,
  var 
)    (bnx2x_fcoe_fp(bp)->var)

Definition at line 580 of file bnx2x.h.

#define BNX2X_FCOE_ETH_CID (   bp)    (BNX2X_CNIC_START_ETH_CID(bp) + 1)

Definition at line 257 of file bnx2x.h.

#define bnx2x_fcoe_fp (   bp)    (&bp->fp[FCOE_IDX(bp)])

Definition at line 579 of file bnx2x.h.

#define bnx2x_fcoe_inner_sp_obj (   bp)    (&bp->sp_objs[FCOE_IDX(bp)])

Definition at line 581 of file bnx2x.h.

#define BNX2X_FCOE_L2_RX_INDEX
Value:
(&bp->def_status_blk->sp_sb.\ index_values[HC_SP_INDEX_ETH_FCOE_RX_CQ_CONS])

Definition at line 230 of file bnx2x.h.

#define BNX2X_FCOE_L2_TX_INDEX
Value:
(&bp->def_status_blk->sp_sb.\ index_values[HC_SP_INDEX_ETH_FCOE_TX_CQ_CONS])

Definition at line 234 of file bnx2x.h.

#define BNX2X_FCOE_MINI_JUMBO_MTU   2500

Definition at line 573 of file bnx2x.h.

#define bnx2x_fcoe_sp_obj (   bp,
  var 
)    (bnx2x_fcoe_inner_sp_obj(bp)->var)

Definition at line 582 of file bnx2x.h.

#define bnx2x_fcoe_tx (   bp,
  var 
)
Value:
(bnx2x_fcoe_fp(bp)-> \
txdata_ptr[FIRST_TX_COS_INDEX] \
->var)

Definition at line 583 of file bnx2x.h.

#define bnx2x_fp (   bp,
  nr,
  var 
)    ((bp)->fp[(nr)].var)

Definition at line 567 of file bnx2x.h.

#define bnx2x_fp_qstats (   bp,
  fp 
)    (&((bp)->fp_stats[(fp)->index].eth_q_stats))

Definition at line 570 of file bnx2x.h.

#define bnx2x_fp_stats (   bp,
  fp 
)    (&((bp)->fp_stats[(fp)->index]))

Definition at line 569 of file bnx2x.h.

#define BNX2X_FW_RX_ALIGN_END
Value:

Definition at line 1280 of file bnx2x.h.

#define BNX2X_FW_RX_ALIGN_START   (1UL << BNX2X_RX_ALIGN_SHIFT)

Definition at line 1278 of file bnx2x.h.

#define BNX2X_GRC_RSV
Value:
GENERAL_ATTEN_OFFSET(LATCHED_ATTN_RBCT) | \
GENERAL_ATTEN_OFFSET(LATCHED_ATTN_RBCN) | \
GENERAL_ATTEN_OFFSET(LATCHED_ATTN_RBCU) | \
GENERAL_ATTEN_OFFSET(LATCHED_ATTN_RBCP) | \
GENERAL_ATTEN_OFFSET(LATCHED_ATTN_RSVD_GRC))

Definition at line 2025 of file bnx2x.h.

#define BNX2X_GRC_TIMEOUT   GENERAL_ATTEN_OFFSET(LATCHED_ATTN_TIMEOUT_GRC)

Definition at line 2024 of file bnx2x.h.

#define BNX2X_IGU_STAS_MSG_PF_CNT   4

Definition at line 926 of file bnx2x.h.

#define BNX2X_IGU_STAS_MSG_VF_CNT   64

Definition at line 925 of file bnx2x.h.

#define BNX2X_ILT_FREE (   x,
  y,
  size 
)
Value:
do { \
if (x) { \
dma_free_coherent(&bp->pdev->dev, size, x, y); \
x = NULL; \
y = 0; \
} \
} while (0)

Definition at line 1831 of file bnx2x.h.

#define BNX2X_ILT_ZALLOC (   x,
  y,
  size 
)
Value:
do { \
x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
if (x) \
memset(x, 0, size); \
} while (0)

Definition at line 1824 of file bnx2x.h.

#define BNX2X_ISCSI_ETH_CID (   bp)    (BNX2X_CNIC_START_ETH_CID(bp))

Definition at line 255 of file bnx2x.h.

#define BNX2X_L2_CID_COUNT (   bp)
Value:

Definition at line 1487 of file bnx2x.h.

#define BNX2X_L2_MAX_CID (   bp)
Value:

Definition at line 1489 of file bnx2x.h.

#define BNX2X_LOOPBACK_FAILED
Value:
BNX2X_PHY_LOOPBACK_FAILED)

Definition at line 1956 of file bnx2x.h.

#define BNX2X_MAC_LOOPBACK   1

Definition at line 1951 of file bnx2x.h.

#define BNX2X_MAC_LOOPBACK_FAILED   2

Definition at line 1954 of file bnx2x.h.

#define BNX2X_MAX_COALESCE_TOUT   (0xf0*12)

Definition at line 1403 of file bnx2x.h.

#define BNX2X_MAX_COS   3

Definition at line 1420 of file bnx2x.h.

#define BNX2X_MAX_ENTRIES_PER_PRI   16

Definition at line 1419 of file bnx2x.h.

#define BNX2X_MAX_MULTICAST   64

Definition at line 1431 of file bnx2x.h.

#define BNX2X_MAX_NUM_OF_VFS   64

Definition at line 966 of file bnx2x.h.

#define BNX2X_MAX_PRIORITY   8

Definition at line 1418 of file bnx2x.h.

#define BNX2X_MAX_QUEUES (   bp)    BNX2X_MAX_RSS_COUNT(bp)

Definition at line 1657 of file bnx2x.h.

#define BNX2X_MAX_RSS_COUNT (   bp)    ((bp)->igu_sb_cnt - CNIC_PRESENT)

Definition at line 1481 of file bnx2x.h.

#define BNX2X_MAX_TX_COS   2

Definition at line 1421 of file bnx2x.h.

#define bnx2x_mc_addr (   ha)    ((ha)->addr)

Definition at line 142 of file bnx2x.h.

#define BNX2X_MC_ASSERT_BITS
Value:

Definition at line 2015 of file bnx2x.h.

#define BNX2X_MCP_ASSERT   GENERAL_ATTEN_OFFSET(MCP_FATAL_ASSERT_ATTENTION_BIT)

Definition at line 2021 of file bnx2x.h.

#define BNX2X_MF_SD_PROTOCOL (   bp)    ((bp)->mf_config[BP_VN(bp)] & FUNC_MF_CFG_PROTOCOL_MASK)

Definition at line 2178 of file bnx2x.h.

#define BNX2X_MIN_MSIX_VEC_CNT   2

Definition at line 46 of file bnx2x.h.

#define BNX2X_MSG_DCB   0x8000000

Definition at line 76 of file bnx2x.h.

#define BNX2X_MSG_DMAE   0x0080000 /* was: NETIF_MSG_HW */

Definition at line 70 of file bnx2x.h.

#define BNX2X_MSG_ETHTOOL   0x4000000

Definition at line 75 of file bnx2x.h.

#define BNX2X_MSG_FP   0x0200000 /* was: NETIF_MSG_INTR */

Definition at line 72 of file bnx2x.h.

#define BNX2X_MSG_IDLE   0x2000000 /* used for idle check*/

Definition at line 74 of file bnx2x.h.

#define BNX2X_MSG_IOV   0x0800000

Definition at line 73 of file bnx2x.h.

#define BNX2X_MSG_MCP   0x0010000 /* was: NETIF_MSG_HW */

Definition at line 67 of file bnx2x.h.

#define BNX2X_MSG_NVM   0x0040000 /* was: NETIF_MSG_HW */

Definition at line 69 of file bnx2x.h.

#define BNX2X_MSG_OFF   0x0

Definition at line 66 of file bnx2x.h.

#define BNX2X_MSG_SP   0x0100000 /* was: NETIF_MSG_INTR */

Definition at line 71 of file bnx2x.h.

#define BNX2X_MSG_STATS   0x0020000 /* was: NETIF_MSG_TIMER */

Definition at line 68 of file bnx2x.h.

#define BNX2X_MSIX_VEC_FP_START   1

Definition at line 47 of file bnx2x.h.

#define BNX2X_NAPI_WEIGHT   128

Definition at line 498 of file bnx2x.h.

#define BNX2X_NUM_ETH_QUEUES (   bp)    (BNX2X_NUM_QUEUES(bp) - NON_ETH_CONTEXT_USE)

Definition at line 1650 of file bnx2x.h.

#define BNX2X_NUM_NON_CNIC_QUEUES (   bp)
Value:
NON_ETH_CONTEXT_USE)

Definition at line 1651 of file bnx2x.h.

#define BNX2X_NUM_QUEUES (   bp)    (bp->num_queues)

Definition at line 1649 of file bnx2x.h.

#define BNX2X_NUM_RX_QUEUES (   bp)    BNX2X_NUM_QUEUES(bp)

Definition at line 1653 of file bnx2x.h.

#define BNX2X_NUM_TESTS (   bp)
Value:
BNX2X_NUM_TESTS_SF)

Definition at line 1947 of file bnx2x.h.

#define BNX2X_NUM_TESTS_MF   3

Definition at line 1946 of file bnx2x.h.

#define BNX2X_NUM_TESTS_SF   7

Definition at line 1945 of file bnx2x.h.

#define BNX2X_NVRAM_1MB_SIZE   0x20000 /* 1M bit in bytes */

Definition at line 891 of file bnx2x.h.

#define BNX2X_NVRAM_PAGE_SIZE   256

Definition at line 893 of file bnx2x.h.

#define BNX2X_NVRAM_TIMEOUT_COUNT   30000

Definition at line 892 of file bnx2x.h.

#define bnx2x_panic ( )
Value:
do { \
bp->panic = 1; \
BNX2X_ERR("driver assert\n"); \
bnx2x_panic_dump(bp); \
} while (0)

Definition at line 134 of file bnx2x.h.

#define BNX2X_PHY_LOOPBACK   0

Definition at line 1950 of file bnx2x.h.

#define BNX2X_PHY_LOOPBACK_FAILED   1

Definition at line 1953 of file bnx2x.h.

#define BNX2X_PMF_LINK_ASSERT   GENERAL_ATTEN_OFFSET(LINK_SYNC_ATTENTION_BIT_FUNC_0 + BP_FUNC(bp))

Definition at line 2012 of file bnx2x.h.

#define BNX2X_PRS_FLAG_OVERETH_IPV4 (   flags)
Value:
PARSING_FLAGS_OVER_ETHERNET_PROTOCOL) >> \

Definition at line 764 of file bnx2x.h.

#define BNX2X_PXP_DRAM_ALIGN   (BNX2X_RX_ALIGN_SHIFT - 5)

Definition at line 1284 of file bnx2x.h.

#define BNX2X_RX_ALIGN_SHIFT   min(8, L1_CACHE_SHIFT)

Definition at line 1270 of file bnx2x.h.

#define BNX2X_RX_MODE_ALLMULTI   2

Definition at line 1429 of file bnx2x.h.

#define BNX2X_RX_MODE_NONE   0

Definition at line 1427 of file bnx2x.h.

#define BNX2X_RX_MODE_NORMAL   1

Definition at line 1428 of file bnx2x.h.

#define BNX2X_RX_MODE_PROMISC   3

Definition at line 1430 of file bnx2x.h.

#define BNX2X_RX_SB_INDEX   (&fp->sb_index_values[HC_INDEX_ETH_RX_CQ_CONS])

Definition at line 790 of file bnx2x.h.

#define BNX2X_RX_SUM_FIX (   cqe)    BNX2X_PRS_FLAG_OVERETH_IPV4(cqe->fast_path_cqe.pars_flags.flags)

Definition at line 769 of file bnx2x.h.

#define bnx2x_sp (   bp,
  var 
)    (&bp->slowpath->var)

Definition at line 1093 of file bnx2x.h.

#define BNX2X_SP_DSB_INDEX
Value:
(&bp->def_status_blk->sp_sb.\ index_values[HC_SP_INDEX_ETH_DEF_CONS])

Definition at line 2121 of file bnx2x.h.

#define bnx2x_sp_mapping (   bp,
  var 
)    (bp->slowpath_mapping + offsetof(struct bnx2x_slowpath, var))

Definition at line 1094 of file bnx2x.h.

#define bnx2x_sp_obj (   bp,
  fp 
)    ((bp)->sp_objs[(fp)->index])

Definition at line 568 of file bnx2x.h.

#define BNX2X_STATE_CLOSED   0

Definition at line 1408 of file bnx2x.h.

#define BNX2X_STATE_CLOSING_WAIT4_DELETE   0x5000

Definition at line 1413 of file bnx2x.h.

#define BNX2X_STATE_CLOSING_WAIT4_HALT   0x4000

Definition at line 1412 of file bnx2x.h.

#define BNX2X_STATE_DIAG   0xe000

Definition at line 1415 of file bnx2x.h.

#define BNX2X_STATE_ERROR   0xf000

Definition at line 1416 of file bnx2x.h.

#define BNX2X_STATE_OPEN   0x3000

Definition at line 1411 of file bnx2x.h.

#define BNX2X_STATE_OPENING_WAIT4_LOAD   0x1000

Definition at line 1409 of file bnx2x.h.

#define BNX2X_STATE_OPENING_WAIT4_PORT   0x2000

Definition at line 1410 of file bnx2x.h.

#define BNX2X_SWCID_MASK   ((0x1 << BNX2X_SWCID_SHIFT) - 1)

Definition at line 712 of file bnx2x.h.

#define BNX2X_SWCID_SHIFT   17

Definition at line 711 of file bnx2x.h.

#define BNX2X_TPA_ERROR   3

Definition at line 451 of file bnx2x.h.

#define BNX2X_TPA_START   1

Definition at line 449 of file bnx2x.h.

#define BNX2X_TPA_STOP   2

Definition at line 450 of file bnx2x.h.

#define BNX2X_TSO_SPLIT_BD   (1<<0)

Definition at line 320 of file bnx2x.h.

#define BNX2X_TX_SB_INDEX_BASE   BNX2X_TX_SB_INDEX_COS0

Definition at line 793 of file bnx2x.h.

#define BNX2X_TX_SB_INDEX_COS0   (&fp->sb_index_values[HC_INDEX_ETH_TX_CQ_CONS_COS0])

Definition at line 795 of file bnx2x.h.

#define bnx2x_uc_addr (   ha)    ((ha)->addr)

Definition at line 143 of file bnx2x.h.

#define BNX2X_VF_ID_INVALID   0xFF

Definition at line 967 of file bnx2x.h.

#define BNX2X_VPD_LEN   128

Definition at line 2156 of file bnx2x.h.

#define BP_ABS_FUNC (   bp)    (bp->pf_num)

Definition at line 1241 of file bnx2x.h.

#define BP_FUNC (   bp)    (bp->pfid)

Definition at line 1240 of file bnx2x.h.

#define BP_FW_MB_IDX (   bp)    BP_FW_MB_IDX_VN(bp, BP_VN(bp))

Definition at line 1247 of file bnx2x.h.

#define BP_FW_MB_IDX_VN (   bp,
  vn 
)
Value:
(BP_PORT(bp) +\
(vn) * ((CHIP_IS_E1x(bp) || (CHIP_MODE_IS_4_PORT(bp))) ? 2 : 1))

Definition at line 1245 of file bnx2x.h.

#define BP_ILT (   bp)    ((bp)->ilt)

Definition at line 1475 of file bnx2x.h.

#define BP_L_ID (   bp)    (BP_VN(bp) << 2)

Definition at line 1244 of file bnx2x.h.

#define BP_MAX_VN_NUM (   bp)    (CHIP_MODE_IS_4_PORT(bp) ? 2 : 4)

Definition at line 1243 of file bnx2x.h.

#define BP_NOMCP (   bp)    (bp->flags & NO_MCP_FLAG)

Definition at line 1337 of file bnx2x.h.

#define BP_PATH (   bp)    (CHIP_IS_E1x(bp) ? 0 : (bp->pf_num & 1))

Definition at line 1238 of file bnx2x.h.

#define BP_PORT (   bp)    (bp->pfid & 1)

Definition at line 1239 of file bnx2x.h.

#define BP_VN (   bp)    ((bp)->pfid >> 1)

Definition at line 1242 of file bnx2x.h.

#define BRB_SIZE (   bp)    (CHIP_IS_E3(bp) ? 1024 : 512)

Definition at line 334 of file bnx2x.h.

#define CAM_IS_INVALID (   x)
Value:

Definition at line 2137 of file bnx2x.h.

#define CDU_ILT_PAGE_SZ   (8192 << CDU_ILT_PAGE_SZ_HW) /* 32K */

Definition at line 1003 of file bnx2x.h.

#define CDU_ILT_PAGE_SZ_HW   2

Definition at line 1002 of file bnx2x.h.

#define CHIP_2_PORT_MODE   0x1

Definition at line 916 of file bnx2x.h.

#define CHIP_4_PORT_MODE   0x0

Definition at line 915 of file bnx2x.h.

#define CHIP_BOND_ID (   bp)    (bp->common.chip_id & 0x0000000f)

Definition at line 878 of file bnx2x.h.

#define CHIP_ID (   bp)    (bp->common.chip_id & 0xfffffff0)

Definition at line 806 of file bnx2x.h.

#define CHIP_INT_MODE_IS_BC (   bp)    (!CHIP_INT_MODE_IS_NBC(bp))

Definition at line 912 of file bnx2x.h.

#define CHIP_INT_MODE_IS_NBC (   bp)
Value:
(!CHIP_IS_E1x(bp) && \
!((bp)->common.int_block & INT_BLOCK_MODE_BW_COMP))

Definition at line 909 of file bnx2x.h.

#define CHIP_IS_57711 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57711)

Definition at line 828 of file bnx2x.h.

#define CHIP_IS_57711E (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57711E)

Definition at line 829 of file bnx2x.h.

#define CHIP_IS_57712 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57712)

Definition at line 830 of file bnx2x.h.

#define CHIP_IS_57712_MF (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57712_MF)

Definition at line 831 of file bnx2x.h.

#define CHIP_IS_57800 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57800)

Definition at line 832 of file bnx2x.h.

#define CHIP_IS_57800_MF (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57800_MF)

Definition at line 833 of file bnx2x.h.

#define CHIP_IS_57810 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57810)

Definition at line 834 of file bnx2x.h.

#define CHIP_IS_57810_MF (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57810_MF)

Definition at line 835 of file bnx2x.h.

#define CHIP_IS_57811 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57811)

Definition at line 836 of file bnx2x.h.

#define CHIP_IS_57811_MF (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57811_MF)

Definition at line 837 of file bnx2x.h.

#define CHIP_IS_57840 (   bp)
Value:

Definition at line 838 of file bnx2x.h.

#define CHIP_IS_57840_MF (   bp)
Value:

Definition at line 842 of file bnx2x.h.

#define CHIP_IS_E1 (   bp)    (CHIP_NUM(bp) == CHIP_NUM_57710)

Definition at line 827 of file bnx2x.h.

#define CHIP_IS_E1H (   bp)
Value:
(CHIP_IS_57711(bp) || \
CHIP_IS_57711E(bp))

Definition at line 844 of file bnx2x.h.

#define CHIP_IS_E1x (   bp)    (CHIP_IS_E1((bp)) || CHIP_IS_E1H((bp)))

Definition at line 856 of file bnx2x.h.

#define CHIP_IS_E2 (   bp)
Value:
(CHIP_IS_57712(bp) || \
CHIP_IS_57712_MF(bp))

Definition at line 846 of file bnx2x.h.

#define CHIP_IS_E3 (   bp)
Value:
(CHIP_IS_57800(bp) || \
CHIP_IS_57800_MF(bp) || \
CHIP_IS_57810(bp) || \
CHIP_IS_57810_MF(bp) || \
CHIP_IS_57811(bp) || \
CHIP_IS_57811_MF(bp) || \
CHIP_IS_57840(bp) || \
CHIP_IS_57840_MF(bp))

Definition at line 848 of file bnx2x.h.

#define CHIP_IS_E3A0 (   bp)
Value:
(CHIP_IS_E3(bp) && \

Definition at line 887 of file bnx2x.h.

#define CHIP_IS_E3B0 (   bp)
Value:
(CHIP_IS_E3(bp) && \

Definition at line 885 of file bnx2x.h.

#define CHIP_METAL (   bp)    (bp->common.chip_id & 0x00000ff0)

Definition at line 877 of file bnx2x.h.

#define CHIP_MODE (   bp)    (bp->common.chip_port_mode)

Definition at line 918 of file bnx2x.h.

#define CHIP_MODE_IS_4_PORT (   bp)    (CHIP_MODE(bp) == CHIP_4_PORT_MODE)

Definition at line 919 of file bnx2x.h.

#define CHIP_NUM (   bp)    (bp->common.chip_id >> 16)

Definition at line 808 of file bnx2x.h.

#define CHIP_NUM_57710   0x164e

Definition at line 809 of file bnx2x.h.

#define CHIP_NUM_57711   0x164f

Definition at line 810 of file bnx2x.h.

#define CHIP_NUM_57711E   0x1650

Definition at line 811 of file bnx2x.h.

#define CHIP_NUM_57712   0x1662

Definition at line 812 of file bnx2x.h.

#define CHIP_NUM_57712_MF   0x1663

Definition at line 813 of file bnx2x.h.

#define CHIP_NUM_57713   0x1651

Definition at line 814 of file bnx2x.h.

#define CHIP_NUM_57713E   0x1652

Definition at line 815 of file bnx2x.h.

#define CHIP_NUM_57800   0x168a

Definition at line 816 of file bnx2x.h.

#define CHIP_NUM_57800_MF   0x16a5

Definition at line 817 of file bnx2x.h.

#define CHIP_NUM_57810   0x168e

Definition at line 818 of file bnx2x.h.

#define CHIP_NUM_57810_MF   0x16ae

Definition at line 819 of file bnx2x.h.

#define CHIP_NUM_57811   0x163d

Definition at line 820 of file bnx2x.h.

#define CHIP_NUM_57811_MF   0x163e

Definition at line 821 of file bnx2x.h.

#define CHIP_NUM_57840_2_20   0x16a2

Definition at line 825 of file bnx2x.h.

#define CHIP_NUM_57840_4_10   0x16a1

Definition at line 824 of file bnx2x.h.

#define CHIP_NUM_57840_MF   0x16a4

Definition at line 826 of file bnx2x.h.

#define CHIP_NUM_57840_MF_OBSOLETE   0x16ab

Definition at line 823 of file bnx2x.h.

#define CHIP_NUM_57840_OBSOLETE   0x168d

Definition at line 822 of file bnx2x.h.

#define CHIP_PORT_MODE_NONE   0x2

Definition at line 917 of file bnx2x.h.

#define CHIP_REV (   bp)
Value:
CHIP_REV_SIM(bp) :\

Definition at line 882 of file bnx2x.h.

#define CHIP_REV_Ax   (0x0 << CHIP_REV_SHIFT)

Definition at line 863 of file bnx2x.h.

#define CHIP_REV_Bx   (0x1 << CHIP_REV_SHIFT)

Definition at line 864 of file bnx2x.h.

#define CHIP_REV_IS_EMUL (   bp)
Value:
((CHIP_REV_IS_SLOW(bp)) && \
!(CHIP_REV_VAL(bp) & 0x00001000))

Definition at line 868 of file bnx2x.h.

#define CHIP_REV_IS_FPGA (   bp)
Value:
((CHIP_REV_IS_SLOW(bp)) && \
(CHIP_REV_VAL(bp) & 0x00001000))

Definition at line 871 of file bnx2x.h.

#define CHIP_REV_IS_SLOW (   bp)    (CHIP_REV_VAL(bp) > 0x00005000)

Definition at line 866 of file bnx2x.h.

#define CHIP_REV_MASK   (0xF << CHIP_REV_SHIFT)

Definition at line 861 of file bnx2x.h.

#define CHIP_REV_SHIFT   12

Definition at line 860 of file bnx2x.h.

#define CHIP_REV_SIM (   bp)
Value:

Definition at line 879 of file bnx2x.h.

#define CHIP_REV_VAL (   bp)    (bp->common.chip_id & CHIP_REV_MASK)

Definition at line 862 of file bnx2x.h.

#define CHIP_TIME (   bp)
Value:
((CHIP_REV_IS_EMUL(bp)) ? 2000 : \
((CHIP_REV_IS_FPGA(bp)) ? 200 : 1))

Definition at line 874 of file bnx2x.h.

#define CID_COS_TO_TX_ONLY_CID (   cid,
  cos,
  bp 
)    (cid + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp))

Definition at line 281 of file bnx2x.h.

#define CID_TO_FP (   cid,
  bp 
)    ((cid) % BNX2X_NUM_NON_CNIC_QUEUES(bp))

Definition at line 280 of file bnx2x.h.

#define CMNG_FNS_MINMAX   1

Definition at line 2161 of file bnx2x.h.

#define CMNG_FNS_NONE   0

Definition at line 2160 of file bnx2x.h.

#define CNIC_PRESENT   0

Additional rings budgeting

Definition at line 264 of file bnx2x.h.

#define CQE_BD_REL   (sizeof(union eth_rx_cqe) / sizeof(struct eth_rx_bd))

Definition at line 677 of file bnx2x.h.

#define CQE_CMD (   x)
Value:
(le32_to_cpu(x) >> \
COMMON_RAMROD_ETH_RX_CQE_CMD_ID_SHIFT)

Definition at line 716 of file bnx2x.h.

#define CQE_TYPE (   cqe_fp_flags)    ((cqe_fp_flags) & ETH_FAST_PATH_RX_CQE_TYPE)

Definition at line 756 of file bnx2x.h.

#define CQE_TYPE_FAST (   cqe_type)    ((cqe_type) == RX_ETH_CQE_TYPE_ETH_FASTPATH)

Definition at line 760 of file bnx2x.h.

#define CQE_TYPE_SLOW (   cqe_type)    ((cqe_type) == RX_ETH_CQE_TYPE_ETH_RAMROD)

Definition at line 759 of file bnx2x.h.

#define CQE_TYPE_START (   cqe_type)    ((cqe_type) == RX_ETH_CQE_TYPE_ETH_START_AGG)

Definition at line 757 of file bnx2x.h.

#define CQE_TYPE_STOP (   cqe_type)    ((cqe_type) == RX_ETH_CQE_TYPE_ETH_STOP_AGG)

Definition at line 758 of file bnx2x.h.

#define DEF_CSB_FUNC_OFF   offsetof(struct cstorm_def_status_block_c, func)

Definition at line 2099 of file bnx2x.h.

#define DEF_CSB_IGU_INDEX_OFF   offsetof(struct cstorm_def_status_block_c, igu_index)

Definition at line 2105 of file bnx2x.h.

#define DEF_CSB_SEGMENT_OFF   offsetof(struct cstorm_def_status_block_c, segment)

Definition at line 2114 of file bnx2x.h.

#define DEF_MIN_RATE   100

Definition at line 1977 of file bnx2x.h.

#define DEF_SB_ID   HC_SP_SB_ID

Definition at line 1288 of file bnx2x.h.

#define DEF_SB_IGU_ID   16

Definition at line 1287 of file bnx2x.h.

#define DEF_TSB_FUNC_OFF   offsetof(struct tstorm_def_status_block, func)

Definition at line 2101 of file bnx2x.h.

#define DEF_TSB_IGU_INDEX_OFF   offsetof(struct tstorm_def_status_block, igu_index)

Definition at line 2109 of file bnx2x.h.

#define DEF_TSB_SEGMENT_OFF   offsetof(struct tstorm_def_status_block, segment)

Definition at line 2118 of file bnx2x.h.

#define DEF_USB_FUNC_OFF   offsetof(struct cstorm_def_status_block_u, func)

Definition at line 2098 of file bnx2x.h.

#define DEF_USB_IGU_INDEX_OFF   offsetof(struct cstorm_def_status_block_u, igu_index)

Definition at line 2103 of file bnx2x.h.

#define DEF_USB_SEGMENT_OFF   offsetof(struct cstorm_def_status_block_u, segment)

Definition at line 2112 of file bnx2x.h.

#define DEF_XSB_FUNC_OFF   offsetof(struct xstorm_def_status_block, func)

Definition at line 2100 of file bnx2x.h.

#define DEF_XSB_IGU_INDEX_OFF   offsetof(struct xstorm_def_status_block, igu_index)

Definition at line 2107 of file bnx2x.h.

#define DEF_XSB_SEGMENT_OFF   offsetof(struct xstorm_def_status_block, segment)

Definition at line 2116 of file bnx2x.h.

#define DISABLE_MSI_FLAG   (1 << 7)

Definition at line 1333 of file bnx2x.h.

#define DMAE_C_DST   1

Definition at line 1926 of file bnx2x.h.

#define DMAE_C_SRC   0

Definition at line 1925 of file bnx2x.h.

#define DMAE_CMD_C_DST_GRC
Value:
DMAE_COMMAND_C_DST_SHIFT)

Definition at line 1902 of file bnx2x.h.

#define DMAE_CMD_C_DST_PCI
Value:
DMAE_COMMAND_C_DST_SHIFT)

Definition at line 1900 of file bnx2x.h.

#define DMAE_CMD_C_ENABLE   DMAE_COMMAND_C_TYPE_ENABLE

Definition at line 1905 of file bnx2x.h.

#define DMAE_CMD_DST_GRC
Value:
DMAE_COMMAND_DST_SHIFT)

Definition at line 1897 of file bnx2x.h.

#define DMAE_CMD_DST_PCI
Value:
DMAE_COMMAND_DST_SHIFT)

Definition at line 1895 of file bnx2x.h.

#define DMAE_CMD_DST_RESET   DMAE_COMMAND_DST_RESET

Definition at line 1916 of file bnx2x.h.

#define DMAE_CMD_E1HVN_SHIFT   DMAE_COMMAND_E1HVN_SHIFT

Definition at line 1917 of file bnx2x.h.

#define DMAE_CMD_ENDIANITY_B_DW_SWAP   (3 << DMAE_COMMAND_ENDIANITY_SHIFT)

Definition at line 1910 of file bnx2x.h.

#define DMAE_CMD_ENDIANITY_B_SWAP   (1 << DMAE_COMMAND_ENDIANITY_SHIFT)

Definition at line 1908 of file bnx2x.h.

#define DMAE_CMD_ENDIANITY_DW_SWAP   (2 << DMAE_COMMAND_ENDIANITY_SHIFT)

Definition at line 1909 of file bnx2x.h.

#define DMAE_CMD_ENDIANITY_NO_SWAP   (0 << DMAE_COMMAND_ENDIANITY_SHIFT)

Definition at line 1907 of file bnx2x.h.

#define DMAE_CMD_PORT_0   0

Definition at line 1912 of file bnx2x.h.

#define DMAE_CMD_PORT_1   DMAE_COMMAND_PORT

Definition at line 1913 of file bnx2x.h.

#define DMAE_CMD_SRC_GRC
Value:
DMAE_COMMAND_SRC_SHIFT)

Definition at line 1892 of file bnx2x.h.

#define DMAE_CMD_SRC_PCI
Value:
DMAE_COMMAND_SRC_SHIFT)

Definition at line 1890 of file bnx2x.h.

#define DMAE_CMD_SRC_RESET   DMAE_COMMAND_SRC_RESET

Definition at line 1915 of file bnx2x.h.

#define DMAE_COM_SET_ERR   1

Definition at line 1888 of file bnx2x.h.

#define DMAE_COMP_GRC   1

Definition at line 1883 of file bnx2x.h.

#define DMAE_COMP_PCI   0

Definition at line 1882 of file bnx2x.h.

#define DMAE_COMP_REGULAR   0

Definition at line 1887 of file bnx2x.h.

#define DMAE_COMP_VAL
Value:
0x60d0d0ae /* E2 and on - upper bit
indicates eror */

Definition at line 1931 of file bnx2x.h.

#define DMAE_DST_GRC   2

Definition at line 1880 of file bnx2x.h.

#define DMAE_DST_NONE   0

Definition at line 1878 of file bnx2x.h.

#define DMAE_DST_PCI   1

Definition at line 1879 of file bnx2x.h.

#define DMAE_DST_PF   0

Definition at line 1922 of file bnx2x.h.

#define DMAE_DST_VF   1

Definition at line 1923 of file bnx2x.h.

#define DMAE_LEN32_RD_MAX   0x80

Definition at line 1928 of file bnx2x.h.

#define DMAE_LEN32_WR_MAX (   bp)    (CHIP_IS_E1(bp) ? 0x400 : 0x2000)

Definition at line 1929 of file bnx2x.h.

#define DMAE_NOT_RDY   -3

Definition at line 1872 of file bnx2x.h.

#define DMAE_PCI_ERR_FLAG   0x80000000

Definition at line 1873 of file bnx2x.h.

#define DMAE_PCI_ERROR   -2 /* E2 and onward */

Definition at line 1871 of file bnx2x.h.

#define DMAE_SRC_GRC   1

Definition at line 1876 of file bnx2x.h.

#define DMAE_SRC_PCI   0

Definition at line 1875 of file bnx2x.h.

#define DMAE_SRC_PF   0

Definition at line 1919 of file bnx2x.h.

#define DMAE_SRC_VF   1

Definition at line 1920 of file bnx2x.h.

#define DMAE_TIMEOUT   -1

Definition at line 1870 of file bnx2x.h.

#define DOORBELL (   bp,
  cid,
  val 
)
Value:
do { \
writel((u32)(val), bp->doorbells + (bp->db_size * (cid)) + \
} while (0)

Definition at line 729 of file bnx2x.h.

#define DP (   __mask,
  fmt,
  ... 
)
Value:
do { \
if (unlikely(bp->msg_enable & (__mask))) \
pr_notice("[%s:%d(%s)]" fmt, \
__func__, __LINE__, \
bp->dev ? (bp->dev->name) : "?", \
##__VA_ARGS__); \
} while (0)

Definition at line 79 of file bnx2x.h.

#define DP_CONT (   __mask,
  fmt,
  ... 
)
Value:
do { \
if (unlikely(bp->msg_enable & (__mask))) \
pr_cont(fmt, ##__VA_ARGS__); \
} while (0)

Definition at line 88 of file bnx2x.h.

#define DPM_TRIGER_TYPE   0x40

Definition at line 728 of file bnx2x.h.

#define DROPLESS_FC_HEADROOM   100

Definition at line 340 of file bnx2x.h.

#define DRV_MODULE_NAME   "bnx2x"

Definition at line 63 of file bnx2x.h.

#define DRV_MODULE_RELDATE   "2012/09/27"

Definition at line 27 of file bnx2x.h.

#define DRV_MODULE_VERSION   "1.78.00-0"

Definition at line 26 of file bnx2x.h.

#define EMAC_RD (   bp,
  reg 
)    REG_RD(bp, emac_base + reg)

Definition at line 208 of file bnx2x.h.

#define EMAC_WR (   bp,
  reg,
  val 
)    REG_WR(bp, emac_base + reg, val)

Definition at line 209 of file bnx2x.h.

#define EQ_DESC (   x)    ((x) & EQ_DESC_MASK)

Definition at line 1147 of file bnx2x.h.

#define EQ_DESC_CNT_PAGE   (BCM_PAGE_SIZE / sizeof(union event_ring_elem))

Definition at line 1136 of file bnx2x.h.

#define EQ_DESC_MASK   (NUM_EQ_DESC - 1)

Definition at line 1139 of file bnx2x.h.

#define EQ_DESC_MAX_PAGE   (EQ_DESC_CNT_PAGE - 1)

Definition at line 1137 of file bnx2x.h.

#define ETH_MAX_JUMBO_PACKET_SIZE   9600

Definition at line 1265 of file bnx2x.h.

#define ETH_MAX_PACKET_SIZE   1500

Definition at line 1264 of file bnx2x.h.

#define ETH_MAX_TPA_HEADER_SIZE   72

Definition at line 1267 of file bnx2x.h.

#define ETH_MIN_PACKET_SIZE   60

Definition at line 1263 of file bnx2x.h.

#define ETH_OVREHEAD   (ETH_HLEN + 8 + 8)

Definition at line 1262 of file bnx2x.h.

#define ETH_RX_ERROR_FALGS   ETH_FAST_PATH_RX_CQE_PHY_DECODE_ERR_FLG

Definition at line 762 of file bnx2x.h.

#define FAIR_MEM   2

Definition at line 1991 of file bnx2x.h.

#define FCOE_IDX (   bp)
Value:
FCOE_IDX_OFFSET)

Definition at line 577 of file bnx2x.h.

#define FCOE_IDX_OFFSET   0

Definition at line 575 of file bnx2x.h.

#define FCOE_PRESENT   0

Definition at line 265 of file bnx2x.h.

#define FIRST_TX_COS_INDEX   0

Definition at line 277 of file bnx2x.h.

#define FIRST_TX_ONLY_COS_INDEX   1

Definition at line 276 of file bnx2x.h.

#define for_each_cos_in_tx_queue (   fp,
  var 
)    for ((var) = 0; (var) < (fp)->max_cos; (var)++)

Definition at line 1724 of file bnx2x.h.

#define for_each_eth_queue (   bp,
  var 
)    for ((var) = 0; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++)

Definition at line 1692 of file bnx2x.h.

#define for_each_nondefault_eth_queue (   bp,
  var 
)    for ((var) = 1; (var) < BNX2X_NUM_ETH_QUEUES(bp); (var)++)

Definition at line 1695 of file bnx2x.h.

#define for_each_nondefault_queue (   bp,
  var 
)
Value:
for ((var) = 1; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
if (skip_queue(bp, var)) \
continue; \
else

Definition at line 1718 of file bnx2x.h.

#define for_each_queue (   bp,
  var 
)
Value:
for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
if (skip_queue(bp, var)) \
continue; \
else

Definition at line 1698 of file bnx2x.h.

#define for_each_rx_queue (   bp,
  var 
)
Value:
for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
if (skip_rx_queue(bp, var)) \
continue; \
else

Definition at line 1705 of file bnx2x.h.

#define for_each_tx_queue (   bp,
  var 
)
Value:
for ((var) = 0; (var) < BNX2X_NUM_QUEUES(bp); (var)++) \
if (skip_tx_queue(bp, var)) \
continue; \
else

Definition at line 1712 of file bnx2x.h.

#define FP_COS_TO_TXQ (   fp,
  cos,
  bp 
)    ((fp)->index + cos * BNX2X_NUM_NON_CNIC_QUEUES(bp))

Definition at line 285 of file bnx2x.h.

#define FP_CSB_FUNC_OFF   offsetof(struct cstorm_status_block_c, func)

Definition at line 775 of file bnx2x.h.

#define FP_NAME_SIZE   (sizeof(((struct net_device *)0)->name) + 8)

Definition at line 563 of file bnx2x.h.

#define FP_SB_MAX_E1x   16

Definition at line 992 of file bnx2x.h.

#define FP_SB_MAX_E2   HC_SB_MAX_SB_E2

Definition at line 994 of file bnx2x.h.

#define FP_USB_FUNC_OFF   offsetof(struct cstorm_status_block_u, func)

Definition at line 773 of file bnx2x.h.

#define FUNC_FLG_LEADING   0x0020 /* PF only */

Definition at line 1678 of file bnx2x.h.

#define FUNC_FLG_RSS   0x0001

Definition at line 1673 of file bnx2x.h.

#define FUNC_FLG_SPQ   0x0010

Definition at line 1677 of file bnx2x.h.

#define FUNC_FLG_STATS   0x0002

Definition at line 1674 of file bnx2x.h.

#define FUNC_FLG_TPA   0x0008

Definition at line 1676 of file bnx2x.h.

#define FUNC_ILT_BASE (   func)    (func * ILT_PER_FUNC)

Definition at line 1849 of file bnx2x.h.

#define FW_BUF_SIZE   0x8000

Definition at line 1552 of file bnx2x.h.

#define FW_DROP_LEVEL (   bp)    (3 + MAX_SPQ_PENDING + MAX_AGG_QS(bp))

Definition at line 338 of file bnx2x.h.

#define FW_PREFETCH_CNT   16

Definition at line 339 of file bnx2x.h.

#define GET_FIELD (   value,
  fname 
)    (((value) & (fname##_MASK)) >> (fname##_SHIFT))

Definition at line 2134 of file bnx2x.h.

#define GET_FLAG (   value,
  mask 
)    (((value) & (mask)) >> (mask##_SHIFT))

Definition at line 2131 of file bnx2x.h.

#define GPIO_2_FUNC   (1L << 10)

Definition at line 1996 of file bnx2x.h.

#define GPIO_3_FUNC   (1L << 11)

Definition at line 1997 of file bnx2x.h.

#define GPIO_4_FUNC   (1L << 12)

Definition at line 1998 of file bnx2x.h.

#define GRO_ENABLE_FLAG   (1 << 10)

Definition at line 1338 of file bnx2x.h.

#define GUNZIP_BUF (   bp)    (bp->gunzip_buf)

Definition at line 1553 of file bnx2x.h.

#define GUNZIP_OUTLEN (   bp)    (bp->gunzip_outlen)

Definition at line 1555 of file bnx2x.h.

#define GUNZIP_PHYS (   bp)    (bp->gunzip_mapping)

Definition at line 1554 of file bnx2x.h.

#define HC_INDEX_ETH_FIRST_TX_CQ_CONS   HC_INDEX_ETH_TX_CQ_CONS_COS0

Definition at line 788 of file bnx2x.h.

#define HC_INDEX_ETH_RX_CQ_CONS   1

Definition at line 778 of file bnx2x.h.

#define HC_INDEX_ETH_TX_CQ_CONS_COS0   5

Definition at line 782 of file bnx2x.h.

#define HC_INDEX_ETH_TX_CQ_CONS_COS1   6

Definition at line 784 of file bnx2x.h.

#define HC_INDEX_ETH_TX_CQ_CONS_COS2   7

Definition at line 786 of file bnx2x.h.

#define HC_INDEX_OOO_TX_CQ_CONS   4

Definition at line 780 of file bnx2x.h.

#define HC_SEG_ACCESS_ATTN   4

Definition at line 2164 of file bnx2x.h.

#define HC_SEG_ACCESS_DEF   0 /*Driver decision 0-3*/

Definition at line 2163 of file bnx2x.h.

#define HC_SEG_ACCESS_NORM   0 /*Driver decision 0-1*/

Definition at line 2165 of file bnx2x.h.

#define HC_SP_INDEX_EQ_CONS   7

Definition at line 217 of file bnx2x.h.

#define HC_SP_INDEX_ETH_DEF_CONS   3

Definition at line 214 of file bnx2x.h.

#define HC_SP_INDEX_ETH_FCOE_RX_CQ_CONS   4

Definition at line 221 of file bnx2x.h.

#define HC_SP_INDEX_ETH_FCOE_TX_CQ_CONS   6

Definition at line 220 of file bnx2x.h.

#define HC_SP_INDEX_ETH_ISCSI_CQ_CONS   5

Definition at line 223 of file bnx2x.h.

#define HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS   1

Definition at line 224 of file bnx2x.h.

#define HILO_U64 (   hi,
  lo 
)    ((((u64)(hi)) << 32) + (lo))

Definition at line 147 of file bnx2x.h.

#define HW_CID (   bp,
  x 
)
Value:
((BP_PORT(bp) << 23) | \
(BP_VN(bp) << BNX2X_SWCID_SHIFT) | \
(x))

Definition at line 1964 of file bnx2x.h.

#define HW_INTERRUT_ASSERT_SET_0
Value:
AEU_INPUTS_ATTN_BITS_TCM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_TSEMI_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_PBCLIENT_HW_INTERRUPT)

Definition at line 2032 of file bnx2x.h.

#define HW_INTERRUT_ASSERT_SET_1
Value:
AEU_INPUTS_ATTN_BITS_TIMERS_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_XSDM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_XCM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_XSEMI_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_USDM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_UCM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_USEMI_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_UPB_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_CSDM_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_CCM_HW_INTERRUPT)

Definition at line 2044 of file bnx2x.h.

#define HW_INTERRUT_ASSERT_SET_2
Value:
AEU_INPUTS_ATTN_BITS_CDU_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_DMAE_HW_INTERRUPT | \
AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_HW_INTERRUPT |\
AEU_INPUTS_ATTN_BITS_MISC_HW_INTERRUPT)

Definition at line 2072 of file bnx2x.h.

#define HW_PRTY_ASSERT_SET_0
Value:
AEU_INPUTS_ATTN_BITS_PARSER_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_TSDM_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_SEARCHER_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_TSEMI_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_TCM_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_PBCLIENT_PARITY_ERROR)

Definition at line 2037 of file bnx2x.h.

#define HW_PRTY_ASSERT_SET_1
Value:
AEU_INPUTS_ATTN_BITS_QM_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_TIMERS_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_XSDM_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_XCM_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_XSEMI_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_DOORBELLQ_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_NIG_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_VAUX_PCI_CORE_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_DEBUG_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_USDM_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_UCM_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_USEMI_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_UPB_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_CSDM_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_CCM_PARITY_ERROR)

Definition at line 2056 of file bnx2x.h.

#define HW_PRTY_ASSERT_SET_2
Value:
AEU_INPUTS_ATTN_BITS_PXP_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_CFC_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_CDU_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_DMAE_PARITY_ERROR |\
AEU_INPUTS_ATTN_BITS_IGU_PARITY_ERROR | \
AEU_INPUTS_ATTN_BITS_MISC_PARITY_ERROR)

Definition at line 2078 of file bnx2x.h.

#define HW_PRTY_ASSERT_SET_3
Value:
AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_RX_PARITY | \
AEU_INPUTS_ATTN_BITS_MCP_LATCHED_UMP_TX_PARITY | \
AEU_INPUTS_ATTN_BITS_MCP_LATCHED_SCPAD_PARITY)

Definition at line 2087 of file bnx2x.h.

#define HW_PRTY_ASSERT_SET_4
Value:
AEU_INPUTS_ATTN_BITS_ATC_PARITY_ERROR)

Definition at line 2092 of file bnx2x.h.

#define ILOG2 (   x)    (ilog2((x)))

Definition at line 1840 of file bnx2x.h.

#define ILT_MAX_L2_LINES   8

Definition at line 1471 of file bnx2x.h.

#define ILT_MAX_LINES   256

Definition at line 1476 of file bnx2x.h.

#define ILT_NUM_PAGE_ENTRIES   (3072)

Definition at line 1842 of file bnx2x.h.

#define ILT_PAGE_CIDS   (CDU_ILT_PAGE_SZ / sizeof(union cdu_context))

Definition at line 1004 of file bnx2x.h.

#define ILT_PER_FUNC   (ILT_NUM_PAGE_ENTRIES/8)

Definition at line 1847 of file bnx2x.h.

#define INIT_CSEM_INT_TABLE_DATA (   bp)    (bp->csem_int_table_data)

Definition at line 1582 of file bnx2x.h.

#define INIT_CSEM_PRAM_DATA (   bp)    (bp->csem_pram_data)

Definition at line 1583 of file bnx2x.h.

#define INIT_DATA (   bp)    (bp->init_data)

Definition at line 1575 of file bnx2x.h.

#define INIT_DMAE_C (   bp)
Value:
BP_VN(bp))

Definition at line 1934 of file bnx2x.h.

#define INIT_MODE_FLAGS (   bp)    (bp->init_mode_flags)

Definition at line 1563 of file bnx2x.h.

#define INIT_OPS (   bp)    (bp->init_ops)

Definition at line 1573 of file bnx2x.h.

#define INIT_OPS_OFFSETS (   bp)    (bp->init_ops_offsets)

Definition at line 1574 of file bnx2x.h.

#define INIT_TSEM_INT_TABLE_DATA (   bp)    (bp->tsem_int_table_data)

Definition at line 1576 of file bnx2x.h.

#define INIT_TSEM_PRAM_DATA (   bp)    (bp->tsem_pram_data)

Definition at line 1577 of file bnx2x.h.

#define INIT_USEM_INT_TABLE_DATA (   bp)    (bp->usem_int_table_data)

Definition at line 1578 of file bnx2x.h.

#define INIT_USEM_PRAM_DATA (   bp)    (bp->usem_pram_data)

Definition at line 1579 of file bnx2x.h.

#define INIT_XSEM_INT_TABLE_DATA (   bp)    (bp->xsem_int_table_data)

Definition at line 1580 of file bnx2x.h.

#define INIT_XSEM_PRAM_DATA (   bp)    (bp->xsem_pram_data)

Definition at line 1581 of file bnx2x.h.

#define INT_BLOCK_HC   0

Definition at line 905 of file bnx2x.h.

#define INT_BLOCK_IGU   1

Definition at line 906 of file bnx2x.h.

#define INT_BLOCK_MODE_BW_COMP   2

Definition at line 908 of file bnx2x.h.

#define INT_BLOCK_MODE_NORMAL   0

Definition at line 907 of file bnx2x.h.

#define IRO   (bp->iro_arr)

Definition at line 1253 of file bnx2x.h.

#define IS_E1H_OFFSET   (!CHIP_IS_E1(bp))

Definition at line 858 of file bnx2x.h.

#define IS_ETH_FP (   fp)
Value:
(fp->index < \
BNX2X_NUM_ETH_QUEUES(fp->bp))

Definition at line 588 of file bnx2x.h.

#define IS_FCOE_FP (   fp)    false

Definition at line 594 of file bnx2x.h.

#define IS_FCOE_IDX (   idx)    false

Definition at line 595 of file bnx2x.h.

#define IS_MF (   bp)    (bp->mf_mode != 0)

Definition at line 1384 of file bnx2x.h.

#define IS_MF_AFEX (   bp)    (bp->mf_mode == MULTI_FUNCTION_AFEX)

Definition at line 1387 of file bnx2x.h.

#define IS_MF_FCOE_AFEX (   bp)    false

Definition at line 2199 of file bnx2x.h.

#define IS_MF_SD (   bp)    (bp->mf_mode == MULTI_FUNCTION_SD)

Definition at line 1386 of file bnx2x.h.

#define IS_MF_SI (   bp)    (bp->mf_mode == MULTI_FUNCTION_SI)

Definition at line 1385 of file bnx2x.h.

#define is_multi (   bp)    (BNX2X_NUM_QUEUES(bp) > 1)

Definition at line 1655 of file bnx2x.h.

#define L2_ILT_LINES (   bp)
Value:

Definition at line 1491 of file bnx2x.h.

#define LOAD_DIAG   2

Definition at line 1862 of file bnx2x.h.

#define LOAD_LOOPBACK_EXT   3

Definition at line 1863 of file bnx2x.h.

#define LOAD_NORMAL   0

Definition at line 1860 of file bnx2x.h.

#define LOAD_OPEN   1

Definition at line 1861 of file bnx2x.h.

#define MAX_AGG_QS (   bp)
Value:
(CHIP_IS_E1(bp) ? \
ETH_MAX_AGGREGATION_QUEUES_E1 :\
ETH_MAX_AGGREGATION_QUEUES_E1H_E2)

Definition at line 335 of file bnx2x.h.

#define MAX_BDS_PER_TX_PKT   (MAX_SKB_FRAGS + BDS_PER_TX_PKT)

Definition at line 628 of file bnx2x.h.

#define MAX_DESC_PER_TX_PKT
Value:
NEXT_CNT_PER_TX_PKT(MAX_BDS_PER_TX_PKT))

Definition at line 630 of file bnx2x.h.

#define MAX_DMAE_C   8

Definition at line 1037 of file bnx2x.h.

#define MAX_DMAE_C_PER_PORT   8

Definition at line 1933 of file bnx2x.h.

#define MAX_DYNAMIC_ATTN_GRPS   8

Definition at line 1099 of file bnx2x.h.

#define MAX_EQ_AVAIL   (EQ_DESC_MAX_PAGE * NUM_EQ_PAGES - 2)

Definition at line 1140 of file bnx2x.h.

#define MAX_ETH_TXQ_IDX (   bp)    (BNX2X_NUM_NON_CNIC_QUEUES(bp) * (bp)->max_cos)

Definition at line 299 of file bnx2x.h.

#define MAX_FETCH_BD   13 /* HW max BDs per packet */

Definition at line 600 of file bnx2x.h.

#define MAX_RCQ_AVAIL   (MAX_RCQ_DESC_CNT * NUM_RCQ_RINGS - 2)

Definition at line 684 of file bnx2x.h.

#define MAX_RCQ_BD   (NUM_RCQ_BD - 1)

Definition at line 683 of file bnx2x.h.

#define MAX_RCQ_DESC_CNT   (RCQ_DESC_CNT - NEXT_PAGE_RCQ_DESC_CNT)

Definition at line 681 of file bnx2x.h.

#define MAX_RX_AVAIL   (MAX_RX_DESC_CNT * NUM_RX_RINGS - 2)

Definition at line 641 of file bnx2x.h.

#define MAX_RX_BD   (NUM_RX_BD - 1)

Definition at line 640 of file bnx2x.h.

#define MAX_RX_DESC_CNT   (RX_DESC_CNT - NEXT_PAGE_RX_DESC_CNT)

Definition at line 637 of file bnx2x.h.

#define MAX_RX_SGE   (NUM_RX_SGE - 1)

Definition at line 362 of file bnx2x.h.

#define MAX_RX_SGE_CNT   (RX_SGE_CNT - NEXT_PAGE_SGE_DESC_CNT)

Definition at line 358 of file bnx2x.h.

#define MAX_SP_DESC_CNT   (SP_DESC_CNT - 1)

Definition at line 1969 of file bnx2x.h.

#define MAX_SPQ_PENDING   8

Definition at line 1973 of file bnx2x.h.

#define MAX_TX_AVAIL   (MAX_TX_DESC_CNT * NUM_TX_RINGS - 2)

Definition at line 609 of file bnx2x.h.

#define MAX_TX_BD   (NUM_TX_BD - 1)

Definition at line 608 of file bnx2x.h.

#define MAX_TX_DESC_CNT   (TX_DESC_CNT - NEXT_PAGE_TX_DESC_CNT)

Definition at line 606 of file bnx2x.h.

#define MC_HASH_OFFSET (   bp,
  i 
)
Value:
TSTORM_APPROXIMATE_MATCH_MULTICAST_FILTERING_OFFSET(BP_FUNC(bp)) + i*4)

Definition at line 2144 of file bnx2x.h.

#define MC_HASH_SIZE   8

Definition at line 2143 of file bnx2x.h.

#define MF2_CFG_ADDR (   bp,
  field 
)
Value:
(bp->common.mf2_cfg_base + \
offsetof(struct mf2_cfg, field))

Definition at line 196 of file bnx2x.h.

#define MF2_CFG_RD (   bp,
  field 
)    REG_RD(bp, MF2_CFG_ADDR(bp, field))

Definition at line 202 of file bnx2x.h.

#define MF_CFG_ADDR (   bp,
  field 
)
Value:
(bp->common.mf_cfg_base + \
offsetof(struct mf_cfg, field))

Definition at line 194 of file bnx2x.h.

#define MF_CFG_RD (   bp,
  field 
)    REG_RD(bp, MF_CFG_ADDR(bp, field))

Definition at line 199 of file bnx2x.h.

#define MF_CFG_WR (   bp,
  field,
  val 
)
Value:
REG_WR(bp,\

Definition at line 200 of file bnx2x.h.

#define MF_FUNC_DIS   (1 << 11)

Definition at line 1339 of file bnx2x.h.

#define MIN_ABOVE_THRESH   32768

Definition at line 1986 of file bnx2x.h.

#define MIN_RES   100

Definition at line 1984 of file bnx2x.h.

#define MIN_RX_AVAIL   ((bp)->dropless_fc ? BD_TH_HI(bp) + 128 : 128)

Definition at line 657 of file bnx2x.h.

#define MIN_RX_SIZE_NONTPA
Value:

Definition at line 664 of file bnx2x.h.

#define MIN_RX_SIZE_NONTPA_HW   ETH_MIN_RX_CQES_WITHOUT_TPA

Definition at line 662 of file bnx2x.h.

#define MIN_RX_SIZE_TPA   (max_t(u32, MIN_RX_SIZE_TPA_HW, MIN_RX_AVAIL))

Definition at line 663 of file bnx2x.h.

#define MIN_RX_SIZE_TPA_HW
Value:
(CHIP_IS_E1(bp) ? \
ETH_MIN_RX_CQES_WITH_TPA_E1 : \
ETH_MIN_RX_CQES_WITH_TPA_E1H_E2)

Definition at line 659 of file bnx2x.h.

#define MULTI_MASK   0x7f

Definition at line 2095 of file bnx2x.h.

#define NEXT_CNT_PER_TX_PKT (   bds)
Value:
(((bds) + MAX_TX_DESC_CNT - 1) / \
MAX_TX_DESC_CNT * NEXT_PAGE_TX_DESC_CNT)

Definition at line 618 of file bnx2x.h.

#define NEXT_EQ_IDX (   x)
Value:
((((x) & EQ_DESC_MAX_PAGE) == \
(EQ_DESC_MAX_PAGE - 1)) ? (x) + 2 : (x) + 1)

Definition at line 1143 of file bnx2x.h.

#define NEXT_PAGE_RCQ_DESC_CNT   1

Definition at line 680 of file bnx2x.h.

#define NEXT_PAGE_RX_DESC_CNT   2

Definition at line 636 of file bnx2x.h.

#define NEXT_PAGE_SGE_DESC_CNT   2

Definition at line 357 of file bnx2x.h.

#define NEXT_PAGE_TX_DESC_CNT   1

Definition at line 605 of file bnx2x.h.

#define NEXT_RCQ_IDX (   x)
Value:
((((x) & MAX_RCQ_DESC_CNT) == \
(MAX_RCQ_DESC_CNT - 1)) ? \
(x) + 1)

Definition at line 685 of file bnx2x.h.

#define NEXT_RX_IDX (   x)
Value:
((((x) & RX_DESC_MASK) == \
(MAX_RX_DESC_CNT - 1)) ? \
(x) + 1)

Definition at line 667 of file bnx2x.h.

#define NEXT_SGE_IDX (   x)
Value:
((((x) & RX_SGE_MASK) == \
(MAX_RX_SGE_CNT - 1)) ? \
(x) + 1)

Definition at line 363 of file bnx2x.h.

#define NEXT_SGE_MASK_ELEM (   el)    (((el) + 1) & RX_SGE_MASK_LEN_MASK)

Definition at line 430 of file bnx2x.h.

#define NEXT_TX_IDX (   x)
Value:
((((x) & MAX_TX_DESC_CNT) == \
(MAX_TX_DESC_CNT - 1)) ? \
(x) + 1)

Definition at line 610 of file bnx2x.h.

#define NO_FCOE (   bp)    ((bp)->flags & NO_FCOE_FLAG)

Definition at line 1351 of file bnx2x.h.

#define NO_FCOE_FLAG   (1 << 15)

Definition at line 1343 of file bnx2x.h.

#define NO_ISCSI (   bp)    ((bp)->flags & NO_ISCSI_FLAG)

Definition at line 1349 of file bnx2x.h.

#define NO_ISCSI_FLAG   (1 << 14)

Definition at line 1342 of file bnx2x.h.

#define NO_ISCSI_OOO (   bp)    ((bp)->flags & NO_ISCSI_OOO_FLAG)

Definition at line 1350 of file bnx2x.h.

#define NO_ISCSI_OOO_FLAG   (1 << 13)

Definition at line 1341 of file bnx2x.h.

#define NO_MCP_FLAG   (1 << 9)

Definition at line 1335 of file bnx2x.h.

#define NO_WOL_FLAG   (1 << 3)

Definition at line 1329 of file bnx2x.h.

#define NON_ETH_CONTEXT_USE   (FCOE_PRESENT)

Definition at line 267 of file bnx2x.h.

#define NUM_BD_PG_REQ
Value:

Definition at line 650 of file bnx2x.h.

#define NUM_BD_REQ   BRB_SIZE(bp)

Definition at line 649 of file bnx2x.h.

#define NUM_EQ_DESC   (EQ_DESC_CNT_PAGE * NUM_EQ_PAGES)

Definition at line 1138 of file bnx2x.h.

#define NUM_EQ_PAGES   1

Definition at line 1135 of file bnx2x.h.

#define NUM_RCQ_BD   (RCQ_DESC_CNT * NUM_RCQ_RINGS)

Definition at line 682 of file bnx2x.h.

#define NUM_RCQ_PG_REQ
Value:

Definition at line 698 of file bnx2x.h.

#define NUM_RCQ_REQ   BRB_SIZE(bp)

Definition at line 697 of file bnx2x.h.

#define NUM_RCQ_RINGS   (NUM_RX_RINGS * CQE_BD_REL)

Definition at line 678 of file bnx2x.h.

#define NUM_RX_BD   (RX_DESC_CNT * NUM_RX_RINGS)

Definition at line 639 of file bnx2x.h.

#define NUM_RX_RINGS   8

Definition at line 634 of file bnx2x.h.

#define NUM_RX_SGE   (RX_SGE_CNT * NUM_RX_SGE_PAGES)

Definition at line 361 of file bnx2x.h.

#define NUM_RX_SGE_PAGES   2

Definition at line 355 of file bnx2x.h.

#define NUM_SGE_PG_REQ
Value:

Definition at line 380 of file bnx2x.h.

#define NUM_SGE_REQ
Value:
(MAX_AGG_QS(bp) + \
(BRB_SIZE(bp) - MAX_AGG_QS(bp)) / 2)

Definition at line 378 of file bnx2x.h.

#define NUM_TX_BD   (TX_DESC_CNT * NUM_TX_RINGS)

Definition at line 607 of file bnx2x.h.

#define NUM_TX_RINGS   16

Definition at line 603 of file bnx2x.h.

#define ONCHIP_ADDR1 (   x)    ((u32)(((u64)x >> 12) & 0xFFFFFFFF))

Definition at line 1856 of file bnx2x.h.

#define ONCHIP_ADDR2 (   x)    ((u32)((1 << 20) | ((u64)x >> 44)))

Definition at line 1857 of file bnx2x.h.

#define ONE_PORT_FLAG   (1 << 2)

Definition at line 1328 of file bnx2x.h.

#define OWN_CNIC_IRQ   (1 << 12)

Definition at line 1340 of file bnx2x.h.

#define PAGES_PER_SGE   (1 << PAGES_PER_SGE_SHIFT)

Definition at line 349 of file bnx2x.h.

#define PAGES_PER_SGE_SHIFT   0

Definition at line 348 of file bnx2x.h.

#define pbd_tcp_flags (   skb)    (ntohl(tcp_flag_word(tcp_hdr(skb)))>>16 & 0xff)

Definition at line 742 of file bnx2x.h.

#define PCI_32BIT_FLAG   (1 << 1)

Definition at line 1327 of file bnx2x.h.

#define PCICFG_LINK_SPEED   0xf0000

Definition at line 1942 of file bnx2x.h.

#define PCICFG_LINK_SPEED_SHIFT   16

Definition at line 1943 of file bnx2x.h.

#define PCICFG_LINK_WIDTH   0x1f00000

Definition at line 1940 of file bnx2x.h.

#define PCICFG_LINK_WIDTH_SHIFT   20

Definition at line 1941 of file bnx2x.h.

#define PCIX_FLAG   (1 << 0)

Definition at line 1326 of file bnx2x.h.

#define PHY_FW_VER_LEN   20

Definition at line 1585 of file bnx2x.h.

#define PMF_DMAE_C (   bp)
Value:
E1HVN_MAX)

Definition at line 1936 of file bnx2x.h.

#define PXP2_REG_PXP2_INT_STS   PXP2_REG_PXP2_INT_STS_0

Definition at line 2149 of file bnx2x.h.

#define Q_STATS_OFFSET32 (   stat_name)    (offsetof(struct bnx2x_eth_q_stats, stat_name) / 4)

Definition at line 462 of file bnx2x.h.

#define QM_ARB_BYTES   160000

Definition at line 1982 of file bnx2x.h.

#define QM_CID_ROUND   1024

Definition at line 1015 of file bnx2x.h.

#define QM_ILT_PAGE_SZ   (4096 << QM_ILT_PAGE_SZ_HW) /* 4K */

Definition at line 1014 of file bnx2x.h.

#define QM_ILT_PAGE_SZ_HW   0

Definition at line 1013 of file bnx2x.h.

#define RCQ_BD (   x)    ((x) & MAX_RCQ_BD)

Definition at line 689 of file bnx2x.h.

#define RCQ_DESC_CNT   (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe))

Definition at line 679 of file bnx2x.h.

#define RCQ_TH_HI (   bp)    (RCQ_TH_LO(bp) + DROPLESS_FC_HEADROOM)

Definition at line 703 of file bnx2x.h.

#define RCQ_TH_LO (   bp)
Value:
NUM_RCQ_PG_REQ * NEXT_PAGE_RCQ_DESC_CNT + \
FW_DROP_LEVEL(bp))

Definition at line 700 of file bnx2x.h.

#define REG_ADDR (   bp,
  offset 
)    ((bp->regview) + (offset))

Definition at line 150 of file bnx2x.h.

#define REG_RD (   bp,
  offset 
)    readl(REG_ADDR(bp, offset))

Definition at line 152 of file bnx2x.h.

#define REG_RD16 (   bp,
  offset 
)    readw(REG_ADDR(bp, offset))

Definition at line 154 of file bnx2x.h.

#define REG_RD8 (   bp,
  offset 
)    readb(REG_ADDR(bp, offset))

Definition at line 153 of file bnx2x.h.

#define REG_RD_DMAE (   bp,
  offset,
  valp,
  len32 
)
Value:
do { \
bnx2x_read_dmae(bp, offset, len32);\
memcpy(valp, bnx2x_sp(bp, wb_data[0]), (len32) * 4); \
} while (0)

Definition at line 163 of file bnx2x.h.

#define REG_RD_IND (   bp,
  offset 
)    bnx2x_reg_rd_ind(bp, offset)

Definition at line 160 of file bnx2x.h.

#define REG_WR (   bp,
  offset,
  val 
)    writel((u32)val, REG_ADDR(bp, offset))

Definition at line 156 of file bnx2x.h.

#define REG_WR16 (   bp,
  offset,
  val 
)    writew((u16)val, REG_ADDR(bp, offset))

Definition at line 158 of file bnx2x.h.

#define REG_WR8 (   bp,
  offset,
  val 
)    writeb((u8)val, REG_ADDR(bp, offset))

Definition at line 157 of file bnx2x.h.

#define REG_WR_DMAE (   bp,
  offset,
  valp,
  len32 
)
Value:
do { \
memcpy(bnx2x_sp(bp, wb_data[0]), valp, (len32) * 4); \
bnx2x_write_dmae(bp, bnx2x_sp_mapping(bp, wb_data), \
offset, len32); \
} while (0)

Definition at line 169 of file bnx2x.h.

#define REG_WR_DMAE_LEN (   bp,
  offset,
  valp,
  len32 
)    REG_WR_DMAE(bp, offset, valp, len32)

Definition at line 176 of file bnx2x.h.

#define REG_WR_IND (   bp,
  offset,
  val 
)    bnx2x_reg_wr_ind(bp, offset, val)

Definition at line 161 of file bnx2x.h.

#define RS_PERIODIC_TIMEOUT_USEC   400

Definition at line 1979 of file bnx2x.h.

Definition at line 1660 of file bnx2x.h.

Definition at line 1663 of file bnx2x.h.

Definition at line 1666 of file bnx2x.h.

Definition at line 1669 of file bnx2x.h.

#define RX_BD (   x)    ((x) & MAX_RX_BD)

Definition at line 671 of file bnx2x.h.

#define RX_COPY_THRESH   92

Definition at line 601 of file bnx2x.h.

#define RX_DESC_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_rx_bd))

Definition at line 635 of file bnx2x.h.

#define RX_DESC_MASK   (RX_DESC_CNT - 1)

Definition at line 638 of file bnx2x.h.

#define RX_SGE (   x)    ((x) & MAX_RX_SGE)

Definition at line 367 of file bnx2x.h.

#define RX_SGE_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge))

Definition at line 356 of file bnx2x.h.

#define RX_SGE_MASK   (RX_SGE_CNT - 1)

Definition at line 360 of file bnx2x.h.

#define RX_SGE_MASK_LEN   (NUM_RX_SGE / BIT_VEC64_ELEM_SZ)

Definition at line 428 of file bnx2x.h.

#define RX_SGE_MASK_LEN_MASK   (RX_SGE_MASK_LEN - 1)

Definition at line 429 of file bnx2x.h.

#define SET_FLAG (   value,
  mask,
  flag 
)
Value:
do {\
(value) &= ~(mask);\
(value) |= ((flag) << (mask##_SHIFT));\
} while (0)

Definition at line 2125 of file bnx2x.h.

#define SGE_PAGE_ALIGN (   addr)    PAGE_ALIGN((typeof(PAGE_SIZE))(addr))

Definition at line 352 of file bnx2x.h.

#define SGE_PAGE_SHIFT   PAGE_SHIFT

Definition at line 351 of file bnx2x.h.

#define SGE_PAGE_SIZE   PAGE_SIZE

Definition at line 350 of file bnx2x.h.

#define SGE_TH_HI (   bp)    (SGE_TH_LO(bp) + DROPLESS_FC_HEADROOM)

Definition at line 384 of file bnx2x.h.

#define SGE_TH_LO (   bp)
Value:
NUM_SGE_PG_REQ * NEXT_PAGE_SGE_DESC_CNT)

Definition at line 382 of file bnx2x.h.

#define SHMEM2_ADDR (   bp,
  field 
)
Value:
(bp->common.shmem2_base + \
offsetof(struct shmem2_region, field))

Definition at line 190 of file bnx2x.h.

#define SHMEM2_HAS (   bp,
  field 
)
Value:
((bp)->common.shmem2_base && \
(SHMEM2_RD((bp), size) > \
offsetof(struct shmem2_region, field)))

Definition at line 204 of file bnx2x.h.

#define SHMEM2_RD (   bp,
  field 
)    REG_RD(bp, SHMEM2_ADDR(bp, field))

Definition at line 192 of file bnx2x.h.

#define SHMEM2_WR (   bp,
  field,
  val 
)    REG_WR(bp, SHMEM2_ADDR(bp, field), val)

Definition at line 193 of file bnx2x.h.

#define SHMEM_ADDR (   bp,
  field 
)
Value:
(bp->common.shmem_base + \
offsetof(struct shmem_region, field))

Definition at line 185 of file bnx2x.h.

#define SHMEM_RD (   bp,
  field 
)    REG_RD(bp, SHMEM_ADDR(bp, field))

Definition at line 187 of file bnx2x.h.

#define SHMEM_WR (   bp,
  field,
  val 
)    REG_WR(bp, SHMEM_ADDR(bp, field), val)

Definition at line 188 of file bnx2x.h.

#define SKB_CS (   skb)
Value:
(*(u16 *)(skb_transport_header(skb) + \
skb->csum_offset))

Definition at line 739 of file bnx2x.h.

#define SKB_CS_OFF (   skb)
Value:
(offsetof(struct tcphdr, check) - \
skb->csum_offset)

Definition at line 737 of file bnx2x.h.

#define skip_queue (   bp,
  idx 
)    (NO_FCOE(bp) && IS_FCOE_IDX(idx))

Definition at line 1737 of file bnx2x.h.

#define skip_rx_queue (   bp,
  idx 
)    (NO_FCOE(bp) && IS_FCOE_IDX(idx))

Definition at line 1730 of file bnx2x.h.

#define skip_tx_queue (   bp,
  idx 
)    (NO_FCOE(bp) && IS_FCOE_IDX(idx))

Definition at line 1735 of file bnx2x.h.

#define SM_RX_ID   0

Definition at line 272 of file bnx2x.h.

#define SM_TX_ID   1

Definition at line 273 of file bnx2x.h.

#define SP_DESC_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_spe))

Definition at line 1968 of file bnx2x.h.

#define STATS_OFFSET32 (   stat_name)    (offsetof(struct bnx2x_eth_stats, stat_name) / 4)

Definition at line 958 of file bnx2x.h.

#define STROM_ASSERT_ARRAY_SIZE   50

Definition at line 1960 of file bnx2x.h.

#define SUB_S16 (   a,
  b 
)    (s16)((s16)(a) - (s16)(b))

Definition at line 707 of file bnx2x.h.

#define SUB_S32 (   a,
  b 
)    (s32)((s32)(a) - (s32)(b))

Definition at line 708 of file bnx2x.h.

#define SUPPORTED_2500baseX_Full   (1 << 15)

Definition at line 939 of file bnx2x.h.

#define SW_CID (   x)    (le32_to_cpu(x) & BNX2X_SWCID_MASK)

Definition at line 715 of file bnx2x.h.

#define T_FAIR_COEF   ((MIN_ABOVE_THRESH + QM_ARB_BYTES) * 8 * MIN_RES)

Definition at line 1989 of file bnx2x.h.

#define TPA_ENABLE_FLAG   (1 << 8)

Definition at line 1334 of file bnx2x.h.

#define TX_BD (   x)    ((x) & MAX_TX_BD)

Definition at line 614 of file bnx2x.h.

#define TX_BD_POFF (   x)    ((x) & MAX_TX_DESC_CNT)

Definition at line 615 of file bnx2x.h.

#define TX_DESC_CNT   (BCM_PAGE_SIZE / sizeof(union eth_tx_bd_types))

Definition at line 604 of file bnx2x.h.

#define U64_HI (   x)    (u32)(((u64)(x)) >> 32)

Definition at line 146 of file bnx2x.h.

#define U64_LO (   x)    (u32)(((u64)(x)) & 0xffffffff)

Definition at line 145 of file bnx2x.h.

#define UNLOAD_CLOSE   1

Definition at line 1865 of file bnx2x.h.

#define UNLOAD_NORMAL   0

Definition at line 1864 of file bnx2x.h.

#define UNLOAD_RECOVERY   2

Definition at line 1866 of file bnx2x.h.

#define USES_WARPCORE (   bp)    (CHIP_IS_E3(bp))

Definition at line 857 of file bnx2x.h.

#define USING_DAC_FLAG   (1 << 4)

Definition at line 1330 of file bnx2x.h.

#define USING_MSI_FLAG   (1 << 6)

Definition at line 1332 of file bnx2x.h.

#define USING_MSIX_FLAG   (1 << 5)

Definition at line 1331 of file bnx2x.h.

#define USING_SINGLE_MSIX_FLAG   (1 << 20)

Definition at line 1346 of file bnx2x.h.

#define VENDOR_ID_LEN   4

Definition at line 2157 of file bnx2x.h.

#define VIRT_WR_DMAE_LEN (   bp,
  data,
  addr,
  len32,
  le32_swap 
)
Value:
do { \
memcpy(GUNZIP_BUF(bp), data, (len32) * 4); \
bnx2x_write_big_buf_wb(bp, addr, len32); \
} while (0)

Definition at line 179 of file bnx2x.h.

#define XMIT_CSUM   (XMIT_CSUM_V4 | XMIT_CSUM_V6)

Definition at line 751 of file bnx2x.h.

#define XMIT_CSUM_TCP   0x4

Definition at line 747 of file bnx2x.h.

#define XMIT_CSUM_V4   0x1

Definition at line 745 of file bnx2x.h.

#define XMIT_CSUM_V6   0x2

Definition at line 746 of file bnx2x.h.

#define XMIT_GSO   (XMIT_GSO_V4 | XMIT_GSO_V6)

Definition at line 752 of file bnx2x.h.

#define XMIT_GSO_V4   0x8

Definition at line 748 of file bnx2x.h.

#define XMIT_GSO_V6   0x10

Definition at line 749 of file bnx2x.h.

#define XMIT_PLAIN   0

Definition at line 744 of file bnx2x.h.

Enumeration Type Documentation

anonymous enum

CIDs and CLIDs: CLIDs below is a CLID for func 0, then the CLID for other functions will be calculated by the formula:

FUNC_N_CLID_X = N * NUM_SPECIAL_CLIENTS + FUNC_0_CLID_X

Enumerator:
BNX2X_ISCSI_ETH_CL_ID_IDX 
BNX2X_FCOE_ETH_CL_ID_IDX 
BNX2X_MAX_CNIC_ETH_CL_ID_IDX 

Definition at line 246 of file bnx2x.h.

anonymous enum
Enumerator:
FCOE_TXQ_IDX_OFFSET 
FWD_TXQ_IDX_OFFSET 
OOO_TXQ_IDX_OFFSET 

Definition at line 294 of file bnx2x.h.

anonymous enum
Enumerator:
BNX2X_LINK_REPORT_FD 
BNX2X_LINK_REPORT_LINK_DOWN 
BNX2X_LINK_REPORT_RX_FC_ON 
BNX2X_LINK_REPORT_TX_FC_ON 

Definition at line 1162 of file bnx2x.h.

anonymous enum
Enumerator:
BNX2X_PORT_QUERY_IDX 
BNX2X_PF_QUERY_IDX 
BNX2X_FCOE_QUERY_IDX 
BNX2X_FIRST_QUEUE_QUERY_IDX 

Definition at line 1169 of file bnx2x.h.

anonymous enum
Enumerator:
BNX2X_SP_RTNL_SETUP_TC 
BNX2X_SP_RTNL_TX_TIMEOUT 
BNX2X_SP_RTNL_AFEX_F_UPDATE 
BNX2X_SP_RTNL_FAN_FAILURE 

Definition at line 1191 of file bnx2x.h.

Enumerator:
BNX2X_RECOVERY_DONE 
BNX2X_RECOVERY_INIT 
BNX2X_RECOVERY_WAIT 
BNX2X_RECOVERY_FAILED 
BNX2X_RECOVERY_NIC_LOADING 

Definition at line 1123 of file bnx2x.h.

Enumerator:
TPA_MODE_LRO 
TPA_MODE_GRO 

Definition at line 490 of file bnx2x.h.

Function Documentation

void bnx2x_calc_fc_adv ( struct bnx2x bp)

Definition at line 2083 of file bnx2x_main.c.

int bnx2x_del_all_macs ( struct bnx2x bp,
struct bnx2x_vlan_mac_obj mac_obj,
int  mac_type,
bool  wait_for_comp 
)

bnx2x_del_all_macs - delete all MACs configured for the specific MAC object

: driver handle : MAC object handle : type of the MACs to clear (BNX2X_XXX_MAC) : if 'true' block until completion

Deletes all MACs of the specific type (e.g. ETH, UC list).

Returns zero if operation has successfully completed, a positive value if the operation has been successfully scheduled and a negative - if a requested operations has failed.

Definition at line 7574 of file bnx2x_main.c.

u32 bnx2x_dmae_opcode ( struct bnx2x bp,
u8  src_type,
u8  dst_type,
bool  with_comp,
u8  comp_type 
)

Definition at line 363 of file bnx2x_main.c.

u32 bnx2x_dmae_opcode_add_comp ( u32  opcode,
u8  comp_type 
)

Definition at line 352 of file bnx2x_main.c.

u32 bnx2x_dmae_opcode_clr_src_reset ( u32  opcode)

Definition at line 358 of file bnx2x_main.c.

void bnx2x_func_init ( struct bnx2x bp,
struct bnx2x_func_init_params p 
)

Definition at line 2744 of file bnx2x_main.c.

int bnx2x_get_cur_phy_idx ( struct bnx2x bp)

Definition at line 3792 of file bnx2x_cmn.c.

int bnx2x_get_gpio ( struct bnx2x bp,
int  gpio_num,
u8  port 
)

Definition at line 1856 of file bnx2x_main.c.

void bnx2x_notify_link_changed ( struct bnx2x bp)

Definition at line 12233 of file bnx2x_main.c.

void bnx2x_post_dmae ( struct bnx2x bp,
struct dmae_command dmae,
int  idx 
)

Definition at line 340 of file bnx2x_main.c.

void bnx2x_read_dmae ( struct bnx2x bp,
u32  src_addr,
u32  len32 
)

Definition at line 478 of file bnx2x_main.c.

void bnx2x_read_mf_cfg ( struct bnx2x bp)

Definition at line 2292 of file bnx2x_main.c.

void bnx2x_set_ethtool_ops ( struct net_device netdev)

Definition at line 2994 of file bnx2x_ethtool.c.

int bnx2x_set_gpio ( struct bnx2x bp,
int  gpio_num,
u32  mode,
u8  port 
)

Definition at line 1886 of file bnx2x_main.c.

int bnx2x_set_gpio_int ( struct bnx2x bp,
int  gpio_num,
u32  mode,
u8  port 
)

Definition at line 1989 of file bnx2x_main.c.

int bnx2x_set_mac_one ( struct bnx2x bp,
u8 mac,
struct bnx2x_vlan_mac_obj obj,
bool  set,
int  mac_type,
unsigned long ramrod_flags 
)

bnx2x_set_mac_one - configure a single MAC address

: driver handle : MAC to configure : MAC object handle : if 'true' add a new MAC, otherwise - delete : the type of the MAC to configure (e.g. ETH, UC list) : RAMROD_XXX flags (e.g. RAMROD_CONT, RAMROD_COMP_WAIT)

Configures one MAC according to provided parameters or continues the execution of previously scheduled commands if RAMROD_CONT is set in ramrod_flags.

Returns zero if operation has successfully completed, a positive value if the operation has been successfully scheduled and a negative - if a requested operations has failed.

Definition at line 7536 of file bnx2x_main.c.

int bnx2x_set_mult_gpio ( struct bnx2x bp,
u8  pins,
u32  mode 
)

Definition at line 1942 of file bnx2x_main.c.

int bnx2x_sp_post ( struct bnx2x bp,
int  command,
int  cid,
u32  data_hi,
u32  data_lo,
int  cmd_type 
)

bnx2x_sp_post - place a single command on an SP ring

: driver handle : command to place (e.g. SETUP, FILTER_RULES, etc.) : SW CID the command is related to : command private data address (high 32 bits) : command private data address (low 32 bits) : command type (e.g. NONE, ETH)

SP data is handled as if it's always an address pair, thus data fields are not swapped to little endian in upper functions. Instead this function swaps data as if it's two u32 fields.

Definition at line 3361 of file bnx2x_main.c.

void bnx2x_update_coalesce ( struct bnx2x bp)

Definition at line 5413 of file bnx2x_main.c.

void bnx2x_write_dmae ( struct bnx2x bp,
dma_addr_t  dma_addr,
u32  dst_addr,
u32  len32 
)

Definition at line 449 of file bnx2x_main.c.

Variable Documentation

Definition at line 128 of file bnx2x_main.c.

int num_queues

Definition at line 98 of file bnx2x_main.c.