Skip to content

Commit a1f6344

Browse files
jhnikulamarckleinebudde
authored andcommitted
can: m_can: process interrupt only when not runtime suspended
Avoid processing bogus interrupt statuses when the HW is runtime suspended and the M_CAN_IR register read may get all bits 1's. Handler can be called if the interrupt request is shared with other peripherals or at the end of free_irq(). Therefore check the runtime suspended status before processing. Fixes: cdf8259 ("can: m_can: Add PM Support") Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Link: https://lore.kernel.org/r/20200915134715.696303-1-jarkko.nikula@linux.intel.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent cd9f13c commit a1f6344

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/net/can/m_can/m_can.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,8 @@ static irqreturn_t m_can_isr(int irq, void *dev_id)
956956
struct net_device_stats *stats = &dev->stats;
957957
u32 ir;
958958

959+
if (pm_runtime_suspended(cdev->dev))
960+
return IRQ_NONE;
959961
ir = m_can_read(cdev, M_CAN_IR);
960962
if (!ir)
961963
return IRQ_NONE;

0 commit comments

Comments
 (0)