From: Florian Fainelli <f.fainelli@gmail.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: netdev@vger.kernel.org, linux-kernel@lists.codethink.co.uk
Subject: Re: [PATCH net-next] net: phy: Invalidate LP advertising flags when restarting or disabling AN
Date: Mon, 26 Jan 2015 17:06:49 -0800 [thread overview]
Message-ID: <54C6E4A9.6070603@gmail.com> (raw)
In-Reply-To: <1422320295.3524.26.camel@xylophone.i.decadent.org.uk>
On 26/01/15 16:58, Ben Hutchings wrote:
> It is possible to see the old value of the LP advertising flags
> through ethtool after reconfiguring the PHY and before autonegotiation
> completes. If autonegotiation is turned off then the last value seen
> will persist indefinitely.
Good catch!
>
> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/phy/phy.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 767cd11..cdcac6a 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -439,6 +439,9 @@ int phy_start_aneg(struct phy_device *phydev)
> if (AUTONEG_DISABLE == phydev->autoneg)
> phy_sanitize_settings(phydev);
>
> + /* Invalidate LP advertising flags */
> + phydev->lp_advertising = 0;
> +
> err = phydev->drv->config_aneg(phydev);
> if (err < 0)
> goto out_unlock;
>
--
Florian
prev parent reply other threads:[~2015-01-27 1:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-27 0:58 [PATCH net-next] net: phy: Invalidate LP advertising flags when restarting or disabling AN Ben Hutchings
2015-01-27 1:06 ` Florian Fainelli [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=54C6E4A9.6070603@gmail.com \
--to=f.fainelli@gmail.com \
--cc=ben.hutchings@codethink.co.uk \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=netdev@vger.kernel.org \
/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).