When HZ is set to 250 (new default) or 100, the time span during which repeated
events from the device are ignored could be too small due to ms->jiffies rounding.
This causes the auto repeat to kick in early making it impossible for the user
to generate individual press/release events. Increate the timeout to compensate.
Signed-off-by: [email protected]
---
--- linux-2.6.17.orig/drivers/usb/input/ati_remote.c 2006-06-29 21:18:15.000000000 +0200
+++ linux-2.6.17/drivers/usb/input/ati_remote.c 2006-07-02 21:36:14.000000000 +0200
@@ -155,9 +155,8 @@
* events. The hardware generates 5 events for the first keypress
* and we have to take this into account for an accurate repeat
* behaviour.
- * (HZ / 20) == 50 ms and works well for me.
*/
-#define FILTER_TIME (HZ / 20)
+#define FILTER_TIME 60 /* msec */
struct ati_remote {
struct input_dev *idev;
@@ -470,7 +469,7 @@
/* Filter duplicate events which happen "too close" together. */
if ((ati_remote->old_data[0] == data[1]) &&
(ati_remote->old_data[1] == data[2]) &&
- time_before(jiffies, ati_remote->old_jiffies + FILTER_TIME)) {
+ time_before(jiffies, ati_remote->old_jiffies + msecs_to_jiffies(FILTER_TIME))) {
ati_remote->repeat_count++;
} else {
ati_remote->repeat_count = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]