]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/blobdiff - drivers/net/phy/phy_device.c
phylib: Fix race between returning phydev and calling adjust_link
[lisovros/linux_canprio.git] / drivers / net / phy / phy_device.c
index c0761197c07e6a94e67e3d0d4f417d888e2ec68f..16ddc77313cb08348b3cdbdb7016bd5c56fb9304 100644 (file)
@@ -466,6 +466,8 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
 
        phydev->interface = interface;
 
+       phydev->state = PHY_READY;
+
        /* Do initial configuration here, now that
         * we have certain key parameters
         * (dev_flags and interface) */