Thread (3 messages) 3 messages, 3 authors, 5d ago
COOLING5d

[PATCH] phy: fsl-lynx-28g: propagate PCVT enable errors

From: <hidden>
Date: 2026-07-22 03:36:45
Also in: linux-phy, lkml
Subsystem: generic phy framework, lynx serdes phy drivers, the rest · Maintainers: Vinod Koul, Ioana Ciornei, Vladimir Oltean, Linus Torvalds

From: surendra <redacted>

lynx_28g_set_mode() currently ignores failures from
lynx_28g_lane_enable_pcvt(). It then updates the lane mode and reports
success even though the protocol converter may remain disabled.

Propagate the error and leave the previous lane mode intact so the caller
can handle the failed reconfiguration.

Fixes: 8f73b37cf3fb ("phy: add support for the Layerscape SerDes 28G")
Signed-off-by: surendra <redacted>
---
 drivers/phy/freescale/phy-fsl-lynx-28g.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/freescale/phy-fsl-lynx-28g.c b/drivers/phy/freescale/phy-fsl-lynx-28g.c
index 38afcd081a2a..1fe406adc83c 100644
--- a/drivers/phy/freescale/phy-fsl-lynx-28g.c
+++ b/drivers/phy/freescale/phy-fsl-lynx-28g.c
@@ -1003,7 +1003,9 @@ static int lynx_28g_set_mode(struct phy *phy, enum phy_mode mode, int submode)
 
 	lynx_28g_lane_change_proto_conf(lane, lane_mode);
 	lynx_28g_lane_remap_pll(lane, lane_mode);
-	WARN_ON(lynx_28g_lane_enable_pcvt(lane, lane_mode));
+	err = lynx_28g_lane_enable_pcvt(lane, lane_mode);
+	if (err)
+		goto out;
 
 	lane->mode = lane_mode;
 
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help