ChangeSet 1.1608.24.4, 2004/02/26 14:08:39-08:00, stern@rowland.harvard.edu [PATCH] USB: Enable interrupts in UHCI after PM resume On Mon, 23 Feb 2004, Chip Salzenberg wrote: > It works ... perfectly! I can now suspend and resume my A30 with > impunity, and the USB keyboard works fine after each resume. > > Thanks much, Alan. > > (Now if I could just get the alsa guys to fix snd-intel8x0...) This patch re-initializes the UHCI Interrupt Enable register following a PM resume. Apparently some systems clear the register during suspend, which causes obvious problems later on. drivers/usb/host/uhci-hcd.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c --- a/drivers/usb/host/uhci-hcd.c Tue Mar 16 15:06:59 2004 +++ b/drivers/usb/host/uhci-hcd.c Tue Mar 16 15:06:59 2004 @@ -2471,9 +2471,16 @@ pci_set_master(to_pci_dev(uhci_dev(uhci))); - if (uhci->state == UHCI_SUSPENDED) + if (uhci->state == UHCI_SUSPENDED) { + + /* + * Some systems clear the Interrupt Enable register during + * PM suspend/resume, so reinitialize it. + */ + outw(USBINTR_TIMEOUT | USBINTR_RESUME | USBINTR_IOC | + USBINTR_SP, uhci->io_addr + USBINTR); uhci->resume_detect = 1; - else { + } else { reset_hc(uhci); start_hc(uhci); }