#include <linux/crc32.h>
#include <linux/etherdevice.h>
#include "qed.h"
#include "qed_sriov.h"
#include "qed_vf.h"
static void *qed_vf_pf_prep(struct qed_hwfn *p_hwfn, u16 type, u16 length)
{ … }
static void qed_vf_pf_req_end(struct qed_hwfn *p_hwfn, int req_status)
{ … }
#define QED_VF_CHANNEL_USLEEP_ITERATIONS …
#define QED_VF_CHANNEL_USLEEP_DELAY …
#define QED_VF_CHANNEL_MSLEEP_ITERATIONS …
#define QED_VF_CHANNEL_MSLEEP_DELAY …
static int qed_send_msg2pf(struct qed_hwfn *p_hwfn, u8 *done)
{ … }
static void qed_vf_pf_add_qid(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid)
{ … }
static int _qed_vf_pf_release(struct qed_hwfn *p_hwfn, bool b_final)
{ … }
int qed_vf_pf_release(struct qed_hwfn *p_hwfn)
{ … }
#define VF_ACQUIRE_THRESH …
static void qed_vf_pf_acquire_reduce_resc(struct qed_hwfn *p_hwfn,
struct vf_pf_resc_request *p_req,
struct pf_vf_resc *p_resp)
{ … }
static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
{ … }
u32 qed_vf_hw_bar_size(struct qed_hwfn *p_hwfn, enum BAR_ID bar_id)
{ … }
int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)
{ … }
#define TSTORM_QZONE_START …
#define MSTORM_QZONE_START(dev) …
static void
__qed_vf_prep_tunn_req_tlv(struct vfpf_update_tunn_param_tlv *p_req,
struct qed_tunn_update_type *p_src,
enum qed_tunn_mode mask, u8 *p_cls)
{ … }
static void
qed_vf_prep_tunn_req_tlv(struct vfpf_update_tunn_param_tlv *p_req,
struct qed_tunn_update_type *p_src,
enum qed_tunn_mode mask,
u8 *p_cls, struct qed_tunn_update_udp_port *p_port,
u8 *p_update_port, u16 *p_udp_port)
{ … }
void qed_vf_set_vf_start_tunn_update_param(struct qed_tunnel_info *p_tun)
{ … }
static void
__qed_vf_update_tunn_param(struct qed_tunn_update_type *p_tun,
u16 feature_mask, u8 tunn_mode,
u8 tunn_cls, enum qed_tunn_mode val)
{ … }
static void qed_vf_update_tunn_param(struct qed_hwfn *p_hwfn,
struct qed_tunnel_info *p_tun,
struct pfvf_update_tunn_param_tlv *p_resp)
{ … }
int qed_vf_pf_tunnel_param_update(struct qed_hwfn *p_hwfn,
struct qed_tunnel_info *p_src)
{ … }
int
qed_vf_pf_rxq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
u16 bd_max_bytes,
dma_addr_t bd_chain_phys_addr,
dma_addr_t cqe_pbl_addr,
u16 cqe_pbl_size, void __iomem **pp_prod)
{ … }
int qed_vf_pf_rxq_stop(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid, bool cqe_completion)
{ … }
int
qed_vf_pf_txq_start(struct qed_hwfn *p_hwfn,
struct qed_queue_cid *p_cid,
dma_addr_t pbl_addr,
u16 pbl_size, void __iomem **pp_doorbell)
{ … }
int qed_vf_pf_txq_stop(struct qed_hwfn *p_hwfn, struct qed_queue_cid *p_cid)
{ … }
int qed_vf_pf_vport_start(struct qed_hwfn *p_hwfn,
u8 vport_id,
u16 mtu,
u8 inner_vlan_removal,
enum qed_tpa_mode tpa_mode,
u8 max_buffers_per_cqe, u8 only_untagged)
{ … }
int qed_vf_pf_vport_stop(struct qed_hwfn *p_hwfn)
{ … }
static bool
qed_vf_handle_vp_update_is_needed(struct qed_hwfn *p_hwfn,
struct qed_sp_vport_update_params *p_data,
u16 tlv)
{ … }
static void
qed_vf_handle_vp_update_tlvs_resp(struct qed_hwfn *p_hwfn,
struct qed_sp_vport_update_params *p_data)
{ … }
int qed_vf_pf_vport_update(struct qed_hwfn *p_hwfn,
struct qed_sp_vport_update_params *p_params)
{ … }
int qed_vf_pf_reset(struct qed_hwfn *p_hwfn)
{ … }
void qed_vf_pf_filter_mcast(struct qed_hwfn *p_hwfn,
struct qed_filter_mcast *p_filter_cmd)
{ … }
int qed_vf_pf_filter_ucast(struct qed_hwfn *p_hwfn,
struct qed_filter_ucast *p_ucast)
{ … }
int qed_vf_pf_int_cleanup(struct qed_hwfn *p_hwfn)
{ … }
int qed_vf_pf_get_coalesce(struct qed_hwfn *p_hwfn,
u16 *p_coal, struct qed_queue_cid *p_cid)
{ … }
int
qed_vf_pf_bulletin_update_mac(struct qed_hwfn *p_hwfn,
const u8 *p_mac)
{ … }
int
qed_vf_pf_set_coalesce(struct qed_hwfn *p_hwfn,
u16 rx_coal, u16 tx_coal, struct qed_queue_cid *p_cid)
{ … }
u16 qed_vf_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
{ … }
void qed_vf_set_sb_info(struct qed_hwfn *p_hwfn,
u16 sb_id, struct qed_sb_info *p_sb)
{ … }
int qed_vf_read_bulletin(struct qed_hwfn *p_hwfn, u8 *p_change)
{ … }
void __qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params *p_params,
struct qed_bulletin_content *p_bulletin)
{ … }
void qed_vf_get_link_params(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_params *params)
{ … }
void __qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *p_link,
struct qed_bulletin_content *p_bulletin)
{ … }
void qed_vf_get_link_state(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_state *link)
{ … }
void __qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps,
struct qed_bulletin_content *p_bulletin)
{ … }
void qed_vf_get_link_caps(struct qed_hwfn *p_hwfn,
struct qed_mcp_link_capabilities *p_link_caps)
{ … }
void qed_vf_get_num_rxqs(struct qed_hwfn *p_hwfn, u8 *num_rxqs)
{ … }
void qed_vf_get_num_txqs(struct qed_hwfn *p_hwfn, u8 *num_txqs)
{ … }
void qed_vf_get_num_cids(struct qed_hwfn *p_hwfn, u8 *num_cids)
{ … }
void qed_vf_get_port_mac(struct qed_hwfn *p_hwfn, u8 *port_mac)
{ … }
void qed_vf_get_num_vlan_filters(struct qed_hwfn *p_hwfn, u8 *num_vlan_filters)
{ … }
void qed_vf_get_num_mac_filters(struct qed_hwfn *p_hwfn, u8 *num_mac_filters)
{ … }
bool qed_vf_check_mac(struct qed_hwfn *p_hwfn, u8 *mac)
{ … }
static bool qed_vf_bulletin_get_forced_mac(struct qed_hwfn *hwfn,
u8 *dst_mac, u8 *p_is_forced)
{ … }
static void
qed_vf_bulletin_get_udp_ports(struct qed_hwfn *p_hwfn,
u16 *p_vxlan_port, u16 *p_geneve_port)
{ … }
void qed_vf_get_fw_version(struct qed_hwfn *p_hwfn,
u16 *fw_major, u16 *fw_minor,
u16 *fw_rev, u16 *fw_eng)
{ … }
static void qed_handle_bulletin_change(struct qed_hwfn *hwfn)
{ … }
void qed_iov_vf_task(struct work_struct *work)
{ … }