can: m_can: Add tx coalescing ethtool support
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Wed, 7 Feb 2024 09:32:13 +0000 (10:32 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 12 Feb 2024 16:02:43 +0000 (17:02 +0100)
commite55b963e4e94011e9de7a6448ea8e50a12bb9953
tree05af4a2e37b9a6167fd289f1d113a81efe5c93b5
parent9515223bd0bb9bb0a31b61a68f1049148c1d85ff
can: m_can: Add tx coalescing ethtool support

Add TX support to get/set functions for ethtool coalescing.
tx-frames-irq and tx-usecs-irq can only be set/unset together.
tx-frames-irq needs to be less than TXE and TXB.

As rx and tx share the same timer, rx-usecs-irq and tx-usecs-irq can be
enabled/disabled individually but they need to have the same value if
enabled.

Polling is excluded from TX irq coalescing.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/all/20240207093220.2681425-8-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c