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] [day] [month] [year] [list]
Message-ID:
 <BJXPR01MB08551DB3FEDE0899B67B8DB7E6BD2@BJXPR01MB0855.CHNPR01.prod.partner.outlook.cn>
Date: Wed, 16 Apr 2025 03:13:08 +0000
From: Minda Chen <minda.chen@...rfivetech.com>
To: Paolo Abeni <pabeni@...hat.com>, Emil Renner Berthing <kernel@...il.dk>,
	Andrew Lunn <andrew+netdev@...n.ch>, "David S . Miller"
	<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
	<kuba@...nel.org>, Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre
 Torgue <alexandre.torgue@...s.st.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-stm32@...md-mailman.stormreply.com"
	<linux-stm32@...md-mailman.stormreply.com>
Subject: Re: [net-next v1] net: stmmac: starfive: Add serdes PHY init/deinit
 function


> 
> On 4/10/25 9:04 AM, Minda Chen wrote:
> > To support SGMII interface, add internal serdes PHY powerup/ powerdown
> > function.
> >
> > Signed-off-by: Minda Chen <minda.chen@...rfivetech.com>
> > ---
> >  .../ethernet/stmicro/stmmac/dwmac-starfive.c  | 33
> > +++++++++++++++++++
> >  1 file changed, 33 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > index 2013d7477eb7..f5923f847100 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-starfive.c
> > @@ -9,6 +9,8 @@
> >
> >  #include <linux/mod_devicetable.h>
> >  #include <linux/platform_device.h>
> > +#include <linux/phy.h>
> > +#include <linux/phy/phy.h>
> >  #include <linux/property.h>
> >  #include <linux/mfd/syscon.h>
> >  #include <linux/regmap.h>
> > @@ -28,6 +30,7 @@ struct starfive_dwmac_data {  struct starfive_dwmac
> > {
> >  	struct device *dev;
> >  	const struct starfive_dwmac_data *data;
> > +	struct phy *serdes_phy;
> >  };
> >
> >  static int starfive_dwmac_set_mode(struct plat_stmmacenet_data
> > *plat_dat) @@ -80,6 +83,26 @@ static int starfive_dwmac_set_mode(struct
> plat_stmmacenet_data *plat_dat)
> >  	return 0;
> >  }
> >
> > +static int starfive_dwmac_serdes_powerup(struct net_device *ndev,
> > +void *priv) {
> > +	struct starfive_dwmac *dwmac = priv;
> > +	int ret;
> > +
> > +	ret = phy_init(dwmac->serdes_phy);
> > +	if (ret)
> > +		return ret;
> 
> This is called also in case of PM suspend/resume. Do you need to keep the init
> here, or should that moved at probe time only? Similar question for phy_exit()
> below.
> 
> Thanks!
> 
> Paolo
Yes ,The serdes PHY code is simple.  But I am not test with PHY code
I will send next version with PHY code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ