diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-03-11 21:02:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-12 00:01:29 -0700 |
commit | 012fc74517b25177dfede2ed45cd108258564e4a (patch) | |
tree | 7bba4ff938bfa710497ce661d6577233896e86ce | |
parent | 06669ea346e476a5339033d77ef175566a40efbb (diff) | |
download | linux-012fc74517b25177dfede2ed45cd108258564e4a.tar.bz2 |
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")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/chip.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |