net: phy: disable aneg in genphy_c45_pma_setup_forced
Subsystems (4)
Heiner Kallweit
maintainerv2 cover net: phy: disable aneg in genphy_c45_pma_setup_forced
When genphy_c45_pma_setup_forced() is called the "aneg enabled" bit may still be set, therefore clear it. This is also in line with what genphy_setup_forced() does for Clause 22.
v2:
- fix a typo in patch 1
Heiner Kallweit (2):
net: phy: disable aneg in genphy_c45_pma_setup_forced
net: phy: marvell10g: improve mv3310_config_aneg
drivers/net/phy/marvell10g.c | 9 ++------- drivers/net/phy/phy-c45.c | 4 ++++ 2 files changed, 6 insertions(+), 7 deletions(-)
Signature · 1 line
2.20.1
Heiner Kallweit
maintainerPATCH v2 1/2 net: phy: disable aneg in genphy_c45_pma_setup_forced
When genphy_c45_pma_setup_forced() is called the "aneg enabled" bit may still be set, therefore clear it. This is also in line with what genphy_setup_forced() does for Clause 22.
v2:
- fix typo
--- drivers/net/phy/phy-c45.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/phy/phy-c45.c +5 -1
@@ -70,7 +70,11 @@ int genphy_c45_pma_setup_forced(struct phy_device *phydev)if (ret <0 )return ret; -return phy_write_mmd (phydev,MDIO_MMD_PMAPMD ,MDIO_CTRL2 , ctrl2); + ret =phy_write_mmd (phydev,MDIO_MMD_PMAPMD ,MDIO_CTRL2 , ctrl2); +if (ret <0 ) +return ret; + +return genphy_c45_an_disable_aneg (phydev); }EXPORT_SYMBOL_GPL (genphy_c45_pma_setup_forced);
Signature · 1 line
2.20.1
Heiner Kallweit
maintainerPATCH v2 2/2 net: phy: marvell10g: improve mv3310_config_aneg
In reply to Heiner KallweitNow that genphy_c45_pma_setup_forced() makes sure the "aneg enabled" bit is cleared, the call to genphy_c45_an_disable_aneg() isn't needed any longer. And the code pattern is now the same as in genphy_config_aneg().
--- drivers/net/phy/marvell10g.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/net/phy/marvell10g.c +2 -7
@@ -271,13 +271,8 @@ static int mv3310_config_aneg(struct phy_device *phydev)/* We don't support manual MDI control */ phydev->mdix_ctrl =ETH_TP_MDI_AUTO ; -if (phydev->autoneg ==AUTONEG_DISABLE ) { - ret =genphy_c45_pma_setup_forced (phydev); -if (ret <0 ) -return ret; - -return genphy_c45_an_disable_aneg (phydev); - } +if (phydev->autoneg ==AUTONEG_DISABLE ) +return genphy_c45_pma_setup_forced (phydev);linkmode_and (phydev->advertising, phydev->advertising, phydev->supported);
Signature · 1 line
2.20.1
Quoted 8 lines · Heiner Kallweit
When
genphy_c45_pma_setup_forced()is called the "aneg enabled" bit may still be set, therefore clear it. This is also in line with whatgenphy_setup_forced()does for Clause 22.v2:
- fix typoSigned-off-by Heiner Kallweit <[email protected]>
--
Florian
Re: [PATCH v2 net-next 2/2] net: phy: marvell10g: improve mv3310_config_aneg
In reply to Heiner KallweitQuoted 6 lines · Heiner Kallweit
Now that
genphy_c45_pma_setup_forced()makes sure the "aneg enabled" bit is cleared, the call togenphy_c45_an_disable_aneg()isn't needed any longer. And the code pattern is now the same as ingenphy_config_aneg().Signed-off-by Heiner Kallweit <[email protected]>
Signature · 1 line
Florian
From: Heiner Kallweit <[email protected]>
Date: Sat, 16 Feb 2019 20:39:57 +0100
Quoted 6 lines
When
genphy_c45_pma_setup_forced()is called the "aneg enabled" bit may still be set, therefore clear it. This is also in line with whatgenphy_setup_forced()does for Clause 22.v2:
- fix a typo in patch 1
Applied, thanks Heiner.