Module Name: src Committed By: jakllsch Date: Tue Jan 12 16:18:59 UTC 2010
Modified Files: src/sys/dev/usb: ums.c Log Message: Avoid treating the Griffin PowerMate knob as a ums(4). Should fix PR/19445. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/usb/ums.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/ums.c diff -u src/sys/dev/usb/ums.c:1.78 src/sys/dev/usb/ums.c:1.79 --- src/sys/dev/usb/ums.c:1.78 Wed Dec 30 20:38:47 2009 +++ src/sys/dev/usb/ums.c Tue Jan 12 16:18:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ums.c,v 1.78 2009/12/30 20:38:47 jakllsch Exp $ */ +/* $NetBSD: ums.c,v 1.79 2010/01/12 16:18:58 jakllsch Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.78 2009/12/30 20:38:47 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.79 2010/01/12 16:18:58 jakllsch Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -135,6 +135,14 @@ int size; void *desc; + /* + * Some (older) Griffin PowerMate knobs may masquerade as a + * mouse, avoid treating them as such, they have only one axis. + */ + if (uha->uaa->vendor == USB_VENDOR_GRIFFIN && + uha->uaa->product == USB_PRODUCT_GRIFFIN_POWERMATE) + return (UMATCH_NONE); + uhidev_get_report_desc(uha->parent, &desc, &size); if (!hid_is_collection(desc, size, uha->reportid, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)) &&