From 6411280ac94db94a09770807d3871d2661803604 Mon Sep 17 00:00:00 2001 From: Ariel Elior Date: Mon, 7 Jan 2013 00:50:23 +0000 Subject: bnx2x: Segregate SR-IOV code In this patch the SR-IOV code is segregated from the main bulk of the bnx2x code. The CONFIG_BNX2X_SRIOV define is added to Broadcom's Kconfig, and allows the elision of the building of all the SR-IOV support code in the driver. The define is dependant on the kernel CONFIG_PCI_IOV configuration define. Signed-off-by: Ariel Elior Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h') diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h index 23a1fa9a4cb3..6667ec52e1c4 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h @@ -24,6 +24,7 @@ #include "bnx2x.h" +#include "bnx2x_sriov.h" /* This is used as a replacement for an MCP if it's not present */ extern int load_count[2][3]; /* per-path: 0-common, 1-port0, 2-port1 */ @@ -1128,22 +1129,7 @@ static inline u8 bnx2x_fp_qzone_id(struct bnx2x_fastpath *fp) return fp->cl_id; } -static inline u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp) -{ - struct bnx2x *bp = fp->bp; - u32 offset = BAR_USTRORM_INTMEM; - - if (IS_VF(bp)) - return PXP_VF_ADDR_USDM_QUEUES_START + - bp->acquire_resp.resc.hw_qid[fp->index] * - sizeof(struct ustorm_queue_zone_data); - else if (!CHIP_IS_E1x(bp)) - offset += USTORM_RX_PRODS_E2_OFFSET(fp->cl_qzone_id); - else - offset += USTORM_RX_PRODS_E1X_OFFSET(BP_PORT(bp), fp->cl_id); - - return offset; -} +u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp); static inline void bnx2x_init_txdata(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata, u32 cid, -- cgit v1.2.3-55-g7522