mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
As soon as the netdev is registers, the kernel can start using the
interface. If the driver connects the MAC to the PHY after the netdev
is registered, there is a race condition where the interface can be
opened without having the PHY connected.
Change the order to close this race condition.
Fixes: 92571a1aae ("lan78xx: Connect phy early")
Reported-by: Daniel Wagner <[email protected]>
Signed-off-by: Andrew Lunn <[email protected]>
Tested-by: Daniel Wagner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>