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] [day] [month] [year] [list]
Message-ID: <d9362c40-fde1-4380-9fdb-2d6599dbaab1@loongson.cn>
Date: Thu, 11 Apr 2024 17:29:52 +0800
From: Yanteng Si <siyanteng@...ngson.cn>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: andrew@...n.ch, hkallweit1@...il.com, peppe.cavallaro@...com,
 alexandre.torgue@...s.st.com, joabreu@...opsys.com, fancer.lancer@...il.com,
 Jose.Abreu@...opsys.com, chenhuacai@...nel.org, guyinggang@...ngson.cn,
 netdev@...r.kernel.org, chris.chenfeiyang@...il.com, siyanteng01@...il.com
Subject: Re: [PATCH net-next v10 6/6] net: stmmac: dwmac-loongson: Add
 Loongson GNET support


在 2024/4/10 21:07, Russell King (Oracle) 写道:
> On Tue, Apr 09, 2024 at 10:04:34PM +0800, Yanteng Si wrote:
>> +	/* The GMAC device with PCI ID 7a03 does not support any pause mode.
>> +	 * The GNET device (only LS7A2000) does not support half-duplex.
>> +	 */
>> +	if (pdev->device == PCI_DEVICE_ID_LOONGSON_GMAC) {
>> +		priv->hw->link.caps = MAC_10FD | MAC_100FD |
>> +			MAC_1000FD;
>> +	} else {
> I'm sorry, but what follows looks totally broken to me.
Sorry. Let's make it better together.
>
>> +		priv->hw->link.caps = (MAC_ASYM_PAUSE |
>> +			MAC_SYM_PAUSE | MAC_10FD | MAC_100FD | MAC_1000FD);
> Parens not required.
>
> This sets 10Mbps full duplex, 100Mbps full duplex, 1000Mbps full duplex.
> It does *not* set 10Mbps half duplex, 100Mbps half duplex, nor 1000Mbps
> half duplex.
OK, I will set them by MAC10 | MAC100 | MAC1000.
>
>> +
>> +		if (loongson_gmac == DWMAC_CORE_3_70) {
>> +			priv->hw->link.caps &= ~(MAC_10HD |
>> +				MAC_100HD | MAC_1000HD);
>> +		}
> Braces not required.
>
> This clears 10Mbps half duplex, 100Mbps half duplex, 1000Mbps half
> duplex, all of which were _NOT_ set. Therefore this code as written
> can be entirely deleted.
>
> Alternatively, this code is completely untested and is functionally
> incorrect.

Sorry.


In fact, this was the version before picking up Serge's patch(1/6), 
which was tested

at the time. Just picked up, between the haste did not test enough. But 
in v11,

I've dropped this function and fixed it in setup().


Thanks,

Yanteng

>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ