nvethernet: dump HW features through debugfs

cat /sys/kernel/debug/nvethernet-<interface>/hw_features to
dump the HW features

Bug 200563382

Change-Id: Ifd8eab0564123d1f588241fbadb739e6ef553114
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2338196
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: Rakesh Goyal <rgoyal@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Bhadram Varka
2020-04-09 16:11:10 +05:30
committed by Revanth Kumar Uppala
parent d7e0d58393
commit a921c9487b
3 changed files with 467 additions and 17 deletions

View File

@@ -29,6 +29,7 @@
#include <linux/of_mdio.h>
#include <linux/if_vlan.h>
#include <linux/thermal.h>
#include <linux/debugfs.h>
#include <linux/of_net.h>
#include <linux/module.h>
#include <linux/reset.h>
@@ -372,6 +373,12 @@ struct ether_priv_data {
#endif
/** VM channel info data associated with VM IRQ */
struct ether_vm_irq_data *vm_irq_data;
#ifdef CONFIG_DEBUG_FS
/** Debug fs directory pointer */
struct dentry *dbgfs_dir;
/** HW features dump debug fs pointer */
struct dentry *dbgfs_hw_feat;
#endif
};
/**
@@ -385,21 +392,21 @@ void ether_set_ethtool_ops(struct net_device *ndev);
/**
* @brief Creates Ethernet sysfs group
*
* @param[in] dev: device instance
* @param[in] pdata: Ethernet driver private data
*
* @retval 0 - success,
* @retval "negative value" - failure.
*/
int ether_sysfs_register(struct device *dev);
int ether_sysfs_register(struct ether_priv_data *pdata);
/**
* @brief Removes Ethernet sysfs group
*
* @param[in] dev: device instance
* @param[in] pdata: Ethernet driver private data
*
* @note nvethernet sysfs group need to be registered during probe.
*/
void ether_sysfs_unregister(struct device *dev);
void ether_sysfs_unregister(struct ether_priv_data *pdata);
/**
* @brief Function to register ptp clock driver