net: stmmac: Add PCI bus info to ethtool driver query output
Subsystems (4)
PATCH 1/1 net: stmmac: Add PCI bus info to ethtool driver query output
This patch populates the PCI bus info in the ethtool driver query data.
Users will be able to view PCI bus info using 'ethtool -i <interface>'.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 ++++ include/linux/stmmac.h | 1 + 3 files changed, 6 insertions(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +1 -0
@@ -236,6 +236,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,int ret;int i; + plat->pdev = pdev; plat->phy_addr =-1 ; plat->clk_csr =5 ; plat->has_gmac =0 ;
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +4 -0
@@ -268,6 +268,10 @@ static void stmmac_ethtool_getdrvinfo(struct net_device *dev,strlcpy (info->driver,MAC100_ETHTOOL_NAME ,sizeof (info->driver)); +if (priv->plat->pdev) { +strlcpy (info->bus_info,pci_name (priv->plat->pdev), +sizeof (info->bus_info)); + }strlcpy (info->version,DRV_MODULE_VERSION ,sizeof (info->version)); }
include/linux/stmmac.h +1 -0
@@ -202,5 +202,6 @@ struct plat_stmmacenet_data {bool vlan_fail_q_en;u8 vlan_fail_q;unsigned int eee_usecs_rate; + struct pci_dev *pdev; };#endif
Signature · 1 line
2.17.0
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Wed, 17 Feb 2021 17:57:05 +0800 you wrote:
This patch populates the PCI bus info in the ethtool driver query data.
Users will be able to view PCI bus info using 'ethtool -i <interface>'.
Signed-off-by Wong Vee Khee <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 ++++ include/linux/stmmac.h | 1 + 3 files changed, 6 insertions(+)
Here is the summary with links:
- [net-next,1/1] net: stmmac: Add PCI bus info to ethtool driver query output
https://git.kernel.org/netdev/net-next/c/20e07e2c3cf3
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel