mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: POPESCU Catalin <catalin.popescu@leica-geosystems.com>
To: Florian Fainelli <f.fainelli@gmail.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"robh@kernel.org" <robh@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org"
	<krzysztof.kozlowski+dt@linaro.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"xiaoning.wang@nxp.com" <xiaoning.wang@nxp.com>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	"alexandre.torgue@foss.st.com" <alexandre.torgue@foss.st.com>,
	"joabreu@synopsys.com" <joabreu@synopsys.com>,
	"mcoquelin.stm32@gmail.com" <mcoquelin.stm32@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"imx@lists.linux.dev" <imx@lists.linux.dev>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-stm32@st-md-mailman.stormreply.com"
	<linux-stm32@st-md-mailman.stormreply.com>,
	GEO-CHHER-bsp-development
	<bsp-development.geo@leica-geosystems.com>,
	"m.felsch@pengutronix.de" <m.felsch@pengutronix.de>
Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-imx: add support for PHY WOL
Date: Thu, 7 Mar 2024 09:13:10 +0000	[thread overview]
Message-ID: <ddd2f984-e5e7-4708-a013-bfd668794466@leica-geosystems.com> (raw)
In-Reply-To: <bbe3e611-a310-41f5-a037-4b7d5e914b94@gmail.com>

On 06.03.24 18:41, Florian Fainelli wrote:
> [Some people who received this message don't often get email from 
> f.fainelli@gmail.com. Learn why this is important at 
> https://aka.ms/LearnAboutSenderIdentification ]
>
> This email is not from Hexagon’s Office 365 instance. Please be 
> careful while clicking links, opening attachments, or replying to this 
> email.
>
>
> On 3/6/24 09:24, Catalin Popescu wrote:
>> Add support for PHY WOL capability into dwmac-imx MAC driver.
>> This is required to enable WOL feature on a platform where MAC
>> WOL capability is not sufficient and WOL capability built into
>> the PHY is actually needed.
>>
>> Signed-off-by: Catalin Popescu <catalin.popescu@leica-geosystems.com>
>
> Nope, this is not about how to do this. You use a Device Tree property
> as a policy rather than properly describe your systems capabilities.
I'm not sure what policy means in that context.
BTW, dwmac-mediatek does the same with binding "mediatek,mac-wol" which 
is a commit from 03/2022.
I understand this way of doing became "unacceptable" since then ??
>
> What sort of Wake-on-LAN do you want to be done by the PHY exactly? Does
> the PHY have packet matching capabilities, or do you want to wake-up
> from a PHY event like link up/down/any interrupt?

PHY is TI dp83826 and has secure magic packet capability. For the wakeup 
we rely on a external MCU which is signaled through a PHY's GPIO which 
toggles only on magic packet reception.
We want to wakeup _only_ on magic packet reception.

>
> If the former, then you would need to interrogate the PHY driver via
> phy_ethtool_get_wol() to figure out what Wake-on-LAN modes it is capable
> of supporting and then make a decision whether to prioritize Wake-on-LAN
> from the PHY or the MAC, or maybe only the PHY can actually wake-up the
> system in your case.
>
stmmac already calls phy_ethtool_get_wol/phy_ethtool_set_wol through 
phylink_ethtool_get_wol/phylink_ethtool_set_wol. But needs flag 
STMMAC_FLAG_USE_PHY_WOL to be set. Otherwise, it will only work with MAC 
WOL which we don't want. With the new binding we just allow the MAC 
driver to call the PHY for the WOL capability. This doesn't force WOL to 
enabled or disabled, as it is still up to ethtool to configure it.
> If the latter, then you need to add support for WAKE_PHY to the stmmac
> driver.
No, we don't want WAKE_PHY, we want WAKE_MAGIC/WAKE_MAGICSECURE which 
stmmac driver already supports.
>
> pw-bot: cr
> -- 
> Florian
>


  reply	other threads:[~2024-03-07  9:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 17:24 [PATCH net-next 1/2] dt-bindings: net: dwmac-imx: add nxp,phy-wol Catalin Popescu
2024-03-06 17:24 ` [PATCH net-next 2/2] net: stmmac: dwmac-imx: add support for PHY WOL Catalin Popescu
2024-03-06 17:41   ` Florian Fainelli
2024-03-07  9:13     ` POPESCU Catalin [this message]
2024-03-07 10:01       ` POPESCU Catalin
2024-03-07 18:52       ` Florian Fainelli
2024-03-08 17:48         ` POPESCU Catalin
2024-03-08 17:56           ` Florian Fainelli
2024-03-06 17:42 ` [PATCH net-next 1/2] dt-bindings: net: dwmac-imx: add nxp,phy-wol Florian Fainelli

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=ddd2f984-e5e7-4708-a013-bfd668794466@leica-geosystems.com \
    --to=catalin.popescu@leica-geosystems.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=joabreu@synopsys.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=m.felsch@pengutronix.de \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=xiaoning.wang@nxp.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

all inboxes | Powered by JetHome®