diff mbox series

[net,v2] net: phy: LAN87xx: remove genphy_softreset in config_aneg

Message ID 20220407044610.8710-1-arun.ramadoss@microchip.com (mailing list archive)
State Accepted
Commit b2cd2cde7d690b760bcdd675380ff37c3e1aa38d
Delegated to: Netdev Maintainers
Headers show
Series [net,v2] net: phy: LAN87xx: remove genphy_softreset in config_aneg | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 9 of 9 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Arun Ramadoss April 7, 2022, 4:46 a.m. UTC
When the T1 phy master/slave state is changed, at the end of config_aneg
function genphy_softreset is called. After the reset all the registers
configured during the config_init are restored to default value.
To avoid this, removed the genphy_softreset call.

v1->v2
------
Added the author in cc

Fixes: 8a1b415d70b7 ("net: phy: added ethtool master-slave configuration support")
Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
---
 drivers/net/phy/microchip_t1.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 11, 2022, 10 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 7 Apr 2022 10:16:10 +0530 you wrote:
> When the T1 phy master/slave state is changed, at the end of config_aneg
> function genphy_softreset is called. After the reset all the registers
> configured during the config_init are restored to default value.
> To avoid this, removed the genphy_softreset call.
> 
> v1->v2
> 
> [...]

Here is the summary with links:
  - [net,v2] net: phy: LAN87xx: remove genphy_softreset in config_aneg
    https://git.kernel.org/netdev/net/c/b2cd2cde7d69

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/phy/microchip_t1.c b/drivers/net/phy/microchip_t1.c
index 389df3f4293c..3f79bbbe62d3 100644
--- a/drivers/net/phy/microchip_t1.c
+++ b/drivers/net/phy/microchip_t1.c
@@ -706,7 +706,6 @@  static int lan87xx_read_status(struct phy_device *phydev)
 static int lan87xx_config_aneg(struct phy_device *phydev)
 {
 	u16 ctl = 0;
-	int rc;
 
 	switch (phydev->master_slave_set) {
 	case MASTER_SLAVE_CFG_MASTER_FORCE:
@@ -722,11 +721,7 @@  static int lan87xx_config_aneg(struct phy_device *phydev)
 		return -EOPNOTSUPP;
 	}
 
-	rc = phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl);
-	if (rc == 1)
-		rc = genphy_soft_reset(phydev);
-
-	return rc;
+	return phy_modify_changed(phydev, MII_CTRL1000, CTL1000_AS_MASTER, ctl);
 }
 
 static struct phy_driver microchip_t1_phy_driver[] = {