#ifndef __T4VF_COMMON_H__
#define __T4VF_COMMON_H__
#include "../cxgb4/t4_hw.h"
#include "../cxgb4/t4fw_api.h"
#define CHELSIO_CHIP_CODE(version, revision) …
#define CHELSIO_CHIP_VERSION(code) …
#define CHELSIO_CHIP_RELEASE(code) …
#define CHELSIO_T4 …
#define CHELSIO_T5 …
#define CHELSIO_T6 …
enum chip_type { … };
#define FW_LEN16(fw_struct) …
struct t4vf_port_stats { … };
fw_port_cap16_t;
fw_port_cap32_t;
enum fw_caps { … };
enum cc_pause { … };
enum cc_fec { … };
struct link_config { … };
static inline bool is_x_10g_port(const struct link_config *lc)
{ … }
struct dev_params { … };
struct sge_params { … };
struct vpd_params { … };
struct arch_specific_params { … };
struct rss_params { … };
rss_vi_config;
struct vf_resources { … };
struct adapter_params { … };
struct mbox_cmd { … };
struct mbox_cmd_log { … };
static inline struct mbox_cmd *mbox_cmd_log_entry(struct mbox_cmd_log *log,
unsigned int entry_idx)
{ … }
#include "adapter.h"
#ifndef PCI_VENDOR_ID_CHELSIO
#define PCI_VENDOR_ID_CHELSIO …
#endif
#define for_each_port(adapter, iter) …
static inline unsigned int core_ticks_per_usec(const struct adapter *adapter)
{ … }
static inline unsigned int us_to_core_ticks(const struct adapter *adapter,
unsigned int us)
{ … }
static inline unsigned int core_ticks_to_us(const struct adapter *adapter,
unsigned int ticks)
{ … }
int t4vf_wr_mbox_core(struct adapter *, const void *, int, void *, bool);
static inline int t4vf_wr_mbox(struct adapter *adapter, const void *cmd,
int size, void *rpl)
{ … }
static inline int t4vf_wr_mbox_ns(struct adapter *adapter, const void *cmd,
int size, void *rpl)
{ … }
#define CHELSIO_PCI_ID_VER(dev_id) …
static inline int is_t4(enum chip_type chip)
{ … }
static inline int hash_mac_addr(const u8 *addr)
{ … }
int t4vf_wait_dev_ready(struct adapter *);
int t4vf_port_init(struct adapter *, int);
int t4vf_fw_reset(struct adapter *);
int t4vf_set_params(struct adapter *, unsigned int, const u32 *, const u32 *);
int t4vf_fl_pkt_align(struct adapter *adapter);
enum t4_bar2_qtype { … };
int t4vf_bar2_sge_qregs(struct adapter *adapter,
unsigned int qid,
enum t4_bar2_qtype qtype,
u64 *pbar2_qoffset,
unsigned int *pbar2_qid);
unsigned int t4vf_get_pf_from_vf(struct adapter *);
int t4vf_get_sge_params(struct adapter *);
int t4vf_get_vpd_params(struct adapter *);
int t4vf_get_dev_params(struct adapter *);
int t4vf_get_rss_glb_config(struct adapter *);
int t4vf_get_vfres(struct adapter *);
int t4vf_read_rss_vi_config(struct adapter *, unsigned int,
union rss_vi_config *);
int t4vf_write_rss_vi_config(struct adapter *, unsigned int,
union rss_vi_config *);
int t4vf_config_rss_range(struct adapter *, unsigned int, int, int,
const u16 *, int);
int t4vf_alloc_vi(struct adapter *, int);
int t4vf_free_vi(struct adapter *, int);
int t4vf_enable_vi(struct adapter *adapter, unsigned int viid, bool rx_en,
bool tx_en);
int t4vf_enable_pi(struct adapter *adapter, struct port_info *pi, bool rx_en,
bool tx_en);
int t4vf_identify_port(struct adapter *, unsigned int, unsigned int);
int t4vf_set_rxmode(struct adapter *, unsigned int, int, int, int, int, int,
bool);
int t4vf_alloc_mac_filt(struct adapter *, unsigned int, bool, unsigned int,
const u8 **, u16 *, u64 *, bool);
int t4vf_free_mac_filt(struct adapter *, unsigned int, unsigned int naddr,
const u8 **, bool);
int t4vf_change_mac(struct adapter *, unsigned int, int, const u8 *, bool);
int t4vf_set_addr_hash(struct adapter *, unsigned int, bool, u64, bool);
int t4vf_get_port_stats(struct adapter *, int, struct t4vf_port_stats *);
int t4vf_iq_free(struct adapter *, unsigned int, unsigned int, unsigned int,
unsigned int);
int t4vf_eth_eq_free(struct adapter *, unsigned int);
int t4vf_update_port_info(struct port_info *pi);
int t4vf_handle_fw_rpl(struct adapter *, const __be64 *);
int t4vf_prep_adapter(struct adapter *);
int t4vf_get_vf_mac_acl(struct adapter *adapter, unsigned int port,
unsigned int *naddr, u8 *addr);
int t4vf_get_vf_vlan_acl(struct adapter *adapter);
#endif