nvethernet: Support for Ethernet selftests

Adds selftest support for -
1) MAC loopback
2) PHY loopback
3) MMC Counters

Bug 200622869

Change-Id: Ib476afa342c283b53d5ab74cc50a1458183ab16d
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2354887
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Bhadram Varka
2020-06-02 19:32:22 +05:30
committed by Revanth Kumar Uppala
parent 81378766ad
commit 0d329bb260
5 changed files with 501 additions and 0 deletions

View File

@@ -457,4 +457,24 @@ int ether_handle_hwtstamp_ioctl(struct ether_priv_data *pdata,
int ether_handle_priv_ts_ioctl(struct ether_priv_data *pdata,
struct ifreq *ifr);
int ether_conf_eee(struct ether_priv_data *pdata, unsigned int tx_lpi_enable);
#if IS_ENABLED(CONFIG_NVETHERNET_SELFTESTS)
void ether_selftest_run(struct net_device *dev,
struct ethtool_test *etest, u64 *buf);
void ether_selftest_get_strings(struct ether_priv_data *pdata, u8 *data);
int ether_selftest_get_count(struct ether_priv_data *pdata);
#else
static inline void ether_selftest_run(struct net_device *dev,
struct ethtool_test *etest, u64 *buf)
{
}
static inline void ether_selftest_get_strings(struct ether_priv_data *pdata,
u8 *data)
{
}
static inline int ether_selftest_get_count(struct ether_priv_data *pdata)
{
return -EOPNOTSUPP;
}
#endif /* CONFIG_NVETHERNET_SELFTESTS */
#endif /* ETHER_LINUX_H */