[Whole message at the end for the sake of Stuart]

I do not see a good solution at this time.

rwsem is a non-starter. IMHO, rwsems are optimizations for normal semaphores,
and the code must remain correct regardless what is used.

Narrowing the lock for only some of devices makes other participants to
check if the device is in the class which requires locking. It is something
to consider, but that would be annoying.

It may be most effective to import 2.6 code for Speedtouch which has
an in-kernel data processing loop. Since it does not do ioctls, it's
immune to the exclusion. It's unfair to burden Speedtouch with TEAC
problem though.

-- Pete

On Mon, 29 Nov 2004 20:23:45 +0200 (EET), Meelis Roos <[EMAIL PROTECTED]> wrote:

> This
> http://linux.bkbits.net:8080/linux-2.4/cset%40412c6c71gH2KqyBakAeQE-CJpIK3hA?nav=index.html|[EMAIL
>  PROTECTED]
> patch in 2.4.28 breaks some usb devices that use concurrent access from 
> different processes (like modem_run from speedtouch package but I have 
> heard this is not the only one).
> 
> The problem is that the patch protects dev->descriptor and dev->config[] 
> from simultaneous access in usb_dump_* (readonly access) and usb ioctls.
> This is fine by me.
> 
> But this patch has also a big and probably unwanted side effect of 
> serialising all ioctls and this breaks software that worked in 2.4.27 
> (like, one process does continuous reads via submitting and reaping 
> URB-s and blocks on reaping them and another process does control 
> messages).
> 
> So either the exclusive access needs to be backed out (I don't see how 
> it can affect any drivers in 2.4 but this is my first look at the USB 
> code) or modified so that it does not serialize ioctls.
> 
> Sounds like rwlock to me (any number of ioctls or exactly one usb_dump_* 
> form /proc code) but this makes me suspicious whether the lock is needed 
> at all since our "writer" is actually only a reader.
> 
> Since dev->devsem is already a rwlock, maybe the /proc code should be 
> just another reader?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to