can: m_can: Process interrupt only when not runtime suspended
Subsystems (2)
PATCH 1/1 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.
Signed-off-by Jarkko Nikula <[email protected]>
--- drivers/net/can/m_can/m_can.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/can/m_can/m_can.c +2 -0
@@ -956,6 +956,8 @@ static irqreturn_t m_can_isr(int irq, void *dev_id)struct net_device_stats *stats = &dev->stats;u32 ir; +if (pm_runtime_suspended (cdev->dev)) +return IRQ_NONE ; ir =m_can_read (cdev,M_CAN_IR );if (!ir)return IRQ_NONE ;
Signature · 1 line
2.28.0
Marc Kleine-Budde
maintainerQuoted 8 lines · Jarkko Nikula
Avoid processing bogus interrupt statuses when the HW is runtime suspended and the
M_CAN_IRregister read may get all bits 1's. Handler can be called if the interrupt request is shared with other peripherals or at the end offree_irq().Therefore check the runtime suspended status before processing.
Signed-off-by Jarkko Nikula <[email protected]>
Applied to linux-can/testing
Tnx,
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 |