Since the USB stack doesn't handle stalled pipes, don't abort keyboard setup if the set_idle command fails, since it's a non-critical feature. Instead, log a warning.
Test: build/boot Google Pixel Slate, observe keyboard functional
Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- src/hw/usb-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/usb-hid.c b/src/hw/usb-hid.c index cedec0b..9e92dfe 100644 --- a/src/hw/usb-hid.c +++ b/src/hw/usb-hid.c @@ -70,7 +70,7 @@ usb_kbd_setup(struct usbdevice_s *usbdev // Periodically send reports to enable key repeat. ret = set_idle(usbdev->defpipe, KEYREPEATMS); if (ret) - return -1; + dprintf(3, "Warning: Failed to set key repeat rate\n");
keyboard_pipe = usb_alloc_pipe(usbdev, epdesc); if (!keyboard_pipe)
Dear Matt,
On 2019-12-13 04:51, Matt DeVillier wrote:
Since the USB stack doesn't handle stalled pipes, don't abort keyboard setup if the set_idle command fails, since it's a non-critical feature. Instead, log a warning.
Test: build/boot Google Pixel Slate, observe keyboard functional
Signed-off-by: Matt DeVillier matt.devillier@gmail.com
src/hw/usb-hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hw/usb-hid.c b/src/hw/usb-hid.c index cedec0b..9e92dfe 100644 --- a/src/hw/usb-hid.c +++ b/src/hw/usb-hid.c @@ -70,7 +70,7 @@ usb_kbd_setup(struct usbdevice_s *usbdev // Periodically send reports to enable key repeat. ret = set_idle(usbdev->defpipe, KEYREPEATMS); if (ret)
return -1;
dprintf(3, "Warning: Failed to set key repeat rate\n");
keyboard_pipe = usb_alloc_pipe(usbdev, epdesc); if (!keyboard_pipe)
Reviewed-by: Paul Menzel pmenzel@molgen.mpg.de
Kind regards,
Paul
On Thu, Dec 12, 2019 at 09:51:19PM -0600, Matt DeVillier wrote:
Since the USB stack doesn't handle stalled pipes, don't abort keyboard setup if the set_idle command fails, since it's a non-critical feature. Instead, log a warning.
Test: build/boot Google Pixel Slate, observe keyboard functional
Signed-off-by: Matt DeVillier matt.devillier@gmail.com
Thanks. I committed this change.
-Kevin