diff -u -r linux-2.6-stock/drivers/hid/usbhid/hid-core.c linux-2.6/drivers/hid/usbhid/hid-core.c --- linux-2.6-stock/drivers/hid/usbhid/hid-core.c 2009-03-13 08:28:42.000000000 -0400 +++ linux-2.6/drivers/hid/usbhid/hid-core.c 2009-03-13 08:05:48.000000000 -0400 @@ -697,6 +697,35 @@ usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma); } +/* + * Sending HID_REQ_SET_REPORT changes the operation mode of the + * Microchip controller in the Raon Everun to "operational". Without + * this, the keyboard/mouse/touchpad will not send any events + */ +static void hid_fixup_microchip_exphid(struct usb_device *dev, int ifnum) +{ + int result; + char *buf = kmalloc(1, GFP_KERNEL); + + if (!buf) + return; + + buf[0] = 0; + dbg_hid("exphid quirk, iface=%d", ifnum); + /* only do this for interface 0, the keyboard */ + if (ifnum == 0) { + result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), + HID_REQ_SET_REPORT, + USB_TYPE_CLASS | USB_RECIP_INTERFACE, + 0x0200, 0x00, buf, 1, USB_CTRL_GET_TIMEOUT); + + if (result < 0) + err_hid("%s failed: %d\n", __func__, result); + } + + kfree(buf); +} + static int usbhid_parse(struct hid_device *hid) { struct usb_interface *intf = to_usb_interface(hid->dev.parent); @@ -772,6 +801,7 @@ return ret; } + static int usbhid_start(struct hid_device *hid) { struct usb_interface *intf = to_usb_interface(hid->dev.parent); @@ -801,6 +831,10 @@ goto fail; } + if (hid->quirks & HID_QUIRK_MICROCHIP_EXPHID) + hid_fixup_microchip_exphid(interface_to_usbdev(intf), + intf->cur_altsetting->desc.bInterfaceNumber); + for (n = 0; n < interface->desc.bNumEndpoints; n++) { struct usb_endpoint_descriptor *endpoint; int pipe; @@ -1075,10 +1109,16 @@ if (!test_bit(HID_STARTED, &usbhid->iofl)) return 0; + if (hid->quirks & HID_QUIRK_MICROCHIP_EXPHID) + hid_fixup_microchip_exphid(interface_to_usbdev(intf), + intf->cur_altsetting->desc.bInterfaceNumber); + clear_bit(HID_SUSPENDED, &usbhid->iofl); usbhid->retry_delay = 0; status = hid_start_in(hid); dev_dbg(&intf->dev, "resume status %d\n", status); + + return status; } diff -u -r linux-2.6-stock/drivers/hid/usbhid/hid-quirks.c linux-2.6/drivers/hid/usbhid/hid-quirks.c --- linux-2.6-stock/drivers/hid/usbhid/hid-quirks.c 2009-03-13 08:28:42.000000000 -0400 +++ linux-2.6/drivers/hid/usbhid/hid-quirks.c 2009-03-13 08:05:48.000000000 -0400 @@ -61,6 +61,8 @@ { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_WISEGROUP_LTD2, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_MICROCHIP_EXPHID, HID_QUIRK_MICROCHIP_EXPHID }, + { 0, 0 } };