Bugzilla – Attachment 46790 Details for
Bug 106050
Lacking support for Cherry CyMotion Master Linux
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
patch to enable all keys of the Cymotion keyboard
kernel_cymotion.diff (text/plain), 1.92 KB, created by
Forgotten User v5inq2MBSE
on 2005-08-21 16:14:21 UTC
(
hide
)
Description:
patch to enable all keys of the Cymotion keyboard
Filename:
MIME Type:
Creator:
Forgotten User v5inq2MBSE
Created:
2005-08-21 16:14:21 UTC
Size:
1.92 KB
patch
obsolete
>--- linux/drivers/usb/input/hid-input.c.orig 2005-07-23 02:41:06.000000000 +0200 >+++ linux/drivers/usb/input/hid-input.c 2005-08-18 20:36:52.000000000 +0200 >@@ -270,6 +270,16 @@ > case 0x227: map_key_clear(KEY_REFRESH); break; > case 0x22a: map_key_clear(KEY_BOOKMARKS); break; > case 0x238: map_rel(REL_HWHEEL); break; >+ >+ case 0x233: map_key_clear(KEY_SCROLLUP); break; >+ case 0x234: map_key_clear(KEY_SCROLLDOWN); break; >+ >+ case 0x301: map_key_clear(KEY_PROG1); break; >+ case 0x302: map_key_clear(KEY_PROG2); break; >+ case 0x303: map_key_clear(KEY_PROG3); break; >+ >+ case 0x279: map_key_clear(KEY_AGAIN); break; >+ > default: goto unknown; > } > break; >--- linux/drivers/usb/input/hid-core.c.orig 2005-07-23 02:41:06.000000000 +0200 >+++ linux/drivers/usb/input/hid-core.c 2005-08-18 20:21:29.000000000 +0200 >@@ -1246,10 +1246,14 @@ > return 0; > } > >+#define USB_VENDOR_ID_CHERRY 0x046a >+#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 >+ > static int hid_get_class_descriptor(struct usb_device *dev, int ifnum, > unsigned char type, void *buf, int size) > { > int result, retries = 4; >+ char *p = (char*)buf; > > memset(buf,0,size); // Make sure we parse really received data > >@@ -1259,6 +1263,19 @@ > (type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT); > retries--; > } while (result < size && retries); >+ >+ // wn_hack: patch wrong descriptor for this device >+ // hardware sends wrong descriptor >+ if (dev->descriptor.idVendor == USB_VENDOR_ID_CHERRY >+ && dev->descriptor.idProduct == USB_DEVICE_ID_CHERRY_CYMOTION >+ && size > 12 >+ && p[11] == 0x3c >+ && p[12] == 0x02) { >+ printk(KERN_DEBUG __FILE__ " : modifying descriptor for Cherry CyMotion keyboard \n"); >+ p[11] = p[16] = 0xff; >+ p[12] = p[17] = 0x03; >+ } >+ > return result; > } > >@@ -1425,7 +1442,6 @@ > #define USB_VENDOR_ID_BTC 0x046e > #define USB_DEVICE_ID_BTC_KEYBOARD 0x5303 > >- > /* > * Alphabetically sorted blacklist by quirk type. > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 106050
: 46790 |
46791
|
57186