Thread (17 messages) flat view 17 messages, 4 authors, 2021-02-25

Re: [PATCH V1 net-next 0/3] net: stmmac: implement clocks

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-02-24 01:55:46

On Wed, 24 Feb 2021 01:45:40 +0000 Joakim Zhang wrote:
quoted
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.
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help