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: <67de62f1-c4c5-4534-979a-7eb430a836de@loongson.cn>
Date: Mon, 13 May 2024 18:16:55 +0800
From: Yanteng Si <siyanteng@...ngson.cn>
To: Serge Semin <fancer.lancer@...il.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, peppe.cavallaro@...com,
 alexandre.torgue@...s.st.com, joabreu@...opsys.com, Jose.Abreu@...opsys.com,
 chenhuacai@...nel.org, linux@...linux.org.uk, guyinggang@...ngson.cn,
 netdev@...r.kernel.org, chris.chenfeiyang@...il.com, siyanteng01@...il.com
Subject: Re: [PATCH net-next v12 12/15] net: stmmac: dwmac-loongson: Fixed
 failure to set network speed to 1000.


在 2024/5/5 06:13, Serge Semin 写道:
> On Thu, Apr 25, 2024 at 09:10:37PM +0800, Yanteng Si wrote:
>> GNET devices with dev revision 0x00 do not support manually
>> setting the speed to 1000.
>>
>> Signed-off-by: Feiyang Chen<chenfeiyang@...ngson.cn>
>> Signed-off-by: Yinggang Gu<guyinggang@...ngson.cn>
>> Signed-off-by: Yanteng Si<siyanteng@...ngson.cn>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 8 ++++++++
>>   drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 6 ++++++
>>   include/linux/stmmac.h                               | 1 +
>>   3 files changed, 15 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> index df5899bec91a..a16bba389417 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
>> @@ -10,6 +10,7 @@
>>   #include "stmmac.h"
>>   
>>   #define PCI_DEVICE_ID_LOONGSON_GMAC	0x7a03
>> +#define PCI_DEVICE_ID_LOONGSON_GNET	0x7a13
>>   
>>   struct stmmac_pci_info {
>>   	int (*setup)(struct pci_dev *pdev, struct plat_stmmacenet_data *plat);
>> @@ -179,6 +180,13 @@ static int loongson_dwmac_probe(struct pci_dev *pdev, const struct pci_device_id
>>   
>>   	ret = loongson_dwmac_config_legacy(pdev, plat, &res, np);
>>   
>> +	/* GNET devices with dev revision 0x00 do not support manually
>> +	 * setting the speed to 1000.
>> +	 */
>> +	if (pdev->device == PCI_DEVICE_ID_LOONGSON_GNET &&
>> +	    pdev->revision == 0x00)
>> +		plat->flags |= STMMAC_FLAG_DISABLE_FORCE_1000;
>> +
> That's why it's important to wait for the discussions being finished.
> If you waited for some time I would have told you that the only part
> what was required to move to the separate patch was the changes in the
> files:
> drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> include/linux/stmmac.h
>
> So please move the changes above to the patch
> [PATCH net-next v12 13/15] net: stmmac: dwmac-loongson: Add Loongson GNET support
> * with the flag setup being done in the loongson_gnet_data() method.
>
> Thus you'll be able to drop the patch 14
> [PATCH net-next v12 14/15] net: stmmac: dwmac-loongson: Move disable_force flag to _gnet_date

OK.


Thanks,

Yanteng


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ