Re: Help with USB issues at boot-up on i.MX25 (linux 3.5.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26 March 2013 15:27, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 26 Mar 2013, David Linares wrote:
>
>> >> While enabling usbmon, I noticed something that can be related.
>> >> There is a config: "Maximum VBUS Power usage" which is currently set to
>> >> 300mA in my case.
>> >
>> > That option (USB_GADGET_VBUS_DRAW) applies only to gadgets.  That is,
>> > it's meant for the part of the USB stack used in peripherals, not in
>> > hosts.
>> >
>>
>> Ok, so I guess these are the 300mA which are currently reported by the HID
>> keyboard emulation for example, as I do have this gadget.
>
> That's right.
>
>> >> But here is the USB dongle I am using:
>> >>
>> >> lsusb -v
>> >> ...
>> >>   idVendor           0x148f Ralink Technology, Corp.
>> >>   idProduct          0x5370 RT5370 Wireless Adapter
>> >> ..
>> >>   MaxPower              450mA
>> >>
>> >> I guess setting 450mA will sort out my issue number 4 and avoid the
>> >> "usb 1-1.1: rejected 1 configuration due to insufficient available bus power"
>> >> right?
>> >
>> > No, it won't have any effect at all.  What might help would be to plug
>> > the wireless adapter into a powered hub instead of directly into your
>> > computer.
>> >
>>
>> The device I am working on is an embedded device, therefore the wireless
>> adapter has to be connected to the internal hub. This hub and the whole device
>> are powered via an usb cable.
>
> Oh.  Then maybe the USB cable doesn't provide enough power to run both
> the embedded device and the wireless adapter.
>
>> I have posted a full "lsub -v" that I ran on the device when everything works,
>> just in case someone spots something very obvious:
>> http://pastebin.com/HypTRS9J
>
> The lsusb output says that the Ralink wireless adapter will use up to
> 450 mA, leaving only 50 mA available for the rest of your device.  Do
> you think that is enough?
>

There are 2 ports, so does the hub provide 500mA per port or in total?
If that's 500mA for each port, that's fine.

I have done some progress on my side. I have noticed that in a failing case,
the 2-port hub is actually detected as a "standalone hub" but when it
works fine,
it is detected as a "compound device".
Also printed the "hubstatus" that I get from here
http://lxr.free-electrons.com/source/drivers/usb/core/hub.c#L1513
and it is really weird:

- when it works, the value returned is 1, and therefore, I fall into the
"Self-powered external hub" case

- when it doesn't work, the value seems quite random (ex: 0xe6c0) and I fall
into the 100mA limit => my Ralink wireless adapter gets a rejected config.

> Alan Stern
>
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux