diff options
author | Ariel Elior <ariele@broadcom.com> | 2013-01-07 04:50:23 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-08 07:49:14 +0400 |
commit | 6411280ac94db94a09770807d3871d2661803604 (patch) | |
tree | 548f080b1ec218aa017f4e9bd3b7b582f03d6496 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | |
parent | 5ebae4897146ea770069fe8046b30f55a37a9518 (diff) | |
download | linux-6411280ac94db94a09770807d3871d2661803604.tar.xz |
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 <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h | 18 |
1 files changed, 2 insertions, 16 deletions
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, |