* [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x"
@ 2019-01-31 16:59 Russell King
2019-02-01 8:10 ` liuyonglong
2019-02-03 3:44 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Russell King @ 2019-01-31 16:59 UTC (permalink / raw)
To: Andrew Lunn, Florian Fainelli, Heiner Kallweit; +Cc: David S. Miller, netdev
This reverts commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0.
The original diagnosis was incorrect: it appears that the NIC had
PHY polling mode enabled, which meant that it overwrote the PHYs
advertisement register during negotiation.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
v2: respun on top of net-next, but I've not yet been able to boot
test this - which is unlikely to be for a while yet.
The extraneous whitespace change comes from the reversion of the
original patch - I added a "u32 pause" and blank line there. The
patch converting to link modes removed the "u32 pause" but left
the blank line, causing a coding style issue. It seems only right
that a reversion of the original commit fixes that too.
drivers/net/phy/marvell.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 90f44ba8aca7..3ccba37bd6dd 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -842,7 +842,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
/* SGMII-to-Copper mode initialization */
if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
-
/* Select page 18 */
err = marvell_set_page(phydev, 18);
if (err < 0)
@@ -865,21 +864,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE);
if (err < 0)
return err;
-
- /* There appears to be a bug in the 88e1512 when used in
- * SGMII to copper mode, where the AN advertisement register
- * clears the pause bits each time a negotiation occurs.
- * This means we can never be truely sure what was advertised,
- * so disable Pause support.
- */
- linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
- phydev->supported);
- linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT,
- phydev->supported);
- linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
- phydev->advertising);
- linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT,
- phydev->advertising);
}
return m88e1318_config_init(phydev);
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x"
2019-01-31 16:59 [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x" Russell King
@ 2019-02-01 8:10 ` liuyonglong
2019-02-03 3:44 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: liuyonglong @ 2019-02-01 8:10 UTC (permalink / raw)
To: Russell King, Andrew Lunn, Florian Fainelli, Heiner Kallweit
Cc: David S. Miller, netdev
On 2019/2/1 0:59, Russell King wrote:
> This reverts commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0.
>
> The original diagnosis was incorrect: it appears that the NIC had
> PHY polling mode enabled, which meant that it overwrote the PHYs
> advertisement register during negotiation.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Yonglong Liu <liuyonglong@huawei.com>
Had done boot testing, and the networking is fine too.
> ---
> v2: respun on top of net-next, but I've not yet been able to boot
> test this - which is unlikely to be for a while yet.
>
> The extraneous whitespace change comes from the reversion of the
> original patch - I added a "u32 pause" and blank line there. The
> patch converting to link modes removed the "u32 pause" but left
> the blank line, causing a coding style issue. It seems only right
> that a reversion of the original commit fixes that too.
>
> drivers/net/phy/marvell.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
> index 90f44ba8aca7..3ccba37bd6dd 100644
> --- a/drivers/net/phy/marvell.c
> +++ b/drivers/net/phy/marvell.c
> @@ -842,7 +842,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
>
> /* SGMII-to-Copper mode initialization */
> if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
> -
> /* Select page 18 */
> err = marvell_set_page(phydev, 18);
> if (err < 0)
> @@ -865,21 +864,6 @@ static int m88e1510_config_init(struct phy_device *phydev)
> err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE);
> if (err < 0)
> return err;
> -
> - /* There appears to be a bug in the 88e1512 when used in
> - * SGMII to copper mode, where the AN advertisement register
> - * clears the pause bits each time a negotiation occurs.
> - * This means we can never be truely sure what was advertised,
> - * so disable Pause support.
> - */
> - linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> - phydev->supported);
> - linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT,
> - phydev->supported);
> - linkmode_clear_bit(ETHTOOL_LINK_MODE_Asym_Pause_BIT,
> - phydev->advertising);
> - linkmode_clear_bit(ETHTOOL_LINK_MODE_Pause_BIT,
> - phydev->advertising);
> }
>
> return m88e1318_config_init(phydev);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x"
2019-01-31 16:59 [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x" Russell King
2019-02-01 8:10 ` liuyonglong
@ 2019-02-03 3:44 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-02-03 3:44 UTC (permalink / raw)
To: rmk+kernel; +Cc: andrew, f.fainelli, hkallweit1, netdev
From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Thu, 31 Jan 2019 16:59:46 +0000
> This reverts commit 6623c0fba10ef45b64ca213ad5dec926f37fa9a0.
>
> The original diagnosis was incorrect: it appears that the NIC had
> PHY polling mode enabled, which meant that it overwrote the PHYs
> advertisement register during negotiation.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> ---
> v2: respun on top of net-next, but I've not yet been able to boot
> test this - which is unlikely to be for a while yet.
This looks like a fix so I have applied it to 'net' and queued it up for
-stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-03 3:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 16:59 [PATCH v2] Revert "net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x" Russell King
2019-02-01 8:10 ` liuyonglong
2019-02-03 3:44 ` 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).