public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1
@ 2015-09-03 10:20 Mugunthan V N
  2015-09-04 15:31 ` Joe Hershberger
  0 siblings, 1 reply; 4+ messages in thread
From: Mugunthan V N @ 2015-09-03 10:20 UTC (permalink / raw)
  To: u-boot

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>
---

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(-)

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 65c731a..a6023f1 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;
-- 
2.5.1.522.g7aa67f6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1
  2015-09-03 10:20 [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1 Mugunthan V N
@ 2015-09-04 15:31 ` Joe Hershberger
  2015-09-15  7:57   ` Mugunthan V N
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Hershberger @ 2015-09-04 15:31 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 3, 2015 at 5:20 AM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
> 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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1
  2015-09-04 15:31 ` Joe Hershberger
@ 2015-09-15  7:57   ` Mugunthan V N
       [not found]     ` <CANr=Z=bGA2zRKkjjhn4cD2XhyLUJ6+TPOanzv-Z_Aw_4r9ba2w@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Mugunthan V N @ 2015-09-15  7:57 UTC (permalink / raw)
  To: u-boot

On Friday 04 September 2015 09:01 PM, Joe Hershberger wrote:
> On Thu, Sep 3, 2015 at 5:20 AM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> 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>
> 

Joe,

A gentle ping on this patch.

Regards
Mugunthan V N

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1
       [not found]     ` <CANr=Z=bGA2zRKkjjhn4cD2XhyLUJ6+TPOanzv-Z_Aw_4r9ba2w@mail.gmail.com>
@ 2015-09-30 17:27       ` Joe Hershberger
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Hershberger @ 2015-09-30 17:27 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 24, 2015 at 4:31 PM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> On Tue, Sep 15, 2015 at 2:57 AM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>> On Friday 04 September 2015 09:01 PM, Joe Hershberger wrote:
>>> On Thu, Sep 3, 2015 at 5:20 AM, Mugunthan V N <mugunthanvnm@ti.com> wrote:
>>>> 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>
>>>
>>
>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-30 17:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-03 10:20 [U-Boot] [PATCH] net: phy: on phy device create do not initialize link to 1 Mugunthan V N
2015-09-04 15:31 ` Joe Hershberger
2015-09-15  7:57   ` Mugunthan V N
     [not found]     ` <CANr=Z=bGA2zRKkjjhn4cD2XhyLUJ6+TPOanzv-Z_Aw_4r9ba2w@mail.gmail.com>
2015-09-30 17:27       ` Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox