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: <20230718131506.ro2o45qhggykwhwc@pengutronix.de>
Date:   Tue, 18 Jul 2023 15:15:06 +0200
From:   Marco Felsch <m.felsch@...gutronix.de>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
        peppe.cavallaro@...com, alexandre.torgue@...s.st.com,
        joabreu@...opsys.com, mcoquelin.stm32@...il.com,
        netdev@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, kernel@...gutronix.de
Subject: Re: [PATCH net-next 2/2] net: stmmac: platform: add support for
 phy-supply

On 23-07-18, Andrew Lunn wrote:
> On Tue, Jul 18, 2023 at 10:38:41AM +0200, Marco Felsch wrote:
> > On 23-07-18, Andrew Lunn wrote:
> > > > +static int stmmac_phy_power(struct platform_device *pdev,
> > > > +			    struct plat_stmmacenet_data *plat,
> > > > +			    bool enable)
> > > > +{
> > > > +	struct regulator *regulator = plat->phy_regulator;
> > > > +	int ret = 0;
> > > > +
> > > > +	if (regulator) {
> > > > +		if (enable)
> > > > +			ret = regulator_enable(regulator);
> > > > +		else
> > > > +			regulator_disable(regulator);
> > > > +	}
> > > > +
> > > > +	if (ret)
> > > > +		dev_err(&pdev->dev, "Fail to enable regulator\n");
> > > 
> > > 'enable' is only correct 50% of the time.
> > 
> > You mean to move it under the enable path.
> 
> Or don't use the word 'enable'. 'modify' ?

I changed it but kept the 'enable'.

> > Good point didn't consider WOL. Is there a way to check if WOL is
> > enabled?
> 
> Yes, plenty of MAC drivers do this. Look around.

Yep, checked the code and found the interesting parts :) Thanks for the
hint.

Regards,
  Marco

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ