Skip to contentSkip to conversation

Patch "net: bgmac: Fix SOF bit checking" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From d2b13233879ca1268a1c027d4573109e5a777811 Mon Sep 17 00:00:00 2001

From: Florian Fainelli <[email protected]>
Date: Thu, 23 Jun 2016 14:23:12 -0700
Subject: net: bgmac: Fix SOF bit checking

From: Florian Fainelli <[email protected]>

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")
---
 drivers/net/ethernet/broadcom/bgmac.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/broadcom/bgmac.c +3 -2
@@ -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 [email protected] 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