Skip to contentSkip to conversation

net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register

PATCH In review Andrew Lunn 2 participants 2 messages Mar 11, 2020 – Mar 12, 2020

Subsystems (4)
lore
Share & tools
lore

Andrew Lunn

author maintainer
#0 lore raw

PATCH 1/1 net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register

Only the bottom 12 bits contain the ATU bin occupancy statistics. The upper bits need masking off.

Fixes e0c69ca7dfbb ("net: dsa: mv88e6xxx: Add ATU occupancy via devlink resources")
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/dsa/mv88e6xxx/chip.c +2 -0
index 8c9289549688..2f993e673ec7 100644
@@ -2769,6 +2769,8 @@ static u64 mv88e6xxx_devlink_atu_bin_get(struct mv88e6xxx_chip *chip,
 		goto unlock;
 	}
 
+	occupancy &= MV88E6XXX_G2_ATU_STATS_MASK;
+
 unlock:
 	mv88e6xxx_reg_unlock(chip);
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw

From: Andrew Lunn <[email protected]>
Date: Wed, 11 Mar 2020 21:02:31 +0100

Quoted 5 lines

Only the bottom 12 bits contain the ATU bin occupancy statistics. The upper bits need masking off.

Fixes e0c69ca7dfbb ("net: dsa: mv88e6xxx: Add ATU occupancy via devlink resources")

Applied and queued up for -stable, thanks.