USB keyboard with XHCI on x86?

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

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 ?

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

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 ?

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

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
participants (3)
-
Bin Meng
-
Marek Vasut
-
Simon Glass