Netdev List
 help / color / mirror / Atom feed
* [PATCH] phy: fsl-lynx-10g: propagate PCVT enable errors
@ 2026-07-20 10:19 kr494167
  2026-07-20 12:14 ` Breno Leitao
  2026-07-20 12:16 ` Vladimir Oltean
  0 siblings, 2 replies; 3+ messages in thread
From: kr494167 @ 2026-07-20 10:19 UTC (permalink / raw)
  To: ioana.ciornei, vladimir.oltean, vkoul
  Cc: neil.armstrong, netdev, linux-phy, linux-kernel, surendra

From: surendra <kr494167@gmail.com>

lynx_10g_set_mode() currently ignores failures from
lynx_10g_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.

Signed-off-by: surendra <kr494167@gmail.com>
---
 drivers/phy/freescale/phy-fsl-lynx-10g.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-lynx-10g.c b/drivers/phy/freescale/phy-fsl-lynx-10g.c
index 38def160ef1a..9740b08700c4 100644
--- a/drivers/phy/freescale/phy-fsl-lynx-10g.c
+++ b/drivers/phy/freescale/phy-fsl-lynx-10g.c
@@ -1231,7 +1231,9 @@ static int lynx_10g_set_mode(struct phy *phy, enum phy_mode mode, int submode)
 
 	lynx_10g_lane_change_proto_conf(lane, lane_mode);
 	lynx_10g_lane_remap_pll(lane, lane_mode);
-	WARN_ON(lynx_10g_lane_enable_pcvt(lane, lane_mode));
+	err = lynx_10g_lane_enable_pcvt(lane, lane_mode);
+	if (err)
+		goto out;
 
 	lane->mode = lane_mode;
 
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-20 12:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20 10:19 [PATCH] phy: fsl-lynx-10g: propagate PCVT enable errors kr494167
2026-07-20 12:14 ` Breno Leitao
2026-07-20 12:16 ` Vladimir Oltean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox