From: Jon Hunter <jonathanh@nvidia.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"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>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
Brad Griffis <bgriffis@nvidia.com>
Subject: Re: [RESEND PATCH net-next v3 3/4] net: phy: aquantia: wait for the GLOBAL_CFG to start returning real values
Date: Thu, 18 Jul 2024 15:49:01 +0100 [thread overview]
Message-ID: <874f68e3-a5f4-4771-9d40-59d2efbf2693@nvidia.com> (raw)
In-Reply-To: <CAMRc=MdvsKeYEEvf2w3RxPiR=yLFXDwesiQ75JHTU-YEpkF-ZA@mail.gmail.com>
On 18/07/2024 15:13, Bartosz Golaszewski wrote:
> On Thu, Jul 18, 2024 at 4:08 PM Jon Hunter <jonathanh@nvidia.com> wrote:
>>
>>
>> On 18/07/2024 14:29, Bartosz Golaszewski wrote:
>>> On Thu, Jul 18, 2024 at 3:04 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>>>>
>>>> On Thu, Jul 18, 2024 at 2:23 PM Jon Hunter <jonathanh@nvidia.com> wrote:
>>>>>
>>>>>
>>>>> With the current -next and mainline we are seeing the following issue on
>>>>> our Tegra234 Jetson AGX Orin platform ...
>>>>>
>>>>> Aquantia AQR113C stmmac-0:00: aqr107_fill_interface_modes failed: -110
>>>>> tegra-mgbe 6800000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -110)
>>>>>
>>>>>
>>>>> We have tracked it down to this change and looks like our PHY does not
>>>>> support 10M ...
>>>>>
>>>>> $ ethtool eth0
>>>>> Settings for eth0:
>>>>> Supported ports: [ ]
>>>>> Supported link modes: 100baseT/Full
>>>>> 1000baseT/Full
>>>>> 10000baseT/Full
>>>>> 1000baseKX/Full
>>>>> 10000baseKX4/Full
>>>>> 10000baseKR/Full
>>>>> 2500baseT/Full
>>>>> 5000baseT/Full
>>>>>
>>>>> The following fixes this for this platform ...
>>>>>
>>>>> diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
>>>>> index d12e35374231..0b2db486d8bd 100644
>>>>> --- a/drivers/net/phy/aquantia/aquantia_main.c
>>>>> +++ b/drivers/net/phy/aquantia/aquantia_main.c
>>>>> @@ -656,7 +656,7 @@ static int aqr107_fill_interface_modes(struct phy_device *phydev)
>>>>> int i, val, ret;
>>>>>
>>>>> ret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
>>>>> - VEND1_GLOBAL_CFG_10M, val, val != 0,
>>>>> + VEND1_GLOBAL_CFG_100M, val, val != 0,
>>>>> 1000, 100000, false);
>>>>> if (ret)
>>>>> return ret;
>>>>>
>>>>>
>>>>> However, I am not sure if this is guaranteed to work for all?
>>>>
>>>> Ah cr*p. No, I don't think it is. We should take the first supported
>>>> mode for a given PHY I think.
>>>>
>>>
>>> TBH I only observed the issue on AQR115C. I don't have any other model
>>> to test with. Is it fine to fix it by implementing
>>> aqr115_fill_interface_modes() that would first wait for this register
>>> to return non-0 and then call aqr107_fill_interface_modes()?
>>
>> I am doing a bit more testing. We have seen a few issues with this PHY
>> driver and so I am wondering if we also need something similar for the
>> AQR113C variant too.
>>
>> Interestingly, the product brief for these PHYs [0] do show that both
>> the AQR113C and AQR115C both support 10M. So I wonder if it is our
>> ethernet controller that is not supporting 10M? I will check on this too.
>>
>
> Oh you have an 113c? I didn't get this. Yeah, weird, all docs say it
> should support 10M. In fact all AQR PHYs should hence my initial
> change.
Yes we have an AQR113C. I agree it should support this, but for whatever
reason this is not advertised. I do see that 10M is advertised as
supported by the network ...
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
My PC that is on the same network supports 10M, but just not this Tegra
device. I am checking to see if this is expected for this device.
Jon
--
nvpublic
next prev parent reply other threads:[~2024-07-18 14:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 7:50 [RESEND PATCH net-next v3 0/4] net: phy: aquantia: enable support for aqr115c Bartosz Golaszewski
2024-07-08 7:50 ` [RESEND PATCH net-next v3 1/4] net: phy: aquantia: rename and export aqr107_wait_reset_complete() Bartosz Golaszewski
2024-07-08 7:50 ` [RESEND PATCH net-next v3 2/4] net: phy: aquantia: wait for FW reset before checking the vendor ID Bartosz Golaszewski
2024-07-30 9:59 ` Jon Hunter
2024-07-30 11:23 ` Russell King (Oracle)
2024-08-06 11:36 ` Vladimir Oltean
2024-08-06 11:27 ` Vladimir Oltean
2024-07-08 7:50 ` [RESEND PATCH net-next v3 3/4] net: phy: aquantia: wait for the GLOBAL_CFG to start returning real values Bartosz Golaszewski
2024-07-18 12:23 ` Jon Hunter
2024-07-18 13:04 ` Bartosz Golaszewski
2024-07-18 13:29 ` Bartosz Golaszewski
2024-07-18 14:08 ` Jon Hunter
2024-07-18 14:13 ` Bartosz Golaszewski
2024-07-18 14:49 ` Jon Hunter [this message]
2024-07-18 14:59 ` Bartosz Golaszewski
2024-07-18 17:42 ` Jon Hunter
2024-07-18 19:05 ` Bartosz Golaszewski
2024-07-19 8:39 ` Jon Hunter
2024-07-19 3:41 ` Andrew Lunn
2024-07-08 7:50 ` [RESEND PATCH net-next v3 4/4] net: phy: aquantia: add support for aqr115c Bartosz Golaszewski
2024-07-10 10:20 ` [RESEND PATCH net-next v3 0/4] net: phy: aquantia: enable " patchwork-bot+netdevbpf
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=874f68e3-a5f4-4771-9d40-59d2efbf2693@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=andrew@lunn.ch \
--cc=bartosz.golaszewski@linaro.org \
--cc=bgriffis@nvidia.com \
--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=linux-tegra@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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).