lkml.org 
[lkml]   [2008]   [Jan]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 4 Jan 2008 22:11:15 -0500 (EST)
FromAlan Stern <>
SubjectRe: [PATCH 1/4] PM: Introduce destroy_suspended_device()
On Fri, 4 Jan 2008, Rafael J. Wysocki wrote:

> I have rebased gregkh-driver-pm-acquire-device-locks-prior-to-suspending.patch
> on top of the $subject series, the result is appended.  It has only been
> compilation tested for now, but I'll be testing it for the next couple of days.
> 
> Please review.

I would prefer it if you could also merge in this patch at the same 
time:

https://lists.linux-foundation.org/pipermail/linux-pm/2007-December/015921.html

> +void device_resume(void)
>  {
> -	sysdev_resume();
> -	dpm_power_up();
> +	might_sleep();
> +	dpm_resume();
> +	unlock_all_devices();
> +	unregister_dropped_devices();
> +	up_write(&pm_sleep_rwsem);
>  }

With the aforementioned patch merged in, this will generate a 
warning for each dropped device.  The call to 
unregister_dropped_devices() should come after the up_write().

You might also consider adding a call to unregister_dropped_devices()  
in the error path of device_suspend() -- in theory even an aborted 
suspend might cause a device to malfunction.

Otherwise this looks okay.

Alan Stern



\
 
 \ /
  Last update: 2008-01-05 04:13    [from the cache]
©2003-2008