can: m_can: Batch FIFO reads during CAN receive
authorMatt Kline <matt@bitbashing.io>
Tue, 17 Aug 2021 05:08:52 +0000 (22:08 -0700)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 19 Aug 2021 13:07:04 +0000 (15:07 +0200)
commit1aa6772f64b4a6763f14ae68455d7e42333e208e
tree8fcd99e32fb0f2d7779118e72c89f6f2d1315aff
parente39381770ec9ca3c51d8b9bd9cc6e01d78ea974a
can: m_can: Batch FIFO reads during CAN receive

On peripherals communicating over a relatively slow SPI line
(e.g. tcan4x5x), individual transfers have high fixed costs.
This causes the driver to spend most of its time waiting between
transfers and severely limits throughput.

Reduce these overheads by reading more than one word at a time.
Writing could get a similar treatment in follow-on commits.

Link: https://lore.kernel.org/r/20210817050853.14875-3-matt@bitbashing.io
Signed-off-by: Matt Kline <matt@bitbashing.io>
[mkl: remove __packed from struct id_and_dlc]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.c