* Patch "net: bgmac: Fix SOF bit checking" has been added to the 4.4-stable tree
@ 2017-07-03 9:52 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-07-03 9:52 UTC (permalink / raw)
To: f.fainelli, amit.pundir, davem, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net: bgmac: Fix SOF bit checking
to the 4.4-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-bgmac-fix-sof-bit-checking.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>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: net: bgmac: Fix SOF bit checking
From: Florian Fainelli <f.fainelli@gmail.com>
commit d2b13233879ca1268a1c027d4573109e5a777811 upstream.
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>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
@@ -255,15 +255,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);
Patches currently in stable-queue which might be from f.fainelli@gmail.com are
queue-4.4/net-korina-fix-napi-versus-resources-freeing.patch
queue-4.4/arm-dts-bcm5301x-correct-gic_ppi-interrupt-flags.patch
queue-4.4/net-bgmac-start-transmit-queue-in-bgmac_open.patch
queue-4.4/net-bgmac-fix-sof-bit-checking.patch
queue-4.4/net-bgmac-remove-superflous-netif_carrier_on.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-07-03 9:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03 9:52 Patch "net: bgmac: Fix SOF bit checking" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).