On Fri, May 07, 2004 at 09:49:35AM -0700, David Brownell wrote: > [EMAIL PROTECTED] wrote: > >David Brownell wrote: > > > >>Wouldn't a plain old atomic "BUSY" bitflag work better? If it's set, > >>usbcore would reject urbs with -EAGAIN ... from all contexts, > >>including the many that can't acquire semaphores! > >> > > > > > >Going back a bit--what context were you thinking of that wouldn't be > >able to grab the semaphore--are you talking about a userspace program > >that talks to a USB device URB-by-URB, instead of using a driver like > >usb-storage? > > I'm basically asking how the thing would work. Since the device > is broken, and doesn't support concurrency that the USB spec > requires, AND usbcore wasn't designed around that bug, I see > two basic choices: > > - Try to fix it generally, for all contexts usbcore handles, > on devices known to have this flaw. > > - Fix only a handful of special cases, only those contexts > and devices. > > The latter might make more sense. In that case, flag/semaphore/etc > doesn't matter so much ... you might be concerned only with making > sure that usbfs and usb-storage can collaborate enough to keep the > device from locking up. > > I'd not be keen on hybrid solutions that affect devices that work > correctly, and that's what it seemed to me was in the air.
I guess my solution did look kinda 'hybrid'... tho that wasn't really my intent. What I think I really want is for usbfs and usb-storage to play nice together. But I also want whatever mechanism we use to accomplish this to be useable elsewhere, because I'm sure someone else is going to get bitten by this bug. Either it will be a usbfs<->foo interaction or a usb-storage<->foo interaction (or perhaps a 3-way). Matt -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver Oh BAY-bee. -- Dust Puppy to Greg User Friendly, 12/13/1997
pgp00000.pgp
Description: PGP signature