On Wed, Mar 15, 2006 at 09:52:09AM -0500, Craig W. Nadler wrote:
> Greg KH wrote:
> 
> >On Mon, Mar 13, 2006 at 09:11:11PM -0500, Craig W. Nadler wrote:
> >  
> >
> >>    I've put together a patch demonstrating how Interface Association
> >>Descriptors could be supported with a minimal amount of changes the
> >>current USB stack. When a USB device is enumerated the descriptors are
> >>parsed by the code in drivers/usb/core/config.c. A list of IADs for a
> >>given configuration would be stored in the usb_host_config struct for
> >>that configuration. If an interface is referenced by an IAD then a
> >>pointer to the IAD will be stored in the usb_host_interface struct for
> >>that interface.
> >>    The probe entry point of a class driver could check if the interface
> >>it's probing is referenced by an IAD. If it is then configure the driver
> >>to handle the other associated interfaces as well. The probe function
> >>could also check the "extra" and "extralen" fields in the
> >>usb_host_interface struct for each interface to get the class specific
> >>descriptors.
> >>
> >>The code that displays descriptor information in /proc/bus/usb/devices
> >>will show IADs in the following format:
> >>
> >>A:  1stIf= 0 IfCount= 2 Cls=ff(vend.) Sub=03 Prot=00
> >>    
> >>
> >
> >Why "1stIf"?
> >
> >And what about sysfs support?  That's more important these days than
> >usbfs files :)
> >
> >thanks,
> >
> >greg k-h
> >
> >
> >  
> >
> Interface Association Descriptors must refer to consecutively numbered
> interfaces. "1stIf" was meant to be the first interface number
> (bFirstInterface) that the Interface Association Descriptor referred to.
> "IfCount" is the number of interfaces that the Interface Association
> Descriptor refers to. I've changed "1stIf" to "FirstIf#" so that it is
> hopefully more readable.
> 
> Thanks for pointing out my oversight with sysfs. A new patch file is
> attached with a number for updates.
> 
> 
> The USBFS output now is in the following format:
> 
> A:  FirstIf#= 0 IfCount= 2 Cls=ff(vend.) Sub=03 Prot=00
> A:  FirstIf#= 2 IfCount= 2 Cls=01(audio) Sub=02 Prot=00
> 
> 
> In SYSFS Interfaces that are referenced by an Interface Association
> Descriptor have the following files:
> 
> iad_bFirstInterface
> iad_bInterfaceCount
> iad_bFunctionClass
> iad_bFunctionSubClass
> iad_bFunctionProtocol

But your sysfs implementation doesn't work for multiple interface
association descriptors, like your usbfs change does, right?  It will
only show the first one, which is not enough.

thanks,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to