net: emacps: Fix netif_carrier handling
xemacps_open() initializes the carrier state as "on", which confuses 'ifplugd' (and probably other tools). The carrier state should reflect the link state, and the PHY is still down at this point. Instead, initialize the carrier state as "off", and do this before connecting the PHY. phy_state_machine() will set the carrier state to "on" when the link comes up. In xemacps_close(), still set the carrier state to "off", but do this after disconnecting the PHY. Signed-off-by:Thomas Betker <thomas.betker@rohde-schwarz.com> Signed-off-by:
Michal Simek <michal.simek@xilinx.com>
Loading
Please sign in to comment