Am Montag, 8. Dezember 2003 17:49 schrieb David Brownell:
> > better to be explicit I think: provide a routine for halting the endpoint
> > (I guess this exists already).  Then people who resubmit in the completion
> > handler can do:
> > 
> > halt the endpoint (all submissions to the endpoint will fail).
> > unlink the urb (synchronously)
> > restart the endpoint
> 
> Not all endpoints are haltable in a useful sense.
>   - Isochronous ones don't halt.
>   - Control endpoint halts aren't persistent.

Nor is it the correct thing to do. You really want to "halt" are rather
block the urb. Just because one urb to ep 0 is given to usb_unlink_urb()
doesn't mean that you can block all others.

> Drivers that resubmit in completion without synchronizing
> with their own disconnect processing are buggy -- plain and
> simple.  Left hand fighting with right hand.

There needs to be synchronisation, but the core can provide it or at least
most of it. You just need to make ordinary completion and usb_unlink_urb()
atomic to each other. In this case a simple conditional on the urb's status
is sufficient synchronisation.

        Regards
                Oliver




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to