diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-04-11 21:40:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-11 21:15:48 -0400 |
commit | 9a6f2b0113c8fce815db7c9d23754bdea4b428a0 (patch) | |
tree | 05e5b4205fb6aebdcf105fa8866cfeceeec93ff9 /drivers/net/phy/mdio_bus.c | |
parent | 7c3da7d0d4f3506ef70d9cf148a22400477854d0 (diff) | |
download | linux-9a6f2b0113c8fce815db7c9d23754bdea4b428a0.tar.bz2 |
net: mdio: Fix lockdep falls positive splat
MDIO devices can be stacked upon each other. The current code supports
two levels, which until recently has been enough for a DSA mdio bus on
top of another bus. Now we have hardware which has an MDIO mux in the
middle.
Define an MDIO MUTEX class with three levels.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 0cba64f1ecf4..751202a285a6 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c @@ -457,7 +457,7 @@ int mdiobus_read_nested(struct mii_bus *bus, int addr, u32 regnum) BUG_ON(in_interrupt()); - mutex_lock_nested(&bus->mdio_lock, SINGLE_DEPTH_NESTING); + mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); retval = bus->read(bus, addr, regnum); mutex_unlock(&bus->mdio_lock); @@ -509,7 +509,7 @@ int mdiobus_write_nested(struct mii_bus *bus, int addr, u32 regnum, u16 val) BUG_ON(in_interrupt()); - mutex_lock_nested(&bus->mdio_lock, SINGLE_DEPTH_NESTING); + mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED); err = bus->write(bus, addr, regnum, val); mutex_unlock(&bus->mdio_lock); |