Commit d42be546fc6a61da7e2ca15bf3e91cc46f3210e6

Authored by Mugunthan V N
Committed by Lokesh Vutla
1 parent 3ec018bb44

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 <fcooper@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/net/phy/phy.c
... ... @@ -571,7 +571,7 @@
571 571 memset(dev, 0, sizeof(*dev));
572 572  
573 573 dev->duplex = -1;
574   - dev->link = 1;
  574 + dev->link = 0;
575 575 dev->interface = interface;
576 576  
577 577 dev->autoneg = AUTONEG_ENABLE;