[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c5abbb5b-97f3-2b34-26db-06e0dc82be84@loongson.cn>
Date: Thu, 6 Feb 2025 15:22:17 +0800
From: Qunqin Zhao <zhaoqunqin@...ngson.cn>
To: Yanteng Si <si.yanteng@...ux.dev>
Cc: kuba@...nel.org, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, pabeni@...hat.com, chenhuacai@...nel.org,
fancer.lancer@...il.com, netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: stmmac: dwmac-loongson: Add fix_soc_reset function
在 2025/1/22 下午4:53, Yanteng Si 写道:
>
>
>
> 在 2025/1/22 09:31, Qunqin Zhao 写道:
>>
>> 在 2025/1/21 下午9:41, Yanteng Si 写道:
>>>
>>> 在 1/21/25 16:25, Qunqin Zhao 写道:
>>>> Loongson's GMAC device takes nearly two seconds to complete DMA reset,
>>>> however, the default waiting time for reset is 200 milliseconds
>>> Is only GMAC like this?
>> At present, this situation has only been found on GMAC.
>
>>>> @@ -566,6 +578,7 @@ static int loongson_dwmac_probe(struct pci_dev
>>>> *pdev, const struct pci_device_id
>>>> plat->bsp_priv = ld;
>>>> plat->setup = loongson_dwmac_setup;
>>>> + plat->fix_soc_reset = loongson_fix_soc_reset;
>>>
>>> If only GMAC needs to be done this way, how about putting it inside
>>> the loongson_gmac_data()?
>>
>> Regardless of whether this situation occurs in other devices(like
>> gnet), this change will not have any impact on gnet, right?
>>
> Yeah,However, it is obvious that there is now a more suitable
> place for it. In the Loongson driver, `loongson_gmac_data()`
> and `loongson_default_data()` were designed from the beginning.
> When GNET support was added later, `loongson_gnet_data()`
> was designed. We once made great efforts to extract these codes
> from the `probe()` . Are we going to go back to the past?
>
> Of course, I'm not saying that I disagree with you fixing the
> GMAC in the `probe()`. I just think it's a bad start. After that,
> other people may also put similar code here, and eventually
> it will make the `probe` a mess.
>
> If you insist on doing this, please change the function name
> to `loongson_gmac_fix_reset()`, just like `loongson_gnet_fix_speed`.
Recently, it is found that GNET may also have a long DMA reset time.
And the commit
message should be "Loongson's DWMAC device may take nearly two seconds
to complete DMA reset,
however, the default waiting time for reset is 200 milliseconds".
Thanks.
>
>
> Thanks,
> Yanteng
Powered by blists - more mailing lists