LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Nigel Cunningham <ncunningham@crca.org.au>,
pm list <linux-pm@lists.linux-foundation.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Greg KH <greg@kroah.com>, Len Brown <lenb@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Alexey Starikovskiy <astarikovskiy@suse.de>,
David Brownell <david-b@pacbell.net>, Pavel Machek <pavel@ucw.cz>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Oliver Neukum <oliver@neukum.org>
Subject: Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)
Date: Tue, 1 Apr 2008 23:50:00 +0200 [thread overview]
Message-ID: <200804012350.01407.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0804011653140.9362-100000@netrider.rowland.org>
On Tuesday, 1 of April 2008, Alan Stern wrote:
> On Tue, 1 Apr 2008, Rafael J. Wysocki wrote:
>
> > > Does ..._ext_... mean extended? (external?) If 'extended' (or if not),
> > > does that imply that they're mutually exclusive alternatives for drivers
> > > to use?
> >
> > 'ext' means 'extended'. The idea is that the 'extended' version will be used
> > by bus types / driver types that don't need to implement the _noirq callbacks.
>
> Something's wrong here. This seems to say that the "extended" version
> has _fewer_ method pointers -- in which case it should be called
> "restricted" instead.
No, it has more pointers. Specifically, it is like
struct pm_ext_ops {
struct pm_ops base;
--additional pointers go here--
}
> > > So drivers can never validly fail to resume. That sounds fair enough. If
> > > the hardware has gone away while in lower power mode (USB, say), should
> > > the driver then just printk an error and return success?
> >
> > I think so.
> >
> > IMO, an error code returned by a driver's ->resume() should mean "the device
> > hasn't resumed and is presumably dead". Otherwise, ->resume() should return
> > success.
>
> If the device is gone, it doesn't much matter what resume() returns.
Yes, it does. In that cases, the error code would tell the PM core not to attempt
to resume the device's children etc. Otherwise, it's quite meaningless to the
PM core, because it really can mean anything and how's the PM core supposed
to handle _that_?
Either we decide that the error codes returned by ->resume() mean critical
errors or there's no point in returning error codes from ->resume() at all
(other than logging the errors by the core).
Well, that's getting confused. I think I'll have to rework the patch not to
really handle the errors returned by ->resume() and friends, after all, but
I'll keep the reporting of them.
However, I'd like to add a recommendation that the _new_ "resume" callbacks
should only return errors in critical situations as the indication to the PM
core that something went _really_ wrong and the device in question is quite
surely unusable.
Thanks,
Rafael
next prev parent reply other threads:[~2008-04-01 21:50 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-29 22:17 [RFC][PATCH 0/3] PM: Rework suspend and hibernation code for devices (rev. 3) Rafael J. Wysocki
2008-03-29 22:20 ` [RFC][PATCH 1/3] PM: Introduce new top level suspend and hibernation callbacks (rev. 5) Rafael J. Wysocki
2008-03-30 2:54 ` Rafael J. Wysocki
2008-03-31 21:29 ` [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6) Rafael J. Wysocki
2008-04-01 8:15 ` Nigel Cunningham
2008-04-01 8:27 ` Benjamin Herrenschmidt
2008-04-01 14:31 ` Alan Stern
2008-04-01 19:34 ` Nigel Cunningham
2008-04-01 20:16 ` Rafael J. Wysocki
2008-04-01 20:12 ` Rafael J. Wysocki
2008-04-01 20:56 ` Alan Stern
2008-04-01 21:38 ` Nigel Cunningham
2008-04-01 21:59 ` Rafael J. Wysocki
2008-04-01 21:50 ` Rafael J. Wysocki [this message]
2008-04-02 14:11 ` Alan Stern
2008-04-02 14:22 ` Oliver Neukum
2008-04-02 15:13 ` Alan Stern
2008-04-02 15:28 ` Oliver Neukum
2008-04-02 16:42 ` Alan Stern
2008-04-02 20:11 ` Oliver Neukum
2008-04-02 20:28 ` Alan Stern
2008-04-01 21:35 ` Nigel Cunningham
2008-04-01 21:57 ` Rafael J. Wysocki
2008-04-01 22:32 ` Nigel Cunningham
2008-04-01 23:00 ` Rafael J. Wysocki
2008-04-01 8:37 ` Pavel Machek
2008-04-01 20:23 ` Rafael J. Wysocki
2008-03-29 22:22 ` [RFC][PATCH 2/3] PM: New suspend and hibernation callbacks for platform bus type (rev. 3) Rafael J. Wysocki
2008-03-30 2:56 ` Rafael J. Wysocki
2008-03-29 22:23 ` [RFC][PATCH 3/3] PM: New suspend and hibernation callbacks for PCI " 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=200804012350.01407.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=astarikovskiy@suse.de \
--cc=benh@kernel.crashing.org \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=ncunningham@crca.org.au \
--cc=oliver@neukum.org \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
--subject='Re: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).