Alan, Although this method can solve the usb mouse hang, but I found that from the debug log, the SO bit(SchedulingOverrun) in HcInterruptStatus register is always set after a period of time. Is it matter? Or any modification to avoid this? I noticed that in kernel code, there is no code to handle the SchedulingOverrun interrupt. In the OHCI spec, it suggests me to lower the bandwidth. Do I need add some code to this? Thanks, Frank -----Original Message----- From: Huang, FrankR Sent: Wednesday, December 30, 2009 2:46 PM To: 'Alan Stern' Cc: 'USB list' Subject: RE: A question about ohci_irq() See the ohci_irq() and found that at the last part of this function, there is a sentence " ohci_writel(ohci, ints, ®s->intrstatus); " It will clear the WDH bit in order for another interrupt. So my opinion is that whether I need to add this sentence to my patch , looks like below: -- ints = ohci_readl(ohci, ®s->intrstatus); 1 ++ if((ohci->hcca->done_head!=0) 2 ++ &&!(hc32_to_cpup(ohci, &ohci->hcca->done_head) 3 ++ &0x01)){ 4 ++ ints = OHCI_INTR_WDH; 5 ++ }else{ 6 ++ ints = ohci_readl(ohci, ®s->intrstatus); 7 ++ ints = 0xfffffffd; 8 ++ if(ints == 0) 9 ++ ohci_writel(ohci, OHCI_INTR_WDH, ®s->interrupts); 10 ++ } This will be better I think. What's your opinion? Although right now I do not clear OHCI_INTR_WDH(without line 8 and line 9), but when the real OHCI_INTR_WDH is happening and the done_head is not 0, the code can also work. Thanks, Frank -----Original Message----- From: Huang, FrankR Sent: Wednesday, December 30, 2009 2:06 PM To: 'Alan Stern' Cc: USB list Subject: RE: A question about ohci_irq() Alan, My patch works fine. As below:(ohci_irq) -- ints = ohci_readl(ohci, ®s->intrstatus); ++ if((ohci->hcca->done_head!=0) ++ &&!(hc32_to_cpup(ohci, &ohci->hcca->done_head) ++ &0x01)){ ++ ints = OHCI_INTR_WDH; ++ }else{ ++ ints = ohci_readl(ohci, ®s->intrstatus); ++ ints = 0xfffffffd; ++ } Can you provide your patch for your thought? I'll give a try. For my understanding about this , if the WDH in HcInterruptStatus Register is set, we must clear this bit after the ohci_irq() function finished. Otherwise, this bit will be set always. But I don't find any code clearing this WDH bit. So in which place this WDH bit is clear? Thanks, Frank -----Original Message----- From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx] Sent: Wednesday, December 30, 2009 11:28 AM To: Huang, FrankR Cc: USB list Subject: RE: A question about ohci_irq() On Wed, 30 Dec 2009, Huang, FrankR wrote: > Right now , it works fine. > I'll do more tests and give you feedback. > But what I am thinking is that if the WDH is set in interrupt status > register, should I clear this bit if I omit this interrupt? > What's your improved way? No, the bit should not be cleared. That's what the original code in the driver did, and it caused your mouse to stop working. My patch clears WDH when hcca->done_head is not 0, and keeps WDH set if hca->done_head is 0. That way when the controller sets hcca->done_head to a nonzero value, the driver will know to call dl_done_list(). 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