Module Name: src Committed By: jakllsch Date: Sun Aug 13 22:29:42 UTC 2017
Modified Files: src/sys/dev/usb: uhidev.c Log Message: Always try to set USB HID devices into Report Protocol. (Unless the device is known to be quirky.) Some of the most-widely-compatible methods of implementing USB Keyboard NKRO depend on this Request to function as designed. Issuing this Request is recommended by the HID 1.11 spec (7.2.6): ... "the host should not make any assumptions about the device's state and should set the desired protocol whenever initializing a device." To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/dev/usb/uhidev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/usb/uhidev.c diff -u src/sys/dev/usb/uhidev.c:1.70 src/sys/dev/usb/uhidev.c:1.71 --- src/sys/dev/usb/uhidev.c:1.70 Thu Jun 1 02:45:12 2017 +++ src/sys/dev/usb/uhidev.c Sun Aug 13 22:29:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: uhidev.c,v 1.70 2017/06/01 02:45:12 chs Exp $ */ +/* $NetBSD: uhidev.c,v 1.71 2017/08/13 22:29:42 jakllsch Exp $ */ /* * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.70 2017/06/01 02:45:12 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.71 2017/08/13 22:29:42 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -153,12 +153,9 @@ uhidev_attach(device_t parent, device_t aprint_error_dev(self, "couldn't establish power handler\n"); (void)usbd_set_idle(iface, 0, 0); -#if 0 - if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0 && - id->bInterfaceSubClass != UISUBCLASS_BOOT) + if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0) (void)usbd_set_protocol(iface, 1); -#endif maxinpktsize = 0; sc->sc_iep_addr = sc->sc_oep_addr = -1;