Number: 171721
Category: usb
Synopsis: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk
Confidential: no
Severity: non-critical
Priority: low
Responsible:freebsd-usb
State: open
Quarter:
Keywords:
Date-Required:
Class: change-request
Submitter-Id: current-users
Arrival-Date: Mon Sep 17 18:10:04 UTC 2012
Closed-Date:
Last-Modified:
Originator: Vitaly Magerya
Release:
Organization:
Environment:
Description:
It appears that we have USB quirks UQ_HID_IGNORE and UQ_KBD_IGNORE
that make uhid(4) and ukbd(4) to ignore a perticular device. I
propose adding UQ_UMS_IGNORE that instruct ums(4) to ignore a
device.
The motivation for this is hardware that lists a bogus
Generic_Desktop:Mouse usage in it's record descriptor thus fooling
ums(4) into thinking that it is a mouse, while in reality it is
something other and should be handled by uhid(4) instead (I have
a graphics tablet that does this).
How-To-Repeat:
Fix:
I'm attaching a patch against head.
Patch attached with submission follows:
Index: share/man/man4/usb_quirk.4
===
--- share/man/man4/usb_quirk.4 (revision 240607)
+++ share/man/man4/usb_quirk.4 (working copy)
@@ -66,6 +66,8 @@
device should be ignored by kbd class
.It UQ_KBD_BOOTPROTO
device should set the boot protocol
+.It UQ_UMS_IGNORE
+device should be ignored by ums class
.It UQ_MS_BAD_CLASS
doesn't identify properly
.It UQ_MS_LEADING_BYTE
Index: sys/dev/usb/quirk/usb_quirk.c
===
--- sys/dev/usb/quirk/usb_quirk.c (revision 240607)
+++ sys/dev/usb/quirk/usb_quirk.c (working copy)
@@ -494,6 +494,7 @@
[UQ_HID_IGNORE] = UQ_HID_IGNORE,
[UQ_KBD_IGNORE] = UQ_KBD_IGNORE,
[UQ_KBD_BOOTPROTO] = UQ_KBD_BOOTPROTO,
+ [UQ_UMS_IGNORE] = UQ_UMS_IGNORE,
[UQ_MS_BAD_CLASS] = UQ_MS_BAD_CLASS,
[UQ_MS_LEADING_BYTE]= UQ_MS_LEADING_BYTE,
[UQ_MS_REVZ]= UQ_MS_REVZ,
Index: sys/dev/usb/quirk/usb_quirk.h
===
--- sys/dev/usb/quirk/usb_quirk.h (revision 240607)
+++ sys/dev/usb/quirk/usb_quirk.h (working copy)
@@ -29,7 +29,7 @@
enum {
/*
-* Keep in sync with theusb_quirk_str usb_quirk.c, and with the
+* Keep in sync with usb_quirk_str in usb_quirk.c, and with
* share/man/man4/usb_quirk.4
*/
UQ_NONE,/* not a valid quirk */
@@ -49,6 +49,7 @@
UQ_HID_IGNORE, /* device should be ignored by hid class */
UQ_KBD_IGNORE, /* device should be ignored by kbd class */
UQ_KBD_BOOTPROTO, /* device should set the boot protocol */
+ UQ_UMS_IGNORE, /* device should be ignored by ums class */
UQ_MS_BAD_CLASS,/* doesn't identify properly */
UQ_MS_LEADING_BYTE, /* mouse sends an unknown leading byte */
UQ_MS_REVZ, /* mouse has Z-axis reversed */
Index: sys/dev/usb/input/ums.c
===
--- sys/dev/usb/input/ums.c (revision 240607)
+++ sys/dev/usb/input/ums.c (working copy)
@@ -381,6 +381,9 @@
if (uaa-info.bInterfaceClass != UICLASS_HID)
return (ENXIO);
+ if (usb_test_quirk(uaa, UQ_UMS_IGNORE))
+ return (ENXIO);
+
if ((uaa-info.bInterfaceSubClass == UISUBCLASS_BOOT)
(uaa-info.bInterfaceProtocol == UIPROTO_MOUSE))
return (BUS_PROBE_DEFAULT);
Release-Note:
Audit-Trail:
Unformatted:
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org