Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Do not explicitly set the HID Report Protocol up...
details: https://anonhg.NetBSD.org/src/rev/d35f12b55d27
branches: trunk
changeset: 361100:d35f12b55d27
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Wed Feb 09 18:09:48 2022 +0000
description:
Do not explicitly set the HID Report Protocol upon attach, some devices
don't like it and should be in Report Protocol after enumeration/reset
anyway.
May address PR kern/55019.
diffstat:
sys/dev/usb/uhidev.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 4e5a0a936f45 -r d35f12b55d27 sys/dev/usb/uhidev.c
--- a/sys/dev/usb/uhidev.c Wed Feb 09 11:16:45 2022 +0000
+++ b/sys/dev/usb/uhidev.c Wed Feb 09 18:09:48 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhidev.c,v 1.81 2021/08/07 16:19:17 thorpej Exp $ */
+/* $NetBSD: uhidev.c,v 1.82 2022/02/09 18:09:48 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.81 2021/08/07 16:19:17 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.82 2022/02/09 18:09:48 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -169,8 +169,16 @@
}
(void)usbd_set_idle(iface, 0, 0);
- if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0)
+#if 0
+ /*
+ * HID 1.11 says we should do this, but the device firmware is
+ * supposed to come up in Report Protocol after reset anyway, and
+ * apparently explicitly requesting it confuses some devices.
+ */
+ if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0 &&
+ id->bInterfaceSubClass == UISUBCLASS_BOOT)
(void)usbd_set_protocol(iface, 1);
+#endif
maxinpktsize = 0;
sc->sc_iep_addr = sc->sc_oep_addr = -1;
Home |
Main Index |
Thread Index |
Old Index