Skip to contentSkip to conversation

2.6.3: re-enable UHCI interrupts on APM resume

PATCH New Chip Salzenberg 1 participant 1 message Mar 1, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.6.3: re-enable UHCI interrupts on APM resume

Alan Stern wrote the below patch which fixes a lockup problem with USB on the ThinkPad A30. It's small, helpful, and not ThinkPad-specific.

So, although it will already be part of the next USB merge, I wanted you to see it. Maybe you'll find it worth including in 2.6.4.

drivers/usb/host/uhci-hcd.c renamed from drivers/usb/host/uhci-hcd.c.orig +9 -2
@@ -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);
 	}
Signature · 3 lines
Chip Salzenberg               - a.k.a. -               <[email protected]>
"I wanted to play hopscotch with the impenetrable mystery of existence,
    but he stepped in a wormhole and had to go in early."  // MST3K