linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
	"Ismail, Mohammad Athari" <mohammad.athari.ismail@intel.com>
Cc: "Ling, Pei Lee" <pei.lee.ling@intel.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"davem@davemloft.net" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Voon, Weifeng" <weifeng.voon@intel.com>,
	"vee.khee.wong@linux.intel.com" <vee.khee.wong@linux.intel.com>,
	"Wong, Vee Khee" <vee.khee.wong@intel.com>
Subject: Re: [PATCH net] net: phy: skip disabling interrupt when WOL is enabled in shutdown
Date: Tue, 6 Jul 2021 19:51:25 -0700	[thread overview]
Message-ID: <fc1b6368-356f-0a8f-b461-1ed19a628a3a@gmail.com> (raw)
In-Reply-To: <YOT75ZvoB0qnsK6W@lunn.ch>



On 7/6/2021 5:57 PM, Andrew Lunn wrote:
> On Wed, Jul 07, 2021 at 12:36:30AM +0000, Ismail, Mohammad Athari wrote:
>>
>>
>>> -----Original Message-----
>>> From: Andrew Lunn <andrew@lunn.ch>
>>> Sent: Tuesday, July 6, 2021 9:14 PM
>>> To: Ling, Pei Lee <pei.lee.ling@intel.com>
>>> Cc: Heiner Kallweit <hkallweit1@gmail.com>; Russell King
>>> <linux@armlinux.org.uk>; davem@davemloft.net; Jakub Kicinski
>>> <kuba@kernel.org>; Ioana Ciornei <ioana.ciornei@nxp.com>;
>>> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Voon, Weifeng
>>> <weifeng.voon@intel.com>; vee.khee.wong@linux.intel.com; Wong, Vee Khee
>>> <vee.khee.wong@intel.com>; Ismail, Mohammad Athari
>>> <mohammad.athari.ismail@intel.com>
>>> Subject: Re: [PATCH net] net: phy: skip disabling interrupt when WOL is enabled
>>> in shutdown
>>>
>>> On Tue, Jul 06, 2021 at 05:02:09PM +0800, Ling Pei Lee wrote:
>>>> From: Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>
>>>>
>>>> PHY WOL requires WOL interrupt event to trigger the WOL signal in
>>>> order to wake up the system. Hence, the PHY driver should not disable
>>>> the interrupt during shutdown if PHY WOL is enabled.
>>>
>>> If the device is being used to wake the system up, why is it being shutdown?
>>>
>>
>> Hi Andrew,
>>
> 
>> When the platform goes to S5 state (ex: shutdown -h now), regardless
>> PHY WOL is enabled or not, phy_shutdown() is called. So, for the
>> platform that support WOL from S5, we need to make sure the PHY
>> still can trigger WOL event. Disabling the interrupt through
>> phy_disable_interrupts() in phy_shutdown() will disable WOL
>> interrupt as well and cause the PHY WOL not able to trigger.
> 
> This sounds like a firmware problem. If linux is shutdown, linux is
> not controlling the hardware, the firmware is. So the firmware should
> probably be configuring the PHY after Linux powers off.

There are platforms supporting S5 shutdown that don't run firmware and 
would also expect to be able to be woken-up from an Ethernet 
PHY/Wake-on-LAN scheme.

The problem that is being addressed here is that even if your Ethernet 
driver was playing through properly and attempting not to disable the 
Ethernet PHY in suspend or shutdown callback, that decision would be 
overridden by phy_shutdown() when the MDIO bus' shutdown is called and 
that breaks up that wake-up mode.

> 
> If Linux is suspended, then Linux is still controlling the hardware,
> and it will not shutdown the PHY.


-- 
Florian

      reply	other threads:[~2021-07-07  2:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06  9:02 [PATCH net] net: phy: skip disabling interrupt when WOL is enabled in shutdown Ling Pei Lee
2021-07-06 13:14 ` Andrew Lunn
2021-07-07  0:36   ` Ismail, Mohammad Athari
2021-07-07  0:57     ` Andrew Lunn
2021-07-07  2:51       ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc1b6368-356f-0a8f-b461-1ed19a628a3a@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mohammad.athari.ismail@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pei.lee.ling@intel.com \
    --cc=vee.khee.wong@intel.com \
    --cc=vee.khee.wong@linux.intel.com \
    --cc=weifeng.voon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).