net: usb: lan78xx: Connect PHY before registering MAC
[ Upstream commit 38b4fe32 ] 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:Daniel Wagner <dwagner@suse.de> Signed-off-by:
Andrew Lunn <andrew@lunn.ch> Tested-by:
Daniel Wagner <dwagner@suse.de> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment