mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-19 20:59:11 +08:00
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: fea23fb591 ("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>
This commit is contained in:
committed by
David S. Miller
parent
808cf9e38c
commit
18a5b052bb
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user