Browse Source

drivers: ethernet: nxp: don't fail with -EALREADY

don't fail with -EALREADY being returned from
phy_configure_link.

Fixes: #92281
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
pull/92715/head
Fin Maaß 6 days ago committed by Dan Kalowsky
parent
commit
19a3b217e5
  1. 5
      drivers/ethernet/eth_nxp_enet.c

5
drivers/ethernet/eth_nxp_enet.c

@ -473,8 +473,9 @@ static int nxp_enet_phy_configure(const struct device *phy, uint8_t phy_mode) @@ -473,8 +473,9 @@ static int nxp_enet_phy_configure(const struct device *phy, uint8_t phy_mode)
/* Configure the PHY */
ret = phy_configure_link(phy, speeds, 0);
if (ret == -ENOTSUP || ret == -ENOSYS) {
if (ret == -EALREADY) {
return 0;
} else if (ret == -ENOTSUP || ret == -ENOSYS) {
phy_get_link_state(phy, &state);
if (state.is_up) {

Loading…
Cancel
Save