From: sthen Date: Tue, 27 Aug 2024 12:41:18 +0000 (+0000) Subject: use UQ_ALWAYS_OPEN for various PixArt/Logitech USB mice. ok bru miod X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=aa905350146e0e75b480e46170feac67dfa34e04;p=openbsd use UQ_ALWAYS_OPEN for various PixArt/Logitech USB mice. ok bru miod Some USB mice are known to have problems if the device isn't polled regularly (seems to be something in the firmware overflows). Symptoms are frequent disconnect/reconnect cycles unless either X or wsmoused are used. jcs and kurt figured out a related problem with the Surface Type Cover and added UQ_ALWAYS_OPEN in 2021 (similar to linux HID_QUIRK_ALWAYS_POLL and NetBSD UQ_ALWAYS_ON) which also works around the problem with these mice. I've added the list of vid/pid from NetBSD, plus the mouse which I've been having problems with which they didn't have. --- diff --git a/sys/dev/usb/usb_quirks.c b/sys/dev/usb/usb_quirks.c index be65ad08602..569c70a9ab4 100644 --- a/sys/dev/usb/usb_quirks.c +++ b/sys/dev/usb/usb_quirks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_quirks.c,v 1.78 2021/03/24 02:49:57 jcs Exp $ */ +/* $OpenBSD: usb_quirks.c,v 1.79 2024/08/27 12:41:18 sthen Exp $ */ /* $NetBSD: usb_quirks.c,v 1.45 2003/05/10 17:47:14 hamajima Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.30 2003/01/02 04:15:55 imp Exp $ */ @@ -154,12 +154,24 @@ const struct usbd_quirk_entry { ANY, { UQ_MS_VENDOR_BUTTONS }}, /* Devices that need their data pipe held open */ + { USB_VENDOR_CHICONY, USB_PRODUCT_CHICONY_OPTMOUSE, + ANY, { UQ_ALWAYS_OPEN }}, { USB_VENDOR_HAILUCK, USB_PRODUCT_HAILUCK_KEYBOARD, ANY, { UQ_ALWAYS_OPEN }}, + { USB_VENDOR_LENOVO, USB_PRODUCT_LENOVO_OPTUSBMOUSE, + ANY, { UQ_ALWAYS_OPEN }}, + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_B100_1, + ANY, { UQ_ALWAYS_OPEN }}, + { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_B100_2, + ANY, { UQ_ALWAYS_OPEN }}, + { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_PIXARTMOUSE, + ANY, { UQ_ALWAYS_OPEN }}, { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_TYPECOVER, - ANY, { UQ_ALWAYS_OPEN }}, + ANY, { UQ_ALWAYS_OPEN }}, { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_TYPECOVER2, - ANY, { UQ_ALWAYS_OPEN }}, + ANY, { UQ_ALWAYS_OPEN }}, + { USB_VENDOR_PIXART, USB_PRODUCT_PIXART_RPIMOUSE, + ANY, { UQ_ALWAYS_OPEN }}, { 0, 0, 0, { 0 } } };