> > > c) Having worked around b) by setting urb->status to -EINPROGRESS > >> before calling usb_unlink_urb, I never receive a completion with > >> status -ECONNRESET. After instrumenting usb-ohci.c I know that the > >> unlink correctly marks the URB for unlinking and enables the start > >> frame interrupt. The start frame interrupt does occur and does > >> invoke the routine dl_del_list() for processing of the unlink, but it > >> does not invoke dl_del_urb() on my (being) unlinked URB.
OK, in my own test setup what I see is that dl_del_list() is invoked just fine. The problem is that the URB doesn't get found since in essence it's already partially unlinked -- the list of TDs on that ED is already empty. In sohci_return_urb(), this didn't get put back since it was getting unlinked. So the unlink notification gets dropped. "Bug #1", and it looks as like it might work to handle that in sohci_return_urb(). I'll try that. > I think the problem may be that an interrupt ED has only one TD > chained off it and so head and tail pointers are the same (thus the > initial URB freeing loop in dl_del_list never runs). After some more > instrumentation, I can see that the endpoint has been unlinked from > the interrupt chains, it's just that the URB completion that has not > been invoked. Actually it's later in dl_del_list() that the interrupt chains get cleaned. That's a bit dubious, and I'll think of it as "Bug #2": the SOF delay is only being used to clear TD state from the HC, not ED state. That could cause trouble in some cases, though likely not yours. - Dave _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel