]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: Fix clearing of stats counters
authorAndrew Lunn <andrew@lunn.ch>
Sat, 10 Nov 2018 23:41:10 +0000 (00:41 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Nov 2018 18:19:10 +0000 (10:19 -0800)
commitcd58106d56e9a58eed643673022c5d36115f8823
tree13032ddf45df812aeff628977c17d7b29b111e67
parent1715e20276357ceef90846defaa65f13a75f85d2
net: dsa: mv88e6xxx: Fix clearing of stats counters

The mv88e6161 would sometime fail to probe with a timeout waiting for
the switch to complete an operation. This operation is supposed to
clear the statistics counters. However, due to a read/modify/write,
without the needed mask, the operation actually carried out was more
random, with invalid parameters, resulting in the switch not
responding. We need to preserve the histogram mode bits, so apply a
mask to keep them.

Reported-by: Chris Healy <Chris.Healy@zii.aero>
Fixes: 9c4606a08861 ("net: dsa: mv88e6xxx: Fix stats histogram mode")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/global1.c