lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7073a4e9-2a6b-a3e9-769e-5069b0e9772c@loongson.cn>
Date: Wed, 22 Jan 2025 09:31:53 +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/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.
>>
>> Signed-off-by: Qunqin Zhao <zhaoqunqin@...ngson.cn>
>> ---
>>   .../net/ethernet/stmicro/stmmac/dwmac-loongson.c    | 13 +++++++++++++
>>   1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c 
>> b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> index bfe6e2d631bd..35639d26256c 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> @@ -516,6 +516,18 @@ static int loongson_dwmac_acpi_config(struct 
>> pci_dev *pdev,
>>       return 0;
>>   }
> How about putting a part of the commit message here as a comment?
Sure, will do that.
>> +static int loongson_fix_soc_reset(void *priv, void __iomem *ioaddr)
>
>
>> +{
>> +    u32 value = readl(ioaddr + DMA_BUS_MODE);
>> +
>> +    value |= DMA_BUS_MODE_SFT_RESET;
>> +    writel(value, ioaddr + DMA_BUS_MODE);
>> +
>> +    return readl_poll_timeout(ioaddr + DMA_BUS_MODE, value,
>> +                  !(value & DMA_BUS_MODE_SFT_RESET),
>> +                  10000, 2000000);
>> +}
>> +
>>   static int loongson_dwmac_probe(struct pci_dev *pdev, const struct 
>> pci_device_id *id)
>>   {
>>       struct plat_stmmacenet_data *plat;
>> @@ -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?

Thanks.

>
> Thanks,
>
> Yanteng


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ