From f61044a9b0f37cfee8b2ce0d205403115b7e0107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 31 Jan 2017 21:00:51 +0100 Subject: kernel: rename bgmac patches to squeeze them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ...-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch (limited to 'target/linux/generic/patches-4.4/071-v4.7-0001-net-bgmac-Fix-SOF-bit-checking.patch') 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 +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 +Signed-off-by: David S. Miller +--- + 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); -- cgit v1.2.3