summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIngo van Lil <inguin@gmx.de>2018-02-12 14:02:52 +0300
committerDavid S. Miller <davem@davemloft.net>2018-02-12 19:42:48 +0300
commit18a5b052bb1ae77453c5e50fffe3470ced9ed82f (patch)
treeaed020873e3b61aebaf5a5f7347cde3486b1f628 /drivers
parent808cf9e38cd7923036a99f459ccc8cf2955e47af (diff)
downloadlinux-18a5b052bb1ae77453c5e50fffe3470ced9ed82f.tar.xz
net: phy: fix wrong mask to phy_modify()
When forcing a specific link mode, the PHY driver must clear the existing speed and duplex bits in BMCR while preserving some other control bits. This logic was accidentally inverted with the introduction of phy_modify(). Fixes: fea23fb591cc ("net: phy: convert read-modify-write to phy_modify()") Signed-off-by: Ingo van Lil <inguin@gmx.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/phy_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index b13eed21c87d..d39ae77707ef 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -1382,7 +1382,7 @@ int genphy_setup_forced(struct phy_device *phydev)
ctl |= BMCR_FULLDPLX;
return phy_modify(phydev, MII_BMCR,
- BMCR_LOOPBACK | BMCR_ISOLATE | BMCR_PDOWN, ctl);
+ ~(BMCR_LOOPBACK | BMCR_ISOLATE | BMCR_PDOWN), ctl);
}
EXPORT_SYMBOL(genphy_setup_forced);