Alan Stern wrote:
> On Fri, 6 Jul 2007, Mike Nuss wrote:
> 
>> On the hardware side though, DI relates to how many frames the HC will
>> wait until HccaDoneHead will be updated, and the WDH IRQ isn't sent
>> until that happens. But since the TD never gets properly retired by the
>> HC when this bug occurs, we never get that interrupt. The last time the
>> interrupt would have been sent would have been after the last successful
>> completion, would could have been several frames beforehand. So if
>> there's only one read endpoint, I don't think this would work, unless
>> I'm still missing something.
> 
> You're right.
> 
> To what extent does the TD get retired?  Did you notice whether the 
> NextTransferDescriptor field gets copied into the ED?

Two out of three pointers get updated correctly by the host controller.

HeadP in the ED gets updated with the correct value (the current value
of NextTD in the retiring TD).

HwNextTD in the retiring TD gets updated to NULL (the current value of
DoneHead).

DoneHead should get updated with the TD's address, but does not. Maybe
the HC tries to do the write, but it fails for some mysterious reason.
The TD is now completely invisible to the hardware, as it's not linked
anywhere except in the driver's shadow queue.

> Could there be a problem with the DI processing?  Is DI always set to 
> 0 for your URBs?

I don't think there's a problem there. Normally the HC would come along
every frame and check a counter to see whether it should update
HccaDoneHead with the current value of DoneHead and interrupt the host.
The counter is seeded by DI, but since the TD was never put on the done
list, it doesn't matter when, or even whether, the writeback occurs.

> If all else fails and you can't get timely interrupts, you can always 
> fall back on a kernel timer.  Scan through the data structures once a 
> second or thereabouts.  As an optimization, allow the timer to run only 
> while there are active URBs.

Yes, I'm thinking this might be the only way that will always work. How
prevalent is that kind of workaround in the kernel?

Mike

-------------------------------------------------------------------------
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/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to