[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <034523fc-5ecd-87ea-c0b4-8c21705cc50d@kernel.org>
Date: Thu, 8 Dec 2022 11:49:48 +0200
From: Roger Quadros <rogerq@...nel.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, maciej.fijalkowski@...el.com, andrew@...n.ch,
edumazet@...gle.com, pabeni@...hat.com, vigneshr@...com,
linux-omap@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 net-next 4/6] net: ethernet: ti: am65-cpsw: Add
suspend/resume support
On 08/12/2022 06:21, Jakub Kicinski wrote:
> On Tue, 6 Dec 2022 11:44:17 +0200 Roger Quadros wrote:
>> 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");
>> + return -ETIMEDOUT;
>
> Doesn't this function leak power management references on almost all
> error paths? Not really related to this set, tho.
Oh yes it does. I'll send a separate fix.
cheers,
-roger
Powered by blists - more mailing lists