aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c40
1 files changed, 27 insertions, 13 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 9be6b303e784..b28a9b602066 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -715,13 +715,6 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
715 return IRQ_NOTMINE; 715 return IRQ_NOTMINE;
716 } 716 }
717 717
718 if (ints & OHCI_INTR_RHSC) {
719 ohci_vdbg (ohci, "rhsc\n");
720 ohci->next_statechange = jiffies + STATECHANGE_DELAY;
721 ohci_writel (ohci, OHCI_INTR_RHSC, &regs->intrstatus);
722 usb_hcd_poll_rh_status(hcd);
723 }
724
725 if (ints & OHCI_INTR_UE) { 718 if (ints & OHCI_INTR_UE) {
726 disable (ohci); 719 disable (ohci);
727 ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n"); 720 ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");
@@ -731,9 +724,31 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
731 ohci_usb_reset (ohci); 724 ohci_usb_reset (ohci);
732 } 725 }
733 726
734 if (ints & OHCI_INTR_RD) { 727 if (ints & OHCI_INTR_RHSC) {
735 ohci_vdbg (ohci, "resume detect\n"); 728 ohci_vdbg(ohci, "rhsc\n");
736 ohci_writel (ohci, OHCI_INTR_RD, &regs->intrstatus); 729 ohci->next_statechange = jiffies + STATECHANGE_DELAY;
730 ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC,
731 &regs->intrstatus);
732
733 /* NOTE: Vendors didn't always make the same implementation
734 * choices for RHSC. Many followed the spec; RHSC triggers
735 * on an edge, like setting and maybe clearing a port status
736 * change bit. With others it's level-triggered, active
737 * until khubd clears all the port status change bits. We'll
738 * always disable it here and rely on polling until khubd
739 * re-enables it.
740 */
741 ohci_writel(ohci, OHCI_INTR_RHSC, &regs->intrdisable);
742 usb_hcd_poll_rh_status(hcd);
743 }
744
745 /* For connect and disconnect events, we expect the controller
746 * to turn on RHSC along with RD. But for remote wakeup events
747 * this might not happen.
748 */
749 else if (ints & OHCI_INTR_RD) {
750 ohci_vdbg(ohci, "resume detect\n");
751 ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
737 hcd->poll_rh = 1; 752 hcd->poll_rh = 1;
738 if (ohci->autostop) { 753 if (ohci->autostop) {
739 spin_lock (&ohci->lock); 754 spin_lock (&ohci->lock);
@@ -930,7 +945,7 @@ MODULE_LICENSE ("GPL");
930#include "ohci-ppc-soc.c" 945#include "ohci-ppc-soc.c"
931#endif 946#endif
932 947
933#if defined(CONFIG_ARCH_AT91RM9200) || defined(CONFIG_ARCH_AT91SAM9261) 948#ifdef CONFIG_ARCH_AT91
934#include "ohci-at91.c" 949#include "ohci-at91.c"
935#endif 950#endif
936 951
@@ -947,8 +962,7 @@ MODULE_LICENSE ("GPL");
947 || defined (CONFIG_ARCH_EP93XX) \ 962 || defined (CONFIG_ARCH_EP93XX) \
948 || defined (CONFIG_SOC_AU1X00) \ 963 || defined (CONFIG_SOC_AU1X00) \
949 || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \ 964 || defined (CONFIG_USB_OHCI_HCD_PPC_SOC) \
950 || defined (CONFIG_ARCH_AT91RM9200) \ 965 || defined (CONFIG_ARCH_AT91) \
951 || defined (CONFIG_ARCH_AT91SAM9261) \
952 || defined (CONFIG_ARCH_PNX4008) \ 966 || defined (CONFIG_ARCH_PNX4008) \
953 ) 967 )
954#error "missing bus glue for ohci-hcd" 968#error "missing bus glue for ohci-hcd"