On Wed, 2003-01-15 at 01:20, [EMAIL PROTECTED] wrote: 
> You are pointing out 2 valid bugs:
> 
> -findintfep, findintfif, and usb_epnum_to_ep_desc incorrectly check 
> inactive alternate settings.
> -proc_submiturb does not set the interval for ISO transfers.
> 
> however findintfep should _not_ check if the interface is claimed, as 
> that's the job of checkintf.
> 
> Also, you don't need to throw all that code into proc_submiturb, as 
> usb_epnum_to_ep_desc (the function that was already in use by 
> proc_submiturb) already does all that.
> 



checkintf claims the interface if it's not claimed, I'm not sure this is
the 'best' thing to do, since you get into the problems of picking the
first interface where bEndpointAddress matches the request, which may
not be the interface you want. 


Which is also the reason I didn't use  usb_epnum_to_ep_desc, It doesn't
check act_altsetting and doesn't know about what interface to look at.
so you get the first enpoint that matches.. e.g.


I have a USB device that looks like this
D:  Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs=  1
P:  Vendor=0915 ProdID=8000 Rev= 1.00
S:  Manufacturer=GlobeSpan Inc.
S:  Product=USB-ADSL Modem
S:  SerialNumber=FFFFFF
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbdevfs
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=3ms
I:  If#= 0 Alt= 1 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbdevfs
E:  Ad=88(I) Atr=01(Isoc) MxPS=1008 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=3ms
....
I:  If#= 0 Alt= 4 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=usbdevfs
E:  Ad=88(I) Atr=01(Isoc) MxPS= 448 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=3ms


If I ask for AD 02  usb_epnum_to_ep_desc will return the endpoint on alt
01 (which may not be active)

But then if I also want 88 I'll get the endpoint on alt 02

but because I really want the one on alt=4 because I don't want or need
the amount of bandwidth on alt=1.



The patch I sent brakes as little as possible,  I believe devicefs_urb
should have a member for the interface being requested, but this will
break lots of things, and is probably for someone more godly to
implement.

The patch will cause using usvfs to submit a URB without first claiming
the interface to return an error, instead of claiming the first
interface it finds, which IMHO is better than picking any old
interface/alternate to throw data at.







-------------------------------------------------------
This SF.NET email is sponsored by: Take your first step towards giving 
your online business a competitive advantage. Test-drive a Thawte SSL 
certificate - our easy online guide will show you how. Click here to get 
started: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0027en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to