Re: [PATCH] USB: fix Scheduling while atomic warning when resuming.

Jeff Garzik
2004-12-22T05:27:36Z

David Brownell wrote:
> On Tuesday 21 December 2004 8:46 pm, Jeff Garzik wrote:
>
>>>If that lock were dropped, what would prevent other tasks from
>>>touching the hardware while it's sending RESUME signaling down
>>>the bus, and thereby mucking up the resume sequence?
>>
>>Precisely what other tasks are active for this hardware, during resume?
>
>
> There's no guarantee that suspend() and resume() methods
> are only called during system-wide suspend and resume.

That is precisely the reason why I am concerned. If it was only during
system-wide resume, the impact of the very-long mdelay() would be more
difficult to notice.

You also ignored my question :)

If the PCI layer is calling the resume method for a PCI device while
simultaneously calling the suspend method, that's a PCI layer problem.
Similarly, If the USB layer is calling into your driver while you are
resuming, something is broken and it ain't your locking.

Jeff