[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ba09cea2-4cf7-4203-ae98-ea5d8413f69e@lunn.ch>
Date: Tue, 3 Dec 2024 15:58:42 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Joey Lu <a0987203069@...il.com>
Cc: andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, robh@...nel.org,
krzk+dt@...nel.org, conor+dt@...nel.org, mcoquelin.stm32@...il.com,
richardcochran@...il.com, alexandre.torgue@...s.st.com,
joabreu@...opsys.com, ychuang3@...oton.com, schung@...oton.com,
yclu4@...oton.com, peppe.cavallaro@...com,
linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
openbmc@...ts.ozlabs.org, linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH v4 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for
Nuvoton MA35 family
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
Powered by blists - more mailing lists