diff options
author | Andrew Lunn <andrew@lunn.ch> | 2015-06-05 01:10:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-07 12:19:22 -0700 |
commit | 80edb722b919500450e83c49c20a9dc706de2fa6 (patch) | |
tree | 9662d8e2475b9a8f3190f75c5a6aa191767778c9 | |
parent | d691f9e8d4405c334aa10d556e73c8bf44cb0e01 (diff) | |
download | linux-80edb722b919500450e83c49c20a9dc706de2fa6.tar.bz2 |
net: dsa: mv88e6xxx: Fix deadlock by double lock
ethtool -S on a DSA interface can deadlock for some switches because
the same lock is taken twice. Use the register read function which
expects the lock to be already held.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 31888234b736 ("net: dsa: mv88e6xxx: Replace stats mutex with SMI mutex")
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 7fba330ce702..39530fa142b0 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c @@ -703,8 +703,8 @@ static void _mv88e6xxx_get_ethtool_stats(struct dsa_switch *ds, u32 high = 0; if (s->reg >= 0x100) { - ret = mv88e6xxx_reg_read(ds, REG_PORT(port), - s->reg - 0x100); + ret = _mv88e6xxx_reg_read(ds, REG_PORT(port), + s->reg - 0x100); if (ret < 0) goto error; low = ret; |