Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349566
| From | Laurent Pinchart <laurent.pinchart@ideasonboard.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume |
| Date | 2016-03-03 21:50 +0100 |
| Message-ID | <r8Im6-440-23@gated-at.bofh.it> (permalink) |
| References | <r81TQ-7Bj-39@gated-at.bofh.it> <r8Icq-3Ym-5@gated-at.bofh.it> <r8Icp-3Ym-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Rafael, On Thursday 03 March 2016 21:34:04 Rafael J. Wysocki wrote: > On Thu, Mar 3, 2016 at 9:32 PM, Rafael J. Wysocki <rafael@kernel.org> wrote: > > On Thu, Mar 3, 2016 at 9:24 PM, Kevin Hilman <khilman@baylibre.com> wrote: > >> Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> writes: > >>> During runtime resume the return values of the start and restore steps > >>> are ignored. As a result drivers are not notified of runtime resume > >>> failures and can't propagate them up. Fix it by returning an error if > >>> either the start or restore step fails, and clean up properly in the > >>> error path. > >>> > >>> Signed-off-by: Laurent Pinchart > >>> <laurent.pinchart+renesas@ideasonboard.com> > >>> --- > >>> > >>> drivers/base/power/domain.c | 20 ++++++++++++++++++-- > >>> 1 file changed, 18 insertions(+), 2 deletions(-) > >>> > >>> This fixes an issue I've noticed with my driver's .runtime_resume() > >>> handler returning an error that was never propagated out of > >>> pm_runtime_get_sync(). > >> > >> Acked-by: Kevin Hilman <khilman@baylibre.com> > >> > >>> A second issue then appeared. The device .runtime_error field is set to > >>> the error code returned by my .runtime_resume() handler, but it never > >>> reset. Any subsequent try to resume the device fails with -EINVAL. I'm > >>> not sure what the right way to solve that is, advices are welcome. > >> > >> Probably setting it (back) to zero after each successful runtime_suspend > >> or runtime_resume is the right way. Rafael? > > > > That follows the assumption that runtime PM usually won't be reliable > > after an error, so runtime_error has to be cleared explicitly via > > pm_runtime_set_status(). > > Sorry, that won't work. > > Anyway, the idea is that the error has to be cleared manually after a > failure. Thanks for the advice, I'll try doing so in my driver. -- Regards, Laurent Pinchart
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> - 2016-03-02 00:30 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Kevin Hilman <khilman@baylibre.com> - 2016-03-03 21:30 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-03 21:40 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-03-03 21:50 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-03 21:40 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-03-03 21:40 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Ulf Hansson <ulf.hansson@linaro.org> - 2016-03-04 11:30 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2016-03-04 21:40 +0100
Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume "Rafael J. Wysocki" <rafael@kernel.org> - 2016-03-04 22:30 +0100
csiph-web