]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: tcan4x5x: Fix use of register error status mask
authorMarkus Schneider-Pargmann <msp@baylibre.com>
Tue, 6 Dec 2022 11:57:26 +0000 (12:57 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:26:14 +0000 (13:26 +0100)
commit8e9b8913706132158f563200e3456562a67e50c9
tree52b42c8f671170975cf023189f33f0aff6eb9a12
parent3af7e106e6a6f2deef24b53917555bf20826f699
can: tcan4x5x: Fix use of register error status mask

[ Upstream commit 67727a17a6b375d68fe569b77e6516b034b834c0 ]

TCAN4X5X_ERROR_STATUS is not a status register that needs clearing
during interrupt handling. Instead this is a masking register that masks
error interrupts. Writing TCAN4X5X_CLEAR_ALL_INT to this register
effectively masks everything.

Rename the register and mask all error interrupts only once by writing
to the register in tcan4x5x_init.

Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Link: https://lore.kernel.org/all/20221206115728.1056014-10-msp@baylibre.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/can/m_can/tcan4x5x-core.c