linux/drivers/net/ethernet/cavium/liquidio/lio_ethtool.c

/**********************************************************************
 * Author: Cavium, Inc.
 *
 * Contact: [email protected]
 *          Please include "LiquidIO" in the subject.
 *
 * Copyright (c) 2003-2016 Cavium, Inc.
 *
 * This file is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License, Version 2, as
 * published by the Free Software Foundation.
 *
 * This file is distributed in the hope that it will be useful, but
 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
 * NONINFRINGEMENT.  See the GNU General Public License for more details.
 ***********************************************************************/
#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

/* Octeon's interface mode of operation */
enum {};

#define OCT_ETHTOOL_REGDUMP_LEN
#define OCT_ETHTOOL_REGDUMP_LEN_23XX
#define OCT_ETHTOOL_REGDUMP_LEN_23XX_VF
#define OCT_ETHTOOL_REGSVER

/* statistics of PF */
static const char oct_stats_strings[][ETH_GSTRING_LEN] =;

/* statistics of VF */
static const char oct_vf_stats_strings[][ETH_GSTRING_LEN] =;

/* statistics of host tx queue */
static const char oct_iq_stats_strings[][ETH_GSTRING_LEN] =;

/* statistics of host rx queue */
static const char oct_droq_stats_strings[][ETH_GSTRING_LEN] =;

/* LiquidIO driver private flags */
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)
{}

/* This routine provides PHY access routines for
 * mdio  clause45 .
 */
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)
{}

/*  get interrupt moderation parameters */
static int octnet_get_intrmod_cfg(struct lio *lio,
				  struct oct_intrmod_cfg *intr_cfg)
{}

/*  Configure interrupt moderation parameters */
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)
{}

/* Enable/Disable auto interrupt Moderation */
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)
{}

/* Return register dump len. */
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)
{}

/*  Return register dump user app.  */
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();