* [PATCH net] net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register
@ 2020-03-11 20:02 Andrew Lunn
2020-03-12 7:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2020-03-11 20:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Vivien Didelot, Chris Healy, Andrew Lunn
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")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 8c9289549688..2f993e673ec7 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register
2020-03-11 20:02 [PATCH net] net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register Andrew Lunn
@ 2020-03-12 7:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-12 7:02 UTC (permalink / raw)
To: andrew; +Cc: netdev, vivien.didelot, Chris.Healy
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 11 Mar 2020 21:02:31 +0100
> 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")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-12 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-11 20:02 [PATCH net] net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register Andrew Lunn
2020-03-12 7:02 ` David Miller
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).