All of lore.kernel.org
 help / color / mirror / Atom feed
* ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9
@ 2022-03-31 10:33 Oliver Neukum
  2022-03-31 10:51 ` Lukas Wunner
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2022-03-31 10:33 UTC (permalink / raw)
  To: Oleksij Rempel; +Cc: Lukas Wunner, Oleksij Rempel, netdev, Andrew Lunn

Hi,

looking at this I wonder whether the check isn't too late.
Do you really want to restart autonegotiation although
you know that the device is gone?

    Regards
        Oliver


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

* Re: ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9
  2022-03-31 10:33 ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9 Oliver Neukum
@ 2022-03-31 10:51 ` Lukas Wunner
  0 siblings, 0 replies; 2+ messages in thread
From: Lukas Wunner @ 2022-03-31 10:51 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: Oleksij Rempel, Oleksij Rempel, netdev, Andrew Lunn

On Thu, Mar 31, 2022 at 12:33:30PM +0200, Oliver Neukum wrote:
> looking at this I wonder whether the check isn't too late.
> Do you really want to restart autonegotiation although
> you know that the device is gone?

Ignoring PHY_CABLETEST for a moment, needs_aneg is only set to
true if state is PHY_UP, i.e. the netdev was just opened.

If the USB adapter is unplugged at that moment, the expectation
is that phy_start_aneg() returns -ENODEV, so we bail out of
phy_state_machine().

Commit 06edf1a940be looks fine to me.

Thanks,

Lukas

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

end of thread, other threads:[~2022-03-31 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 10:33 ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9 Oliver Neukum
2022-03-31 10:51 ` Lukas Wunner

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.