lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <073a01db6add$d308af40$791a0dc0$@trustnetic.com>
Date: Mon, 20 Jan 2025 09:51:29 +0800
From: Jiawen Wu <jiawenwu@...stnetic.com>
To: "'Russell King \(Oracle\)'" <linux@...linux.org.uk>
Cc: "'Andrew Lunn'" <andrew@...n.ch>,
	"'Heiner Kallweit'" <hkallweit1@...il.com>,
	<mengyuanlou@...-swift.com>,
	"'Alexandre Torgue'" <alexandre.torgue@...s.st.com>,
	"'Andrew Lunn'" <andrew+netdev@...n.ch>,
	"'Bryan Whitehead'" <bryan.whitehead@...rochip.com>,
	"'David S. Miller'" <davem@...emloft.net>,
	"'Eric Dumazet'" <edumazet@...gle.com>,
	"'Jakub Kicinski'" <kuba@...nel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	"'Marcin Wojtas'" <marcin.s.wojtas@...il.com>,
	"'Maxime Coquelin'" <mcoquelin.stm32@...il.com>,
	<netdev@...r.kernel.org>,
	"'Paolo Abeni'" <pabeni@...hat.com>,
	<UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH net-next 0/9] net: add phylink managed EEE support

On Fri, Jan 17, 2025 8:24 PM, Russell King (Oracle) wrote:
> On Fri, Jan 17, 2025 at 06:17:05PM +0800, Jiawen Wu wrote:
> > > > Since merging these patches, phylink_connect_phy() can no longer be
> > > > invoked correctly in ngbe_open(). The error is returned from the function
> > > > phy_eee_rx_clock_stop(). Since EEE is not supported on our NGBE hardware.
> > >
> > > That would mean phy_modify_mmd() is failing, but the question is why
> > > that is. Please investigate. Thanks.
> >
> > Yes, phy_modify_mmd() returns -EOPNOTSUPP. Since .read/write_mmd are
> > implemented in the PHY driver, but it's not supported to read/write the
> > register field (devnum=MDIO_MMD_PCS, regnum= MDIO_CTRL1).
> >
> > So the error occurs on  __phy_read_mmd():
> > 	if (phydev->drv && phydev->drv->read_mmd)
> > 		return phydev->drv->read_mmd(phydev, devad, regnum);
> 
> Thanks. The patch below should fix it. Please test, meanwhile I'll
> prepare a proper patch.
> 
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 66eea3f963d3..56d411bb2547 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -2268,7 +2268,11 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
>  	/* Explicitly configure whether the PHY is allowed to stop it's
>  	 * receive clock.
>  	 */
> -	return phy_eee_rx_clock_stop(phy, pl->config->eee_rx_clk_stop_enable);
> +	ret = phy_eee_rx_clock_stop(phy, pl->config->eee_rx_clk_stop_enable);
> +	if (ret == -EOPNOTSUPP)
> +		ret = 0;
> +
> +	return ret;
>  }
> 
>  static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,

Test pass.
Thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ