From: Mugunthan V N Date: Thu, 3 Sep 2015 10:20:21 +0000 (+0530) Subject: net: phy: on phy device create do not initialize link to 1 X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=26d3acdab86a4ade8e9407822d8cdbe51b1f7412;p=u-boot.git net: phy: on phy device create do not initialize link to 1 Currently when phy device is created the link variable is initialized to 1 which denoted phy link is already up. On a power reset there is no issue as phy status register link status will not be set, so phy auto negotiate will be started. But when a cpu reset is issued (ex: dra72x-evm) phy's link status bit is already set which leads to assume that link is already setup in genphy_update_link() initial check which results in ehternet not working. So do not assume that link is already up and on phy device create set link to zero. This is verified on dra72x-evm. Reported-by: Franklin S Cooper Jr Signed-off-by: Mugunthan V N Acked-by: Joe Hershberger --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 65c731afb6..a6023f1033 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -571,7 +571,7 @@ static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, memset(dev, 0, sizeof(*dev)); dev->duplex = -1; - dev->link = 1; + dev->link = 0; dev->interface = interface; dev->autoneg = AUTONEG_ENABLE;