RE: A question about ohci_irq()

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

 



Alan,

	The mouse is still hang with this patch.
	The done_head is also 0 after the udelay(10).
	I suspect when the done_head is 0 , this interrupt is not
belonging the ohci controller. Based on my modification, I omit this
interrupt when done_head is 0. Is that ok?

Thanks,
Frank

-----Original Message-----
From: linux-usb-owner@xxxxxxxxxxxxxxx
[mailto:linux-usb-owner@xxxxxxxxxxxxxxx] On Behalf Of Alan Stern
Sent: Wednesday, December 30, 2009 12:35 AM
To: Huang, FrankR
Cc: USB list
Subject: RE: A question about ohci_irq()

On Tue, 29 Dec 2009, Huang, FrankR wrote:

> Alan,
> 
> 	I trace into it and found the ohci->hcca->done_head is 0 when
> handling OHCI_INTR_WDH interrupt, that will cause the mouse hang. I do
> not know why ohci->hcca->done_head will be 0 when ohci_irq() is
> triggered. Can you give me some explanation for that?

The only explanation I can think of is that your controller is buggy.

>  Because from the
> 2.6.22 kernel source, I found that when entering the ohci_irq()
> function, the code will justify if the ohci->hcca->done_head is 0. The
> 2.6.27 kernel does not have that part code.

Please try the patch below and see if it fixes the problem.

Alan Stern


Index: usb-2.6/drivers/usb/host/ohci-q.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ohci-q.c
+++ usb-2.6/drivers/usb/host/ohci-q.c
@@ -861,6 +861,13 @@ static struct td *dl_reverse_done_list (
 	struct td	*td = NULL;
 
 	td_dma = hc32_to_cpup (ohci, &ohci->hcca->done_head);
+
+	/* Some controllers don't set hcca->done_head as soon as they
should */
+	if (!td_dma) {
+		udelay(10);
+		td_dma = hc32_to_cpup(ohci, &ohci->hcca->done_head);
+	}
+
 	ohci->hcca->done_head = 0;
 	wmb();
 

--
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


--
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