mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>, barebox@lists.infradead.org
Subject: Re: [PATCH 7/7] net: phy: at803x: disable extended next page bit
Date: Mon, 10 Jul 2023 12:03:26 +0200	[thread overview]
Message-ID: <29a3cf23-7087-aa8f-ec7c-7f0414c46de3@pengutronix.de> (raw)
In-Reply-To: <20230710063653.660040-7-m.felsch@pengutronix.de>

On 10.07.23 08:36, Marco Felsch wrote:
> This commit ports Linux commit:
> 
> | commit 3c51fa5d2afe7a4909b53af5019635326389dd29
> | Author: Russell King <rmk+kernel@armlinux.org.uk>
> | Date:   Tue Jan 12 22:59:43 2021 +0000
> |
> |     net: phy: ar803x: disable extended next page bit
> |
> |     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>
> |     Link: https://lore.kernel.org/r/E1kzSdb-000417-FJ@rmk-PC.armlinux.org.uk
> |     Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> ---
>  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 d8a9c3588f..577bdf1244 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -365,7 +365,13 @@ static int at803x_config_init(struct phy_device *phydev)
>  	if (ret < 0)
>  		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 accommodate it. XNP is only needed
> +	 * for 10Gbps support, so disable XNP.
> +	 */
> +	return phy_modify(phydev, MII_ADVERTISE, MDIO_AN_CTRL1_XNP, 0);
>  }
>  
>  static struct phy_driver at803x_driver[] = {

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




  reply	other threads:[~2023-07-10 10:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10  6:36 [PATCH 1/7] ARM: boards: make use of MDIO_MMD register defines Marco Felsch
2023-07-10  6:36 ` [PATCH 2/7] net: phy: micrel: " Marco Felsch
2023-07-10  9:56   ` Ahmad Fatoum
2023-07-10 10:37     ` Marco Felsch
2023-07-10  6:36 ` [PATCH 3/7] net: phy: sync phy_{write,read,modify}_mmd_indirect with linux Marco Felsch
2023-07-10  9:59   ` Ahmad Fatoum
2023-07-10 10:49     ` Marco Felsch
2023-07-10 10:53       ` Ahmad Fatoum
2023-07-10 11:01         ` Marco Felsch
2023-07-10 11:03           ` Ahmad Fatoum
2023-07-10 12:43             ` Marco Felsch
2023-07-10 12:52               ` Ahmad Fatoum
2023-07-10  6:36 ` [PATCH 4/7] net: phy: add phydev_{err,err_probe,info,warn,dbg} macros Marco Felsch
2023-07-10 10:01   ` Ahmad Fatoum
2023-07-10  6:36 ` [PATCH 5/7] net: phy: at803x: add support for configuring SmartEEE Marco Felsch
2023-07-10 10:10   ` Ahmad Fatoum
2023-07-10 12:10     ` Oleksij Rempel
2023-07-10  6:36 ` [PATCH 6/7] net: phy: at803x: add disable hibernation mode support Marco Felsch
2023-07-10 10:07   ` Ahmad Fatoum
2023-07-10 10:53     ` Marco Felsch
2023-07-10 11:07       ` Ahmad Fatoum
2023-07-10  6:36 ` [PATCH 7/7] net: phy: at803x: disable extended next page bit Marco Felsch
2023-07-10 10:03   ` Ahmad Fatoum [this message]
2023-07-10  9:55 ` [PATCH 1/7] ARM: boards: make use of MDIO_MMD register defines Ahmad Fatoum

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=29a3cf23-7087-aa8f-ec7c-7f0414c46de3@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    /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