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-01-31 22:04:08 +0100
commit7583de2e8fdc2fdcfb16dfd431590a4b4611bf52 (patch)
tree9e9906afb0a4531a2c0de72356d0b7c3cedd029a /target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch
parent4d10030c3ce822bc4e95aa134a5c61a7c34bc13f (diff)
downloadupstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.tar.gz
upstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.tar.bz2
upstream-7583de2e8fdc2fdcfb16dfd431590a4b4611bf52.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);