* [PATCH] net: phy: fix marvell phy status reading
@ 2017-05-30 15:21 Russell King
2017-05-30 16:06 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King @ 2017-05-30 15:21 UTC (permalink / raw)
To: Andrew Lunn; +Cc: Florian Fainelli, netdev
The Marvell driver incorrectly provides phydev->lp_advertising as the
logical and of the link partner's advert and our advert. This is
incorrect - this field is supposed to store the link parter's unmodified
advertisment.
This allows ethtool to report the correct link partner auto-negotiation
status.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/marvell.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index e38f84291258..f93a7a46feb7 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1119,8 +1119,6 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
if (adv < 0)
return adv;
- lpa &= adv;
-
if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
phydev->duplex = DUPLEX_FULL;
else
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phy: fix marvell phy status reading
2017-05-30 15:21 [PATCH] net: phy: fix marvell phy status reading Russell King
@ 2017-05-30 16:06 ` Andrew Lunn
2017-05-30 16:46 ` Florian Fainelli
2017-05-31 17:53 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2017-05-30 16:06 UTC (permalink / raw)
To: Russell King; +Cc: Florian Fainelli, netdev
On Tue, May 30, 2017 at 04:21:51PM +0100, Russell King wrote:
> The Marvell driver incorrectly provides phydev->lp_advertising as the
> logical and of the link partner's advert and our advert. This is
> incorrect - this field is supposed to store the link parter's unmodified
> advertisment.
>
> This allows ethtool to report the correct link partner auto-negotiation
> status.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/phy/marvell.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index e38f84291258..f93a7a46feb7 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -1119,8 +1119,6 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
> if (adv < 0)
> return adv;
>
> - lpa &= adv;
> -
> if (status & MII_M1011_PHY_STATUS_FULLDUPLEX)
> phydev->duplex = DUPLEX_FULL;
> else
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
It appears that lxt.c has a similar issue. It however is not setting
phydev->lp_advertising, but it is using the masked values when setting
phydev->pause and phydev->asym_pause which i don't think it should do.
I can create a patch for that.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phy: fix marvell phy status reading
2017-05-30 15:21 [PATCH] net: phy: fix marvell phy status reading Russell King
2017-05-30 16:06 ` Andrew Lunn
@ 2017-05-30 16:46 ` Florian Fainelli
2017-05-31 17:53 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2017-05-30 16:46 UTC (permalink / raw)
To: Russell King, Andrew Lunn; +Cc: netdev
On 05/30/2017 08:21 AM, Russell King wrote:
> The Marvell driver incorrectly provides phydev->lp_advertising as the
> logical and of the link partner's advert and our advert. This is
> incorrect - this field is supposed to store the link parter's unmodified
> advertisment.
>
> This allows ethtool to report the correct link partner auto-negotiation
> status.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Fixes: be937f1f89ca ("Marvell PHY m88e1111 driver fix")
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: phy: fix marvell phy status reading
2017-05-30 15:21 [PATCH] net: phy: fix marvell phy status reading Russell King
2017-05-30 16:06 ` Andrew Lunn
2017-05-30 16:46 ` Florian Fainelli
@ 2017-05-31 17:53 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-05-31 17:53 UTC (permalink / raw)
To: rmk+kernel; +Cc: andrew, f.fainelli, netdev
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 30 May 2017 16:21:51 +0100
> The Marvell driver incorrectly provides phydev->lp_advertising as the
> logical and of the link partner's advert and our advert. This is
> incorrect - this field is supposed to store the link parter's unmodified
> advertisment.
>
> This allows ethtool to report the correct link partner auto-negotiation
> status.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Applied, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-31 17:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-30 15:21 [PATCH] net: phy: fix marvell phy status reading Russell King
2017-05-30 16:06 ` Andrew Lunn
2017-05-30 16:46 ` Florian Fainelli
2017-05-31 17:53 ` David Miller
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).