On Sat, 12 Oct 2002, David Brownell wrote:

> >>It'd be good if we could set config to zero ... that's the
> >>same state as a device is in after set_address is called.
> >>We don't need it yet ... but it's a good capability to have.
> > 
> > 
> > Interessting suggestion, but where is the benefit of this over switching over
> > from the default configuration?
> 
> clear away and restore interfaces, both internally and with
> driverfs.  (You were just asking for testing support in
> another message ... every device should have both config zero
> and its default! :)

Just a comment: There ain't no such thing as a default configuration!

* Configurations are referenced by their configuration values (as given by 
the configuration descriptor) which are from range 1 - 255.

* Zero is not a valid configuration value as it is used to reference the 
unconfigured state.

* Other than that the only requirement for the configuration value(s) is 
they must be unique for the device. In conclusion, there's nothing wrong 
with a device using configuration values 13, 7, 123 for its three 
configurations - in any order.

* configuration values are known in advance (i.e. before the host needs to 
issue the first SetConfiguration request) from the corresponding 
configuration descriptor.

* configuration descriptors (like all other deescriptors) are referenced 
by a zero-based index 0, 1, ... bNumConfigurations-1 where the number of
configurations is known from the device descriptor (bNumConfigurations)
To repeat: These indices refer to the configuration descriptors, not the 
configuration.

* A priori there is nothing that makes any configuration different or 
preferable compared to any other. The choice is just a matter of user 
selection, policies and system configuration.

* Note this is different compared to altsettings. When any configuration 
gets activated all its interfaces are enabled and thus we need a default 
altsetting for them. Altsettings, like interfaces, are always referenced 
by their zero-based value which is equal to the index of the corresponding
altsetting or interface descriptor. Hence there is always an altsetting 
zero and this is defined to be the default one.

* The difference between arbitrary non-zero configuration values and 
zero-based interface and altsetting indices manifests throughout the 
list of standard requests: configuration values are passed using the 
wValue field of the SETUP packet while interface/altsetting indices are 
given in the wIndex field.

Martin



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to