From: Lukas Wunner <lukas@wunner.de>
To: Oliver Neukum <oneukum@suse.com>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
Oleksij Rempel <o.rempel@pengutronix.de>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Andrew Lunn <andrew@lunn.ch>
Subject: Re: ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9
Date: Thu, 31 Mar 2022 12:51:34 +0200 [thread overview]
Message-ID: <20220331105134.GA7711@wunner.de> (raw)
In-Reply-To: <fbaafccd-60ee-1c29-a014-ec50661f58eb@suse.com>
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
prev parent reply other threads:[~2022-03-31 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-31 10:33 ordering of check in phy_state_machine() since 06edf1a940be0633499e2feea31d380375a22bd9 Oliver Neukum
2022-03-31 10:51 ` Lukas Wunner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220331105134.GA7711@wunner.de \
--to=lukas@wunner.de \
--cc=andrew@lunn.ch \
--cc=linux@rempel-privat.de \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).