lkml.org 
[lkml]   [2008]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [linux-pm] Re: [PATCH] PM: Acquire device locks on suspend
Date
On Monday, 7 of January 2008, Johannes Berg wrote:
> Rafael J. Wysocki wrote:
>
> >> I don't see anything wrong with it. All that will happen is that the
> >> removal will start before the suspend and finish after the resume.
> >
> > In that case, we'll attempt to call the device's .suspend() and .resume()
> > routines, but we shouldn't do that, IMHO.
>
> I don't see anything wrong with that since the driver must be prepared to
> handle that even in the regular case, it's the only thing you can
> guarantee: no more method calls after removal finishes. Am I totally
> misunderstanding things?

Well, we are towards the end of device removal at this point, having called
bus_remove_device(dev) for example, but still we've got it on dpm_active ...

This may not be technically wrong (ie. we should be able to recover from
that), but it seems conceptually wrong and with pm_sleep_rwsem in place it
can be avoided.

Rafael


\
 
 \ /
  Last update: 2008-01-07 00:59    [W:0.103 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site