netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"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,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH v2 net-next 3/3] net: phy: aquantia: add support for aqr115c
Date: Thu, 27 Jun 2024 13:09:38 +0100	[thread overview]
Message-ID: <Zn1WgpC58nbYfLVF@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240627113018.25083-4-brgl@bgdev.pl>

On Thu, Jun 27, 2024 at 01:30:17PM +0200, Bartosz Golaszewski wrote:
> +static int aqr115c_config_init(struct phy_device *phydev)
> +{
> +	/* Check that the PHY interface type is compatible */
> +	if (phydev->interface != PHY_INTERFACE_MODE_SGMII &&
> +	    phydev->interface != PHY_INTERFACE_MODE_2500BASEX)
> +		return -ENODEV;
> +
> +	phy_set_max_speed(phydev, SPEED_2500);

Please can you explain why this is necessary? Does the PHY report that
it incorrectly supports faster speeds than 2500base-X ?

If phylib is incorrectly detecting the PHYs features, then this should
be corrected via the .get_features method, not in the .config_init
method.

(The same should be true of the other Aquantia PHYs.)

Note that phy_set_max_speed() is documented as:

 * The PHY might be more capable than the MAC. For example a Fast Ethernet
 * is connected to a 1G PHY. This function allows the MAC to indicate its
 * maximum speed, and so limit what the PHY will advertise.

Aquantia seems to be the only PHY driver that calls this function.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2024-06-27 12:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-27 11:30 [PATCH v2 net-next 0/3] net: phy: aquantia: enable support for aqr115c Bartosz Golaszewski
2024-06-27 11:30 ` [PATCH v2 net-next 1/3] net: phy: aquantia: rename and export aqr107_wait_reset_complete() Bartosz Golaszewski
2024-06-27 16:20   ` Andrew Lunn
2024-06-27 11:30 ` [PATCH v2 net-next 2/3] net: phy: aquantia: wait for FW reset before checking the vendor ID Bartosz Golaszewski
2024-06-27 16:21   ` Andrew Lunn
2024-06-27 11:30 ` [PATCH v2 net-next 3/3] net: phy: aquantia: add support for aqr115c Bartosz Golaszewski
2024-06-27 12:09   ` Russell King (Oracle) [this message]
2024-06-27 12:18     ` Bartosz Golaszewski
2024-06-27 16:22   ` Andrew Lunn
2024-06-27 16:48     ` Bartosz Golaszewski
2024-06-27 22:42   ` Daniel Golle
2024-06-28  0:18     ` Andrew Lunn
2024-06-28  1:11       ` Daniel Golle
2024-06-28 12:11         ` Bartosz Golaszewski
2024-06-28 14:09           ` Andrew Lunn

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=Zn1WgpC58nbYfLVF@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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).