Commit 4310e2f4 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Jakub Kicinski

net: phy: smsc: simplify lan95xx_config_aneg_ext

lan95xx_config_aneg_ext() can be simplified by using phy_set_bits().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/3da785c7-3ef8-b5d3-89a0-340f550be3c2@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 40bbae58
......@@ -178,18 +178,15 @@ static int lan87xx_config_aneg(struct phy_device *phydev)
static int lan95xx_config_aneg_ext(struct phy_device *phydev)
{
int rc;
if (phydev->phy_id != 0x0007c0f0) /* not (LAN9500A or LAN9505A) */
return lan87xx_config_aneg(phydev);
if (phydev->phy_id == 0x0007c0f0) { /* LAN9500A or LAN9505A */
/* Extend Manual AutoMDIX timer */
rc = phy_read(phydev, PHY_EDPD_CONFIG);
int rc = phy_set_bits(phydev, PHY_EDPD_CONFIG,
PHY_EDPD_CONFIG_EXT_CROSSOVER_);
if (rc < 0)
return rc;
}
rc |= PHY_EDPD_CONFIG_EXT_CROSSOVER_;
phy_write(phydev, PHY_EDPD_CONFIG, rc);
return lan87xx_config_aneg(phydev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment