diff -Naur linux-2.6.11-rc4-mm1/drivers/usb/input/Kconfig linux-2.6.11-rc4-mm1-chmp5/drivers/usb/input/Kconfig --- linux-2.6.11-rc4-mm1/drivers/usb/input/Kconfig 2005-02-23 10:12:36.068157648 -0800 +++ linux-2.6.11-rc4-mm1-chmp5/drivers/usb/input/Kconfig 2005-02-23 16:42:46.854567560 -0800 @@ -24,6 +24,38 @@ To compile this driver as a module, choose M here: the module will be called usbhid. +config USB_HID_MOUSE_POLLING_INTERVAL + int "USB HID Mouse Interrupt Polling Interval" + default 10 + depends on USB_HID + help + The "USB HID Mouse Interrupt Polling Interval" is the interval, at + which your USB HID mouse is to be polled at. The interval is + specified in milliseconds. + + Decreasing the interval will, of course, give you a much more + precise mouse. + + Generally speaking, a polling interval of 2 ms should be more than + enough for most people, and is great for gaming and other things + that require high precision. + + An interval lower than the default is not guaranteed work on your + specific piece of hardware. If you want to play it safe, don't + change this value. + + Now, if you indeed want to feel the joy of a precise mouse, the + following mice are known to work without problems, when the interval + is set to at least 2 ms: + + * Logitech's MX-family + * Logitech Mouse Man Dual Optical + * Logitech iFeel + * Microsoft Intellimouse Explorer + * Microsoft Intellimouse Optical 1.1 + + If unsure, keep it at 10 ms. + comment "Input core support is needed for USB HID input layer or HIDBP support" depends on USB_HID && INPUT=n diff -Naur linux-2.6.11-rc4-mm1/drivers/usb/input/hid-core.c linux-2.6.11-rc4-mm1-chmp5/drivers/usb/input/hid-core.c --- linux-2.6.11-rc4-mm1/drivers/usb/input/hid-core.c 2005-02-23 10:19:33.337723032 -0800 +++ linux-2.6.11-rc4-mm1-chmp5/drivers/usb/input/hid-core.c 2005-02-23 16:45:08.655010616 -0800 @@ -43,6 +43,7 @@ #define DRIVER_DESC "USB HID core driver" #define DRIVER_LICENSE "GPL" +static unsigned int hid_mousepoll_interval = CONFIG_USB_HID_MOUSE_POLLING_INTERVAL; static char *hid_types[] = {"Device", "Pointer", "Mouse", "Device", "Joystick", "Gamepad", "Keyboard", "Keypad", "Multi-Axis Controller"}; /* @@ -1689,6 +1690,11 @@ if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */ continue; + /* Change the polling interval of mice. */ + if (hid->collection->usage == HID_GD_MOUSE + && hid_mousepoll_interval > 0) + endpoint->bInterval = hid_mousepoll_interval; + /* handle potential highspeed HID correctly */ interval = endpoint->bInterval; if (dev->speed == USB_SPEED_HIGH) @@ -1937,6 +1943,7 @@ module_init(hid_init); module_exit(hid_exit); +module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC);