[U-Boot-Users] Crappy USBkeys

Rodolfo Giometti giometti at enneenne.com
Fri Mar 30 10:29:22 CEST 2007

On Fri, Mar 30, 2007 at 09:39:19AM +0200, Rodolfo Giometti wrote:
> Hello,
> using new USB support from USB-testing branch on a PXA270 based board
> I noticed that some crappy USBkeys give the following error:
>    New Device 1
>    usb_control_msg: request: 0x6, requesttype: 0x80
>    value 0x100 index 0x0 length 0x8
>    INFO: submit_control_msg
>    DEBUG: SUB URB:[ 754] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x80000000
>    DEBUG: SUB URB:[ 75a] dev: 0,ep: 0-I,type:CTRL,len:0/8 stat:0x80000000
>    ERROR: sohci_submit_job: URB NOT FINISHED
>    ERROR: sohci_submit_job failed
>          USB device not responding, giving up (status=80000000)
> It seems they cannot send their descriptor... has someone noticed the
> same behaviour?

That's strange... just disabling all debugging messages and adding
this patch:

diff --git a/drivers/usb_ohci.c b/drivers/usb_ohci.c
index c5e4c38..f381c40 100644
--- a/drivers/usb_ohci.c
+++ b/drivers/usb_ohci.c
@@ -1178,7 +1178,9 @@ pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)",                                            WR_RH_PORTSTAT (RH_PS_PRS);
                                        OK (0);
                        case (RH_PORT_POWER):
-                                       WR_RH_PORTSTAT (RH_PS_PPS ); OK (0);
+                                       WR_RH_PORTSTAT (RH_PS_PPS );
+                                       wait_ms(100);
+                                       OK (0);
                        case (RH_PORT_ENABLE): /* BUG IN HUP CODE *********/
                                        if (RD_RH_PORTSTAT & RH_PS_CCS)
                                            WR_RH_PORTSTAT (RH_PS_PES );

my crappy USBkey works well! But enabling debugging messages (__only__
into file usb_ohci.c) both good and crappy keys caused the above

The above patch allow crappy keys to be enumerated at boot time.

In fact without the patch I get on some (crappy) keys:

wl1100> usb start
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found

while with the patch I get:

wl1100> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found



P.S. Please, consider that I still have my patch on USB support:

diff --git a/common/usb.c b/common/usb.c
index 0857494..087a65f 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -61,7 +61,7 @@
 #ifdef USB_DEBUG
 #define        USB_PRINTF(fmt,args...) printf (fmt ,##args)
-#define USB_PRINTF(fmt,args...)
+#define USB_PRINTF(fmt,args...)        wait_ms(1) /* for crappy USB keys... */
 #define USB_BUFSIZ     512

and I set USB_DEBUG undefined.


GNU/Linux Solutions                  e-mail:    giometti at enneenne.com
Linux Device Driver                             giometti at gnudd.com
Embedded Systems                     		giometti at linux.it
UNIX programming                     phone:     +39 349 2432127

More information about the U-Boot mailing list