Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb I have a cheap USB optical mouse (CHICONY produc...
details: https://anonhg.NetBSD.org/src/rev/47be27328dd6
branches: trunk
changeset: 951486:47be27328dd6
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Feb 03 23:26:08 2021 +0000
description:
I have a cheap USB optical mouse (CHICONY product 0x0939, also known
as "PixArt USB Optical Mouse") that likes to disconnect after 60 seconds
and then reattach 2 seconds later (ad nauseum) unless it's kept open,
so use the "always open" quirk on that device as well.
diffstat:
sys/dev/usb/ums.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r c6109fbd1e39 -r 47be27328dd6 sys/dev/usb/ums.c
--- a/sys/dev/usb/ums.c Wed Feb 03 23:24:07 2021 +0000
+++ b/sys/dev/usb/ums.c Wed Feb 03 23:26:08 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ums.c,v 1.99 2020/10/10 21:47:42 jmcneill Exp $ */
+/* $NetBSD: ums.c,v 1.100 2021/02/03 23:26:08 thorpej Exp $ */
/*
* Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.99 2020/10/10 21:47:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.100 2021/02/03 23:26:08 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -210,6 +210,16 @@
sc->sc_alwayson = true;
}
+ if (uha->uiaa->uiaa_vendor == USB_VENDOR_CHICONY &&
+ uha->uiaa->uiaa_product == USB_PRODUCT_CHICONY_OPTMOUSE0939) {
+ /*
+ * This cheap mouse will disconnect after 60 seconds,
+ * reconnect, and then disconnect again (ad nauseum)
+ * unless it's kept open.
+ */
+ sc->sc_alwayson = true;
+ }
+
tpcalib_init(&sc->sc_ms.sc_tpcalib);
/* calibrate the pointer if it reports absolute events */
Home |
Main Index |
Thread Index |
Old Index