diff options
author | 2015-12-03 10:02:35 +0100 | |
---|---|---|
committer | 2015-12-03 15:26:13 -0500 | |
commit | cf18b7788fe1bf99e9c2ab580b065bf2d3cb1a34 (patch) | |
tree | 32f7b797da77ecb96c17ab5b7fee48cbbd562ff1 /drivers | |
parent | Merge branch 'bnxt_en-fixes' (diff) | |
download | linux-cf18b7788fe1bf99e9c2ab580b065bf2d3cb1a34.tar.gz linux-cf18b7788fe1bf99e9c2ab580b065bf2d3cb1a34.tar.bz2 linux-cf18b7788fe1bf99e9c2ab580b065bf2d3cb1a34.zip |
net: phy: reset only targeted phy
It is possible to address another chip on same MDIO bus. The case is
correctly handled for media advertising. It is taken into account
only if mii_data->phy_id == phydev->addr. However, this condition
was missing for reset case.
Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 48ce6ef400fe..47cd306dbb3c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -448,7 +448,8 @@ int phy_mii_ioctl(struct phy_device *phydev, struct ifreq *ifr, int cmd) mdiobus_write(phydev->bus, mii_data->phy_id, mii_data->reg_num, val); - if (mii_data->reg_num == MII_BMCR && + if (mii_data->phy_id == phydev->addr && + mii_data->reg_num == MII_BMCR && val & BMCR_RESET) return phy_init_hw(phydev); |