Pavel Machek wrote:
> --- clean/drivers/usb/uhci.c    Thu Apr 27 10:05:49 2000
> +++ linux/drivers/usb/uhci.c    Fri May  5 12:21:58 2000
> @@ -2357,10 +2357,14 @@
> 
>  static int handle_pm_event(struct pm_dev *dev, pm_request_t rqst, void *data)
>  {
> +       struct uhci *uhci = dev->data;
>         switch (rqst) {
>         case PM_SUSPEND:
> +               reset_hc(uhci);
>                 break;
>         case PM_RESUME:
> +               reset_hc(uhci);
> +               start_hc(uhci);
>                 break;
>         }
>         return 0;

I don't doubt that this is better than the existing arrangement, but it
doesn't look complete.

>From my reading of the UHCI spec, I think that the following should
occur:

On initialisation of the HC, we Set bit 1 in the USBINTR register.

On getting an interrupt, we check the USBSTS register to see if bit 2 is
set, and if it is, we wake up the machine, then Clear bit 4 in the
USBSTS register.

On getting PM_SUSPEND, we Clear bit 0 in the USBCMD register, then Set
bit 3 in the USBCMD register.

On getting PM_RESUME, we Set bit 4 and Clear bit 3 in the USBCMD
register, wait 20ms, then Clear bit 4 in the USBCMD register. We might
need to Set bit 0 in the USBCMD register as well. 

Only one problem - I can't do this, just don't know enough to code it.

Anyone, Bueller?

Brad

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to