On Thu, Apr 29, 2004, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Thu, 29 Apr 2004, Pete Zaitcev wrote:
> 
> > On Wed, 28 Apr 2004 12:27:34 -0400 (EDT)
> > Alan Stern <[EMAIL PROTECTED]> wrote:
> > 
> > > Under Linux 2.4, one way to handle this is by preventing the other thread
> > > from issuing the GET_DESCRIPTOR to pipe 0 while the CDROM drive is busy.  
> > > You could find out what that other thread is and suspend or kill it.
> > > 
> > > Under Linux 2.6 there shouldn't be any problem.
> > 
> > Alan, I'm not up to speed. What code, exactly, does accomplish the
> > necessary serialization in 2.6? Can you give me a function name
> > and a lock or counter name?
> 
> It's not a matter of serialization.  The UHCI driver in 2.6 implements
> queuing of URBs for all endpoints, whereas the 2.4 versions only allow
> queuing for bulk endpoints (and then only if the appropriate flag is set
> in the URB).  If a second URB is submitted to a control endpoint before
> the first URB has finished, under 2.4 the second URB will simply be 
> rejected.
> 
> That's what's happening to Stuart.  Some other thread is sending a 
> GET_DESCRIPTOR query to endpoint 0 and thereby preventing usb-storage's
> CLEAR_FEATURE(endpoint halt) command from being accepted.
> 
> It might be possible to make a 2.4 driver do queuing for non-bulk URBs, 
> but that would be a tricky thing to get right unless you were very 
> familiar with the driver.  It's one of the important differences between 
> 2.4 and 2.6.

I don't think it's as hard as you think it is, but you are probably
right that it is a bit tricky if you're not familiar with the code.

There are certainly major differences between the 2.4 and 2.6 drivers
now, but much of the code for control is similar to bulk and the 2.4
driver already handles bulk.

Although, I'm curious what other thread is sending a GET_DESCRIPTOR
query that usb-storage is conflicting with. Was this a rare occurance or
is this repeatable?

JE



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&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