[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mdn6gXhgoWwpztXDKzix_+Ad1_rNUWP7O6HDyLXAJev6Q@mail.gmail.com>
Date: Thu, 27 Jun 2024 14:18:06 +0200
From: Bartosz Golaszewski <brgl@...ev.pl>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v2 net-next 3/3] net: phy: aquantia: add support for aqr115c
On Thu, Jun 27, 2024 at 2:09 PM Russell King (Oracle)
<linux@...linux.org.uk> wrote:
>
> 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.
>
Well I should have RTFM. You're right, I'll drop it.
Bart
> 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!
Powered by blists - more mailing lists