Re: suggestion on resumption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, 27. November 2009 01:47:44 schrieb Rafael J. Wysocki:
> On Thursday 26 November 2009, Oliver Neukum wrote:
> > Hi,
> >
> > using the USB autosuspend framework I've often faced characteristic
> > problems coding resume() methods. This has led me to an idea. Resume()
> > would be much easier to code if I knew about the reason of resumption,
> > especially about the code path resume() is called in. I wonder whether
> > we could introduce a message argument to resume and give it a few
> > bits from the caller.
> 
> Each of the callbacks in struct dev_pm_ops is executed in exactly one
>  context, so for each of them it is known why it was called.

But the resume method in the driver doesn't learn. It is an extrem hassle
not to know whether you are called synchronously (ie from open which
already holds a lock) or asynchronously (which means you need to guard
against open)

	Regards
		Oliver
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux