#include "bnx2x.h"
#include "bnx2x_init.h"
#include "bnx2x_cmn.h"
#include "bnx2x_sp.h"
#include <linux/crc32.h>
#include <linux/if_vlan.h>
static int bnx2x_vf_op_prep(struct bnx2x *bp, int vfidx,
struct bnx2x_virtf **vf,
struct pf_vf_bulletin_content **bulletin,
bool test_queue);
static void storm_memset_vf_to_pf(struct bnx2x *bp, u16 abs_fid,
u16 pf_id)
{ … }
static void storm_memset_func_en(struct bnx2x *bp, u16 abs_fid,
u8 enable)
{ … }
int bnx2x_vf_idx_by_abs_fid(struct bnx2x *bp, u16 abs_vfid)
{ … }
static
struct bnx2x_virtf *bnx2x_vf_by_abs_fid(struct bnx2x *bp, u16 abs_vfid)
{ … }
static void bnx2x_vf_igu_ack_sb(struct bnx2x *bp, struct bnx2x_virtf *vf,
u8 igu_sb_id, u8 segment, u16 index, u8 op,
u8 update)
{ … }
static bool bnx2x_validate_vf_sp_objs(struct bnx2x *bp,
struct bnx2x_virtf *vf,
bool print_err)
{ … }
void bnx2x_vfop_qctor_dump_tx(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct bnx2x_queue_init_params *init_params,
struct bnx2x_queue_setup_params *setup_params,
u16 q_idx, u16 sb_idx)
{ … }
void bnx2x_vfop_qctor_dump_rx(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct bnx2x_queue_init_params *init_params,
struct bnx2x_queue_setup_params *setup_params,
u16 q_idx, u16 sb_idx)
{ … }
void bnx2x_vfop_qctor_prep(struct bnx2x *bp,
struct bnx2x_virtf *vf,
struct bnx2x_vf_queue *q,
struct bnx2x_vf_queue_construct_params *p,
unsigned long q_type)
{ … }
static int bnx2x_vf_queue_create(struct bnx2x *bp,
struct bnx2x_virtf *vf, int qid,
struct bnx2x_vf_queue_construct_params *qctor)
{ … }
static int bnx2x_vf_queue_destroy(struct bnx2x *bp, struct bnx2x_virtf *vf,
int qid)
{ … }
static void
bnx2x_vf_set_igu_info(struct bnx2x *bp, u8 igu_sb_id, u8 abs_vfid)
{ … }
static int bnx2x_vf_vlan_mac_clear(struct bnx2x *bp, struct bnx2x_virtf *vf,
int qid, bool drv_only, int type)
{ … }
static int bnx2x_vf_mac_vlan_config(struct bnx2x *bp,
struct bnx2x_virtf *vf, int qid,
struct bnx2x_vf_mac_vlan_filter *filter,
bool drv_only)
{ … }
int bnx2x_vf_mac_vlan_config_list(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct bnx2x_vf_mac_vlan_filters *filters,
int qid, bool drv_only)
{ … }
int bnx2x_vf_queue_setup(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid,
struct bnx2x_vf_queue_construct_params *qctor)
{ … }
static int bnx2x_vf_queue_flr(struct bnx2x *bp, struct bnx2x_virtf *vf,
int qid)
{ … }
int bnx2x_vf_mcast(struct bnx2x *bp, struct bnx2x_virtf *vf,
bnx2x_mac_addr_t *mcasts, int mc_num, bool drv_only)
{ … }
static void bnx2x_vf_prep_rx_mode(struct bnx2x *bp, u8 qid,
struct bnx2x_rx_mode_ramrod_params *ramrod,
struct bnx2x_virtf *vf,
unsigned long accept_flags)
{ … }
int bnx2x_vf_rxmode(struct bnx2x *bp, struct bnx2x_virtf *vf,
int qid, unsigned long accept_flags)
{ … }
int bnx2x_vf_queue_teardown(struct bnx2x *bp, struct bnx2x_virtf *vf, int qid)
{ … }
static void bnx2x_vf_enable_internal(struct bnx2x *bp, u8 enable)
{ … }
static void bnx2x_vf_semi_clear_err(struct bnx2x *bp, u8 abs_vfid)
{ … }
static void bnx2x_vf_pglue_clear_err(struct bnx2x *bp, u8 abs_vfid)
{ … }
static void bnx2x_vf_igu_reset(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
void bnx2x_vf_enable_access(struct bnx2x *bp, u8 abs_vfid)
{ … }
static void bnx2x_vf_enable_traffic(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static u8 bnx2x_vf_is_pcie_pending(struct bnx2x *bp, u8 abs_vfid)
{ … }
int bnx2x_vf_flr_clnup_epilog(struct bnx2x *bp, u8 abs_vfid)
{ … }
static void
bnx2x_iov_static_resc(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_free_resc(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_flr_clnup_hw(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_flr(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_flr_clnup(struct bnx2x *bp)
{ … }
void bnx2x_vf_handle_flr_event(struct bnx2x *bp)
{ … }
void bnx2x_iov_init_dq(struct bnx2x *bp)
{ … }
void bnx2x_iov_init_dmae(struct bnx2x *bp)
{ … }
static int bnx2x_vf_domain(struct bnx2x *bp, int vfid)
{ … }
static int bnx2x_vf_bus(struct bnx2x *bp, int vfid)
{ … }
static int bnx2x_vf_devfn(struct bnx2x *bp, int vfid)
{ … }
static void bnx2x_vf_set_bars(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static int
bnx2x_get_vf_igu_cam_info(struct bnx2x *bp)
{ … }
static void __bnx2x_iov_free_vfdb(struct bnx2x *bp)
{ … }
static int bnx2x_sriov_pci_cfg_info(struct bnx2x *bp, struct bnx2x_sriov *iov)
{ … }
static int bnx2x_sriov_info(struct bnx2x *bp, struct bnx2x_sriov *iov)
{ … }
int bnx2x_iov_init_one(struct bnx2x *bp, int int_mode_param,
int num_vfs_param)
{ … }
void bnx2x_iov_remove_one(struct bnx2x *bp)
{ … }
void bnx2x_iov_free_mem(struct bnx2x *bp)
{ … }
int bnx2x_iov_alloc_mem(struct bnx2x *bp)
{ … }
static void bnx2x_vfq_init(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct bnx2x_vf_queue *q)
{ … }
static int bnx2x_max_speed_cap(struct bnx2x *bp)
{ … }
int bnx2x_iov_link_update_vf(struct bnx2x *bp, int idx)
{ … }
int bnx2x_set_vf_link_state(struct net_device *dev, int idx, int link_state)
{ … }
void bnx2x_iov_link_update(struct bnx2x *bp)
{ … }
int bnx2x_iov_nic_init(struct bnx2x *bp)
{ … }
int bnx2x_iov_chip_cleanup(struct bnx2x *bp)
{ … }
int bnx2x_iov_init_ilt(struct bnx2x *bp, u16 line)
{ … }
static u8 bnx2x_iov_is_vf_cid(struct bnx2x *bp, u16 cid)
{ … }
static
void bnx2x_vf_handle_classification_eqe(struct bnx2x *bp,
struct bnx2x_vf_queue *vfq,
union event_ring_elem *elem)
{ … }
static
void bnx2x_vf_handle_mcast_eqe(struct bnx2x *bp,
struct bnx2x_virtf *vf)
{ … }
static
void bnx2x_vf_handle_filters_eqe(struct bnx2x *bp,
struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_handle_rss_update_eqe(struct bnx2x *bp,
struct bnx2x_virtf *vf)
{ … }
int bnx2x_iov_eq_sp_event(struct bnx2x *bp, union event_ring_elem *elem)
{ … }
static struct bnx2x_virtf *bnx2x_vf_by_cid(struct bnx2x *bp, int vf_cid)
{ … }
void bnx2x_iov_set_queue_sp_obj(struct bnx2x *bp, int vf_cid,
struct bnx2x_queue_sp_obj **q_obj)
{ … }
void bnx2x_iov_adjust_stats_req(struct bnx2x *bp)
{ … }
static void bnx2x_vf_qtbl_set_q(struct bnx2x *bp, u8 abs_vfid, u8 qid,
u8 enable)
{ … }
static void bnx2x_vf_clr_qtbl(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static void bnx2x_vf_igu_disable(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
u8 bnx2x_vf_max_queue_cnt(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
static
int bnx2x_vf_chk_avail_resc(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct vf_pf_resc_request *req_resc)
{ … }
int bnx2x_vf_acquire(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct vf_pf_resc_request *resc)
{ … }
int bnx2x_vf_init(struct bnx2x *bp, struct bnx2x_virtf *vf, dma_addr_t *sb_map)
{ … }
struct set_vf_state_cookie { … };
static void bnx2x_set_vf_state(void *cookie)
{ … }
int bnx2x_vf_close(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
int bnx2x_vf_free(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
int bnx2x_vf_rss_update(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct bnx2x_config_rss_params *rss)
{ … }
int bnx2x_vf_tpa_update(struct bnx2x *bp, struct bnx2x_virtf *vf,
struct vfpf_tpa_tlv *tlv,
struct bnx2x_queue_update_tpa_params *params)
{ … }
int bnx2x_vf_release(struct bnx2x *bp, struct bnx2x_virtf *vf)
{ … }
void bnx2x_lock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf,
enum channel_tlvs tlv)
{ … }
void bnx2x_unlock_vf_pf_channel(struct bnx2x *bp, struct bnx2x_virtf *vf,
enum channel_tlvs expected_tlv)
{ … }
static int bnx2x_set_pf_tx_switching(struct bnx2x *bp, bool enable)
{ … }
int bnx2x_sriov_configure(struct pci_dev *dev, int num_vfs_param)
{ … }
#define IGU_ENTRY_SIZE …
int bnx2x_enable_sriov(struct bnx2x *bp)
{ … }
void bnx2x_pf_set_vfs_vlan(struct bnx2x *bp)
{ … }
void bnx2x_disable_sriov(struct bnx2x *bp)
{ … }
static int bnx2x_vf_op_prep(struct bnx2x *bp, int vfidx,
struct bnx2x_virtf **vf,
struct pf_vf_bulletin_content **bulletin,
bool test_queue)
{ … }
int bnx2x_get_vf_config(struct net_device *dev, int vfidx,
struct ifla_vf_info *ivi)
{ … }
int bnx2x_set_vf_mac(struct net_device *dev, int vfidx, u8 *mac)
{ … }
static void bnx2x_set_vf_vlan_acceptance(struct bnx2x *bp,
struct bnx2x_virtf *vf, bool accept)
{ … }
static int bnx2x_set_vf_vlan_filter(struct bnx2x *bp, struct bnx2x_virtf *vf,
u16 vlan, bool add)
{ … }
int bnx2x_set_vf_vlan(struct net_device *dev, int vfidx, u16 vlan, u8 qos,
__be16 vlan_proto)
{ … }
int bnx2x_set_vf_spoofchk(struct net_device *dev, int idx, bool val)
{ … }
u32 bnx2x_crc_vf_bulletin(struct pf_vf_bulletin_content *bulletin)
{ … }
enum sample_bulletin_result bnx2x_sample_bulletin(struct bnx2x *bp)
{ … }
void bnx2x_timer_sriov(struct bnx2x *bp)
{ … }
void __iomem *bnx2x_vf_doorbells(struct bnx2x *bp)
{ … }
void bnx2x_vf_pci_dealloc(struct bnx2x *bp)
{ … }
int bnx2x_vf_pci_alloc(struct bnx2x *bp)
{ … }
void bnx2x_iov_channel_down(struct bnx2x *bp)
{ … }
void bnx2x_iov_task(struct work_struct *work)
{ … }
void bnx2x_schedule_iov_task(struct bnx2x *bp, enum bnx2x_iov_flag flag)
{ … }