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

Benjamin Herrenschmidt
2004-12-22T12:04:44Z

> 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.

Actually, the later isn't broken, something may well call into the
higher level USB drivers while resuming, but indeed, those shouldn't
send any URB down the stack when the bus is suspended, and the EHCI
driver should drop incoming URBs as well until fully resumed.

I think the lock here is only needed to protect the HCD state
transitions David, no ? All we need is make sure that we don't let
things get queued (or call into EHCI code path that will end up
touch the HW) while suspended.

Ben.