]> Git Repo - linux.git/commit
net: usb: lan78xx: Connect PHY before registering MAC
authorAndrew Lunn <[email protected]>
Thu, 17 Oct 2019 19:29:26 +0000 (21:29 +0200)
committerDavid S. Miller <[email protected]>
Fri, 18 Oct 2019 17:22:04 +0000 (10:22 -0700)
commit38b4fe320119859c11b1dc06f6b4987a16344fa1
tree4ae04c34ed6e6b86314e9aa25feda0c8eaa0bff0
parente381d2b4e25306140fdedfd802f0913b901a2d31
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: 92571a1aae40 ("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]>
drivers/net/usb/lan78xx.c
This page took 0.049272 seconds and 4 git commands to generate.