All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg
@ 2019-03-04 18:50 Heiner Kallweit
  2019-03-04 21:10 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2019-03-04 18:50 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, David Miller; +Cc: netdev

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>
---
 drivers/net/phy/phy-c45.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index c596eb54e..9e24d9569 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)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg
  2019-03-04 18:50 [PATCH net-next] net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg Heiner Kallweit
@ 2019-03-04 21:10 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-03-04 21:10 UTC (permalink / raw)
  To: hkallweit1; +Cc: andrew, f.fainelli, netdev

From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Mon, 4 Mar 2019 19:50:40 +0100

> 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>

Yep, this looks pretty straightforward.

Applied, thanks Heiner.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-04 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 18:50 [PATCH net-next] net: phy: use phy_modify_mmd_changed in genphy_c45_an_config_aneg Heiner Kallweit
2019-03-04 21:10 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.