You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can: m_can: m_can_fifo_{read,write}: don't read or write from/to FIFO if length is 0
In order to optimize FIFO access, especially on m_can cores attached
to slow busses like SPI, in patch
| e393817 ("can: m_can: Disable IRQs on FIFO bus errors")
bulk read/write support has been added to the m_can_fifo_{read,write}
functions.
That change leads to the tcan driver to call
regmap_bulk_{read,write}() with a length of 0 (for CAN frames with 0
data length). regmap treats this as an error:
| tcan4x5x spi1.0 tcan4x5x0: FIFO write returned -22
This patch fixes the problem by not calling the
cdev->ops->{read,write)_fifo() in case of a 0 length read/write.
Fixes: e393817 ("can: m_can: Disable IRQs on FIFO bus errors")
Link: https://lore.kernel.org/all/[email protected]
Cc: [email protected]
Cc: Matt Kline <[email protected]>
Cc: Chandrasekar Ramakrishnan <[email protected]>
Reported-by: Michael Anochin <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
0 commit comments