diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-05-09 20:22:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-09 21:26:10 +0300 |
commit | 2306251341bda39f1c3260bb96479db4dff2fe95 (patch) | |
tree | d8d18ded293ed35fe2b4174cfcd8738f3252a03a /drivers/net/dsa/mv88e6xxx.c | |
parent | aadbdb8a0da6c38e8370fb7cd860f38b266c6037 (diff) | |
download | linux-2306251341bda39f1c3260bb96479db4dff2fe95.tar.xz |
net: dsa: mv88e6131: add registers access
Only 6131 was not supporting the port registers access yet. Assume such
support and use the unlock access routines in the meantime.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx.c')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index 6aac58b8b78b..c28ad83ee74d 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c @@ -787,13 +787,17 @@ void mv88e6xxx_get_regs(struct dsa_switch *ds, int port, memset(p, 0xff, 32 * sizeof(u16)); + mutex_lock(&ps->smi_mutex); + for (i = 0; i < 32; i++) { int ret; - ret = mv88e6xxx_reg_read(ps, REG_PORT(port), i); + ret = _mv88e6xxx_reg_read(ps, REG_PORT(port), i); if (ret >= 0) p[i] = ret; } + + mutex_unlock(&ps->smi_mutex); } static int _mv88e6xxx_wait(struct mv88e6xxx_priv_state *ps, int reg, int offset, |