linux/drivers/net/ethernet/brocade/bna/bna_tx_rx.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Linux network driver for QLogic BR-series Converged Network Adapter.
  */
/*
 * Copyright (c) 2005-2014 Brocade Communications Systems, Inc.
 * Copyright (c) 2014-2015 QLogic Corporation
 * All rights reserved
 * www.qlogic.com
 */
#include "bna.h"
#include "bfi.h"

/* IB */
static void
bna_ib_coalescing_timeo_set(struct bna_ib *ib, u8 coalescing_timeo)
{}

/* RXF */

#define bna_rxf_vlan_cfg_soft_reset(rxf)

#define bna_rxf_rss_cfg_soft_reset(rxf)

static int bna_rxf_cfg_apply(struct bna_rxf *rxf);
static void bna_rxf_cfg_reset(struct bna_rxf *rxf);
static int bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf);
static int bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf);
static int bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf);
static int bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf);
static int bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf,
					enum bna_cleanup_type cleanup);
static int bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf,
					enum bna_cleanup_type cleanup);
static int bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf,
					enum bna_cleanup_type cleanup);

bfa_fsm_state_decl(bna_rxf, stopped, 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, last_resp_wait, struct bna_rxf,
			enum bna_rxf_event);

static void
bna_rxf_sm_stopped_entry(struct bna_rxf *rxf)
{}

static void
bna_rxf_sm_stopped(struct bna_rxf *rxf, enum bna_rxf_event event)
{}

static void
bna_rxf_sm_cfg_wait_entry(struct bna_rxf *rxf)
{}

static void
bna_rxf_sm_cfg_wait(struct bna_rxf *rxf, enum bna_rxf_event event)
{}

static void
bna_rxf_sm_started_entry(struct bna_rxf *rxf)
{}

static void
bna_rxf_sm_started(struct bna_rxf *rxf, enum bna_rxf_event event)
{}

static void
bna_rxf_sm_last_resp_wait_entry(struct bna_rxf *rxf)
{}

static void
bna_rxf_sm_last_resp_wait(struct bna_rxf *rxf, enum bna_rxf_event event)
{}

static void
bna_bfi_ucast_req(struct bna_rxf *rxf, struct bna_mac *mac,
		enum bfi_enet_h2i_msgs req_type)
{}

static void
bna_bfi_mcast_add_req(struct bna_rxf *rxf, struct bna_mac *mac)
{}

static void
bna_bfi_mcast_del_req(struct bna_rxf *rxf, u16 handle)
{}

static void
bna_bfi_mcast_filter_req(struct bna_rxf *rxf, enum bna_status status)
{}

static void
bna_bfi_rx_promisc_req(struct bna_rxf *rxf, enum bna_status status)
{}

static void
bna_bfi_rx_vlan_filter_set(struct bna_rxf *rxf, u8 block_idx)
{}

static void
bna_bfi_vlan_strip_enable(struct bna_rxf *rxf)
{}

static void
bna_bfi_rit_cfg(struct bna_rxf *rxf)
{}

static void
bna_bfi_rss_cfg(struct bna_rxf *rxf)
{}

static void
bna_bfi_rss_enable(struct bna_rxf *rxf)
{}

/* This function gets the multicast MAC that has already been added to CAM */
static struct bna_mac *
bna_rxf_mcmac_get(struct bna_rxf *rxf, const u8 *mac_addr)
{}

static struct bna_mcam_handle *
bna_rxf_mchandle_get(struct bna_rxf *rxf, int handle)
{}

static void
bna_rxf_mchandle_attach(struct bna_rxf *rxf, u8 *mac_addr, int handle)
{}

static int
bna_rxf_mcast_del(struct bna_rxf *rxf, struct bna_mac *mac,
		enum bna_cleanup_type cleanup)
{}

static int
bna_rxf_mcast_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_vlan_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_mcast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup)
{}

static int
bna_rxf_rss_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_cfg_apply(struct bna_rxf *rxf)
{}

static void
bna_rxf_cfg_reset(struct bna_rxf *rxf)
{}

static void
bna_rit_init(struct bna_rxf *rxf, int rit_size)
{}

void
bna_bfi_rxf_cfg_rsp(struct bna_rxf *rxf, struct bfi_msgq_mhdr *msghdr)
{}

void
bna_bfi_rxf_ucast_set_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)
{}

static void
bna_rxf_init(struct bna_rxf *rxf,
		struct bna_rx *rx,
		struct bna_rx_config *q_config,
		struct bna_res_info *res_info)
{}

static void
bna_rxf_uninit(struct bna_rxf *rxf)
{}

static void
bna_rx_cb_rxf_started(struct bna_rx *rx)
{}

static void
bna_rxf_start(struct bna_rxf *rxf)
{}

static void
bna_rx_cb_rxf_stopped(struct bna_rx *rx)
{}

static void
bna_rxf_stop(struct bna_rxf *rxf)
{}

static void
bna_rxf_fail(struct bna_rxf *rxf)
{}

enum bna_cb_status
bna_rx_ucast_set(struct bna_rx *rx, const u8 *ucmac)
{}

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

enum bna_cb_status
bna_rx_ucast_listset(struct bna_rx *rx, int count, const u8 *uclist)
{}

enum bna_cb_status
bna_rx_mcast_listset(struct bna_rx *rx, int count, const u8 *mclist)
{}

void
bna_rx_mcast_delall(struct bna_rx *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)
{}

static int
bna_rxf_ucast_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_ucast_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup)
{}

static int
bna_rxf_promisc_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_promisc_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup)
{}

static int
bna_rxf_allmulti_cfg_apply(struct bna_rxf *rxf)
{}

static int
bna_rxf_allmulti_cfg_reset(struct bna_rxf *rxf, enum bna_cleanup_type cleanup)
{}

static int
bna_rxf_promisc_enable(struct bna_rxf *rxf)
{}

static int
bna_rxf_promisc_disable(struct bna_rxf *rxf)
{}

static int
bna_rxf_allmulti_enable(struct bna_rxf *rxf)
{}

static int
bna_rxf_allmulti_disable(struct bna_rxf *rxf)
{}

static int
bna_rxf_vlan_strip_cfg_apply(struct bna_rxf *rxf)
{}

/* RX */

#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)

static void bna_bfi_rx_enet_start(struct bna_rx *rx);
static void bna_rx_enet_stop(struct bna_rx *rx);
static void bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx);

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, start_stop_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);

static void bna_rx_sm_stopped_entry(struct bna_rx *rx)
{}

static void bna_rx_sm_stopped(struct bna_rx *rx,
				enum bna_rx_event event)
{}

static void bna_rx_sm_start_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_stop_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_stop_wait(struct bna_rx *rx, enum bna_rx_event event)
{}

static void bna_rx_sm_start_wait(struct bna_rx *rx,
				enum bna_rx_event event)
{}

static void bna_rx_sm_rxf_start_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_rxf_stop_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_rxf_stop_wait(struct bna_rx *rx, enum bna_rx_event event)
{}

static void
bna_rx_sm_start_stop_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_start_stop_wait(struct bna_rx *rx, enum bna_rx_event event)
{}

static void
bna_rx_sm_started_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_started(struct bna_rx *rx, enum bna_rx_event event)
{}

static void bna_rx_sm_rxf_start_wait(struct bna_rx *rx,
				enum bna_rx_event event)
{}

static void
bna_rx_sm_cleanup_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_cleanup_wait(struct bna_rx *rx, enum bna_rx_event event)
{}

static void
bna_rx_sm_failed_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_failed(struct bna_rx *rx, enum bna_rx_event event)
{}

static void
bna_rx_sm_quiesce_wait_entry(struct bna_rx *rx)
{}

static void
bna_rx_sm_quiesce_wait(struct bna_rx *rx, enum bna_rx_event event)
{}

static void
bna_bfi_rx_enet_start(struct bna_rx *rx)
{}

static void
bna_bfi_rx_enet_stop(struct bna_rx *rx)
{}

static void
bna_rx_enet_stop(struct bna_rx *rx)
{}

static int
bna_rx_res_check(struct bna_rx_mod *rx_mod, struct bna_rx_config *rx_cfg)
{}

static struct bna_rxq *
bna_rxq_get(struct bna_rx_mod *rx_mod)
{}

static void
bna_rxq_put(struct bna_rx_mod *rx_mod, struct bna_rxq *rxq)
{}

static struct bna_rxp *
bna_rxp_get(struct bna_rx_mod *rx_mod)
{}

static void
bna_rxp_put(struct bna_rx_mod *rx_mod, struct bna_rxp *rxp)
{}

static struct bna_rx *
bna_rx_get(struct bna_rx_mod *rx_mod, enum bna_rx_type type)
{}

static void
bna_rx_put(struct bna_rx_mod *rx_mod, struct bna_rx *rx)
{}

static void
bna_rxp_add_rxqs(struct bna_rxp *rxp, struct bna_rxq *q0,
		struct bna_rxq *q1)
{}

static void
bna_rxq_qpt_setup(struct bna_rxq *rxq,
		struct bna_rxp *rxp,
		u32 page_count,
		u32 page_size,
		struct bna_mem_descr *qpt_mem,
		struct bna_mem_descr *swqpt_mem,
		struct bna_mem_descr *page_mem)
{}

static void
bna_rxp_cqpt_setup(struct bna_rxp *rxp,
		u32 page_count,
		u32 page_size,
		struct bna_mem_descr *qpt_mem,
		struct bna_mem_descr *swqpt_mem,
		struct bna_mem_descr *page_mem)
{}

static void
bna_rx_mod_cb_rx_stopped(void *arg, struct bna_rx *rx)
{}

static void
bna_rx_mod_cb_rx_stopped_all(void *arg)
{}

static void
bna_rx_start(struct bna_rx *rx)
{}

static void
bna_rx_stop(struct bna_rx *rx)
{}

static void
bna_rx_fail(struct bna_rx *rx)
{}

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_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)
{}

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)
{}

void
bna_rx_vlan_strip_enable(struct bna_rx *rx)
{}

void
bna_rx_vlan_strip_disable(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
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)
{}

const u32 bna_napi_dim_vector[BNA_LOAD_T_MAX][BNA_BIAS_T_MAX] =;

/* TX */

#define call_tx_stop_cbfn(tx)

static void bna_tx_mod_cb_tx_stopped(void *tx_mod, struct bna_tx *tx);
static void bna_bfi_tx_enet_start(struct bna_tx *tx);
static void bna_tx_enet_stop(struct bna_tx *tx);

enum bna_tx_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);

static void
bna_tx_sm_stopped_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_stopped(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_start_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_start_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_started_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_started(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_stop_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_stop_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_cleanup_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_cleanup_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_prio_stop_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_prio_stop_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_prio_cleanup_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_prio_cleanup_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_failed_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_failed(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_tx_sm_quiesce_wait_entry(struct bna_tx *tx)
{}

static void
bna_tx_sm_quiesce_wait(struct bna_tx *tx, enum bna_tx_event event)
{}

static void
bna_bfi_tx_enet_start(struct bna_tx *tx)
{}

static void
bna_bfi_tx_enet_stop(struct bna_tx *tx)
{}

static void
bna_tx_enet_stop(struct bna_tx *tx)
{}

static void
bna_txq_qpt_setup(struct bna_txq *txq, int page_count, int page_size,
		struct bna_mem_descr *qpt_mem,
		struct bna_mem_descr *swqpt_mem,
		struct bna_mem_descr *page_mem)
{}

static struct bna_tx *
bna_tx_get(struct bna_tx_mod *tx_mod, enum bna_tx_type type)
{}

static void
bna_tx_free(struct bna_tx *tx)
{}

static void
bna_tx_start(struct bna_tx *tx)
{}

static void
bna_tx_stop(struct bna_tx *tx)
{}

static void
bna_tx_fail(struct bna_tx *tx)
{}

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_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)
{}

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)
{}

static void
bna_tx_mod_cb_tx_stopped(void *arg, struct bna_tx *tx)
{}

static void
bna_tx_mod_cb_tx_stopped_all(void *arg)
{}

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)
{}