Skip to content

Commit ddfb390

Browse files
maass-hamburgkartben
authored andcommitted
drivers: ethernet: nxp_imx_netc_psi: move net_if_carrier_off()
move net_if_carrier_off() before phy_link_callback_set() to ensure the carrier is not truned off, when the link is already up. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
1 parent 0e55a95 commit ddfb390

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ethernet/nxp_imx_netc/eth_nxp_imx_netc_psi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ static void netc_eth_iface_init(struct net_if *iface)
9393
LOG_ERR("PHY device (%p) is not ready, cannot init iface", cfg->phy_dev);
9494
return;
9595
}
96-
phy_link_callback_set(cfg->phy_dev, &netc_eth_phylink_callback, (void *)dev);
97-
9896
/* Do not start the interface until PHY link is up */
9997
net_if_carrier_off(iface);
98+
99+
phy_link_callback_set(cfg->phy_dev, &netc_eth_phylink_callback, (void *)dev);
100100
}
101101

102102
static int netc_eth_init(const struct device *dev)

0 commit comments

Comments
 (0)