回复: [PATCH] net: stmmac: enable MAC after MTL configuring

Fan Hailong/范海龙 hailong.fan at siengine.com
Thu Oct 17 18:15:30 PDT 2024


Hi

For example, ETH is directly connected to the switch, which never power down and sends broadcast packets at regular intervals. 
During the process of opening ETH, data may flow into the MTL FIFO, once MAC RX is enabled.
and then, MTL will be set, such as FIFO size. 
Once enable DMA, There is a certain probability that DMA will read incorrect data from MTL FIFO, causing DMA to hang up. 
By read DMA_Debug_Status, you can be observed that the RPS remains at a certain value forever. 
The correct process should be to configure MAC/MTL/DMA before enabling DMA/MAC

stmmac_start_rx/tx and stmmac_stop_rx/tx should only handle the DMA module to avoid confusion



-----邮件原件-----
发件人: Simon Horman <horms at kernel.org> 
发送时间: 2024年10月17日 18:19
收件人: 2694439648 at qq.com
抄送: alexandre.torgue at foss.st.com; joabreu at synopsys.com; davem at davemloft.net; edumazet at google.com; kuba at kernel.org; pabeni at redhat.com; mcoquelin.stm32 at gmail.com; netdev at vger.kernel.org; linux-stm32 at st-md-mailman.stormreply.com; linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; Fan Hailong/范海龙 <hailong.fan at siengine.com>
主题: Re: [PATCH] net: stmmac: enable MAC after MTL configuring

On Mon, Oct 14, 2024 at 01:44:03PM +0800, 2694439648 at qq.com wrote:
> From: "hailong.fan" <hailong.fan at siengine.com>
> 
> DMA maybe block while ETH is opening,
> Adjust the enable sequence, put the MAC enable last
> 
> Signed-off-by: hailong.fan <hailong.fan at siengine.com>

Hi,

I think that some more explanation of this is required.
Including if a problem has been observed, and if so under what conditions. Or, if not, some background information on why this adjustment is correct.

I also think some explanation is required of the relationship between the changes this patch makes to setup, and the changes it makes to start and stop.

...


More information about the linux-arm-kernel mailing list