All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Need help with u-boot problem with usb-keyboard / kvm switch
Date: Fri, 19 Sep 2014 11:41:46 +0800	[thread overview]
Message-ID: <541BA5FA.3090309@atmel.com> (raw)
In-Reply-To: <5419E103.2060607@boundarydevices.com>

Hi All,

On 09/18/2014 03:29 AM, Eric Nelson wrote:
> Hi Hans,
>
> On 09/17/2014 12:11 PM, Hans de Goede wrote:
>> Hi Marek, et al,
>>
>> I'm working on cleaning up Luc's hdmi out support patchset for
>> sunxi.
>>
>> As part of this I want to also add support for usb keyboards,
>> so as to get a full console without needing to solder wires
>> to testpoints on some boards :)
>>
>> So when I plug in the usb coming from my kvm I get this:
>>
>> (Re)start USB...
>> USB0:   USB EHCI 1.00
>> scanning bus 0 for devices... EHCI timed out on TD - token=0x80008c80
>> 3 USB Device(s) found
>>         scanning usb for storage devices... 0 Storage Device(s) found
>>
>> And the usb keyboard does not work.
>>
>> If I plug in a single usb-2 hub (no ohci support for sunxi in u-boot
>> yet), then things do work, but after a few minutes of inactivity the
>> usb code starts spamming the console with:
>>
>> EHCI timed out on TD - token=0x80008c80
>> EHCI timed out on TD - token=0x80008c80
>> ...
>>
>> Could this be a problem with the phy settings (iow a sunxi specific
>> problem)?
>>
>
> Probably not.
>
> We've seen the same thing on SABRE Lite and Nitrogen6X boards.
>
> U-Boot > usb start ; setenv stdin serial,usbkbd
> (Re)start USB...
> USB0:   USB EHCI 1.00
> scanning bus 0 for devices... 2 USB Device(s) found
> USB1:   USB EHCI 1.00
> scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80
> EHCI timed out on TD - token=0x80008c80
> EHCI timed out on TD - token=0x80008c80
> 6 USB Device(s) found
>         scanning usb for storage devices... 1 Storage Device(s) found
>         scanning usb for ethernet devices... 0 Ethernet Device(s) found
> Timeout poll on interrupt endpoint
> Failed to get keyboard state from device 1c4f:0002
> U-Boot > usb tree
> USB device tree:
>    1  Hub (480 Mb/s, 0mA)
>    |  u-boot EHCI Host Controller
>    |
>    +-2  Mass Storage (480 Mb/s, 100mA)
>         Generic Mass Storage 4A3709D5
>
>    3  Hub (480 Mb/s, 0mA)
>    |  u-boot EHCI Host Controller
>    |
>    +-4  Hub (480 Mb/s, 2mA)
>      |
>      +-5  Human Interface (1.5 Mb/s, 100mA)
>      |    Logitech USB Optical Mouse
>      |
>      +-6  Hub (480 Mb/s, 100mA)
>      | |   USB 2.0 Hub
>      | |
>      | +-7  Human Interface (1.5 Mb/s, 98mA)
>      |      USB USB Keykoard
>      |
>      +-8   (12 Mb/s, 100mA)
>
> Oddly, the issue seems to be specific to **some** USB keyboards.
>
> We have some (mostly older) USB keyboards that just work and
> have had investigation on our to-do list for quite some
> time now.
>
> I was going to start with a question to the list:
>
> 	Is anyone else using USB keyboard support?

I use the USB keyboard with following hack patch (which based on 
v2013.04), then it works well on my side.

--->8---
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index bc17b85..b74bfd7 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -515,6 +515,7 @@ static inline int sohci_return_job(struct ohci *hc, 
urb_priv_t *urb)
                         ohci_readl(&regs->intrdisable); /* PCI posting 
flush */
                 }
                 urb->actual_length = 0;
+#if 0
                 td_submit_job(
                                 urb->dev,
                                 urb->pipe,
@@ -523,6 +524,8 @@ static inline int sohci_return_job(struct ohci *hc, 
urb_priv_t *urb)
                                 NULL,
                                 urb,
                                 urb->interval);
+#endif
+               urb_free_priv(urb);
                 break;
         case PIPE_CONTROL:
         case PIPE_BULK:
---8<---

> USB mass storage seems to be pretty reliable. We have
> folks using it as an alternate boot for emergency
> situations.
>
> Regards,
>
>
> Eric

Best Regards,
Bo Shen

      parent reply	other threads:[~2014-09-19  3:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 19:11 [U-Boot] Need help with u-boot problem with usb-keyboard / kvm switch Hans de Goede
2014-09-17 19:19 ` Luc Verhaegen
2014-09-18  1:34   ` Marek Vasut
2014-09-18  8:34   ` Hans de Goede
2014-09-18 12:50     ` Luc Verhaegen
2014-09-17 19:29 ` Eric Nelson
2014-09-18  1:38   ` Marek Vasut
2014-09-19  3:41   ` Bo Shen [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=541BA5FA.3090309@atmel.com \
    --to=voice.shen@atmel.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.