Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
On 2019/7/31 13:44, Heiner Kallweit wrote: > On 31.07.2019 05:33, liuyonglong wrote: >> >> >> On 2019/7/31 3:04, Heiner Kallweit wrote: >>> On 30.07.2019 08:35, liuyonglong wrote: :/sys/kernel/debug/tracing$ cat trace # tracer: nop # # entries-in-buffer/entries-written:

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread Heiner Kallweit
On 31.07.2019 05:33, liuyonglong wrote: > > > On 2019/7/31 3:04, Heiner Kallweit wrote: >> On 30.07.2019 08:35, liuyonglong wrote: >>> :/sys/kernel/debug/tracing$ cat trace >>> # tracer: nop >>> # >>> # entries-in-buffer/entries-written: 45/45 #P:128 >>> # >>> #

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
On 2019/7/31 3:04, Heiner Kallweit wrote: > On 30.07.2019 08:35, liuyonglong wrote: >> :/sys/kernel/debug/tracing$ cat trace >> # tracer: nop >> # >> # entries-in-buffer/entries-written: 45/45 #P:128 >> # >> # _-=> irqs-off >> # /

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread Heiner Kallweit
On 30.07.2019 08:35, liuyonglong wrote: > :/sys/kernel/debug/tracing$ cat trace > # tracer: nop > # > # entries-in-buffer/entries-written: 45/45 #P:128 > # > # _-=> irqs-off > # / _=> need-resched > #| /

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
On 2019/7/30 14:35, liuyonglong wrote: > :/sys/kernel/debug/tracing$ cat trace > # tracer: nop > # > # entries-in-buffer/entries-written: 45/45 #P:128 > # > # _-=> irqs-off > # / _=> need-resched > #|

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread liuyonglong
:/sys/kernel/debug/tracing$ cat trace # tracer: nop # # entries-in-buffer/entries-written: 45/45 #P:128 # # _-=> irqs-off # / _=> need-resched #| / _---=> hardirq/softirq #||

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-30 Thread Heiner Kallweit
On 30.07.2019 06:03, liuyonglong wrote: > > > On 2019/7/30 4:57, Heiner Kallweit wrote: >> On 29.07.2019 05:59, liuyonglong wrote: >>> >>> >>> On 2019/7/27 2:14, Heiner Kallweit wrote: On 26.07.2019 11:53, Yonglong Liu wrote: > According to the datasheet of Marvell phy and Realtek phy,

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-29 Thread liuyonglong
On 2019/7/30 4:57, Heiner Kallweit wrote: > On 29.07.2019 05:59, liuyonglong wrote: >> >> >> On 2019/7/27 2:14, Heiner Kallweit wrote: >>> On 26.07.2019 11:53, Yonglong Liu wrote: According to the datasheet of Marvell phy and Realtek phy, the copper link status should read twice, or

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-29 Thread Heiner Kallweit
On 29.07.2019 05:59, liuyonglong wrote: > > > On 2019/7/27 2:14, Heiner Kallweit wrote: >> On 26.07.2019 11:53, Yonglong Liu wrote: >>> According to the datasheet of Marvell phy and Realtek phy, the >>> copper link status should read twice, or it may get a fake link >>> up status, and cause

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-28 Thread liuyonglong
On 2019/7/27 2:14, Heiner Kallweit wrote: > On 26.07.2019 11:53, Yonglong Liu wrote: >> According to the datasheet of Marvell phy and Realtek phy, the >> copper link status should read twice, or it may get a fake link >> up status, and cause up->down->up at the first time when link up. >> This

Re: [RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-26 Thread Heiner Kallweit
On 26.07.2019 11:53, Yonglong Liu wrote: > According to the datasheet of Marvell phy and Realtek phy, the > copper link status should read twice, or it may get a fake link > up status, and cause up->down->up at the first time when link up. > This happens more oftem at Realtek phy. > This is not

[RFC] net: phy: read link status twice when phy_check_link_status()

2019-07-26 Thread Yonglong Liu
According to the datasheet of Marvell phy and Realtek phy, the copper link status should read twice, or it may get a fake link up status, and cause up->down->up at the first time when link up. This happens more oftem at Realtek phy. I add a fake status read, and can solve this problem. I also