All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Crappy USBkeys
Date: Fri, 30 Mar 2007 10:29:22 +0200	[thread overview]
Message-ID: <20070330082922.GB6541@enneenne.com> (raw)
In-Reply-To: <20070330073919.GA6541@enneenne.com>

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
error!

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

Ciao,

Rodolfo

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)
 #else
-#define USB_PRINTF(fmt,args...)
+#define USB_PRINTF(fmt,args...)        wait_ms(1) /* for crappy USB keys... */
 #endif
 
 #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

      reply	other threads:[~2007-03-30  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-30  7:39 [U-Boot-Users] Crappy USBkeys Rodolfo Giometti
2007-03-30  8:29 ` Rodolfo Giometti [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070330082922.GB6541@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.