diff options
author | David S. Miller <davem@davemloft.net> | 2015-05-04 06:45:09 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-04 06:45:09 +0300 |
commit | 4f6d25deed30e1c1918f9f7bbe7e63295ef2bf1b (patch) | |
tree | 661aa109d73036455ebaa4ab649c2a43de9a38a6 /drivers/net | |
parent | f0e9fc503a0d6c9d74ca5b6d1aaf87febbbd9b06 (diff) | |
parent | 5793affe8c723ece8114b898ab9003c7d97f86d1 (diff) | |
download | linux-4f6d25deed30e1c1918f9f7bbe7e63295ef2bf1b.tar.xz |
Merge tag 'linux-can-fixes-for-4.1-20150501' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can
Marc Kleine-Budde says:
====================
this is a pull request of a single patch for net/master.
The patch is contributed by Jeppe Ledet-Pedersen, it fixes the
extended frame handling in the xilinx driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/xilinx_can.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 6bddfe062b51..fc55e8e0351d 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -509,10 +509,11 @@ static int xcan_rx(struct net_device *ndev) cf->can_id |= CAN_RTR_FLAG; } - if (!(id_xcan & XCAN_IDR_SRR_MASK)) { - data[0] = priv->read_reg(priv, XCAN_RXFIFO_DW1_OFFSET); - data[1] = priv->read_reg(priv, XCAN_RXFIFO_DW2_OFFSET); + /* DW1/DW2 must always be read to remove message from RXFIFO */ + data[0] = priv->read_reg(priv, XCAN_RXFIFO_DW1_OFFSET); + data[1] = priv->read_reg(priv, XCAN_RXFIFO_DW2_OFFSET); + if (!(cf->can_id & CAN_RTR_FLAG)) { /* Change Xilinx CAN data format to socketCAN data format */ if (cf->can_dlc > 0) *(__be32 *)(cf->data) = cpu_to_be32(data[0]); |