Commit 3e21a10f authored by George McCollister's avatar George McCollister Committed by David S. Miller

lan743x: trim all 4 bytes of the FCS; not just 2

Trim all 4 bytes of the received FCS; not just 2 of them. Leaving 2
bytes of the FCS on the frame breaks DSA tailing tag drivers.

Fixes: a8db76d4 ("lan743x: boost performance on cpu archs w/o dma cache snooping")
Signed-off-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d8861bab
...@@ -2040,7 +2040,7 @@ lan743x_rx_trim_skb(struct sk_buff *skb, int frame_length) ...@@ -2040,7 +2040,7 @@ lan743x_rx_trim_skb(struct sk_buff *skb, int frame_length)
dev_kfree_skb_irq(skb); dev_kfree_skb_irq(skb);
return NULL; return NULL;
} }
frame_length = max_t(int, 0, frame_length - RX_HEAD_PADDING - 2); frame_length = max_t(int, 0, frame_length - RX_HEAD_PADDING - 4);
if (skb->len > frame_length) { if (skb->len > frame_length) {
skb->tail -= skb->len - frame_length; skb->tail -= skb->len - frame_length;
skb->len = frame_length; skb->len = frame_length;
......
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