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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b20caac3-3fc0-461b-8ed5-4cc825323b0c@microchip.com>
Date: Thu, 7 Mar 2024 09:13:06 +0000
From: <Parthiban.Veerasooran@...rochip.com>
To: <Woojung.Huh@...rochip.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <horms@...nel.org>,
	<saeedm@...dia.com>, <anthony.l.nguyen@...el.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <andrew@...n.ch>, <corbet@....net>,
	<linux-doc@...r.kernel.org>, <robh+dt@...nel.org>,
	<krzysztof.kozlowski+dt@...aro.org>, <conor+dt@...nel.org>,
	<devicetree@...r.kernel.org>, <Horatiu.Vultur@...rochip.com>,
	<ruanjinjie@...wei.com>, <Steen.Hegelund@...rochip.com>,
	<vladimir.oltean@....com>
CC: <UNGLinuxDriver@...rochip.com>, <Thorsten.Kummermehr@...rochip.com>,
	<Pier.Beruto@...emi.com>, <Selvamani.Rajagopal@...emi.com>,
	<Nicolas.Ferre@...rochip.com>, <benjamin.bigler@...nformulastudent.ch>
Subject: Re: [PATCH net-next v3 11/12] microchip: lan865x: add driver support
 for Microchip's LAN865X MAC-PHY

Hi Woojung,

On 07/03/24 5:14 am, Woojung Huh - C21699 wrote:
> Hi Parthiban,
> 
>> diff --git a/drivers/net/ethernet/microchip/lan865x/lan865x.c
>> b/drivers/net/ethernet/microchip/lan865x/lan865x.c
> ...
>> +static void lan865x_multicast_work_handler(struct work_struct *work)
>> +{
>> +	struct lan865x_priv *priv = container_of(work, struct lan865x_priv,
>> +						 multicast_work);
>> +	u32 regval = 0;
>> +
>> +	if (priv->netdev->flags & IFF_PROMISC) {
>> +		/* Enabling promiscuous mode */
>> +		regval |= MAC_NET_CFG_PROMISCUOUS_MODE;
>> +		regval &= (~MAC_NET_CFG_MULTICAST_MODE);
>> +		regval &= (~MAC_NET_CFG_UNICAST_MODE);
>> +	} else if (priv->netdev->flags & IFF_ALLMULTI) {
>> +		/* Enabling all multicast mode */
>> +		regval &= (~MAC_NET_CFG_PROMISCUOUS_MODE);
>> +		regval |= MAC_NET_CFG_MULTICAST_MODE;
>> +		regval &= (~MAC_NET_CFG_UNICAST_MODE);
>> +	} else if (!netdev_mc_empty(priv->netdev)) {
>> +		lan865x_set_specific_multicast_addr(priv->netdev);
>> +		regval &= (~MAC_NET_CFG_PROMISCUOUS_MODE);
>> +		regval &= (~MAC_NET_CFG_MULTICAST_MODE);
>> +		regval |= MAC_NET_CFG_UNICAST_MODE;
>> +	} else {
>> +		/* enabling local mac address only */
>> +		if (oa_tc6_write_register(priv->tc6, LAN865X_REG_MAC_H_HASH,
>> +					  regval)) {
> 
> Your intention to write 0 into LAN865X_REG_MAC_H_HASH?
> If then, using 0 than regval makes more clear.
Yes sure, will correct it in the next version.
> 
>> +			netdev_err(priv->netdev, "Failed to write reg_hashh");
>> +			return;
>> +		}
>> +		if (oa_tc6_write_register(priv->tc6, LAN865X_REG_MAC_L_HASH,
>> +					  regval)) {
> 
> Same here.
Yes sure, will correct it in the next version.

Best regards,
Parthiban V
> 
>> +			netdev_err(priv->netdev, "Failed to write reg_hashl");
>> +			return;
>> +		}
>> +	}
>> +	if (oa_tc6_write_register(priv->tc6, LAN865X_REG_MAC_NET_CFG,
>> regval))
>> +		netdev_err(priv->netdev,
>> +			   "Failed to enable promiscuous/multicast/normal mode");
>> +}
>> +
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ