[linux-usb-devel] [PATCH] Make sleep/wakeup work with USB on powerbooks

David Brownell david-b at pacbell.net
Fri Mar 18 05:58:54 EST 2005

On Wednesday 16 March 2005 9:36 pm, Paul Mackerras wrote:
> I am currently using this patch on my powerbook to fix the problems
> that USB was causing with sleep and wakeup.  Basically one of the USB
> controllers was getting a spurious wakeup immediately when put it
> into the suspend state.  This would cause the resume routine to be run
> after we had turned off the device, causing a machine check.

Do you know yet why the spurious wakeup happened?  As I recall from
earlier discussions, that was indeed the root cause of the problem,
although there were a few other oddnesses that needed handling too.
But without the spurious wakeup, they'd have been quite rare.

> Also we had some races where we would turn off the clock to the apple
> OHCI cell(s) and then try to access them.  With this patch, sleep and
> wakeup are quite reliable.  The patch is against 2.6.11.

Thanks, I'll have a more detailed look soon.  Most of it looks fine,
except for the stuff related to this:

>  	/* wake on ConnectStatusChange, matching external hubs */
>  	ohci_writel (ohci, RH_HS_DRWE, &ohci->regs->roothub.status);
> +#endif

Thing is, that change would also prevent us from getting rid of
the root hub timer for OHCI.   IRQ on connect status change is
not specific to USB_SUSPEND.

- Dave

More information about the Linuxppc-dev mailing list