]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: Hold mutex while doing stats operations
authorAndrew Lunn <andrew@lunn.ch>
Thu, 1 Mar 2018 01:02:28 +0000 (02:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Mar 2018 18:34:18 +0000 (13:34 -0500)
commit8ea2405843eb9ba16e99f39d7de2fac204454309
tree4f504c92a08a331fbb1908c47fb0e3bcdf3b2ed6
parente6b3294f58ebcb5b2e660041d2486fe86fc8e3fd
net: dsa: mv88e6xxx: Hold mutex while doing stats operations

Until now, there has been no need to hold the reg mutex while getting
the count of statistics, or the strings, because the hardware was not
accessed. When adding support for SERDES statistics, it is necessary
to access the hardware, to determine if a port is using the SERDES
interface. So add mutex lock/unlocks.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c