[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210223175441.2a1b86f1@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Tue, 23 Feb 2021 17:54:41 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Joakim Zhang <qiangqing.zhang@....com>
Cc: "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...com" <alexandre.torgue@...com>,
"joabreu@...opsys.com" <joabreu@...opsys.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH V1 net-next 0/3] net: stmmac: implement clocks
On Wed, 24 Feb 2021 01:45:40 +0000 Joakim Zhang wrote:
> > I'm not an expert on this stuff, but is there a reason you're not integrating this
> > functionality with the power management subsystem?
>
> Do you mean that implement runtime power management for driver? If
> yes, I think that is another feature, we can support later.
Runtime is a strong word, IIUC you can just implement the PM callbacks,
and always resume in .open and always suspend in .close. Pretty much
what you have already.
> > I don't think it'd change the functionality, but it'd feel more idiomatic to fit in
> > the standard Linux framework.
>
> Yes, there is no functionality change, this patch set just adds clocks management.
> In the driver now, we manage clocks at two point side:
> 1. enable clocks when probe driver, disable clocks when remove driver.
> 2. disable clocks when system suspend, enable clocks when system resume back.
>
> This should not be enough, such as, even we close the NIC, the clocks still enabled. So this patch improve below:
> Keep clocks disabled after driver probe, enable clocks when NIC up, and then disable clocks when NIC down.
> The aim is to enable clocks when it needs, others keep clocks disabled.
Understood. Please double check ethtool callbacks work fine. People
often forget about those when disabling clocks in .close.
Powered by blists - more mailing lists