can: c_can: Fix RX message handling, handle lost message before EOB
authorMarkus Pargmann <mpa@pengutronix.de>
Mon, 28 Oct 2013 08:54:40 +0000 (09:54 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 31 Oct 2013 19:18:47 +0000 (20:18 +0100)
commit5d0f801a2ccec3b1fdabc3392c8d99ed0413d216
tree1f14267633c2f77bba89877beb51fc9db49c3058
parentc17cb8b55b104c549aa20a72fa44141ad2c65ec2
can: c_can: Fix RX message handling, handle lost message before EOB

If we handle end of block messages with higher priority than a lost message,
we can run into an endless interrupt loop.

This is reproducable with a am335x processor and "cansequence -r" at 1Mbit.
As soon as we loose a packet we can't escape from an interrupt loop.

This patch fixes the problem by handling lost packets before EOB packets.

Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/c_can/c_can.c