Skip to content

Commit

Permalink
can: m_can: m_can_rx_peripheral(): fix RX being blocked by errors
Browse files Browse the repository at this point in the history
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.

Fixes: f524f82 ("can: m_can: Create a m_can platform framework")
Link: https://lore.kernel.org/r/[email protected]
Suggested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Torin Cooper-Bennun <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
Torin Cooper-Bennun authored and marckleinebudde committed Mar 16, 2021
1 parent c0e399f commit e98d9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/can/m_can/m_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,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);

Expand Down

0 comments on commit e98d9ee

Please sign in to comment.