Skip to contentSkip to conversation

Patch "net: fec: Call swap_buffer() prior to IP header alignment" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Nov 10, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net: fec: Call swap_buffer() prior to IP header alignment

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-fec-call-swap_buffer-prior-to-ip-header-alignment.patch
and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Thu Nov 10 16:43:03 CET 2016

From: Fabio Estevam <[email protected]>
Date: Fri, 21 Oct 2016 09:34:29 -0200
Subject: net: fec: Call swap_buffer() prior to IP header alignment

From: Fabio Estevam <[email protected]>

[ Upstream commit 235bde1ed3f0fff0f68f367ec8807b89ea151258 ]

Commit 3ac72b7b63d5 ("net: fec: align IP header in hardware") breaks networking on mx28.

There is an erratum on mx28 (ENGR121613 - ENET big endian mode not compatible with ARM little endian) that requires an additional byte-swap operation to workaround this problem.

So call swap_buffer() prior to performing the IP header alignment to restore network functionality on mx28.

Fixes 3ac72b7b63d5 ("net: fec: align IP header in hardware")
Reported-and-tested-by Henri Roosen <[email protected]>
---
 drivers/net/ethernet/freescale/fec_main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +3 -3
@@ -1430,14 +1430,14 @@ fec_enet_rx_queue(struct net_device *nde
 		skb_put(skb, pkt_len - 4);
 		data = skb->data;
 
+		if (!is_copybreak && need_swap)
+			swap_buffer(data, pkt_len);
+
 #if !defined(CONFIG_M5272)
 		if (fep->quirks & FEC_QUIRK_HAS_RACC)
 			data = skb_pull_inline(skb, 2);
 #endif
 
-		if (!is_copybreak && need_swap)
-			swap_buffer(data, pkt_len);
-
 		/* Extract the enhanced buffer descriptor */
 		ebdp = NULL;
 		if (fep->bufdesc_ex)

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/net-fec-call-swap_buffer-prior-to-ip-header-alignment.patch