diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2023-02-02 15:53:37 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-02-03 09:21:41 +0000 |
commit | 942814840127a7d6307d0aaf087dbd3cfdeb2a2d (patch) | |
tree | d8688ee7ea526279c5538746a67ea399922bbfe5 /drivers/net/ethernet/microchip/lan966x/lan966x_main.c | |
parent | 64e09d04b9562eb1cae8bd06afff0f73ae315102 (diff) |
net: lan966x: Add VCAP debugFS support
Enable debugfs for vcap for lan966x. This will allow to print all the
entries in the VCAP and also the port information regarding which keys
are configured.
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/lan966x/lan966x_main.c')
-rw-r--r-- | drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c index 580c91d24a52..47b37ab9d7d5 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c @@ -1035,6 +1035,8 @@ static int lan966x_probe(struct platform_device *pdev) platform_set_drvdata(pdev, lan966x); lan966x->dev = &pdev->dev; + lan966x->debugfs_root = debugfs_create_dir("lan966x", NULL); + if (!device_get_mac_address(&pdev->dev, mac_addr)) { ether_addr_copy(lan966x->base_mac, mac_addr); } else { @@ -1223,6 +1225,8 @@ static int lan966x_remove(struct platform_device *pdev) lan966x_fdb_deinit(lan966x); lan966x_ptp_deinit(lan966x); + debugfs_remove_recursive(lan966x->debugfs_root); + return 0; } |