Skip to contentSkip to conversation

Patch "net: bcmgenet: correct MIB access of UniMAC RUNT counters" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Dec 18, 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: bcmgenet: correct MIB access of UniMAC RUNT counters

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-bcmgenet-correct-mib-access-of-unimac-runt-counters.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 foo@baz Mon Dec 18 14:47:43 CET 2017

From: Doug Berger <[email protected]>
Date: Thu, 9 Mar 2017 16:58:44 -0800
Subject: net: bcmgenet: correct MIB access of UniMAC RUNT counters

From: Doug Berger <[email protected]>

[ Upstream commit 1ad3d225e5a40ca6c586989b4baaca710544c15a ]

The gap between the Tx status counters and the Rx RUNT counters is now being added to allow correct reporting of the registers.

Fixes 1c1008c793fa ("net: bcmgenet: add main driver file")
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +7 -4
@@ -876,13 +876,16 @@ static void bcmgenet_update_mib_counters
 		case BCMGENET_STAT_NETDEV:
 		case BCMGENET_STAT_SOFT:
 			continue;
-		case BCMGENET_STAT_MIB_RX:
-		case BCMGENET_STAT_MIB_TX:
 		case BCMGENET_STAT_RUNT:
-			if (s->type != BCMGENET_STAT_MIB_RX)
-				offset = BCMGENET_STAT_OFFSET;
+			offset += BCMGENET_STAT_OFFSET;
+			/* fall through */
+		case BCMGENET_STAT_MIB_TX:
+			offset += BCMGENET_STAT_OFFSET;
+			/* fall through */
+		case BCMGENET_STAT_MIB_RX:
 			val = bcmgenet_umac_readl(priv,
 						  UMAC_MIB_START + j + offset);
+			offset = 0;	/* Reset Offset */
 			break;
 		case BCMGENET_STAT_MISC:
 			if (GENET_IS_V1(priv)) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/net-bcmgenet-correct-the-rbuf_ovfl_cnt-and-rbuf_err_cnt-mib-values.patch queue-4.4/net-bcmgenet-correct-mib-access-of-unimac-runt-counters.patch queue-4.4/net-bcmgenet-power-down-internal-phy-if-open-or-resume-fails.patch queue-4.4/net-bcmgenet-reserved-phy-revisions-must-be-checked-first.patch queue-4.4/net-bcmgenet-power-up-the-internal-phy-before-probing-the-mii.patch