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: <ce7508df-f154-4fd7-a621-abe371c1cb4a@iscas.ac.cn>
Date: Mon, 1 Sep 2025 08:15:41 +0800
From: Vivian Wang <wangruikang@...as.ac.cn>
To: Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
 Andrew Lunn <andrew+netdev@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, Yixun Lan <dlan@...too.org>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, Philipp Zabel <p.zabel@...gutronix.de>,
 Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
 <palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
 Alexandre Ghiti <alex@...ti.fr>
Cc: Vivian Wang <uwu@...m.page>, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
 Junhui Liu <junhui.liu@...moral.tech>, Simon Horman <horms@...nel.org>,
 Maxime Chevallier <maxime.chevallier@...tlin.com>, netdev@...r.kernel.org,
 devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org,
 spacemit@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v8 2/5] net: spacemit: Add K1 Ethernet MAC


On 8/29/25 09:51, Troy Mitchell wrote:
> On Thu, Aug 28, 2025 at 04:47:50PM +0800, Vivian Wang wrote:
>> The Ethernet MACs found on SpacemiT K1 appears to be a custom design
>> that only superficially resembles some other embedded MACs. SpacemiT
>> refers to them as "EMAC", so let's just call the driver "k1_emac".
>>
>> Supports RGMII and RMII interfaces. Includes support for MAC hardware
>> statistics counters. PTP support is not implemented.
>>
>> Signed-off-by: Vivian Wang <wangruikang@...as.ac.cn>
>> Reviewed-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
>> Reviewed-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
>> Tested-by: Junhui Liu <junhui.liu@...moral.tech>
>> Tested-by: Troy Mitchell <troy.mitchell@...ux.spacemit.com>
>> ---
> [...]
>> diff --git a/drivers/net/ethernet/spacemit/k1_emac.c b/drivers/net/ethernet/spacemit/k1_emac.c
>> new file mode 100644
>> index 0000000000000000000000000000000000000000..49afe9312a742c27dd35a015d75a1de7ec5c7d15
>> --- /dev/null
> [...]
>> +
>> +static int emac_phy_interface_config(struct emac_priv *priv)
>> +{
>> +	u32 val = 0, mask = PHY_INTF_RGMII;
>> +
>> +	switch (priv->phy_interface) {
>> +	case PHY_INTERFACE_MODE_RMII:
>> +		mask |= REF_CLK_SEL;
> How about we move `val = 0` to here? 
> This makes it clearer that val should be 0 when PHY_INTERFACE_MODE_RMII,
> instead of being hidden in the initialization.

I'll probably just use phy_interface_mode_is_rgmii or something for val.

I will clean this up, but I'll wait for a few more changes to batch up
before sending the next version.

> Reviewed-by: Troy Mitchell <troy.mitchell@...ux.spacemit.com>

Thank you!

Vivian "dramforever" Wang


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ