Skip to content

Commit c69851e

Browse files
hkallweitdavem330
authored andcommitted
net: phy: set link state to down when creating the phy_device
Currently the link state is initialized to "up" when the phy_device is being created. This is not consistent with the phy state being initialized to PHY_DOWN. Usually this doen't do any harm because the link state is updated once the PHY reaches state PHY_AN. However e.g. if a LAN port isn't used and the PHY remains down this inconsistency remains and calls to functions like phy_print_status() give false results. Therefore change the initialization to link being down. Signed-off-by: Heiner Kallweit <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 83f7e38 commit c69851e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/phy_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
374374
dev->duplex = -1;
375375
dev->pause = 0;
376376
dev->asym_pause = 0;
377-
dev->link = 1;
377+
dev->link = 0;
378378
dev->interface = PHY_INTERFACE_MODE_GMII;
379379

380380
dev->autoneg = AUTONEG_ENABLE;

0 commit comments

Comments
 (0)