Re: usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk

2012-10-13 Thread Vitaly Magerya
Hans Petter Selasky hsela...@c2i.net wrote:
  Will it be possible to also MFC this change so it would
  get into the upcoming 9.1-RELEASE?

 Yes, if you remind me in a week or so.

I see that you committed the change to both head and stable/9 (thanks
for that); will it be possible to get it into releng/9.1 too?
___
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


Re: usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk

2012-09-18 Thread Vitaly Magerya
The following reply was made to PR usb/171721; it has been noted by GNATS.

From: Vitaly Magerya vmage...@gmail.com
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk
Date: Tue, 18 Sep 2012 13:41:20 +0300

 Will it be possible to also MFC this change so it would
 get into the upcoming 9.1-RELEASE?
___
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


Re: usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk

2012-09-18 Thread Hans Petter Selasky
On Tuesday 18 September 2012 12:50:10 Vitaly Magerya wrote:
 The following reply was made to PR usb/171721; it has been noted by GNATS.
 
 From: Vitaly Magerya vmage...@gmail.com
 To: bug-follo...@freebsd.org
 Cc:
 Subject: Re: usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE
 quirk Date: Tue, 18 Sep 2012 13:41:20 +0300
 
  Will it be possible to also MFC this change so it would
  get into the upcoming 9.1-RELEASE?

Yes, if you remind me in a week or so.

--HPS
___
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


usb/171721: [patch] usb_quirk(4), ums(4): add UQ_UMS_IGNORE quirk

2012-09-17 Thread Vitaly Magerya

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