#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/net_tstamp.h>
#include <linux/pci.h>
#include "liquidio_common.h"
#include "octeon_droq.h"
#include "octeon_iq.h"
#include "response_manager.h"
#include "octeon_device.h"
#include "octeon_nic.h"
#include "octeon_main.h"
#include "octeon_network.h"
#include "cn66xx_regs.h"
#include "cn66xx_device.h"
#include "cn23xx_pf_device.h"
#include "cn23xx_vf_device.h"
static int lio_reset_queues(struct net_device *netdev, uint32_t num_qs);
struct oct_intrmod_resp { … };
struct oct_mdio_cmd_resp { … };
#define OCT_MDIO45_RESP_SIZE …
enum { … };
#define OCT_ETHTOOL_REGDUMP_LEN …
#define OCT_ETHTOOL_REGDUMP_LEN_23XX …
#define OCT_ETHTOOL_REGDUMP_LEN_23XX_VF …
#define OCT_ETHTOOL_REGSVER …
static const char oct_stats_strings[][ETH_GSTRING_LEN] = …;
static const char oct_vf_stats_strings[][ETH_GSTRING_LEN] = …;
static const char oct_iq_stats_strings[][ETH_GSTRING_LEN] = …;
static const char oct_droq_stats_strings[][ETH_GSTRING_LEN] = …;
static const char oct_priv_flags_strings[][ETH_GSTRING_LEN] = …;
#define OCTNIC_NCMD_AUTONEG_ON …
#define OCTNIC_NCMD_PHY_ON …
static int lio_get_link_ksettings(struct net_device *netdev,
struct ethtool_link_ksettings *ecmd)
{ … }
static int lio_set_link_ksettings(struct net_device *netdev,
const struct ethtool_link_ksettings *ecmd)
{ … }
static void
lio_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
{ … }
static void
lio_get_vf_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
{ … }
static int
lio_send_queue_count_update(struct net_device *netdev, uint32_t num_queues)
{ … }
static void
lio_ethtool_get_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static int
lio_irq_reallocate_irqs(struct octeon_device *oct, uint32_t num_ioqs)
{ … }
static int
lio_ethtool_set_channels(struct net_device *dev,
struct ethtool_channels *channel)
{ … }
static int lio_get_eeprom_len(struct net_device *netdev)
{ … }
static int
lio_get_eeprom(struct net_device *netdev, struct ethtool_eeprom *eeprom,
u8 *bytes)
{ … }
static int octnet_gpio_access(struct net_device *netdev, int addr, int val)
{ … }
static int octnet_id_active(struct net_device *netdev, int val)
{ … }
static int
octnet_mdio45_access(struct lio *lio, int op, int loc, int *value)
{ … }
static int lio_set_phys_id(struct net_device *netdev,
enum ethtool_phys_id_state state)
{ … }
static void
lio_ethtool_get_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
static int lio_23xx_reconfigure_queue_count(struct lio *lio)
{ … }
static int lio_reset_queues(struct net_device *netdev, uint32_t num_qs)
{ … }
static int
lio_ethtool_set_ringparam(struct net_device *netdev,
struct ethtool_ringparam *ering,
struct kernel_ethtool_ringparam *kernel_ering,
struct netlink_ext_ack *extack)
{ … }
static u32 lio_get_msglevel(struct net_device *netdev)
{ … }
static void lio_set_msglevel(struct net_device *netdev, u32 msglvl)
{ … }
static void lio_vf_set_msglevel(struct net_device *netdev, u32 msglvl)
{ … }
static void
lio_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)
{ … }
static int
lio_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause)
{ … }
static void
lio_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats __attribute__((unused)),
u64 *data)
{ … }
static void lio_vf_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats
__attribute__((unused)),
u64 *data)
{ … }
static void lio_get_priv_flags_strings(struct lio *lio, u8 *data)
{ … }
static void lio_get_strings(struct net_device *netdev, u32 stringset, u8 *data)
{ … }
static void lio_vf_get_strings(struct net_device *netdev, u32 stringset,
u8 *data)
{ … }
static int lio_get_priv_flags_ss_count(struct lio *lio)
{ … }
static int lio_get_sset_count(struct net_device *netdev, int sset)
{ … }
static int lio_vf_get_sset_count(struct net_device *netdev, int sset)
{ … }
static int octnet_get_intrmod_cfg(struct lio *lio,
struct oct_intrmod_cfg *intr_cfg)
{ … }
static int octnet_set_intrmod_cfg(struct lio *lio,
struct oct_intrmod_cfg *intr_cfg)
{ … }
static int lio_get_intr_coalesce(struct net_device *netdev,
struct ethtool_coalesce *intr_coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int oct_cfg_adaptive_intr(struct lio *lio,
struct oct_intrmod_cfg *intrmod_cfg,
struct ethtool_coalesce *intr_coal)
{ … }
static int
oct_cfg_rx_intrcnt(struct lio *lio,
struct oct_intrmod_cfg *intrmod,
struct ethtool_coalesce *intr_coal)
{ … }
static int oct_cfg_rx_intrtime(struct lio *lio,
struct oct_intrmod_cfg *intrmod,
struct ethtool_coalesce *intr_coal)
{ … }
static int
oct_cfg_tx_intrcnt(struct lio *lio,
struct oct_intrmod_cfg *intrmod,
struct ethtool_coalesce *intr_coal)
{ … }
static int lio_set_intr_coalesce(struct net_device *netdev,
struct ethtool_coalesce *intr_coal,
struct kernel_ethtool_coalesce *kernel_coal,
struct netlink_ext_ack *extack)
{ … }
static int lio_get_ts_info(struct net_device *netdev,
struct kernel_ethtool_ts_info *info)
{ … }
static int lio_get_regs_len(struct net_device *dev)
{ … }
static int cn23xx_read_csr_reg(char *s, struct octeon_device *oct)
{ … }
static int cn23xx_vf_read_csr_reg(char *s, struct octeon_device *oct)
{ … }
static int cn6xxx_read_csr_reg(char *s, struct octeon_device *oct)
{ … }
static int cn6xxx_read_config_reg(char *s, struct octeon_device *oct)
{ … }
static void lio_get_regs(struct net_device *dev,
struct ethtool_regs *regs, void *regbuf)
{ … }
static u32 lio_get_priv_flags(struct net_device *netdev)
{ … }
static int lio_set_priv_flags(struct net_device *netdev, u32 flags)
{ … }
static int lio_get_fecparam(struct net_device *netdev,
struct ethtool_fecparam *fec)
{ … }
static int lio_set_fecparam(struct net_device *netdev,
struct ethtool_fecparam *fec)
{ … }
#define LIO_ETHTOOL_COALESCE …
static const struct ethtool_ops lio_ethtool_ops = …;
static const struct ethtool_ops lio_vf_ethtool_ops = …;
void liquidio_set_ethtool_ops(struct net_device *netdev)
{ … }
EXPORT_SYMBOL_GPL(…);