]> git.baikalelectronics.ru Git - kernel.git/commit
can: xilinx_can: fix incorrect clear of non-processed interrupts
authorAnssi Hannula <anssi.hannula@bitwise.fi>
Mon, 26 Feb 2018 12:39:59 +0000 (14:39 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 23 Jul 2018 12:34:46 +0000 (14:34 +0200)
commit22bd06e63ecb794111229ff44c3a79de7c863168
treec0fd1f7f92f49a778e13fff5708f056e65806b5f
parent2987055bc00aa357de88d55930c0f330e52f7db4
can: xilinx_can: fix incorrect clear of non-processed interrupts

xcan_interrupt() clears ERROR|RXOFLV|BSOFF|ARBLST interrupts if any of
them is asserted. This does not take into account that some of them
could have been asserted between interrupt status read and interrupt
clear, therefore clearing them without handling them.

Fix the code to only clear those interrupts that it knows are asserted
and therefore going to be processed in xcan_err_interrupt().

Fixes: 7b2a5faf4fb9 ("can: xilinx CAN controller support")
Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c