]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: m_can: process interrupt only when not runtime suspended
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 15 Sep 2020 13:47:15 +0000 (16:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Nov 2020 12:39:04 +0000 (13:39 +0100)
commita0a05cd23fa89e7a022664f654549c60344b7a87
treef182a7198e10324c4889ccaece27e90fdaa3c2aa
parentce9824af47d5159322f6563bfdcd82b0a777f92a
can: m_can: process interrupt only when not runtime suspended

[ Upstream commit a1f634463aaf2c94dfa13001dbdea011303124cc ]

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: cdf8259d6573 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/m_can/m_can.c