Skip to content

Commit 1bc05cb

Browse files
committed
drivers: ethernet: nxp_enet: Fix PHY configure for fixed-link config
Update the driver to handle -ENOSYS from phy_configure_link(), which is now returned when the cfg_link callback is missing (e.g., in fixed-link PHYs). Signed-off-by: Ofir Shemesh <ofirshemesh777@gmail.com>
1 parent ad4c3e3 commit 1bc05cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/ethernet/eth_nxp_enet.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,17 +474,17 @@ static int nxp_enet_phy_configure(const struct device *phy, uint8_t phy_mode)
474474
/* Configure the PHY */
475475
ret = phy_configure_link(phy, speeds, 0);
476476

477-
if (ret == -ENOTSUP) {
477+
if (ret == -ENOSYS) {
478478
phy_get_link_state(phy, &state);
479479

480480
if (state.is_up) {
481-
LOG_WRN("phy_configure_link returned -ENOTSUP, but link is up. "
481+
LOG_WRN("phy_configure_link returned -ENOSYS, but link is up. "
482482
"Speed: %s, %s-duplex",
483483
PHY_LINK_IS_SPEED_1000M(state.speed) ? "1 Gbits" :
484484
PHY_LINK_IS_SPEED_100M(state.speed) ? "100 Mbits" : "10 Mbits",
485485
PHY_LINK_IS_FULL_DUPLEX(state.speed) ? "full" : "half");
486486
} else {
487-
LOG_ERR("phy_configure_link returned -ENOTSUP and link is down.");
487+
LOG_ERR("phy_configure_link returned -ENOSYS and link is down.");
488488
return -ENETDOWN;
489489
}
490490
} else if (ret) {

0 commit comments

Comments
 (0)