diff --git a/linux-usbhid-mousepoll-all.patch b/linux-usbhid-mousepoll-all.patch deleted file mode 100644 index 6b6810d..0000000 --- a/linux-usbhid-mousepoll-all.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- a/linux-4.11-original/drivers/hid/usbhid/hid-core.c -+++ b/linux-4.11/drivers/hid/usbhid/hid-core.c -@@ -1081,9 +1081,14 @@ static int usbhid_start(struct hid_device *hid) - hid->name, endpoint->bInterval, interval); - } - -- /* Change the polling interval of mice. */ -- if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0) -+ /* Change the polling interval of mice. -+ EDIT 2016-09-03: poll everything with mousepoll -+ */ -+ if (/*hid->collection->usage == HID_GD_MOUSE &&*/ hid_mousepoll_interval > 0) { -+ printk(KERN_INFO "%s: Changed interval to mousepoll: %d -> %d\n", -+ hid->name, interval, hid_mousepoll_interval); - interval = hid_mousepoll_interval; -+ } - diff --git a/linux-usbhid-otherhidpoll.patch b/linux-usbhid-otherhidpoll.patch new file mode 100644 index 0000000..cd90719 --- /dev/null +++ b/linux-usbhid-otherhidpoll.patch @@ -0,0 +1,28 @@ +*** drivers/hid/usbhid/hid-core.c 2017-10-26 19:33:36.658828648 +0100 +--- drivers/hid/usbhid/hid-core.c.p 2017-10-26 19:35:59.588994247 +0100 +*************** +*** 56,61 **** +--- 56,65 ---- + module_param_named(jspoll, hid_jspoll_interval, uint, 0644); + MODULE_PARM_DESC(jspoll, "Polling interval of joysticks"); + ++ static unsigned int hid_otherhid_interval; ++ module_param_named(otherhidpoll, hid_otherhid_interval, uint, 0644); ++ MODULE_PARM_DESC(otherhidpoll, "Polling interval of all non-mice/joystick hid devices"); ++ + static unsigned int ignoreled; + module_param_named(ignoreled, ignoreled, uint, 0644); + MODULE_PARM_DESC(ignoreled, "Autosuspend with active leds"); +*************** +*** 1105,1110 **** +--- 1109,1118 ---- + if (hid_jspoll_interval > 0) + interval = hid_jspoll_interval; + break; ++ default: ++ if (hid_otherhid_interval > 0) ++ interval = hid_otherhid_interval; ++ break; + } + + ret = -ENOMEM; diff --git a/notes.txt b/notes.txt index b5c5812..0c55104 100644 --- a/notes.txt +++ b/notes.txt @@ -8,4 +8,8 @@ In this case the stable release wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.13.9.tar.xz # Patch the source # +cd linux-X.X.X +patch -p1 < ../linux-usbhid-otherhidpoll.patch +# For some reason this patch doesn't auto-apply correctly +