Commit a8f47eb7 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

bnx2x: namespace and dead code cleanups

Fix a bunch of whole lot of namespace issues with the Broadcom bnx2x driver
found by running 'make namespacecheck'

 * global variables must be prefixed with bnx2x_
    naming a variable int_mode, or num_queue is invitation to disaster

 * make local functions static

 * move some inline's used in one file out of header
   (this driver has a bad case of inline-itis)

 * remove resulting dead code fallout
 	 bnx2x_pfc_statistic,
	 bnx2x_emac_get_pfc_stat
 	 bnx2x_init_vlan_mac_obj,
   Looks like vlan mac support in this driver was a botch from day one
   either never worked, or not implemented or missing support functions

Compile tested only.
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6bc21eed
...@@ -2057,7 +2057,6 @@ int bnx2x_del_all_macs(struct bnx2x *bp, ...@@ -2057,7 +2057,6 @@ int bnx2x_del_all_macs(struct bnx2x *bp,
void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p); void bnx2x_func_init(struct bnx2x *bp, struct bnx2x_func_init_params *p);
void bnx2x_init_sb(struct bnx2x *bp, dma_addr_t mapping, int vfid, void bnx2x_init_sb(struct bnx2x *bp, dma_addr_t mapping, int vfid,
u8 vf_valid, int fw_sb_id, int igu_sb_id); u8 vf_valid, int fw_sb_id, int igu_sb_id);
u32 bnx2x_get_pretend_reg(struct bnx2x *bp);
int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port); int bnx2x_get_gpio(struct bnx2x *bp, int gpio_num, u8 port);
int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port); int bnx2x_set_gpio(struct bnx2x *bp, int gpio_num, u32 mode, u8 port);
int bnx2x_set_mult_gpio(struct bnx2x *bp, u8 pins, u32 mode); int bnx2x_set_mult_gpio(struct bnx2x *bp, u8 pins, u32 mode);
......
...@@ -30,6 +30,43 @@ ...@@ -30,6 +30,43 @@
#include "bnx2x_init.h" #include "bnx2x_init.h"
#include "bnx2x_sp.h" #include "bnx2x_sp.h"
static void bnx2x_free_fp_mem_cnic(struct bnx2x *bp);
static int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp);
static int bnx2x_alloc_fp_mem(struct bnx2x *bp);
static int bnx2x_poll(struct napi_struct *napi, int budget);
static void bnx2x_add_all_napi_cnic(struct bnx2x *bp)
{
int i;
/* Add NAPI objects */
for_each_rx_queue_cnic(bp, i) {
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
bnx2x_poll, NAPI_POLL_WEIGHT);
napi_hash_add(&bnx2x_fp(bp, i, napi));
}
}
static void bnx2x_add_all_napi(struct bnx2x *bp)
{
int i;
/* Add NAPI objects */
for_each_eth_queue(bp, i) {
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
bnx2x_poll, NAPI_POLL_WEIGHT);
napi_hash_add(&bnx2x_fp(bp, i, napi));
}
}
static int bnx2x_calc_num_queues(struct bnx2x *bp)
{
return bnx2x_num_queues ?
min_t(int, bnx2x_num_queues, BNX2X_MAX_QUEUES(bp)) :
min_t(int, netif_get_num_default_rss_queues(),
BNX2X_MAX_QUEUES(bp));
}
/** /**
* bnx2x_move_fp - move content of the fastpath structure. * bnx2x_move_fp - move content of the fastpath structure.
* *
...@@ -145,7 +182,7 @@ static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta) ...@@ -145,7 +182,7 @@ static void bnx2x_shrink_eth_fp(struct bnx2x *bp, int delta)
} }
} }
int load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */ int bnx2x_load_count[2][3] = { {0} }; /* per-path: 0-common, 1-port0, 2-port1 */
/* free skb in the packet ring at pos idx /* free skb in the packet ring at pos idx
* return idx of last bd freed * return idx of last bd freed
...@@ -813,7 +850,7 @@ void bnx2x_csum_validate(struct sk_buff *skb, union eth_rx_cqe *cqe, ...@@ -813,7 +850,7 @@ void bnx2x_csum_validate(struct sk_buff *skb, union eth_rx_cqe *cqe,
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
} }
int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
{ {
struct bnx2x *bp = fp->bp; struct bnx2x *bp = fp->bp;
u16 bd_cons, bd_prod, bd_prod_fw, comp_ring_cons; u16 bd_cons, bd_prod, bd_prod_fw, comp_ring_cons;
...@@ -1483,7 +1520,7 @@ static void bnx2x_free_rx_skbs(struct bnx2x *bp) ...@@ -1483,7 +1520,7 @@ static void bnx2x_free_rx_skbs(struct bnx2x *bp)
} }
} }
void bnx2x_free_skbs_cnic(struct bnx2x *bp) static void bnx2x_free_skbs_cnic(struct bnx2x *bp)
{ {
bnx2x_free_tx_skbs_cnic(bp); bnx2x_free_tx_skbs_cnic(bp);
bnx2x_free_rx_skbs_cnic(bp); bnx2x_free_rx_skbs_cnic(bp);
...@@ -2302,16 +2339,16 @@ static int bnx2x_nic_load_no_mcp(struct bnx2x *bp, int port) ...@@ -2302,16 +2339,16 @@ static int bnx2x_nic_load_no_mcp(struct bnx2x *bp, int port)
int path = BP_PATH(bp); int path = BP_PATH(bp);
DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n", DP(NETIF_MSG_IFUP, "NO MCP - load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1], path, bnx2x_load_count[path][0], bnx2x_load_count[path][1],
load_count[path][2]); bnx2x_load_count[path][2]);
load_count[path][0]++; bnx2x_load_count[path][0]++;
load_count[path][1 + port]++; bnx2x_load_count[path][1 + port]++;
DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n", DP(NETIF_MSG_IFUP, "NO MCP - new load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1], path, bnx2x_load_count[path][0], bnx2x_load_count[path][1],
load_count[path][2]); bnx2x_load_count[path][2]);
if (load_count[path][0] == 1) if (bnx2x_load_count[path][0] == 1)
return FW_MSG_CODE_DRV_LOAD_COMMON; return FW_MSG_CODE_DRV_LOAD_COMMON;
else if (load_count[path][1 + port] == 1) else if (bnx2x_load_count[path][1 + port] == 1)
return FW_MSG_CODE_DRV_LOAD_PORT; return FW_MSG_CODE_DRV_LOAD_PORT;
else else
return FW_MSG_CODE_DRV_LOAD_FUNCTION; return FW_MSG_CODE_DRV_LOAD_FUNCTION;
...@@ -3069,7 +3106,7 @@ int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state) ...@@ -3069,7 +3106,7 @@ int bnx2x_set_power_state(struct bnx2x *bp, pci_power_t state)
/* /*
* net_device service functions * net_device service functions
*/ */
int bnx2x_poll(struct napi_struct *napi, int budget) static int bnx2x_poll(struct napi_struct *napi, int budget)
{ {
int work_done = 0; int work_done = 0;
u8 cos; u8 cos;
...@@ -4196,7 +4233,7 @@ static void bnx2x_free_fp_mem_at(struct bnx2x *bp, int fp_index) ...@@ -4196,7 +4233,7 @@ static void bnx2x_free_fp_mem_at(struct bnx2x *bp, int fp_index)
/* end of fastpath */ /* end of fastpath */
} }
void bnx2x_free_fp_mem_cnic(struct bnx2x *bp) static void bnx2x_free_fp_mem_cnic(struct bnx2x *bp)
{ {
int i; int i;
for_each_cnic_queue(bp, i) for_each_cnic_queue(bp, i)
...@@ -4410,7 +4447,7 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index) ...@@ -4410,7 +4447,7 @@ static int bnx2x_alloc_fp_mem_at(struct bnx2x *bp, int index)
return 0; return 0;
} }
int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp) static int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp)
{ {
if (!NO_FCOE(bp)) if (!NO_FCOE(bp))
/* FCoE */ /* FCoE */
...@@ -4423,7 +4460,7 @@ int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp) ...@@ -4423,7 +4460,7 @@ int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp)
return 0; return 0;
} }
int bnx2x_alloc_fp_mem(struct bnx2x *bp) static int bnx2x_alloc_fp_mem(struct bnx2x *bp)
{ {
int i; int i;
......
...@@ -26,10 +26,8 @@ ...@@ -26,10 +26,8 @@
#include "bnx2x_sriov.h" #include "bnx2x_sriov.h"
/* This is used as a replacement for an MCP if it's not present */ /* 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 */ extern int bnx2x_load_count[2][3]; /* per-path: 0-common, 1-port0, 2-port1 */
extern int bnx2x_num_queues;
extern int num_queues;
extern int int_mode;
/************************ Macros ********************************/ /************************ Macros ********************************/
#define BNX2X_PCI_FREE(x, y, size) \ #define BNX2X_PCI_FREE(x, y, size) \
...@@ -417,35 +415,8 @@ int bnx2x_set_eth_mac(struct bnx2x *bp, bool set); ...@@ -417,35 +415,8 @@ int bnx2x_set_eth_mac(struct bnx2x *bp, bool set);
* If bp->state is OPEN, should be called with * If bp->state is OPEN, should be called with
* netif_addr_lock_bh() * netif_addr_lock_bh()
*/ */
void bnx2x_set_rx_mode(struct net_device *dev);
void bnx2x_set_rx_mode_inner(struct bnx2x *bp); void bnx2x_set_rx_mode_inner(struct bnx2x *bp);
/**
* bnx2x_set_storm_rx_mode - configure MAC filtering rules in a FW.
*
* @bp: driver handle
*
* If bp->state is OPEN, should be called with
* netif_addr_lock_bh().
*/
int bnx2x_set_storm_rx_mode(struct bnx2x *bp);
/**
* bnx2x_set_q_rx_mode - configures rx_mode for a single queue.
*
* @bp: driver handle
* @cl_id: client id
* @rx_mode_flags: rx mode configuration
* @rx_accept_flags: rx accept configuration
* @tx_accept_flags: tx accept configuration (tx switch)
* @ramrod_flags: ramrod configuration
*/
int bnx2x_set_q_rx_mode(struct bnx2x *bp, u8 cl_id,
unsigned long rx_mode_flags,
unsigned long rx_accept_flags,
unsigned long tx_accept_flags,
unsigned long ramrod_flags);
/* Parity errors related */ /* Parity errors related */
void bnx2x_set_pf_load(struct bnx2x *bp); void bnx2x_set_pf_load(struct bnx2x *bp);
bool bnx2x_clear_pf_load(struct bnx2x *bp); bool bnx2x_clear_pf_load(struct bnx2x *bp);
...@@ -564,9 +535,6 @@ int bnx2x_reload_if_running(struct net_device *dev); ...@@ -564,9 +535,6 @@ int bnx2x_reload_if_running(struct net_device *dev);
int bnx2x_change_mac_addr(struct net_device *dev, void *p); int bnx2x_change_mac_addr(struct net_device *dev, void *p);
/* NAPI poll Rx part */
int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget);
/* NAPI poll Tx part */ /* NAPI poll Tx part */
int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata); int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata);
...@@ -577,13 +545,9 @@ int bnx2x_resume(struct pci_dev *pdev); ...@@ -577,13 +545,9 @@ int bnx2x_resume(struct pci_dev *pdev);
/* Release IRQ vectors */ /* Release IRQ vectors */
void bnx2x_free_irq(struct bnx2x *bp); void bnx2x_free_irq(struct bnx2x *bp);
void bnx2x_free_fp_mem_cnic(struct bnx2x *bp);
void bnx2x_free_fp_mem(struct bnx2x *bp); void bnx2x_free_fp_mem(struct bnx2x *bp);
int bnx2x_alloc_fp_mem_cnic(struct bnx2x *bp);
int bnx2x_alloc_fp_mem(struct bnx2x *bp);
void bnx2x_init_rx_rings(struct bnx2x *bp); void bnx2x_init_rx_rings(struct bnx2x *bp);
void bnx2x_init_rx_rings_cnic(struct bnx2x *bp); void bnx2x_init_rx_rings_cnic(struct bnx2x *bp);
void bnx2x_free_skbs_cnic(struct bnx2x *bp);
void bnx2x_free_skbs(struct bnx2x *bp); void bnx2x_free_skbs(struct bnx2x *bp);
void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw); void bnx2x_netif_stop(struct bnx2x *bp, int disable_hw);
void bnx2x_netif_start(struct bnx2x *bp); void bnx2x_netif_start(struct bnx2x *bp);
...@@ -606,15 +570,6 @@ int bnx2x_enable_msix(struct bnx2x *bp); ...@@ -606,15 +570,6 @@ int bnx2x_enable_msix(struct bnx2x *bp);
*/ */
int bnx2x_enable_msi(struct bnx2x *bp); int bnx2x_enable_msi(struct bnx2x *bp);
/**
* bnx2x_poll - NAPI callback
*
* @napi: napi structure
* @budget:
*
*/
int bnx2x_poll(struct napi_struct *napi, int budget);
/** /**
* bnx2x_low_latency_recv - LL callback * bnx2x_low_latency_recv - LL callback
* *
...@@ -861,30 +816,6 @@ static inline void bnx2x_free_rx_sge(struct bnx2x *bp, ...@@ -861,30 +816,6 @@ static inline void bnx2x_free_rx_sge(struct bnx2x *bp,
sge->addr_lo = 0; sge->addr_lo = 0;
} }
static inline void bnx2x_add_all_napi_cnic(struct bnx2x *bp)
{
int i;
/* Add NAPI objects */
for_each_rx_queue_cnic(bp, i) {
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
bnx2x_poll, NAPI_POLL_WEIGHT);
napi_hash_add(&bnx2x_fp(bp, i, napi));
}
}
static inline void bnx2x_add_all_napi(struct bnx2x *bp)
{
int i;
/* Add NAPI objects */
for_each_eth_queue(bp, i) {
netif_napi_add(bp->dev, &bnx2x_fp(bp, i, napi),
bnx2x_poll, NAPI_POLL_WEIGHT);
napi_hash_add(&bnx2x_fp(bp, i, napi));
}
}
static inline void bnx2x_del_all_napi_cnic(struct bnx2x *bp) static inline void bnx2x_del_all_napi_cnic(struct bnx2x *bp)
{ {
int i; int i;
...@@ -918,14 +849,6 @@ static inline void bnx2x_disable_msi(struct bnx2x *bp) ...@@ -918,14 +849,6 @@ static inline void bnx2x_disable_msi(struct bnx2x *bp)
} }
} }
static inline int bnx2x_calc_num_queues(struct bnx2x *bp)
{
return num_queues ?
min_t(int, num_queues, BNX2X_MAX_QUEUES(bp)) :
min_t(int, netif_get_num_default_rss_queues(),
BNX2X_MAX_QUEUES(bp));
}
static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp) static inline void bnx2x_clear_sge_mask_next_elems(struct bnx2x_fastpath *fp)
{ {
int i, j; int i, j;
...@@ -1172,8 +1095,6 @@ static inline u8 bnx2x_fp_qzone_id(struct bnx2x_fastpath *fp) ...@@ -1172,8 +1095,6 @@ static inline u8 bnx2x_fp_qzone_id(struct bnx2x_fastpath *fp)
return fp->cl_id; return fp->cl_id;
} }
u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp);
static inline void bnx2x_init_txdata(struct bnx2x *bp, static inline void bnx2x_init_txdata(struct bnx2x *bp,
struct bnx2x_fp_txdata *txdata, u32 cid, struct bnx2x_fp_txdata *txdata, u32 cid,
int txq_index, __le16 *tx_cons_sb, int txq_index, __le16 *tx_cons_sb,
...@@ -1206,47 +1127,6 @@ static inline u8 bnx2x_cnic_igu_sb_id(struct bnx2x *bp) ...@@ -1206,47 +1127,6 @@ static inline u8 bnx2x_cnic_igu_sb_id(struct bnx2x *bp)
return bp->igu_base_sb; return bp->igu_base_sb;
} }
static inline void bnx2x_init_fcoe_fp(struct bnx2x *bp)
{
struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp);
unsigned long q_type = 0;
bnx2x_fcoe(bp, rx_queue) = BNX2X_NUM_ETH_QUEUES(bp);
bnx2x_fcoe(bp, cl_id) = bnx2x_cnic_eth_cl_id(bp,
BNX2X_FCOE_ETH_CL_ID_IDX);
bnx2x_fcoe(bp, cid) = BNX2X_FCOE_ETH_CID(bp);
bnx2x_fcoe(bp, fw_sb_id) = DEF_SB_ID;
bnx2x_fcoe(bp, igu_sb_id) = bp->igu_dsb_id;
bnx2x_fcoe(bp, rx_cons_sb) = BNX2X_FCOE_L2_RX_INDEX;
bnx2x_init_txdata(bp, bnx2x_fcoe(bp, txdata_ptr[0]),
fp->cid, FCOE_TXQ_IDX(bp), BNX2X_FCOE_L2_TX_INDEX,
fp);
DP(NETIF_MSG_IFUP, "created fcoe tx data (fp index %d)\n", fp->index);
/* qZone id equals to FW (per path) client id */
bnx2x_fcoe(bp, cl_qzone_id) = bnx2x_fp_qzone_id(fp);
/* init shortcut */
bnx2x_fcoe(bp, ustorm_rx_prods_offset) =
bnx2x_rx_ustorm_prods_offset(fp);
/* Configure Queue State object */
__set_bit(BNX2X_Q_TYPE_HAS_RX, &q_type);
__set_bit(BNX2X_Q_TYPE_HAS_TX, &q_type);
/* No multi-CoS for FCoE L2 client */
BUG_ON(fp->max_cos != 1);
bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id,
&fp->cid, 1, BP_FUNC(bp), bnx2x_sp(bp, q_rdata),
bnx2x_sp_mapping(bp, q_rdata), q_type);
DP(NETIF_MSG_IFUP,
"queue[%d]: bnx2x_init_sb(%p,%p) cl_id %d fw_sb %d igu_sb %d\n",
fp->index, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id,
fp->igu_sb_id);
}
static inline int bnx2x_clean_tx_queue(struct bnx2x *bp, static inline int bnx2x_clean_tx_queue(struct bnx2x *bp,
struct bnx2x_fp_txdata *txdata) struct bnx2x_fp_txdata *txdata)
{ {
......
...@@ -205,6 +205,11 @@ typedef int (*read_sfp_module_eeprom_func_p)(struct bnx2x_phy *phy, ...@@ -205,6 +205,11 @@ typedef int (*read_sfp_module_eeprom_func_p)(struct bnx2x_phy *phy,
(_bank + (_addr & 0xf)), \ (_bank + (_addr & 0xf)), \
_val) _val)
static int bnx2x_check_half_open_conn(struct link_params *params,
struct link_vars *vars, u8 notify);
static int bnx2x_sfp_module_detection(struct bnx2x_phy *phy,
struct link_params *params);
static u32 bnx2x_bits_en(struct bnx2x *bp, u32 reg, u32 bits) static u32 bnx2x_bits_en(struct bnx2x *bp, u32 reg, u32 bits)
{ {
u32 val = REG_RD(bp, reg); u32 val = REG_RD(bp, reg);
...@@ -1399,57 +1404,6 @@ static void bnx2x_update_pfc_xmac(struct link_params *params, ...@@ -1399,57 +1404,6 @@ static void bnx2x_update_pfc_xmac(struct link_params *params,
udelay(30); udelay(30);
} }
static void bnx2x_emac_get_pfc_stat(struct link_params *params,
u32 pfc_frames_sent[2],
u32 pfc_frames_received[2])
{
/* Read pfc statistic */
struct bnx2x *bp = params->bp;
u32 emac_base = params->port ? GRCBASE_EMAC1 : GRCBASE_EMAC0;
u32 val_xon = 0;
u32 val_xoff = 0;
DP(NETIF_MSG_LINK, "pfc statistic read from EMAC\n");
/* PFC received frames */
val_xoff = REG_RD(bp, emac_base +
EMAC_REG_RX_PFC_STATS_XOFF_RCVD);
val_xoff &= EMAC_REG_RX_PFC_STATS_XOFF_RCVD_COUNT;
val_xon = REG_RD(bp, emac_base + EMAC_REG_RX_PFC_STATS_XON_RCVD);
val_xon &= EMAC_REG_RX_PFC_STATS_XON_RCVD_COUNT;
pfc_frames_received[0] = val_xon + val_xoff;
/* PFC received sent */
val_xoff = REG_RD(bp, emac_base +
EMAC_REG_RX_PFC_STATS_XOFF_SENT);
val_xoff &= EMAC_REG_RX_PFC_STATS_XOFF_SENT_COUNT;
val_xon = REG_RD(bp, emac_base + EMAC_REG_RX_PFC_STATS_XON_SENT);
val_xon &= EMAC_REG_RX_PFC_STATS_XON_SENT_COUNT;
pfc_frames_sent[0] = val_xon + val_xoff;
}
/* Read pfc statistic*/
void bnx2x_pfc_statistic(struct link_params *params, struct link_vars *vars,
u32 pfc_frames_sent[2],
u32 pfc_frames_received[2])
{
/* Read pfc statistic */
struct bnx2x *bp = params->bp;
DP(NETIF_MSG_LINK, "pfc statistic\n");
if (!vars->link_up)
return;
if (vars->mac_type == MAC_TYPE_EMAC) {
DP(NETIF_MSG_LINK, "About to read PFC stats from EMAC\n");
bnx2x_emac_get_pfc_stat(params, pfc_frames_sent,
pfc_frames_received);
}
}
/******************************************************************/ /******************************************************************/
/* MAC/PBF section */ /* MAC/PBF section */
/******************************************************************/ /******************************************************************/
...@@ -13413,9 +13367,9 @@ static u8 bnx2x_analyze_link_error(struct link_params *params, ...@@ -13413,9 +13367,9 @@ static u8 bnx2x_analyze_link_error(struct link_params *params,
* a fault, for example, due to break in the TX side of fiber. * a fault, for example, due to break in the TX side of fiber.
* *
******************************************************************************/ ******************************************************************************/
int bnx2x_check_half_open_conn(struct link_params *params, static int bnx2x_check_half_open_conn(struct link_params *params,
struct link_vars *vars, struct link_vars *vars,
u8 notify) u8 notify)
{ {
struct bnx2x *bp = params->bp; struct bnx2x *bp = params->bp;
u32 lss_status = 0; u32 lss_status = 0;
......
...@@ -533,19 +533,11 @@ int bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos); ...@@ -533,19 +533,11 @@ int bnx2x_ets_strict(const struct link_params *params, const u8 strict_cos);
int bnx2x_ets_e3b0_config(const struct link_params *params, int bnx2x_ets_e3b0_config(const struct link_params *params,
const struct link_vars *vars, const struct link_vars *vars,
struct bnx2x_ets_params *ets_params); struct bnx2x_ets_params *ets_params);
/* Read pfc statistic*/
void bnx2x_pfc_statistic(struct link_params *params, struct link_vars *vars,
u32 pfc_frames_sent[2],
u32 pfc_frames_received[2]);
void bnx2x_init_mod_abs_int(struct bnx2x *bp, struct link_vars *vars, void bnx2x_init_mod_abs_int(struct bnx2x *bp, struct link_vars *vars,
u32 chip_id, u32 shmem_base, u32 shmem2_base, u32 chip_id, u32 shmem_base, u32 shmem2_base,
u8 port); u8 port);
int bnx2x_sfp_module_detection(struct bnx2x_phy *phy,
struct link_params *params);
void bnx2x_period_func(struct link_params *params, struct link_vars *vars); void bnx2x_period_func(struct link_params *params, struct link_vars *vars);
int bnx2x_check_half_open_conn(struct link_params *params,
struct link_vars *vars, u8 notify);
#endif /* BNX2X_LINK_H */ #endif /* BNX2X_LINK_H */
...@@ -94,8 +94,8 @@ MODULE_FIRMWARE(FW_FILE_NAME_E1); ...@@ -94,8 +94,8 @@ MODULE_FIRMWARE(FW_FILE_NAME_E1);
MODULE_FIRMWARE(FW_FILE_NAME_E1H); MODULE_FIRMWARE(FW_FILE_NAME_E1H);
MODULE_FIRMWARE(FW_FILE_NAME_E2); MODULE_FIRMWARE(FW_FILE_NAME_E2);
int num_queues; int bnx2x_num_queues;
module_param(num_queues, int, 0); module_param_named(num_queues, bnx2x_num_queues, int, 0);
MODULE_PARM_DESC(num_queues, MODULE_PARM_DESC(num_queues,
" Set number of queues (default is as a number of CPUs)"); " Set number of queues (default is as a number of CPUs)");
...@@ -103,7 +103,7 @@ static int disable_tpa; ...@@ -103,7 +103,7 @@ static int disable_tpa;
module_param(disable_tpa, int, 0); module_param(disable_tpa, int, 0);
MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature"); MODULE_PARM_DESC(disable_tpa, " Disable the TPA (LRO) feature");
int int_mode; static int int_mode;
module_param(int_mode, int, 0); module_param(int_mode, int, 0);
MODULE_PARM_DESC(int_mode, " Force interrupt mode other than MSI-X " MODULE_PARM_DESC(int_mode, " Force interrupt mode other than MSI-X "
"(1 INT#x; 2 MSI)"); "(1 INT#x; 2 MSI)");
...@@ -279,6 +279,12 @@ MODULE_DEVICE_TABLE(pci, bnx2x_pci_tbl); ...@@ -279,6 +279,12 @@ MODULE_DEVICE_TABLE(pci, bnx2x_pci_tbl);
#define BNX2X_PREV_WAIT_NEEDED 1 #define BNX2X_PREV_WAIT_NEEDED 1
static DEFINE_SEMAPHORE(bnx2x_prev_sem); static DEFINE_SEMAPHORE(bnx2x_prev_sem);
static LIST_HEAD(bnx2x_prev_list); static LIST_HEAD(bnx2x_prev_list);
/* Forward declaration */
static struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev);
static u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp);
static int bnx2x_set_storm_rx_mode(struct bnx2x *bp);
/**************************************************************************** /****************************************************************************
* General service functions * General service functions
****************************************************************************/ ****************************************************************************/
...@@ -5857,11 +5863,11 @@ static void bnx2x_init_eq_ring(struct bnx2x *bp) ...@@ -5857,11 +5863,11 @@ static void bnx2x_init_eq_ring(struct bnx2x *bp)
} }
/* called with netif_addr_lock_bh() */ /* called with netif_addr_lock_bh() */
int bnx2x_set_q_rx_mode(struct bnx2x *bp, u8 cl_id, static int bnx2x_set_q_rx_mode(struct bnx2x *bp, u8 cl_id,
unsigned long rx_mode_flags, unsigned long rx_mode_flags,
unsigned long rx_accept_flags, unsigned long rx_accept_flags,
unsigned long tx_accept_flags, unsigned long tx_accept_flags,
unsigned long ramrod_flags) unsigned long ramrod_flags)
{ {
struct bnx2x_rx_mode_ramrod_params ramrod_param; struct bnx2x_rx_mode_ramrod_params ramrod_param;
int rc; int rc;
...@@ -5969,7 +5975,7 @@ static int bnx2x_fill_accept_flags(struct bnx2x *bp, u32 rx_mode, ...@@ -5969,7 +5975,7 @@ static int bnx2x_fill_accept_flags(struct bnx2x *bp, u32 rx_mode,
} }
/* called with netif_addr_lock_bh() */ /* called with netif_addr_lock_bh() */
int bnx2x_set_storm_rx_mode(struct bnx2x *bp) static int bnx2x_set_storm_rx_mode(struct bnx2x *bp)
{ {
unsigned long rx_mode_flags = 0, ramrod_flags = 0; unsigned long rx_mode_flags = 0, ramrod_flags = 0;
unsigned long rx_accept_flags = 0, tx_accept_flags = 0; unsigned long rx_accept_flags = 0, tx_accept_flags = 0;
...@@ -6165,6 +6171,47 @@ static void bnx2x_init_tx_rings(struct bnx2x *bp) ...@@ -6165,6 +6171,47 @@ static void bnx2x_init_tx_rings(struct bnx2x *bp)
bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[cos]); bnx2x_init_tx_ring_one(bp->fp[i].txdata_ptr[cos]);
} }
static void bnx2x_init_fcoe_fp(struct bnx2x *bp)
{
struct bnx2x_fastpath *fp = bnx2x_fcoe_fp(bp);
unsigned long q_type = 0;
bnx2x_fcoe(bp, rx_queue) = BNX2X_NUM_ETH_QUEUES(bp);
bnx2x_fcoe(bp, cl_id) = bnx2x_cnic_eth_cl_id(bp,
BNX2X_FCOE_ETH_CL_ID_IDX);
bnx2x_fcoe(bp, cid) = BNX2X_FCOE_ETH_CID(bp);
bnx2x_fcoe(bp, fw_sb_id) = DEF_SB_ID;
bnx2x_fcoe(bp, igu_sb_id) = bp->igu_dsb_id;
bnx2x_fcoe(bp, rx_cons_sb) = BNX2X_FCOE_L2_RX_INDEX;
bnx2x_init_txdata(bp, bnx2x_fcoe(bp, txdata_ptr[0]),
fp->cid, FCOE_TXQ_IDX(bp), BNX2X_FCOE_L2_TX_INDEX,
fp);
DP(NETIF_MSG_IFUP, "created fcoe tx data (fp index %d)\n", fp->index);
/* qZone id equals to FW (per path) client id */
bnx2x_fcoe(bp, cl_qzone_id) = bnx2x_fp_qzone_id(fp);
/* init shortcut */
bnx2x_fcoe(bp, ustorm_rx_prods_offset) =
bnx2x_rx_ustorm_prods_offset(fp);
/* Configure Queue State object */
__set_bit(BNX2X_Q_TYPE_HAS_RX, &q_type);
__set_bit(BNX2X_Q_TYPE_HAS_TX, &q_type);
/* No multi-CoS for FCoE L2 client */
BUG_ON(fp->max_cos != 1);
bnx2x_init_queue_obj(bp, &bnx2x_sp_obj(bp, fp).q_obj, fp->cl_id,
&fp->cid, 1, BP_FUNC(bp), bnx2x_sp(bp, q_rdata),
bnx2x_sp_mapping(bp, q_rdata), q_type);
DP(NETIF_MSG_IFUP,
"queue[%d]: bnx2x_init_sb(%p,%p) cl_id %d fw_sb %d igu_sb %d\n",
fp->index, bp, fp->status_blk.e2_sb, fp->cl_id, fp->fw_sb_id,
fp->igu_sb_id);
}
void bnx2x_nic_init_cnic(struct bnx2x *bp) void bnx2x_nic_init_cnic(struct bnx2x *bp)
{ {
if (!NO_FCOE(bp)) if (!NO_FCOE(bp))
...@@ -8737,16 +8784,16 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode) ...@@ -8737,16 +8784,16 @@ u32 bnx2x_send_unload_req(struct bnx2x *bp, int unload_mode)
int path = BP_PATH(bp); int path = BP_PATH(bp);
DP(NETIF_MSG_IFDOWN, "NO MCP - load counts[%d] %d, %d, %d\n", DP(NETIF_MSG_IFDOWN, "NO MCP - load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1], path, bnx2x_load_count[path][0], bnx2x_load_count[path][1],
load_count[path][2]); bnx2x_load_count[path][2]);
load_count[path][0]--; bnx2x_load_count[path][0]--;
load_count[path][1 + port]--; bnx2x_load_count[path][1 + port]--;
DP(NETIF_MSG_IFDOWN, "NO MCP - new load counts[%d] %d, %d, %d\n", DP(NETIF_MSG_IFDOWN, "NO MCP - new load counts[%d] %d, %d, %d\n",
path, load_count[path][0], load_count[path][1], path, bnx2x_load_count[path][0], bnx2x_load_count[path][1],
load_count[path][2]); bnx2x_load_count[path][2]);
if (load_count[path][0] == 0) if (bnx2x_load_count[path][0] == 0)
reset_code = FW_MSG_CODE_DRV_UNLOAD_COMMON; reset_code = FW_MSG_CODE_DRV_UNLOAD_COMMON;
else if (load_count[path][1 + port] == 0) else if (bnx2x_load_count[path][1 + port] == 0)
reset_code = FW_MSG_CODE_DRV_UNLOAD_PORT; reset_code = FW_MSG_CODE_DRV_UNLOAD_PORT;
else else
reset_code = FW_MSG_CODE_DRV_UNLOAD_FUNCTION; reset_code = FW_MSG_CODE_DRV_UNLOAD_FUNCTION;
...@@ -9772,7 +9819,7 @@ static void bnx2x_period_task(struct work_struct *work) ...@@ -9772,7 +9819,7 @@ static void bnx2x_period_task(struct work_struct *work)
* Init service functions * Init service functions
*/ */
u32 bnx2x_get_pretend_reg(struct bnx2x *bp) static u32 bnx2x_get_pretend_reg(struct bnx2x *bp)
{ {
u32 base = PXP2_REG_PGL_PRETEND_FUNC_F0; u32 base = PXP2_REG_PGL_PRETEND_FUNC_F0;
u32 stride = PXP2_REG_PGL_PRETEND_FUNC_F1 - base; u32 stride = PXP2_REG_PGL_PRETEND_FUNC_F1 - base;
...@@ -12005,7 +12052,7 @@ static int bnx2x_set_mc_list(struct bnx2x *bp) ...@@ -12005,7 +12052,7 @@ static int bnx2x_set_mc_list(struct bnx2x *bp)
} }
/* If bp->state is OPEN, should be called with netif_addr_lock_bh() */ /* If bp->state is OPEN, should be called with netif_addr_lock_bh() */
void bnx2x_set_rx_mode(struct net_device *dev) static void bnx2x_set_rx_mode(struct net_device *dev)
{ {
struct bnx2x *bp = netdev_priv(dev); struct bnx2x *bp = netdev_priv(dev);
...@@ -12783,8 +12830,6 @@ static int set_is_vf(int chip_id) ...@@ -12783,8 +12830,6 @@ static int set_is_vf(int chip_id)
} }
} }
struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev);
static int bnx2x_init_one(struct pci_dev *pdev, static int bnx2x_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent) const struct pci_device_id *ent)
{ {
...@@ -13859,7 +13904,7 @@ static int bnx2x_unregister_cnic(struct net_device *dev) ...@@ -13859,7 +13904,7 @@ static int bnx2x_unregister_cnic(struct net_device *dev)
return 0; return 0;
} }
struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev) static struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev)
{ {
struct bnx2x *bp = netdev_priv(dev); struct bnx2x *bp = netdev_priv(dev);
struct cnic_eth_dev *cp = &bp->cnic_eth_dev; struct cnic_eth_dev *cp = &bp->cnic_eth_dev;
...@@ -13909,7 +13954,7 @@ struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev) ...@@ -13909,7 +13954,7 @@ struct cnic_eth_dev *bnx2x_cnic_probe(struct net_device *dev)
return cp; return cp;
} }
u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp) static u32 bnx2x_rx_ustorm_prods_offset(struct bnx2x_fastpath *fp)
{ {
struct bnx2x *bp = fp->bp; struct bnx2x *bp = fp->bp;
u32 offset = BAR_USTRORM_INTMEM; u32 offset = BAR_USTRORM_INTMEM;
......
...@@ -448,9 +448,6 @@ enum { ...@@ -448,9 +448,6 @@ enum {
BNX2X_LLH_CAM_MAX_PF_LINE = NIG_REG_LLH1_FUNC_MEM_SIZE / 2 BNX2X_LLH_CAM_MAX_PF_LINE = NIG_REG_LLH1_FUNC_MEM_SIZE / 2
}; };
void bnx2x_set_mac_in_nig(struct bnx2x *bp,
bool add, unsigned char *dev_addr, int index);
/** RX_MODE verbs:DROP_ALL/ACCEPT_ALL/ACCEPT_ALL_MULTI/ACCEPT_ALL_VLAN/NORMAL */ /** RX_MODE verbs:DROP_ALL/ACCEPT_ALL/ACCEPT_ALL_MULTI/ACCEPT_ALL_VLAN/NORMAL */
/* RX_MODE ramrod special flags: set in rx_mode_flags field in /* RX_MODE ramrod special flags: set in rx_mode_flags field in
...@@ -1307,22 +1304,12 @@ void bnx2x_init_vlan_obj(struct bnx2x *bp, ...@@ -1307,22 +1304,12 @@ void bnx2x_init_vlan_obj(struct bnx2x *bp,
unsigned long *pstate, bnx2x_obj_type type, unsigned long *pstate, bnx2x_obj_type type,
struct bnx2x_credit_pool_obj *vlans_pool); struct bnx2x_credit_pool_obj *vlans_pool);
void bnx2x_init_vlan_mac_obj(struct bnx2x *bp,
struct bnx2x_vlan_mac_obj *vlan_mac_obj,
u8 cl_id, u32 cid, u8 func_id, void *rdata,
dma_addr_t rdata_mapping, int state,
unsigned long *pstate, bnx2x_obj_type type,
struct bnx2x_credit_pool_obj *macs_pool,
struct bnx2x_credit_pool_obj *vlans_pool);
int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp, int bnx2x_vlan_mac_h_read_lock(struct bnx2x *bp,
struct bnx2x_vlan_mac_obj *o); struct bnx2x_vlan_mac_obj *o);
void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp, void bnx2x_vlan_mac_h_read_unlock(struct bnx2x *bp,
struct bnx2x_vlan_mac_obj *o); struct bnx2x_vlan_mac_obj *o);
int bnx2x_vlan_mac_h_write_lock(struct bnx2x *bp, int bnx2x_vlan_mac_h_write_lock(struct bnx2x *bp,
struct bnx2x_vlan_mac_obj *o); struct bnx2x_vlan_mac_obj *o);
void bnx2x_vlan_mac_h_write_unlock(struct bnx2x *bp,
struct bnx2x_vlan_mac_obj *o);
int bnx2x_config_vlan_mac(struct bnx2x *bp, int bnx2x_config_vlan_mac(struct bnx2x *bp,
struct bnx2x_vlan_mac_ramrod_params *p); struct bnx2x_vlan_mac_ramrod_params *p);
......
...@@ -799,10 +799,10 @@ int bnx2x_vfop_mac_list_cmd(struct bnx2x *bp, ...@@ -799,10 +799,10 @@ int bnx2x_vfop_mac_list_cmd(struct bnx2x *bp,
return -ENOMEM; return -ENOMEM;
} }
int bnx2x_vfop_vlan_set_cmd(struct bnx2x *bp, static int bnx2x_vfop_vlan_set_cmd(struct bnx2x *bp,
struct bnx2x_virtf *vf, struct bnx2x_virtf *vf,
struct bnx2x_vfop_cmd *cmd, struct bnx2x_vfop_cmd *cmd,
int qid, u16 vid, bool add) int qid, u16 vid, bool add)
{ {
struct bnx2x_vfop *vfop = bnx2x_vfop_add(bp, vf); struct bnx2x_vfop *vfop = bnx2x_vfop_add(bp, vf);
int rc; int rc;
......
...@@ -665,11 +665,6 @@ int bnx2x_vfop_mac_list_cmd(struct bnx2x *bp, ...@@ -665,11 +665,6 @@ int bnx2x_vfop_mac_list_cmd(struct bnx2x *bp,
struct bnx2x_vfop_filters *macs, struct bnx2x_vfop_filters *macs,
int qid, bool drv_only); int qid, bool drv_only);
int bnx2x_vfop_vlan_set_cmd(struct bnx2x *bp,
struct bnx2x_virtf *vf,
struct bnx2x_vfop_cmd *cmd,
int qid, u16 vid, bool add);
int bnx2x_vfop_vlan_list_cmd(struct bnx2x *bp, int bnx2x_vfop_vlan_list_cmd(struct bnx2x *bp,
struct bnx2x_virtf *vf, struct bnx2x_virtf *vf,
struct bnx2x_vfop_cmd *cmd, struct bnx2x_vfop_cmd *cmd,
...@@ -727,13 +722,6 @@ void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid); ...@@ -727,13 +722,6 @@ void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid);
/* Handles an FLR (or VF_DISABLE) notification form the MCP */ /* Handles an FLR (or VF_DISABLE) notification form the MCP */
void bnx2x_vf_handle_flr_event(struct bnx2x *bp); void bnx2x_vf_handle_flr_event(struct bnx2x *bp);
void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list, u16 offset, u16 type,
u16 length);
void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv,
u16 type, u16 length);
void bnx2x_vfpf_finalize(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv);
void bnx2x_dp_tlv_list(struct bnx2x *bp, void *tlvs_list);
bool bnx2x_tlv_supported(u16 tlvtype); bool bnx2x_tlv_supported(u16 tlvtype);
u32 bnx2x_crc_vf_bulletin(struct bnx2x *bp, u32 bnx2x_crc_vf_bulletin(struct bnx2x *bp,
...@@ -750,7 +738,6 @@ int bnx2x_vfpf_init(struct bnx2x *bp); ...@@ -750,7 +738,6 @@ int bnx2x_vfpf_init(struct bnx2x *bp);
void bnx2x_vfpf_close_vf(struct bnx2x *bp); void bnx2x_vfpf_close_vf(struct bnx2x *bp);
int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp,
bool is_leading); bool is_leading);
int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx);
int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set); int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, u8 vf_qid, bool set);
int bnx2x_vfpf_config_rss(struct bnx2x *bp, int bnx2x_vfpf_config_rss(struct bnx2x *bp,
struct bnx2x_config_rss_params *params); struct bnx2x_config_rss_params *params);
...@@ -814,7 +801,6 @@ static inline int bnx2x_vfpf_release(struct bnx2x *bp) {return 0; } ...@@ -814,7 +801,6 @@ static inline int bnx2x_vfpf_release(struct bnx2x *bp) {return 0; }
static inline int bnx2x_vfpf_init(struct bnx2x *bp) {return 0; } static inline int bnx2x_vfpf_init(struct bnx2x *bp) {return 0; }
static inline void bnx2x_vfpf_close_vf(struct bnx2x *bp) {} static inline void bnx2x_vfpf_close_vf(struct bnx2x *bp) {}
static inline int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bool is_leading) {return 0; } static inline int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, bool is_leading) {return 0; }
static inline int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx) {return 0; }
static inline int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr, static inline int bnx2x_vfpf_config_mac(struct bnx2x *bp, u8 *addr,
u8 vf_qid, bool set) {return 0; } u8 vf_qid, bool set) {return 0; }
static inline int bnx2x_vfpf_config_rss(struct bnx2x *bp, static inline int bnx2x_vfpf_config_rss(struct bnx2x *bp,
......
...@@ -21,9 +21,11 @@ ...@@ -21,9 +21,11 @@
#include "bnx2x_cmn.h" #include "bnx2x_cmn.h"
#include <linux/crc32.h> #include <linux/crc32.h>
static int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx);
/* place a given tlv on the tlv buffer at a given offset */ /* place a given tlv on the tlv buffer at a given offset */
void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list, u16 offset, u16 type, static void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list,
u16 length) u16 offset, u16 type, u16 length)
{ {
struct channel_tlv *tl = struct channel_tlv *tl =
(struct channel_tlv *)(tlvs_list + offset); (struct channel_tlv *)(tlvs_list + offset);
...@@ -33,8 +35,8 @@ void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list, u16 offset, u16 type, ...@@ -33,8 +35,8 @@ void bnx2x_add_tlv(struct bnx2x *bp, void *tlvs_list, u16 offset, u16 type,
} }
/* Clear the mailbox and init the header of the first tlv */ /* Clear the mailbox and init the header of the first tlv */
void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv, static void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv,
u16 type, u16 length) u16 type, u16 length)
{ {
mutex_lock(&bp->vf2pf_mutex); mutex_lock(&bp->vf2pf_mutex);
...@@ -52,7 +54,8 @@ void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv, ...@@ -52,7 +54,8 @@ void bnx2x_vfpf_prep(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv,
} }
/* releases the mailbox */ /* releases the mailbox */
void bnx2x_vfpf_finalize(struct bnx2x *bp, struct vfpf_first_tlv *first_tlv) static void bnx2x_vfpf_finalize(struct bnx2x *bp,
struct vfpf_first_tlv *first_tlv)
{ {
DP(BNX2X_MSG_IOV, "done sending [%d] tlv over vf pf channel\n", DP(BNX2X_MSG_IOV, "done sending [%d] tlv over vf pf channel\n",
first_tlv->tl.type); first_tlv->tl.type);
...@@ -85,7 +88,7 @@ static void *bnx2x_search_tlv_list(struct bnx2x *bp, void *tlvs_list, ...@@ -85,7 +88,7 @@ static void *bnx2x_search_tlv_list(struct bnx2x *bp, void *tlvs_list,
} }
/* list the types and lengths of the tlvs on the buffer */ /* list the types and lengths of the tlvs on the buffer */
void bnx2x_dp_tlv_list(struct bnx2x *bp, void *tlvs_list) static void bnx2x_dp_tlv_list(struct bnx2x *bp, void *tlvs_list)
{ {
int i = 1; int i = 1;
struct channel_tlv *tlv = (struct channel_tlv *)tlvs_list; struct channel_tlv *tlv = (struct channel_tlv *)tlvs_list;
...@@ -633,7 +636,7 @@ int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp, ...@@ -633,7 +636,7 @@ int bnx2x_vfpf_setup_q(struct bnx2x *bp, struct bnx2x_fastpath *fp,
return rc; return rc;
} }
int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx) static int bnx2x_vfpf_teardown_queue(struct bnx2x *bp, int qidx)
{ {
struct vfpf_q_op_tlv *req = &bp->vf2pf_mbox->req.q_op; struct vfpf_q_op_tlv *req = &bp->vf2pf_mbox->req.q_op;
struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp; struct pfvf_general_resp_tlv *resp = &bp->vf2pf_mbox->resp.general_resp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment