[PATCH] USB: hub: Avoid NULL pointer dereference when hub doesn't have any ports

2013-03-25 Thread David Linares
r=0424, idProduct=2512 usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 hub 1-1:1.0: USB hub found version 2.86 bootinghub 1-1:1.0: 0 ports detected Unable to handle kernel NULL pointer dereference at virtual address 00000010 Signed-off-by: David Linares --- drivers

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

2013-03-25 Thread David Linares
Hi all, I am currently working on an open-source project using linux 3.5.4 on an i.MX25 board manufactured by Voipac. I have been experiencing all sorts of USB issues that I have logged here: http://pastebin.com/Ry6fdne5 As you will see, it varies from detecting a hub with 0 ports, failing

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

2013-03-25 Thread David Linares
On 25 March 2013 14:44, Alan Stern wrote: > On Mon, 25 Mar 2013, David Linares wrote: > >> Hi all, >> >> I am currently working on an open-source project using linux 3.5.4 on >> an i.MX25 board manufactured by Voipac. >> I have been experiencing all sorts o

Re: [PATCH] USB: hub: Avoid NULL pointer dereference when hub doesn't have any ports

2013-03-25 Thread David Linares
On 25 March 2013 17:31, Greg Kroah-Hartman wrote: > On Mon, Mar 25, 2013 at 10:50:27AM +0000, David Linares wrote: >> Return an error if hub->descriptor->bNbrPorts==0. Without this additional >> check, we can end up doing a "hub->ports = kzalloc(0, GFP_KERNEL)"

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

2013-03-26 Thread David Linares
On 25 March 2013 18:07, Alan Stern wrote: > On Mon, 25 Mar 2013, David Linares wrote: > >> > Start with usbmon (see Documentation/usb/usbmon.txt). >> >> Thanks Alan. I have just compiled my kernel with debugfs and usbmon. >> I can now easily capture raw te

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

2013-03-26 Thread David Linares
On 26 March 2013 15:27, Alan Stern 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 >&

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

2013-03-27 Thread David Linares
On 26 March 2013 18:50, Alan Stern wrote: > On Tue, 26 Mar 2013, David Linares wrote: > >> >> 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 >> >>

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

2013-03-27 Thread David Linares
On 27 March 2013 18:35, Alan Stern wrote: > On Wed, 27 Mar 2013, David Linares wrote: > >> Thanks Alan. I understand, but the USB cable is plugged into an AC/DC >> adaptor which can provide an output of 1A. After breaking out an USB >> cable, I measured that the consumpti

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

2013-03-28 Thread David Linares
On 27 March 2013 20:00, Alan Stern wrote: > On Wed, 27 Mar 2013, David Linares wrote: > >> Please correct me if I am wrong. >> On my iMX25 board, I have got a 1-port root_hub which will provide >> 500mA max to its unique child. > > You should check that against the