Re: OHCI hangs after failing to free resources

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 27 Apr 2007, Mike Nuss wrote:

> > Look at ohci-hcd.c:ohci_endpoint_disable().  There's a
> "switch(ed->state)"
> > line; see what it does in the ED_UNLINK case.  It retries for up to
> 1000
> > ms, waiting for ed->state to change to ED_IDLE.  That's where the "IRQ
> > INTR_SF lossage" message comes from, if ed->state never changes.
> 
> I have indeed looked in there; it was originally where I thought the
> problem was coming from. It's interesting that you say it should retry
> for up to 1000 ms. schedule_timeout_uninterruptible(1) sleeps for one
> kernel tick, correct? And the limit is decreased by one each time
> through the loop. So for smaller values of HZ, it would retry for
> longer. Was this the intended behavior?

You're right; for some reason I was thinking that the argument to 
schedule_timeout_interruptible() was in milliseconds, not jiffies.

I don't know the intended behavior because I didn't write the code.  In 
principle one would think that retrying for 10 ms or even less would be 
sufficient, since the SOF interrupt is supposed to occur every 
millisecond.


> Of course. Which reminds me - there's a comment in ohci-pci.c:
> 
> /* Check for Compaq's ZFMicro chipset, which needs short
>  * delays before control or bulk queues get re-activated
>  * in finish_unlinks()
>  */
> This is the chipset I'm using (and the quirk is enabled). Is it possible
> there's also an issue with interrupt queues handling? I don't know what
> the issue was that led to the creation of the quirk, but it seems like
> it's in the same ballpark.

Certainly it's possible.  I don't know what led to the creation of the 
ZFMicro quirk either, but Dave does.

> I think it's pretty clear there's an underlying hardware issue, but
> maybe there is a workaround. I added the additional debug code you
> suggested to get a better idea of what finish_unlinks() is doing (or not
> doing).

And the results are... ?

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.