From: Andrew Lunn <andrew@lunn.ch>
To: Joey Lu <a0987203069@gmail.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
mcoquelin.stm32@gmail.com, richardcochran@gmail.com,
alexandre.torgue@foss.st.com, joabreu@synopsys.com,
ychuang3@nuvoton.com, schung@nuvoton.com, yclu4@nuvoton.com,
peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH v4 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family
Date: Tue, 3 Dec 2024 15:58:42 +0100 [thread overview]
Message-ID: <ba09cea2-4cf7-4203-ae98-ea5d8413f69e@lunn.ch> (raw)
In-Reply-To: <75eb13d7-b582-4056-b707-706865611706@gmail.com>
On Tue, Dec 03, 2024 at 05:12:24PM +0800, Joey Lu wrote:
> Dear Andrew,
>
> You're correct. In the stmmac_hw_init function within stmmac_main.c, whether
> pmt is true is determined by checking the pmt_remote_wake_up bit in the
> hardware feature register. However, our hardware configuration only supports
> magic packet and not remote wakeup, so it must be overwritten in the glue
> driver.
Please add a comment explaining this.
I'm not sure why the original code doesn't include magic packet as part
> of pmt.
>
> source code:
>
> stmmac_hw_init() @net/ethernet/stmicro/stmmac/stmmac_main.c
>
> priv->plat->enh_desc = priv->dma_cap.enh_desc;
> priv->plat->pmt = priv->dma_cap.pmt_remote_wake_up &&
> !(priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL);
> priv->hw->pmt = priv->plat->pmt;
>
> Or modify the condition as follows:
>
> priv->plat->pmt = (priv->dma_cap.pmt_remote_wake_up || priv->
> dma_cap.pmt_magic_frame) &&
> !(priv->plat->flags & STMMAC_FLAG_USE_PHY_WOL);
Are there other glue drivers which would benefit from this? It is hard
for me to say if you hardware is odd, or if this should be a generic
feature which other glue drivers would use.
Andrew
prev parent reply other threads:[~2024-12-03 14:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 2:36 [PATCH v4 0/3] Add support for Nuvoton MA35D1 GMAC Joey Lu
2024-12-02 2:36 ` [PATCH v4 1/3] dt-bindings: net: nuvoton: Add schema for Nuvoton MA35 family GMAC Joey Lu
2024-12-04 14:27 ` Rob Herring
2024-12-06 3:19 ` Joey Lu
2024-12-02 2:36 ` [PATCH v4 2/3] arm64: dts: nuvoton: Add Ethernet nodes Joey Lu
2024-12-02 2:36 ` [PATCH v4 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family Joey Lu
2024-12-03 1:43 ` Andrew Lunn
[not found] ` <75eb13d7-b582-4056-b707-706865611706@gmail.com>
2024-12-03 14:58 ` Andrew Lunn [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=ba09cea2-4cf7-4203-ae98-ea5d8413f69e@lunn.ch \
--to=andrew@lunn.ch \
--cc=a0987203069@gmail.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=schung@nuvoton.com \
--cc=ychuang3@nuvoton.com \
--cc=yclu4@nuvoton.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®