Re: 3.4.4: disabling irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 25 Jan 2013, Alan Stern wrote:

> This isn't a software problem.  I don't know of any way to fix it or
> work around it in the driver.  The only thing to do is stop using that
> controller.

Spoke too soon.  Try this patch; maybe it will help.  (You'll have to 
remove the debugging patch first.)

Alan Stern



Index: usb-3.8/drivers/usb/host/ohci-hcd.c
===================================================================
--- usb-3.8.orig/drivers/usb/host/ohci-hcd.c
+++ usb-3.8/drivers/usb/host/ohci-hcd.c
@@ -794,6 +794,9 @@ static irqreturn_t ohci_irq (struct usb_
 		return IRQ_HANDLED;
 	}
 
+	/* Clear the pending status bits */
+	ohci_writel(ohci, ints, &regs->intrstatus);
+
 	/* We only care about interrupts that are enabled */
 	ints &= ohci_readl(ohci, &regs->intrenable);
 
@@ -846,7 +849,6 @@ static irqreturn_t ohci_irq (struct usb_
 	 */
 	else if (ints & OHCI_INTR_RD) {
 		ohci_vdbg(ohci, "resume detect\n");
-		ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
 		set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
 		if (ohci->autostop) {
 			spin_lock (&ohci->lock);
@@ -903,9 +905,8 @@ static irqreturn_t ohci_irq (struct usb_
 	spin_unlock (&ohci->lock);
 
 	if (ohci->rh_state == OHCI_RH_RUNNING) {
-		ohci_writel (ohci, ints, &regs->intrstatus);
 		ohci_writel (ohci, OHCI_INTR_MIE, &regs->intrenable);
-		// flush those writes
+		// flush the write
 		(void) ohci_readl (ohci, &ohci->regs->control);
 	}
 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux