diff mbox series

[net-next,v2,6/9] net: phy: marvell: mv88e1111 doesn't support isolate in SGMII mode

Message ID 20241004161601.2932901-7-maxime.chevallier@bootlin.com (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series Allow isolating PHY devices | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; GEN HAS DIFF 2 files changed, 102 insertions(+);
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 6 this patch: 6
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 6 this patch: 6
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
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: 5 this patch: 5
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 21 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 6 this patch: 6
netdev/source_inline success Was 0 now: 0

Commit Message

Maxime Chevallier Oct. 4, 2024, 4:15 p.m. UTC
The 88e1111 datasheet indicates that it supports the isolate mode in
GMII, RGMII and TBI modes, but doesn't mention what it does in the other
modes. Testing showed that setting the isolate bit while the PHY is in
SGMII mode has no effect.

Reflect that behaviour in the .can_isolate() driver ops.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
V2 : New patch

 drivers/net/phy/marvell.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 9964bf3dea2f..912b08d9c124 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1092,6 +1092,14 @@  static int m88e1111_set_tunable(struct phy_device *phydev,
 	}
 }
 
+static bool m88e1111_can_isolate(struct phy_device *phydev)
+{
+	if (phydev->interface == PHY_INTERFACE_MODE_SGMII)
+		return false;
+
+	return true;
+}
+
 static int m88e1011_get_downshift(struct phy_device *phydev, u8 *data)
 {
 	int val, cnt, enable;
@@ -3704,6 +3712,7 @@  static struct phy_driver marvell_drivers[] = {
 		.set_tunable = m88e1111_set_tunable,
 		.cable_test_start = m88e1111_vct_cable_test_start,
 		.cable_test_get_status = m88e1111_vct_cable_test_get_status,
+		.can_isolate = m88e1111_can_isolate,
 	},
 	{
 		.phy_id = MARVELL_PHY_ID_88E1111_FINISAR,