FreeBSD kernel BXE device code
bxe.h File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sx.h>
#include <sys/module.h>
#include <sys/endian.h>
#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/kobj.h>
#include <sys/bus.h>
#include <sys/rman.h>
#include <sys/socket.h>
#include <sys/sockio.h>
#include <sys/sysctl.h>
#include <sys/smp.h>
#include <sys/bitstring.h>
#include <sys/limits.h>
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <contrib/zlib/zlib.h>
#include <net/debugnet.h>
#include <net/if.h>
#include <net/if_types.h>
#include <net/if_arp.h>
#include <net/ethernet.h>
#include <net/if_dl.h>
#include <net/if_var.h>
#include <net/if_media.h>
#include <net/if_vlan_var.h>
#include <net/bpf.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
#include <machine/atomic.h>
#include <machine/resource.h>
#include <machine/endian.h>
#include <machine/bus.h>
#include <machine/in_cksum.h>
#include "device_if.h"
#include "bus_if.h"
#include "pci_if.h"
#include "ecore_mfw_req.h"
#include "ecore_fw_defs.h"
#include "ecore_hsi.h"
#include "ecore_reg.h"
#include "bxe_dcb.h"
#include "bxe_stats.h"
#include "bxe_elink.h"
#include "ecore_sp.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bxe_device_type
 
struct  bxe_bar
 
struct  bxe_intr
 
struct  bxe_dma
 
struct  attn_route
 
struct  iro
 
union  bxe_host_hc_status_block
 
union  bxe_db_prod
 
struct  bxe_sw_tx_bd
 
struct  bxe_sw_rx_bd
 
struct  bxe_sw_tpa_info
 
struct  bxe_fastpath
 
union  cdu_context
 
struct  hw_context
 
struct  bxe_fw_stats_req
 
struct  bxe_fw_stats_data
 
struct  bxe_slowpath
 
struct  bxe_port
 
struct  bxe_mf_info
 
struct  bxe_devinfo
 
struct  bxe_sp_objs
 
struct  bxe_link_report_data
 
struct  bxe_softc
 
struct  bxe_nvram_data
 
union  bxe_stats_show_data
 
struct  bxe_func_init_params
 

Macros

#define LITTLE_ENDIAN
 
#define __LITTLE_ENDIAN
 
#define VF_MAC_CREDIT_CNT   0
 
#define VF_VLAN_CREDIT_CNT   (0)
 
#define ARRSIZE(arr)   (sizeof(arr) / sizeof((arr)[0]))
 
#define DIV_ROUND_UP(n, d)   (((n) + (d) - 1) / (d))
 
#define roundup(x, y)   ((((x) + ((y) - 1)) / (y)) * (y))
 
#define ilog2(x)   bxe_ilog2(x)
 
#define BRCM_VENDORID   0x14e4
 
#define QLOGIC_VENDORID   0x1077
 
#define PCI_ANY_ID   (uint16_t)(~0U)
 
#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 U64_LO(addr)   ((uint32_t)(addr))
 
#define U64_HI(addr)   (0)
 
#define HILO_U64(hi, lo)   ((((uint64_t)(hi)) << 32) + (lo))
 
#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 BXE_MAX_SEGMENTS   12 /* 13-1 for parsing buffer */
 
#define BXE_TSO_MAX_SEGMENTS   32
 
#define BXE_TSO_MAX_SIZE   (65535 + sizeof(struct ether_vlan_header))
 
#define BXE_TSO_MAX_SEG_SIZE   4096
 
#define BRB_SIZE(sc)   (CHIP_IS_E3(sc) ? 1024 : 512)
 
#define MAX_AGG_QS(sc)
 
#define FW_DROP_LEVEL(sc)   (3 + MAX_SPQ_PENDING + MAX_AGG_QS(sc))
 
#define FW_PREFETCH_CNT   16
 
#define DROPLESS_FC_HEADROOM   100
 
#define RX_SGE_NUM_PAGES   2 /* must be a power of 2 */
 
#define RX_SGE_TOTAL_PER_PAGE   (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge))
 
#define RX_SGE_NEXT_PAGE_DESC_CNT   2
 
#define RX_SGE_USABLE_PER_PAGE   (RX_SGE_TOTAL_PER_PAGE - RX_SGE_NEXT_PAGE_DESC_CNT)
 
#define RX_SGE_PER_PAGE_MASK   (RX_SGE_TOTAL_PER_PAGE - 1)
 
#define RX_SGE_TOTAL   (RX_SGE_TOTAL_PER_PAGE * RX_SGE_NUM_PAGES)
 
#define RX_SGE_USABLE   (RX_SGE_USABLE_PER_PAGE * RX_SGE_NUM_PAGES)
 
#define RX_SGE_MAX   (RX_SGE_TOTAL - 1)
 
#define RX_SGE(x)   ((x) & RX_SGE_MAX)
 
#define RX_SGE_NEXT(x)
 
#define RX_SGE_MASK_ELEM_SZ   64
 
#define RX_SGE_MASK_ELEM_SHIFT   6
 
#define RX_SGE_MASK_ELEM_MASK   ((uint64_t)RX_SGE_MASK_ELEM_SZ - 1)
 
#define RX_SGE_ONES_MASK(idx)    (((uint64_t)0x1 << (((idx) & RX_SGE_MASK_ELEM_MASK) + 1)) - 1)
 
#define RX_SGE_MASK_ELEM_ONE_MASK   ((uint64_t)(~0))
 
#define RX_SGE_MASK_LEN    ((RX_SGE_NUM_PAGES * RX_SGE_TOTAL_PER_PAGE) / RX_SGE_MASK_ELEM_SZ)
 
#define RX_SGE_MASK_LEN_MASK   (RX_SGE_MASK_LEN - 1)
 
#define RX_SGE_NEXT_MASK_ELEM(el)   (((el) + 1) & RX_SGE_MASK_LEN_MASK)
 
#define NUM_SGE_REQ(sc)    (MAX_AGG_QS(sc) + (BRB_SIZE(sc) - MAX_AGG_QS(sc)) / 2)
 
#define NUM_SGE_PG_REQ(sc)    ((NUM_SGE_REQ(sc) + RX_SGE_USABLE_PER_PAGE - 1) / RX_SGE_USABLE_PER_PAGE)
 
#define SGE_TH_LO(sc)    (NUM_SGE_REQ(sc) + NUM_SGE_PG_REQ(sc) * RX_SGE_NEXT_PAGE_DESC_CNT)
 
#define SGE_TH_HI(sc)    (SGE_TH_LO(sc) + DROPLESS_FC_HEADROOM)
 
#define PAGES_PER_SGE_SHIFT   0
 
#define PAGES_PER_SGE   (1 << PAGES_PER_SGE_SHIFT)
 
#define SGE_PAGE_SIZE   BCM_PAGE_SIZE
 
#define SGE_PAGE_SHIFT   BCM_PAGE_SHIFT
 
#define SGE_PAGE_ALIGN(addr)   BCM_PAGE_ALIGN(addr)
 
#define SGE_PAGES   (SGE_PAGE_SIZE * PAGES_PER_SGE)
 
#define TPA_AGG_SIZE   min((8 * SGE_PAGES), 0xffff)
 
#define TX_BD_NUM_PAGES   16 /* must be a power of 2 */
 
#define TX_BD_TOTAL_PER_PAGE   (BCM_PAGE_SIZE / sizeof(union eth_tx_bd_types))
 
#define TX_BD_USABLE_PER_PAGE   (TX_BD_TOTAL_PER_PAGE - 1)
 
#define TX_BD_TOTAL   (TX_BD_TOTAL_PER_PAGE * TX_BD_NUM_PAGES)
 
#define TX_BD_USABLE   (TX_BD_USABLE_PER_PAGE * TX_BD_NUM_PAGES)
 
#define TX_BD_MAX   (TX_BD_TOTAL - 1)
 
#define TX_BD_NEXT(x)
 
#define TX_BD(x)   ((x) & TX_BD_MAX)
 
#define TX_BD_PAGE(x)   (((x) & ~TX_BD_USABLE_PER_PAGE) >> 8)
 
#define TX_BD_IDX(x)   ((x) & TX_BD_USABLE_PER_PAGE)
 
#define BXE_TX_CLEANUP_THRESHOLD   (TX_BD_USABLE / 8)
 
#define BXE_TX_TIMEOUT   5
 
#define RX_BD_NUM_PAGES   8 /* power of 2 */
 
#define RX_BD_TOTAL_PER_PAGE   (BCM_PAGE_SIZE / sizeof(struct eth_rx_bd))
 
#define RX_BD_NEXT_PAGE_DESC_CNT   2
 
#define RX_BD_USABLE_PER_PAGE   (RX_BD_TOTAL_PER_PAGE - RX_BD_NEXT_PAGE_DESC_CNT)
 
#define RX_BD_PER_PAGE_MASK   (RX_BD_TOTAL_PER_PAGE - 1)
 
#define RX_BD_TOTAL   (RX_BD_TOTAL_PER_PAGE * RX_BD_NUM_PAGES)
 
#define RX_BD_USABLE   (RX_BD_USABLE_PER_PAGE * RX_BD_NUM_PAGES)
 
#define RX_BD_MAX   (RX_BD_TOTAL - 1)
 
#define RX_BD_NEXT(x)
 
#define RX_BD(x)   ((x) & RX_BD_MAX)
 
#define RX_BD_PAGE(x)   (((x) & ~RX_BD_PER_PAGE_MASK) >> 9)
 
#define RX_BD_IDX(x)   ((x) & RX_BD_PER_PAGE_MASK)
 
#define NUM_BD_REQ(sc)    BRB_SIZE(sc)
 
#define NUM_BD_PG_REQ(sc)    ((NUM_BD_REQ(sc) + RX_BD_USABLE_PER_PAGE - 1) / RX_BD_USABLE_PER_PAGE)
 
#define BD_TH_LO(sc)
 
#define BD_TH_HI(sc)    (BD_TH_LO(sc) + DROPLESS_FC_HEADROOM)
 
#define MIN_RX_AVAIL(sc)    ((sc)->dropless_fc ? BD_TH_HI(sc) + 128 : 128)
 
#define MIN_RX_SIZE_TPA_HW(sc)
 
#define MIN_RX_SIZE_NONTPA_HW   ETH_MIN_RX_CQES_WITHOUT_TPA
 
#define MIN_RX_SIZE_TPA(sc)    (max(MIN_RX_SIZE_TPA_HW(sc), MIN_RX_AVAIL(sc)))
 
#define MIN_RX_SIZE_NONTPA(sc)    (max(MIN_RX_SIZE_NONTPA_HW, MIN_RX_AVAIL(sc)))
 
#define CQE_BD_REL
 
#define RCQ_NUM_PAGES   (RX_BD_NUM_PAGES * CQE_BD_REL) /* power of 2 */
 
#define RCQ_TOTAL_PER_PAGE   (BCM_PAGE_SIZE / sizeof(union eth_rx_cqe))
 
#define RCQ_NEXT_PAGE_DESC_CNT   1
 
#define RCQ_USABLE_PER_PAGE   (RCQ_TOTAL_PER_PAGE - RCQ_NEXT_PAGE_DESC_CNT)
 
#define RCQ_TOTAL   (RCQ_TOTAL_PER_PAGE * RCQ_NUM_PAGES)
 
#define RCQ_USABLE   (RCQ_USABLE_PER_PAGE * RCQ_NUM_PAGES)
 
#define RCQ_MAX   (RCQ_TOTAL - 1)
 
#define RCQ_NEXT(x)
 
#define RCQ(x)   ((x) & RCQ_MAX)
 
#define RCQ_PAGE(x)   (((x) & ~RCQ_USABLE_PER_PAGE) >> 7)
 
#define RCQ_IDX(x)   ((x) & RCQ_USABLE_PER_PAGE)
 
#define NUM_RCQ_REQ(sc)    BRB_SIZE(sc)
 
#define NUM_RCQ_PG_REQ(sc)    ((NUM_RCQ_REQ(sc) + RCQ_USABLE_PER_PAGE - 1) / RCQ_USABLE_PER_PAGE)
 
#define RCQ_TH_LO(sc)
 
#define RCQ_TH_HI(sc)    (RCQ_TH_LO(sc) + DROPLESS_FC_HEADROOM)
 
#define SUB_S16(a, b)   (int16_t)((int16_t)(a) - (int16_t)(b))
 
#define __SGE_MASK_SET_BIT(el, bit)
 
#define __SGE_MASK_CLEAR_BIT(el, bit)
 
#define SGE_MASK_SET_BIT(fp, idx)
 
#define SGE_MASK_CLEAR_BIT(fp, idx)
 
#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 MAX_VNIC_NUM   4
 
#define MAX_FUNC_NUM   8 /* common to all chips */
 
#define MAX_RSS_CHAINS   16 /* a constant for HW limit */
 
#define MAX_MSI_VECTOR   8 /* a constant for HW limit */
 
#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)   ((uint32_t)(((uint64_t)x >> 12) & 0xFFFFFFFF))
 
#define ONCHIP_ADDR2(x)   ((uint32_t)((1 << 20) | ((uint64_t)x >> 44)))
 
#define ETH_HLEN   14
 
#define ETH_OVERHEAD   (ETH_HLEN + 8 + 8)
 
#define ETH_MIN_PACKET_SIZE   60
 
#define ETH_MAX_PACKET_SIZE   ETHERMTU /* 1500 */
 
#define ETH_MAX_JUMBO_PACKET_SIZE   9600
 
#define ETH_MAX_TPA_HEADER_SIZE   72
 
#define BXE_RX_ALIGN_SHIFT   8
 
#define BXE_FW_RX_ALIGN_START   (1 << BXE_RX_ALIGN_SHIFT)
 
#define BXE_FW_RX_ALIGN_END   (1 << BXE_RX_ALIGN_SHIFT)
 
#define BXE_PXP_DRAM_ALIGN   (BXE_RX_ALIGN_SHIFT - 5) /* XXX ??? */
 
#define BXE_SET_ERROR_BIT(sc, error)
 
#define MAX_DYNAMIC_ATTN_GRPS   8
 
#define BXE_TSO_SPLIT_BD   (1 << 0)
 
#define BXE_TPA_STATE_START   1
 
#define BXE_TPA_STATE_STOP   2
 
#define BXE_FP_TX_LOCK(fp)   mtx_lock(&fp->tx_mtx)
 
#define BXE_FP_TX_UNLOCK(fp)   mtx_unlock(&fp->tx_mtx)
 
#define BXE_FP_TX_LOCK_ASSERT(fp)   mtx_assert(&fp->tx_mtx, MA_OWNED)
 
#define BXE_FP_TX_TRYLOCK(fp)   mtx_trylock(&fp->tx_mtx)
 
#define BXE_FP_RX_LOCK(fp)   mtx_lock(&fp->rx_mtx)
 
#define BXE_FP_RX_UNLOCK(fp)   mtx_unlock(&fp->rx_mtx)
 
#define BXE_FP_RX_LOCK_ASSERT(fp)   mtx_assert(&fp->rx_mtx, MA_OWNED)
 
#define BXE_FP_STATE_CLOSED   0x01
 
#define BXE_FP_STATE_IRQ   0x02
 
#define BXE_FP_STATE_OPENING   0x04
 
#define BXE_FP_STATE_OPEN   0x08
 
#define BXE_FP_STATE_HALTING   0x10
 
#define BXE_FP_STATE_HALTED   0x20
 
#define FP_IDX(fp)   (fp->index)
 
#define FP_CL_ID(fp)   (fp->cl_id)
 
#define BXE_BR_SIZE   4096
 
#define BXE_MAX_NUM_OF_VFS   64
 
#define BXE_VF_CID_WND   0
 
#define BXE_CIDS_PER_VF   (1 << BXE_VF_CID_WND)
 
#define BXE_CLIENTS_PER_VF   1
 
#define BXE_FIRST_VF_CID   256
 
#define BXE_VF_CIDS   (BXE_MAX_NUM_OF_VFS * BXE_CIDS_PER_VF)
 
#define BXE_VF_ID_INVALID   0xFF
 
#define IS_SRIOV(sc)   0
 
#define GET_NUM_VFS_PER_PATH(sc)   0
 
#define GET_NUM_VFS_PER_PF(sc)   0
 
#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 CNIC_ISCSI_CID_MAX   256
 
#define CNIC_FCOE_CID_MAX   2048
 
#define CNIC_CID_MAX   (CNIC_ISCSI_CID_MAX + CNIC_FCOE_CID_MAX)
 
#define CNIC_ILT_LINES   DIV_ROUND_UP(CNIC_CID_MAX, ILT_PAGE_CIDS)
 
#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 TM_ILT_PAGE_SZ_HW   0
 
#define TM_ILT_PAGE_SZ   (4096 << TM_ILT_PAGE_SZ_HW) /* 4K */
 
#define TM_CONN_NUM   1024
 
#define TM_ILT_SZ   (8 * TM_CONN_NUM)
 
#define TM_ILT_LINES   DIV_ROUND_UP(TM_ILT_SZ, TM_ILT_PAGE_SZ)
 
#define SRC_ILT_PAGE_SZ_HW   0
 
#define SRC_ILT_PAGE_SZ   (4096 << SRC_ILT_PAGE_SZ_HW) /* 4K */
 
#define SRC_HASH_BITS   10
 
#define SRC_CONN_NUM   (1 << SRC_HASH_BITS) /* 1024 */
 
#define SRC_ILT_SZ   (sizeof(struct src_ent) * SRC_CONN_NUM)
 
#define SRC_T2_SZ   SRC_ILT_SZ
 
#define SRC_ILT_LINES   DIV_ROUND_UP(SRC_ILT_SZ, SRC_ILT_PAGE_SZ)
 
#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, sc)   ((cid) % BXE_NUM_NON_CNIC_QUEUES(sc))
 
#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 CMNG_FNS_NONE   0
 
#define CMNG_FNS_MINMAX   1
 
#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 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 BXE_NUM_QUEUES(sc)   ((sc)->num_queues)
 
#define BXE_NUM_ETH_QUEUES(sc)   BXE_NUM_QUEUES(sc)
 
#define BXE_NUM_NON_CNIC_QUEUES(sc)   BXE_NUM_QUEUES(sc)
 
#define BXE_NUM_RX_QUEUES(sc)   BXE_NUM_QUEUES(sc)
 
#define FOR_EACH_QUEUE(sc, var)    for ((var) = 0; (var) < BXE_NUM_QUEUES(sc); (var)++)
 
#define FOR_EACH_NONDEFAULT_QUEUE(sc, var)    for ((var) = 1; (var) < BXE_NUM_QUEUES(sc); (var)++)
 
#define FOR_EACH_ETH_QUEUE(sc, var)    for ((var) = 0; (var) < BXE_NUM_ETH_QUEUES(sc); (var)++)
 
#define FOR_EACH_NONDEFAULT_ETH_QUEUE(sc, var)    for ((var) = 1; (var) < BXE_NUM_ETH_QUEUES(sc); (var)++)
 
#define FOR_EACH_COS_IN_TX_QUEUE(sc, var)    for ((var) = 0; (var) < (sc)->max_cos; (var)++)
 
#define FOR_EACH_CNIC_QUEUE(sc, var)
 
#define FCOE_IDX(sc)   (BXE_NUM_NON_CNIC_QUEUES(sc) + FCOE_IDX_OFFSET)
 
#define bxe_fcoe_fp(sc)   (&sc->fp[FCOE_IDX(sc)])
 
#define bxe_fcoe(sc, var)   (bxe_fcoe_fp(sc)->var)
 
#define bxe_fcoe_inner_sp_obj(sc)   (&sc->sp_objs[FCOE_IDX(sc)])
 
#define bxe_fcoe_sp_obj(sc, var)   (bxe_fcoe_inner_sp_obj(sc)->var)
 
#define bxe_fcoe_tx(sc, var)   (bxe_fcoe_fp(sc)->txdata_ptr[FIRST_TX_COS_INDEX]->var)
 
#define OOO_IDX(sc)   (BXE_NUM_NON_CNIC_QUEUES(sc) + OOO_IDX_OFFSET)
 
#define bxe_ooo_fp(sc)   (&sc->fp[OOO_IDX(sc)])
 
#define bxe_ooo(sc, var)   (bxe_ooo_fp(sc)->var)
 
#define bxe_ooo_inner_sp_obj(sc)   (&sc->sp_objs[OOO_IDX(sc)])
 
#define bxe_ooo_sp_obj(sc, var)   (bxe_ooo_inner_sp_obj(sc)->var)
 
#define FWD_IDX(sc)   (BXE_NUM_NON_CNIC_QUEUES(sc) + FWD_IDX_OFFSET)
 
#define bxe_fwd_fp(sc)   (&sc->fp[FWD_IDX(sc)])
 
#define bxe_fwd(sc, var)   (bxe_fwd_fp(sc)->var)
 
#define bxe_fwd_inner_sp_obj(sc)   (&sc->sp_objs[FWD_IDX(sc)])
 
#define bxe_fwd_sp_obj(sc, var)   (bxe_fwd_inner_sp_obj(sc)->var)
 
#define bxe_fwd_txdata(fp)   (fp->txdata_ptr[FIRST_TX_COS_INDEX])
 
#define IS_ETH_FP(fp)   ((fp)->index < BXE_NUM_ETH_QUEUES((fp)->sc))
 
#define IS_FCOE_FP(fp)   ((fp)->index == FCOE_IDX((fp)->sc))
 
#define IS_FCOE_IDX(idx)   ((idx) == FCOE_IDX(sc))
 
#define IS_FWD_FP(fp)   ((fp)->index == FWD_IDX((fp)->sc))
 
#define IS_FWD_IDX(idx)   ((idx) == FWD_IDX(sc))
 
#define IS_OOO_FP(fp)   ((fp)->index == OOO_IDX((fp)->sc))
 
#define IS_OOO_IDX(idx)   ((idx) == OOO_IDX(sc))
 
#define BXE_IGU_STAS_MSG_VF_CNT   64
 
#define BXE_IGU_STAS_MSG_PF_CNT   4
 
#define MAX_DMAE_C   8
 
#define BXE_CORE_LOCK_SX
 
#define ADVERTISED_10baseT_Half   (1 << 1)
 
#define ADVERTISED_10baseT_Full   (1 << 2)
 
#define ADVERTISED_100baseT_Half   (1 << 3)
 
#define ADVERTISED_100baseT_Full   (1 << 4)
 
#define ADVERTISED_1000baseT_Half   (1 << 5)
 
#define ADVERTISED_1000baseT_Full   (1 << 6)
 
#define ADVERTISED_TP   (1 << 7)
 
#define ADVERTISED_FIBRE   (1 << 8)
 
#define ADVERTISED_Autoneg   (1 << 9)
 
#define ADVERTISED_Asym_Pause   (1 << 10)
 
#define ADVERTISED_Pause   (1 << 11)
 
#define ADVERTISED_2500baseX_Full   (1 << 15)
 
#define ADVERTISED_10000baseT_Full   (1 << 16)
 
#define BXE_PHY_LOCK(sc)   mtx_lock(&sc->port.phy_mtx)
 
#define BXE_PHY_UNLOCK(sc)   mtx_unlock(&sc->port.phy_mtx)
 
#define BXE_PHY_LOCK_ASSERT(sc)   mtx_assert(&sc->port.phy_mtx, MA_OWNED)
 
#define IS_MULTI_VNIC(sc)   ((sc)->devinfo.mf_info.multi_vnics_mode)
 
#define VNICS_PER_PORT(sc)   ((sc)->devinfo.mf_info.vnics_per_port)
 
#define VNICS_PER_PATH(sc)
 
#define VALID_OVLAN(ovlan)   ((ovlan) <= 4096)
 
#define INVALID_VIF_ID   0xFFFF
 
#define OVLAN(sc)   ((sc)->devinfo.mf_info.ext_id)
 
#define VIF_ID(sc)   ((sc)->devinfo.mf_info.ext_id)
 
#define NIV_DEFAULT_VLAN(sc)   ((sc)->devinfo.mf_info.default_vlan)
 
#define NIV_ALLOWED_PRIORITIES(sc)   ((sc)->devinfo.mf_info.niv_allowed_priorities)
 
#define NIV_DEFAULT_COS(sc)   ((sc)->devinfo.mf_info.niv_default_cos)
 
#define AFEX_VLAN_MODE(sc)   ((sc)->devinfo.mf_info.afex_vlan_mode)
 
#define MF_INFO_VALID_MAC   0x0001
 
#define IS_MF(sc)
 
#define IS_MF_SD(sc)
 
#define IS_MF_SI(sc)
 
#define IS_MF_AFEX(sc)
 
#define IS_MF_SD_MODE(sc)   IS_MF_SD(sc)
 
#define IS_MF_SI_MODE(sc)   IS_MF_SI(sc)
 
#define IS_MF_AFEX_MODE(sc)   IS_MF_AFEX(sc)
 
#define MF_PROTO_SUPPORT_ETHERNET   0x1
 
#define MF_PROTO_SUPPORT_ISCSI   0x2
 
#define MF_PROTO_SUPPORT_FCOE   0x4
 
#define CHIP_ID(sc)   ((sc)->devinfo.chip_id & 0xffff0000)
 
#define CHIP_NUM(sc)   ((sc)->devinfo.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_57712_VF   0x166f
 
#define CHIP_NUM_57800   0x168a
 
#define CHIP_NUM_57800_MF   0x16a5
 
#define CHIP_NUM_57800_VF   0x16a9
 
#define CHIP_NUM_57810   0x168e
 
#define CHIP_NUM_57810_MF   0x16ae
 
#define CHIP_NUM_57810_VF   0x16af
 
#define CHIP_NUM_57811   0x163d
 
#define CHIP_NUM_57811_MF   0x163e
 
#define CHIP_NUM_57811_VF   0x163f
 
#define CHIP_NUM_57840_OBS   0x168d
 
#define CHIP_NUM_57840_OBS_MF   0x16ab
 
#define CHIP_NUM_57840_4_10   0x16a1
 
#define CHIP_NUM_57840_2_20   0x16a2
 
#define CHIP_NUM_57840_MF   0x16a4
 
#define CHIP_NUM_57840_VF   0x16ad
 
#define CHIP_REV_SHIFT   12
 
#define CHIP_REV_MASK   (0xF << CHIP_REV_SHIFT)
 
#define CHIP_REV(sc)   ((sc)->devinfo.chip_id & CHIP_REV_MASK)
 
#define CHIP_REV_Ax   (0x0 << CHIP_REV_SHIFT)
 
#define CHIP_REV_Bx   (0x1 << CHIP_REV_SHIFT)
 
#define CHIP_REV_Cx   (0x2 << CHIP_REV_SHIFT)
 
#define CHIP_REV_IS_SLOW(sc)    (CHIP_REV(sc) > 0x00005000)
 
#define CHIP_REV_IS_FPGA(sc)    (CHIP_REV_IS_SLOW(sc) && (CHIP_REV(sc) & 0x00001000))
 
#define CHIP_REV_IS_EMUL(sc)    (CHIP_REV_IS_SLOW(sc) && !(CHIP_REV(sc) & 0x00001000))
 
#define CHIP_REV_IS_ASIC(sc)    (!CHIP_REV_IS_SLOW(sc))
 
#define CHIP_METAL(sc)   ((sc->devinfo.chip_id) & 0x00000ff0)
 
#define CHIP_BOND_ID(sc)   ((sc->devinfo.chip_id) & 0x0000000f)
 
#define CHIP_IS_E1(sc)   (CHIP_NUM(sc) == CHIP_NUM_57710)
 
#define CHIP_IS_57710(sc)   (CHIP_NUM(sc) == CHIP_NUM_57710)
 
#define CHIP_IS_57711(sc)   (CHIP_NUM(sc) == CHIP_NUM_57711)
 
#define CHIP_IS_57711E(sc)   (CHIP_NUM(sc) == CHIP_NUM_57711E)
 
#define CHIP_IS_E1H(sc)
 
#define CHIP_IS_E1x(sc)
 
#define CHIP_IS_57712(sc)   (CHIP_NUM(sc) == CHIP_NUM_57712)
 
#define CHIP_IS_57712_MF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57712_MF)
 
#define CHIP_IS_57712_VF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57712_VF)
 
#define CHIP_IS_E2(sc)
 
#define CHIP_IS_57800(sc)   (CHIP_NUM(sc) == CHIP_NUM_57800)
 
#define CHIP_IS_57800_MF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57800_MF)
 
#define CHIP_IS_57800_VF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57800_VF)
 
#define CHIP_IS_57810(sc)   (CHIP_NUM(sc) == CHIP_NUM_57810)
 
#define CHIP_IS_57810_MF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57810_MF)
 
#define CHIP_IS_57810_VF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57810_VF)
 
#define CHIP_IS_57811(sc)   (CHIP_NUM(sc) == CHIP_NUM_57811)
 
#define CHIP_IS_57811_MF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57811_MF)
 
#define CHIP_IS_57811_VF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57811_VF)
 
#define CHIP_IS_57840(sc)
 
#define CHIP_IS_57840_MF(sc)
 
#define CHIP_IS_57840_VF(sc)   (CHIP_NUM(sc) == CHIP_NUM_57840_VF)
 
#define CHIP_IS_E3(sc)
 
#define CHIP_IS_E3A0(sc)
 
#define CHIP_IS_E3B0(sc)
 
#define USES_WARPCORE(sc)   (CHIP_IS_E3(sc))
 
#define CHIP_IS_E2E3(sc)
 
#define CHIP_IS_MF_CAP(sc)
 
#define IS_VF(sc)
 
#define IS_PF(sc)   (!IS_VF(sc))
 
#define CONFIGURE_NIC_MODE(sc)   (!CHIP_IS_E1x(sc) && !CNIC_ENABLED(sc))
 
#define CHIP_4_PORT_MODE   0x0
 
#define CHIP_2_PORT_MODE   0x1
 
#define CHIP_PORT_MODE_NONE   0x2
 
#define CHIP_PORT_MODE(sc)   ((sc)->devinfo.chip_port_mode)
 
#define CHIP_IS_MODE_4_PORT(sc)   (CHIP_PORT_MODE(sc) == CHIP_4_PORT_MODE)
 
#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(sc)
 
#define CHIP_INT_MODE_IS_BC(sc)   (!CHIP_INT_MODE_IS_NBC(sc))
 
#define NVRAM_1MB_SIZE   0x20000
 
#define NVRAM_TIMEOUT_COUNT   30000
 
#define NVRAM_PAGE_SIZE   256
 
#define BXE_PM_CAPABLE_FLAG   0x00000001
 
#define BXE_PCIE_CAPABLE_FLAG   0x00000002
 
#define BXE_MSI_CAPABLE_FLAG   0x00000004
 
#define BXE_MSIX_CAPABLE_FLAG   0x00000008
 
#define BXE_STATE_CLOSED   0x0000
 
#define BXE_STATE_OPENING_WAITING_LOAD   0x1000
 
#define BXE_STATE_OPENING_WAITING_PORT   0x2000
 
#define BXE_STATE_OPEN   0x3000
 
#define BXE_STATE_CLOSING_WAITING_HALT   0x4000
 
#define BXE_STATE_CLOSING_WAITING_DELETE   0x5000
 
#define BXE_STATE_CLOSING_WAITING_UNLOAD   0x6000
 
#define BXE_STATE_DISABLED   0xD000
 
#define BXE_STATE_DIAG   0xE000
 
#define BXE_STATE_ERROR   0xF000
 
#define BXE_ONE_PORT_FLAG   0x00000001
 
#define BXE_NO_ISCSI   0x00000002
 
#define BXE_NO_FCOE   0x00000004
 
#define BXE_ONE_PORT(sc)   (sc->flags & BXE_ONE_PORT_FLAG)
 
#define BXE_NO_MCP_FLAG   0x00000200
 
#define BXE_NOMCP(sc)   (sc->flags & BXE_NO_MCP_FLAG)
 
#define BXE_MF_FUNC_DIS   0x00000800
 
#define BXE_TX_SWITCHING   0x00001000
 
#define BXE_NO_PULSE   0x00002000
 
#define MAX_BARS   5
 
#define PERIODIC_STOP   0
 
#define PERIODIC_GO   1
 
#define CHIP_TQ_NONE   0
 
#define CHIP_TQ_START   1
 
#define CHIP_TQ_STOP   2
 
#define CHIP_TQ_REINIT   3
 
#define SC_PATH(sc)   (sc->path_id)
 
#define SC_PORT(sc)   (sc->pfunc_rel & 1)
 
#define SC_FUNC(sc)   (sc->pfunc_rel)
 
#define SC_ABS_FUNC(sc)   (sc->pfunc_abs)
 
#define SC_VN(sc)   (sc->pfunc_rel >> 1)
 
#define SC_L_ID(sc)   (SC_VN(sc) << 2)
 
#define PORT_ID(sc)   SC_PORT(sc)
 
#define PATH_ID(sc)   SC_PATH(sc)
 
#define VNIC_ID(sc)   SC_VN(sc)
 
#define FUNC_ID(sc)   SC_FUNC(sc)
 
#define ABS_FUNC_ID(sc)   SC_ABS_FUNC(sc)
 
#define SC_FW_MB_IDX_VN(sc, vn)
 
#define SC_FW_MB_IDX(sc)   SC_FW_MB_IDX_VN(sc, SC_VN(sc))
 
#define BXE_CORE_TRYLOCK(sc)   sx_try_xlock(&sc->core_sx)
 
#define BXE_CORE_LOCK(sc)   sx_xlock(&sc->core_sx)
 
#define BXE_CORE_UNLOCK(sc)   sx_xunlock(&sc->core_sx)
 
#define BXE_CORE_LOCK_ASSERT(sc)   sx_assert(&sc->core_sx, SA_XLOCKED)
 
#define BXE_SP_LOCK(sc)   mtx_lock(&sc->sp_mtx)
 
#define BXE_SP_UNLOCK(sc)   mtx_unlock(&sc->sp_mtx)
 
#define BXE_SP_LOCK_ASSERT(sc)   mtx_assert(&sc->sp_mtx, MA_OWNED)
 
#define BXE_DMAE_LOCK(sc)   mtx_lock(&sc->dmae_mtx)
 
#define BXE_DMAE_UNLOCK(sc)   mtx_unlock(&sc->dmae_mtx)
 
#define BXE_DMAE_LOCK_ASSERT(sc)   mtx_assert(&sc->dmae_mtx, MA_OWNED)
 
#define BXE_FWMB_LOCK(sc)   mtx_lock(&sc->fwmb_mtx)
 
#define BXE_FWMB_UNLOCK(sc)   mtx_unlock(&sc->fwmb_mtx)
 
#define BXE_FWMB_LOCK_ASSERT(sc)   mtx_assert(&sc->fwmb_mtx, MA_OWNED)
 
#define BXE_PRINT_LOCK(sc)   mtx_lock(&sc->print_mtx)
 
#define BXE_PRINT_UNLOCK(sc)   mtx_unlock(&sc->print_mtx)
 
#define BXE_PRINT_LOCK_ASSERT(sc)   mtx_assert(&sc->print_mtx, MA_OWNED)
 
#define BXE_STATS_LOCK(sc)   mtx_lock(&sc->stats_mtx)
 
#define BXE_STATS_UNLOCK(sc)   mtx_unlock(&sc->stats_mtx)
 
#define BXE_STATS_LOCK_ASSERT(sc)   mtx_assert(&sc->stats_mtx, MA_OWNED)
 
#define BXE_MCAST_LOCK(sc)   mtx_lock(&sc->mcast_mtx);
 
#define BXE_MCAST_UNLOCK(sc)   mtx_unlock(&sc->mcast_mtx);
 
#define BXE_MCAST_LOCK_ASSERT(sc)   mtx_assert(&sc->mcast_mtx, MA_OWNED)
 
#define DMAE_READY(sc)   (sc->dmae_ready)
 
#define BXE_RECOVERY_DONE   1
 
#define BXE_RECOVERY_INIT   2
 
#define BXE_RECOVERY_WAIT   3
 
#define BXE_RECOVERY_FAILED   4
 
#define BXE_RECOVERY_NIC_LOADING   5
 
#define BXE_ERR_TXQ_STUCK   0x1 /* Tx queue stuck detected by driver. */
 
#define BXE_ERR_MISC   0x2 /* MISC ERR */
 
#define BXE_ERR_PARITY   0x4 /* Parity error detected. */
 
#define BXE_ERR_STATS_TO   0x8 /* Statistics timeout detected. */
 
#define BXE_ERR_MC_ASSERT   0x10 /* MC assert attention received. */
 
#define BXE_ERR_PANIC   0x20 /* Driver asserted. */
 
#define BXE_ERR_MCP_ASSERT   0x40 /* MCP assert attention received. No Recovery*/
 
#define BXE_ERR_GLOBAL   0x80 /* PCIe/PXP/IGU/MISC/NIG device blocks error- needs PCIe/Fundamental reset */
 
#define BXE_RX_MODE_NONE   0
 
#define BXE_RX_MODE_NORMAL   1
 
#define BXE_RX_MODE_ALLMULTI   2
 
#define BXE_RX_MODE_PROMISC   3
 
#define BXE_MAX_MULTICAST   64
 
#define AUTO_GREEN_HW_DEFAULT   0
 
#define AUTO_GREEN_FORCE_ON   1
 
#define AUTO_GREEN_FORCE_OFF   2
 
#define INTR_MODE_INTX   0
 
#define INTR_MODE_MSI   1
 
#define INTR_MODE_MSIX   2
 
#define DEF_SB_IGU_ID   16
 
#define DEF_SB_ID   HC_SP_SB_ID
 
#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 NUM_EQ_PAGES   1 /* must be a power of 2 */
 
#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 SP_DESC_CNT   (BCM_PAGE_SIZE / sizeof(struct eth_spe))
 
#define MAX_SP_DESC_CNT   (SP_DESC_CNT - 1)
 
#define MAX_SPQ_PENDING   8
 
#define GUNZIP_BUF(sc)   (sc->gz_buf)
 
#define GUNZIP_OUTLEN(sc)   (sc->gz_outlen)
 
#define GUNZIP_PHYS(sc)   (sc->gz_buf_dma.paddr)
 
#define FW_BUF_SIZE   0x40000
 
#define INIT_MODE_FLAGS(sc)   (sc->init_mode_flags)
 
#define INIT_OPS(sc)   (sc->init_ops)
 
#define INIT_OPS_OFFSETS(sc)   (sc->init_ops_offsets)
 
#define INIT_DATA(sc)   (sc->init_data)
 
#define INIT_TSEM_INT_TABLE_DATA(sc)   (sc->tsem_int_table_data)
 
#define INIT_TSEM_PRAM_DATA(sc)   (sc->tsem_pram_data)
 
#define INIT_USEM_INT_TABLE_DATA(sc)   (sc->usem_int_table_data)
 
#define INIT_USEM_PRAM_DATA(sc)   (sc->usem_pram_data)
 
#define INIT_XSEM_INT_TABLE_DATA(sc)   (sc->xsem_int_table_data)
 
#define INIT_XSEM_PRAM_DATA(sc)   (sc->xsem_pram_data)
 
#define INIT_CSEM_INT_TABLE_DATA(sc)   (sc->csem_int_table_data)
 
#define INIT_CSEM_PRAM_DATA(sc)   (sc->csem_pram_data)
 
#define ILT_MAX_L2_LINES   8
 
#define ILT_MAX_LINES   256
 
#define BXE_MAX_RSS_COUNT(sc)   ((sc)->igu_sb_cnt - CNIC_SUPPORT(sc))
 
#define BXE_L2_MAX_CID(sc)    (BXE_MAX_RSS_COUNT(sc) * ECORE_MULTI_TX_COS + 2 * CNIC_SUPPORT(sc))
 
#define BXE_L2_CID_COUNT(sc)    (BXE_NUM_ETH_QUEUES(sc) * ECORE_MULTI_TX_COS + 2 * CNIC_SUPPORT(sc))
 
#define L2_ILT_LINES(sc)    (DIV_ROUND_UP(BXE_L2_CID_COUNT(sc), ILT_PAGE_CIDS))
 
#define BXE_DCB_STATE_OFF   0
 
#define BXE_DCB_STATE_ON   1
 
#define BXE_DCBX_ENABLED_OFF   0
 
#define BXE_DCBX_ENABLED_ON_NEG_OFF   1
 
#define BXE_DCBX_ENABLED_ON_NEG_ON   2
 
#define BXE_DCBX_ENABLED_INVALID   -1
 
#define CNIC_SUPPORT(sc)   0 /* ((sc)->cnic_support) */
 
#define CNIC_ENABLED(sc)   0 /* ((sc)->cnic_enabled) */
 
#define CNIC_LOADED(sc)   0 /* ((sc)->cnic_loaded) */
 
#define BXE_MAX_PRIORITY   8
 
#define BXE_IOC_RD_NVRAM   1
 
#define BXE_IOC_WR_NVRAM   2
 
#define BXE_IOC_STATS_SHOW_NUM   3
 
#define BXE_IOC_STATS_SHOW_STR   4
 
#define BXE_IOC_STATS_SHOW_CNT   5
 
#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 BAR0   0
 
#define BAR1   2
 
#define BAR2   4
 
#define REG_WR8(sc, offset, val)
 
#define REG_WR16(sc, offset, val)
 
#define REG_WR32(sc, offset, val)
 
#define REG_RD8(sc, offset)
 
#define REG_RD16(sc, offset)
 
#define REG_RD32(sc, offset)
 
#define REG_RD(sc, offset)   REG_RD32(sc, offset)
 
#define REG_WR(sc, offset, val)   REG_WR32(sc, offset, val)
 
#define REG_RD_IND(sc, offset)   bxe_reg_rd_ind(sc, offset)
 
#define REG_WR_IND(sc, offset, val)   bxe_reg_wr_ind(sc, offset, val)
 
#define BXE_SP(sc, var)   (&(sc)->sp->var)
 
#define BXE_SP_MAPPING(sc, var)    (sc->sp_dma.paddr + offsetof(struct bxe_slowpath, var))
 
#define BXE_FP(sc, nr, var)   ((sc)->fp[(nr)].var)
 
#define BXE_SP_OBJ(sc, fp)   ((sc)->sp_objs[(fp)->index])
 
#define REG_RD_DMAE(sc, offset, valp, len32)
 
#define REG_WR_DMAE(sc, offset, valp, len32)
 
#define REG_WR_DMAE_LEN(sc, offset, valp, len32)    REG_WR_DMAE(sc, offset, valp, len32)
 
#define REG_RD_DMAE_LEN(sc, offset, valp, len32)    REG_RD_DMAE(sc, offset, valp, len32)
 
#define VIRT_WR_DMAE_LEN(sc, data, addr, len32, le32_swap)
 
#define BXE_DB_MIN_SHIFT   3 /* 8 bytes */
 
#define BXE_DB_SHIFT   7 /* 128 bytes */
 
#define DPM_TRIGGER_TYPE   0x40
 
#define DOORBELL(sc, cid, val)
 
#define SHMEM_ADDR(sc, field)    (sc->devinfo.shmem_base + offsetof(struct shmem_region, field))
 
#define SHMEM_RD(sc, field)   REG_RD(sc, SHMEM_ADDR(sc, field))
 
#define SHMEM_RD16(sc, field)   REG_RD16(sc, SHMEM_ADDR(sc, field))
 
#define SHMEM_WR(sc, field, val)   REG_WR(sc, SHMEM_ADDR(sc, field), val)
 
#define SHMEM2_ADDR(sc, field)    (sc->devinfo.shmem2_base + offsetof(struct shmem2_region, field))
 
#define SHMEM2_HAS(sc, field)
 
#define SHMEM2_RD(sc, field)   REG_RD(sc, SHMEM2_ADDR(sc, field))
 
#define SHMEM2_WR(sc, field, val)   REG_WR(sc, SHMEM2_ADDR(sc, field), val)
 
#define MFCFG_ADDR(sc, field)    (sc->devinfo.mf_cfg_base + offsetof(struct mf_cfg, field))
 
#define MFCFG_RD(sc, field)   REG_RD(sc, MFCFG_ADDR(sc, field))
 
#define MFCFG_RD16(sc, field)   REG_RD16(sc, MFCFG_ADDR(sc, field))
 
#define MFCFG_WR(sc, field, val)   REG_WR(sc, MFCFG_ADDR(sc, field), val)
 
#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   (DMAE_SRC_PCI << DMAE_CMD_SRC_SHIFT)
 
#define DMAE_CMD_SRC_GRC   (DMAE_SRC_GRC << DMAE_CMD_SRC_SHIFT)
 
#define DMAE_CMD_DST_PCI   (DMAE_DST_PCI << DMAE_CMD_DST_SHIFT)
 
#define DMAE_CMD_DST_GRC   (DMAE_DST_GRC << DMAE_CMD_DST_SHIFT)
 
#define DMAE_CMD_C_DST_PCI   (DMAE_COMP_PCI << DMAE_CMD_C_DST_SHIFT)
 
#define DMAE_CMD_C_DST_GRC   (DMAE_COMP_GRC << DMAE_CMD_C_DST_SHIFT)
 
#define DMAE_CMD_ENDIANITY_NO_SWAP   (0 << DMAE_CMD_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_B_SWAP   (1 << DMAE_CMD_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_DW_SWAP   (2 << DMAE_CMD_ENDIANITY_SHIFT)
 
#define DMAE_CMD_ENDIANITY_B_DW_SWAP   (3 << DMAE_CMD_ENDIANITY_SHIFT)
 
#define DMAE_CMD_PORT_0   0
 
#define DMAE_CMD_PORT_1   DMAE_CMD_PORT
 
#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(sc)   (CHIP_IS_E1(sc) ? 0x400 : 0x2000)
 
#define DMAE_COMP_VAL   0x60d0d0ae /* E2 and beyond, upper bit indicates error */
 
#define MAX_DMAE_C_PER_PORT   8
 
#define INIT_DMAE_C(sc)   ((SC_PORT(sc) * MAX_DMAE_C_PER_PORT) + SC_VN(sc))
 
#define PMF_DMAE_C(sc)   ((SC_PORT(sc) * MAX_DMAE_C_PER_PORT) + E1HVN_MAX)
 
#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 AEU_IN_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR    AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR
 
#define MAX_IGU_ATTN_ACK_TO   100
 
#define STORM_ASSERT_ARRAY_SIZE   50
 
#define BXE_PMF_LINK_ASSERT(sc)    GENERAL_ATTEN_OFFSET(LINK_SYNC_ATTENTION_BIT_FUNC_0 + SC_FUNC(sc))
 
#define BXE_MC_ASSERT_BITS
 
#define BXE_MCP_ASSERT    GENERAL_ATTEN_OFFSET(MCP_FATAL_ASSERT_ATTENTION_BIT)
 
#define BXE_GRC_TIMEOUT   GENERAL_ATTEN_OFFSET(LATCHED_ATTN_TIMEOUT_GRC)
 
#define BXE_GRC_RSV
 
#define MULTI_MASK   0x7f
 
#define PFS_PER_PORT(sc)    ((CHIP_PORT_MODE(sc) == CHIP_4_PORT_MODE) ? 2 : 4)
 
#define SC_MAX_VN_NUM(sc)   PFS_PER_PORT(sc)
 
#define FIRST_ABS_FUNC_IN_PORT(sc)
 
#define FOREACH_ABS_FUNC_IN_PORT(sc, i)
 
#define BXE_SWCID_SHIFT   17
 
#define BXE_SWCID_MASK   ((0x1 << BXE_SWCID_SHIFT) - 1)
 
#define SW_CID(x)   (le32toh(x) & BXE_SWCID_MASK)
 
#define CQE_CMD(x)   (le32toh(x) >> COMMON_RAMROD_ETH_RX_CQE_CMD_ID_SHIFT)
 
#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 HW_CID(sc, x)    ((SC_PORT(sc) << 23) | (SC_VN(sc) << BXE_SWCID_SHIFT) | (x))
 
#define SPEED_10   10
 
#define SPEED_100   100
 
#define SPEED_1000   1000
 
#define SPEED_2500   2500
 
#define SPEED_10000   10000
 
#define PCI_PM_D0   1
 
#define PCI_PM_D3hot   2
 
#define DUPLEX_UNKNOWN   (0xff)
 
#define SPEED_UNKNOWN   (-1)
 
#define AUTONEG_DISABLE   0x00
 
#define AUTONEG_ENABLE   0x01
 
#define PORT_TP   0x00
 
#define PORT_AUI   0x01
 
#define PORT_MII   0x02
 
#define PORT_FIBRE   0x03
 
#define PORT_BNC   0x04
 
#define PORT_DA   0x05
 
#define PORT_NONE   0xef
 
#define PORT_OTHER   0xff
 
#define DBG_LOAD   0x00000001 /* load and unload */
 
#define DBG_INTR   0x00000002 /* interrupt handling */
 
#define DBG_SP   0x00000004 /* slowpath handling */
 
#define DBG_STATS   0x00000008 /* stats updates */
 
#define DBG_TX   0x00000010 /* packet transmit */
 
#define DBG_RX   0x00000020 /* packet receive */
 
#define DBG_PHY   0x00000040 /* phy/link handling */
 
#define DBG_IOCTL   0x00000080 /* ioctl handling */
 
#define DBG_MBUF   0x00000100 /* dumping mbuf info */
 
#define DBG_REGS   0x00000200 /* register access */
 
#define DBG_LRO   0x00000400 /* lro processing */
 
#define DBG_ASSERT   0x80000000 /* debug assert */
 
#define DBG_ALL   0xFFFFFFFF /* flying monkeys */
 
#define DBASSERT(sc, exp, msg)
 
#define BLOGD(sc, codepath, format, args...)
 
#define BLOGI(sc, format, args...)
 
#define BLOGW(sc, format, args...)
 
#define BLOGE(sc, format, args...)
 
#define bxe_panic(sc, msg)    device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);
 
#define CATC_TRIGGER(sc, data)   REG_WR((sc), 0x2000, (data));
 
#define CATC_TRIGGER_START(sc)   CATC_TRIGGER((sc), 0xcafecafe)
 
#define BXE_SET_FLOWID(m)   M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE)
 
#define BXE_VALID_FLOWID(m)   (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
 

Enumerations

enum  { OOO_IDX_OFFSET , FCOE_IDX_OFFSET , FWD_IDX_OFFSET }
 
enum  { BXE_PORT_QUERY_IDX , BXE_PF_QUERY_IDX , BXE_FCOE_QUERY_IDX , BXE_FIRST_QUEUE_QUERY_IDX }
 
enum  { BXE_LINK_REPORT_FULL_DUPLEX , BXE_LINK_REPORT_LINK_DOWN , BXE_LINK_REPORT_RX_FC_ON , BXE_LINK_REPORT_TX_FC_ON }
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int bxe_ilog2 (int x)
 
int bxe_test_bit (int nr, volatile unsigned long *addr)
 
void bxe_set_bit (unsigned int nr, volatile unsigned long *addr)
 
void bxe_clear_bit (int nr, volatile unsigned long *addr)
 
int bxe_test_and_set_bit (int nr, volatile unsigned long *addr)
 
int bxe_test_and_clear_bit (int nr, volatile unsigned long *addr)
 
int bxe_cmpxchg (volatile int *addr, int old, int new)
 
void bxe_reg_wr_ind (struct bxe_softc *sc, uint32_t addr, uint32_t val)
 
uint32_t bxe_reg_rd_ind (struct bxe_softc *sc, uint32_t addr)
 
int bxe_dma_alloc (struct bxe_softc *sc, bus_size_t size, struct bxe_dma *dma, const char *msg)
 
void bxe_dma_free (struct bxe_softc *sc, struct bxe_dma *dma)
 
uint32_t bxe_dmae_opcode_add_comp (uint32_t opcode, uint8_t comp_type)
 
uint32_t bxe_dmae_opcode_clr_src_reset (uint32_t opcode)
 
uint32_t bxe_dmae_opcode (struct bxe_softc *sc, uint8_t src_type, uint8_t dst_type, uint8_t with_comp, uint8_t comp_type)
 
void bxe_post_dmae (struct bxe_softc *sc, struct dmae_cmd *dmae, int idx)
 
void bxe_read_dmae (struct bxe_softc *sc, uint32_t src_addr, uint32_t len32)
 
void bxe_write_dmae (struct bxe_softc *sc, bus_addr_t dma_addr, uint32_t dst_addr, uint32_t len32)
 
void bxe_write_dmae_phys_len (struct bxe_softc *sc, bus_addr_t phys_addr, uint32_t addr, uint32_t len)
 
void bxe_set_ctx_validation (struct bxe_softc *sc, struct eth_context *cxt, uint32_t cid)
 
void bxe_update_coalesce_sb_index (struct bxe_softc *sc, uint8_t fw_sb_id, uint8_t sb_index, uint8_t disable, uint16_t usec)
 
int bxe_sp_post (struct bxe_softc *sc, int command, int cid, uint32_t data_hi, uint32_t data_lo, int cmd_type)
 
void bxe_igu_ack_sb (struct bxe_softc *sc, uint8_t igu_sb_id, uint8_t segment, uint16_t index, uint8_t op, uint8_t update)
 
void ecore_init_e1_firmware (struct bxe_softc *sc)
 
void ecore_init_e1h_firmware (struct bxe_softc *sc)
 
void ecore_init_e2_firmware (struct bxe_softc *sc)
 
void ecore_storm_memset_struct (struct bxe_softc *sc, uint32_t addr, size_t size, uint32_t *data)
 
void bxe_dump_mem (struct bxe_softc *sc, char *tag, uint8_t *mem, uint32_t len)
 
void bxe_dump_mbuf_data (struct bxe_softc *sc, char *pTag, struct mbuf *m, uint8_t contents)
 
static uint32_t reg_poll (struct bxe_softc *sc, uint32_t reg, uint32_t expected, int ms, int wait)
 
static void bxe_update_fp_sb_idx (struct bxe_fastpath *fp)
 
static void bxe_igu_ack_sb_gen (struct bxe_softc *sc, uint8_t igu_sb_id, uint8_t segment, uint16_t index, uint8_t op, uint8_t update, uint32_t igu_addr)
 
static void bxe_hc_ack_sb (struct bxe_softc *sc, uint8_t sb_id, uint8_t storm, uint16_t index, uint8_t op, uint8_t update)
 
static void bxe_ack_sb (struct bxe_softc *sc, uint8_t igu_sb_id, uint8_t storm, uint16_t index, uint8_t op, uint8_t update)
 
static uint16_t bxe_hc_ack_int (struct bxe_softc *sc)
 
static uint16_t bxe_igu_ack_int (struct bxe_softc *sc)
 
static uint16_t bxe_ack_int (struct bxe_softc *sc)
 
static int func_by_vn (struct bxe_softc *sc, int vn)
 
static uint8_t bxe_stats_id (struct bxe_fastpath *fp)
 

Variables

static const uint32_t dmae_reg_go_c []
 

Macro Definition Documentation

◆ __LITTLE_ENDIAN

#define __LITTLE_ENDIAN

Definition at line 93 of file bxe.h.

◆ __SGE_MASK_CLEAR_BIT

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

Definition at line 386 of file bxe.h.

◆ __SGE_MASK_SET_BIT

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

Definition at line 381 of file bxe.h.

◆ ABS_FUNC_ID

#define ABS_FUNC_ID (   sc)    SC_ABS_FUNC(sc)

Definition at line 1398 of file bxe.h.

◆ ADVERTISED_10000baseT_Full

#define ADVERTISED_10000baseT_Full   (1 << 16)

Definition at line 1013 of file bxe.h.

◆ ADVERTISED_1000baseT_Full

#define ADVERTISED_1000baseT_Full   (1 << 6)

Definition at line 1006 of file bxe.h.

◆ ADVERTISED_1000baseT_Half

#define ADVERTISED_1000baseT_Half   (1 << 5)

Definition at line 1005 of file bxe.h.

◆ ADVERTISED_100baseT_Full

#define ADVERTISED_100baseT_Full   (1 << 4)

Definition at line 1004 of file bxe.h.

◆ ADVERTISED_100baseT_Half

#define ADVERTISED_100baseT_Half   (1 << 3)

Definition at line 1003 of file bxe.h.

◆ ADVERTISED_10baseT_Full

#define ADVERTISED_10baseT_Full   (1 << 2)

Definition at line 1002 of file bxe.h.

◆ ADVERTISED_10baseT_Half

#define ADVERTISED_10baseT_Half   (1 << 1)

Definition at line 1001 of file bxe.h.

◆ ADVERTISED_2500baseX_Full

#define ADVERTISED_2500baseX_Full   (1 << 15)

Definition at line 1012 of file bxe.h.

◆ ADVERTISED_Asym_Pause

#define ADVERTISED_Asym_Pause   (1 << 10)

Definition at line 1010 of file bxe.h.

◆ ADVERTISED_Autoneg

#define ADVERTISED_Autoneg   (1 << 9)

Definition at line 1009 of file bxe.h.

◆ ADVERTISED_FIBRE

#define ADVERTISED_FIBRE   (1 << 8)

Definition at line 1008 of file bxe.h.

◆ ADVERTISED_Pause

#define ADVERTISED_Pause   (1 << 11)

Definition at line 1011 of file bxe.h.

◆ ADVERTISED_TP

#define ADVERTISED_TP   (1 << 7)

Definition at line 1007 of file bxe.h.

◆ AEU_IN_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR

#define AEU_IN_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR    AEU_INPUTS_ATTN_BITS_PXPPCICLOCKCLIENT_PARITY_ERROR

Definition at line 2022 of file bxe.h.

◆ AFEX_VLAN_MODE

#define AFEX_VLAN_MODE (   sc)    ((sc)->devinfo.mf_info.afex_vlan_mode)

Definition at line 1070 of file bxe.h.

◆ ARRSIZE

#define ARRSIZE (   arr)    (sizeof(arr) / sizeof((arr)[0]))

Definition at line 124 of file bxe.h.

◆ ATTENTION_ID

#define ATTENTION_ID   4

Definition at line 2020 of file bxe.h.

◆ ATTN_GENERAL_ATTN_1

#define ATTN_GENERAL_ATTN_1   (1L << 13)

Definition at line 2013 of file bxe.h.

◆ ATTN_GENERAL_ATTN_2

#define ATTN_GENERAL_ATTN_2   (1L << 14)

Definition at line 2014 of file bxe.h.

◆ ATTN_GENERAL_ATTN_3

#define ATTN_GENERAL_ATTN_3   (1L << 15)

Definition at line 2015 of file bxe.h.

◆ ATTN_GENERAL_ATTN_4

#define ATTN_GENERAL_ATTN_4   (1L << 13)

Definition at line 2016 of file bxe.h.

◆ ATTN_GENERAL_ATTN_5

#define ATTN_GENERAL_ATTN_5   (1L << 14)

Definition at line 2017 of file bxe.h.

◆ ATTN_GENERAL_ATTN_6

#define ATTN_GENERAL_ATTN_6   (1L << 15)

Definition at line 2018 of file bxe.h.

◆ ATTN_HARD_WIRED_MASK

#define ATTN_HARD_WIRED_MASK   0xff00

Definition at line 2019 of file bxe.h.

◆ ATTN_NIG_FOR_FUNC

#define ATTN_NIG_FOR_FUNC   (1L << 8)

Definition at line 2008 of file bxe.h.

◆ ATTN_SW_TIMER_4_FUNC

#define ATTN_SW_TIMER_4_FUNC   (1L << 9)

Definition at line 2009 of file bxe.h.

◆ AUTO_GREEN_FORCE_OFF

#define AUTO_GREEN_FORCE_OFF   2

Definition at line 1535 of file bxe.h.

◆ AUTO_GREEN_FORCE_ON

#define AUTO_GREEN_FORCE_ON   1

Definition at line 1534 of file bxe.h.

◆ AUTO_GREEN_HW_DEFAULT

#define AUTO_GREEN_HW_DEFAULT   0

Definition at line 1533 of file bxe.h.

◆ AUTONEG_DISABLE

#define AUTONEG_DISABLE   0x00

Definition at line 2098 of file bxe.h.

◆ AUTONEG_ENABLE

#define AUTONEG_ENABLE   0x01

Definition at line 2099 of file bxe.h.

◆ BAR0

#define BAR0   0

Definition at line 1818 of file bxe.h.

◆ BAR1

#define BAR1   2

Definition at line 1819 of file bxe.h.

◆ BAR2

#define BAR2   4

Definition at line 1820 of file bxe.h.

◆ BCM_PAGE_ALIGN

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

Definition at line 161 of file bxe.h.

◆ BCM_PAGE_MASK

#define BCM_PAGE_MASK   (~(BCM_PAGE_SIZE - 1))

Definition at line 160 of file bxe.h.

◆ BCM_PAGE_SHIFT

#define BCM_PAGE_SHIFT   12

Definition at line 158 of file bxe.h.

◆ BCM_PAGE_SIZE

#define BCM_PAGE_SIZE   (1 << BCM_PAGE_SHIFT)

Definition at line 159 of file bxe.h.

◆ BD_TH_HI

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

Definition at line 323 of file bxe.h.

◆ BD_TH_LO

#define BD_TH_LO (   sc)
Value:
(NUM_BD_REQ(sc) + \
NUM_BD_PG_REQ(sc) * RX_BD_NEXT_PAGE_DESC_CNT + \
FW_DROP_LEVEL(sc))
#define NUM_BD_REQ(sc)
Definition: bxe.h:315
#define RX_BD_NEXT_PAGE_DESC_CNT
Definition: bxe.h:295

Definition at line 319 of file bxe.h.

◆ BLOGD

#define BLOGD (   sc,
  codepath,
  format,
  args... 
)
Value:
do { \
if (__predict_false(sc->debug & (codepath))) { \
device_printf((sc)->dev, \
"%s(%s:%d) " format, \
__FUNCTION__, \
__FILE__, \
__LINE__, \
## args); \
} \
} while(0)

Definition at line 2188 of file bxe.h.

◆ BLOGE

#define BLOGE (   sc,
  format,
  args... 
)
Value:
do { \
if (__predict_false(sc->debug)) { \
device_printf((sc)->dev, \
"%s(%s:%d) ERROR: " format, \
__FUNCTION__, \
__FILE__, \
__LINE__, \
## args); \
} else { \
device_printf((sc)->dev, \
"ERROR: " format, \
## args); \
} \
} while(0)

Definition at line 2235 of file bxe.h.

◆ BLOGI

#define BLOGI (   sc,
  format,
  args... 
)
Value:
do { \
if (__predict_false(sc->debug)) { \
device_printf((sc)->dev, \
"%s(%s:%d) " format, \
__FUNCTION__, \
__FILE__, \
__LINE__, \
## args); \
} else { \
device_printf((sc)->dev, \
format, \
## args); \
} \
} while(0)

Definition at line 2201 of file bxe.h.

◆ BLOGW

#define BLOGW (   sc,
  format,
  args... 
)
Value:
do { \
if (__predict_false(sc->debug)) { \
device_printf((sc)->dev, \
"%s(%s:%d) WARNING: " format, \
__FUNCTION__, \
__FILE__, \
__LINE__, \
## args); \
} else { \
device_printf((sc)->dev, \
"WARNING: " format, \
## args); \
} \
} while(0)

Definition at line 2218 of file bxe.h.

◆ BRB_SIZE

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

Definition at line 194 of file bxe.h.

◆ BRCM_VENDORID

#define BRCM_VENDORID   0x14e4

Definition at line 145 of file bxe.h.

◆ BXE_BR_SIZE

#define BXE_BR_SIZE   4096

Definition at line 683 of file bxe.h.

◆ BXE_CIDS_PER_VF

#define BXE_CIDS_PER_VF   (1 << BXE_VF_CID_WND)

Definition at line 690 of file bxe.h.

◆ BXE_CLIENTS_PER_VF

#define BXE_CLIENTS_PER_VF   1

Definition at line 691 of file bxe.h.

◆ BXE_CORE_LOCK

#define BXE_CORE_LOCK (   sc)    sx_xlock(&sc->core_sx)

Definition at line 1435 of file bxe.h.

◆ BXE_CORE_LOCK_ASSERT

#define BXE_CORE_LOCK_ASSERT (   sc)    sx_assert(&sc->core_sx, SA_XLOCKED)

Definition at line 1437 of file bxe.h.

◆ BXE_CORE_LOCK_SX

#define BXE_CORE_LOCK_SX

Definition at line 910 of file bxe.h.

◆ BXE_CORE_TRYLOCK

#define BXE_CORE_TRYLOCK (   sc)    sx_try_xlock(&sc->core_sx)

Definition at line 1434 of file bxe.h.

◆ BXE_CORE_UNLOCK

#define BXE_CORE_UNLOCK (   sc)    sx_xunlock(&sc->core_sx)

Definition at line 1436 of file bxe.h.

◆ BXE_DB_MIN_SHIFT

#define BXE_DB_MIN_SHIFT   3 /* 8 bytes */

Definition at line 1914 of file bxe.h.

◆ BXE_DB_SHIFT

#define BXE_DB_SHIFT   7 /* 128 bytes */

Definition at line 1915 of file bxe.h.

◆ BXE_DCB_STATE_OFF

#define BXE_DCB_STATE_OFF   0

Definition at line 1732 of file bxe.h.

◆ BXE_DCB_STATE_ON

#define BXE_DCB_STATE_ON   1

Definition at line 1733 of file bxe.h.

◆ BXE_DCBX_ENABLED_INVALID

#define BXE_DCBX_ENABLED_INVALID   -1

Definition at line 1739 of file bxe.h.

◆ BXE_DCBX_ENABLED_OFF

#define BXE_DCBX_ENABLED_OFF   0

Definition at line 1736 of file bxe.h.

◆ BXE_DCBX_ENABLED_ON_NEG_OFF

#define BXE_DCBX_ENABLED_ON_NEG_OFF   1

Definition at line 1737 of file bxe.h.

◆ BXE_DCBX_ENABLED_ON_NEG_ON

#define BXE_DCBX_ENABLED_ON_NEG_ON   2

Definition at line 1738 of file bxe.h.

◆ BXE_DMAE_LOCK

#define BXE_DMAE_LOCK (   sc)    mtx_lock(&sc->dmae_mtx)

Definition at line 1449 of file bxe.h.

◆ BXE_DMAE_LOCK_ASSERT

#define BXE_DMAE_LOCK_ASSERT (   sc)    mtx_assert(&sc->dmae_mtx, MA_OWNED)

Definition at line 1451 of file bxe.h.

◆ BXE_DMAE_UNLOCK

#define BXE_DMAE_UNLOCK (   sc)    mtx_unlock(&sc->dmae_mtx)

Definition at line 1450 of file bxe.h.

◆ BXE_ERR_GLOBAL

#define BXE_ERR_GLOBAL   0x80 /* PCIe/PXP/IGU/MISC/NIG device blocks error- needs PCIe/Fundamental reset */

Definition at line 1510 of file bxe.h.

◆ BXE_ERR_MC_ASSERT

#define BXE_ERR_MC_ASSERT   0x10 /* MC assert attention received. */

Definition at line 1507 of file bxe.h.

◆ BXE_ERR_MCP_ASSERT

#define BXE_ERR_MCP_ASSERT   0x40 /* MCP assert attention received. No Recovery*/

Definition at line 1509 of file bxe.h.

◆ BXE_ERR_MISC

#define BXE_ERR_MISC   0x2 /* MISC ERR */

Definition at line 1504 of file bxe.h.

◆ BXE_ERR_PANIC

#define BXE_ERR_PANIC   0x20 /* Driver asserted. */

Definition at line 1508 of file bxe.h.

◆ BXE_ERR_PARITY

#define BXE_ERR_PARITY   0x4 /* Parity error detected. */

Definition at line 1505 of file bxe.h.

◆ BXE_ERR_STATS_TO

#define BXE_ERR_STATS_TO   0x8 /* Statistics timeout detected. */

Definition at line 1506 of file bxe.h.

◆ BXE_ERR_TXQ_STUCK

#define BXE_ERR_TXQ_STUCK   0x1 /* Tx queue stuck detected by driver. */

Definition at line 1503 of file bxe.h.

◆ bxe_fcoe

#define bxe_fcoe (   sc,
  var 
)    (bxe_fcoe_fp(sc)->var)

Definition at line 845 of file bxe.h.

◆ bxe_fcoe_fp

#define bxe_fcoe_fp (   sc)    (&sc->fp[FCOE_IDX(sc)])

Definition at line 844 of file bxe.h.

◆ bxe_fcoe_inner_sp_obj

#define bxe_fcoe_inner_sp_obj (   sc)    (&sc->sp_objs[FCOE_IDX(sc)])

Definition at line 846 of file bxe.h.

◆ bxe_fcoe_sp_obj

#define bxe_fcoe_sp_obj (   sc,
  var 
)    (bxe_fcoe_inner_sp_obj(sc)->var)

Definition at line 847 of file bxe.h.

◆ bxe_fcoe_tx

#define bxe_fcoe_tx (   sc,
  var 
)    (bxe_fcoe_fp(sc)->txdata_ptr[FIRST_TX_COS_INDEX]->var)

Definition at line 848 of file bxe.h.

◆ BXE_FIRST_VF_CID

#define BXE_FIRST_VF_CID   256

Definition at line 692 of file bxe.h.

◆ BXE_FP

#define BXE_FP (   sc,
  nr,
  var 
)    ((sc)->fp[(nr)].var)

Definition at line 1884 of file bxe.h.

◆ BXE_FP_RX_LOCK

#define BXE_FP_RX_LOCK (   fp)    mtx_lock(&fp->rx_mtx)

Definition at line 556 of file bxe.h.

◆ BXE_FP_RX_LOCK_ASSERT

#define BXE_FP_RX_LOCK_ASSERT (   fp)    mtx_assert(&fp->rx_mtx, MA_OWNED)

Definition at line 558 of file bxe.h.

◆ BXE_FP_RX_UNLOCK

#define BXE_FP_RX_UNLOCK (   fp)    mtx_unlock(&fp->rx_mtx)

Definition at line 557 of file bxe.h.

◆ BXE_FP_STATE_CLOSED

#define BXE_FP_STATE_CLOSED   0x01

Definition at line 611 of file bxe.h.

◆ BXE_FP_STATE_HALTED

#define BXE_FP_STATE_HALTED   0x20

Definition at line 616 of file bxe.h.

◆ BXE_FP_STATE_HALTING

#define BXE_FP_STATE_HALTING   0x10

Definition at line 615 of file bxe.h.

◆ BXE_FP_STATE_IRQ

#define BXE_FP_STATE_IRQ   0x02

Definition at line 612 of file bxe.h.

◆ BXE_FP_STATE_OPEN

#define BXE_FP_STATE_OPEN   0x08

Definition at line 614 of file bxe.h.

◆ BXE_FP_STATE_OPENING

#define BXE_FP_STATE_OPENING   0x04

Definition at line 613 of file bxe.h.

◆ BXE_FP_TX_LOCK

#define BXE_FP_TX_LOCK (   fp)    mtx_lock(&fp->tx_mtx)

Definition at line 551 of file bxe.h.

◆ BXE_FP_TX_LOCK_ASSERT

#define BXE_FP_TX_LOCK_ASSERT (   fp)    mtx_assert(&fp->tx_mtx, MA_OWNED)

Definition at line 553 of file bxe.h.

◆ BXE_FP_TX_TRYLOCK

#define BXE_FP_TX_TRYLOCK (   fp)    mtx_trylock(&fp->tx_mtx)

Definition at line 554 of file bxe.h.

◆ BXE_FP_TX_UNLOCK

#define BXE_FP_TX_UNLOCK (   fp)    mtx_unlock(&fp->tx_mtx)

Definition at line 552 of file bxe.h.

◆ BXE_FW_RX_ALIGN_END

#define BXE_FW_RX_ALIGN_END   (1 << BXE_RX_ALIGN_SHIFT)

Definition at line 450 of file bxe.h.

◆ BXE_FW_RX_ALIGN_START

#define BXE_FW_RX_ALIGN_START   (1 << BXE_RX_ALIGN_SHIFT)

Definition at line 449 of file bxe.h.

◆ bxe_fwd

#define bxe_fwd (   sc,
  var 
)    (bxe_fwd_fp(sc)->var)

Definition at line 858 of file bxe.h.

◆ bxe_fwd_fp

#define bxe_fwd_fp (   sc)    (&sc->fp[FWD_IDX(sc)])

Definition at line 857 of file bxe.h.

◆ bxe_fwd_inner_sp_obj

#define bxe_fwd_inner_sp_obj (   sc)    (&sc->sp_objs[FWD_IDX(sc)])

Definition at line 859 of file bxe.h.

◆ bxe_fwd_sp_obj

#define bxe_fwd_sp_obj (   sc,
  var 
)    (bxe_fwd_inner_sp_obj(sc)->var)

Definition at line 860 of file bxe.h.

◆ bxe_fwd_txdata

#define bxe_fwd_txdata (   fp)    (fp->txdata_ptr[FIRST_TX_COS_INDEX])

Definition at line 861 of file bxe.h.

◆ BXE_FWMB_LOCK

#define BXE_FWMB_LOCK (   sc)    mtx_lock(&sc->fwmb_mtx)

Definition at line 1453 of file bxe.h.

◆ BXE_FWMB_LOCK_ASSERT

#define BXE_FWMB_LOCK_ASSERT (   sc)    mtx_assert(&sc->fwmb_mtx, MA_OWNED)

Definition at line 1455 of file bxe.h.

◆ BXE_FWMB_UNLOCK

#define BXE_FWMB_UNLOCK (   sc)    mtx_unlock(&sc->fwmb_mtx)

Definition at line 1454 of file bxe.h.

◆ BXE_GRC_RSV

#define BXE_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))
#define LATCHED_ATTN_RSVD_GRC
Definition: ecore_reg.h:2145
#define LATCHED_ATTN_RBCR
Definition: ecore_reg.h:2139
#define LATCHED_ATTN_RBCP
Definition: ecore_reg.h:2143
#define LATCHED_ATTN_RBCT
Definition: ecore_reg.h:2140
#define LATCHED_ATTN_RBCU
Definition: ecore_reg.h:2142
#define GENERAL_ATTEN_OFFSET(atten_name)
Definition: ecore_reg.h:2152
#define LATCHED_ATTN_RBCN
Definition: ecore_reg.h:2141

Definition at line 2042 of file bxe.h.

◆ BXE_GRC_TIMEOUT

#define BXE_GRC_TIMEOUT   GENERAL_ATTEN_OFFSET(LATCHED_ATTN_TIMEOUT_GRC)

Definition at line 2041 of file bxe.h.

◆ BXE_IGU_STAS_MSG_PF_CNT

#define BXE_IGU_STAS_MSG_PF_CNT   4

Definition at line 894 of file bxe.h.

◆ BXE_IGU_STAS_MSG_VF_CNT

#define BXE_IGU_STAS_MSG_VF_CNT   64

Definition at line 893 of file bxe.h.

◆ BXE_IOC_RD_NVRAM

#define BXE_IOC_RD_NVRAM   1

Definition at line 1771 of file bxe.h.

◆ BXE_IOC_STATS_SHOW_CNT

#define BXE_IOC_STATS_SHOW_CNT   5

Definition at line 1775 of file bxe.h.

◆ BXE_IOC_STATS_SHOW_NUM

#define BXE_IOC_STATS_SHOW_NUM   3

Definition at line 1773 of file bxe.h.

◆ BXE_IOC_STATS_SHOW_STR

#define BXE_IOC_STATS_SHOW_STR   4

Definition at line 1774 of file bxe.h.

◆ BXE_IOC_WR_NVRAM

#define BXE_IOC_WR_NVRAM   2

Definition at line 1772 of file bxe.h.

◆ BXE_L2_CID_COUNT

#define BXE_L2_CID_COUNT (   sc)     (BXE_NUM_ETH_QUEUES(sc) * ECORE_MULTI_TX_COS + 2 * CNIC_SUPPORT(sc))

Definition at line 1674 of file bxe.h.

◆ BXE_L2_MAX_CID

#define BXE_L2_MAX_CID (   sc)     (BXE_MAX_RSS_COUNT(sc) * ECORE_MULTI_TX_COS + 2 * CNIC_SUPPORT(sc))

Definition at line 1667 of file bxe.h.

◆ BXE_MAX_MULTICAST

#define BXE_MAX_MULTICAST   64

Definition at line 1518 of file bxe.h.

◆ BXE_MAX_NUM_OF_VFS

#define BXE_MAX_NUM_OF_VFS   64

Definition at line 688 of file bxe.h.

◆ BXE_MAX_PRIORITY

#define BXE_MAX_PRIORITY   8

Definition at line 1754 of file bxe.h.

◆ BXE_MAX_RSS_COUNT

#define BXE_MAX_RSS_COUNT (   sc)    ((sc)->igu_sb_cnt - CNIC_SUPPORT(sc))

Definition at line 1664 of file bxe.h.

◆ BXE_MAX_SEGMENTS

#define BXE_MAX_SEGMENTS   12 /* 13-1 for parsing buffer */

Definition at line 188 of file bxe.h.

◆ BXE_MC_ASSERT_BITS

#define BXE_MC_ASSERT_BITS
Value:
GENERAL_ATTEN_OFFSET(USTORM_FATAL_ASSERT_ATTENTION_BIT) | \
GENERAL_ATTEN_OFFSET(CSTORM_FATAL_ASSERT_ATTENTION_BIT) | \
GENERAL_ATTEN_OFFSET(XSTORM_FATAL_ASSERT_ATTENTION_BIT))
#define TSTORM_FATAL_ASSERT_ATTENTION_BIT
Definition: ecore_reg.h:2113
#define XSTORM_FATAL_ASSERT_ATTENTION_BIT
Definition: ecore_reg.h:2116
#define USTORM_FATAL_ASSERT_ATTENTION_BIT
Definition: ecore_reg.h:2114
#define CSTORM_FATAL_ASSERT_ATTENTION_BIT
Definition: ecore_reg.h:2115

Definition at line 2032 of file bxe.h.

◆ BXE_MCAST_LOCK

#define BXE_MCAST_LOCK (   sc)    mtx_lock(&sc->mcast_mtx);

Definition at line 1465 of file bxe.h.

◆ BXE_MCAST_LOCK_ASSERT

#define BXE_MCAST_LOCK_ASSERT (   sc)    mtx_assert(&sc->mcast_mtx, MA_OWNED)

Definition at line 1467 of file bxe.h.

◆ BXE_MCAST_UNLOCK

#define BXE_MCAST_UNLOCK (   sc)    mtx_unlock(&sc->mcast_mtx);

Definition at line 1466 of file bxe.h.

◆ BXE_MCP_ASSERT

Definition at line 2038 of file bxe.h.

◆ BXE_MF_FUNC_DIS

#define BXE_MF_FUNC_DIS   0x00000800

Definition at line 1341 of file bxe.h.

◆ BXE_MSI_CAPABLE_FLAG

#define BXE_MSI_CAPABLE_FLAG   0x00000004

Definition at line 1270 of file bxe.h.

◆ BXE_MSIX_CAPABLE_FLAG

#define BXE_MSIX_CAPABLE_FLAG   0x00000008

Definition at line 1271 of file bxe.h.

◆ BXE_NO_FCOE

#define BXE_NO_FCOE   0x00000004

Definition at line 1331 of file bxe.h.

◆ BXE_NO_ISCSI

#define BXE_NO_ISCSI   0x00000002

Definition at line 1330 of file bxe.h.

◆ BXE_NO_MCP_FLAG

#define BXE_NO_MCP_FLAG   0x00000200

Definition at line 1338 of file bxe.h.

◆ BXE_NO_PULSE

#define BXE_NO_PULSE   0x00002000

Definition at line 1343 of file bxe.h.

◆ BXE_NOMCP

#define BXE_NOMCP (   sc)    (sc->flags & BXE_NO_MCP_FLAG)

Definition at line 1339 of file bxe.h.

◆ BXE_NUM_ETH_QUEUES

#define BXE_NUM_ETH_QUEUES (   sc)    BXE_NUM_QUEUES(sc)

Definition at line 813 of file bxe.h.

◆ BXE_NUM_NON_CNIC_QUEUES

#define BXE_NUM_NON_CNIC_QUEUES (   sc)    BXE_NUM_QUEUES(sc)

Definition at line 814 of file bxe.h.

◆ BXE_NUM_QUEUES

#define BXE_NUM_QUEUES (   sc)    ((sc)->num_queues)

Definition at line 812 of file bxe.h.

◆ BXE_NUM_RX_QUEUES

#define BXE_NUM_RX_QUEUES (   sc)    BXE_NUM_QUEUES(sc)

Definition at line 815 of file bxe.h.

◆ BXE_ONE_PORT

#define BXE_ONE_PORT (   sc)    (sc->flags & BXE_ONE_PORT_FLAG)

Definition at line 1332 of file bxe.h.

◆ BXE_ONE_PORT_FLAG

#define BXE_ONE_PORT_FLAG   0x00000001

Definition at line 1329 of file bxe.h.

◆ bxe_ooo

#define bxe_ooo (   sc,
  var 
)    (bxe_ooo_fp(sc)->var)

Definition at line 852 of file bxe.h.

◆ bxe_ooo_fp

#define bxe_ooo_fp (   sc)    (&sc->fp[OOO_IDX(sc)])

Definition at line 851 of file bxe.h.

◆ bxe_ooo_inner_sp_obj

#define bxe_ooo_inner_sp_obj (   sc)    (&sc->sp_objs[OOO_IDX(sc)])

Definition at line 853 of file bxe.h.

◆ bxe_ooo_sp_obj

#define bxe_ooo_sp_obj (   sc,
  var 
)    (bxe_ooo_inner_sp_obj(sc)->var)

Definition at line 854 of file bxe.h.

◆ bxe_panic

#define bxe_panic (   sc,
  msg 
)     device_printf((sc)->dev, "%s (%s,%d)\n", __FUNCTION__, __FILE__, __LINE__);

Definition at line 2260 of file bxe.h.

◆ BXE_PCIE_CAPABLE_FLAG

#define BXE_PCIE_CAPABLE_FLAG   0x00000002

Definition at line 1269 of file bxe.h.

◆ BXE_PHY_LOCK

#define BXE_PHY_LOCK (   sc)    mtx_lock(&sc->port.phy_mtx)

Definition at line 1021 of file bxe.h.

◆ BXE_PHY_LOCK_ASSERT

#define BXE_PHY_LOCK_ASSERT (   sc)    mtx_assert(&sc->port.phy_mtx, MA_OWNED)

Definition at line 1023 of file bxe.h.

◆ BXE_PHY_UNLOCK

#define BXE_PHY_UNLOCK (   sc)    mtx_unlock(&sc->port.phy_mtx)

Definition at line 1022 of file bxe.h.

◆ BXE_PM_CAPABLE_FLAG

#define BXE_PM_CAPABLE_FLAG   0x00000001

Definition at line 1268 of file bxe.h.

◆ BXE_PMF_LINK_ASSERT

#define BXE_PMF_LINK_ASSERT (   sc)     GENERAL_ATTEN_OFFSET(LINK_SYNC_ATTENTION_BIT_FUNC_0 + SC_FUNC(sc))

Definition at line 2029 of file bxe.h.

◆ BXE_PRINT_LOCK

#define BXE_PRINT_LOCK (   sc)    mtx_lock(&sc->print_mtx)

Definition at line 1457 of file bxe.h.

◆ BXE_PRINT_LOCK_ASSERT

#define BXE_PRINT_LOCK_ASSERT (   sc)    mtx_assert(&sc->print_mtx, MA_OWNED)

Definition at line 1459 of file bxe.h.

◆ BXE_PRINT_UNLOCK

#define BXE_PRINT_UNLOCK (   sc)    mtx_unlock(&sc->print_mtx)

Definition at line 1458 of file bxe.h.

◆ BXE_PXP_DRAM_ALIGN

#define BXE_PXP_DRAM_ALIGN   (BXE_RX_ALIGN_SHIFT - 5) /* XXX ??? */

Definition at line 452 of file bxe.h.

◆ BXE_RECOVERY_DONE

#define BXE_RECOVERY_DONE   1

Definition at line 1497 of file bxe.h.

◆ BXE_RECOVERY_FAILED

#define BXE_RECOVERY_FAILED   4

Definition at line 1500 of file bxe.h.

◆ BXE_RECOVERY_INIT

#define BXE_RECOVERY_INIT   2

Definition at line 1498 of file bxe.h.

◆ BXE_RECOVERY_NIC_LOADING

#define BXE_RECOVERY_NIC_LOADING   5

Definition at line 1501 of file bxe.h.

◆ BXE_RECOVERY_WAIT

#define BXE_RECOVERY_WAIT   3

Definition at line 1499 of file bxe.h.

◆ BXE_RX_ALIGN_SHIFT

#define BXE_RX_ALIGN_SHIFT   8

Definition at line 447 of file bxe.h.

◆ BXE_RX_MODE_ALLMULTI

#define BXE_RX_MODE_ALLMULTI   2

Definition at line 1516 of file bxe.h.

◆ BXE_RX_MODE_NONE

#define BXE_RX_MODE_NONE   0

Definition at line 1514 of file bxe.h.

◆ BXE_RX_MODE_NORMAL

#define BXE_RX_MODE_NORMAL   1

Definition at line 1515 of file bxe.h.

◆ BXE_RX_MODE_PROMISC

#define BXE_RX_MODE_PROMISC   3

Definition at line 1517 of file bxe.h.

◆ BXE_SET_ERROR_BIT

#define BXE_SET_ERROR_BIT (   sc,
  error 
)
Value:
{ \
(sc)->error_status |= (error); \
}

Definition at line 453 of file bxe.h.

◆ BXE_SET_FLOWID

#define BXE_SET_FLOWID (   m)    M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE)

Definition at line 2273 of file bxe.h.

◆ BXE_SP

#define BXE_SP (   sc,
  var 
)    (&(sc)->sp->var)

Definition at line 1880 of file bxe.h.

◆ BXE_SP_LOCK

#define BXE_SP_LOCK (   sc)    mtx_lock(&sc->sp_mtx)

Definition at line 1445 of file bxe.h.

◆ BXE_SP_LOCK_ASSERT

#define BXE_SP_LOCK_ASSERT (   sc)    mtx_assert(&sc->sp_mtx, MA_OWNED)

Definition at line 1447 of file bxe.h.

◆ BXE_SP_MAPPING

#define BXE_SP_MAPPING (   sc,
  var 
)     (sc->sp_dma.paddr + offsetof(struct bxe_slowpath, var))

Definition at line 1881 of file bxe.h.

◆ BXE_SP_OBJ

#define BXE_SP_OBJ (   sc,
  fp 
)    ((sc)->sp_objs[(fp)->index])

Definition at line 1885 of file bxe.h.

◆ BXE_SP_UNLOCK

#define BXE_SP_UNLOCK (   sc)    mtx_unlock(&sc->sp_mtx)

Definition at line 1446 of file bxe.h.

◆ BXE_STATE_CLOSED

#define BXE_STATE_CLOSED   0x0000

Definition at line 1317 of file bxe.h.

◆ BXE_STATE_CLOSING_WAITING_DELETE

#define BXE_STATE_CLOSING_WAITING_DELETE   0x5000

Definition at line 1322 of file bxe.h.

◆ BXE_STATE_CLOSING_WAITING_HALT

#define BXE_STATE_CLOSING_WAITING_HALT   0x4000

Definition at line 1321 of file bxe.h.

◆ BXE_STATE_CLOSING_WAITING_UNLOAD

#define BXE_STATE_CLOSING_WAITING_UNLOAD   0x6000

Definition at line 1323 of file bxe.h.

◆ BXE_STATE_DIAG

#define BXE_STATE_DIAG   0xE000

Definition at line 1325 of file bxe.h.

◆ BXE_STATE_DISABLED

#define BXE_STATE_DISABLED   0xD000

Definition at line 1324 of file bxe.h.

◆ BXE_STATE_ERROR

#define BXE_STATE_ERROR   0xF000

Definition at line 1326 of file bxe.h.

◆ BXE_STATE_OPEN

#define BXE_STATE_OPEN   0x3000

Definition at line 1320 of file bxe.h.

◆ BXE_STATE_OPENING_WAITING_LOAD

#define BXE_STATE_OPENING_WAITING_LOAD   0x1000

Definition at line 1318 of file bxe.h.

◆ BXE_STATE_OPENING_WAITING_PORT

#define BXE_STATE_OPENING_WAITING_PORT   0x2000

Definition at line 1319 of file bxe.h.

◆ BXE_STATS_LOCK

#define BXE_STATS_LOCK (   sc)    mtx_lock(&sc->stats_mtx)

Definition at line 1461 of file bxe.h.

◆ BXE_STATS_LOCK_ASSERT

#define BXE_STATS_LOCK_ASSERT (   sc)    mtx_assert(&sc->stats_mtx, MA_OWNED)

Definition at line 1463 of file bxe.h.

◆ BXE_STATS_UNLOCK

#define BXE_STATS_UNLOCK (   sc)    mtx_unlock(&sc->stats_mtx)

Definition at line 1462 of file bxe.h.

◆ BXE_SWCID_MASK

#define BXE_SWCID_MASK   ((0x1 << BXE_SWCID_SHIFT) - 1)

Definition at line 2065 of file bxe.h.

◆ BXE_SWCID_SHIFT

#define BXE_SWCID_SHIFT   17

Definition at line 2064 of file bxe.h.

◆ BXE_TPA_STATE_START

#define BXE_TPA_STATE_START   1

Definition at line 530 of file bxe.h.

◆ BXE_TPA_STATE_STOP

#define BXE_TPA_STATE_STOP   2

Definition at line 531 of file bxe.h.

◆ BXE_TSO_MAX_SEG_SIZE

#define BXE_TSO_MAX_SEG_SIZE   4096

Definition at line 191 of file bxe.h.

◆ BXE_TSO_MAX_SEGMENTS

#define BXE_TSO_MAX_SEGMENTS   32

Definition at line 189 of file bxe.h.

◆ BXE_TSO_MAX_SIZE

#define BXE_TSO_MAX_SIZE   (65535 + sizeof(struct ether_vlan_header))

Definition at line 190 of file bxe.h.

◆ BXE_TSO_SPLIT_BD

#define BXE_TSO_SPLIT_BD   (1 << 0)

Definition at line 518 of file bxe.h.

◆ BXE_TX_CLEANUP_THRESHOLD

#define BXE_TX_CLEANUP_THRESHOLD   (TX_BD_USABLE / 8)

Definition at line 286 of file bxe.h.

◆ BXE_TX_SWITCHING

#define BXE_TX_SWITCHING   0x00001000

Definition at line 1342 of file bxe.h.

◆ BXE_TX_TIMEOUT

#define BXE_TX_TIMEOUT   5

Definition at line 287 of file bxe.h.

◆ BXE_VALID_FLOWID

#define BXE_VALID_FLOWID (   m)    (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)

Definition at line 2274 of file bxe.h.

◆ BXE_VF_CID_WND

#define BXE_VF_CID_WND   0

Definition at line 689 of file bxe.h.

◆ BXE_VF_CIDS

#define BXE_VF_CIDS   (BXE_MAX_NUM_OF_VFS * BXE_CIDS_PER_VF)

Definition at line 693 of file bxe.h.

◆ BXE_VF_ID_INVALID

#define BXE_VF_ID_INVALID   0xFF

Definition at line 694 of file bxe.h.

◆ CATC_TRIGGER

#define CATC_TRIGGER (   sc,
  data 
)    REG_WR((sc), 0x2000, (data));

Definition at line 2265 of file bxe.h.

◆ CATC_TRIGGER_START

#define CATC_TRIGGER_START (   sc)    CATC_TRIGGER((sc), 0xcafecafe)

Definition at line 2266 of file bxe.h.

◆ CDU_ILT_PAGE_SZ

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

Definition at line 711 of file bxe.h.

◆ CDU_ILT_PAGE_SZ_HW

#define CDU_ILT_PAGE_SZ_HW   2

Definition at line 710 of file bxe.h.

◆ CHIP_2_PORT_MODE

#define CHIP_2_PORT_MODE   0x1

Definition at line 1239 of file bxe.h.

◆ CHIP_4_PORT_MODE

#define CHIP_4_PORT_MODE   0x0

Definition at line 1238 of file bxe.h.

◆ CHIP_BOND_ID

#define CHIP_BOND_ID (   sc)    ((sc->devinfo.chip_id) & 0x0000000f)

Definition at line 1159 of file bxe.h.

◆ CHIP_ID

#define CHIP_ID (   sc)    ((sc)->devinfo.chip_id & 0xffff0000)

Definition at line 1116 of file bxe.h.

◆ CHIP_INT_MODE_IS_BC

#define CHIP_INT_MODE_IS_BC (   sc)    (!CHIP_INT_MODE_IS_NBC(sc))

Definition at line 1252 of file bxe.h.

◆ CHIP_INT_MODE_IS_NBC

#define CHIP_INT_MODE_IS_NBC (   sc)
Value:
(!CHIP_IS_E1x(sc) && \
!((sc)->devinfo.int_block & INT_BLOCK_MODE_BW_COMP))
#define CHIP_IS_E1x(sc)
Definition: bxe.h:1167
#define INT_BLOCK_MODE_BW_COMP
Definition: bxe.h:1248

Definition at line 1249 of file bxe.h.

◆ CHIP_IS_57710

#define CHIP_IS_57710 (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57710)

Definition at line 1162 of file bxe.h.

◆ CHIP_IS_57711

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

Definition at line 1163 of file bxe.h.

◆ CHIP_IS_57711E

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

Definition at line 1164 of file bxe.h.

◆ CHIP_IS_57712

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

Definition at line 1170 of file bxe.h.

◆ CHIP_IS_57712_MF

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

Definition at line 1171 of file bxe.h.

◆ CHIP_IS_57712_VF

#define CHIP_IS_57712_VF (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57712_VF)

Definition at line 1172 of file bxe.h.

◆ CHIP_IS_57800

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

Definition at line 1176 of file bxe.h.

◆ CHIP_IS_57800_MF

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

Definition at line 1177 of file bxe.h.

◆ CHIP_IS_57800_VF

#define CHIP_IS_57800_VF (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57800_VF)

Definition at line 1178 of file bxe.h.

◆ CHIP_IS_57810

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

Definition at line 1179 of file bxe.h.

◆ CHIP_IS_57810_MF

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

Definition at line 1180 of file bxe.h.

◆ CHIP_IS_57810_VF

#define CHIP_IS_57810_VF (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57810_VF)

Definition at line 1181 of file bxe.h.

◆ CHIP_IS_57811

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

Definition at line 1182 of file bxe.h.

◆ CHIP_IS_57811_MF

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

Definition at line 1183 of file bxe.h.

◆ CHIP_IS_57811_VF

#define CHIP_IS_57811_VF (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57811_VF)

Definition at line 1184 of file bxe.h.

◆ CHIP_IS_57840

#define CHIP_IS_57840 (   sc)
Value:
#define CHIP_NUM(sc)
Definition: bxe.h:1117
#define CHIP_NUM_57840_OBS
Definition: bxe.h:1134
#define CHIP_NUM_57840_4_10
Definition: bxe.h:1136
#define CHIP_NUM_57840_2_20
Definition: bxe.h:1137

Definition at line 1185 of file bxe.h.

◆ CHIP_IS_57840_MF

#define CHIP_IS_57840_MF (   sc)
Value:
#define CHIP_NUM_57840_MF
Definition: bxe.h:1138
#define CHIP_NUM_57840_OBS_MF
Definition: bxe.h:1135

Definition at line 1188 of file bxe.h.

◆ CHIP_IS_57840_VF

#define CHIP_IS_57840_VF (   sc)    (CHIP_NUM(sc) == CHIP_NUM_57840_VF)

Definition at line 1190 of file bxe.h.

◆ CHIP_IS_E1

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

Definition at line 1161 of file bxe.h.

◆ CHIP_IS_E1H

#define CHIP_IS_E1H (   sc)
Value:
((CHIP_IS_57711(sc)) || \
#define CHIP_IS_57711(sc)
Definition: bxe.h:1163
#define CHIP_IS_57711E(sc)
Definition: bxe.h:1164

Definition at line 1165 of file bxe.h.

◆ CHIP_IS_E1x

#define CHIP_IS_E1x (   sc)
Value:
(CHIP_IS_E1((sc)) || \
CHIP_IS_E1H((sc)))
#define CHIP_IS_E1(sc)
Definition: bxe.h:1161

Definition at line 1167 of file bxe.h.

◆ CHIP_IS_E2

#define CHIP_IS_E2 (   sc)
Value:
(CHIP_IS_57712(sc) || \
CHIP_IS_57712_MF(sc))
#define CHIP_IS_57712(sc)
Definition: bxe.h:1170

Definition at line 1173 of file bxe.h.

◆ CHIP_IS_E2E3

#define CHIP_IS_E2E3 (   sc)
Value:
(CHIP_IS_E2(sc) || \
CHIP_IS_E3(sc))
#define CHIP_IS_E2(sc)
Definition: bxe.h:1173

Definition at line 1210 of file bxe.h.

◆ CHIP_IS_E3

#define CHIP_IS_E3 (   sc)
Value:
(CHIP_IS_57800(sc) || \
CHIP_IS_57800_MF(sc) || \
CHIP_IS_57800_VF(sc) || \
CHIP_IS_57810(sc) || \
CHIP_IS_57810_MF(sc) || \
CHIP_IS_57810_VF(sc) || \
CHIP_IS_57811(sc) || \
CHIP_IS_57811_MF(sc) || \
CHIP_IS_57811_VF(sc) || \
CHIP_IS_57840(sc) || \
CHIP_IS_57840_MF(sc) || \
CHIP_IS_57840_VF(sc))
#define CHIP_IS_57800(sc)
Definition: bxe.h:1176

Definition at line 1192 of file bxe.h.

◆ CHIP_IS_E3A0

#define CHIP_IS_E3A0 (   sc)
Value:
(CHIP_IS_E3(sc) && \
#define CHIP_REV_Ax
Definition: bxe.h:1145
#define CHIP_REV(sc)
Definition: bxe.h:1143
#define CHIP_IS_E3(sc)
Definition: bxe.h:1192

Definition at line 1204 of file bxe.h.

◆ CHIP_IS_E3B0

#define CHIP_IS_E3B0 (   sc)
Value:
(CHIP_IS_E3(sc) && \
#define CHIP_REV_Bx
Definition: bxe.h:1146

Definition at line 1206 of file bxe.h.

◆ CHIP_IS_MF_CAP

#define CHIP_IS_MF_CAP (   sc)
Value:
(CHIP_IS_57711E(sc) || \
CHIP_IS_57712_MF(sc) || \
CHIP_IS_E3(sc))

Definition at line 1213 of file bxe.h.

◆ CHIP_IS_MODE_4_PORT

#define CHIP_IS_MODE_4_PORT (   sc)    (CHIP_PORT_MODE(sc) == CHIP_4_PORT_MODE)

Definition at line 1242 of file bxe.h.

◆ CHIP_METAL

#define CHIP_METAL (   sc)    ((sc->devinfo.chip_id) & 0x00000ff0)

Definition at line 1158 of file bxe.h.

◆ CHIP_NUM

#define CHIP_NUM (   sc)    ((sc)->devinfo.chip_id >> 16)

Definition at line 1117 of file bxe.h.

◆ CHIP_NUM_57710

#define CHIP_NUM_57710   0x164e

Definition at line 1119 of file bxe.h.

◆ CHIP_NUM_57711

#define CHIP_NUM_57711   0x164f

Definition at line 1120 of file bxe.h.

◆ CHIP_NUM_57711E

#define CHIP_NUM_57711E   0x1650

Definition at line 1121 of file bxe.h.

◆ CHIP_NUM_57712

#define CHIP_NUM_57712   0x1662

Definition at line 1122 of file bxe.h.

◆ CHIP_NUM_57712_MF

#define CHIP_NUM_57712_MF   0x1663

Definition at line 1123 of file bxe.h.

◆ CHIP_NUM_57712_VF

#define CHIP_NUM_57712_VF   0x166f

Definition at line 1124 of file bxe.h.

◆ CHIP_NUM_57800

#define CHIP_NUM_57800   0x168a

Definition at line 1125 of file bxe.h.

◆ CHIP_NUM_57800_MF

#define CHIP_NUM_57800_MF   0x16a5

Definition at line 1126 of file bxe.h.

◆ CHIP_NUM_57800_VF

#define CHIP_NUM_57800_VF   0x16a9

Definition at line 1127 of file bxe.h.

◆ CHIP_NUM_57810

#define CHIP_NUM_57810   0x168e

Definition at line 1128 of file bxe.h.

◆ CHIP_NUM_57810_MF

#define CHIP_NUM_57810_MF   0x16ae

Definition at line 1129 of file bxe.h.

◆ CHIP_NUM_57810_VF

#define CHIP_NUM_57810_VF   0x16af

Definition at line 1130 of file bxe.h.

◆ CHIP_NUM_57811

#define CHIP_NUM_57811   0x163d

Definition at line 1131 of file bxe.h.

◆ CHIP_NUM_57811_MF

#define CHIP_NUM_57811_MF   0x163e

Definition at line 1132 of file bxe.h.

◆ CHIP_NUM_57811_VF

#define CHIP_NUM_57811_VF   0x163f

Definition at line 1133 of file bxe.h.

◆ CHIP_NUM_57840_2_20

#define CHIP_NUM_57840_2_20   0x16a2

Definition at line 1137 of file bxe.h.

◆ CHIP_NUM_57840_4_10

#define CHIP_NUM_57840_4_10   0x16a1

Definition at line 1136 of file bxe.h.

◆ CHIP_NUM_57840_MF

#define CHIP_NUM_57840_MF   0x16a4

Definition at line 1138 of file bxe.h.

◆ CHIP_NUM_57840_OBS

#define CHIP_NUM_57840_OBS   0x168d

Definition at line 1134 of file bxe.h.

◆ CHIP_NUM_57840_OBS_MF

#define CHIP_NUM_57840_OBS_MF   0x16ab

Definition at line 1135 of file bxe.h.

◆ CHIP_NUM_57840_VF

#define CHIP_NUM_57840_VF   0x16ad

Definition at line 1139 of file bxe.h.

◆ CHIP_PORT_MODE

#define CHIP_PORT_MODE (   sc)    ((sc)->devinfo.chip_port_mode)

Definition at line 1241 of file bxe.h.

◆ CHIP_PORT_MODE_NONE

#define CHIP_PORT_MODE_NONE   0x2

Definition at line 1240 of file bxe.h.

◆ CHIP_REV

#define CHIP_REV (   sc)    ((sc)->devinfo.chip_id & CHIP_REV_MASK)

Definition at line 1143 of file bxe.h.

◆ CHIP_REV_Ax

#define CHIP_REV_Ax   (0x0 << CHIP_REV_SHIFT)

Definition at line 1145 of file bxe.h.

◆ CHIP_REV_Bx

#define CHIP_REV_Bx   (0x1 << CHIP_REV_SHIFT)

Definition at line 1146 of file bxe.h.

◆ CHIP_REV_Cx

#define CHIP_REV_Cx   (0x2 << CHIP_REV_SHIFT)

Definition at line 1147 of file bxe.h.

◆ CHIP_REV_IS_ASIC

#define CHIP_REV_IS_ASIC (   sc)     (!CHIP_REV_IS_SLOW(sc))

Definition at line 1155 of file bxe.h.

◆ CHIP_REV_IS_EMUL

#define CHIP_REV_IS_EMUL (   sc)     (CHIP_REV_IS_SLOW(sc) && !(CHIP_REV(sc) & 0x00001000))

Definition at line 1153 of file bxe.h.

◆ CHIP_REV_IS_FPGA

#define CHIP_REV_IS_FPGA (   sc)     (CHIP_REV_IS_SLOW(sc) && (CHIP_REV(sc) & 0x00001000))

Definition at line 1151 of file bxe.h.

◆ CHIP_REV_IS_SLOW

#define CHIP_REV_IS_SLOW (   sc)     (CHIP_REV(sc) > 0x00005000)

Definition at line 1149 of file bxe.h.

◆ CHIP_REV_MASK

#define CHIP_REV_MASK   (0xF << CHIP_REV_SHIFT)

Definition at line 1142 of file bxe.h.

◆ CHIP_REV_SHIFT

#define CHIP_REV_SHIFT   12

Definition at line 1141 of file bxe.h.

◆ CHIP_TQ_NONE

#define CHIP_TQ_NONE   0

Definition at line 1359 of file bxe.h.

◆ CHIP_TQ_REINIT

#define CHIP_TQ_REINIT   3

Definition at line 1362 of file bxe.h.

◆ CHIP_TQ_START

#define CHIP_TQ_START   1

Definition at line 1360 of file bxe.h.

◆ CHIP_TQ_STOP

#define CHIP_TQ_STOP   2

Definition at line 1361 of file bxe.h.

◆ CID_TO_FP

#define CID_TO_FP (   cid,
  sc 
)    ((cid) % BXE_NUM_NON_CNIC_QUEUES(sc))

Definition at line 754 of file bxe.h.

◆ CMNG_FNS_MINMAX

#define CMNG_FNS_MINMAX   1

Definition at line 765 of file bxe.h.

◆ CMNG_FNS_NONE

#define CMNG_FNS_NONE   0

Definition at line 764 of file bxe.h.

◆ CNIC_CID_MAX

#define CNIC_CID_MAX   (CNIC_ISCSI_CID_MAX + CNIC_FCOE_CID_MAX)

Definition at line 716 of file bxe.h.

◆ CNIC_ENABLED

#define CNIC_ENABLED (   sc)    0 /* ((sc)->cnic_enabled) */

Definition at line 1749 of file bxe.h.

◆ CNIC_FCOE_CID_MAX

#define CNIC_FCOE_CID_MAX   2048

Definition at line 715 of file bxe.h.

◆ CNIC_ILT_LINES

#define CNIC_ILT_LINES   DIV_ROUND_UP(CNIC_CID_MAX, ILT_PAGE_CIDS)

Definition at line 717 of file bxe.h.

◆ CNIC_ISCSI_CID_MAX

#define CNIC_ISCSI_CID_MAX   256

Definition at line 714 of file bxe.h.

◆ CNIC_LOADED

#define CNIC_LOADED (   sc)    0 /* ((sc)->cnic_loaded) */

Definition at line 1750 of file bxe.h.

◆ CNIC_SUPPORT

#define CNIC_SUPPORT (   sc)    0 /* ((sc)->cnic_support) */

Definition at line 1748 of file bxe.h.

◆ CONFIGURE_NIC_MODE

#define CONFIGURE_NIC_MODE (   sc)    (!CHIP_IS_E1x(sc) && !CNIC_ENABLED(sc))

Definition at line 1235 of file bxe.h.

◆ CQE_BD_REL

#define CQE_BD_REL
Value:
(sizeof(union eth_rx_cqe) / \
sizeof(struct eth_rx_bd))

Definition at line 344 of file bxe.h.

◆ CQE_CMD

#define CQE_CMD (   x)    (le32toh(x) >> COMMON_RAMROD_ETH_RX_CQE_CMD_ID_SHIFT)

Definition at line 2068 of file bxe.h.

◆ CQE_TYPE

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

Definition at line 2070 of file bxe.h.

◆ CQE_TYPE_FAST

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

Definition at line 2074 of file bxe.h.

◆ CQE_TYPE_SLOW

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

Definition at line 2073 of file bxe.h.

◆ CQE_TYPE_START

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

Definition at line 2071 of file bxe.h.

◆ CQE_TYPE_STOP

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

Definition at line 2072 of file bxe.h.

◆ DBASSERT

#define DBASSERT (   sc,
  exp,
  msg 
)
Value:
do { \
if (__predict_false(sc->debug & DBG_ASSERT)) { \
if (__predict_false(!(exp))) { \
panic msg; \
} \
} \
} while (0)
#define DBG_ASSERT
Definition: bxe.h:2175

Definition at line 2178 of file bxe.h.

◆ DBG_ALL

#define DBG_ALL   0xFFFFFFFF /* flying monkeys */

Definition at line 2176 of file bxe.h.

◆ DBG_ASSERT

#define DBG_ASSERT   0x80000000 /* debug assert */

Definition at line 2175 of file bxe.h.

◆ DBG_INTR

#define DBG_INTR   0x00000002 /* interrupt handling */

Definition at line 2165 of file bxe.h.

◆ DBG_IOCTL

#define DBG_IOCTL   0x00000080 /* ioctl handling */

Definition at line 2171 of file bxe.h.

◆ DBG_LOAD

#define DBG_LOAD   0x00000001 /* load and unload */

Definition at line 2164 of file bxe.h.

◆ DBG_LRO

#define DBG_LRO   0x00000400 /* lro processing */

Definition at line 2174 of file bxe.h.

◆ DBG_MBUF

#define DBG_MBUF   0x00000100 /* dumping mbuf info */

Definition at line 2172 of file bxe.h.

◆ DBG_PHY

#define DBG_PHY   0x00000040 /* phy/link handling */

Definition at line 2170 of file bxe.h.

◆ DBG_REGS

#define DBG_REGS   0x00000200 /* register access */

Definition at line 2173 of file bxe.h.

◆ DBG_RX

#define DBG_RX   0x00000020 /* packet receive */

Definition at line 2169 of file bxe.h.

◆ DBG_SP

#define DBG_SP   0x00000004 /* slowpath handling */

Definition at line 2166 of file bxe.h.

◆ DBG_STATS

#define DBG_STATS   0x00000008 /* stats updates */

Definition at line 2167 of file bxe.h.

◆ DBG_TX

#define DBG_TX   0x00000010 /* packet transmit */

Definition at line 2168 of file bxe.h.

◆ DEF_MIN_RATE

#define DEF_MIN_RATE   100

Definition at line 769 of file bxe.h.

◆ DEF_SB_ID

#define DEF_SB_ID   HC_SP_SB_ID

Definition at line 1553 of file bxe.h.

◆ DEF_SB_IGU_ID

#define DEF_SB_IGU_ID   16

Definition at line 1552 of file bxe.h.

◆ DIV_ROUND_UP

#define DIV_ROUND_UP (   n,
 
)    (((n) + (d) - 1) / (d))

Definition at line 127 of file bxe.h.

◆ DMAE_C_DST

#define DMAE_C_DST   1

Definition at line 1990 of file bxe.h.

◆ DMAE_C_SRC

#define DMAE_C_SRC   0

Definition at line 1989 of file bxe.h.

◆ DMAE_CMD_C_DST_GRC

#define DMAE_CMD_C_DST_GRC   (DMAE_COMP_GRC << DMAE_CMD_C_DST_SHIFT)

Definition at line 1973 of file bxe.h.

◆ DMAE_CMD_C_DST_PCI

#define DMAE_CMD_C_DST_PCI   (DMAE_COMP_PCI << DMAE_CMD_C_DST_SHIFT)

Definition at line 1972 of file bxe.h.

◆ DMAE_CMD_DST_GRC

#define DMAE_CMD_DST_GRC   (DMAE_DST_GRC << DMAE_CMD_DST_SHIFT)

Definition at line 1970 of file bxe.h.

◆ DMAE_CMD_DST_PCI

#define DMAE_CMD_DST_PCI   (DMAE_DST_PCI << DMAE_CMD_DST_SHIFT)

Definition at line 1969 of file bxe.h.

◆ DMAE_CMD_ENDIANITY_B_DW_SWAP

#define DMAE_CMD_ENDIANITY_B_DW_SWAP   (3 << DMAE_CMD_ENDIANITY_SHIFT)

Definition at line 1978 of file bxe.h.

◆ DMAE_CMD_ENDIANITY_B_SWAP

#define DMAE_CMD_ENDIANITY_B_SWAP   (1 << DMAE_CMD_ENDIANITY_SHIFT)

Definition at line 1976 of file bxe.h.

◆ DMAE_CMD_ENDIANITY_DW_SWAP

#define DMAE_CMD_ENDIANITY_DW_SWAP   (2 << DMAE_CMD_ENDIANITY_SHIFT)

Definition at line 1977 of file bxe.h.

◆ DMAE_CMD_ENDIANITY_NO_SWAP

#define DMAE_CMD_ENDIANITY_NO_SWAP   (0 << DMAE_CMD_ENDIANITY_SHIFT)

Definition at line 1975 of file bxe.h.

◆ DMAE_CMD_PORT_0

#define DMAE_CMD_PORT_0   0

Definition at line 1980 of file bxe.h.

◆ DMAE_CMD_PORT_1

#define DMAE_CMD_PORT_1   DMAE_CMD_PORT

Definition at line 1981 of file bxe.h.

◆ DMAE_CMD_SRC_GRC

#define DMAE_CMD_SRC_GRC   (DMAE_SRC_GRC << DMAE_CMD_SRC_SHIFT)

Definition at line 1968 of file bxe.h.

◆ DMAE_CMD_SRC_PCI

#define DMAE_CMD_SRC_PCI   (DMAE_SRC_PCI << DMAE_CMD_SRC_SHIFT)

Definition at line 1967 of file bxe.h.

◆ DMAE_COM_SET_ERR

#define DMAE_COM_SET_ERR   1

Definition at line 1965 of file bxe.h.

◆ DMAE_COMP_GRC

#define DMAE_COMP_GRC   1

Definition at line 1962 of file bxe.h.

◆ DMAE_COMP_PCI

#define DMAE_COMP_PCI   0

Definition at line 1961 of file bxe.h.

◆ DMAE_COMP_REGULAR

#define DMAE_COMP_REGULAR   0

Definition at line 1964 of file bxe.h.

◆ DMAE_COMP_VAL

#define DMAE_COMP_VAL   0x60d0d0ae /* E2 and beyond, upper bit indicates error */

Definition at line 1995 of file bxe.h.

◆ DMAE_DST_GRC

#define DMAE_DST_GRC   2

Definition at line 1959 of file bxe.h.

◆ DMAE_DST_NONE

#define DMAE_DST_NONE   0

Definition at line 1957 of file bxe.h.

◆ DMAE_DST_PCI

#define DMAE_DST_PCI   1

Definition at line 1958 of file bxe.h.

◆ DMAE_DST_PF

#define DMAE_DST_PF   0

Definition at line 1986 of file bxe.h.

◆ DMAE_DST_VF

#define DMAE_DST_VF   1

Definition at line 1987 of file bxe.h.

◆ DMAE_LEN32_RD_MAX

#define DMAE_LEN32_RD_MAX   0x80

Definition at line 1992 of file bxe.h.

◆ DMAE_LEN32_WR_MAX

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

Definition at line 1993 of file bxe.h.

◆ DMAE_NOT_RDY

#define DMAE_NOT_RDY   -3

Definition at line 1951 of file bxe.h.

◆ DMAE_PCI_ERR_FLAG

#define DMAE_PCI_ERR_FLAG   0x80000000

Definition at line 1952 of file bxe.h.

◆ DMAE_PCI_ERROR

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

Definition at line 1950 of file bxe.h.

◆ DMAE_READY

#define DMAE_READY (   sc)    (sc->dmae_ready)

Definition at line 1470 of file bxe.h.

◆ DMAE_SRC_GRC

#define DMAE_SRC_GRC   1

Definition at line 1955 of file bxe.h.

◆ DMAE_SRC_PCI

#define DMAE_SRC_PCI   0

Definition at line 1954 of file bxe.h.

◆ DMAE_SRC_PF

#define DMAE_SRC_PF   0

Definition at line 1983 of file bxe.h.

◆ DMAE_SRC_VF

#define DMAE_SRC_VF   1

Definition at line 1984 of file bxe.h.

◆ DMAE_TIMEOUT

#define DMAE_TIMEOUT   -1

Definition at line 1949 of file bxe.h.

◆ DOORBELL

#define DOORBELL (   sc,
  cid,
  val 
)
Value:
do { \
bus_space_write_4(sc->bar[BAR1].tag, sc->bar[BAR1].handle, \
((sc->doorbell_size * (cid)) + DPM_TRIGGER_TYPE), \
(uint32_t)val); \
} while(0)
#define BAR1
Definition: bxe.h:1819
#define DPM_TRIGGER_TYPE
Definition: bxe.h:1919

Definition at line 1920 of file bxe.h.

◆ DPM_TRIGGER_TYPE

#define DPM_TRIGGER_TYPE   0x40

Definition at line 1919 of file bxe.h.

◆ DROPLESS_FC_HEADROOM

#define DROPLESS_FC_HEADROOM   100

Definition at line 200 of file bxe.h.

◆ DUPLEX_UNKNOWN

#define DUPLEX_UNKNOWN   (0xff)

Definition at line 2090 of file bxe.h.

◆ EQ_DESC

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

Definition at line 1594 of file bxe.h.

◆ EQ_DESC_CNT_PAGE

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

Definition at line 1584 of file bxe.h.

◆ EQ_DESC_MASK

#define EQ_DESC_MASK   (NUM_EQ_DESC - 1)

Definition at line 1587 of file bxe.h.

◆ EQ_DESC_MAX_PAGE

#define EQ_DESC_MAX_PAGE   (EQ_DESC_CNT_PAGE - 1)

Definition at line 1585 of file bxe.h.

◆ ETH_HLEN

#define ETH_HLEN   14

Definition at line 437 of file bxe.h.

◆ ETH_MAX_JUMBO_PACKET_SIZE

#define ETH_MAX_JUMBO_PACKET_SIZE   9600

Definition at line 441 of file bxe.h.

◆ ETH_MAX_PACKET_SIZE

#define ETH_MAX_PACKET_SIZE   ETHERMTU /* 1500 */

Definition at line 440 of file bxe.h.

◆ ETH_MAX_TPA_HEADER_SIZE

#define ETH_MAX_TPA_HEADER_SIZE   72

Definition at line 443 of file bxe.h.

◆ ETH_MIN_PACKET_SIZE

#define ETH_MIN_PACKET_SIZE   60

Definition at line 439 of file bxe.h.

◆ ETH_OVERHEAD

#define ETH_OVERHEAD   (ETH_HLEN + 8 + 8)

Definition at line 438 of file bxe.h.

◆ FAIR_MEM

#define FAIR_MEM   2

Definition at line 783 of file bxe.h.

◆ FCOE_IDX

#define FCOE_IDX (   sc)    (BXE_NUM_NON_CNIC_QUEUES(sc) + FCOE_IDX_OFFSET)

Definition at line 843 of file bxe.h.

◆ FIRST_ABS_FUNC_IN_PORT

#define FIRST_ABS_FUNC_IN_PORT (   sc)
Value:
PORT_ID(sc) : (PATH_ID(sc) + (2 * PORT_ID(sc))))
#define CHIP_PORT_MODE_NONE
Definition: bxe.h:1240
#define PORT_ID(sc)
Definition: bxe.h:1394
#define CHIP_PORT_MODE(sc)
Definition: bxe.h:1241
#define PATH_ID(sc)
Definition: bxe.h:1395

Definition at line 2055 of file bxe.h.

◆ FIRST_TX_COS_INDEX

#define FIRST_TX_COS_INDEX   0

Definition at line 752 of file bxe.h.

◆ FIRST_TX_ONLY_COS_INDEX

#define FIRST_TX_ONLY_COS_INDEX   1

Definition at line 751 of file bxe.h.

◆ FOR_EACH_CNIC_QUEUE

#define FOR_EACH_CNIC_QUEUE (   sc,
  var 
)
Value:
for ((var) = BXE_NUM_ETH_QUEUES(sc); \
(var) < BXE_NUM_QUEUES(sc); \
(var)++)
#define BXE_NUM_ETH_QUEUES(sc)
Definition: bxe.h:813
#define BXE_NUM_QUEUES(sc)
Definition: bxe.h:812

Definition at line 832 of file bxe.h.

◆ FOR_EACH_COS_IN_TX_QUEUE

#define FOR_EACH_COS_IN_TX_QUEUE (   sc,
  var 
)     for ((var) = 0; (var) < (sc)->max_cos; (var)++)

Definition at line 829 of file bxe.h.

◆ FOR_EACH_ETH_QUEUE

#define FOR_EACH_ETH_QUEUE (   sc,
  var 
)     for ((var) = 0; (var) < BXE_NUM_ETH_QUEUES(sc); (var)++)

Definition at line 823 of file bxe.h.

◆ FOR_EACH_NONDEFAULT_ETH_QUEUE

#define FOR_EACH_NONDEFAULT_ETH_QUEUE (   sc,
  var 
)     for ((var) = 1; (var) < BXE_NUM_ETH_QUEUES(sc); (var)++)

Definition at line 826 of file bxe.h.

◆ FOR_EACH_NONDEFAULT_QUEUE

#define FOR_EACH_NONDEFAULT_QUEUE (   sc,
  var 
)     for ((var) = 1; (var) < BXE_NUM_QUEUES(sc); (var)++)

Definition at line 820 of file bxe.h.

◆ FOR_EACH_QUEUE

#define FOR_EACH_QUEUE (   sc,
  var 
)     for ((var) = 0; (var) < BXE_NUM_QUEUES(sc); (var)++)

Definition at line 817 of file bxe.h.

◆ FOREACH_ABS_FUNC_IN_PORT

#define FOREACH_ABS_FUNC_IN_PORT (   sc,
 
)
Value:
for ((i) = FIRST_ABS_FUNC_IN_PORT(sc); \
(i) < MAX_FUNC_NUM; \
(i) += (MAX_FUNC_NUM / PFS_PER_PORT(sc)))
#define FIRST_ABS_FUNC_IN_PORT(sc)
Definition: bxe.h:2055
#define MAX_FUNC_NUM
Definition: bxe.h:414
#define PFS_PER_PORT(sc)
Definition: bxe.h:2051

Definition at line 2059 of file bxe.h.

◆ FP_CL_ID

#define FP_CL_ID (   fp)    (fp->cl_id)

Definition at line 632 of file bxe.h.

◆ FP_IDX

#define FP_IDX (   fp)    (fp->index)

Definition at line 620 of file bxe.h.

◆ FP_SB_MAX_E1x

#define FP_SB_MAX_E1x   16

Definition at line 701 of file bxe.h.

◆ FP_SB_MAX_E2

#define FP_SB_MAX_E2   HC_SB_MAX_SB_E2

Definition at line 702 of file bxe.h.

◆ FUNC_FLG_LEADING

#define FUNC_FLG_LEADING   0x0020 /* PF only */

Definition at line 1805 of file bxe.h.

◆ FUNC_FLG_RSS

#define FUNC_FLG_RSS   0x0001

Definition at line 1800 of file bxe.h.

◆ FUNC_FLG_SPQ

#define FUNC_FLG_SPQ   0x0010

Definition at line 1804 of file bxe.h.

◆ FUNC_FLG_STATS

#define FUNC_FLG_STATS   0x0002

Definition at line 1801 of file bxe.h.

◆ FUNC_FLG_TPA

#define FUNC_FLG_TPA   0x0008

Definition at line 1803 of file bxe.h.

◆ FUNC_ID

#define FUNC_ID (   sc)    SC_FUNC(sc)

Definition at line 1397 of file bxe.h.

◆ FUNC_ILT_BASE

#define FUNC_ILT_BASE (   func)    (func * ILT_PER_FUNC)

Definition at line 426 of file bxe.h.

◆ FW_BUF_SIZE

#define FW_BUF_SIZE   0x40000

Definition at line 1626 of file bxe.h.

◆ FW_DROP_LEVEL

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

Definition at line 198 of file bxe.h.

◆ FW_PREFETCH_CNT

#define FW_PREFETCH_CNT   16

Definition at line 199 of file bxe.h.

◆ FWD_IDX

#define FWD_IDX (   sc)    (BXE_NUM_NON_CNIC_QUEUES(sc) + FWD_IDX_OFFSET)

Definition at line 856 of file bxe.h.

◆ GET_FIELD

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

Definition at line 185 of file bxe.h.

◆ GET_FLAG

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

Definition at line 182 of file bxe.h.

◆ GET_NUM_VFS_PER_PATH

#define GET_NUM_VFS_PER_PATH (   sc)    0

Definition at line 697 of file bxe.h.

◆ GET_NUM_VFS_PER_PF

#define GET_NUM_VFS_PER_PF (   sc)    0

Definition at line 698 of file bxe.h.

◆ GPIO_2_FUNC

#define GPIO_2_FUNC   (1L << 10)

Definition at line 2010 of file bxe.h.

◆ GPIO_3_FUNC

#define GPIO_3_FUNC   (1L << 11)

Definition at line 2011 of file bxe.h.

◆ GPIO_4_FUNC

#define GPIO_4_FUNC   (1L << 12)

Definition at line 2012 of file bxe.h.

◆ GUNZIP_BUF

#define GUNZIP_BUF (   sc)    (sc->gz_buf)

Definition at line 1623 of file bxe.h.

◆ GUNZIP_OUTLEN

#define GUNZIP_OUTLEN (   sc)    (sc->gz_outlen)

Definition at line 1624 of file bxe.h.

◆ GUNZIP_PHYS

#define GUNZIP_PHYS (   sc)    (sc->gz_buf_dma.paddr)

Definition at line 1625 of file bxe.h.

◆ HC_INDEX_ETH_FIRST_TX_CQ_CONS

#define HC_INDEX_ETH_FIRST_TX_CQ_CONS   HC_INDEX_ETH_TX_CQ_CONS_COS0

Definition at line 761 of file bxe.h.

◆ HC_INDEX_ETH_RX_CQ_CONS

#define HC_INDEX_ETH_RX_CQ_CONS   1

Definition at line 756 of file bxe.h.

◆ HC_INDEX_ETH_TX_CQ_CONS_COS0

#define HC_INDEX_ETH_TX_CQ_CONS_COS0   5

Definition at line 758 of file bxe.h.

◆ HC_INDEX_ETH_TX_CQ_CONS_COS1

#define HC_INDEX_ETH_TX_CQ_CONS_COS1   6

Definition at line 759 of file bxe.h.

◆ HC_INDEX_ETH_TX_CQ_CONS_COS2

#define HC_INDEX_ETH_TX_CQ_CONS_COS2   7

Definition at line 760 of file bxe.h.

◆ HC_INDEX_OOO_TX_CQ_CONS

#define HC_INDEX_OOO_TX_CQ_CONS   4

Definition at line 757 of file bxe.h.

◆ HC_SEG_ACCESS_ATTN

#define HC_SEG_ACCESS_ATTN   4

Definition at line 786 of file bxe.h.

◆ HC_SEG_ACCESS_DEF

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

Definition at line 785 of file bxe.h.

◆ HC_SEG_ACCESS_NORM

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

Definition at line 787 of file bxe.h.

◆ HC_SP_INDEX_EQ_CONS

#define HC_SP_INDEX_EQ_CONS   7

Definition at line 1569 of file bxe.h.

◆ HC_SP_INDEX_ETH_DEF_CONS

#define HC_SP_INDEX_ETH_DEF_CONS   3

Definition at line 1567 of file bxe.h.

◆ HC_SP_INDEX_ETH_FCOE_RX_CQ_CONS

#define HC_SP_INDEX_ETH_FCOE_RX_CQ_CONS   4

Definition at line 1572 of file bxe.h.

◆ HC_SP_INDEX_ETH_FCOE_TX_CQ_CONS

#define HC_SP_INDEX_ETH_FCOE_TX_CQ_CONS   6

Definition at line 1571 of file bxe.h.

◆ HC_SP_INDEX_ETH_ISCSI_CQ_CONS

#define HC_SP_INDEX_ETH_ISCSI_CQ_CONS   5

Definition at line 1574 of file bxe.h.

◆ HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS

#define HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS   1

Definition at line 1575 of file bxe.h.

◆ HILO_U64

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

Definition at line 174 of file bxe.h.

◆ HW_CID

#define HW_CID (   sc,
 
)     ((SC_PORT(sc) << 23) | (SC_VN(sc) << BXE_SWCID_SHIFT) | (x))

Definition at line 2077 of file bxe.h.

◆ ilog2

#define ilog2 (   x)    bxe_ilog2(x)

Definition at line 140 of file bxe.h.

◆ ILT_MAX_L2_LINES

#define ILT_MAX_L2_LINES   8

Definition at line 1658 of file bxe.h.

◆ ILT_MAX_LINES

#define ILT_MAX_LINES   256

Definition at line 1661 of file bxe.h.

◆ ILT_NUM_PAGE_ENTRIES

#define ILT_NUM_PAGE_ENTRIES   3072

Definition at line 419 of file bxe.h.

◆ ILT_PAGE_CIDS

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

Definition at line 712 of file bxe.h.

◆ ILT_PER_FUNC

#define ILT_PER_FUNC   (ILT_NUM_PAGE_ENTRIES / 8)

Definition at line 425 of file bxe.h.

◆ INIT_CSEM_INT_TABLE_DATA

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

Definition at line 1651 of file bxe.h.

◆ INIT_CSEM_PRAM_DATA

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

Definition at line 1652 of file bxe.h.

◆ INIT_DATA

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

Definition at line 1644 of file bxe.h.

◆ INIT_DMAE_C

#define INIT_DMAE_C (   sc)    ((SC_PORT(sc) * MAX_DMAE_C_PER_PORT) + SC_VN(sc))

Definition at line 1998 of file bxe.h.

◆ INIT_MODE_FLAGS

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

Definition at line 1632 of file bxe.h.

◆ INIT_OPS

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

Definition at line 1642 of file bxe.h.

◆ INIT_OPS_OFFSETS

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

Definition at line 1643 of file bxe.h.

◆ INIT_TSEM_INT_TABLE_DATA

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

Definition at line 1645 of file bxe.h.

◆ INIT_TSEM_PRAM_DATA

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

Definition at line 1646 of file bxe.h.

◆ INIT_USEM_INT_TABLE_DATA

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

Definition at line 1647 of file bxe.h.

◆ INIT_USEM_PRAM_DATA

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

Definition at line 1648 of file bxe.h.

◆ INIT_XSEM_INT_TABLE_DATA

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

Definition at line 1649 of file bxe.h.

◆ INIT_XSEM_PRAM_DATA

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

Definition at line 1650 of file bxe.h.

◆ INT_BLOCK_HC

#define INT_BLOCK_HC   0

Definition at line 1245 of file bxe.h.

◆ INT_BLOCK_IGU

#define INT_BLOCK_IGU   1

Definition at line 1246 of file bxe.h.

◆ INT_BLOCK_MODE_BW_COMP

#define INT_BLOCK_MODE_BW_COMP   2

Definition at line 1248 of file bxe.h.

◆ INT_BLOCK_MODE_NORMAL

#define INT_BLOCK_MODE_NORMAL   0

Definition at line 1247 of file bxe.h.

◆ INTR_MODE_INTX

#define INTR_MODE_INTX   0

Definition at line 1537 of file bxe.h.

◆ INTR_MODE_MSI

#define INTR_MODE_MSI   1

Definition at line 1538 of file bxe.h.

◆ INTR_MODE_MSIX

#define INTR_MODE_MSIX   2

Definition at line 1539 of file bxe.h.

◆ INVALID_VIF_ID

#define INVALID_VIF_ID   0xFFFF

Definition at line 1054 of file bxe.h.

◆ IS_ETH_FP

#define IS_ETH_FP (   fp)    ((fp)->index < BXE_NUM_ETH_QUEUES((fp)->sc))

Definition at line 863 of file bxe.h.

◆ IS_FCOE_FP

#define IS_FCOE_FP (   fp)    ((fp)->index == FCOE_IDX((fp)->sc))

Definition at line 864 of file bxe.h.

◆ IS_FCOE_IDX

#define IS_FCOE_IDX (   idx)    ((idx) == FCOE_IDX(sc))

Definition at line 865 of file bxe.h.

◆ IS_FWD_FP

#define IS_FWD_FP (   fp)    ((fp)->index == FWD_IDX((fp)->sc))

Definition at line 866 of file bxe.h.

◆ IS_FWD_IDX

#define IS_FWD_IDX (   idx)    ((idx) == FWD_IDX(sc))

Definition at line 867 of file bxe.h.

◆ IS_MF

#define IS_MF (   sc)
Value:
(IS_MULTI_VNIC(sc) && \
((sc)->devinfo.mf_info.mf_mode != 0))
#define IS_MULTI_VNIC(sc)
Definition: bxe.h:1043

Definition at line 1078 of file bxe.h.

◆ IS_MF_AFEX

#define IS_MF_AFEX (   sc)
Value:
(IS_MULTI_VNIC(sc) && \
((sc)->devinfo.mf_info.mf_mode == MULTI_FUNCTION_AFEX))
@ MULTI_FUNCTION_AFEX
Definition: ecore_hsi.h:12006

Definition at line 1087 of file bxe.h.

◆ IS_MF_AFEX_MODE

#define IS_MF_AFEX_MODE (   sc)    IS_MF_AFEX(sc)

Definition at line 1092 of file bxe.h.

◆ IS_MF_SD

#define IS_MF_SD (   sc)
Value:
(IS_MULTI_VNIC(sc) && \
((sc)->devinfo.mf_info.mf_mode == MULTI_FUNCTION_SD))
@ MULTI_FUNCTION_SD
Definition: ecore_hsi.h:12004

Definition at line 1081 of file bxe.h.

◆ IS_MF_SD_MODE

#define IS_MF_SD_MODE (   sc)    IS_MF_SD(sc)

Definition at line 1090 of file bxe.h.

◆ IS_MF_SI

#define IS_MF_SI (   sc)
Value:
(IS_MULTI_VNIC(sc) && \
((sc)->devinfo.mf_info.mf_mode == MULTI_FUNCTION_SI))
@ MULTI_FUNCTION_SI
Definition: ecore_hsi.h:12005

Definition at line 1084 of file bxe.h.

◆ IS_MF_SI_MODE

#define IS_MF_SI_MODE (   sc)    IS_MF_SI(sc)

Definition at line 1091 of file bxe.h.

◆ IS_MULTI_VNIC

#define IS_MULTI_VNIC (   sc)    ((sc)->devinfo.mf_info.multi_vnics_mode)

Definition at line 1043 of file bxe.h.

◆ IS_OOO_FP

#define IS_OOO_FP (   fp)    ((fp)->index == OOO_IDX((fp)->sc))

Definition at line 868 of file bxe.h.

◆ IS_OOO_IDX

#define IS_OOO_IDX (   idx)    ((idx) == OOO_IDX(sc))

Definition at line 869 of file bxe.h.

◆ IS_PF

#define IS_PF (   sc)    (!IS_VF(sc))

Definition at line 1221 of file bxe.h.

◆ IS_SRIOV

#define IS_SRIOV (   sc)    0

Definition at line 695 of file bxe.h.

◆ IS_VF

#define IS_VF (   sc)
Value:
(CHIP_IS_57712_VF(sc) || \
CHIP_IS_57800_VF(sc) || \
CHIP_IS_57810_VF(sc) || \
CHIP_IS_57840_VF(sc))
#define CHIP_IS_57712_VF(sc)
Definition: bxe.h:1172

Definition at line 1217 of file bxe.h.

◆ L2_ILT_LINES

#define L2_ILT_LINES (   sc)     (DIV_ROUND_UP(BXE_L2_CID_COUNT(sc), ILT_PAGE_CIDS))

Definition at line 1680 of file bxe.h.

◆ LITTLE_ENDIAN

#define LITTLE_ENDIAN

Definition at line 90 of file bxe.h.

◆ LOAD_DIAG

#define LOAD_DIAG   2

Definition at line 402 of file bxe.h.

◆ LOAD_LOOPBACK_EXT

#define LOAD_LOOPBACK_EXT   3

Definition at line 403 of file bxe.h.

◆ LOAD_NORMAL

#define LOAD_NORMAL   0

Definition at line 400 of file bxe.h.

◆ LOAD_OPEN

#define LOAD_OPEN   1

Definition at line 401 of file bxe.h.

◆ MAX_AGG_QS

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

Definition at line 195 of file bxe.h.

◆ MAX_BARS

#define MAX_BARS   5

Definition at line 1347 of file bxe.h.

◆ MAX_DMAE_C

#define MAX_DMAE_C   8

Definition at line 896 of file bxe.h.

◆ MAX_DMAE_C_PER_PORT

#define MAX_DMAE_C_PER_PORT   8

Definition at line 1997 of file bxe.h.

◆ MAX_DYNAMIC_ATTN_GRPS

#define MAX_DYNAMIC_ATTN_GRPS   8

Definition at line 486 of file bxe.h.

◆ MAX_EQ_AVAIL

#define MAX_EQ_AVAIL   (EQ_DESC_MAX_PAGE * NUM_EQ_PAGES - 2)

Definition at line 1588 of file bxe.h.

◆ MAX_FUNC_NUM

#define MAX_FUNC_NUM   8 /* common to all chips */

Definition at line 414 of file bxe.h.

◆ MAX_IGU_ATTN_ACK_TO

#define MAX_IGU_ATTN_ACK_TO   100

Definition at line 2025 of file bxe.h.

◆ MAX_MSI_VECTOR

#define MAX_MSI_VECTOR   8 /* a constant for HW limit */

Definition at line 417 of file bxe.h.

◆ MAX_RSS_CHAINS

#define MAX_RSS_CHAINS   16 /* a constant for HW limit */

Definition at line 416 of file bxe.h.

◆ MAX_SP_DESC_CNT

#define MAX_SP_DESC_CNT   (SP_DESC_CNT - 1)

Definition at line 1605 of file bxe.h.

◆ MAX_SPQ_PENDING

#define MAX_SPQ_PENDING   8

Definition at line 1606 of file bxe.h.

◆ MAX_VNIC_NUM

#define MAX_VNIC_NUM   4

Definition at line 413 of file bxe.h.

◆ MF_INFO_VALID_MAC

#define MF_INFO_VALID_MAC   0x0001

Definition at line 1075 of file bxe.h.

◆ MF_PROTO_SUPPORT_ETHERNET

#define MF_PROTO_SUPPORT_ETHERNET   0x1

Definition at line 1095 of file bxe.h.

◆ MF_PROTO_SUPPORT_FCOE

#define MF_PROTO_SUPPORT_FCOE   0x4

Definition at line 1097 of file bxe.h.

◆ MF_PROTO_SUPPORT_ISCSI

#define MF_PROTO_SUPPORT_ISCSI   0x2

Definition at line 1096 of file bxe.h.

◆ MFCFG_ADDR

#define MFCFG_ADDR (   sc,
  field 
)     (sc->devinfo.mf_cfg_base + offsetof(struct mf_cfg, field))

Definition at line 1941 of file bxe.h.

◆ MFCFG_RD

#define MFCFG_RD (   sc,
  field 
)    REG_RD(sc, MFCFG_ADDR(sc, field))

Definition at line 1943 of file bxe.h.

◆ MFCFG_RD16

#define MFCFG_RD16 (   sc,
  field 
)    REG_RD16(sc, MFCFG_ADDR(sc, field))

Definition at line 1944 of file bxe.h.

◆ MFCFG_WR

#define MFCFG_WR (   sc,
  field,
  val 
)    REG_WR(sc, MFCFG_ADDR(sc, field), val)

Definition at line 1945 of file bxe.h.

◆ MIN_ABOVE_THRESH

#define MIN_ABOVE_THRESH   32768

Definition at line 778 of file bxe.h.

◆ MIN_RES

#define MIN_RES   100

Definition at line 776 of file bxe.h.

◆ MIN_RX_AVAIL

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

Definition at line 325 of file bxe.h.

◆ MIN_RX_SIZE_NONTPA

#define MIN_RX_SIZE_NONTPA (   sc)     (max(MIN_RX_SIZE_NONTPA_HW, MIN_RX_AVAIL(sc)))

Definition at line 333 of file bxe.h.

◆ MIN_RX_SIZE_NONTPA_HW

#define MIN_RX_SIZE_NONTPA_HW   ETH_MIN_RX_CQES_WITHOUT_TPA

Definition at line 330 of file bxe.h.

◆ MIN_RX_SIZE_TPA

#define MIN_RX_SIZE_TPA (   sc)     (max(MIN_RX_SIZE_TPA_HW(sc), MIN_RX_AVAIL(sc)))

Definition at line 331 of file bxe.h.

◆ MIN_RX_SIZE_TPA_HW

#define MIN_RX_SIZE_TPA_HW (   sc)
Value:
ETH_MIN_RX_CQES_WITH_TPA_E1H_E2)
#define ETH_MIN_RX_CQES_WITH_TPA_E1

Definition at line 327 of file bxe.h.

◆ MULTI_MASK

#define MULTI_MASK   0x7f

Definition at line 2049 of file bxe.h.

◆ NEXT_EQ_IDX

#define NEXT_EQ_IDX (   x)
Value:
((((x) & EQ_DESC_MAX_PAGE) == (EQ_DESC_MAX_PAGE - 1)) ? \
((x) + 2) : ((x) + 1))
#define EQ_DESC_MAX_PAGE
Definition: bxe.h:1585

Definition at line 1590 of file bxe.h.

◆ NIV_ALLOWED_PRIORITIES

#define NIV_ALLOWED_PRIORITIES (   sc)    ((sc)->devinfo.mf_info.niv_allowed_priorities)

Definition at line 1062 of file bxe.h.

◆ NIV_DEFAULT_COS

#define NIV_DEFAULT_COS (   sc)    ((sc)->devinfo.mf_info.niv_default_cos)

Definition at line 1065 of file bxe.h.

◆ NIV_DEFAULT_VLAN

#define NIV_DEFAULT_VLAN (   sc)    ((sc)->devinfo.mf_info.default_vlan)

Definition at line 1059 of file bxe.h.

◆ NUM_BD_PG_REQ

#define NUM_BD_PG_REQ (   sc)     ((NUM_BD_REQ(sc) + RX_BD_USABLE_PER_PAGE - 1) / RX_BD_USABLE_PER_PAGE)

Definition at line 317 of file bxe.h.

◆ NUM_BD_REQ

#define NUM_BD_REQ (   sc)     BRB_SIZE(sc)

Definition at line 315 of file bxe.h.

◆ NUM_EQ_DESC

#define NUM_EQ_DESC   (EQ_DESC_CNT_PAGE * NUM_EQ_PAGES)

Definition at line 1586 of file bxe.h.

◆ NUM_EQ_PAGES

#define NUM_EQ_PAGES   1 /* must be a power of 2 */

Definition at line 1583 of file bxe.h.

◆ NUM_RCQ_PG_REQ

#define NUM_RCQ_PG_REQ (   sc)     ((NUM_RCQ_REQ(sc) + RCQ_USABLE_PER_PAGE - 1) / RCQ_USABLE_PER_PAGE)

Definition at line 369 of file bxe.h.

◆ NUM_RCQ_REQ

#define NUM_RCQ_REQ (   sc)     BRB_SIZE(sc)

Definition at line 367 of file bxe.h.

◆ NUM_SGE_PG_REQ

#define NUM_SGE_PG_REQ (   sc)     ((NUM_SGE_REQ(sc) + RX_SGE_USABLE_PER_PAGE - 1) / RX_SGE_USABLE_PER_PAGE)

Definition at line 249 of file bxe.h.

◆ NUM_SGE_REQ

#define NUM_SGE_REQ (   sc)     (MAX_AGG_QS(sc) + (BRB_SIZE(sc) - MAX_AGG_QS(sc)) / 2)

Definition at line 247 of file bxe.h.

◆ NVRAM_1MB_SIZE

#define NVRAM_1MB_SIZE   0x20000

Definition at line 1262 of file bxe.h.

◆ NVRAM_PAGE_SIZE

#define NVRAM_PAGE_SIZE   256

Definition at line 1264 of file bxe.h.

◆ NVRAM_TIMEOUT_COUNT

#define NVRAM_TIMEOUT_COUNT   30000

Definition at line 1263 of file bxe.h.

◆ ONCHIP_ADDR1

#define ONCHIP_ADDR1 (   x)    ((uint32_t)(((uint64_t)x >> 12) & 0xFFFFFFFF))

Definition at line 433 of file bxe.h.

◆ ONCHIP_ADDR2

#define ONCHIP_ADDR2 (   x)    ((uint32_t)((1 << 20) | ((uint64_t)x >> 44)))

Definition at line 434 of file bxe.h.

◆ OOO_IDX

#define OOO_IDX (   sc)    (BXE_NUM_NON_CNIC_QUEUES(sc) + OOO_IDX_OFFSET)

Definition at line 850 of file bxe.h.

◆ OVLAN

#define OVLAN (   sc)    ((sc)->devinfo.mf_info.ext_id)

Definition at line 1055 of file bxe.h.

◆ PAGES_PER_SGE

#define PAGES_PER_SGE   (1 << PAGES_PER_SGE_SHIFT)

Definition at line 257 of file bxe.h.

◆ PAGES_PER_SGE_SHIFT

#define PAGES_PER_SGE_SHIFT   0

Definition at line 256 of file bxe.h.

◆ PATH_ID

#define PATH_ID (   sc)    SC_PATH(sc)

Definition at line 1395 of file bxe.h.

◆ PCI_ANY_ID

#define PCI_ANY_ID   (uint16_t)(~0U)

Definition at line 147 of file bxe.h.

◆ PCI_PM_D0

#define PCI_PM_D0   1

Definition at line 2086 of file bxe.h.

◆ PCI_PM_D3hot

#define PCI_PM_D3hot   2

Definition at line 2087 of file bxe.h.

◆ PERIODIC_GO

#define PERIODIC_GO   1

Definition at line 1354 of file bxe.h.

◆ PERIODIC_STOP

#define PERIODIC_STOP   0

Definition at line 1353 of file bxe.h.

◆ PFS_PER_PORT

#define PFS_PER_PORT (   sc)     ((CHIP_PORT_MODE(sc) == CHIP_4_PORT_MODE) ? 2 : 4)

Definition at line 2051 of file bxe.h.

◆ PMF_DMAE_C

#define PMF_DMAE_C (   sc)    ((SC_PORT(sc) * MAX_DMAE_C_PER_PORT) + E1HVN_MAX)

Definition at line 1999 of file bxe.h.

◆ PORT_AUI

#define PORT_AUI   0x01

Definition at line 2103 of file bxe.h.

◆ PORT_BNC

#define PORT_BNC   0x04

Definition at line 2106 of file bxe.h.

◆ PORT_DA

#define PORT_DA   0x05

Definition at line 2107 of file bxe.h.

◆ PORT_FIBRE

#define PORT_FIBRE   0x03

Definition at line 2105 of file bxe.h.

◆ PORT_ID

#define PORT_ID (   sc)    SC_PORT(sc)

Definition at line 1394 of file bxe.h.

◆ PORT_MII

#define PORT_MII   0x02

Definition at line 2104 of file bxe.h.

◆ PORT_NONE

#define PORT_NONE   0xef

Definition at line 2108 of file bxe.h.

◆ PORT_OTHER

#define PORT_OTHER   0xff

Definition at line 2109 of file bxe.h.

◆ PORT_TP

#define PORT_TP   0x00

Definition at line 2102 of file bxe.h.

◆ QLOGIC_VENDORID

#define QLOGIC_VENDORID   0x1077

Definition at line 146 of file bxe.h.

◆ QM_ARB_BYTES

#define QM_ARB_BYTES   160000

Definition at line 774 of file bxe.h.

◆ QM_CID_ROUND

#define QM_CID_ROUND   1024

Definition at line 721 of file bxe.h.

◆ QM_ILT_PAGE_SZ

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

Definition at line 720 of file bxe.h.

◆ QM_ILT_PAGE_SZ_HW

#define QM_ILT_PAGE_SZ_HW   0

Definition at line 719 of file bxe.h.

◆ RCQ

#define RCQ (   x)    ((x) & RCQ_MAX)

Definition at line 357 of file bxe.h.

◆ RCQ_IDX

#define RCQ_IDX (   x)    ((x) & RCQ_USABLE_PER_PAGE)

Definition at line 359 of file bxe.h.

◆ RCQ_MAX

#define RCQ_MAX   (RCQ_TOTAL - 1)

Definition at line 352 of file bxe.h.

◆ RCQ_NEXT

#define RCQ_NEXT (   x)
Value:
((((x) & RCQ_USABLE_PER_PAGE) == (RCQ_USABLE_PER_PAGE - 1)) ? \
((x) + 1 + RCQ_NEXT_PAGE_DESC_CNT) : ((x) + 1))
#define RCQ_USABLE_PER_PAGE
Definition: bxe.h:349
#define RCQ_NEXT_PAGE_DESC_CNT
Definition: bxe.h:348

Definition at line 354 of file bxe.h.

◆ RCQ_NEXT_PAGE_DESC_CNT

#define RCQ_NEXT_PAGE_DESC_CNT   1

Definition at line 348 of file bxe.h.

◆ RCQ_NUM_PAGES

#define RCQ_NUM_PAGES   (RX_BD_NUM_PAGES * CQE_BD_REL) /* power of 2 */

Definition at line 346 of file bxe.h.

◆ RCQ_PAGE

#define RCQ_PAGE (   x)    (((x) & ~RCQ_USABLE_PER_PAGE) >> 7)

Definition at line 358 of file bxe.h.

◆ RCQ_TH_HI

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

Definition at line 375 of file bxe.h.

◆ RCQ_TH_LO

#define RCQ_TH_LO (   sc)
Value:
(NUM_RCQ_REQ(sc) + \
NUM_RCQ_PG_REQ(sc) * RCQ_NEXT_PAGE_DESC_CNT + \
FW_DROP_LEVEL(sc))
#define NUM_RCQ_REQ(sc)
Definition: bxe.h:367

Definition at line 371 of file bxe.h.

◆ RCQ_TOTAL

#define RCQ_TOTAL   (RCQ_TOTAL_PER_PAGE * RCQ_NUM_PAGES)

Definition at line 350 of file bxe.h.

◆ RCQ_TOTAL_PER_PAGE

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

Definition at line 347 of file bxe.h.

◆ RCQ_USABLE

#define RCQ_USABLE   (RCQ_USABLE_PER_PAGE * RCQ_NUM_PAGES)

Definition at line 351 of file bxe.h.

◆ RCQ_USABLE_PER_PAGE

#define RCQ_USABLE_PER_PAGE   (RCQ_TOTAL_PER_PAGE - RCQ_NEXT_PAGE_DESC_CNT)

Definition at line 349 of file bxe.h.

◆ REG_RD

#define REG_RD (   sc,
  offset 
)    REG_RD32(sc, offset)

Definition at line 1874 of file bxe.h.

◆ REG_RD16

#define REG_RD16 (   sc,
  offset 
)
Value:
bus_space_read_2(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \
uint32_t offset
Definition: bxe.c:321
#define BAR0
Definition: bxe.h:1818

Definition at line 1862 of file bxe.h.

◆ REG_RD32

#define REG_RD32 (   sc,
  offset 
)
Value:
bus_space_read_4(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \

Definition at line 1867 of file bxe.h.

◆ REG_RD8

#define REG_RD8 (   sc,
  offset 
)
Value:
bus_space_read_1(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \

Definition at line 1857 of file bxe.h.

◆ REG_RD_DMAE

#define REG_RD_DMAE (   sc,
  offset,
  valp,
  len32 
)
Value:
do { \
bxe_read_dmae(sc, offset, len32); \
memcpy(valp, BXE_SP(sc, wb_data[0]), (len32) * 4); \
} while (0)
#define BXE_SP(sc, var)
Definition: bxe.h:1880

Definition at line 1887 of file bxe.h.

◆ REG_RD_DMAE_LEN

#define REG_RD_DMAE_LEN (   sc,
  offset,
  valp,
  len32 
)     REG_RD_DMAE(sc, offset, valp, len32)

Definition at line 1902 of file bxe.h.

◆ REG_RD_IND

#define REG_RD_IND (   sc,
  offset 
)    bxe_reg_rd_ind(sc, offset)

Definition at line 1877 of file bxe.h.

◆ REG_WR

#define REG_WR (   sc,
  offset,
  val 
)    REG_WR32(sc, offset, val)

Definition at line 1875 of file bxe.h.

◆ REG_WR16

#define REG_WR16 (   sc,
  offset,
  val 
)
Value:
bus_space_write_2(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \
offset, val)

Definition at line 1847 of file bxe.h.

◆ REG_WR32

#define REG_WR32 (   sc,
  offset,
  val 
)
Value:
bus_space_write_4(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \
offset, val)

Definition at line 1852 of file bxe.h.

◆ REG_WR8

#define REG_WR8 (   sc,
  offset,
  val 
)
Value:
bus_space_write_1(sc->bar[BAR0].tag, \
sc->bar[BAR0].handle, \
offset, val)

Definition at line 1842 of file bxe.h.

◆ REG_WR_DMAE

#define REG_WR_DMAE (   sc,
  offset,
  valp,
  len32 
)
Value:
do { \
memcpy(BXE_SP(sc, wb_data[0]), valp, (len32) * 4); \
bxe_write_dmae(sc, BXE_SP_MAPPING(sc, wb_data), offset, len32); \
} while (0)
#define BXE_SP_MAPPING(sc, var)
Definition: bxe.h:1881

Definition at line 1893 of file bxe.h.

◆ REG_WR_DMAE_LEN

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

Definition at line 1899 of file bxe.h.

◆ REG_WR_IND

#define REG_WR_IND (   sc,
  offset,
  val 
)    bxe_reg_wr_ind(sc, offset, val)

Definition at line 1878 of file bxe.h.

◆ roundup

#define roundup (   x,
 
)    ((((x) + ((y) - 1)) / (y)) * (y))

Definition at line 130 of file bxe.h.

◆ RS_PERIODIC_TIMEOUT_USEC

#define RS_PERIODIC_TIMEOUT_USEC   400

Definition at line 771 of file bxe.h.

◆ RX_BD

#define RX_BD (   x)    ((x) & RX_BD_MAX)

Definition at line 305 of file bxe.h.

◆ RX_BD_IDX

#define RX_BD_IDX (   x)    ((x) & RX_BD_PER_PAGE_MASK)

Definition at line 307 of file bxe.h.

◆ RX_BD_MAX

#define RX_BD_MAX   (RX_BD_TOTAL - 1)

Definition at line 300 of file bxe.h.

◆ RX_BD_NEXT

#define RX_BD_NEXT (   x)
Value:
((x) + 3) : ((x) + 1))
#define RX_BD_USABLE_PER_PAGE
Definition: bxe.h:296
#define RX_BD_PER_PAGE_MASK
Definition: bxe.h:297

Definition at line 302 of file bxe.h.

◆ RX_BD_NEXT_PAGE_DESC_CNT

#define RX_BD_NEXT_PAGE_DESC_CNT   2

Definition at line 295 of file bxe.h.

◆ RX_BD_NUM_PAGES

#define RX_BD_NUM_PAGES   8 /* power of 2 */

Definition at line 293 of file bxe.h.

◆ RX_BD_PAGE

#define RX_BD_PAGE (   x)    (((x) & ~RX_BD_PER_PAGE_MASK) >> 9)

Definition at line 306 of file bxe.h.

◆ RX_BD_PER_PAGE_MASK

#define RX_BD_PER_PAGE_MASK   (RX_BD_TOTAL_PER_PAGE - 1)

Definition at line 297 of file bxe.h.

◆ RX_BD_TOTAL

#define RX_BD_TOTAL   (RX_BD_TOTAL_PER_PAGE * RX_BD_NUM_PAGES)

Definition at line 298 of file bxe.h.

◆ RX_BD_TOTAL_PER_PAGE

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

Definition at line 294 of file bxe.h.

◆ RX_BD_USABLE

#define RX_BD_USABLE   (RX_BD_USABLE_PER_PAGE * RX_BD_NUM_PAGES)

Definition at line 299 of file bxe.h.

◆ RX_BD_USABLE_PER_PAGE

#define RX_BD_USABLE_PER_PAGE   (RX_BD_TOTAL_PER_PAGE - RX_BD_NEXT_PAGE_DESC_CNT)

Definition at line 296 of file bxe.h.

◆ RX_SGE

#define RX_SGE (   x)    ((x) & RX_SGE_MAX)

Definition at line 214 of file bxe.h.

◆ RX_SGE_MASK_ELEM_MASK

#define RX_SGE_MASK_ELEM_MASK   ((uint64_t)RX_SGE_MASK_ELEM_SZ - 1)

Definition at line 222 of file bxe.h.

◆ RX_SGE_MASK_ELEM_ONE_MASK

#define RX_SGE_MASK_ELEM_ONE_MASK   ((uint64_t)(~0))

Definition at line 230 of file bxe.h.

◆ RX_SGE_MASK_ELEM_SHIFT

#define RX_SGE_MASK_ELEM_SHIFT   6

Definition at line 221 of file bxe.h.

◆ RX_SGE_MASK_ELEM_SZ

#define RX_SGE_MASK_ELEM_SZ   64

Definition at line 220 of file bxe.h.

◆ RX_SGE_MASK_LEN

#define RX_SGE_MASK_LEN    ((RX_SGE_NUM_PAGES * RX_SGE_TOTAL_PER_PAGE) / RX_SGE_MASK_ELEM_SZ)

Definition at line 233 of file bxe.h.

◆ RX_SGE_MASK_LEN_MASK

#define RX_SGE_MASK_LEN_MASK   (RX_SGE_MASK_LEN - 1)

Definition at line 235 of file bxe.h.

◆ RX_SGE_MAX

#define RX_SGE_MAX   (RX_SGE_TOTAL - 1)

Definition at line 213 of file bxe.h.

◆ RX_SGE_NEXT

#define RX_SGE_NEXT (   x)
Value:
? (x) + 1 + RX_SGE_NEXT_PAGE_DESC_CNT : (x) + 1)
#define RX_SGE_PER_PAGE_MASK
Definition: bxe.h:210
#define RX_SGE_NEXT_PAGE_DESC_CNT
Definition: bxe.h:208
#define RX_SGE_USABLE_PER_PAGE
Definition: bxe.h:209

Definition at line 216 of file bxe.h.

◆ RX_SGE_NEXT_MASK_ELEM

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

Definition at line 236 of file bxe.h.

◆ RX_SGE_NEXT_PAGE_DESC_CNT

#define RX_SGE_NEXT_PAGE_DESC_CNT   2

Definition at line 208 of file bxe.h.

◆ RX_SGE_NUM_PAGES

#define RX_SGE_NUM_PAGES   2 /* must be a power of 2 */

Definition at line 206 of file bxe.h.

◆ RX_SGE_ONES_MASK

#define RX_SGE_ONES_MASK (   idx)     (((uint64_t)0x1 << (((idx) & RX_SGE_MASK_ELEM_MASK) + 1)) - 1)

Definition at line 228 of file bxe.h.

◆ RX_SGE_PER_PAGE_MASK

#define RX_SGE_PER_PAGE_MASK   (RX_SGE_TOTAL_PER_PAGE - 1)

Definition at line 210 of file bxe.h.

◆ RX_SGE_TOTAL

#define RX_SGE_TOTAL   (RX_SGE_TOTAL_PER_PAGE * RX_SGE_NUM_PAGES)

Definition at line 211 of file bxe.h.

◆ RX_SGE_TOTAL_PER_PAGE

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

Definition at line 207 of file bxe.h.

◆ RX_SGE_USABLE

#define RX_SGE_USABLE   (RX_SGE_USABLE_PER_PAGE * RX_SGE_NUM_PAGES)

Definition at line 212 of file bxe.h.

◆ RX_SGE_USABLE_PER_PAGE

#define RX_SGE_USABLE_PER_PAGE   (RX_SGE_TOTAL_PER_PAGE - RX_SGE_NEXT_PAGE_DESC_CNT)

Definition at line 209 of file bxe.h.

◆ SC_ABS_FUNC

#define SC_ABS_FUNC (   sc)    (sc->pfunc_abs)

Definition at line 1391 of file bxe.h.

◆ SC_FUNC

#define SC_FUNC (   sc)    (sc->pfunc_rel)

Definition at line 1390 of file bxe.h.

◆ SC_FW_MB_IDX

#define SC_FW_MB_IDX (   sc)    SC_FW_MB_IDX_VN(sc, SC_VN(sc))

Definition at line 1402 of file bxe.h.

◆ SC_FW_MB_IDX_VN

#define SC_FW_MB_IDX_VN (   sc,
  vn 
)
Value:
(SC_PORT(sc) + (vn) * \
((CHIP_IS_E1x(sc) || (CHIP_IS_MODE_4_PORT(sc))) ? 2 : 1))
#define CHIP_IS_MODE_4_PORT(sc)
Definition: bxe.h:1242
#define SC_PORT(sc)
Definition: bxe.h:1389

Definition at line 1399 of file bxe.h.

◆ SC_L_ID

#define SC_L_ID (   sc)    (SC_VN(sc) << 2)

Definition at line 1393 of file bxe.h.

◆ SC_MAX_VN_NUM

#define SC_MAX_VN_NUM (   sc)    PFS_PER_PORT(sc)

Definition at line 2053 of file bxe.h.

◆ SC_PATH

#define SC_PATH (   sc)    (sc->path_id)

Definition at line 1388 of file bxe.h.

◆ SC_PORT

#define SC_PORT (   sc)    (sc->pfunc_rel & 1)

Definition at line 1389 of file bxe.h.

◆ SC_VN

#define SC_VN (   sc)    (sc->pfunc_rel >> 1)

Definition at line 1392 of file bxe.h.

◆ SET_FLAG

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

Definition at line 176 of file bxe.h.

◆ SGE_MASK_CLEAR_BIT

#define SGE_MASK_CLEAR_BIT (   fp,
  idx 
)
Value:
__SGE_MASK_CLEAR_BIT((fp)->sge_mask[(idx) >> RX_SGE_MASK_ELEM_SHIFT], \
#define __SGE_MASK_CLEAR_BIT(el, bit)
Definition: bxe.h:386
#define RX_SGE_MASK_ELEM_MASK
Definition: bxe.h:222
#define RX_SGE_MASK_ELEM_SHIFT
Definition: bxe.h:221

Definition at line 395 of file bxe.h.

◆ SGE_MASK_SET_BIT

#define SGE_MASK_SET_BIT (   fp,
  idx 
)
Value:
__SGE_MASK_SET_BIT((fp)->sge_mask[(idx) >> RX_SGE_MASK_ELEM_SHIFT], \
#define __SGE_MASK_SET_BIT(el, bit)
Definition: bxe.h:381

Definition at line 391 of file bxe.h.

◆ SGE_PAGE_ALIGN

#define SGE_PAGE_ALIGN (   addr)    BCM_PAGE_ALIGN(addr)

Definition at line 260 of file bxe.h.

◆ SGE_PAGE_SHIFT

#define SGE_PAGE_SHIFT   BCM_PAGE_SHIFT

Definition at line 259 of file bxe.h.

◆ SGE_PAGE_SIZE

#define SGE_PAGE_SIZE   BCM_PAGE_SIZE

Definition at line 258 of file bxe.h.

◆ SGE_PAGES

#define SGE_PAGES   (SGE_PAGE_SIZE * PAGES_PER_SGE)

Definition at line 261 of file bxe.h.

◆ SGE_TH_HI

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

Definition at line 253 of file bxe.h.

◆ SGE_TH_LO

#define SGE_TH_LO (   sc)     (NUM_SGE_REQ(sc) + NUM_SGE_PG_REQ(sc) * RX_SGE_NEXT_PAGE_DESC_CNT)

Definition at line 251 of file bxe.h.

◆ SHMEM2_ADDR

#define SHMEM2_ADDR (   sc,
  field 
)     (sc->devinfo.shmem2_base + offsetof(struct shmem2_region, field))

Definition at line 1933 of file bxe.h.

◆ SHMEM2_HAS

#define SHMEM2_HAS (   sc,
  field 
)
Value:
(sc->devinfo.shmem2_base && (REG_RD(sc, SHMEM2_ADDR(sc, size)) > \
offsetof(struct shmem2_region, field)))
uint32_t size
Definition: bxe.c:322
#define SHMEM2_ADDR(sc, field)
Definition: bxe.h:1933
#define REG_RD(sc, offset)
Definition: bxe.h:1874

Definition at line 1935 of file bxe.h.

◆ SHMEM2_RD

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

Definition at line 1938 of file bxe.h.

◆ SHMEM2_WR

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

Definition at line 1939 of file bxe.h.

◆ SHMEM_ADDR

#define SHMEM_ADDR (   sc,
  field 
)     (sc->devinfo.shmem_base + offsetof(struct shmem_region, field))

Definition at line 1927 of file bxe.h.

◆ SHMEM_RD

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

Definition at line 1929 of file bxe.h.

◆ SHMEM_RD16

#define SHMEM_RD16 (   sc,
  field 
)    REG_RD16(sc, SHMEM_ADDR(sc, field))

Definition at line 1930 of file bxe.h.

◆ SHMEM_WR

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

Definition at line 1931 of file bxe.h.

◆ SM_RX_ID

#define SM_RX_ID   0

Definition at line 747 of file bxe.h.

◆ SM_TX_ID

#define SM_TX_ID   1

Definition at line 748 of file bxe.h.

◆ SP_DESC_CNT

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

Definition at line 1604 of file bxe.h.

◆ SPEED_10

#define SPEED_10   10

Definition at line 2080 of file bxe.h.

◆ SPEED_100

#define SPEED_100   100

Definition at line 2081 of file bxe.h.

◆ SPEED_1000

#define SPEED_1000   1000

Definition at line 2082 of file bxe.h.

◆ SPEED_10000

#define SPEED_10000   10000

Definition at line 2084 of file bxe.h.

◆ SPEED_2500

#define SPEED_2500   2500

Definition at line 2083 of file bxe.h.

◆ SPEED_UNKNOWN

#define SPEED_UNKNOWN   (-1)

Definition at line 2094 of file bxe.h.

◆ SRC_CONN_NUM

#define SRC_CONN_NUM   (1 << SRC_HASH_BITS) /* 1024 */

Definition at line 735 of file bxe.h.

◆ SRC_HASH_BITS

#define SRC_HASH_BITS   10

Definition at line 734 of file bxe.h.

◆ SRC_ILT_LINES

#define SRC_ILT_LINES   DIV_ROUND_UP(SRC_ILT_SZ, SRC_ILT_PAGE_SZ)

Definition at line 738 of file bxe.h.

◆ SRC_ILT_PAGE_SZ

#define SRC_ILT_PAGE_SZ   (4096 << SRC_ILT_PAGE_SZ_HW) /* 4K */

Definition at line 733 of file bxe.h.

◆ SRC_ILT_PAGE_SZ_HW

#define SRC_ILT_PAGE_SZ_HW   0

Definition at line 732 of file bxe.h.

◆ SRC_ILT_SZ

#define SRC_ILT_SZ   (sizeof(struct src_ent) * SRC_CONN_NUM)

Definition at line 736 of file bxe.h.

◆ SRC_T2_SZ

#define SRC_T2_SZ   SRC_ILT_SZ

Definition at line 737 of file bxe.h.

◆ STORM_ASSERT_ARRAY_SIZE

#define STORM_ASSERT_ARRAY_SIZE   50

Definition at line 2027 of file bxe.h.

◆ SUB_S16

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

Definition at line 379 of file bxe.h.

◆ SW_CID

#define SW_CID (   x)    (le32toh(x) & BXE_SWCID_MASK)

Definition at line 2067 of file bxe.h.

◆ T_FAIR_COEF

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

Definition at line 781 of file bxe.h.

◆ TM_CONN_NUM

#define TM_CONN_NUM   1024

Definition at line 727 of file bxe.h.

◆ TM_ILT_LINES

#define TM_ILT_LINES   DIV_ROUND_UP(TM_ILT_SZ, TM_ILT_PAGE_SZ)

Definition at line 729 of file bxe.h.

◆ TM_ILT_PAGE_SZ

#define TM_ILT_PAGE_SZ   (4096 << TM_ILT_PAGE_SZ_HW) /* 4K */

Definition at line 725 of file bxe.h.

◆ TM_ILT_PAGE_SZ_HW

#define TM_ILT_PAGE_SZ_HW   0

Definition at line 724 of file bxe.h.

◆ TM_ILT_SZ

#define TM_ILT_SZ   (8 * TM_CONN_NUM)

Definition at line 728 of file bxe.h.

◆ TPA_AGG_SIZE

#define TPA_AGG_SIZE   min((8 * SGE_PAGES), 0xffff)

Definition at line 262 of file bxe.h.

◆ TX_BD

#define TX_BD (   x)    ((x) & TX_BD_MAX)

Definition at line 278 of file bxe.h.

◆ TX_BD_IDX

#define TX_BD_IDX (   x)    ((x) & TX_BD_USABLE_PER_PAGE)

Definition at line 280 of file bxe.h.

◆ TX_BD_MAX

#define TX_BD_MAX   (TX_BD_TOTAL - 1)

Definition at line 273 of file bxe.h.

◆ TX_BD_NEXT

#define TX_BD_NEXT (   x)
Value:
((x) + 2) : ((x) + 1))
#define TX_BD_USABLE_PER_PAGE
Definition: bxe.h:270

Definition at line 275 of file bxe.h.

◆ TX_BD_NUM_PAGES

#define TX_BD_NUM_PAGES   16 /* must be a power of 2 */

Definition at line 268 of file bxe.h.

◆ TX_BD_PAGE

#define TX_BD_PAGE (   x)    (((x) & ~TX_BD_USABLE_PER_PAGE) >> 8)

Definition at line 279 of file bxe.h.

◆ TX_BD_TOTAL

#define TX_BD_TOTAL   (TX_BD_TOTAL_PER_PAGE * TX_BD_NUM_PAGES)

Definition at line 271 of file bxe.h.

◆ TX_BD_TOTAL_PER_PAGE

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

Definition at line 269 of file bxe.h.

◆ TX_BD_USABLE

#define TX_BD_USABLE   (TX_BD_USABLE_PER_PAGE * TX_BD_NUM_PAGES)

Definition at line 272 of file bxe.h.

◆ TX_BD_USABLE_PER_PAGE

#define TX_BD_USABLE_PER_PAGE   (TX_BD_TOTAL_PER_PAGE - 1)

Definition at line 270 of file bxe.h.

◆ U64_HI

#define U64_HI (   addr)    (0)

Definition at line 172 of file bxe.h.

◆ U64_LO

#define U64_LO (   addr)    ((uint32_t)(addr))

Definition at line 171 of file bxe.h.

◆ UNLOAD_CLOSE

#define UNLOAD_CLOSE   1

Definition at line 405 of file bxe.h.

◆ UNLOAD_NORMAL

#define UNLOAD_NORMAL   0

Definition at line 404 of file bxe.h.

◆ UNLOAD_RECOVERY

#define UNLOAD_RECOVERY   2

Definition at line 406 of file bxe.h.

◆ USES_WARPCORE

#define USES_WARPCORE (   sc)    (CHIP_IS_E3(sc))

Definition at line 1209 of file bxe.h.

◆ VALID_OVLAN

#define VALID_OVLAN (   ovlan)    ((ovlan) <= 4096)

Definition at line 1053 of file bxe.h.

◆ VF_MAC_CREDIT_CNT

#define VF_MAC_CREDIT_CNT   0

Definition at line 117 of file bxe.h.

◆ VF_VLAN_CREDIT_CNT

#define VF_VLAN_CREDIT_CNT   (0)

Definition at line 118 of file bxe.h.

◆ VIF_ID

#define VIF_ID (   sc)    ((sc)->devinfo.mf_info.ext_id)

Definition at line 1056 of file bxe.h.

◆ VIRT_WR_DMAE_LEN

#define VIRT_WR_DMAE_LEN (   sc,
  data,
  addr,
  len32,
  le32_swap 
)
Value:
do { \
/* if (le32_swap) { */ \
/* BLOGW(sc, "VIRT_WR_DMAE_LEN with le32_swap=1\n"); */ \
/* } */ \
memcpy(GUNZIP_BUF(sc), data, len32 * 4); \
ecore_write_big_buf_wb(sc, addr, len32); \
} while (0)
#define GUNZIP_BUF(sc)
Definition: bxe.h:1623
uint32_t addr
Definition: ecore_init.h:729

Definition at line 1905 of file bxe.h.

◆ VNIC_ID

#define VNIC_ID (   sc)    SC_VN(sc)

Definition at line 1396 of file bxe.h.

◆ VNICS_PER_PATH

#define VNICS_PER_PATH (   sc)
Value:
((sc)->devinfo.mf_info.vnics_per_port * \
((CHIP_PORT_MODE(sc) == CHIP_4_PORT_MODE) ? 2 : 1 ))
#define CHIP_4_PORT_MODE
Definition: bxe.h:1238

Definition at line 1045 of file bxe.h.

◆ VNICS_PER_PORT

#define VNICS_PER_PORT (   sc)    ((sc)->devinfo.mf_info.vnics_per_port)

Definition at line 1044 of file bxe.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OOO_IDX_OFFSET 
FCOE_IDX_OFFSET 
FWD_IDX_OFFSET 

Definition at line 837 of file bxe.h.

◆ anonymous enum

anonymous enum
Enumerator
BXE_PORT_QUERY_IDX 
BXE_PF_QUERY_IDX 
BXE_FCOE_QUERY_IDX 
BXE_FIRST_QUEUE_QUERY_IDX 

Definition at line 871 of file bxe.h.

◆ anonymous enum

anonymous enum
Enumerator
BXE_LINK_REPORT_FULL_DUPLEX 
BXE_LINK_REPORT_LINK_DOWN 
BXE_LINK_REPORT_RX_FC_ON 
BXE_LINK_REPORT_TX_FC_ON 

Definition at line 1299 of file bxe.h.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ bxe_ack_int()

static uint16_t bxe_ack_int ( struct bxe_softc sc)
inlinestatic

Definition at line 2412 of file bxe.h.

References bxe_hc_ack_int(), bxe_igu_ack_int(), bxe_softc::devinfo, bxe_devinfo::int_block, and INT_BLOCK_HC.

Referenced by bxe_igu_int_enable(), and bxe_intr_legacy().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bxe_ack_sb()

static void bxe_ack_sb ( struct bxe_softc sc,
uint8_t  igu_sb_id,
uint8_t  storm,
uint16_t  index,
uint8_t  op,
uint8_t  update 
)
inlinestatic

◆ bxe_clear_bit()

void bxe_clear_bit ( int  nr,
volatile unsigned long *  addr 
)

Definition at line 818 of file bxe.c.

References addr.

Referenced by bxe_handle_rx_mode_eqe().

Here is the caller graph for this function:

◆ bxe_cmpxchg()

int bxe_cmpxchg ( volatile int *  addr,
int  old,
int  new 
)

Definition at line 851 of file bxe.c.

References addr.

◆ bxe_dma_alloc()

int bxe_dma_alloc ( struct bxe_softc sc,
bus_size_t  size,
struct bxe_dma dma,
const char *  msg 
)

Definition at line 898 of file bxe.c.

References BCM_PAGE_SIZE, BLOGE, bxe_dma_map_addr(), bxe_dma::map, bxe_dma::msg, bxe_softc::parent_dma_tag, bxe_dma::sc, size, bxe_dma::size, bxe_dma::tag, and bxe_dma::vaddr.

Referenced by bxe_alloc_fw_stats_mem(), bxe_alloc_hsi_mem(), and bxe_alloc_mem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bxe_dma_free()

void bxe_dma_free ( struct bxe_softc sc,
struct bxe_dma dma 
)

Definition at line 966 of file bxe.c.

References DBASSERT, bxe_dma::map, bxe_dma::sc, bxe_dma::size, bxe_dma::tag, and bxe_dma::vaddr.

Referenced by bxe_alloc_hsi_mem(), bxe_free_fw_stats_mem(), bxe_free_hsi_mem(), and bxe_free_mem().

Here is the caller graph for this function:

◆ bxe_dmae_opcode()

uint32_t bxe_dmae_opcode ( struct bxe_softc sc,
uint8_t  src_type,
uint8_t  dst_type,
uint8_t  with_comp,
uint8_t  comp_type 
)

◆ bxe_dmae_opcode_add_comp()

uint32_t bxe_dmae_opcode_add_comp ( uint32_t  opcode,
uint8_t  comp_type 
)

Definition at line 1523 of file bxe.c.

References DMAE_CMD_C_DST_SHIFT, DMAE_CMD_C_TYPE_ENABLE, and dmae_cmd::opcode.

Referenced by bxe_dmae_opcode(), bxe_port_stats_stop(), and bxe_stats_pmf_update().

Here is the caller graph for this function:

◆ bxe_dmae_opcode_clr_src_reset()

uint32_t bxe_dmae_opcode_clr_src_reset ( uint32_t  opcode)

Definition at line 1531 of file bxe.c.

References DMAE_CMD_SRC_RESET, and dmae_cmd::opcode.

Referenced by bxe_hw_stats_post().

Here is the caller graph for this function:

◆ bxe_dump_mbuf_data()

void bxe_dump_mbuf_data ( struct bxe_softc sc,
char *  pTag,
struct mbuf *  m,
uint8_t  contents 
)

Definition at line 230 of file bxe_debug.c.

References BLOGI, and bxe_prev_mtx.

Referenced by bxe_dump_mbuf().

Here is the caller graph for this function:

◆ bxe_dump_mem()

void bxe_dump_mem ( struct bxe_softc sc,
char *  tag,
uint8_t *  mem,
uint32_t  len 
)

Definition at line 192 of file bxe_debug.c.

References BLOGI, and bxe_prev_mtx.

◆ bxe_hc_ack_int()

static uint16_t bxe_hc_ack_int ( struct bxe_softc sc)
inlinestatic

Definition at line 2388 of file bxe.h.

References COMMAND_REG_SIMD_MASK, HC_REG_COMMAND_REG, REG_RD, and SC_PORT.

Referenced by bxe_ack_int().

Here is the caller graph for this function:

◆ bxe_hc_ack_sb()

static void bxe_hc_ack_sb ( struct bxe_softc sc,
uint8_t  sb_id,
uint8_t  storm,
uint16_t  index,
uint8_t  op,
uint8_t  update 
)
inlinestatic

Definition at line 2336 of file bxe.h.

References bxe_softc::bar, COMMAND_REG_INT_ACK, bxe_bar::handle, HC_REG_COMMAND_REG, REG_WR, SC_PORT, and bxe_bar::tag.

Referenced by bxe_ack_sb().

Here is the caller graph for this function:

◆ bxe_igu_ack_int()

static uint16_t bxe_igu_ack_int ( struct bxe_softc sc)
inlinestatic

Definition at line 2399 of file bxe.h.

References BAR_IGU_INTMEM, BLOGD, DBG_INTR, IGU_REG_SISR_MDPC_WMASK_LSB_UPPER, and REG_RD.

Referenced by bxe_ack_int().

Here is the caller graph for this function:

◆ bxe_igu_ack_sb()

void bxe_igu_ack_sb ( struct bxe_softc sc,
uint8_t  igu_sb_id,
uint8_t  segment,
uint16_t  index,
uint8_t  op,
uint8_t  update 
)

Definition at line 16511 of file bxe.c.

References bxe_igu_ack_sb_gen(), bxe_softc::igu_base_addr, and IGU_CMD_INT_ACK_BASE.

Referenced by bxe_ack_sb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bxe_igu_ack_sb_gen()

static void bxe_igu_ack_sb_gen ( struct bxe_softc sc,
uint8_t  igu_sb_id,
uint8_t  segment,
uint16_t  index,
uint8_t  op,
uint8_t  update,
uint32_t  igu_addr 
)
inlinestatic

◆ bxe_ilog2()

static int bxe_ilog2 ( int  x)
inlinestatic

Definition at line 134 of file bxe.h.

◆ bxe_post_dmae()

void bxe_post_dmae ( struct bxe_softc sc,
struct dmae_cmd dmae,
int  idx 
)

Definition at line 1507 of file bxe.c.

References DMAE_REG_CMD_MEM, dmae_reg_go_c, and REG_WR.

Referenced by bxe_hw_stats_post(), and bxe_issue_dmae_with_comp().

Here is the caller graph for this function:

◆ bxe_read_dmae()

void bxe_read_dmae ( struct bxe_softc sc,
uint32_t  src_addr,
uint32_t  len32 
)

◆ bxe_reg_rd_ind()

uint32_t bxe_reg_rd_ind ( struct bxe_softc sc,
uint32_t  addr 
)

Definition at line 998 of file bxe.c.

References addr, bxe_softc::dev, PCICFG_GRC_ADDRESS, PCICFG_GRC_DATA, and bxe_dma::sc.

Referenced by bxe_read_dmae().

Here is the caller graph for this function:

◆ bxe_reg_wr_ind()

void bxe_reg_wr_ind ( struct bxe_softc sc,
uint32_t  addr,
uint32_t  val 
)

Definition at line 988 of file bxe.c.

References addr, bxe_softc::dev, PCICFG_GRC_ADDRESS, PCICFG_GRC_DATA, and bxe_dma::sc.

Referenced by ecore_reg_wr_ind().

Here is the caller graph for this function:

◆ bxe_set_bit()

◆ bxe_set_ctx_validation()

void bxe_set_ctx_validation ( struct bxe_softc sc,
struct eth_context cxt,
uint32_t  cid 
)

◆ bxe_sp_post()

int bxe_sp_post ( struct bxe_softc sc,
int  command,
int  cid,
uint32_t  data_hi,
uint32_t  data_lo,
int  cmd_type 
)

bxe_sp_post - place a single command on an SP ring

@sc: driver handle @command: command to place (e.g. SETUP, FILTER_RULES, etc.) @cid: SW CID the command is related to @data_hi: command private data address (high 32 bits) @data_lo: command private data address (low 32 bits) @cmd_type: 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 uint32 fields.

Definition at line 2399 of file bxe.c.

References BLOGD, BLOGE, bxe_is_contextless_ramrod(), BXE_SP, bxe_sp_get_next(), BXE_SP_LOCK, BXE_SP_MAPPING, bxe_sp_prod_update(), BXE_SP_UNLOCK, spe_hdr_t::conn_and_cmd_data, bxe_softc::cq_spq_left, eth_spe::data, DBG_SP, bxe_softc::eq_spq_left, eth_spe::hdr, regpair_t::hi, HW_CID, regpair_t::lo, bxe_dma::paddr, SC_FUNC, SPE_HDR_T_CMD_ID_SHIFT, SPE_HDR_T_CONN_TYPE, SPE_HDR_T_CONN_TYPE_SHIFT, SPE_HDR_T_FUNCTION_ID, SPE_HDR_T_FUNCTION_ID_SHIFT, bxe_softc::spq, bxe_softc::spq_dma, bxe_softc::spq_prod_bd, bxe_softc::spq_prod_idx, spe_hdr_t::type, U64_HI, U64_LO, and eth_specific_data::update_data_addr.

Referenced by bxe_storm_stats_post().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bxe_stats_id()

static uint8_t bxe_stats_id ( struct bxe_fastpath fp)
inlinestatic

Definition at line 2434 of file bxe.h.

References CHIP_IS_E1x, bxe_fastpath::cl_id, bxe_softc::fp, FP_SB_MAX_E1x, bxe_fastpath::sc, and SC_PORT.

Referenced by bxe_pf_q_prep_general(), and bxe_prep_fw_stats_req().

Here is the caller graph for this function:

◆ bxe_test_and_clear_bit()

int bxe_test_and_clear_bit ( int  nr,
volatile unsigned long *  addr 
)

Definition at line 838 of file bxe.c.

References addr.

Referenced by bxe_handle_rx_mode_eqe(), and bxe_link_report_locked().

Here is the caller graph for this function:

◆ bxe_test_and_set_bit()

int bxe_test_and_set_bit ( int  nr,
volatile unsigned long *  addr 
)

Definition at line 825 of file bxe.c.

References addr.

◆ bxe_test_bit()

int bxe_test_bit ( int  nr,
volatile unsigned long *  addr 
)

Definition at line 804 of file bxe.c.

References addr.

Referenced by bxe_chip_cleanup(), bxe_link_report_locked(), bxe_set_mac_one(), and bxe_set_rx_mode().

Here is the caller graph for this function:

◆ bxe_update_coalesce_sb_index()

void bxe_update_coalesce_sb_index ( struct bxe_softc sc,
uint8_t  fw_sb_id,
uint8_t  sb_index,
uint8_t  disable,
uint16_t  usec 
)

Definition at line 1791 of file bxe.c.

References bxe_storm_memset_hc_disable(), bxe_storm_memset_hc_timeout(), and SC_PORT.

Here is the call graph for this function:

◆ bxe_update_fp_sb_idx()

static void bxe_update_fp_sb_idx ( struct bxe_fastpath fp)
inlinestatic

Definition at line 2302 of file bxe.h.

References bxe_fastpath::fp_hc_idx, bxe_fastpath::sb_running_index, and SM_RX_ID.

Referenced by bxe_handle_fp_tq(), bxe_init_eth_fp(), and bxe_task_fp().

Here is the caller graph for this function:

◆ bxe_write_dmae()

void bxe_write_dmae ( struct bxe_softc sc,
bus_addr_t  dma_addr,
uint32_t  dst_addr,
uint32_t  len32 
)

◆ bxe_write_dmae_phys_len()

void bxe_write_dmae_phys_len ( struct bxe_softc sc,
bus_addr_t  phys_addr,
uint32_t  addr,
uint32_t  len 
)

Definition at line 1709 of file bxe.c.

References addr, bxe_write_dmae(), DMAE_LEN32_WR_MAX, and offset.

Referenced by ecore_write_dmae_phys_len().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ecore_init_e1_firmware()

◆ ecore_init_e1h_firmware()

◆ ecore_init_e2_firmware()

◆ ecore_storm_memset_struct()

void ecore_storm_memset_struct ( struct bxe_softc sc,
uint32_t  addr,
size_t  size,
uint32_t *  data 
)

Definition at line 18624 of file bxe.c.

References addr, REG_WR, and size.

Referenced by __storm_memset_mac_filters(), storm_memset_cmng(), storm_memset_eq_data(), and storm_memset_func_cfg().

Here is the caller graph for this function:

◆ func_by_vn()

static int func_by_vn ( struct bxe_softc sc,
int  vn 
)
inlinestatic

Definition at line 2423 of file bxe.h.

References SC_PORT.

Referenced by storm_memset_cmng().

Here is the caller graph for this function:

◆ reg_poll()

static uint32_t reg_poll ( struct bxe_softc sc,
uint32_t  reg,
uint32_t  expected,
int  ms,
int  wait 
)
inlinestatic

Definition at line 2281 of file bxe.h.

References REG_RD.

Referenced by bxe_init_hw_common().

Here is the caller graph for this function:

Variable Documentation

◆ dmae_reg_go_c

const uint32_t dmae_reg_go_c[]
static
Initial value:
= {
}
#define DMAE_REG_GO_C1
Definition: ecore_reg.h:156
#define DMAE_REG_GO_C0
Definition: ecore_reg.h:154
#define DMAE_REG_GO_C14
Definition: ecore_reg.h:166
#define DMAE_REG_GO_C11
Definition: ecore_reg.h:160
#define DMAE_REG_GO_C5
Definition: ecore_reg.h:176
#define DMAE_REG_GO_C9
Definition: ecore_reg.h:184
#define DMAE_REG_GO_C8
Definition: ecore_reg.h:182
#define DMAE_REG_GO_C6
Definition: ecore_reg.h:178
#define DMAE_REG_GO_C13
Definition: ecore_reg.h:164
#define DMAE_REG_GO_C7
Definition: ecore_reg.h:180
#define DMAE_REG_GO_C2
Definition: ecore_reg.h:170
#define DMAE_REG_GO_C12
Definition: ecore_reg.h:162
#define DMAE_REG_GO_C15
Definition: ecore_reg.h:168
#define DMAE_REG_GO_C4
Definition: ecore_reg.h:174
#define DMAE_REG_GO_C10
Definition: ecore_reg.h:158
#define DMAE_REG_GO_C3
Definition: ecore_reg.h:172

Definition at line 2001 of file bxe.h.

Referenced by bxe_hw_stats_post(), bxe_poll_hw_usage_counters(), bxe_port_stats_init(), bxe_port_stats_stop(), bxe_post_dmae(), and bxe_stats_pmf_update().