* [PATCH] PM / Runtime: add note about re-calling in during device probe()
@ 2015-04-17 0:14 Ben Hutchings
2015-05-15 0:05 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2015-04-17 0:14 UTC (permalink / raw)
To: linux-pm; +Cc: linux-doc, CT kernel
From: Ben Dooks <ben.dooks@codethink.co.uk>
The sh_eth driver has come up with an issue where the runtime_pm
code suspends it during the probe() method due to the network
device registration re-calling into the driver.
Add a note about this into the documentation.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
---
Documentation/power/runtime_pm.txt | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 44fe1d28a163..e76dc0ad4d2b 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -556,6 +556,12 @@ helper functions described in Section 4. In that case, pm_runtime_resume()
should be used. Of course, for this purpose the device's runtime PM has to be
enabled earlier by calling pm_runtime_enable().
+Note, if the device may execute pm_runtime calls during the probe (such as
+if it is registers with a subsystem that may call back in) then the
+pm_runtime_get_sync() call paired with a pm_runtime_put() call will be
+appropriate to ensure that the device is not put back to sleep during the
+probe. This can happen with systems such as the network device layer.
+
It may be desirable to suspend the device once ->probe() has finished.
Therefore the driver core uses the asyncronous pm_request_idle() to submit a
request to execute the subsystem-level idle callback for the device at that
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / Runtime: add note about re-calling in during device probe()
2015-04-17 0:14 [PATCH] PM / Runtime: add note about re-calling in during device probe() Ben Hutchings
@ 2015-05-15 0:05 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2015-05-15 0:05 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-pm, linux-doc, CT kernel
On Friday, April 17, 2015 01:14:15 AM Ben Hutchings wrote:
> From: Ben Dooks <ben.dooks@codethink.co.uk>
>
> The sh_eth driver has come up with an issue where the runtime_pm
> code suspends it during the probe() method due to the network
> device registration re-calling into the driver.
>
> Add a note about this into the documentation.
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Queued up for 4.2, thanks!
> ---
> Documentation/power/runtime_pm.txt | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
> index 44fe1d28a163..e76dc0ad4d2b 100644
> --- a/Documentation/power/runtime_pm.txt
> +++ b/Documentation/power/runtime_pm.txt
> @@ -556,6 +556,12 @@ helper functions described in Section 4. In that case, pm_runtime_resume()
> should be used. Of course, for this purpose the device's runtime PM has to be
> enabled earlier by calling pm_runtime_enable().
>
> +Note, if the device may execute pm_runtime calls during the probe (such as
> +if it is registers with a subsystem that may call back in) then the
> +pm_runtime_get_sync() call paired with a pm_runtime_put() call will be
> +appropriate to ensure that the device is not put back to sleep during the
> +probe. This can happen with systems such as the network device layer.
> +
> It may be desirable to suspend the device once ->probe() has finished.
> Therefore the driver core uses the asyncronous pm_request_idle() to submit a
> request to execute the subsystem-level idle callback for the device at that
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-15 0:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17 0:14 [PATCH] PM / Runtime: add note about re-calling in during device probe() Ben Hutchings
2015-05-15 0:05 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.