All of lore.kernel.org
 help / color / mirror / Atom feed
* USB keyboard with XHCI on x86?
@ 2020-05-08  2:38 Simon Glass
  2020-05-08  2:39 ` Marek Vasut
  2020-05-08  3:02 ` Bin Meng
  0 siblings, 2 replies; 6+ messages in thread
From: Simon Glass @ 2020-05-08  2:38 UTC (permalink / raw)
  To: u-boot

Hi Bin,

Does this work for you? It doesn't work for me in interrupt mode, only
in control-endpoint mode. Is that expected?

Also I notice that some broken devices don't work or cause a crash.

Regards,
SImon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* USB keyboard with XHCI on x86?
  2020-05-08  2:38 USB keyboard with XHCI on x86? Simon Glass
@ 2020-05-08  2:39 ` Marek Vasut
  2020-05-08  2:41   ` Simon Glass
  2020-05-08  3:02 ` Bin Meng
  1 sibling, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2020-05-08  2:39 UTC (permalink / raw)
  To: u-boot

On 5/8/20 4:38 AM, Simon Glass wrote:
> Hi Bin,
> 
> Does this work for you? It doesn't work for me in interrupt mode, only
> in control-endpoint mode. Is that expected?
> 
> Also I notice that some broken devices don't work or cause a crash.

I recall some keyboards didn't work in interrupt mode, which is why I
added the control endpoint polling. Does it work on EHCI for you ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* USB keyboard with XHCI on x86?
  2020-05-08  2:39 ` Marek Vasut
@ 2020-05-08  2:41   ` Simon Glass
  2020-05-08  2:56     ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Glass @ 2020-05-08  2:41 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Thu, 7 May 2020 at 20:39, Marek Vasut <marex@denx.de> wrote:
>
> On 5/8/20 4:38 AM, Simon Glass wrote:
> > Hi Bin,
> >
> > Does this work for you? It doesn't work for me in interrupt mode, only
> > in control-endpoint mode. Is that expected?
> >
> > Also I notice that some broken devices don't work or cause a crash.
>
> I recall some keyboards didn't work in interrupt mode, which is why I
> added the control endpoint polling. Does it work on EHCI for you ?

I'm not sure how to try it with an XHCI controller.

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* USB keyboard with XHCI on x86?
  2020-05-08  2:41   ` Simon Glass
@ 2020-05-08  2:56     ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2020-05-08  2:56 UTC (permalink / raw)
  To: u-boot

On 5/8/20 4:41 AM, Simon Glass wrote:
> Hi Marek,
> 
> On Thu, 7 May 2020 at 20:39, Marek Vasut <marex@denx.de> wrote:
>>
>> On 5/8/20 4:38 AM, Simon Glass wrote:
>>> Hi Bin,
>>>
>>> Does this work for you? It doesn't work for me in interrupt mode, only
>>> in control-endpoint mode. Is that expected?
>>>
>>> Also I notice that some broken devices don't work or cause a crash.
>>
>> I recall some keyboards didn't work in interrupt mode, which is why I
>> added the control endpoint polling. Does it work on EHCI for you ?
> 
> I'm not sure how to try it with an XHCI controller.

Do you have an EHCI controller on that system too ?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* USB keyboard with XHCI on x86?
  2020-05-08  2:38 USB keyboard with XHCI on x86? Simon Glass
  2020-05-08  2:39 ` Marek Vasut
@ 2020-05-08  3:02 ` Bin Meng
  2020-05-10 23:30   ` Simon Glass
  1 sibling, 1 reply; 6+ messages in thread
From: Bin Meng @ 2020-05-08  3:02 UTC (permalink / raw)
  To: u-boot

Hi Simon,

On Fri, May 8, 2020 at 10:38 AM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Bin,
>
> Does this work for you? It doesn't work for me in interrupt mode, only
> in control-endpoint mode. Is that expected?
>
> Also I notice that some broken devices don't work or cause a crash.
>

I don't have a board to test xHCI right now, but from the commit
message I wrote the interrupt mode should be working.

commit 1897d60130976ece389d5875187b78ba0d41428f
Author: Bin Meng <bmeng.cn@gmail.com>
Date:   Mon Sep 18 06:40:41 2017 -0700

    usb: xhci: Add interrupt transfer support

    xHCI uses normal TRBs for both bulk and interrupt. This adds the
    missing interrupt transfer support to xHCI so that devices like
    USB keyboard that uses interrupt transfer can work.

    Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Regards,
Bin

^ permalink raw reply	[flat|nested] 6+ messages in thread

* USB keyboard with XHCI on x86?
  2020-05-08  3:02 ` Bin Meng
@ 2020-05-10 23:30   ` Simon Glass
  0 siblings, 0 replies; 6+ messages in thread
From: Simon Glass @ 2020-05-10 23:30 UTC (permalink / raw)
  To: u-boot

Hi,

On Thu, 7 May 2020 at 21:02, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Fri, May 8, 2020 at 10:38 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Bin,
> >
> > Does this work for you? It doesn't work for me in interrupt mode, only
> > in control-endpoint mode. Is that expected?
> >
> > Also I notice that some broken devices don't work or cause a crash.
> >
>
> I don't have a board to test xHCI right now, but from the commit
> message I wrote the interrupt mode should be working.
>
> commit 1897d60130976ece389d5875187b78ba0d41428f
> Author: Bin Meng <bmeng.cn@gmail.com>
> Date:   Mon Sep 18 06:40:41 2017 -0700
>
>     usb: xhci: Add interrupt transfer support
>
>     xHCI uses normal TRBs for both bulk and interrupt. This adds the
>     missing interrupt transfer support to xHCI so that devices like
>     USB keyboard that uses interrupt transfer can work.
>
>     Signed-off-by: Bin Meng <bmeng.cn@gmail.com>

Yes it does work, but it seems a bit fragile. E.g. if I unplug the
keyboard I get:

=> WARN halted endpoint, queueing URB anyway.
Unexpected XHCI event TRB, skipping... (78832cd0 00000000 13000000 01008400)
BUG at /scratch/sglass/cosarm/src/third_party/u-boot/files/drivers/usb/host/xhci-ring.c:496/abort_td()!
BUG!
resetting ...


Marek, I don't have EHCI so far as I know. This is Intel Apollo Lake.

Regards,
Simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-10 23:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  2:38 USB keyboard with XHCI on x86? Simon Glass
2020-05-08  2:39 ` Marek Vasut
2020-05-08  2:41   ` Simon Glass
2020-05-08  2:56     ` Marek Vasut
2020-05-08  3:02 ` Bin Meng
2020-05-10 23:30   ` Simon Glass

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.