On Thu, May 03, 2001 at 05:37:09PM +0200, Martin Diehl wrote: <...> > > spin_lock_irqsave, so status might be outdated (i.e. all its TD's > > already inactive at this point). So we end up connecting the new QH's TD > > to a lltd->link, which is now out-of-reach for the HC? > > just proved: exactly this HC/HCD race is killing my test! This is exactly the cause, why usb-uhci is always using a "bottom QH" (bqh) as the last element in the vertical TD list when queuing bulks. With this last QH, UHCI enters a new context and doesn't update the element pointer of the old "top" QH. So there's no race when appending new TDs, the old bqh is recycled as the top QH of the new TD list. Of course, there's a slight memory cost, but absolutely no race window. BTW: The helper QH just serves as unified "collection" point, where all bqhs are horizontally linked to. It eliminates the work of re-linking of all bqhs when a following QH is deleted. -- Georg Acher, [EMAIL PROTECTED] http://www.in.tum.de/~acher/ "Oh no, not again !" The bowl of petunias _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: http://lists.sourceforge.net/lists/listinfo/linux-usb-devel