> > Am I right when believing we would need some per-urb "callback completed"
> > flag? I mean the drv->can_read approach doesn't work with a pool of urbs 
> > to read from? What about adding "atomic_t urb->completed"?
> 
> I usually shuffle them between lists in such cases - that way
> a working thread does not need to scan, looking for flags.
> Not a big deal in USB, but suppose you have 5,500 SCSI requests...

The device driver always knows if urb->complete() was
called ... though for periodic URBs, the HCD still owns
the URB until it gets unlinked.  Meaning: the interesting
question is actually "was it unlinked".   The answer is
always "yes" in the completion handler, except for
interrupt/iso URBs with status not reporting unlink.

So device drivers don't need such a flag.  But the host
controller drivers need avoid races in unlink/completion
paths, and I agree that urb->urb_list is handy there.

- Dave




_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to