RE: Geode LX CS5536 EHCI problems

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

 



Florian and Martin,

	From the mail, I am not quite clear about the malfunction condition of your device on USB device with 5536.
	Several monthes ago, I fixed a bug for the CS5536 USB part. That board uses an USB mouse/keyboard and some minutes later after linux boots up, the USB device will hang and does not respond to OS. 
	I add a patch to the OHCI driver in ohci_irq() at that time. It is because the interrupt status bit can not be cleared that leads to this bug.
	The patch is as below. You can check the interrupt function(OHCI and EHCI) to find the root cause for your bug. Hope it helps.



--- drivers/usb/host/ohci-hcd.c	2009-11-18 08:39:29.000000000 +0800
+++ /home/frankr/lemote/linglong-1113/drivers/usb/host/ohci-hcd.c	2009-12-31 18:18:11.000000000 +0800
@@ -758,6 +758,9 @@
 	 */
 	ints = ohci_readl(ohci, &regs->intrstatus);
 
+	if((ints & OHCI_INTR_SO) == OHCI_INTR_SO){
+		ohci_writel (ohci, OHCI_INTR_SO, &regs->intrstatus);
+	}
 	/* Check for an all 1's result which is a typical consequence
 	 * of dead, unclocked, or unplugged (CardBus...) devices
 	 */
@@ -828,11 +831,15 @@
 			usb_hcd_resume_root_hub(hcd);
 	}
 
-	if (ints & OHCI_INTR_WDH) {
-		spin_lock (&ohci->lock);
-		dl_done_list (ohci);
-		spin_unlock (&ohci->lock);
-	}
+	if(ints & OHCI_INTR_WDH){
+		if(ohci->hcca->done_head == 0) {
+			ints &= ~OHCI_INTR_WDH;
+		}else{
+			spin_lock(&ohci->lock);
+			dl_done_list(ohci);
+			spin_lock(&ohci->lock);
+		}
+	}		
 
 	if (quirk_zfmicro(ohci) && (ints & OHCI_INTR_SF)) {
 		spin_lock(&ohci->lock);

Thanks,
Frank


> -----Original Message-----
> From: linux-usb-owner@xxxxxxxxxxxxxxx [mailto:linux-usb-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Alan Stern
> Sent: 2010?10?7? 23:34
> To: Florian Bauhaus
> Cc: linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: Geode LX CS5536 EHCI problems
> 
> On Thu, 7 Oct 2010, Florian Bauhaus wrote:
> 
> > Hello,
> > I am running into the same problem over here.
> >
> > We got an embedded board with a AMD Geode LX800 and CS5536 companion
> > chip and a Sierre Wireless MC8790 miniPCI Express modem (which uses USB
> > only).
> >
> > The problem was discovered just recently since it will work fine for
> > some time but due to constant dis- and reconnects we eventually
> > triggered the problem.
> >
> > The kernel we run is basically 2.6.28.10 (included in OpenWRT 15916)
> > with an upgrade sierra.c from v.1.3.2 to v.1.7.8 (as suggest to us by
> > Sierra Wireless).
> >
> > When I remove the ehci_hcd and run on just ohci_hcd everything works
> > just fine (except that I lose USB 2.0).
> >
> > If I can supply you with any more information on how to solve that
> > problem I will be glad to help.
> 
> At the moment, the only information I can think of that would help
> is the details of this hardware bug in the CS5536 chip and a plan for a
> workaround.  Maybe AMD can provide this.
> 
> Alan Stern
> 
> --
> 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