On Thu, 18 Aug 2005, Robert Marquardt wrote:

> I hope this is the correct group for this message.
> 
> I have a (HID) device which has a descriptor with two configurations.
> The first configuration is high power wheras the second one is low 
> power. The rest of the configurations are identical and form a valid HID 
> device.
> The configurations are numbered in reverse, ie the first (hi power) 
> configuration is numbered 2 and the following low power configuration is 
> numbered 1.
> 
> The idea behind that is to have the device be enumerated as hi or low 
> power device depending on the hub it is connected to.
> 
> On my SuSE Linux 9.3 though the device gets configured for hi power even 
> on a low power port. Obviously Linux gets confused by the non-standard, 
> but valid configurations.

Linux doesn't get confused.  The problem is that power budgeting is
ignored when choosing device configurations.  There's even a comment about
it in the source code:

static int choose_configuration(struct usb_device *udev)
{
        int c, i;

        /* NOTE: this should interact with hub power budgeting */

The current strategy is to avoid vendor-specific interface classes and 
Microsoft RNDIS, and to use the first otherwise available configuration.  
(The numbering is ignored totally.)  That's why you end up with the 
high-power config.

Note that you can set config number 1 manually, by doing

  echo 1 >/sys/bus/usb/devices/your device's id/bConfigurationValue

Alan Stern



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to