Commit 4f6d25de authored by David S. Miller's avatar David S. Miller

Merge tag 'linux-can-fixes-for-4.1-20150501' of...

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: default avatarDavid S. Miller <davem@davemloft.net>
parents f0e9fc50 5793affe
...@@ -509,10 +509,11 @@ static int xcan_rx(struct net_device *ndev) ...@@ -509,10 +509,11 @@ static int xcan_rx(struct net_device *ndev)
cf->can_id |= CAN_RTR_FLAG; cf->can_id |= CAN_RTR_FLAG;
} }
if (!(id_xcan & XCAN_IDR_SRR_MASK)) { /* DW1/DW2 must always be read to remove message from RXFIFO */
data[0] = priv->read_reg(priv, XCAN_RXFIFO_DW1_OFFSET); data[0] = priv->read_reg(priv, XCAN_RXFIFO_DW1_OFFSET);
data[1] = priv->read_reg(priv, XCAN_RXFIFO_DW2_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 */ /* Change Xilinx CAN data format to socketCAN data format */
if (cf->can_dlc > 0) if (cf->can_dlc > 0)
*(__be32 *)(cf->data) = cpu_to_be32(data[0]); *(__be32 *)(cf->data) = cpu_to_be32(data[0]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment