Commit b7ee31c5 authored by Rasesh Mody's avatar Rasesh Mody Committed by David S. Miller

bna: scope and dead code cleanup

As suggested by Stephen Hemminger:
1) Made functions and data structures static wherever possible.
2) Removed unused code.
Signed-off-by: default avatarDebashis Dutt <ddutt@brocade.com>
Signed-off-by: default avatarRasesh Mody <rmody@brocade.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2fa6f2e
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
(!list_empty(&((__ioc)->mbox_mod.cmd_q)) || \ (!list_empty(&((__ioc)->mbox_mod.cmd_q)) || \
readl((__ioc)->ioc_regs.hfn_mbox_cmd)) readl((__ioc)->ioc_regs.hfn_mbox_cmd))
bool bfa_nw_auto_recover = true; static bool bfa_nw_auto_recover = true;
/* /*
* forward declarations * forward declarations
...@@ -1276,12 +1276,6 @@ bfa_nw_ioc_auto_recover(bool auto_recover) ...@@ -1276,12 +1276,6 @@ bfa_nw_ioc_auto_recover(bool auto_recover)
bfa_nw_auto_recover = auto_recover; bfa_nw_auto_recover = auto_recover;
} }
bool
bfa_nw_ioc_is_operational(struct bfa_ioc *ioc)
{
return bfa_fsm_cmp_state(ioc, bfa_ioc_sm_op);
}
static void static void
bfa_ioc_msgget(struct bfa_ioc *ioc, void *mbmsg) bfa_ioc_msgget(struct bfa_ioc *ioc, void *mbmsg)
{ {
......
...@@ -271,7 +271,6 @@ void bfa_nw_ioc_enable(struct bfa_ioc *ioc); ...@@ -271,7 +271,6 @@ void bfa_nw_ioc_enable(struct bfa_ioc *ioc);
void bfa_nw_ioc_disable(struct bfa_ioc *ioc); void bfa_nw_ioc_disable(struct bfa_ioc *ioc);
void bfa_nw_ioc_error_isr(struct bfa_ioc *ioc); void bfa_nw_ioc_error_isr(struct bfa_ioc *ioc);
bool bfa_nw_ioc_is_operational(struct bfa_ioc *ioc);
void bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr); void bfa_nw_ioc_get_attr(struct bfa_ioc *ioc, struct bfa_ioc_attr *ioc_attr);
void bfa_nw_ioc_hbfail_register(struct bfa_ioc *ioc, void bfa_nw_ioc_hbfail_register(struct bfa_ioc *ioc,
......
...@@ -34,7 +34,7 @@ static void bfa_ioc_ct_notify_hbfail(struct bfa_ioc *ioc); ...@@ -34,7 +34,7 @@ static void bfa_ioc_ct_notify_hbfail(struct bfa_ioc *ioc);
static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc); static void bfa_ioc_ct_ownership_reset(struct bfa_ioc *ioc);
static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb, bool fcmode); static enum bfa_status bfa_ioc_ct_pll_init(void __iomem *rb, bool fcmode);
struct bfa_ioc_hwif nw_hwif_ct; static struct bfa_ioc_hwif nw_hwif_ct;
/** /**
* Called from bfa_ioc_attach() to map asic specific calls. * Called from bfa_ioc_attach() to map asic specific calls.
......
...@@ -77,7 +77,7 @@ typedef void (*bfa_fsm_t)(void *fsm, int event); ...@@ -77,7 +77,7 @@ typedef void (*bfa_fsm_t)(void *fsm, int event);
((_fsm)->fsm == (bfa_fsm_t)(_state)) ((_fsm)->fsm == (bfa_fsm_t)(_state))
static inline int static inline int
bfa_sm_to_state(struct bfa_sm_table *smt, bfa_sm_t sm) bfa_sm_to_state(const struct bfa_sm_table *smt, bfa_sm_t sm)
{ {
int i = 0; int i = 0;
......
...@@ -19,8 +19,7 @@ ...@@ -19,8 +19,7 @@
#include "bfi_ll.h" #include "bfi_ll.h"
#include "bna_types.h" #include "bna_types.h"
extern u32 bna_dim_vector[][BNA_BIAS_T_MAX]; extern const u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX];
extern u32 bna_napi_dim_vector[][BNA_BIAS_T_MAX];
/** /**
* *
...@@ -344,9 +343,6 @@ do { \ ...@@ -344,9 +343,6 @@ do { \
* BNA * BNA
*/ */
/* Internal APIs */
void bna_adv_res_req(struct bna_res_info *res_info);
/* APIs for BNAD */ /* APIs for BNAD */
void bna_res_req(struct bna_res_info *res_info); void bna_res_req(struct bna_res_info *res_info);
void bna_init(struct bna *bna, struct bnad *bnad, void bna_init(struct bna *bna, struct bnad *bnad,
...@@ -354,7 +350,6 @@ void bna_init(struct bna *bna, struct bnad *bnad, ...@@ -354,7 +350,6 @@ void bna_init(struct bna *bna, struct bnad *bnad,
struct bna_res_info *res_info); struct bna_res_info *res_info);
void bna_uninit(struct bna *bna); void bna_uninit(struct bna *bna);
void bna_stats_get(struct bna *bna); void bna_stats_get(struct bna *bna);
void bna_stats_clr(struct bna *bna);
void bna_get_perm_mac(struct bna *bna, u8 *mac); void bna_get_perm_mac(struct bna *bna, u8 *mac);
/* APIs for Rx */ /* APIs for Rx */
...@@ -376,18 +371,6 @@ void bna_rit_mod_seg_put(struct bna_rit_mod *rit_mod, ...@@ -376,18 +371,6 @@ void bna_rit_mod_seg_put(struct bna_rit_mod *rit_mod,
* DEVICE * DEVICE
*/ */
/* Interanl APIs */
void bna_adv_device_init(struct bna_device *device, struct bna *bna,
struct bna_res_info *res_info);
/* APIs for BNA */
void bna_device_init(struct bna_device *device, struct bna *bna,
struct bna_res_info *res_info);
void bna_device_uninit(struct bna_device *device);
void bna_device_cb_port_stopped(void *arg, enum bna_cb_status status);
int bna_device_status_get(struct bna_device *device);
int bna_device_state_get(struct bna_device *device);
/* APIs for BNAD */ /* APIs for BNAD */
void bna_device_enable(struct bna_device *device); void bna_device_enable(struct bna_device *device);
void bna_device_disable(struct bna_device *device, void bna_device_disable(struct bna_device *device,
...@@ -397,12 +380,6 @@ void bna_device_disable(struct bna_device *device, ...@@ -397,12 +380,6 @@ void bna_device_disable(struct bna_device *device,
* MBOX * MBOX
*/ */
/* APIs for DEVICE */
void bna_mbox_mod_init(struct bna_mbox_mod *mbox_mod, struct bna *bna);
void bna_mbox_mod_uninit(struct bna_mbox_mod *mbox_mod);
void bna_mbox_mod_start(struct bna_mbox_mod *mbox_mod);
void bna_mbox_mod_stop(struct bna_mbox_mod *mbox_mod);
/* APIs for PORT, TX, RX */ /* APIs for PORT, TX, RX */
void bna_mbox_handler(struct bna *bna, u32 intr_status); void bna_mbox_handler(struct bna *bna, u32 intr_status);
void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe);
...@@ -411,17 +388,6 @@ void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe); ...@@ -411,17 +388,6 @@ void bna_mbox_send(struct bna *bna, struct bna_mbox_qe *mbox_qe);
* PORT * PORT
*/ */
/* APIs for BNA */
void bna_port_init(struct bna_port *port, struct bna *bna);
void bna_port_uninit(struct bna_port *port);
int bna_port_state_get(struct bna_port *port);
int bna_llport_state_get(struct bna_llport *llport);
/* APIs for DEVICE */
void bna_port_start(struct bna_port *port);
void bna_port_stop(struct bna_port *port);
void bna_port_fail(struct bna_port *port);
/* API for RX */ /* API for RX */
int bna_port_mtu_get(struct bna_port *port); int bna_port_mtu_get(struct bna_port *port);
void bna_llport_admin_up(struct bna_llport *llport); void bna_llport_admin_up(struct bna_llport *llport);
...@@ -437,12 +403,6 @@ void bna_port_pause_config(struct bna_port *port, ...@@ -437,12 +403,6 @@ void bna_port_pause_config(struct bna_port *port,
void bna_port_mtu_set(struct bna_port *port, int mtu, void bna_port_mtu_set(struct bna_port *port, int mtu,
void (*cbfn)(struct bnad *, enum bna_cb_status)); void (*cbfn)(struct bnad *, enum bna_cb_status));
void bna_port_mac_get(struct bna_port *port, mac_t *mac); void bna_port_mac_get(struct bna_port *port, mac_t *mac);
void bna_port_type_set(struct bna_port *port, enum bna_port_type type);
void bna_port_linkcbfn_set(struct bna_port *port,
void (*linkcbfn)(struct bnad *,
enum bna_link_status));
void bna_port_admin_up(struct bna_port *port);
void bna_port_admin_down(struct bna_port *port);
/* Callbacks for TX, RX */ /* Callbacks for TX, RX */
void bna_port_cb_tx_stopped(struct bna_port *port, void bna_port_cb_tx_stopped(struct bna_port *port,
...@@ -450,11 +410,6 @@ void bna_port_cb_tx_stopped(struct bna_port *port, ...@@ -450,11 +410,6 @@ void bna_port_cb_tx_stopped(struct bna_port *port,
void bna_port_cb_rx_stopped(struct bna_port *port, void bna_port_cb_rx_stopped(struct bna_port *port,
enum bna_cb_status status); enum bna_cb_status status);
/* Callbacks for MBOX */
void bna_port_cb_link_up(struct bna_port *port, struct bfi_ll_aen *aen,
int status);
void bna_port_cb_link_down(struct bna_port *port, int status);
/** /**
* IB * IB
*/ */
...@@ -464,25 +419,10 @@ void bna_ib_mod_init(struct bna_ib_mod *ib_mod, struct bna *bna, ...@@ -464,25 +419,10 @@ void bna_ib_mod_init(struct bna_ib_mod *ib_mod, struct bna *bna,
struct bna_res_info *res_info); struct bna_res_info *res_info);
void bna_ib_mod_uninit(struct bna_ib_mod *ib_mod); void bna_ib_mod_uninit(struct bna_ib_mod *ib_mod);
/* APIs for TX, RX */
struct bna_ib *bna_ib_get(struct bna_ib_mod *ib_mod,
enum bna_intr_type intr_type, int vector);
void bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib);
int bna_ib_reserve_idx(struct bna_ib *ib);
void bna_ib_release_idx(struct bna_ib *ib, int idx);
int bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config);
void bna_ib_start(struct bna_ib *ib);
void bna_ib_stop(struct bna_ib *ib);
void bna_ib_fail(struct bna_ib *ib);
void bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo);
/** /**
* TX MODULE AND TX * TX MODULE AND TX
*/ */
/* Internal APIs */
void bna_tx_prio_changed(struct bna_tx *tx, int prio);
/* APIs for BNA */ /* APIs for BNA */
void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna, void bna_tx_mod_init(struct bna_tx_mod *tx_mod, struct bna *bna,
struct bna_res_info *res_info); struct bna_res_info *res_info);
...@@ -508,10 +448,6 @@ void bna_tx_enable(struct bna_tx *tx); ...@@ -508,10 +448,6 @@ void bna_tx_enable(struct bna_tx *tx);
void bna_tx_disable(struct bna_tx *tx, enum bna_cleanup_type type, void bna_tx_disable(struct bna_tx *tx, enum bna_cleanup_type type,
void (*cbfn)(void *, struct bna_tx *, void (*cbfn)(void *, struct bna_tx *,
enum bna_cb_status)); enum bna_cb_status));
enum bna_cb_status
bna_tx_prio_set(struct bna_tx *tx, int prio,
void (*cbfn)(struct bnad *, struct bna_tx *,
enum bna_cb_status));
void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo); void bna_tx_coalescing_timeo_set(struct bna_tx *tx, int coalescing_timeo);
/** /**
...@@ -564,35 +500,20 @@ void bna_rx_disable(struct bna_rx *rx, enum bna_cleanup_type type, ...@@ -564,35 +500,20 @@ void bna_rx_disable(struct bna_rx *rx, enum bna_cleanup_type type,
void (*cbfn)(void *, struct bna_rx *, void (*cbfn)(void *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo); void bna_rx_coalescing_timeo_set(struct bna_rx *rx, int coalescing_timeo);
void bna_rx_dim_reconfig(struct bna *bna, u32 vector[][BNA_BIAS_T_MAX]); void bna_rx_dim_reconfig(struct bna *bna, const u32 vector[][BNA_BIAS_T_MAX]);
void bna_rx_dim_update(struct bna_ccb *ccb); void bna_rx_dim_update(struct bna_ccb *ccb);
enum bna_cb_status enum bna_cb_status
bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac, bna_rx_ucast_set(struct bna_rx *rx, u8 *ucmac,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
enum bna_cb_status enum bna_cb_status
bna_rx_ucast_add(struct bna_rx *rx, u8* ucmac,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
enum bna_cb_status
bna_rx_ucast_del(struct bna_rx *rx, u8 *ucmac,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
enum bna_cb_status
bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac, bna_rx_mcast_add(struct bna_rx *rx, u8 *mcmac,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
enum bna_cb_status enum bna_cb_status
bna_rx_mcast_del(struct bna_rx *rx, u8 *mcmac,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
enum bna_cb_status
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac, bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mcmac,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
void bna_rx_mcast_delall(struct bna_rx *rx,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
enum bna_cb_status enum bna_cb_status
bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode, bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
enum bna_rxmode bitmask, enum bna_rxmode bitmask,
...@@ -601,36 +522,12 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode, ...@@ -601,36 +522,12 @@ bna_rx_mode_set(struct bna_rx *rx, enum bna_rxmode rxmode,
void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id); void bna_rx_vlan_add(struct bna_rx *rx, int vlan_id);
void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id); void bna_rx_vlan_del(struct bna_rx *rx, int vlan_id);
void bna_rx_vlanfilter_enable(struct bna_rx *rx); void bna_rx_vlanfilter_enable(struct bna_rx *rx);
void bna_rx_vlanfilter_disable(struct bna_rx *rx);
void bna_rx_rss_enable(struct bna_rx *rx);
void bna_rx_rss_disable(struct bna_rx *rx);
void bna_rx_rss_reconfig(struct bna_rx *rx, struct bna_rxf_rss *rss_config);
void bna_rx_rss_rit_set(struct bna_rx *rx, unsigned int *vectors,
int nvectors);
void bna_rx_hds_enable(struct bna_rx *rx, struct bna_rxf_hds *hds_config, void bna_rx_hds_enable(struct bna_rx *rx, struct bna_rxf_hds *hds_config,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
void bna_rx_hds_disable(struct bna_rx *rx, void bna_rx_hds_disable(struct bna_rx *rx,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status)); enum bna_cb_status));
void bna_rx_receive_pause(struct bna_rx *rx,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
void bna_rx_receive_resume(struct bna_rx *rx,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status));
/* RxF APIs for RX */
void bna_rxf_start(struct bna_rxf *rxf);
void bna_rxf_stop(struct bna_rxf *rxf);
void bna_rxf_fail(struct bna_rxf *rxf);
void bna_rxf_init(struct bna_rxf *rxf, struct bna_rx *rx,
struct bna_rx_config *q_config);
void bna_rxf_uninit(struct bna_rxf *rxf);
/* Callback from RXF to RX */
void bna_rx_cb_rxf_stopped(struct bna_rx *rx, enum bna_cb_status);
void bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status);
/** /**
* BNAD * BNAD
...@@ -639,7 +536,6 @@ void bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status); ...@@ -639,7 +536,6 @@ void bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status);
/* Callbacks for BNA */ /* Callbacks for BNA */
void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, void bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status,
struct bna_stats *stats); struct bna_stats *stats);
void bnad_cb_stats_clr(struct bnad *bnad);
/* Callbacks for DEVICE */ /* Callbacks for DEVICE */
void bnad_cb_device_enabled(struct bnad *bnad, enum bna_cb_status status); void bnad_cb_device_enabled(struct bnad *bnad, enum bna_cb_status status);
......
This diff is collapsed.
...@@ -1282,7 +1282,6 @@ struct bna_chip_regs_offset { ...@@ -1282,7 +1282,6 @@ struct bna_chip_regs_offset {
u32 fn_int_mask; u32 fn_int_mask;
u32 msix_idx; u32 msix_idx;
}; };
extern const struct bna_chip_regs_offset reg_offset[];
struct bna_chip_regs { struct bna_chip_regs {
void __iomem *page_addr; void __iomem *page_addr;
......
...@@ -195,7 +195,7 @@ bna_ib_mod_uninit(struct bna_ib_mod *ib_mod) ...@@ -195,7 +195,7 @@ bna_ib_mod_uninit(struct bna_ib_mod *ib_mod)
ib_mod->bna = NULL; ib_mod->bna = NULL;
} }
struct bna_ib * static struct bna_ib *
bna_ib_get(struct bna_ib_mod *ib_mod, bna_ib_get(struct bna_ib_mod *ib_mod,
enum bna_intr_type intr_type, enum bna_intr_type intr_type,
int vector) int vector)
...@@ -240,7 +240,7 @@ bna_ib_get(struct bna_ib_mod *ib_mod, ...@@ -240,7 +240,7 @@ bna_ib_get(struct bna_ib_mod *ib_mod,
return ib; return ib;
} }
void static void
bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib) bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib)
{ {
bna_intr_put(ib_mod, ib->intr); bna_intr_put(ib_mod, ib->intr);
...@@ -255,7 +255,7 @@ bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib) ...@@ -255,7 +255,7 @@ bna_ib_put(struct bna_ib_mod *ib_mod, struct bna_ib *ib)
} }
/* Returns index offset - starting from 0 */ /* Returns index offset - starting from 0 */
int static int
bna_ib_reserve_idx(struct bna_ib *ib) bna_ib_reserve_idx(struct bna_ib *ib)
{ {
struct bna_ib_mod *ib_mod = &ib->bna->ib_mod; struct bna_ib_mod *ib_mod = &ib->bna->ib_mod;
...@@ -309,7 +309,7 @@ bna_ib_reserve_idx(struct bna_ib *ib) ...@@ -309,7 +309,7 @@ bna_ib_reserve_idx(struct bna_ib *ib)
return idx; return idx;
} }
void static void
bna_ib_release_idx(struct bna_ib *ib, int idx) bna_ib_release_idx(struct bna_ib *ib, int idx)
{ {
struct bna_ib_mod *ib_mod = &ib->bna->ib_mod; struct bna_ib_mod *ib_mod = &ib->bna->ib_mod;
...@@ -356,7 +356,7 @@ bna_ib_release_idx(struct bna_ib *ib, int idx) ...@@ -356,7 +356,7 @@ bna_ib_release_idx(struct bna_ib *ib, int idx)
} }
} }
int static int
bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config) bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config)
{ {
if (ib->start_count) if (ib->start_count)
...@@ -374,7 +374,7 @@ bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config) ...@@ -374,7 +374,7 @@ bna_ib_config(struct bna_ib *ib, struct bna_ib_config *ib_config)
return 0; return 0;
} }
void static void
bna_ib_start(struct bna_ib *ib) bna_ib_start(struct bna_ib *ib)
{ {
struct bna_ib_blk_mem ib_cfg; struct bna_ib_blk_mem ib_cfg;
...@@ -450,7 +450,7 @@ bna_ib_start(struct bna_ib *ib) ...@@ -450,7 +450,7 @@ bna_ib_start(struct bna_ib *ib)
} }
} }
void static void
bna_ib_stop(struct bna_ib *ib) bna_ib_stop(struct bna_ib *ib)
{ {
u32 intx_mask; u32 intx_mask;
...@@ -468,7 +468,7 @@ bna_ib_stop(struct bna_ib *ib) ...@@ -468,7 +468,7 @@ bna_ib_stop(struct bna_ib *ib)
} }
} }
void static void
bna_ib_fail(struct bna_ib *ib) bna_ib_fail(struct bna_ib *ib)
{ {
ib->start_count = 0; ib->start_count = 0;
...@@ -1394,7 +1394,7 @@ rxf_reset_packet_filter(struct bna_rxf *rxf) ...@@ -1394,7 +1394,7 @@ rxf_reset_packet_filter(struct bna_rxf *rxf)
rxf_reset_packet_filter_allmulti(rxf); rxf_reset_packet_filter_allmulti(rxf);
} }
void static void
bna_rxf_init(struct bna_rxf *rxf, bna_rxf_init(struct bna_rxf *rxf,
struct bna_rx *rx, struct bna_rx *rx,
struct bna_rx_config *q_config) struct bna_rx_config *q_config)
...@@ -1444,7 +1444,7 @@ bna_rxf_init(struct bna_rxf *rxf, ...@@ -1444,7 +1444,7 @@ bna_rxf_init(struct bna_rxf *rxf,
bfa_fsm_set_state(rxf, bna_rxf_sm_stopped); bfa_fsm_set_state(rxf, bna_rxf_sm_stopped);
} }
void static void
bna_rxf_uninit(struct bna_rxf *rxf) bna_rxf_uninit(struct bna_rxf *rxf)
{ {
struct bna_mac *mac; struct bna_mac *mac;
...@@ -1476,7 +1476,18 @@ bna_rxf_uninit(struct bna_rxf *rxf) ...@@ -1476,7 +1476,18 @@ bna_rxf_uninit(struct bna_rxf *rxf)
rxf->rx = NULL; rxf->rx = NULL;
} }
void static void
bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status status)
{
bfa_fsm_send_event(rx, RX_E_RXF_STARTED);
if (rx->rxf.rxf_id < 32)
rx->bna->rx_mod.rxf_bmap[0] |= ((u32)1 << rx->rxf.rxf_id);
else
rx->bna->rx_mod.rxf_bmap[1] |= ((u32)
1 << (rx->rxf.rxf_id - 32));
}
static void
bna_rxf_start(struct bna_rxf *rxf) bna_rxf_start(struct bna_rxf *rxf)
{ {
rxf->start_cbfn = bna_rx_cb_rxf_started; rxf->start_cbfn = bna_rx_cb_rxf_started;
...@@ -1485,7 +1496,18 @@ bna_rxf_start(struct bna_rxf *rxf) ...@@ -1485,7 +1496,18 @@ bna_rxf_start(struct bna_rxf *rxf)
bfa_fsm_send_event(rxf, RXF_E_START); bfa_fsm_send_event(rxf, RXF_E_START);
} }
void static void
bna_rx_cb_rxf_stopped(struct bna_rx *rx, enum bna_cb_status status)
{
bfa_fsm_send_event(rx, RX_E_RXF_STOPPED);
if (rx->rxf.rxf_id < 32)
rx->bna->rx_mod.rxf_bmap[0] &= ~(u32)1 << rx->rxf.rxf_id;
else
rx->bna->rx_mod.rxf_bmap[1] &= ~(u32)
1 << (rx->rxf.rxf_id - 32);
}
static void
bna_rxf_stop(struct bna_rxf *rxf) bna_rxf_stop(struct bna_rxf *rxf)
{ {
rxf->stop_cbfn = bna_rx_cb_rxf_stopped; rxf->stop_cbfn = bna_rx_cb_rxf_stopped;
...@@ -1493,7 +1515,7 @@ bna_rxf_stop(struct bna_rxf *rxf) ...@@ -1493,7 +1515,7 @@ bna_rxf_stop(struct bna_rxf *rxf)
bfa_fsm_send_event(rxf, RXF_E_STOP); bfa_fsm_send_event(rxf, RXF_E_STOP);
} }
void static void
bna_rxf_fail(struct bna_rxf *rxf) bna_rxf_fail(struct bna_rxf *rxf)
{ {
rxf->rxf_flags |= BNA_RXF_FL_FAILED; rxf->rxf_flags |= BNA_RXF_FL_FAILED;
...@@ -1575,43 +1597,6 @@ bna_rx_mcast_add(struct bna_rx *rx, u8 *addr, ...@@ -1575,43 +1597,6 @@ bna_rx_mcast_add(struct bna_rx *rx, u8 *addr,
return BNA_CB_SUCCESS; return BNA_CB_SUCCESS;
} }
enum bna_cb_status
bna_rx_mcast_del(struct bna_rx *rx, u8 *addr,
void (*cbfn)(struct bnad *, struct bna_rx *,
enum bna_cb_status))
{
struct bna_rxf *rxf = &rx->rxf;
struct list_head *qe;
struct bna_mac *mac;
list_for_each(qe, &rxf->mcast_pending_add_q) {
mac = (struct bna_mac *)qe;
if (BNA_MAC_IS_EQUAL(mac->addr, addr)) {
list_del(qe);
bfa_q_qe_init(qe);
bna_mcam_mod_mac_put(&rxf->rx->bna->mcam_mod, mac);
if (cbfn)
(*cbfn)(rx->bna->bnad, rx, BNA_CB_SUCCESS);
return BNA_CB_SUCCESS;
}
}
list_for_each(qe, &rxf->mcast_active_q) {
mac = (struct bna_mac *)qe;
if (BNA_MAC_IS_EQUAL(mac->addr, addr)) {
list_del(qe);
bfa_q_qe_init(qe);
list_add_tail(qe, &rxf->mcast_pending_del_q);
rxf->cam_fltr_cbfn = cbfn;
rxf->cam_fltr_cbarg = rx->bna->bnad;
bfa_fsm_send_event(rxf, RXF_E_CAM_FLTR_MOD);
return BNA_CB_SUCCESS;
}
}
return BNA_CB_INVALID_MAC;
}
enum bna_cb_status enum bna_cb_status
bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist, bna_rx_mcast_listset(struct bna_rx *rx, int count, u8 *mclist,
void (*cbfn)(struct bnad *, struct bna_rx *, void (*cbfn)(struct bnad *, struct bna_rx *,
...@@ -1862,7 +1847,7 @@ bfa_fsm_state_decl(bna_rx, rxf_stop_wait, ...@@ -1862,7 +1847,7 @@ bfa_fsm_state_decl(bna_rx, rxf_stop_wait,
bfa_fsm_state_decl(bna_rx, rxq_stop_wait, bfa_fsm_state_decl(bna_rx, rxq_stop_wait,
struct bna_rx, enum bna_rx_event); struct bna_rx, enum bna_rx_event);
static struct bfa_sm_table rx_sm_table[] = { static const struct bfa_sm_table rx_sm_table[] = {
{BFA_SM(bna_rx_sm_stopped), BNA_RX_STOPPED}, {BFA_SM(bna_rx_sm_stopped), BNA_RX_STOPPED},
{BFA_SM(bna_rx_sm_rxf_start_wait), BNA_RX_RXF_START_WAIT}, {BFA_SM(bna_rx_sm_rxf_start_wait), BNA_RX_RXF_START_WAIT},
{BFA_SM(bna_rx_sm_started), BNA_RX_STARTED}, {BFA_SM(bna_rx_sm_started), BNA_RX_STARTED},
...@@ -2247,7 +2232,7 @@ bna_rit_create(struct bna_rx *rx) ...@@ -2247,7 +2232,7 @@ bna_rit_create(struct bna_rx *rx)
} }
} }
int static int
_rx_can_satisfy(struct bna_rx_mod *rx_mod, _rx_can_satisfy(struct bna_rx_mod *rx_mod,
struct bna_rx_config *rx_cfg) struct bna_rx_config *rx_cfg)
{ {
...@@ -2272,7 +2257,7 @@ _rx_can_satisfy(struct bna_rx_mod *rx_mod, ...@@ -2272,7 +2257,7 @@ _rx_can_satisfy(struct bna_rx_mod *rx_mod,
return 1; return 1;
} }
struct bna_rxq * static struct bna_rxq *
_get_free_rxq(struct bna_rx_mod *rx_mod) _get_free_rxq(struct bna_rx_mod *rx_mod)
{ {
struct bna_rxq *rxq = NULL; struct bna_rxq *rxq = NULL;
...@@ -2286,7 +2271,7 @@ _get_free_rxq(struct bna_rx_mod *rx_mod) ...@@ -2286,7 +2271,7 @@ _get_free_rxq(struct bna_rx_mod *rx_mod)
return rxq; return rxq;
} }
void static void
_put_free_rxq(struct bna_rx_mod *rx_mod, struct bna_rxq *rxq) _put_free_rxq(struct bna_rx_mod *rx_mod, struct bna_rxq *rxq)
{ {
bfa_q_qe_init(&rxq->qe); bfa_q_qe_init(&rxq->qe);
...@@ -2294,7 +2279,7 @@ _put_free_rxq(struct bna_rx_mod *rx_mod, struct bna_rxq *rxq) ...@@ -2294,7 +2279,7 @@ _put_free_rxq(struct bna_rx_mod *rx_mod, struct bna_rxq *rxq)
rx_mod->rxq_free_count++; rx_mod->rxq_free_count++;
} }
struct bna_rxp * static struct bna_rxp *
_get_free_rxp(struct bna_rx_mod *rx_mod) _get_free_rxp(struct bna_rx_mod *rx_mod)
{ {
struct list_head *qe = NULL; struct list_head *qe = NULL;
...@@ -2310,7 +2295,7 @@ _get_free_rxp(struct bna_rx_mod *rx_mod) ...@@ -2310,7 +2295,7 @@ _get_free_rxp(struct bna_rx_mod *rx_mod)
return rxp; return rxp;
} }
void static void
_put_free_rxp(struct bna_rx_mod *rx_mod, struct bna_rxp *rxp) _put_free_rxp(struct bna_rx_mod *rx_mod, struct bna_rxp *rxp)
{ {
bfa_q_qe_init(&rxp->qe); bfa_q_qe_init(&rxp->qe);
...@@ -2318,7 +2303,7 @@ _put_free_rxp(struct bna_rx_mod *rx_mod, struct bna_rxp *rxp) ...@@ -2318,7 +2303,7 @@ _put_free_rxp(struct bna_rx_mod *rx_mod, struct bna_rxp *rxp)
rx_mod->rxp_free_count++; rx_mod->rxp_free_count++;
} }
struct bna_rx * static struct bna_rx *
_get_free_rx(struct bna_rx_mod *rx_mod) _get_free_rx(struct bna_rx_mod *rx_mod)
{ {
struct list_head *qe = NULL; struct list_head *qe = NULL;
...@@ -2336,7 +2321,7 @@ _get_free_rx(struct bna_rx_mod *rx_mod) ...@@ -2336,7 +2321,7 @@ _get_free_rx(struct bna_rx_mod *rx_mod)
return rx; return rx;
} }
void static void
_put_free_rx(struct bna_rx_mod *rx_mod, struct bna_rx *rx) _put_free_rx(struct bna_rx_mod *rx_mod, struct bna_rx *rx)
{ {
bfa_q_qe_init(&rx->qe); bfa_q_qe_init(&rx->qe);
...@@ -2344,7 +2329,7 @@ _put_free_rx(struct bna_rx_mod *rx_mod, struct bna_rx *rx) ...@@ -2344,7 +2329,7 @@ _put_free_rx(struct bna_rx_mod *rx_mod, struct bna_rx *rx)
rx_mod->rx_free_count++; rx_mod->rx_free_count++;
} }
void static void
_rx_init(struct bna_rx *rx, struct bna *bna) _rx_init(struct bna_rx *rx, struct bna *bna)
{ {
rx->bna = bna; rx->bna = bna;
...@@ -2360,7 +2345,7 @@ _rx_init(struct bna_rx *rx, struct bna *bna) ...@@ -2360,7 +2345,7 @@ _rx_init(struct bna_rx *rx, struct bna *bna)
rx->stop_cbarg = NULL; rx->stop_cbarg = NULL;
} }
void static void
_rxp_add_rxqs(struct bna_rxp *rxp, _rxp_add_rxqs(struct bna_rxp *rxp,
struct bna_rxq *q0, struct bna_rxq *q0,
struct bna_rxq *q1) struct bna_rxq *q1)
...@@ -2383,7 +2368,7 @@ _rxp_add_rxqs(struct bna_rxp *rxp, ...@@ -2383,7 +2368,7 @@ _rxp_add_rxqs(struct bna_rxp *rxp,
} }
} }
void static void
_rxq_qpt_init(struct bna_rxq *rxq, _rxq_qpt_init(struct bna_rxq *rxq,
struct bna_rxp *rxp, struct bna_rxp *rxp,
u32 page_count, u32 page_count,
...@@ -2412,7 +2397,7 @@ _rxq_qpt_init(struct bna_rxq *rxq, ...@@ -2412,7 +2397,7 @@ _rxq_qpt_init(struct bna_rxq *rxq,
} }
} }
void static void
_rxp_cqpt_setup(struct bna_rxp *rxp, _rxp_cqpt_setup(struct bna_rxp *rxp,
u32 page_count, u32 page_count,
u32 page_size, u32 page_size,
...@@ -2441,13 +2426,13 @@ _rxp_cqpt_setup(struct bna_rxp *rxp, ...@@ -2441,13 +2426,13 @@ _rxp_cqpt_setup(struct bna_rxp *rxp,
} }
} }
void static void
_rx_add_rxp(struct bna_rx *rx, struct bna_rxp *rxp) _rx_add_rxp(struct bna_rx *rx, struct bna_rxp *rxp)
{ {
list_add_tail(&rxp->qe, &rx->rxp_q); list_add_tail(&rxp->qe, &rx->rxp_q);
} }
void static void
_init_rxmod_queues(struct bna_rx_mod *rx_mod) _init_rxmod_queues(struct bna_rx_mod *rx_mod)
{ {
INIT_LIST_HEAD(&rx_mod->rx_free_q); INIT_LIST_HEAD(&rx_mod->rx_free_q);
...@@ -2460,7 +2445,7 @@ _init_rxmod_queues(struct bna_rx_mod *rx_mod) ...@@ -2460,7 +2445,7 @@ _init_rxmod_queues(struct bna_rx_mod *rx_mod)
rx_mod->rxp_free_count = 0; rx_mod->rxp_free_count = 0;
} }
void static void
_rx_ctor(struct bna_rx *rx, int id) _rx_ctor(struct bna_rx *rx, int id)
{ {
bfa_q_qe_init(&rx->qe); bfa_q_qe_init(&rx->qe);
...@@ -2492,7 +2477,7 @@ bna_rx_cb_rxq_stopped_all(void *arg) ...@@ -2492,7 +2477,7 @@ bna_rx_cb_rxq_stopped_all(void *arg)
bfa_fsm_send_event(rx, RX_E_RXQ_STOPPED); bfa_fsm_send_event(rx, RX_E_RXQ_STOPPED);
} }
void static void
bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx, bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx,
enum bna_cb_status status) enum bna_cb_status status)
{ {
...@@ -2501,7 +2486,7 @@ bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx, ...@@ -2501,7 +2486,7 @@ bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx,
bfa_wc_down(&rx_mod->rx_stop_wc); bfa_wc_down(&rx_mod->rx_stop_wc);
} }
void static void
bna_rx_mod_cb_rx_stopped_all(void *arg) bna_rx_mod_cb_rx_stopped_all(void *arg)
{ {
struct bna_rx_mod *rx_mod = (struct bna_rx_mod *)arg; struct bna_rx_mod *rx_mod = (struct bna_rx_mod *)arg;
...@@ -2511,7 +2496,7 @@ bna_rx_mod_cb_rx_stopped_all(void *arg) ...@@ -2511,7 +2496,7 @@ bna_rx_mod_cb_rx_stopped_all(void *arg)
rx_mod->stop_cbfn = NULL; rx_mod->stop_cbfn = NULL;
} }
void static void
bna_rx_start(struct bna_rx *rx) bna_rx_start(struct bna_rx *rx)
{ {
rx->rx_flags |= BNA_RX_F_PORT_ENABLED; rx->rx_flags |= BNA_RX_F_PORT_ENABLED;
...@@ -2519,7 +2504,7 @@ bna_rx_start(struct bna_rx *rx) ...@@ -2519,7 +2504,7 @@ bna_rx_start(struct bna_rx *rx)
bfa_fsm_send_event(rx, RX_E_START); bfa_fsm_send_event(rx, RX_E_START);
} }
void static void
bna_rx_stop(struct bna_rx *rx) bna_rx_stop(struct bna_rx *rx)
{ {
rx->rx_flags &= ~BNA_RX_F_PORT_ENABLED; rx->rx_flags &= ~BNA_RX_F_PORT_ENABLED;
...@@ -2532,7 +2517,7 @@ bna_rx_stop(struct bna_rx *rx) ...@@ -2532,7 +2517,7 @@ bna_rx_stop(struct bna_rx *rx)
} }
} }
void static void
bna_rx_fail(struct bna_rx *rx) bna_rx_fail(struct bna_rx *rx)
{ {
/* Indicate port is not enabled, and failed */ /* Indicate port is not enabled, and failed */
...@@ -2541,28 +2526,6 @@ bna_rx_fail(struct bna_rx *rx) ...@@ -2541,28 +2526,6 @@ bna_rx_fail(struct bna_rx *rx)
bfa_fsm_send_event(rx, RX_E_FAIL); bfa_fsm_send_event(rx, RX_E_FAIL);
} }
void
bna_rx_cb_rxf_started(struct bna_rx *rx, enum bna_cb_status status)
{
bfa_fsm_send_event(rx, RX_E_RXF_STARTED);
if (rx->rxf.rxf_id < 32)
rx->bna->rx_mod.rxf_bmap[0] |= ((u32)1 << rx->rxf.rxf_id);
else
rx->bna->rx_mod.rxf_bmap[1] |= ((u32)
1 << (rx->rxf.rxf_id - 32));
}
void
bna_rx_cb_rxf_stopped(struct bna_rx *rx, enum bna_cb_status status)
{
bfa_fsm_send_event(rx, RX_E_RXF_STOPPED);
if (rx->rxf.rxf_id < 32)
rx->bna->rx_mod.rxf_bmap[0] &= ~(u32)1 << rx->rxf.rxf_id;
else
rx->bna->rx_mod.rxf_bmap[1] &= ~(u32)
1 << (rx->rxf.rxf_id - 32);
}
void void
bna_rx_mod_start(struct bna_rx_mod *rx_mod, enum bna_rx_type type) bna_rx_mod_start(struct bna_rx_mod *rx_mod, enum bna_rx_type type)
{ {
...@@ -3731,7 +3694,7 @@ bna_tx_fail(struct bna_tx *tx) ...@@ -3731,7 +3694,7 @@ bna_tx_fail(struct bna_tx *tx)
bfa_fsm_send_event(tx, TX_E_FAIL); bfa_fsm_send_event(tx, TX_E_FAIL);
} }
void static void
bna_tx_prio_changed(struct bna_tx *tx, int prio) bna_tx_prio_changed(struct bna_tx *tx, int prio)
{ {
struct bna_txq *txq; struct bna_txq *txq;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "bna.h" #include "bna.h"
#include "cna.h" #include "cna.h"
DEFINE_MUTEX(bnad_fwimg_mutex); static DEFINE_MUTEX(bnad_fwimg_mutex);
/* /*
* Module params * Module params
...@@ -46,7 +46,7 @@ MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery"); ...@@ -46,7 +46,7 @@ MODULE_PARM_DESC(bnad_ioc_auto_recover, "Enable / Disable auto recovery");
*/ */
u32 bnad_rxqs_per_cq = 2; u32 bnad_rxqs_per_cq = 2;
const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; static const u8 bnad_bcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
/* /*
* Local MACROS * Local MACROS
...@@ -687,7 +687,7 @@ bnad_enable_mbox_irq(struct bnad *bnad) ...@@ -687,7 +687,7 @@ bnad_enable_mbox_irq(struct bnad *bnad)
* Called with bnad->bna_lock held b'cos of * Called with bnad->bna_lock held b'cos of
* bnad->cfg_flags access. * bnad->cfg_flags access.
*/ */
void static void
bnad_disable_mbox_irq(struct bnad *bnad) bnad_disable_mbox_irq(struct bnad *bnad)
{ {
int irq = BNAD_GET_MBOX_IRQ(bnad); int irq = BNAD_GET_MBOX_IRQ(bnad);
...@@ -956,11 +956,6 @@ bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status, ...@@ -956,11 +956,6 @@ bnad_cb_stats_get(struct bnad *bnad, enum bna_cb_status status,
jiffies + msecs_to_jiffies(BNAD_STATS_TIMER_FREQ)); jiffies + msecs_to_jiffies(BNAD_STATS_TIMER_FREQ));
} }
void
bnad_cb_stats_clr(struct bnad *bnad)
{
}
/* Resource allocation, free functions */ /* Resource allocation, free functions */
static void static void
...@@ -1111,8 +1106,10 @@ bnad_mbox_irq_alloc(struct bnad *bnad, ...@@ -1111,8 +1106,10 @@ bnad_mbox_irq_alloc(struct bnad *bnad,
} }
spin_lock_irqsave(&bnad->bna_lock, flags); spin_lock_irqsave(&bnad->bna_lock, flags);
if (bnad->cfg_flags & BNAD_CF_MSIX) if (bnad->cfg_flags & BNAD_CF_MSIX)
disable_irq_nosync(irq); disable_irq_nosync(irq);
spin_unlock_irqrestore(&bnad->bna_lock, flags); spin_unlock_irqrestore(&bnad->bna_lock, flags);
return 0; return 0;
} }
...@@ -2243,7 +2240,6 @@ static void ...@@ -2243,7 +2240,6 @@ static void
bnad_enable_msix(struct bnad *bnad) bnad_enable_msix(struct bnad *bnad)
{ {
int i, ret; int i, ret;
u32 tot_msix_num;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&bnad->bna_lock, flags); spin_lock_irqsave(&bnad->bna_lock, flags);
...@@ -2256,18 +2252,16 @@ bnad_enable_msix(struct bnad *bnad) ...@@ -2256,18 +2252,16 @@ bnad_enable_msix(struct bnad *bnad)
if (bnad->msix_table) if (bnad->msix_table)
return; return;
tot_msix_num = bnad->msix_num + bnad->msix_diag_num;
bnad->msix_table = bnad->msix_table =
kcalloc(tot_msix_num, sizeof(struct msix_entry), GFP_KERNEL); kcalloc(bnad->msix_num, sizeof(struct msix_entry), GFP_KERNEL);
if (!bnad->msix_table) if (!bnad->msix_table)
goto intx_mode; goto intx_mode;
for (i = 0; i < tot_msix_num; i++) for (i = 0; i < bnad->msix_num; i++)
bnad->msix_table[i].entry = i; bnad->msix_table[i].entry = i;
ret = pci_enable_msix(bnad->pcidev, bnad->msix_table, tot_msix_num); ret = pci_enable_msix(bnad->pcidev, bnad->msix_table, bnad->msix_num);
if (ret > 0) { if (ret > 0) {
/* Not enough MSI-X vectors. */ /* Not enough MSI-X vectors. */
...@@ -2280,12 +2274,11 @@ bnad_enable_msix(struct bnad *bnad) ...@@ -2280,12 +2274,11 @@ bnad_enable_msix(struct bnad *bnad)
+ (bnad->num_rx + (bnad->num_rx
* bnad->num_rxp_per_rx) + * bnad->num_rxp_per_rx) +
BNAD_MAILBOX_MSIX_VECTORS; BNAD_MAILBOX_MSIX_VECTORS;
tot_msix_num = bnad->msix_num + bnad->msix_diag_num;
/* Try once more with adjusted numbers */ /* Try once more with adjusted numbers */
/* If this fails, fall back to INTx */ /* If this fails, fall back to INTx */
ret = pci_enable_msix(bnad->pcidev, bnad->msix_table, ret = pci_enable_msix(bnad->pcidev, bnad->msix_table,
tot_msix_num); bnad->msix_num);
if (ret) if (ret)
goto intx_mode; goto intx_mode;
...@@ -2298,7 +2291,6 @@ bnad_enable_msix(struct bnad *bnad) ...@@ -2298,7 +2291,6 @@ bnad_enable_msix(struct bnad *bnad)
kfree(bnad->msix_table); kfree(bnad->msix_table);
bnad->msix_table = NULL; bnad->msix_table = NULL;
bnad->msix_num = 0; bnad->msix_num = 0;
bnad->msix_diag_num = 0;
spin_lock_irqsave(&bnad->bna_lock, flags); spin_lock_irqsave(&bnad->bna_lock, flags);
bnad->cfg_flags &= ~BNAD_CF_MSIX; bnad->cfg_flags &= ~BNAD_CF_MSIX;
bnad_q_num_init(bnad); bnad_q_num_init(bnad);
...@@ -2946,7 +2938,6 @@ bnad_init(struct bnad *bnad, ...@@ -2946,7 +2938,6 @@ bnad_init(struct bnad *bnad,
bnad->msix_num = (bnad->num_tx * bnad->num_txq_per_tx) + bnad->msix_num = (bnad->num_tx * bnad->num_txq_per_tx) +
(bnad->num_rx * bnad->num_rxp_per_rx) + (bnad->num_rx * bnad->num_rxp_per_rx) +
BNAD_MAILBOX_MSIX_VECTORS; BNAD_MAILBOX_MSIX_VECTORS;
bnad->msix_diag_num = 2; /* 1 for Tx, 1 for Rx */
bnad->txq_depth = BNAD_TXQ_DEPTH; bnad->txq_depth = BNAD_TXQ_DEPTH;
bnad->rxq_depth = BNAD_RXQ_DEPTH; bnad->rxq_depth = BNAD_RXQ_DEPTH;
...@@ -3217,7 +3208,7 @@ bnad_pci_remove(struct pci_dev *pdev) ...@@ -3217,7 +3208,7 @@ bnad_pci_remove(struct pci_dev *pdev)
free_netdev(netdev); free_netdev(netdev);
} }
const struct pci_device_id bnad_pci_id_table[] = { static const struct pci_device_id bnad_pci_id_table[] = {
{ {
PCI_DEVICE(PCI_VENDOR_ID_BROCADE, PCI_DEVICE(PCI_VENDOR_ID_BROCADE,
PCI_DEVICE_ID_BROCADE_CT), PCI_DEVICE_ID_BROCADE_CT),
......
...@@ -248,7 +248,6 @@ struct bnad { ...@@ -248,7 +248,6 @@ struct bnad {
u64 mmio_len; u64 mmio_len;
u32 msix_num; u32 msix_num;
u32 msix_diag_num;
struct msix_entry *msix_table; struct msix_entry *msix_table;
struct mutex conf_mutex; struct mutex conf_mutex;
......
...@@ -22,7 +22,7 @@ const struct firmware *bfi_fw; ...@@ -22,7 +22,7 @@ const struct firmware *bfi_fw;
static u32 *bfi_image_ct_cna; static u32 *bfi_image_ct_cna;
static u32 bfi_image_ct_cna_size; static u32 bfi_image_ct_cna_size;
u32 * static u32 *
cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image, cna_read_firmware(struct pci_dev *pdev, u32 **bfi_image,
u32 *bfi_image_size, char *fw_name) u32 *bfi_image_size, char *fw_name)
{ {
......
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