Skip to content
Commit 38b4fe32 authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

net: usb: lan78xx: Connect PHY before registering MAC

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: 92571a1a

 ("lan78xx: Connect phy early")
Reported-by: default avatarDaniel Wagner <dwagner@suse.de>
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarDaniel Wagner <dwagner@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e381d2b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment