From: "Abhishek Chauhan (ABC)" <quic_abchauha@quicinc.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.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>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
<kernel@quicinc.com>
Subject: Re: [PATCH net v3 1/2] net: phy: aquantia: AQR115c fix up PMA capabilities
Date: Thu, 26 Sep 2024 17:17:47 -0700 [thread overview]
Message-ID: <ed33f7a4-89b1-4090-bcb5-14f2d98cbd75@quicinc.com> (raw)
In-Reply-To: <20240926084222.48042652@fedora.home>
On 9/25/2024 11:42 PM, Maxime Chevallier wrote:
> Hello,
>
> On Wed, 25 Sep 2024 16:01:28 -0700
> Abhishek Chauhan <quic_abchauha@quicinc.com> wrote:
>
>> AQR115c reports incorrect PMA capabilities which includes
>> 10G/5G and also incorrectly disables capabilities like autoneg
>> and 10Mbps support.
>>
>> AQR115c as per the Marvell databook supports speeds up to 2.5Gbps
>> with autonegotiation.
>>
>> Fixes: 0ebc581f8a4b ("net: phy: aquantia: add support for aqr115c")
>> Link: https://lore.kernel.org/all/20240913011635.1286027-1-quic_abchauha@quicinc.com/T/
>> Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
>> ---
>
> [...]
>
>>
>> +static int aqr115c_get_features(struct phy_device *phydev)
>> +{
>> + int ret;
>> + __ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, };
>> +
>> + /* Normal feature discovery */
>> + ret = genphy_c45_pma_read_abilities(phydev);
>> + if (ret)
>> + return ret;
>> +
>> + /* PHY FIXUP */
>> + /* Although the PHY sets bit 12.18.19.48, it does not support 5G/10G modes */
>> + linkmode_clear_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, phydev->supported);
>> + linkmode_clear_bit(ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT, phydev->supported);
>> + linkmode_clear_bit(ETHTOOL_LINK_MODE_10000baseKR_Full_BIT, phydev->supported);
>> + linkmode_clear_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT, phydev->supported);
>> +
>> + /* Phy supports Speeds up to 2.5G with Autoneg though the phy PMA says otherwise */
>> + linkmode_copy(supported, phy_gbit_features);
>> + linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseX_Full_BIT, supported);
>
> I still think you shouldn't report 2500BaseX, as you mentionned
> it's a BaseT PHY. This is independent of the modes that the PHY uses to
> connect to the MAC. Although the PHY can talk to the MAC using
> 2500BaseX on its MII interface, it looks like it can't use
> 2500BaseX on its MDI (the LP side of the PHY). There's the same issue in
> patch 2.
>
I Agree with you. I did some experiments today without setting the 2500BaseX bit and i see
the link still comes up with 2.5Gbps with autoneg on.
I will rectify this as part of the next patch
Thanks Maxime
> Thanks,
>
> Maxime
next prev parent reply other threads:[~2024-09-27 0:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 23:01 [PATCH net v3 0/2] Fix AQR " Abhishek Chauhan
2024-09-25 23:01 ` [PATCH net v3 1/2] net: phy: aquantia: AQR115c fix up " Abhishek Chauhan
2024-09-26 6:42 ` Maxime Chevallier
2024-09-27 0:17 ` Abhishek Chauhan (ABC) [this message]
2024-09-26 11:45 ` Russell King (Oracle)
2024-09-27 0:19 ` Abhishek Chauhan (ABC)
2024-09-25 23:01 ` [PATCH net v3 2/2] net: phy: aquantia: remove usage of phy_set_max_speed Abhishek Chauhan
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=ed33f7a4-89b1-4090-bcb5-14f2d98cbd75@quicinc.com \
--to=quic_abchauha@quicinc.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=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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
all inboxes | Powered by JetHome®