can: m_can: Implement transmit submission coalescing
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Wed, 7 Feb 2024 09:32:20 +0000 (10:32 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 12 Feb 2024 16:02:45 +0000 (17:02 +0100)
commitc306c3873de0804bea4bb2ac717bd2c088acc589
treec2ae47f1ce4984aaf8608852a76d03a97a9ccf66
parent251f913d19a8a960126359c20bd5719461e5399f
can: m_can: Implement transmit submission coalescing

m_can supports submitting multiple transmits with one register write.
This is an interesting option to reduce the number of SPI transfers for
peripheral chips.

The m_can_tx_op is extended with a bool that signals if it is the last
transmission and the submit should be executed immediately.

The worker then writes the skb to the FIFO and submits it only if the
submit bool is set. If it isn't set, the worker will write the next skb
which is waiting in the workqueue to the FIFO, etc.

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20240207093220.2681425-15-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c
drivers/net/can/m_can/m_can.h