Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jul 2013 16:15:22 GMT
From:      Yamagi Burmeister <yamagi@yamagi.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   usb/180657: [PATCH] Filco Majestouch 2 keyboard recognized as keyboard and mouse
Message-ID:  <201307191615.r6JGFMaI034789@oldred.freebsd.org>
Resent-Message-ID: <201307191620.r6JGK0fQ063224@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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: <USB Keyboard vendor 0x04d9> at usbus3, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen3.3.0: ukbd0: <vendor 0x04d9 USB Keyboard, class 0/0, rev 1.10/1.01, addr 3>
ugen3.3.1: ums1: <vendor 0x04d9 USB Keyboard, class 0/0, rev 1.10/1.01, addr 3>

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: <USB Keyboard vendor 0x04d9> 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  <no string>
  iProduct = 0x0002  <USB Keyboard>
  iSerialNumber = 0x0000  <no string>
  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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307191615.r6JGFMaI034789>