From owner-freebsd-usb@FreeBSD.ORG Fri Jul 19 16:20:00 2013 Return-Path: Delivered-To: freebsd-usb@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E0971FC8 for ; Fri, 19 Jul 2013 16:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id C72D6294 for ; Fri, 19 Jul 2013 16:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6JGK0xZ063248 for ; Fri, 19 Jul 2013 16:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6JGK0fQ063224; Fri, 19 Jul 2013 16:20:00 GMT (envelope-from gnats) Resent-Date: Fri, 19 Jul 2013 16:20:00 GMT Resent-Message-Id: <201307191620.r6JGK0fQ063224@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yamagi Burmeister Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 65FF3F91 for ; Fri, 19 Jul 2013 16:15:23 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id 489BE277 for ; Fri, 19 Jul 2013 16:15:23 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6JGFMgi034792 for ; Fri, 19 Jul 2013 16:15:22 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6JGFMaI034789; Fri, 19 Jul 2013 16:15:22 GMT (envelope-from nobody) Message-Id: <201307191615.r6JGFMaI034789@oldred.freebsd.org> Date: Fri, 19 Jul 2013 16:15:22 GMT From: Yamagi Burmeister To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: usb/180657: [PATCH] Filco Majestouch 2 keyboard recognized as keyboard and mouse X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jul 2013 16:20:00 -0000 >Number: 180657 >Category: usb >Synopsis: [PATCH] Filco Majestouch 2 keyboard recognized as keyboard and mouse >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 19 16:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Yamagi Burmeister >Release: FreeBSD 9.2-BETA1 r253470 >Organization: >Environment: FreeBSD happy.home.yamagi.org 9.2-BETA1 FreeBSD 9.2-BETA1 #0 r253470M: Fri Jul 19 17:22:08 CEST 2013 root@happy.home.yamagi.org:/usr/obj/usr/src/sys/HAPPY amd64 >Description: The "Filco Majestouch 2" keyboard (this is the version with german layout) is recognized as keyboard and mouse, despite being a normal keyboard without any bells and whistles. As soon as moused(8) opens the corresponding /dev/ums device the keyboard becomes unuseable. The problem can be seen by usbconfig show_ifdrv: ugen3.3: at usbus3, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) ugen3.3.0: ukbd0: ugen3.3.1: ums1: The attached patch solves the problem by adding an UQ_UMS_IGNORE quirk for this keyboard to usb_quirk.ko. I've added a new vendor "FILCO" to usbdevs. It was added at the end of the vendor list cause I was unable to see how that list is sorted. I've also added a new device "MAJESTOUCH2" to the list. A revision range from 0x0000 to 0xffff may be to big. This device has a bcdDevice field of 0x0101. The complete usbconfig dump_device_desc output: ugen3.3: at usbus3, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA) bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0008 idVendor = 0x04d9 idProduct = 0x1818 bcdDevice = 0x0101 iManufacturer = 0x0000 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 The attached patch is against 9.2-BETA1 r253470. >How-To-Repeat: Attach a "Filco Majestouch 2" to the computer and start moused(8) for the new /dev/ums device. >Fix: Index: usbdevs =================================================================== --- usbdevs (revision 253470) +++ usbdevs (working copy) @@ -762,6 +762,7 @@ vendor HP2 0xf003 Hewlett Packard vendor LOGILINK 0xfc08 LogiLink vendor USRP 0xfffe GNU Radio USRP +vendor FILCO 0x04d9 Filco /* * List of known products. Grouped by vendor. @@ -1694,6 +1695,9 @@ /* FIC / OpenMoko */ product FIC NEO1973_DEBUG 0x5118 FTDI compatible adapter +/* Filco */ +product FILCO MAJESTOUCH2 0x1818 Majestouch-2 Keyboard + /* Fossil, Inc products */ product FOSSIL WRISTPDA 0x0002 Wrist PDA Index: quirk/usb_quirk.c =================================================================== --- quirk/usb_quirk.c (revision 253470) +++ quirk/usb_quirk.c (working copy) @@ -128,6 +128,8 @@ USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Filco Majestouch 2 is sometimes detected as mouse and keyboard */ + USB_QUIRK(FILCO, MAJESTOUCH2, 0x0000, 0xffff, UQ_UMS_IGNORE), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), >Release-Note: >Audit-Trail: >Unformatted: