> If I unlink my urbs upon disconnect synchronously and resubmit my urbs in the > completon handler, is there a race condition between the two?
Don't EVER submit another urb after you've gotten a disconnect() callback -- that'd be a bug in your driver. Your disconnect logic needs to arrange (first thing!) that no more urbs get submitted. But if you take disconnect() out of that, then the answer should be that the only race would be between parts of your driver that disagree on basics like whether a given urb is linked or not, and whether it's OK to submit urbs or not. > What happens if I try to unlink the urb after it is done but before it > is resubmitted in the completion handler? If it's not linked, then you can't unlink it. (How could it be otherwise?) And the basic rule is that getting that completion callback is how your driver knows it's unlinked. (Broken in part for ISO in 2.4, if you use urb->next, and for interrupt transfers until the automagic resubmit goes away.) That's disregarding bugs, of course. All the 2.4 HCDs have areas where they're not quite like the others, 2.5 is better. - Dave ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
