Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1630561 > unrolled thread

Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

Started byDavid Miller <davem@davemloft.net>
First post2017-04-25 16:40 +0200
Last post2017-04-26 12:30 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v1] net: phy: fix auto-negotiation stall due to  unavailable interrupt David Miller <davem@davemloft.net> - 2017-04-25 16:40 +0200
    Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt Alexander Kochetkov <al.kochet@gmail.com> - 2017-04-25 17:30 +0200
      Re: [PATCH v1] net: phy: fix auto-negotiation stall due to  unavailable interrupt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-04-25 22:20 +0200
        Re: [PATCH v1] net: phy: fix auto-negotiation stall due to  unavailable interrupt David Miller <davem@davemloft.net> - 2017-04-25 22:30 +0200
          Re: [PATCH v1] net: phy: fix auto-negotiation stall due to  unavailable interrupt Florian Fainelli <f.fainelli@gmail.com> - 2017-04-25 23:10 +0200
        Re: [PATCH v1] net: phy: fix auto-negotiation stall due to  unavailable interrupt Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-04-26 12:30 +0200

#1630561 — Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

FromDavid Miller <davem@davemloft.net>
Date2017-04-25 16:40 +0200
SubjectRe: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt
Message-ID<tA9Ng-5S4-13@gated-at.bofh.it>
From: Alexander Kochetkov <al.kochet@gmail.com>
Date: Thu, 20 Apr 2017 14:00:04 +0300

> The Ethernet link on an interrupt driven PHY was not coming up if the Ethernet
> cable was plugged before the Ethernet interface was brought up.
> 
> The patch trigger PHY state machine to update link state if PHY was requested to
> do auto-negotiation and auto-negotiation complete flag already set.
> 
> During power-up cycle the PHY do auto-negotiation, generate interrupt and set
> auto-negotiation complete flag. Interrupt is handled by PHY state machine but
> doesn't update link state because PHY is in PHY_READY state. After some time
> MAC bring up, start and request PHY to do auto-negotiation. If there are no new
> settings to advertise genphy_config_aneg() doesn't start PHY auto-negotiation.
> PHY continue to stay in auto-negotiation complete state and doesn't fire
> interrupt. At the same time PHY state machine expect that PHY started
> auto-negotiation and is waiting for interrupt from PHY and it won't get it.
> 
> Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com>
> Cc: stable <stable@vger.kernel.org> # v4.9+

So... what are we doing here?

My understanding is that this should fix the same problem that commit
99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
negotiation on startup") fixed and that this micrel commit should thus
be reverted to improve MAC startup times which regressed.

Florian, any guidance?

[toc] | [next] | [standalone]


#1630659 — Re: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt

FromAlexander Kochetkov <al.kochet@gmail.com>
Date2017-04-25 17:30 +0200
SubjectRe: [PATCH v1] net: phy: fix auto-negotiation stall due to unavailable interrupt
Message-ID<tAazF-6sV-51@gated-at.bofh.it>
In reply to#1630561
Hello David!

> 25 апр. 2017 г., в 17:36, David Miller <davem@davemloft.net> написал(а):
> 
> So... what are we doing here?
> 
> My understanding is that this should fix the same problem that commit
> 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
> negotiation on startup") fixed and that this micrel commit should thus
> be reverted to improve MAC startup times which regressed.
> 
> Florian, any guidance?

Yes, this should be done.

I aksed Alexandre to check if 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
negotiation on startup») can be reverted, and he answered what it may do that
sometime this/next week.

Alexander.

[toc] | [prev] | [next] | [standalone]


#1630963

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2017-04-25 22:20 +0200
Message-ID<tAf6i-Vi-13@gated-at.bofh.it>
In reply to#1630659
Hi,

On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote:
> Hello David!
> 
> > 25 апр. 2017 г., в 17:36, David Miller <davem@davemloft.net> написал(а):
> > 
> > So... what are we doing here?
> > 
> > My understanding is that this should fix the same problem that commit
> > 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
> > negotiation on startup") fixed and that this micrel commit should thus
> > be reverted to improve MAC startup times which regressed.
> > 
> > Florian, any guidance?
> 
> Yes, this should be done.
> 
> I aksed Alexandre to check if 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
> negotiation on startup») can be reverted, and he answered what it may do that
> sometime this/next week.
> 

Yes, it can be safely reverted after Alexander's patch. I had to test on
v4.7 because we are not using interrupts on those boards since v4.8
(another issue to be fixed).

As Florian pointed out, at the time I sent my patch, I didn't have time
to investigate whether this was affecting other phys, see
https://lkml.org/lkml/2016/2/26/766

I can send the revert or you can do it.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [next] | [standalone]


#1630976

FromDavid Miller <davem@davemloft.net>
Date2017-04-25 22:30 +0200
Message-ID<tAffY-Yq-33@gated-at.bofh.it>
In reply to#1630963
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Date: Tue, 25 Apr 2017 22:09:11 +0200

> Hi,
> 
> On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote:
>> Hello David!
>> 
>> > 25 апр. 2017 г., в 17:36, David Miller <davem@davemloft.net> написал(а):
>> > 
>> > So... what are we doing here?
>> > 
>> > My understanding is that this should fix the same problem that commit
>> > 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
>> > negotiation on startup") fixed and that this micrel commit should thus
>> > be reverted to improve MAC startup times which regressed.
>> > 
>> > Florian, any guidance?
>> 
>> Yes, this should be done.
>> 
>> I aksed Alexandre to check if 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
>> negotiation on startup») can be reverted, and he answered what it may do that
>> sometime this/next week.
>> 
> 
> Yes, it can be safely reverted after Alexander's patch. I had to test on
> v4.7 because we are not using interrupts on those boards since v4.8
> (another issue to be fixed).
> 
> As Florian pointed out, at the time I sent my patch, I didn't have time
> to investigate whether this was affecting other phys, see
> https://lkml.org/lkml/2016/2/26/766
> 
> I can send the revert or you can do it.

I can take care of it, thanks for testing.

[toc] | [prev] | [next] | [standalone]


#1630997

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-04-25 23:10 +0200
Message-ID<tAfSG-1qD-23@gated-at.bofh.it>
In reply to#1630976
On 04/25/2017 01:26 PM, David Miller wrote:
> From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Date: Tue, 25 Apr 2017 22:09:11 +0200
> 
>> Hi,
>>
>> On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote:
>>> Hello David!
>>>
>>>> 25 апр. 2017 г., в 17:36, David Miller <davem@davemloft.net> написал(а):
>>>>
>>>> So... what are we doing here?
>>>>
>>>> My understanding is that this should fix the same problem that commit
>>>> 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
>>>> negotiation on startup") fixed and that this micrel commit should thus
>>>> be reverted to improve MAC startup times which regressed.
>>>>
>>>> Florian, any guidance?
>>>
>>> Yes, this should be done.
>>>
>>> I aksed Alexandre to check if 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
>>> negotiation on startup») can be reverted, and he answered what it may do that
>>> sometime this/next week.
>>>
>>
>> Yes, it can be safely reverted after Alexander's patch. I had to test on
>> v4.7 because we are not using interrupts on those boards since v4.8
>> (another issue to be fixed).
>>
>> As Florian pointed out, at the time I sent my patch, I didn't have time
>> to investigate whether this was affecting other phys, see
>> https://lkml.org/lkml/2016/2/26/766
>>
>> I can send the revert or you can do it.
> 
> I can take care of it, thanks for testing.

Thanks! Can you add the following Fixes tag:

Fixes: 321beec5047a (net: phy: Use interrupts when available in NOLINK
state)

BTW, can you have the netdev patchwork instance automatically accepted
Fixes: tag sent as replies to patches? (just like Acked-by, Reviewed-by
and so on are already accepted)?
-- 
Florian

[toc] | [prev] | [next] | [standalone]


#1631354

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2017-04-26 12:30 +0200
Message-ID<tAsmS-Y5-9@gated-at.bofh.it>
In reply to#1630963
On 25/04/2017 at 22:09:11 +0200, Alexandre Belloni wrote:
> Hi,
> 
> On 25/04/2017 at 18:25:30 +0300, Alexander Kochetkov wrote:
> > Hello David!
> > 
> > > 25 апр. 2017 г., в 17:36, David Miller <davem@davemloft.net> написал(а):
> > > 
> > > So... what are we doing here?
> > > 
> > > My understanding is that this should fix the same problem that commit
> > > 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
> > > negotiation on startup") fixed and that this micrel commit should thus
> > > be reverted to improve MAC startup times which regressed.
> > > 
> > > Florian, any guidance?
> > 
> > Yes, this should be done.
> > 
> > I aksed Alexandre to check if 99f81afc139c6edd14d77a91ee91685a414a1c66 ("phy: micrel: Disable auto
> > negotiation on startup») can be reverted, and he answered what it may do that
> > sometime this/next week.
> > 
> 
> Yes, it can be safely reverted after Alexander's patch. I had to test on
> v4.7 because we are not using interrupts on those boards since v4.8
> (another issue to be fixed).
> 
> As Florian pointed out, at the time I sent my patch, I didn't have time
> to investigate whether this was affecting other phys, see
> https://lkml.org/lkml/2016/2/26/766
> 
> I can send the revert or you can do it.
> 

I've now tested on linux-next after fixing phy interrupts in the macb
driver and this also fixes the issue I was trying to solve with:
https://lkml.org/lkml/2016/4/15/786

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web