diff mbox series

[net-next,V2,4/4] net: phy: add support to get Master-Slave configuration

Message ID 20220616041226.26996-5-Raju.Lakkaraju@microchip.com (mailing list archive)
State Accepted
Commit 311abcdddc00aa733211fb3e92815155066896e1
Delegated to: Netdev Maintainers
Headers show
Series net: lan743x: PCI11010 / PCI11414 devices Enhancements | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
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 warning 4 maintainers not CCed: hkallweit1@gmail.com pabeni@redhat.com linux@armlinux.org.uk edumazet@google.com
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/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Raju Lakkaraju - I30499 June 16, 2022, 4:12 a.m. UTC
Add support to Master-Slave configuration and state

Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
---
Changes:                                                                        
V0 -> V1:                                                                       
  1. Remove the gpy_master_slave_cfg_get() function and use the                 
genphy_read_master_slave() funtion.

 drivers/net/phy/mxl-gpy.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Lunn June 16, 2022, 7:18 p.m. UTC | #1
\On Thu, Jun 16, 2022 at 09:42:26AM +0530, Raju Lakkaraju wrote:
> Add support to Master-Slave configuration and state
> 
> Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microchip.com>
> ---
> Changes:                                                                        
> V0 -> V1:                                                                       
>   1. Remove the gpy_master_slave_cfg_get() function and use the                 
> genphy_read_master_slave() funtion.

So much easier isn't it to make use of existing helpers.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 5ce1bf03bbd7..6c4da2f9e90a 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -295,6 +295,9 @@  static void gpy_update_interface(struct phy_device *phydev)
 				   ret);
 		break;
 	}
+
+	if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000)
+		genphy_read_master_slave(phydev);
 }
 
 static int gpy_read_status(struct phy_device *phydev)