On Fri, Mar 09, 2001, Grover, Andrew <[EMAIL PROTECTED]> wrote:
> From reading the UHCI spec, I don't see a way to change the polling rate.
> 
> My current thinking is to put the HC into Global Suspend when no devices are
> connected. Entering and leaving global suspend is pretty easy, but I'm still
> working on where in the code we should do this. If we've suspended, getting
> out seems to be as easy as putting a call to wakeup_hc in uhci_interrupt(),
> but we only want to go down when no devices are connected. We need to cover
> the "never any devices connected" as well as "last device just disconnected"
> cases.
> 
> static void suspend_hc(struct uhci *uhci)
> {
>       unsigned int io_addr = uhci->io_addr;
> 
>       dbg("suspend_hc");
> 
>       outw(USBCMD_EGSM, io_addr + USBCMD);
> }
> 
> static void wakeup_hc(struct uhci *uhci)
> {
>       unsigned int io_addr = uhci->io_addr;
>       unsigned int status;
> 
>       dbg("wakeup_hc");
> 
>       outw(0, io_addr + USBCMD);
>       
>       /* wait for EOP to be sent */
>       status = inw(io_addr + USBCMD);
>       while (status & USBCMD_FGR) {
>               status = inw(io_addr + USBCMD);
>       }
>       
>       /* Run and mark it configured with a 64-byte max packet */
>       outw(USBCMD_RS | USBCMD_CF | USBCMD_MAXP, io_addr + USBCMD);
> }

This wouldn't work for systems with builtin hubs (not the root hub) and
just doesn't seem very intuitive to me.

I'm not super familiar with the steps ACPI goes through to suspend, but
don't we have a warning that a suspend is about to happen and we can do
things?

Wouldn't this be a better time to suspend the HC?

JE


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to