Forum Topic - high-power USB device support:
   
high-power USB device support  
Hi,
Is there anything special we need to do to tell Aviage that the USB driver has 500mA available?
We currently have an issue that some iPods don't work unless plugged through a powered USB hub.  Therefore the theory 
goes that the USB device is not being told that it can use 500mA (I think the host must tell the device this, otherwise 
the device will only draw less than 50mA??).  Our hardware is capable of safely providing 500mA to a connected device.

Regards,
Radek.
Re: high-power USB device support  
> Is there anything special we need to do to tell Aviage that the USB driver has
>  500mA available?
> We currently have an issue that some iPods don't work unless plugged through a
>  powered USB hub.  Therefore the theory goes that the USB device is not being 
> told that it can use 500mA (I think the host must tell the device this, 
> otherwise the device will only draw less than 50mA??).  Our hardware is 
> capable of safely providing 500mA to a connected device.

There are no special Aviage APIs for anything like this. I don't think there should be anything for you to do.

Can you clarify in which way the iPods "don't work"? Once the configuration of the iPod gets selected the device is then
 allowed to draw up to its full reported power usage. Is the iPod displaying an error on the screen, or is it failing in
 some other way? Which iPods (touches, iPhones, nano, classic) don't work?

Does the output of sloginfo show anything when this occurs?

Thanks,
Gilles

Re: high-power USB device support  
> Is there anything special we need to do to tell Aviage that the USB driver has
>  500mA available?

The output of usb -v show this:
Device Address             : 2
Upstream Host Controller   : 0
Upstream Device Address    : 1
Upstream Port              : 1
Upstream Port Speed        : High
Vendor                     : 0x05ac (Apple Inc.)
Product                    : 0x1261 (iPod)
Device Release             : r0.01
Class                      : 0x00 (Independent per interface)
Max PacketSize0            : 64
Configurations             : 2
  Configuration            : 1
    Attributes             : 0xc0 (Self-powered)
    Max Power              : 500 mA
  Configuration            : 2 (iPod USB Interface)
    Attributes             : 0xc0 (Self-powered)
    Max Power              : 500 mA


You can see for both configuration 1 and 2 it says max power 500 mA. This means as soon as the configuration is selected
 the iPod is allowed to draw the full 500 mA.

Gilles
Re: high-power USB device support  
Hi Gilles,

Just like to get some info about the meaning of some error messages related to the USB issue. The scenario is after 
connecting the usb key, the io-usb and umass driver couldn't recognize the device, hence could not mount the device as /
fs/usb0 which readable by Aviage.

No info came form usb -vvvvv as:
# usb -vvvvv 
USB 0 (EHCI) v1.10, v1.01 DDK, v1.01 HCD
    Control, Interrupt, Bulk(SG), Isoch(Stream), Low speed, High speed

From sloginfo, there are something prompted out as
Time             Sev Major Minor Args
Jan 01 00:14:49    2    12     0 CLASS_ExtractDevice:  no parent
Jan 01 00:14:50    2    12     0 CLASS_EnumerateDevice: bus 0, parent 0, port 0, speed 2
Jan 01 00:14:50    2    12     0 CLASS_EnumerateDevice:  Get device descriptor
Jan 01 00:14:50    2    12     0 CLASS_EnumerateDevice:  Get device descriptor failed 5
Jan 01 00:14:51    2    12     0 CLASS_EnumerateDevice: bus 0, parent 0, port 0, speed 2
Jan 01 00:14:51    2    12     0 CLASS_EnumerateDevice:  Get device descriptor
Jan 01 00:14:51    2    12     0 CLASS_EnumerateDevice:  Get device descriptor failed 5
Jan 01 00:14:52    2    12     0 CLASS_EnumerateDevice: bus 0, parent 0, port 0, speed 2
Jan 01 00:14:52    2    12     0 CLASS_EnumerateDevice:  Get device descriptor
Jan 01 00:14:52    2    12     0 CLASS_EnumerateDevice:  Get device descriptor failed 5

Not so sure what that means, especially for the error message of "CLASS_ExtractDevice:  no parent", it happens all the 
time when connected the problematic device (It is 128 MB usb key).

Regards,
Chris
Re: high-power USB device support  
> The scenario is after connecting the usb key, the io-usb and 
> umass driver couldn't recognize the device, hence could not mount the device 
> as /fs/usb0 which readable by Aviage.

Is this the same issue? The last post by Radek said the issue was with iPods. Does your USB key issue occur through a 
hub as well, or only when directly connected to the board?


> Jan 01 00:14:52    2    12     0 CLASS_EnumerateDevice:  Get device descriptor
>  failed 5
> 
> Not so sure what that means, especially for the error message of "
> CLASS_ExtractDevice:  no parent", it happens all the time when connected the 
> problematic device (It is 128 MB usb key).

The message "no parent" is normal. The Get device descriptor failed 5 isn't. Can you slay and restart io-usb with more 
ehci verbosity? The slogs should then have more info. I think you need to do something like:

io-usb -c -v -dehci pindex=0,verbose=5 &


Regards,
Gilles
Re: high-power USB device support  
Yes, it is the same issue. The iPods and certain USB keys are only working after connected with a powered USB hub, 
otherwise just fail to be recognized by the usb driver. It is most likely an hardware issue and we wonder whether there 
is a way on software side can help to identify the problem. Now the problematic hardware is not available and will get 
more info once it is ready again, thanks.

Regards,
Chris 
Re: high-power USB device support  
Might want to post this in the "BSP and drivers" project, you might get more USB experts monitoring that forum.

Regards,
Gilles