diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-01-07 21:01:57 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-15 13:42:55 +0100 |
commit | 294f2c8896370e0ce6c258df140fafe8fc43a857 (patch) | |
tree | 261b89c0ce6d9a8c31905868465edc33d9fe97c8 /drivers/net | |
parent | ac77aab46168435a88911f5a3e1b9e0c246d3c14 (diff) | |
download | linux-rpi3-294f2c8896370e0ce6c258df140fafe8fc43a857.tar.gz linux-rpi3-294f2c8896370e0ce6c258df140fafe8fc43a857.tar.bz2 linux-rpi3-294f2c8896370e0ce6c258df140fafe8fc43a857.zip |
net: dsa: bcm_sf2: Utilize nested MDIO read/write
[ Upstream commit 2cfe8f8290bd28cf1ee67db914a6e76cf8e6437b ]
We are implementing a MDIO bus which is behind another one, so use the
nested version of the accessors to get lockdep annotations correct.
Fixes: 461cd1b03e32 ("net: dsa: bcm_sf2: Register our slave MDIO bus")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 2f9f910c0e40..2ce7ae97ac91 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -393,7 +393,7 @@ static int bcm_sf2_sw_mdio_read(struct mii_bus *bus, int addr, int regnum) if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr)) return bcm_sf2_sw_indir_rw(priv, 1, addr, regnum, 0); else - return mdiobus_read(priv->master_mii_bus, addr, regnum); + return mdiobus_read_nested(priv->master_mii_bus, addr, regnum); } static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum, @@ -407,7 +407,7 @@ static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum, if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr)) bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val); else - mdiobus_write(priv->master_mii_bus, addr, regnum, val); + mdiobus_write_nested(priv->master_mii_bus, addr, regnum, val); return 0; } |