From: Florian Fainelli <f.fainelli@gmail.com>
To: Mugunthan V N <mugunthanvnm@ti.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: Re: [net PATCH 1/1] net: phy: fix phy link up when limiting speed via device tree
Date: Thu, 25 Jun 2015 20:03:49 -0700 [thread overview]
Message-ID: <558CC115.7000301@gmail.com> (raw)
In-Reply-To: <1435251062-5287-1-git-send-email-mugunthanvnm@ti.com>
Le 06/25/15 09:51, Mugunthan V N a écrit :
> When limiting phy link speed using "max-speed" to 100mbps or less on a
> giga bit phy, phy never completes auto negotiation and phy state
> machine is held in PHY_AN. Fixing this issue by comparing the giga
> bit advertise though phydev->supported doesn't have it but phy has
> BMSR_ESTATEN set. So that auto negotiation is restarted as old and
> new advertise are different and link comes up fine.
>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
> drivers/net/phy/phy_device.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index bdfe51f..d551df6 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -796,10 +796,11 @@ static int genphy_config_advert(struct phy_device *phydev)
> if (phydev->supported & (SUPPORTED_1000baseT_Half |
> SUPPORTED_1000baseT_Full)) {
> adv |= ethtool_adv_to_mii_ctrl1000_t(advertise);
> - if (adv != oldadv)
> - changed = 1;
> }
>
> + if (adv != oldadv)
> + changed = 1;
> +
> err = phy_write(phydev, MII_CTRL1000, adv);
> if (err < 0)
> return err;
>
--
Florian
next prev parent reply other threads:[~2015-06-26 3:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 16:51 [net PATCH 1/1] net: phy: fix phy link up when limiting speed via device tree Mugunthan V N
2015-06-25 17:31 ` Florian Fainelli
2015-06-25 19:02 ` Mugunthan V N
2015-06-26 3:03 ` Florian Fainelli [this message]
2015-06-26 4:56 ` Mugunthan V N
2015-06-28 23:59 ` David Miller
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=558CC115.7000301@gmail.com \
--to=f.fainelli@gmail.com \
--cc=davem@davemloft.net \
--cc=mugunthanvnm@ti.com \
--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 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.