aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2017-01-31 21:00:51 +0100
committerRafał Miłecki <rafal@milecki.pl>2017-02-05 22:38:26 +0100
commitf61044a9b0f37cfee8b2ce0d205403115b7e0107 (patch)
treeaf4704a0eee1a275804b49860293c839a7f1d4f0 /target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch
parent36288db2fd857643cd9c4437322614d8f14e4b69 (diff)
downloadupstream-f61044a9b0f37cfee8b2ce0d205403115b7e0107.tar.gz
upstream-f61044a9b0f37cfee8b2ce0d205403115b7e0107.tar.bz2
upstream-f61044a9b0f37cfee8b2ce0d205403115b7e0107.zip
kernel: rename bgmac patches to squeeze them
This is a pure rename without any changes. It makes maintaining bgmac simpler and will hopefully make adding new kernel a bit easier. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch')
-rw-r--r--target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch b/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch
new file mode 100644
index 0000000000..ea73fda6ff
--- /dev/null
+++ b/target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch
@@ -0,0 +1,37 @@
+From d2b13233879ca1268a1c027d4573109e5a777811 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Thu, 23 Jun 2016 14:23:12 -0700
+Subject: [PATCH 1/3] net: bgmac: Fix SOF bit checking
+
+We are checking for the Start of Frame bit in the ctl1 word, while this
+bit is set in the ctl0 word instead. Read the ctl0 word and update the
+check to verify that.
+
+Fixes: 9cde94506eac ("bgmac: implement scatter/gather support")
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/broadcom/bgmac.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bgmac.c
++++ b/drivers/net/ethernet/broadcom/bgmac.c
+@@ -269,15 +269,16 @@ static void bgmac_dma_tx_free(struct bgm
+ while (ring->start != ring->end) {
+ int slot_idx = ring->start % BGMAC_TX_RING_SLOTS;
+ struct bgmac_slot_info *slot = &ring->slots[slot_idx];
+- u32 ctl1;
++ u32 ctl0, ctl1;
+ int len;
+
+ if (slot_idx == empty_slot)
+ break;
+
++ ctl0 = le32_to_cpu(ring->cpu_base[slot_idx].ctl0);
+ ctl1 = le32_to_cpu(ring->cpu_base[slot_idx].ctl1);
+ len = ctl1 & BGMAC_DESC_CTL1_LEN;
+- if (ctl1 & BGMAC_DESC_CTL0_SOF)
++ if (ctl0 & BGMAC_DESC_CTL0_SOF)
+ /* Unmap no longer used buffer */
+ dma_unmap_single(dma_dev, slot->dma_addr, len,
+ DMA_TO_DEVICE);