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]
Date:   Fri, 2 Dec 2022 15:41:51 +0200
From:   Roger Quadros <rogerq@...nel.org>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Paolo Abeni <pabeni@...hat.com>, davem@...emloft.net,
        maciej.fijalkowski@...el.com, kuba@...nel.org, edumazet@...gle.com,
        vigneshr@...com, linux-omap@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 net-next 4/6] net: ethernet: ti: am65-cpsw: Add
 suspend/resume support



On 01/12/2022 17:19, Andrew Lunn wrote:
> On Thu, Dec 01, 2022 at 01:44:28PM +0200, Roger Quadros wrote:
>> Hi,
>>
>> On 01/12/2022 13:40, Paolo Abeni wrote:
>>> On Tue, 2022-11-29 at 15:34 +0200, Roger Quadros wrote:
>>>> @@ -555,11 +556,26 @@ static int am65_cpsw_nuss_ndo_slave_open(struct net_device *ndev)
>>>>  	struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
>>>>  	struct am65_cpsw_port *port = am65_ndev_to_port(ndev);
>>>>  	int ret, i;
>>>> +	u32 reg;
>>>>  
>>>>  	ret = pm_runtime_resume_and_get(common->dev);
>>>>  	if (ret < 0)
>>>>  		return ret;
>>>>  
>>>> +	/* Idle MAC port */
>>>> +	cpsw_sl_ctl_set(port->slave.mac_sl, CPSW_SL_CTL_CMD_IDLE);
>>>> +	cpsw_sl_wait_for_idle(port->slave.mac_sl, 100);
>>>> +	cpsw_sl_ctl_reset(port->slave.mac_sl);
>>>> +
>>>> +	/* soft reset MAC */
>>>> +	cpsw_sl_reg_write(port->slave.mac_sl, CPSW_SL_SOFT_RESET, 1);
>>>> +	mdelay(1);
>>>> +	reg = cpsw_sl_reg_read(port->slave.mac_sl, CPSW_SL_SOFT_RESET);
>>>> +	if (reg) {
>>>> +		dev_err(common->dev, "soft RESET didn't complete\n");
>>>
>>> I *think* Andrew was asking for dev_dbg() here, but let's see what he
>>> has to say :)
>>
>> In the earlier revision we were not exiting with error, so dev_dbg()
>> was more appropriate there.
>> In this revision we error out so I thought dev_err() was ok.
> 
> Yes, i would agree. It is fatal, so dev_err() is appropriate.
> 
> What is not shown here is the return value. I think it is -EBUSY? I'm
> wondering if -ETIMEDOUT is better?

Yes it is -EBUSY. -ETIMEDOUT is better though so I'll re-spin this series.

cheers,
-roger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ