net: stmmac: create one debugfs dir per net-device
Subsystems (4)
PATCH 1/1 net: stmmac: create one debugfs dir per net-device
stmmac DebugFS entries are currently global to the driver. As a result, having more than one stmmac device in the system creates the following error:
* ERROR stmmaceth, debugfs create directory failed
* stmmac_hw_setup: failed debugFS registration
This also results in being able to access the debugfs information for the first registered device only.
This patch changes the debugfs structure to have one sub-directory per net-device. Files under "/sys/kernel/debug/stmmaceth" will now show-up under /sys/kernel/debug/stmmaceth/ethN/.
--- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 6 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 76 ++++++++++++++++------- 2 files changed, 59 insertions(+), 23 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac.h +6 -0
@@ -125,6 +125,12 @@ struct stmmac_priv {int use_riwt;int irq_wake;spinlock_t ptp_lock; + +#ifdef CONFIG_DEBUG_FS +struct dentry *dbgfs_dir; +struct dentry *dbgfs_rings_status; +struct dentry *dbgfs_dma_cap; +#endif };int stmmac_mdio_unregister (struct net_device *ndev);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +53 -23
128 lines not on this page · raw message
Signature · 1 line
2.1.4
From: Mathieu Olivari <[email protected]>
Date: Fri, 22 May 2015 19:03:29 -0700
Quoted 6 lines
stmmac DebugFS entries are currently global to the driver. As a result, having more than one stmmac device in the system creates the following error:
* ERROR stmmaceth, debugfs create directory failed
*stmmac_hw_setup: failed debugFS registration
Quoted 8 lines
This also results in being able to access the debugfs information for the first registered device only.
This patch changes the debugfs structure to have one sub-directory per net-device. Files under "
/sys/kernel/debug/stmmaceth" will now show-up under/sys/kernel/debug/stmmaceth/ethN/.Signed-off-by Mathieu Olivari <[email protected]>
Applied, thank you.