netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Abhishek Chauhan <quic_abchauha@quicinc.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Halaney <ahalaney@redhat.com>,
	"Russell King (Oracle)" <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Brad Griffis <bgriffis@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Jon Hunter <jonathanh@nvidia.com>,
	kernel@quicinc.com
Subject: Re: [RFC PATCH net v1] net: phy: aquantia: Set phy speed to 2.5gbps for AQR115c
Date: Fri, 13 Sep 2024 10:01:20 +0200	[thread overview]
Message-ID: <20240913100120.75f9d35c@fedora.home> (raw)
In-Reply-To: <20240913011635.1286027-1-quic_abchauha@quicinc.com>

Hi,

On Thu, 12 Sep 2024 18:16:35 -0700
Abhishek Chauhan <quic_abchauha@quicinc.com> wrote:

> Recently we observed that aquantia AQR115c always comes up in
> 100Mbps mode. AQR115c aquantia chip supports max speed up to
> 2.5Gbps. Today the AQR115c configuration is done through
> aqr113c_config_init which internally calls aqr107_config_init.
> aqr113c and aqr107 are both capable of 10Gbps. Whereas AQR115c
> supprts max speed of 2.5Gbps only.
> 
> Fixes: 0ebc581f8a4b ("net: phy: aquantia: add support for aqr115c")
> Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
> ---
>  drivers/net/phy/aquantia/aquantia_main.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
> index e982e9ce44a5..9afc041dbb64 100644
> --- a/drivers/net/phy/aquantia/aquantia_main.c
> +++ b/drivers/net/phy/aquantia/aquantia_main.c
> @@ -499,6 +499,12 @@ static int aqr107_config_init(struct phy_device *phydev)
>  	if (!ret)
>  		aqr107_chip_info(phydev);
>  
> +	/* AQR115c supports speed up to 2.5Gbps */
> +	if (phydev->interface == PHY_INTERFACE_MODE_2500BASEX) {
> +		phy_set_max_speed(phydev, SPEED_2500);
> +		phydev->autoneg = AUTONEG_ENABLE;
> +	}
> +

If I get your commit log right, the code above will also apply for
ASQR107, AQR113 and so on, don't you risk breaking these PHYs if they
are in 2500BASEX mode at boot?

Besides that, if the PHY switches between SGMII and 2500BASEX
dynamically depending on the link speed, it could be that it's
configured by default in SGMII, hence this check will be missed.

Is the AQR115c in the same situation as AQR111 for example, where the
PMA capabilities reported are incorrect ? If so, you can take the same
approach as aqr111, which is to create a dedicated .config_init()
callback for the AQR115c, which sets the max speed, then call
aqr113c_config_init() from there ?

Maxime

  reply	other threads:[~2024-09-13  8:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13  1:16 [RFC PATCH net v1] net: phy: aquantia: Set phy speed to 2.5gbps for AQR115c Abhishek Chauhan
2024-09-13  8:01 ` Maxime Chevallier [this message]
2024-09-13 16:12   ` Abhishek Chauhan (ABC)
2024-09-13 16:35     ` Andrew Lunn
2024-09-13 17:22       ` Abhishek Chauhan (ABC)
2024-09-17  9:31       ` Russell King (Oracle)
2024-09-17 20:57         ` Abhishek Chauhan (ABC)
2024-09-18 21:27           ` Abhishek Chauhan (ABC)
2024-09-18 21:45             ` Andrew Lunn
2024-09-18 22:24               ` Abhishek Chauhan (ABC)

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=20240913100120.75f9d35c@fedora.home \
    --to=maxime.chevallier@bootlin.com \
    --cc=ahalaney@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=bgriffis@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@quicinc.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_abchauha@quicinc.com \
    --cc=vladimir.oltean@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).