]> git.baikalelectronics.ru Git - kernel.git/commit
net: can: xilinx_can: fix extended frame handling
authorJeppe Ledet-Pedersen <jlp@gomspace.com>
Wed, 29 Apr 2015 15:05:01 +0000 (17:05 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 1 May 2015 08:11:46 +0000 (10:11 +0200)
commitb0e4f118378c29ac1b77ca8cdbaaa3f7f46af53a
treef800108f026f376b55899845adff6f56080787c7
parentc0942ccebfdd090ec2681c31444b5cfacf9001c2
net: can: xilinx_can: fix extended frame handling

Using IDR_SRR in RXFIFO_ID to test for the presence of data is only
valid for standard frames. For extended frames the bit is always 1 and
IDR_RTR should be used instead. This patch switches the check to use
CAN_RTR_FLAG which is correctly set when reading the ID.

The patch also changes the DW1/DW2 to be read unconditionally, since
this is necessary to remove the frame from the RXFIFO.

Signed-off-by: Jeppe Ledet-Pedersen <jlp@gomspace.com>
Acked-by: Kedareswara rao Appana <appanad@xilinx.com>
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/xilinx_can.c