|
Lines 1246-1255
Link Here
|
| 1246 |
return 0; |
1246 |
return 0; |
| 1247 |
} |
1247 |
} |
| 1248 |
|
1248 |
|
|
|
1249 |
#define USB_VENDOR_ID_CHERRY 0x046a |
| 1250 |
#define USB_DEVICE_ID_CHERRY_CYMOTION 0x0023 |
| 1251 |
|
| 1249 |
static int hid_get_class_descriptor(struct usb_device *dev, int ifnum, |
1252 |
static int hid_get_class_descriptor(struct usb_device *dev, int ifnum, |
| 1250 |
unsigned char type, void *buf, int size) |
1253 |
unsigned char type, void *buf, int size) |
| 1251 |
{ |
1254 |
{ |
| 1252 |
int result, retries = 4; |
1255 |
int result, retries = 4; |
|
|
1256 |
char *p = (char*)buf; |
| 1253 |
|
1257 |
|
| 1254 |
memset(buf,0,size); // Make sure we parse really received data |
1258 |
memset(buf,0,size); // Make sure we parse really received data |
| 1255 |
|
1259 |
|
|
Lines 1259-1264
Link Here
|
| 1259 |
(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT); |
1263 |
(type << 8), ifnum, buf, size, HZ * USB_CTRL_GET_TIMEOUT); |
| 1260 |
retries--; |
1264 |
retries--; |
| 1261 |
} while (result < size && retries); |
1265 |
} while (result < size && retries); |
|
|
1266 |
|
| 1267 |
// wn_hack: patch wrong descriptor for this device |
| 1268 |
// hardware sends wrong descriptor |
| 1269 |
if (dev->descriptor.idVendor == USB_VENDOR_ID_CHERRY |
| 1270 |
&& dev->descriptor.idProduct == USB_DEVICE_ID_CHERRY_CYMOTION |
| 1271 |
&& size > 12 |
| 1272 |
&& p[11] == 0x3c |
| 1273 |
&& p[12] == 0x02) { |
| 1274 |
printk(KERN_DEBUG __FILE__ " : modifying descriptor for Cherry CyMotion keyboard \n"); |
| 1275 |
p[11] = p[16] = 0xff; |
| 1276 |
p[12] = p[17] = 0x03; |
| 1277 |
} |
| 1278 |
|
| 1262 |
return result; |
1279 |
return result; |
| 1263 |
} |
1280 |
} |
| 1264 |
|
1281 |
|
|
Lines 1425-1431
Link Here
|
| 1425 |
#define USB_VENDOR_ID_BTC 0x046e |
1442 |
#define USB_VENDOR_ID_BTC 0x046e |
| 1426 |
#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303 |
1443 |
#define USB_DEVICE_ID_BTC_KEYBOARD 0x5303 |
| 1427 |
|
1444 |
|
| 1428 |
|
|
|
| 1429 |
/* |
1445 |
/* |
| 1430 |
* Alphabetically sorted blacklist by quirk type. |
1446 |
* Alphabetically sorted blacklist by quirk type. |
| 1431 |
*/ |
1447 |
*/ |