netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] lan743x: trim all 4 bytes of the FCS; not just 2
@ 2021-03-05 22:24 George McCollister
  2021-03-05 23:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: George McCollister @ 2021-03-05 22:24 UTC (permalink / raw)
  Cc: Bryan Whitehead, UNGLinuxDriver, David S. Miller, Jakub Kicinski,
	Sven Van Asbroeck, netdev, linux-kernel, George McCollister

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: a8db76d40e4d ("lan743x: boost performance on cpu archs w/o dma cache snooping")
Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 334e99ffe56f..360d16965a5c 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -2040,7 +2040,7 @@ lan743x_rx_trim_skb(struct sk_buff *skb, int frame_length)
 		dev_kfree_skb_irq(skb);
 		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) {
 		skb->tail -= skb->len - frame_length;
 		skb->len = frame_length;
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] lan743x: trim all 4 bytes of the FCS; not just 2
  2021-03-05 22:24 [PATCH net] lan743x: trim all 4 bytes of the FCS; not just 2 George McCollister
@ 2021-03-05 23:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-03-05 23:10 UTC (permalink / raw)
  To: George McCollister
  Cc: bryan.whitehead, UNGLinuxDriver, davem, kuba, thesven73, netdev,
	linux-kernel

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri,  5 Mar 2021 16:24:45 -0600 you wrote:
> 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: a8db76d40e4d ("lan743x: boost performance on cpu archs w/o dma cache snooping")
> Signed-off-by: George McCollister <george.mccollister@gmail.com>
> ---
>  drivers/net/ethernet/microchip/lan743x_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [net] lan743x: trim all 4 bytes of the FCS; not just 2
    https://git.kernel.org/netdev/net/c/3e21a10fdea3

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-05 23:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 22:24 [PATCH net] lan743x: trim all 4 bytes of the FCS; not just 2 George McCollister
2021-03-05 23:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).