Skip to content

Commit 1b0face

Browse files
Siddharth-Vadapalli-at-TIsmb49
authored andcommitted
phy: ti: j721e-wiz: Fix unreachable code in wiz_mode_select()
BugLink: https://bugs.launchpad.net/bugs/2025067 [ Upstream commit 57c0e13 ] In the wiz_mode_select() function, the configuration performed for PHY_TYPE_USXGMII is unreachable. Fix it. Fixes: b64a85f ("phy: ti: phy-j721e-wiz.c: Add usxgmii support in wiz driver") Signed-off-by: Siddharth Vadapalli <[email protected]> Reviewed-by: Roger Quadros <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 9cb0735 commit 1b0face

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/phy/ti/phy-j721e-wiz.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,18 +430,17 @@ static int wiz_mode_select(struct wiz *wiz)
430430
int i;
431431

432432
for (i = 0; i < num_lanes; i++) {
433-
if (wiz->lane_phy_type[i] == PHY_TYPE_DP)
433+
if (wiz->lane_phy_type[i] == PHY_TYPE_DP) {
434434
mode = LANE_MODE_GEN1;
435-
else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII)
435+
} else if (wiz->lane_phy_type[i] == PHY_TYPE_QSGMII) {
436436
mode = LANE_MODE_GEN2;
437-
else
438-
continue;
439-
440-
if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
437+
} else if (wiz->lane_phy_type[i] == PHY_TYPE_USXGMII) {
441438
ret = regmap_field_write(wiz->p0_mac_src_sel[i], 0x3);
442439
ret = regmap_field_write(wiz->p0_rxfclk_sel[i], 0x3);
443440
ret = regmap_field_write(wiz->p0_refclk_sel[i], 0x3);
444441
mode = LANE_MODE_GEN1;
442+
} else {
443+
continue;
445444
}
446445

447446
ret = regmap_field_write(wiz->p_standard_mode[i], mode);

0 commit comments

Comments
 (0)