public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* phylib: Any PHY which reports link up during autoneg ?
@ 2018-08-16 19:15 Heiner Kallweit
  2018-08-16 19:21 ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Heiner Kallweit @ 2018-08-16 19:15 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn; +Cc: netdev@vger.kernel.org

When reading through the state machine code in phy.c I wondered whether
there is any PHY which reports the link as up during autonegotiation.
(It's about handling PHY_AN in the state machine, once we know the link
is up we still check whether aneg was completed. Is this needed?)

At least the PHY's I have access to all report the link as down when
autonegotiating.
I checked also clause 22 of 802.3u, however found no clear definition
when a link should be considered up. There it's stated that it's
PHY-dependent.

Can you shed any light on this?

Thanks, Heiner

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

* Re: phylib: Any PHY which reports link up during autoneg ?
  2018-08-16 19:15 phylib: Any PHY which reports link up during autoneg ? Heiner Kallweit
@ 2018-08-16 19:21 ` Florian Fainelli
  2018-08-16 19:46   ` Heiner Kallweit
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2018-08-16 19:21 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn; +Cc: netdev@vger.kernel.org

On 08/16/2018 12:15 PM, Heiner Kallweit wrote:
> When reading through the state machine code in phy.c I wondered whether
> there is any PHY which reports the link as up during autonegotiation.
> (It's about handling PHY_AN in the state machine, once we know the link
> is up we still check whether aneg was completed. Is this needed?)
> 
> At least the PHY's I have access to all report the link as down when
> autonegotiating.
> I checked also clause 22 of 802.3u, however found no clear definition
> when a link should be considered up. There it's stated that it's
> PHY-dependent.
> 
> Can you shed any light on this?

I think the answer is no, there are no PHYs that can report a link UP
during auto-negotiation that is, between the time you ask for an
auto-negotiation to occur/restart, and the PHY reporting that it is
done. By definition, auto-negotiation needs to figure out the common
denominator between link partners, if, and only if that process
completes (ANEG done), then the link should be UP.

If the link was reported UP during auto-negotiation, it would not be
possible to be deterministic about:

- which link parameters changed between negotiation attempts
- whether the link is DOWN due to a physical disconnection or a failure
to agree on parameters
-- 
Florian

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

* Re: phylib: Any PHY which reports link up during autoneg ?
  2018-08-16 19:21 ` Florian Fainelli
@ 2018-08-16 19:46   ` Heiner Kallweit
  0 siblings, 0 replies; 3+ messages in thread
From: Heiner Kallweit @ 2018-08-16 19:46 UTC (permalink / raw)
  To: Florian Fainelli, Andrew Lunn; +Cc: netdev@vger.kernel.org

On 16.08.2018 21:21, Florian Fainelli wrote:
> On 08/16/2018 12:15 PM, Heiner Kallweit wrote:
>> When reading through the state machine code in phy.c I wondered whether
>> there is any PHY which reports the link as up during autonegotiation.
>> (It's about handling PHY_AN in the state machine, once we know the link
>> is up we still check whether aneg was completed. Is this needed?)
>>
>> At least the PHY's I have access to all report the link as down when
>> autonegotiating.
>> I checked also clause 22 of 802.3u, however found no clear definition
>> when a link should be considered up. There it's stated that it's
>> PHY-dependent.
>>
>> Can you shed any light on this?
> 
> I think the answer is no, there are no PHYs that can report a link UP
> during auto-negotiation that is, between the time you ask for an
> auto-negotiation to occur/restart, and the PHY reporting that it is
> done. By definition, auto-negotiation needs to figure out the common
> denominator between link partners, if, and only if that process
> completes (ANEG done), then the link should be UP.
> 
> If the link was reported UP during auto-negotiation, it would not be
> possible to be deterministic about:
> 
> - which link parameters changed between negotiation attempts
> - whether the link is DOWN due to a physical disconnection or a failure
> to agree on parameters
> 
Thanks for the clarification.
My confusion was mainly about the case of an autoneg restart if there's
an established connection. Because autoneg parameters are exchanged
by sideband signaling (link pulses), normal traffic may not be affected.
Except autoneg requires the rx/tx units to switch to some autoneg
processing mode.

Of course at one point in time, when both link partners have agreed
to a parameter set, they have to switch the mode, resulting in at
least a small window where link is down.

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

end of thread, other threads:[~2018-08-16 22:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-16 19:15 phylib: Any PHY which reports link up during autoneg ? Heiner Kallweit
2018-08-16 19:21 ` Florian Fainelli
2018-08-16 19:46   ` Heiner Kallweit

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