Skip to content

Improve USB Keyboard support for all rpi boards

Jason Wessel u-boot 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 0 repliesNew

Changes in v1 from the cover letter

- Testing completed against all generations of raspberry pi boards
- check patch warnings add errors have been fixed

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6xhci: Add polling support for USB keyboardsdrivers/usb/host/xhci-ring.c drivers/usb/host/xhci.c include/usb/xhci.h+26 -160 replies
2/6usb_kbd: succeed even if no interrupt is pendingcommon/usb_kbd.c+3 -10 replies
3/6common/usb.c: Work around keyboard reporting "USB device not accepting new address"common/usb.c+4 -30 replies
4/6xhci-ring.c: Add the poll_pend state to properly abort transactionsdrivers/usb/host/xhci-ring.c+70 -160 replies
5/6xhci-ring: Fix crash when issuing "usb reset"drivers/usb/host/xhci-ring.c+12 -50 replies
6/6usb.c: Add a retry in the usb_prepare_device()common/usb.c+9 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] Improve USB Keyboard support for all rpi boards

Prior to this patch set, I had just a small number of USB keyboards function properly with the Rasbpberry Pi boards. Nearly every composite USB keyboard/mouse I had access to including the Raritan IP/KVM devices would not initialize properly.

At this point I have tested all generations of the Raspberry Pi boards (0-4) and the USB keyboards I use day to day are working properly.

For the RPi4, I tested against the rpi-master branch which now has the required USB patches, all the other boards were tested against the master branch.

v1:
- Testing completed against all generations of raspberry pi boards
- check patch warnings add errors have been fixed

rfc v3:
- Add in patch 6
- Finally got the GearHead keyboard + mouse composite USB device working

rfc v2:
- Minor cleanups to patches 1-3 based on prior review
- Patch 4 & 5 are new to fix various xhchi crashes while having additional devices plugged in along with booting off the usb port. The nonblocking mode turned out to be somewhat complex.

rfc v1:

The original purpose of the patch set was to fix problems with the USB keyboard support with the rpi4. The generic xhci code lacks a non blocking call to read an event. This causes major problems for the sleep function as well as for ethernet downloads where a keyboard poll for interrupting the download blocks for 5 seconds.

----------------------------------------------------------------
Jason Wessel (6):
xhci: Add polling support for USB keyboards
usb_kbd: succeed even if no interrupt is pending
common/usb.c: Work around keyboard reporting "USB device not accepting new address" xhci-ring.c: Add the poll_pend state to properly abort transactions
xhci-ring: Fix crash when issuing "usb reset"
usb.c: Add a retry in the usb_prepare_device()

 common/usb.c                 |  16 +++++++++++++---
 common/usb_kbd.c             |   4 +++-
 drivers/usb/host/xhci-ring.c | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
 drivers/usb/host/xhci.c      |  11 ++++++-----
 include/usb/xhci.h           |   5 +++--
 5 files changed, 121 insertions(+), 38 deletions(-)