lkml.org 
[lkml]   [2008]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH] PM: Introduce new top level suspend and hibernation callbacks (rev. 6)
Date
Am Mittwoch, 2. April 2008 16:11:14 schrieb Alan Stern:
> > 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.
>
> Agreed.  The most important aspect is that drivers should _not_ return
> an error if the device is working correctly.  We should fix the drivers
> which make this mistake.

We need to do something about devices that don't want to be resumed.
There's code like this:


static int usb_resume(struct device *dev)
{
struct usb_device *udev;

if (!is_usb_device(dev)) /* Ignore PM for interfaces */
return 0;
udev = to_usb_device(dev);

/* If udev->skip_sys_resume is set then udev was already suspended
* when the system suspend started, so we don't want to resume
* udev during this system wakeup. However a reset-resume counts
* as a wakeup event, so allow a reset-resume to occur if remote
* wakeup is enabled. */
if (udev->skip_sys_resume) {
if (!(udev->reset_resume && udev->do_remote_wakeup))
return -EHOSTUNREACH;
}
return usb_external_resume_device(udev);
}

Do we want to keep this in the subsystems?

Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-04-02 16:25    [W:0.098 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site