diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-03-04 19:50:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-04 13:10:10 -0800 |
commit | 9731ea06298b2059b168076a9ddbf3e048fd42b5 (patch) | |
tree | 2e15721e809c221b06bcca067686f32292e598de /drivers | |
parent | 3acca1dd17060332cfab15693733cdaf9fba1c90 (diff) | |
download | linux-9731ea06298b2059b168076a9ddbf3e048fd42b5.tar.bz2 |
net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg
As can be seen from the usage of the return value, we should use
phy_modify_mmd_changed() here.
Fixes: 9a5dc8af4416 ("net: phy: add genphy_c45_an_config_aneg")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy-c45.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c index c596eb54e4ac..9e24d9569424 100644 --- a/drivers/net/phy/phy-c45.c +++ b/drivers/net/phy/phy-c45.c @@ -99,10 +99,10 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev) adv = linkmode_adv_to_mii_adv_t(phydev->advertising); - ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE, - ADVERTISE_ALL | ADVERTISE_100BASE4 | - ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM, - adv); + ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_ADVERTISE, + ADVERTISE_ALL | ADVERTISE_100BASE4 | + ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM, + adv); if (ret < 0) return ret; if (ret > 0) @@ -110,11 +110,10 @@ int genphy_c45_an_config_aneg(struct phy_device *phydev) adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising); - ret = phy_modify_mmd(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL, - MDIO_AN_10GBT_CTRL_ADV10G | - MDIO_AN_10GBT_CTRL_ADV5G | - MDIO_AN_10GBT_CTRL_ADV2_5G, - adv); + ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL, + MDIO_AN_10GBT_CTRL_ADV10G | + MDIO_AN_10GBT_CTRL_ADV5G | + MDIO_AN_10GBT_CTRL_ADV2_5G, adv); if (ret < 0) return ret; if (ret > 0) |