Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions | Variables
bna_tx_rx.c File Reference
#include "bna.h"
#include "bfi.h"

Go to the source code of this file.

Macros

#define bna_rxf_vlan_cfg_soft_reset(rxf)
 
#define bna_rxf_rss_cfg_soft_reset(rxf)
 
#define BNA_GET_RXQS(qcfg)
 
#define SIZE_TO_PAGES(size)
 
#define call_rx_stop_cbfn(rx)
 
#define call_rx_stall_cbfn(rx)
 
#define bfi_enet_datapath_q_init(bfi_q, bna_qpt)
 
#define call_tx_stop_cbfn(tx)
 
#define call_tx_prio_change_cbfn(tx)
 

Enumerations

enum  bna_tx_event {
  TX_E_START = 1, TX_E_STOP = 2, TX_E_FAIL = 3, TX_E_STARTED = 4,
  TX_E_STOPPED = 5, TX_E_PRIO_CHANGE = 6, TX_E_CLEANUP_DONE = 7, TX_E_BW_UPDATE = 8
}
 

Functions

 bfa_fsm_state_decl (bna_rxf, stopped, struct bna_rxf, enum bna_rxf_event)
 
 bfa_fsm_state_decl (bna_rxf, paused, struct bna_rxf, enum bna_rxf_event)
 
 bfa_fsm_state_decl (bna_rxf, cfg_wait, struct bna_rxf, enum bna_rxf_event)
 
 bfa_fsm_state_decl (bna_rxf, started, struct bna_rxf, enum bna_rxf_event)
 
 bfa_fsm_state_decl (bna_rxf, fltr_clr_wait, struct bna_rxf, enum bna_rxf_event)
 
 bfa_fsm_state_decl (bna_rxf, last_resp_wait, struct bna_rxf, enum bna_rxf_event)
 
void bna_bfi_rxf_cfg_rsp (struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr)
 
void bna_bfi_rxf_mcast_add_rsp (struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr)
 
enum bna_cb_status bna_rx_ucast_set (struct bna_rx *rx, u8 *ucmac, void(*cbfn)(struct bnad *, struct bna_rx *))
 
enum bna_cb_status bna_rx_mcast_add (struct bna_rx *rx, u8 *addr, void(*cbfn)(struct bnad *, struct bna_rx *))
 
enum bna_cb_status bna_rx_mcast_listset (struct bna_rx *rx, int count, u8 *mclist, void(*cbfn)(struct bnad *, struct bna_rx *))
 
void bna_rx_vlan_add (struct bna_rx *rx, int vlan_id)
 
void bna_rx_vlan_del (struct bna_rx *rx, int vlan_id)
 
 bfa_fsm_state_decl (bna_rx, stopped, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, start_wait, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, rxf_start_wait, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, started, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, rxf_stop_wait, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, stop_wait, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, cleanup_wait, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, failed, struct bna_rx, enum bna_rx_event)
 
 bfa_fsm_state_decl (bna_rx, quiesce_wait, struct bna_rx, enum bna_rx_event)
 
void bna_rx_sm_stop_wait_entry (struct bna_rx *rx)
 
void bna_rx_sm_rxf_stop_wait_entry (struct bna_rx *rx)
 
void bna_rx_sm_started_entry (struct bna_rx *rx)
 
void bna_rx_sm_cleanup_wait_entry (struct bna_rx *rx)
 
void bna_rx_sm_cleanup_wait (struct bna_rx *rx, enum bna_rx_event event)
 
void bna_rx_mod_start (struct bna_rx_mod *rx_mod, enum bna_rx_type type)
 
void bna_rx_mod_stop (struct bna_rx_mod *rx_mod, enum bna_rx_type type)
 
void bna_rx_mod_fail (struct bna_rx_mod *rx_mod)
 
void bna_rx_mod_init (struct bna_rx_mod *rx_mod, struct bna *bna, struct bna_res_info *res_info)
 
void bna_rx_mod_uninit (struct bna_rx_mod *rx_mod)
 
void bna_bfi_rx_enet_start_rsp (struct bna_rx *rx, struct bfi_msgq_mhdr *msghdr)
 
void bna_bfi_rx_enet_stop_rsp (struct bna_rx *rx, struct bfi_msgq_mhdr *msghdr)
 
void bna_rx_res_req (struct bna_rx_config *q_cfg, struct bna_res_info *res_info)
 
struct bna_rxbna_rx_create (struct bna *bna, struct bnad *bnad, struct bna_rx_config *rx_cfg, const struct bna_rx_event_cbfn *rx_cbfn, struct bna_res_info *res_info, void *priv)
 
void bna_rx_destroy (struct bna_rx *rx)
 
void bna_rx_enable (struct bna_rx *rx)
 
void bna_rx_disable (struct bna_rx *rx, enum bna_cleanup_type type, void(*cbfn)(void *, struct bna_rx *))
 
void bna_rx_cleanup_complete (struct bna_rx *rx)
 
enum bna_cb_status bna_rx_mode_set (struct bna_rx *rx, enum bna_rxmode new_mode, enum bna_rxmode bitmask, void(*cbfn)(struct bnad *, struct bna_rx *))
 
void bna_rx_vlanfilter_enable (struct bna_rx *rx)
 
void bna_rx_coalescing_timeo_set (struct bna_rx *rx, int coalescing_timeo)
 
void bna_rx_dim_reconfig (struct bna *bna, const u32 vector[][BNA_BIAS_T_MAX])
 
void bna_rx_dim_update (struct bna_ccb *ccb)
 
 bfa_fsm_state_decl (bna_tx, stopped, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, start_wait, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, started, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, stop_wait, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, cleanup_wait, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, prio_stop_wait, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, prio_cleanup_wait, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, failed, struct bna_tx, enum bna_tx_event)
 
 bfa_fsm_state_decl (bna_tx, quiesce_wait, struct bna_tx, enum bna_tx_event)
 
void bna_bfi_tx_enet_start_rsp (struct bna_tx *tx, struct bfi_msgq_mhdr *msghdr)
 
void bna_bfi_tx_enet_stop_rsp (struct bna_tx *tx, struct bfi_msgq_mhdr *msghdr)
 
void bna_bfi_bw_update_aen (struct bna_tx_mod *tx_mod)
 
void bna_tx_res_req (int num_txq, int txq_depth, struct bna_res_info *res_info)
 
struct bna_txbna_tx_create (struct bna *bna, struct bnad *bnad, struct bna_tx_config *tx_cfg, const struct bna_tx_event_cbfn *tx_cbfn, struct bna_res_info *res_info, void *priv)
 
void bna_tx_destroy (struct bna_tx *tx)
 
void bna_tx_enable (struct bna_tx *tx)
 
void bna_tx_disable (struct bna_tx *tx, enum bna_cleanup_type type, void(*cbfn)(void *, struct bna_tx *))
 
void bna_tx_cleanup_complete (struct bna_tx *tx)
 
void bna_tx_mod_init (struct bna_tx_mod *tx_mod, struct bna *bna, struct bna_res_info *res_info)
 
void bna_tx_mod_uninit (struct bna_tx_mod *tx_mod)
 
void bna_tx_mod_start (struct bna_tx_mod *tx_mod, enum bna_tx_type type)
 
void bna_tx_mod_stop (struct bna_tx_mod *tx_mod, enum bna_tx_type type)
 
void bna_tx_mod_fail (struct bna_tx_mod *tx_mod)
 
void bna_tx_coalescing_timeo_set (struct bna_tx *tx, int coalescing_timeo)
 

Variables

const u32 bna_napi_dim_vector [BNA_LOAD_T_MAX][BNA_BIAS_T_MAX]
 

Macro Definition Documentation

#define bfi_enet_datapath_q_init (   bfi_q,
  bna_qpt 
)
Value:
do { \
struct bna_dma_addr cur_q_addr = \
*((struct bna_dma_addr *)((bna_qpt)->kv_qpt_ptr)); \
(bfi_q)->pg_tbl.a32.addr_lo = (bna_qpt)->hw_qpt_ptr.lsb; \
(bfi_q)->pg_tbl.a32.addr_hi = (bna_qpt)->hw_qpt_ptr.msb; \
(bfi_q)->first_entry.a32.addr_lo = cur_q_addr.lsb; \
(bfi_q)->first_entry.a32.addr_hi = cur_q_addr.msb; \
(bfi_q)->pages = htons((u16)(bna_qpt)->page_count); \
(bfi_q)->page_sz = htons((u16)(bna_qpt)->page_size);\
} while (0)

Definition at line 1338 of file bna_tx_rx.c.

#define BNA_GET_RXQS (   qcfg)
Value:
(((qcfg)->rxp_type == BNA_RXP_SINGLE) ? \
(qcfg)->num_paths : ((qcfg)->num_paths * 2))

Definition at line 1313 of file bna_tx_rx.c.

#define bna_rxf_rss_cfg_soft_reset (   rxf)
Value:
do { \
if ((rxf)->rss_status == BNA_STATUS_T_ENABLED) \
(rxf)->rss_pending = (BNA_RSS_F_RIT_PENDING | \
} while (0)

Definition at line 38 of file bna_tx_rx.c.

#define bna_rxf_vlan_cfg_soft_reset (   rxf)
Value:
do { \
(rxf)->vlan_pending_bitmask = (u8)BFI_VLAN_BMASK_ALL; \
(rxf)->vlan_strip_pending = true; \
} while (0)

Definition at line 32 of file bna_tx_rx.c.

#define call_rx_stall_cbfn (   rx)
Value:
do { \
if ((rx)->rx_stall_cbfn) \
(rx)->rx_stall_cbfn((rx)->bna->bnad, (rx)); \
} while (0)

Definition at line 1332 of file bna_tx_rx.c.

#define call_rx_stop_cbfn (   rx)
Value:
do { \
if ((rx)->stop_cbfn) { \
void (*cbfn)(void *, struct bna_rx *); \
void *cbarg; \
cbfn = (rx)->stop_cbfn; \
cbarg = (rx)->stop_cbarg; \
(rx)->stop_cbfn = NULL; \
(rx)->stop_cbarg = NULL; \
cbfn(cbarg, rx); \
} \
} while (0)

Definition at line 1319 of file bna_tx_rx.c.

#define call_tx_prio_change_cbfn (   tx)
Value:
do { \
if ((tx)->prio_change_cbfn) { \
void (*cbfn)(struct bnad *, struct bna_tx *); \
cbfn = (tx)->prio_change_cbfn; \
cbfn((tx)->bna->bnad, (tx)); \
} \
} while (0)

Definition at line 2803 of file bna_tx_rx.c.

#define call_tx_stop_cbfn (   tx)
Value:
do { \
if ((tx)->stop_cbfn) { \
void (*cbfn)(void *, struct bna_tx *); \
void *cbarg; \
cbfn = (tx)->stop_cbfn; \
cbarg = (tx)->stop_cbarg; \
(tx)->stop_cbfn = NULL; \
(tx)->stop_cbarg = NULL; \
cbfn(cbarg, (tx)); \
} \
} while (0)

Definition at line 2790 of file bna_tx_rx.c.

#define SIZE_TO_PAGES (   size)
Value:
(((size) >> PAGE_SHIFT) + ((((size) &\
(PAGE_SIZE - 1)) + (PAGE_SIZE - 1)) >> PAGE_SHIFT))

Definition at line 1316 of file bna_tx_rx.c.

Enumeration Type Documentation

Enumerator:
TX_E_START 
TX_E_STOP 
TX_E_FAIL 
TX_E_STARTED 
TX_E_STOPPED 
TX_E_PRIO_CHANGE 
TX_E_CLEANUP_DONE 
TX_E_BW_UPDATE 

Definition at line 2817 of file bna_tx_rx.c.

Function Documentation

bfa_fsm_state_decl ( bna_rxf  ,
stopped  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rxf  ,
paused  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rxf  ,
cfg_wait  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rxf  ,
started  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rxf  ,
fltr_clr_wait  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rxf  ,
last_resp_wait  ,
struct bna_rxf  ,
enum  bna_rxf_event 
)
bfa_fsm_state_decl ( bna_rx  ,
stopped  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
start_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
rxf_start_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
started  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
rxf_stop_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
stop_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
cleanup_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
failed  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_rx  ,
quiesce_wait  ,
struct bna_rx  ,
enum  bna_rx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
stopped  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
start_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
started  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
stop_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
cleanup_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
prio_stop_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
prio_cleanup_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
failed  ,
struct bna_tx  ,
enum  bna_tx_event 
)
bfa_fsm_state_decl ( bna_tx  ,
quiesce_wait  ,
struct bna_tx  ,
enum  bna_tx_event 
)
void bna_bfi_bw_update_aen ( struct bna_tx_mod tx_mod)

Definition at line 3390 of file bna_tx_rx.c.

void bna_bfi_rx_enet_start_rsp ( struct bna_rx rx,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 2142 of file bna_tx_rx.c.

void bna_bfi_rx_enet_stop_rsp ( struct bna_rx rx,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 2189 of file bna_tx_rx.c.

void bna_bfi_rxf_cfg_rsp ( struct bna_rxf rxf,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 708 of file bna_tx_rx.c.

void bna_bfi_rxf_mcast_add_rsp ( struct bna_rxf rxf,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 714 of file bna_tx_rx.c.

void bna_bfi_tx_enet_start_rsp ( struct bna_tx tx,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 3350 of file bna_tx_rx.c.

void bna_bfi_tx_enet_stop_rsp ( struct bna_tx tx,
struct bfi_msgq_mhdr msghdr 
)

Definition at line 3384 of file bna_tx_rx.c.

void bna_rx_cleanup_complete ( struct bna_rx rx)

Definition at line 2616 of file bna_tx_rx.c.

void bna_rx_coalescing_timeo_set ( struct bna_rx rx,
int  coalescing_timeo 
)

Definition at line 2704 of file bna_tx_rx.c.

struct bna_rx* bna_rx_create ( struct bna bna,
struct bnad bnad,
struct bna_rx_config rx_cfg,
const struct bna_rx_event_cbfn rx_cbfn,
struct bna_res_info res_info,
void priv 
)
read

Definition at line 2310 of file bna_tx_rx.c.

void bna_rx_destroy ( struct bna_rx rx)

Definition at line 2534 of file bna_tx_rx.c.

void bna_rx_dim_reconfig ( struct bna bna,
const u32  vector[][BNA_BIAS_T_MAX] 
)

Definition at line 2717 of file bna_tx_rx.c.

void bna_rx_dim_update ( struct bna_ccb ccb)

Definition at line 2727 of file bna_tx_rx.c.

void bna_rx_disable ( struct bna_rx rx,
enum bna_cleanup_type  type,
void(*)(void *, struct bna_rx *)  cbfn 
)

Definition at line 2599 of file bna_tx_rx.c.

void bna_rx_enable ( struct bna_rx rx)

Definition at line 2588 of file bna_tx_rx.c.

enum bna_cb_status bna_rx_mcast_add ( struct bna_rx rx,
u8 addr,
void(*)(struct bnad *, struct bna_rx *)  cbfn 
)

Definition at line 874 of file bna_tx_rx.c.

enum bna_cb_status bna_rx_mcast_listset ( struct bna_rx rx,
int  count,
u8 mclist,
void(*)(struct bnad *, struct bna_rx *)  cbfn 
)

Definition at line 904 of file bna_tx_rx.c.

void bna_rx_mod_fail ( struct bna_rx_mod rx_mod)

Definition at line 2047 of file bna_tx_rx.c.

void bna_rx_mod_init ( struct bna_rx_mod rx_mod,
struct bna bna,
struct bna_res_info res_info 
)

Definition at line 2061 of file bna_tx_rx.c.

void bna_rx_mod_start ( struct bna_rx_mod rx_mod,
enum bna_rx_type  type 
)

Definition at line 2006 of file bna_tx_rx.c.

void bna_rx_mod_stop ( struct bna_rx_mod rx_mod,
enum bna_rx_type  type 
)

Definition at line 2023 of file bna_tx_rx.c.

void bna_rx_mod_uninit ( struct bna_rx_mod rx_mod)

Definition at line 2121 of file bna_tx_rx.c.

enum bna_cb_status bna_rx_mode_set ( struct bna_rx rx,
enum bna_rxmode  new_mode,
enum bna_rxmode  bitmask,
void(*)(struct bnad *, struct bna_rx *)  cbfn 
)

Definition at line 2622 of file bna_tx_rx.c.

void bna_rx_res_req ( struct bna_rx_config q_cfg,
struct bna_res_info res_info 
)

Definition at line 2195 of file bna_tx_rx.c.

void bna_rx_sm_cleanup_wait ( struct bna_rx rx,
enum bna_rx_event  event 
)

Definition at line 1562 of file bna_tx_rx.c.

void bna_rx_sm_cleanup_wait_entry ( struct bna_rx rx)

Definition at line 1557 of file bna_tx_rx.c.

void bna_rx_sm_rxf_stop_wait_entry ( struct bna_rx rx)

Definition at line 1459 of file bna_tx_rx.c.

void bna_rx_sm_started_entry ( struct bna_rx rx)

Definition at line 1492 of file bna_tx_rx.c.

void bna_rx_sm_stop_wait_entry ( struct bna_rx rx)

Definition at line 1406 of file bna_tx_rx.c.

enum bna_cb_status bna_rx_ucast_set ( struct bna_rx rx,
u8 ucmac,
void(*)(struct bnad *, struct bna_rx *)  cbfn 
)

Definition at line 850 of file bna_tx_rx.c.

void bna_rx_vlan_add ( struct bna_rx rx,
int  vlan_id 
)

Definition at line 969 of file bna_tx_rx.c.

void bna_rx_vlan_del ( struct bna_rx rx,
int  vlan_id 
)

Definition at line 984 of file bna_tx_rx.c.

void bna_rx_vlanfilter_enable ( struct bna_rx rx)

Definition at line 2692 of file bna_tx_rx.c.

void bna_tx_cleanup_complete ( struct bna_tx tx)

Definition at line 3652 of file bna_tx_rx.c.

void bna_tx_coalescing_timeo_set ( struct bna_tx tx,
int  coalescing_timeo 
)

Definition at line 3782 of file bna_tx_rx.c.

struct bna_tx* bna_tx_create ( struct bna bna,
struct bnad bnad,
struct bna_tx_config tx_cfg,
const struct bna_tx_event_cbfn tx_cbfn,
struct bna_res_info res_info,
void priv 
)
read

Get resources

Definition at line 3449 of file bna_tx_rx.c.

void bna_tx_destroy ( struct bna_tx tx)

Definition at line 3607 of file bna_tx_rx.c.

void bna_tx_disable ( struct bna_tx tx,
enum bna_cleanup_type  type,
void(*)(void *, struct bna_tx *)  cbfn 
)

Definition at line 3635 of file bna_tx_rx.c.

void bna_tx_enable ( struct bna_tx tx)

Definition at line 3623 of file bna_tx_rx.c.

void bna_tx_mod_fail ( struct bna_tx_mod tx_mod)

Definition at line 3767 of file bna_tx_rx.c.

void bna_tx_mod_init ( struct bna_tx_mod tx_mod,
struct bna bna,
struct bna_res_info res_info 
)

Definition at line 3676 of file bna_tx_rx.c.

void bna_tx_mod_start ( struct bna_tx_mod tx_mod,
enum bna_tx_type  type 
)

Definition at line 3726 of file bna_tx_rx.c.

void bna_tx_mod_stop ( struct bna_tx_mod tx_mod,
enum bna_tx_type  type 
)

Definition at line 3743 of file bna_tx_rx.c.

void bna_tx_mod_uninit ( struct bna_tx_mod tx_mod)

Definition at line 3709 of file bna_tx_rx.c.

void bna_tx_res_req ( int  num_txq,
int  txq_depth,
struct bna_res_info res_info 
)

Definition at line 3402 of file bna_tx_rx.c.

Variable Documentation

const u32 bna_napi_dim_vector[BNA_LOAD_T_MAX][BNA_BIAS_T_MAX]
Initial value:
= {
{12, 12},
{6, 10},
{5, 10},
{4, 8},
{3, 6},
{3, 6},
{2, 4},
{1, 2},
}

Definition at line 2777 of file bna_tx_rx.c.