TI: HACK: net: ethernet: ti: am65-cpsw-nuss: add debugfs to cfg cut-thru params
Introduce debugfs interface to configure cut-thru Port parameters - RX/TX prio mask. During probe the debugfs directory is populated for device and every phys Ports as below debug\ | - <dev name> (8000000.ethernet) |- Port1\ |- <dbgfs files> ... |- PortN\ For every port following parameters are defined: PortN\ |- [all] disabled [Y/N] Y - port is disabled |- [if supported] cut_thru_rx_pri_mask Receive Priority Cut Through Enables |- [if supported] cut_thru_tx_pri_mask Transmit Priority Cut Through Enables cut_thru_rx/tx_pri_mask available only for devices which: - support "Cut-thru"; - configured in "switch-mode"; and can be configured only when cut-thru is not enabled ethtool --show-priv-flags ethX cut-thru : off Overall configuration sequence example: ifconfig ethX down devlink dev param set platform/8000000.ethernet name \ switch_mode value true cmode runtime echo 0xc0 > /sys/kernel/debug/8000000.ethernet/PortY/cut_thru_tx_pri_mask echo 0xc0 > /sys/kernel/debug/8000000.ethernet/PortY/cut_thru_rx_pri_mask ethtool --set-priv-flags ethZ cut-thru on ifconfig ethX up Note. The intended way upstream is to use devlink port params, but this part of devlink is broken and not easy to fix, so debugfs is used as temp solution and interface is subject to change. Signed-off-by:Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by:
Chintan Vankar <c-vankar@ti.com>
Showing
- drivers/net/ethernet/ti/Makefile 1 addition, 1 deletiondrivers/net/ethernet/ti/Makefile
- drivers/net/ethernet/ti/am65-cpsw-nuss.c 11 additions, 1 deletiondrivers/net/ethernet/ti/am65-cpsw-nuss.c
- drivers/net/ethernet/ti/am65-cpsw-nuss.h 8 additions, 0 deletionsdrivers/net/ethernet/ti/am65-cpsw-nuss.h
- drivers/net/ethernet/ti/am65-debugfs.c 152 additions, 0 deletionsdrivers/net/ethernet/ti/am65-debugfs.c