All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kevin Hilman <khilman@baylibre.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] PM / Domains: Propagate start and restore errors during runtime resume
Date: Thu, 03 Mar 2016 22:32:22 +0200	[thread overview]
Message-ID: <1981850.MfupToJLYq@avalon> (raw)
In-Reply-To: <7h60x3wbrc.fsf@baylibre.com>

Hi Kevin,

Thank you for the review.

On Thursday 03 March 2016 12:24:23 Kevin Hilman 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?

It would if you could try resuming again after a failed attempt, but you'll 
receive an error immediately if you try with .runtime_error set.

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2016-03-03 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 23:20 [PATCH] PM / Domains: Propagate start and restore errors during runtime resume Laurent Pinchart
2016-03-03 20:24 ` Kevin Hilman
2016-03-03 20:32   ` Rafael J. Wysocki
2016-03-03 20:34     ` Rafael J. Wysocki
2016-03-03 20:40       ` Laurent Pinchart
2016-03-03 20:32   ` Laurent Pinchart [this message]
2016-03-04 10:22 ` Ulf Hansson
2016-03-04 20:38   ` Laurent Pinchart
2016-03-04 21:22     ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1981850.MfupToJLYq@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=khilman@baylibre.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.