[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <97029c69a149de5bd6ba6e70c6de1e04bcdc6692.1702314695.git.ecree.xilinx@gmail.com>
Date: Mon, 11 Dec 2023 17:18:30 +0000
From: <edward.cree@....com>
To: <linux-net-drivers@....com>, <davem@...emloft.net>, <kuba@...nel.org>,
<pabeni@...hat.com>, <edumazet@...gle.com>
CC: Edward Cree <ecree.xilinx@...il.com>, <netdev@...r.kernel.org>,
<habetsm.xilinx@...il.com>, Jonathan Cooper <jonathan.s.cooper@....com>
Subject: [PATCH net-next 5/7] sfc: add debugfs nodes for loopback mode
From: Edward Cree <ecree.xilinx@...il.com>
'loopback_mode' shows the currently selected mode, while 'loopback_modes'
is a bitmask of modes supported by the NIC+FW.
Reviewed-by: Jonathan Cooper <jonathan.s.cooper@....com>
Signed-off-by: Edward Cree <ecree.xilinx@...il.com>
---
drivers/net/ethernet/sfc/debugfs.c | 7 +++++++
drivers/net/ethernet/sfc/net_driver.h | 2 ++
2 files changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/sfc/debugfs.c b/drivers/net/ethernet/sfc/debugfs.c
index 8ee6e401ea44..549ff1ee273e 100644
--- a/drivers/net/ethernet/sfc/debugfs.c
+++ b/drivers/net/ethernet/sfc/debugfs.c
@@ -326,6 +326,13 @@ static void efx_init_debugfs_nic_files(struct efx_nic *efx)
efx->debug_interrupt_mode.value = &efx->interrupt_mode;
efx_debugfs_create_enum("interrupt_mode", 0444, efx->debug_dir,
&efx->debug_interrupt_mode);
+ EFX_DEBUGFS_EFX(x64, loopback_modes);
+ efx->debug_loopback_mode.max = efx_loopback_mode_max;
+ efx->debug_loopback_mode.names = efx_loopback_mode_names;
+ efx->debug_loopback_mode.vlen = sizeof(efx->loopback_mode);
+ efx->debug_loopback_mode.value = &efx->loopback_mode;
+ efx_debugfs_create_enum("loopback_mode", 0444, efx->debug_dir,
+ &efx->debug_loopback_mode);
}
/**
diff --git a/drivers/net/ethernet/sfc/net_driver.h b/drivers/net/ethernet/sfc/net_driver.h
index feb87979059c..e3605c361117 100644
--- a/drivers/net/ethernet/sfc/net_driver.h
+++ b/drivers/net/ethernet/sfc/net_driver.h
@@ -1164,6 +1164,8 @@ struct efx_nic {
struct dentry *debug_symlink;
/** @debug_interrupt_mode: debugfs details for printing @interrupt_mode */
struct efx_debugfs_enum_data debug_interrupt_mode;
+ /** @debug_loopback_mode: debugfs details for printing @loopback_mode */
+ struct efx_debugfs_enum_data debug_loopback_mode;
/** @debugfs_symlink_mutex: protects debugfs @debug_symlink */
struct mutex debugfs_symlink_mutex;
#endif
Powered by blists - more mailing lists