mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-16 14:02:10 +00:00
phy layer: fix phy_mii_ioctl for autonegotiation
Fix a thinko (?) in setting phydev->autoneg. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
parent
44a5b3d539
commit
163642a24a
@ -261,7 +261,7 @@ void phy_sanitize_settings(struct phy_device *phydev)
|
||||
|
||||
/* Sanitize settings based on PHY capabilities */
|
||||
if ((features & SUPPORTED_Autoneg) == 0)
|
||||
phydev->autoneg = 0;
|
||||
phydev->autoneg = AUTONEG_DISABLE;
|
||||
|
||||
idx = phy_find_valid(phy_find_setting(phydev->speed, phydev->duplex),
|
||||
features);
|
||||
@ -374,7 +374,7 @@ int phy_mii_ioctl(struct phy_device *phydev,
|
||||
if (mii_data->phy_id == phydev->addr) {
|
||||
switch(mii_data->reg_num) {
|
||||
case MII_BMCR:
|
||||
if (val & (BMCR_RESET|BMCR_ANENABLE))
|
||||
if ((val & (BMCR_RESET|BMCR_ANENABLE)) == 0)
|
||||
phydev->autoneg = AUTONEG_DISABLE;
|
||||
else
|
||||
phydev->autoneg = AUTONEG_ENABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user