diff -urN oldtree/drivers/usb/input/Kconfig newtree/drivers/usb/input/Kconfig --- oldtree/drivers/usb/input/Kconfig 2006-09-29 14:03:21.000000000 -0400 +++ newtree/drivers/usb/input/Kconfig 2006-09-30 07:42:28.000000000 -0400 @@ -24,6 +24,49 @@ To compile this driver as a module, choose M here: the module will be called usbhid. +config USB_HID_MOUSE_POLLING + bool "USB HID Mouse Interrupt Polling" + default n + depends on USB_HID + help + This option enables USB HID mouse polling instead of an event + based system. This option is only recommended for badly designed + USB chipsets. + + If unsure, say N. + +config USB_HID_MOUSE_POLLING_INTERVAL + int "USB HID Mouse Interrupt Polling Interval" + default 10 + depends on USB_HID_MOUSE_POLLING + 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 10ms 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 -urN oldtree/drivers/usb/input/hid-core.c newtree/drivers/usb/input/hid-core.c --- oldtree/drivers/usb/input/hid-core.c 2006-09-29 14:03:21.000000000 -0400 +++ newtree/drivers/usb/input/hid-core.c 2006-09-30 07:42:28.000000000 -0400 @@ -50,7 +50,12 @@ * Module parameters. */ -static unsigned int hid_mousepoll_interval; +#if defined(CONFIG_USB_HID_MOUSE_POLLING) +int hid_mousepoll_interval __read_mostly = CONFIG_USB_HID_MOUSE_POLLING_INTERVAL; +#else +int hid_mousepoll_interval __read_mostly = 0; +#endif + module_param_named(mousepoll, hid_mousepoll_interval, uint, 0644); MODULE_PARM_DESC(mousepoll, "Polling interval of mice"); diff -urN oldtree/include/linux/sysctl.h newtree/include/linux/sysctl.h --- oldtree/include/linux/sysctl.h 2006-09-30 07:21:39.000000000 -0400 +++ newtree/include/linux/sysctl.h 2006-09-30 07:42:28.000000000 -0400 @@ -158,6 +158,7 @@ KERN_STRCS_RR_SLICE=80, /* alter value of min RR slice */ KERN_STRCS_RR_FACTOR=81, /* factor for default RR slice */ KERN_FBSPLASH=82, /* string: path to fbsplash helper */ + KERN_USB_POLLING=83, /* USB polling rate */ }; diff -urN oldtree/kernel/sysctl.c newtree/kernel/sysctl.c --- oldtree/kernel/sysctl.c 2006-09-30 07:21:39.000000000 -0400 +++ newtree/kernel/sysctl.c 2006-09-30 07:42:28.000000000 -0400 @@ -85,6 +85,11 @@ static int _s_maxfactor = 50; #endif +/* USB Mouse Polling */ +#if defined(CONFIG_USB_HID) +extern int hid_mousepoll_interval; +#endif + #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) int unknown_nmi_panic; int nmi_watchdog_enabled; @@ -1090,6 +1095,17 @@ .proc_handler = &proc_dointvec, }, #endif +#ifdef CONFIG_USB_HID + { + .ctl_name = KERN_USB_POLLING, + .procname = "hid_mousepoll_interval", + .data = &hid_mousepoll_interval, + .maxlen = sizeof (hid_mousepoll_interval), + .mode = 0644, + .proc_handler = &proc_dointvec_minmax, + .strategy = &sysctl_intvec, + }, +#endif { .ctl_name = 0 } };