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]
Date:   Mon, 4 Nov 2019 13:33:35 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     netdev@...r.kernel.org, vivien.didelot@...il.com,
        davem@...emloft.net, Jakub Kicinski <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH net-next 2/2] net: dsa: bcm_sf2: Add support for optional
 reset controller line

On 11/4/19 12:48 PM, Andrew Lunn wrote:
>> @@ -350,6 +350,18 @@ static int bcm_sf2_sw_rst(struct bcm_sf2_priv *priv)
>>  {
>>  	unsigned int timeout = 1000;
>>  	u32 reg;
>> +	int ret;
>> +
>> +	/* The watchdog reset does not work on 7278, we need to hit the
>> +	 * "external" reset line through the reset controller.
>> +	 */
>> +	if (priv->type == BCM7278_DEVICE_ID && !IS_ERR(priv->rcdev)) {
>> +		ret = reset_control_assert(priv->rcdev);
>> +		if (ret)
>> +			return ret;
>> +
>> +		return reset_control_deassert(priv->rcdev);
> 
> Hi Florian
> 
> Here you do it conditional on priv->type
> 
>> @@ -1223,6 +1240,8 @@ static int bcm_sf2_sw_remove(struct platform_device *pdev)
>>  	/* Disable all ports and interrupts */
>>  	bcm_sf2_sw_suspend(priv->dev->ds);
>>  	bcm_sf2_mdio_unregister(priv);
>> +	if (!IS_ERR(priv->rcdev))
>> +		reset_control_assert(priv->rcdev);
> 
> And here it is unconditional. Seem a bit inconsistent. If it is in DT,
> why not use it?

That's an oversight, thanks for spotting that, v2 coming shortly.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ