All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: ar803x: disable extended next page bit
@ 2021-01-12 22:59 Russell King
  2021-01-14 22:49 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2021-01-12 22:59 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit; +Cc: David S. Miller, netdev, Jakub Kicinski

This bit is enabled by default and advertises support for extended
next page support.  XNP is only needed for 10GBase-T and MultiGig
support which is not supported. Additionally, Cisco MultiGig switches
will read this bit and attempt 10Gb negotiation even though Next Page
support is disabled. This will cause timeouts when the interface is
forced to 100Mbps and auto-negotiation will fail. The interfaces are
only 1000Base-T and supporting auto-negotiation for this only requires
the Next Page bit to be set.

Taken from:
https://github.com/SolidRun/linux-stable/commit/7406c5244b7ea6bc17a2afe8568277a8c4b126a9
and adapted to mainline kernels by rmk.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/at803x.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index 9636edb8d618..3909dc9fc94b 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -587,7 +587,13 @@ static int at803x_config_init(struct phy_device *phydev)
 			return ret;
 	}
 
-	return 0;
+	/* Ar803x extended next page bit is enabled by default. Cisco
+	 * multigig switches read this bit and attempt to negotiate 10Gbps
+	 * rates even if the next page bit is disabled. This is incorrect
+	 * behaviour but we still need to accomodate it. XNP is only needed
+	 * for 10Gbps support, so disable XNP.
+	 */
+	return phy_modify(phydev, MII_ADVERTISE, MDIO_AN_CTRL1_XNP, 0);
 }
 
 static int at803x_ack_interrupt(struct phy_device *phydev)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: phy: ar803x: disable extended next page bit
  2021-01-12 22:59 [PATCH net-next] net: phy: ar803x: disable extended next page bit Russell King
@ 2021-01-14 22:49 ` Andrew Lunn
  2021-01-14 23:37   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2021-01-14 22:49 UTC (permalink / raw)
  To: Russell King; +Cc: Heiner Kallweit, David S. Miller, netdev, Jakub Kicinski

On Tue, Jan 12, 2021 at 10:59:43PM +0000, Russell King wrote:
> This bit is enabled by default and advertises support for extended
> next page support.  XNP is only needed for 10GBase-T and MultiGig
> support which is not supported. Additionally, Cisco MultiGig switches
> will read this bit and attempt 10Gb negotiation even though Next Page
> support is disabled. This will cause timeouts when the interface is
> forced to 100Mbps and auto-negotiation will fail. The interfaces are
> only 1000Base-T and supporting auto-negotiation for this only requires
> the Next Page bit to be set.
> 
> Taken from:
> https://github.com/SolidRun/linux-stable/commit/7406c5244b7ea6bc17a2afe8568277a8c4b126a9
> and adapted to mainline kernels by rmk.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: phy: ar803x: disable extended next page bit
  2021-01-14 22:49 ` Andrew Lunn
@ 2021-01-14 23:37   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-01-14 23:37 UTC (permalink / raw)
  To: Andrew Lunn, Russell King; +Cc: Heiner Kallweit, David S. Miller, netdev

On Thu, 14 Jan 2021 23:49:02 +0100 Andrew Lunn wrote:
> On Tue, Jan 12, 2021 at 10:59:43PM +0000, Russell King wrote:
> > This bit is enabled by default and advertises support for extended
> > next page support.  XNP is only needed for 10GBase-T and MultiGig
> > support which is not supported. Additionally, Cisco MultiGig switches
> > will read this bit and attempt 10Gb negotiation even though Next Page
> > support is disabled. This will cause timeouts when the interface is
> > forced to 100Mbps and auto-negotiation will fail. The interfaces are
> > only 1000Base-T and supporting auto-negotiation for this only requires
> > the Next Page bit to be set.
> > 
> > Taken from:
> > https://github.com/SolidRun/linux-stable/commit/7406c5244b7ea6bc17a2afe8568277a8c4b126a9
> > and adapted to mainline kernels by rmk.
> > 
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>  
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Added missing 'm' to accommodate and applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-14 23:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 22:59 [PATCH net-next] net: phy: ar803x: disable extended next page bit Russell King
2021-01-14 22:49 ` Andrew Lunn
2021-01-14 23:37   ` Jakub Kicinski

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.