Skip to contentSkip to conversation

net: phy: on phy device create do not initialize link to 1

PATCH New Mugunthan V N 2 participants 4 messages Sep 3, 2015 – Sep 30, 2015 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

Verified on DRA72x EVM Logs [1]

[1]: http://pastebin.ubuntu.com/12261964/

---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/phy.c +1 -1
index 65c731a..a6023f1 100644
@@ -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;
Signature · 1 line
2.5.1.522.g7aa67f6
#1 lore raw

PATCH 1/1 net: phy: on phy device create do not initialize link to 1

Quoted 10 lines · Mugunthan V N

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.

Quoted 2 lines
#2 lore raw

PATCH 1/1 net: phy: on phy device create do not initialize link to 1

Quoted 11 lines · Joe Hershberger
Quoted 10 lines · Mugunthan V N

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.

Quoted 5 lines
Quoted 2 lines

Joe,

A gentle ping on this patch.

Regards
Mugunthan V N

A message that is not in the archive (sent off-list or not yet received): CANr=Z=bGA2zRKkjjhn4cD2XhyLUJ6+TPOanzv-Z_Aw_4r9ba2w@mail.gmail.com

#4 lore raw

PATCH 1/1 net: phy: on phy device create do not initialize link to 1

Quoted 16 lines · Joe Hershberger
Quoted 15 lines · Mugunthan V N
Quoted 14 lines · Joe Hershberger
Quoted 12 lines · Mugunthan V N

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.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Joe,

A gentle ping on this patch.

This will go in for next release, since it was outside the merge window.

Decided to pull this in for this release.

Applied to u-boot-net/master, thanks!

-Joe