[PATCH v4 3/3] net: stmmac: dwmac-nuvoton: Add dwmac glue for Nuvoton MA35 family
Joey Lu
a0987203069 at gmail.com
Tue Dec 3 20:12:24 AEDT 2024
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. 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);*
Thanks!
BR,
Joey*
*
Andrew Lunn 於 12/3/2024 9:43 AM 寫道:
>> + /* We support WoL by magic packet, override pmt to make it work! */
>> + plat_dat->pmt = 1;
>> + device_set_wakeup_capable(&pdev->dev, 1);
> It seems odd to me that there is no WoL support in this glue
> driver. So i assume the core driver is doing it? So why does the core
> driver not set pmt and wakeup_capable ?
>
> Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20241203/2af54841/attachment-0001.htm>
More information about the openbmc
mailing list