[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1ff2fcac-d9d5-4c70-a101-f7026b50646a@linux.intel.com>
Date: Thu, 27 Feb 2025 19:17:39 +0800
From: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Simon Horman <horms@...nel.org>, Jose Abreu <joabreu@...opsys.com>,
Jose Abreu <Jose.Abreu@...opsys.com>,
David E Box <david.e.box@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>,
Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
David E Box <david.e.box@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, Alexandre Torgue
<alexandre.torgue@...s.st.com>, Jiawen Wu <jiawenwu@...stnetic.com>,
Mengyuan Lou <mengyuanlou@...-swift.com>,
Heiner Kallweit <hkallweit1@...il.com>, Hans de Goede <hdegoede@...hat.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
Richard Cochran <richardcochran@...il.com>,
Serge Semin <fancer.lancer@...il.com>, x86@...nel.org,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
platform-driver-x86@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH net-next v8 1/6] net: phylink: use pl->link_interface in
phylink_expects_phy()
On 26/2/2025 11:34 pm, Russell King (Oracle) wrote:
> On Wed, Feb 26, 2025 at 03:48:32PM +0800, Choong Yong Liang wrote:
>> The phylink_expects_phy() function allows MAC drivers to check if they are
>> expecting a PHY to attach. The checking condition in phylink_expects_phy()
>> aims to achieve the same result as the checking condition in
>> phylink_attach_phy().
>>
>> However, the checking condition in phylink_expects_phy() uses
>> pl->link_config.interface, while phylink_attach_phy() uses
>> pl->link_interface.
>>
>> Initially, both pl->link_interface and pl->link_config.interface are set
>> to SGMII, and pl->cfg_link_an_mode is set to MLO_AN_INBAND.
>>
>> When the interface switches from SGMII to 2500BASE-X,
>> pl->link_config.interface is updated by phylink_major_config().
>> At this point, pl->cfg_link_an_mode remains MLO_AN_INBAND, and
>> pl->link_config.interface is set to 2500BASE-X.
>> Subsequently, when the STMMAC link goes down and comes up again,
>> it is blocked by phylink_expects_phy().
>
> I thought we ascertained that it's not "link goes down" but when the
> interface is taken down administratively. "Link goes down" to most
> people mean an event such as the network cable being unplugged.
> Please fix the patch description.
>
>> Since phylink_expects_phy() and phylink_attach_phy() aim to achieve the
>> same result, phylink_expects_phy() should check pl->link_interface,
>> which never changes, instead of pl->link_config.interface, which is
>> updated by phylink_major_config().
>>
>> Signed-off-by: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
>
> With, and *only* with the above fixed:
>
> Reviewed-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
>
> Thanks!
>
Thank you for your feedback and clarification. I will update the patch
description to accurately reflect the administrative interface down scenario.
Powered by blists - more mailing lists