can: m_can: m_can_rx_peripheral: fix RX being blocked by errors
Subsystems (2)
PATCH 1/1 can: m_can: m_can_rx_peripheral: fix RX being blocked by errors
For M_CAN peripherals, m_can_rx_handler was called with quota = 1, which caused any error handling to block RX from taking place until the next time the IRQ handler is called. This had been observed to cause RX to be blocked indefinitely in some cases.
This is fixed by calling m_can_rx_handler with a sensibly high quota.
--- drivers/net/can/m_can/m_can.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/can/m_can/m_can.c +1 -1
@@ -876,7 +876,7 @@ static int m_can_rx_peripheral(struct net_device *dev) {struct m_can_classdev *cdev =netdev_priv (dev); -m_can_rx_handler (dev,1 ); +m_can_rx_handler (dev,M_CAN_NAPI_WEIGHT );m_can_enable_all_interrupts (cdev);
Signature · 1 line
2.30.1
Marc Kleine-Budde
maintainerQuoted 9 lines · Torin Cooper-Bennun
For
M_CANperipherals,m_can_rx_handlerwas called with quota = 1, which caused any error handling to block RX from taking place until the next time the IRQ handler is called. This had been observed to cause RX to be blocked indefinitely in some cases.This is fixed by calling
m_can_rx_handlerwith a sensibly high quota.Suggested-by Marc Kleine-Budde <[email protected]>Signed-off-by Torin Cooper-Bennun <[email protected]>
Applied to linux-can/testing.
Thanks,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |