On Sun, May 16, 2004 at 04:44:51PM -0700, Greg KH wrote:
> On Sun, May 16, 2004 at 12:01:03PM -0400, Alan Stern wrote:
> > While looking through the irda-usb driver, I found that it does several
> > questionable things.

        Just because you don't understand the code doesn't make it
automatically questionable. Check comments in write_bulk_callback() to
understand what's happening.

> >     irda_urb_net_timeout() looks at urb->status while the URB is
> >     still in progress.

        If you check the code, you will see that it does that with irq
disabled. Therefore, the status is not goind to change under us.

> >     Even worse, it changes urb->status!

        Yes, but only if the URB is idle. Check what the status in
question mean.

> Ick ick ick.  That's wrong and needs to be fixed.

        I spent enough time testing the driver and working around the
"features" of the USB API that I can say : be my guest.

> >     The driver uses the urb->timeout field.  This field is supported
> >     only by the UHCI driver, and I would like to remove that support.
> 
> You mean the ohci and ehci drivers do not support that?  Since when?  We
> need to update the documentation if that is true...

        Yep, I tested the timeout support with uhci, usb-uhci and ohci
driver in 2.4.X and uhic-hcd and ohci-hcd in 2.6.X. I even sent patch
to harmonise the meaning of this field across drivers a long while
back (for some it was absolute, for some relative to jiffies).

> > Right now there are only about 3 drivers that use urb->timeout.  My
> > feeling is that we should either remove timeout support entirely or else
> > move it to usbcore, where it will work with every HCD.  This wouldn't be
> > such a bad thing to do; in fact we could simply take the code already used
> > by usb_bulk/control_message() and put it in a more central location.  (If 
> > it were available in this way, usb-storage could be simplified.)
> 
> Move it to the core so that it actually works would be good.

        Yeah, less maintainance troubles and more uniformity. I'm all
for it.

> thanks,
> 
> greg k-h

        Jean


-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&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