summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorin Cooper-Bennun <torin@maxiluxsystems.com>2021-03-03 17:43:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-30 15:35:26 +0300
commit52cc7bad12755a922ecc7b256cb56930392ae170 (patch)
tree6877fbd5804ca2445b306dbc668f8a9c1e9b015e
parent059c1996017df7a8af791f8855b148d23b9460c2 (diff)
downloadlinux-52cc7bad12755a922ecc7b256cb56930392ae170.tar.xz
can: m_can: m_can_rx_peripheral(): fix RX being blocked by errors
[ Upstream commit e98d9ee64ee2cc9b1d1a8e26610ec4d0392ebe50 ] 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: f524f829b75a ("can: m_can: Create a m_can platform framework") Link: https://lore.kernel.org/r/20210303144350.4093750-1-torin@maxiluxsystems.com Suggested-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Torin Cooper-Bennun <torin@maxiluxsystems.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/can/m_can/m_can.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
index cf72a7e464ec..b2224113987c 100644
--- a/drivers/net/can/m_can/m_can.c
+++ b/drivers/net/can/m_can/m_can.c
@@ -839,7 +839,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);