aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
diff options
context:
space:
mode:
authorTomasz Maciej Nowak <tmn505@gmail.com>2020-11-23 14:59:45 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-11-25 13:57:50 +0100
commit92b3efec54b36797614650c830a57c4f8786b5c9 (patch)
tree4ed06c90bde035a38ecd6d9a79004717ec3ee5ce /target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
parentbffb30603cca586ee2a5713748ed1f6e76d6754b (diff)
downloadupstream-92b3efec54b36797614650c830a57c4f8786b5c9.tar.gz
upstream-92b3efec54b36797614650c830a57c4f8786b5c9.tar.bz2
upstream-92b3efec54b36797614650c830a57c4f8786b5c9.zip
mvebu: sort patches
Sort patches according to target/linux/generic/PATCHES. Additionally: - replace hashes in backported patches with the ones from main Linux tree - add descriptions to some patches Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> [remove 004-add_sata_disk_activity_trigger.patch separately] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch')
-rw-r--r--target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch b/target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
new file mode 100644
index 0000000000..adfa51e4e8
--- /dev/null
+++ b/target/linux/mvebu/patches-5.4/010-net-mvneta-fix-build-skb-for-bm-capable-devices.patch
@@ -0,0 +1,41 @@
+From b37fa92e20ef28aada852cbf03b368d29a20478c Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Thu, 14 Nov 2019 01:25:55 +0200
+Subject: [PATCH] net: mvneta: fix build skb for bm capable devices
+
+Fix build_skb for bm capable devices when they fall-back using swbm path
+(e.g. when bm properties are configured in device tree but
+CONFIG_MVNETA_BM_ENABLE is not set). In this case rx_offset_correction is
+overwritten so we need to use it building skb instead of
+MVNETA_SKB_HEADROOM directly
+
+Fixes: 8dc9a0888f4c ("net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine")
+Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support")
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Reported-by: Andrew Lunn <andrew@lunn.ch>
+Tested-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/marvell/mvneta.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -2167,7 +2167,7 @@ mvneta_swbm_rx_frame(struct mvneta_port
+ prefetch(data);
+
+ xdp->data_hard_start = data;
+- xdp->data = data + MVNETA_SKB_HEADROOM + MVNETA_MH_SIZE;
++ xdp->data = data + pp->rx_offset_correction + MVNETA_MH_SIZE;
+ xdp->data_end = xdp->data + data_len;
+ xdp_set_data_meta_invalid(xdp);
+
+@@ -2232,7 +2232,7 @@ mvneta_swbm_add_rx_fragment(struct mvnet
+ /* refill descriptor with new buffer later */
+ skb_add_rx_frag(rxq->skb,
+ skb_shinfo(rxq->skb)->nr_frags,
+- page, MVNETA_SKB_HEADROOM, data_len,
++ page, pp->rx_offset_correction, data_len,
+ PAGE_SIZE);
+ }
+ page_pool_release_page(rxq->page_pool, page);