diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2016-10-14 14:28:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-14 19:04:58 +0300 |
commit | c753119e6d1a26a3df04d6fe69d75049082e3f32 (patch) | |
tree | a6108a7246d23f37bbcd5695882822c2d489802d /drivers/net/fjes/fjes_main.c | |
parent | b6ba737d0b290b272452a2362088222a248fc8da (diff) | |
download | linux-c753119e6d1a26a3df04d6fe69d75049082e3f32.tar.xz |
fjes: Add debugfs entry for EP status information in fjes driver
This patch adds debugfs entry to show EP status information.
You can get each EP's status information like the following:
# cat /sys/kernel/debug/fjes/fjes.0/status
EPID STATUS SAME_ZONE CONNECTED
ep0 shared Y Y
ep1 - - -
ep2 unshared N N
ep3 unshared N N
ep4 unshared N N
ep5 unshared N N
ep6 unshared N N
ep7 unshared N N
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fjes/fjes_main.c')
-rw-r--r-- | drivers/net/fjes/fjes_main.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 4c135ae11978..359e7a5ca4c6 100644 --- a/drivers/net/fjes/fjes_main.c +++ b/drivers/net/fjes/fjes_main.c @@ -1257,6 +1257,8 @@ static int fjes_probe(struct platform_device *plat_dev) netif_carrier_off(netdev); + fjes_dbg_adapter_init(adapter); + return 0; err_hw_exit: @@ -1274,6 +1276,8 @@ static int fjes_remove(struct platform_device *plat_dev) struct fjes_adapter *adapter = netdev_priv(netdev); struct fjes_hw *hw = &adapter->hw; + fjes_dbg_adapter_exit(adapter); + cancel_delayed_work_sync(&adapter->interrupt_watch_task); cancel_work_sync(&adapter->unshare_watch_task); cancel_work_sync(&adapter->raise_intr_rxdata_task); @@ -1478,9 +1482,13 @@ static int __init fjes_init_module(void) pr_info("%s - version %s - %s\n", fjes_driver_string, fjes_driver_version, fjes_copyright); + fjes_dbg_init(); + result = platform_driver_register(&fjes_driver); - if (result < 0) + if (result < 0) { + fjes_dbg_exit(); return result; + } result = acpi_bus_register_driver(&fjes_acpi_driver); if (result < 0) @@ -1490,6 +1498,7 @@ static int __init fjes_init_module(void) fail_acpi_driver: platform_driver_unregister(&fjes_driver); + fjes_dbg_exit(); return result; } @@ -1500,6 +1509,7 @@ static void __exit fjes_exit_module(void) { acpi_bus_unregister_driver(&fjes_acpi_driver); platform_driver_unregister(&fjes_driver); + fjes_dbg_exit(); } module_exit(fjes_exit_module); |