All of lore.kernel.org
 help / color / mirror / Atom feed
* phy link status not stable
@ 2014-09-16 16:26 Mugunthan V N
  2014-09-16 17:09 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Mugunthan V N @ 2014-09-16 16:26 UTC (permalink / raw)
  To: netdev; +Cc: David Miller

Hi

While doing ifdown/ifup test, phy link up status is very much delayed
and also link up/down comes alternatively without physical link changes
which leads to ifup failure. in v3.12 internal tree there is no failure.
Pasting the logs below.

root@am437x-evm:~# ifup eth0
[  652.633204] net eth0: initializing cpsw version 1.15 (0)
[  652.717428] net eth0: phy found : id is : 0x221622
udhcpc (v1.20.2) started
Sending discover...
Sending discover...
[  658.717859] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full -
flow control rx/tx
Sending discover...
[  660.717894] cpsw 4a100000.ethernet eth0: Link is Down
[  661.717937] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full -
flow control rx/tx
No lease, failing
root@am437x-evm:~# udhcpc
udhcpc (v1.20.2) started
Sending discover...
Sending select for 172.24.190.6...
Lease of 172.24.190.6 obtained, lease time 3600
/etc/udhcpc.d/50default: Adding DNS 192.0.2.2
/etc/udhcpc.d/50default: Adding DNS 192.0.2.3
root@am437x-evm:~#

Is this a known issue or any pointers where to look for clues?

Setup: TI-AM437x EVM
Phy: Micrel KSZ9031 Gigabit PHY

Thanks,
Mugunthan V N

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

* Re: phy link status not stable
  2014-09-16 16:26 phy link status not stable Mugunthan V N
@ 2014-09-16 17:09 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2014-09-16 17:09 UTC (permalink / raw)
  To: Mugunthan V N; +Cc: netdev, David Miller

2014-09-16 9:26 GMT-07:00 Mugunthan V N <mugunthanvnm@ti.com>:
> Hi
>
> While doing ifdown/ifup test, phy link up status is very much delayed
> and also link up/down comes alternatively without physical link changes
> which leads to ifup failure. in v3.12 internal tree there is no failure.
> Pasting the logs below.

Assuming your driver calls phy_start() and phy_stop() from the
ndo_open() resp. ndo_stop() functions, these function calls are not
synchronous, as in they do not wait for the link to go UP resp. DOWN
before returning. The PHY state machine gets programmed to a new state
from phy_start() resp. phy_stop() and the next workqueue execution
will proceed with an actual state change.

>
> root@am437x-evm:~# ifup eth0
> [  652.633204] net eth0: initializing cpsw version 1.15 (0)
> [  652.717428] net eth0: phy found : id is : 0x221622
> udhcpc (v1.20.2) started
> Sending discover...
> Sending discover...
> [  658.717859] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full -
> flow control rx/tx
> Sending discover...
> [  660.717894] cpsw 4a100000.ethernet eth0: Link is Down
> [  661.717937] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full -
> flow control rx/tx
> No lease, failing
> root@am437x-evm:~# udhcpc
> udhcpc (v1.20.2) started
> Sending discover...
> Sending select for 172.24.190.6...
> Lease of 172.24.190.6 obtained, lease time 3600
> /etc/udhcpc.d/50default: Adding DNS 192.0.2.2
> /etc/udhcpc.d/50default: Adding DNS 192.0.2.3
> root@am437x-evm:~#
>
> Is this a known issue or any pointers where to look for clues?

This is not a known issue AFAICT, is the link really flapping? Not
sure if [1] could explain what you are seeing?

[1]: http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=95e8b10393f88a0db88d97e9d1953f01c854315a
could ex

>
> Setup: TI-AM437x EVM
> Phy: Micrel KSZ9031 Gigabit PHY
>
> Thanks,
> Mugunthan V N
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Florian

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

end of thread, other threads:[~2014-09-16 17:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16 16:26 phy link status not stable Mugunthan V N
2014-09-16 17:09 ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.