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

From: Fan Hailong/范海龙 <[email-masked]>
Date: Fri, 18 Oct 2024 01:15:30 +0000

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 <[email-masked]> 
发送时间: 2024年10月17日 18:19
收件人: [email-masked]
抄送: [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; [email-masked]; Fan Hailong/范海龙 <[email-masked]>
主题: Re: [PATCH] net: stmmac: enable MAC after MTL configuring

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

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.

...