Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb add a quirk for devices that need ums::sc_alwayson



details:   https://anonhg.NetBSD.org/src/rev/b83aef352670
branches:  trunk
changeset: 1023910:b83aef352670
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Oct 01 21:09:50 2021 +0000

description:
add a quirk for devices that need ums::sc_alwayson

diffstat:

 sys/dev/usb/usb_quirks.c |  21 +++++++++++++++++++--
 sys/dev/usb/usb_quirks.h |   3 ++-
 2 files changed, 21 insertions(+), 3 deletions(-)

diffs (59 lines):

diff -r 9803ba039039 -r b83aef352670 sys/dev/usb/usb_quirks.c
--- a/sys/dev/usb/usb_quirks.c  Fri Oct 01 21:03:51 2021 +0000
+++ b/sys/dev/usb/usb_quirks.c  Fri Oct 01 21:09:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_quirks.c,v 1.98 2021/08/17 22:00:32 andvar Exp $   */
+/*     $NetBSD: usb_quirks.c,v 1.99 2021/10/01 21:09:50 macallan Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $     */
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.98 2021/08/17 22:00:32 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_quirks.c,v 1.99 2021/10/01 21:09:50 macallan Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -383,6 +383,23 @@
        { UQ_DESC_CORRUPT | UQ_MISS_OUT_ACK, desc_pn533 }},
  { USB_VENDOR_SHUTTLE,         USB_PRODUCT_SHUTTLE_SCL3712,            ANY,
        { UQ_DESC_CORRUPT | UQ_MISS_OUT_ACK, desc_pn533 }},
+
+/*
+ * These cheap mice will disconnect after 60 seconds,
+ * reconnect, and then disconnect again (ad nauseum)
+ * unless it's kept open.
+ */
+ { USB_VENDOR_CHICONY,         USB_PRODUCT_CHICONY_OPTMOUSE0939,       ANY,
+       { UQ_ALWAYS_ON, NULL }},
+ { USB_VENDOR_PIXART,          USB_PRODUCT_PIXART_RPIMOUSE,            ANY,
+       { UQ_ALWAYS_ON, NULL }},
+/*
+ * The HAILUCK USB Keyboard has a built-in touchpad, which
+ * needs to be active for the keyboard to function properly.
+ */
+ { USB_VENDOR_HAILUCK,         USB_PRODUCT_HAILUCK_KEYBOARD,           ANY,
+       { UQ_ALWAYS_ON, NULL }},
+ 
  { 0, 0, 0, { 0, NULL } }
 };
 
diff -r 9803ba039039 -r b83aef352670 sys/dev/usb/usb_quirks.h
--- a/sys/dev/usb/usb_quirks.h  Fri Oct 01 21:03:51 2021 +0000
+++ b/sys/dev/usb/usb_quirks.h  Fri Oct 01 21:09:50 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_quirks.h,v 1.29 2018/11/15 02:35:23 manu Exp $     */
+/*     $NetBSD: usb_quirks.h,v 1.30 2021/10/01 21:09:50 macallan Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usb_quirks.h,v 1.9 1999/11/12 23:31:03 n_hibma Exp $  */
 
 /*
@@ -51,6 +51,7 @@
 #define UQ_APPLE_ISO   0x20000 /* force ISO layout on Apple keyboards */
 #define UQ_DESC_CORRUPT        0x40000 /* may corrupt its config descriptors */
 #define UQ_MISS_OUT_ACK        0x80000 /* may fail to ack output */
+#define UQ_ALWAYS_ON   0x100000        /* for mice that keep disconnecting */
        const usb_descriptor_t **desc;  /* Replacement for UQ_DESC_CORRUPT */
 };
 



Home | Main Index | Thread Index | Old Index