#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/capability.h>
#include <linux/vmalloc.h>
#include <linux/phylink.h>
#include "qede.h"
#include "qede_ptp.h"
#define QEDE_RQSTAT_OFFSET(stat_name) …
#define QEDE_RQSTAT_STRING(stat_name) …
#define QEDE_RQSTAT(stat_name) …
#define QEDE_SELFTEST_POLL_COUNT …
#define QEDE_DUMP_VERSION …
#define QEDE_DUMP_NVM_ARG_COUNT …
static const struct { … } qede_rqstats_arr[] = …;
#define QEDE_NUM_RQSTATS …
#define QEDE_TQSTAT_OFFSET(stat_name) …
#define QEDE_TQSTAT_STRING(stat_name) …
#define QEDE_TQSTAT(stat_name) …
#define QEDE_NUM_TQSTATS …
static const struct { … } qede_tqstats_arr[] = …;
#define QEDE_STAT_OFFSET(stat_name, type, base) …
#define QEDE_STAT_STRING(stat_name) …
#define _QEDE_STAT(stat_name, type, base, attr) …
#define QEDE_STAT(stat_name) …
#define QEDE_PF_STAT(stat_name) …
#define QEDE_PF_BB_STAT(stat_name) …
#define QEDE_PF_AH_STAT(stat_name) …
static const struct { … } qede_stats_arr[] = …;
#define QEDE_NUM_STATS …
#define QEDE_STAT_IS_PF_ONLY(i) …
#define QEDE_STAT_IS_BB_ONLY(i) …
#define QEDE_STAT_IS_AH_ONLY(i) …
enum { … };
static const char qede_private_arr[QEDE_PRI_FLAG_LEN][ETH_GSTRING_LEN] = …;
enum qede_ethtool_tests { … };
static const char qede_tests_str_arr[QEDE_ETHTOOL_TEST_MAX][ETH_GSTRING_LEN] = …;
static const u32 qede_forced_speed_1000[] __initconst = …;
static const u32 qede_forced_speed_10000[] __initconst = …;
static const u32 qede_forced_speed_20000[] __initconst = …;
static const u32 qede_forced_speed_25000[] __initconst = …;
static const u32 qede_forced_speed_40000[] __initconst = …;
static const u32 qede_forced_speed_50000[] __initconst = …;
static const u32 qede_forced_speed_100000[] __initconst = …;
static struct ethtool_forced_speed_map
qede_forced_speed_maps[] __ro_after_init = …;
void __init qede_forced_speed_maps_init(void)
{ … }
static void qede_get_strings_stats_txq(struct qede_dev *edev,
struct qede_tx_queue *txq, u8 **buf)
{ … }
static void qede_get_strings_stats_rxq(struct qede_dev *edev,
struct qede_rx_queue *rxq, u8 **buf)
{ … }
static bool qede_is_irrelevant_stat(struct qede_dev *edev, int stat_index)
{ … }
static void qede_get_strings_stats(struct qede_dev *edev, u8 *buf)
{ … }
static void qede_get_strings(struct net_device *dev, u32 stringset, u8 *buf)
{ … }
static void qede_get_ethtool_stats_txq(struct qede_tx_queue *txq, u64 **buf)
{ … }
static void qede_get_ethtool_stats_rxq(struct qede_rx_queue *rxq, u64 **buf)
{ … }
static void qede_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *buf)
{ … }
static int qede_get_sset_count(struct net_device *dev, int stringset)
{ … }
static u32 qede_get_priv_flags(struct net_device *dev)
{ … }
static int qede_set_priv_flags(struct net_device *dev, u32 flags)
{ … }
static int qede_get_link_ksettings(struct net_device *dev,
struct ethtool_link_ksettings *cmd)
{ … }
static int qede_set_link_ksettings(struct net_device *dev,
const struct ethtool_link_ksettings *cmd)
{ … }
static void qede_get_drvinfo(struct net_device *ndev,
struct ethtool_drvinfo *info)
{ … }
static void qede_get_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{ … }
static int qede_set_wol(struct net_device *ndev, struct ethtool_wolinfo *wol)
{ … }
static u32 qede_get_msglevel(struct net_device *ndev)
{ … }
static void qede_set_msglevel(struct net_device *ndev, u32 level)
{ … }
static int qede_nway_reset(struct net_device *dev)
{ … }
static u32 qede_get_link(struct net_device *dev)
{ … }
static int qede_flash_device(struct net_device *dev,
struct ethtool_flash *flash)
{ … }
static int qede_get_coalesce(struct net_device *dev,
struct ethtool_coalesce *coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
int qede_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static void qede_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
static int qede_set_ringparam(struct net_device *dev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
static void qede_get_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *epause)
{ … }
static int qede_set_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *epause)
{ … }
static void qede_get_regs(struct net_device *ndev,
struct ethtool_regs *regs, void *buffer)
{ … }
static int qede_get_regs_len(struct net_device *ndev)
{ … }
static void qede_update_mtu(struct qede_dev *edev,
struct qede_reload_args *args)
{ … }
int qede_change_mtu(struct net_device *ndev, int new_mtu)
{ … }
static void qede_get_channels(struct net_device *dev,
struct ethtool_channels *channels)
{ … }
static int qede_set_channels(struct net_device *dev,
struct ethtool_channels *channels)
{ … }
static int qede_get_ts_info(struct net_device *dev,
struct kernel_ethtool_ts_info *info)
{ … }
static int qede_set_phys_id(struct net_device *dev,
enum ethtool_phys_id_state state)
{ … }
static int qede_get_rss_flags(struct qede_dev *edev, struct ethtool_rxnfc *info)
{ … }
static int qede_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
u32 *rule_locs)
{ … }
static int qede_set_rss_flags(struct qede_dev *edev, struct ethtool_rxnfc *info)
{ … }
static int qede_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info)
{ … }
static u32 qede_get_rxfh_indir_size(struct net_device *dev)
{ … }
static u32 qede_get_rxfh_key_size(struct net_device *dev)
{ … }
static int qede_get_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh)
{ … }
static int qede_set_rxfh(struct net_device *dev,
struct ethtool_rxfh_param *rxfh,
struct netlink_ext_ack *extack)
{ … }
static void qede_netif_start(struct qede_dev *edev)
{ … }
static void qede_netif_stop(struct qede_dev *edev)
{ … }
static int qede_selftest_transmit_traffic(struct qede_dev *edev,
struct sk_buff *skb)
{ … }
static int qede_selftest_receive_traffic(struct qede_dev *edev)
{ … }
static int qede_selftest_run_loopback(struct qede_dev *edev, u32 loopback_mode)
{ … }
static void qede_self_test(struct net_device *dev,
struct ethtool_test *etest, u64 *buf)
{ … }
static int qede_set_tunable(struct net_device *dev,
const struct ethtool_tunable *tuna,
const void *data)
{ … }
static int qede_get_tunable(struct net_device *dev,
const struct ethtool_tunable *tuna, void *data)
{ … }
static int qede_get_eee(struct net_device *dev, struct ethtool_keee *edata)
{ … }
static int qede_set_eee(struct net_device *dev, struct ethtool_keee *edata)
{ … }
static u32 qede_link_to_ethtool_fec(u32 link_fec)
{ … }
static u32 qede_ethtool_to_link_fec(u32 eth_fec)
{ … }
static int qede_get_fecparam(struct net_device *dev,
struct ethtool_fecparam *fecparam)
{ … }
static int qede_set_fecparam(struct net_device *dev,
struct ethtool_fecparam *fecparam)
{ … }
static int qede_get_module_info(struct net_device *dev,
struct ethtool_modinfo *modinfo)
{ … }
static int qede_get_module_eeprom(struct net_device *dev,
struct ethtool_eeprom *ee, u8 *data)
{ … }
static int qede_set_dump(struct net_device *dev, struct ethtool_dump *val)
{ … }
static int qede_get_dump_flag(struct net_device *dev,
struct ethtool_dump *dump)
{ … }
static int qede_get_dump_data(struct net_device *dev,
struct ethtool_dump *dump, void *buf)
{ … }
int qede_set_per_coalesce(struct net_device *dev, u32 queue,
struct ethtool_coalesce *coal)
{ … }
static int qede_get_per_coalesce(struct net_device *dev,
u32 queue,
struct ethtool_coalesce *coal)
{ … }
static const struct ethtool_ops qede_ethtool_ops = …;
static const struct ethtool_ops qede_vf_ethtool_ops = …;
void qede_set_ethtool_ops(struct net_device *dev)
{ … }