]> err.no Git - linux-2.6/blobdiff - drivers/usb/host/ohci-hub.c
Merge master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / usb / host / ohci-hub.c
index b56739221d11f27d6d6e1b8d04c833fe56bdbd6c..439beb784f3e1eb42495d4a323288a56d5eea02d 100644 (file)
@@ -483,6 +483,13 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
                length++;
        }
 
+       /* Some broken controllers never turn off RHCS in the interrupt
+        * status register.  For their sake we won't re-enable RHSC
+        * interrupts if the flag is already set.
+        */
+       if (ohci_readl(ohci, &ohci->regs->intrstatus) & OHCI_INTR_RHSC)
+               changed = 1;
+
        /* look at each port */
        for (i = 0; i < ohci->num_ports; i++) {
                u32     status = roothub_portstatus (ohci, i);
@@ -572,8 +579,6 @@ static int ohci_start_port_reset (struct usb_hcd *hcd, unsigned port)
        return 0;
 }
 
-static void start_hnp(struct ohci_hcd *ohci);
-
 #else
 
 #define        ohci_start_port_reset           NULL
@@ -760,7 +765,7 @@ static int ohci_hub_control (
 #ifdef CONFIG_USB_OTG
                        if (hcd->self.otg_port == (wIndex + 1)
                                        && hcd->self.b_hnp_enable)
-                               start_hnp(ohci);
+                               ohci->start_hnp(ohci);
                        else
 #endif
                        ohci_writel (ohci, RH_PS_PSS,