On Mon, 2 Aug 2004, Duncan Sands wrote:

> > My impression was that people would be happy to have nothing more than the 
> > part that drops the lock after issuing an URB and reacquires it later.
> 
> that was my impression too.  A better (but more intrusive) way of handling 
> dev->serialize
> would be to turn it into a r/w semaphore.  In that case usbfs would need to take an 
> additional
> lock in a few places (a spinlock would suffice).

I don't think people will stand for making ->serialize into an rwsem.


> > Perhaps usbfs could be changed to require that users claim an interface
> > before submitting an URBs and that users indicate the interface at the
> > time the URB is submitted.  Then usbfs could invalidate all claimed
> > interfaces when a config change occurs and fail further submissions to any
> > of their endpoints.  This would clearly require changes to libusb and
> > maybe even to user programs.
> 
> Only now do I read this paragraph!

(I know the feeling!  Nowadays I try to read a message through entirely 
before replying.  In fact, I try to read my entire inbox before replying 
to any of the messages.)

>  This is already the case, except that
> usbfs doesn't require the interface to be claimed at the moment.

It also doesn't require the user to specify an interface when the URB is
submitted.  For endpoints other than ep0 that's not a problem; usbfs looks
up the interface all by itself.  Whether it's a problem for ep0 is
unclear.  For this scheme to work properly, however, the user would have
to specify the interface along with the URB -- and in a way that could be
invalidated.  Just giving the interface number wouldn't be enough; you
might end up looking at a different interface in a different configuration
that concidentally has the same number.

Alan Stern



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to