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: <d16568e8-9ec8-4c4b-bbee-9d585c772c4b@lunn.ch>
Date:   Tue, 14 Mar 2023 01:30:35 +0100
From:   Andrew Lunn <andrew@...n.ch>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     netdev@...r.kernel.org, Clark Wang <xiaoning.wang@....com>,
        Eric Dumazet <edumazet@...gle.com>,
        Shenwei Wang <shenwei.wang@....com>,
        Wei Fang <wei.fang@....com>,
        NXP Linux Team <linux-imx@....com>, kernel@...gutronix.de,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net-next 2/9] net: fec: Don't return early on error in
 .remove()

> > > -	ret = pm_runtime_resume_and_get(&pdev->dev);
> > > -	if (ret < 0)
> > > -		return ret;
> > regulator_disable() probably does actually work because that is a
> > different hardware block unaffected by the suspend.
 
> fec_suspend() calls
> 
>         if (fep->reg_phy && !(fep->wol_flag & FEC_WOL_FLAG_ENABLE))
>                 regulator_disable(fep->reg_phy);

There are two different types of suspend here.

pm_runtime_resume_and_get() is about runtime suspend. It calls
fec_runtime_suspend() which just turns some clocks off/on.

fec_suspend() is for system sleep, where the whole system is put to
sleep, except what is needed to trigger a wake up, such as Wake on
LAN. The regulator is being used to power the PHY, so you obviously
don't want to turn the PHY off when doing WoL.

But if you are unloading the FEC, WoL is not going to work, so you
should turn the PHY off. And turning the PHY off should not have any
dependencies on first turning on FEC clocks in
pm_runtime_resume_and_get().

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ