[kernel/f19] Add patch to fix Synaptics touchscreens and HID rmi driver (rhbz 1089583)

Josh Boyer jwboyer at fedoraproject.org
Tue Apr 22 17:08:43 UTC 2014


commit 90183957428d58979d34f77462f22521d8afeeaf
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Tue Apr 22 13:01:08 2014 -0400

    Add patch to fix Synaptics touchscreens and HID rmi driver (rhbz 1089583)

 ...o-not-handle-touchscreens-through-hid-rmi.patch |  102 ++++++++++++++++++++
 kernel.spec                                        |   14 ++-
 2 files changed, 113 insertions(+), 3 deletions(-)
---
diff --git a/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch b/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
new file mode 100644
index 0000000..e9015c9
--- /dev/null
+++ b/0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
@@ -0,0 +1,102 @@
+Bugzilla: 1089583
+Upstream-status: Sent for 3.15
+
+From 4cebb979af8d7bd1ec463406eaf57a44bd5b9f04 Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <benjamin.tissoires at redhat.com>
+Date: Tue, 22 Apr 2014 11:21:00 -0400
+Subject: [PATCH] HID: rmi: do not handle touchscreens through hid-rmi
+
+Currently, hid-rmi drives every Synaptics product, but the touchscreens
+on the Windows tablets should be handled through hid-multitouch.
+
+Instead of providing a long list of PIDs, rely on the scan_report
+capability to detect which should go to hid-multitouch, and which
+should not go to hid-rmi.
+
+We introduce a generic HID_GROUP_HAVE_SPECIAL_DRIVER which can be reused
+amoung other drivers if they want to have a catch rule but still
+have multitouch devices handled through hid-multitouch.
+
+related bug:
+https://bugzilla.kernel.org/show_bug.cgi?id=74241
+https://bugzilla.redhat.com/show_bug.cgi?id=1089583
+
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires at redhat.com>
+---
+ drivers/hid/hid-core.c | 10 ++++++++--
+ drivers/hid/hid-rmi.c  |  6 ++++--
+ include/linux/hid.h    | 13 +++++++++++++
+ 3 files changed, 25 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
+index 6ba2fd0..ea18639 100644
+--- a/drivers/hid/hid-core.c
++++ b/drivers/hid/hid-core.c
+@@ -776,6 +776,14 @@ static int hid_scan_report(struct hid_device *hid)
+ 	    (hid->group == HID_GROUP_MULTITOUCH))
+ 		hid->group = HID_GROUP_MULTITOUCH_WIN_8;
+ 
++	/*
++	* Vendor specific handlings
++	*/
++	if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
++	    (hid->group == HID_GROUP_GENERIC))
++		/* hid-rmi should take care of them, not hid-generic */
++		hid->group = HID_GROUP_HAVE_SPECIAL_DRIVER;
++
+ 	vfree(parser);
+ 	return 0;
+ }
+@@ -1840,8 +1848,6 @@ static const struct hid_device_id hid_have_special_driver[] = {
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) },
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) },
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
+-	{ HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
+-	{ HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_THINGM, USB_DEVICE_ID_BLINK1) },
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
+ 	{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
+diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c
+index a4f04d4..a97a373 100644
+--- a/drivers/hid/hid-rmi.c
++++ b/drivers/hid/hid-rmi.c
+@@ -863,8 +863,10 @@ static void rmi_remove(struct hid_device *hdev)
+ }
+ 
+ static const struct hid_device_id rmi_id[] = {
+-	{ HID_I2C_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
+-	{ HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
++	{ HID_DEVICE(BUS_I2C, HID_GROUP_HAVE_SPECIAL_DRIVER,
++		USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
++	{ HID_DEVICE(BUS_USB, HID_GROUP_HAVE_SPECIAL_DRIVER,
++		USB_VENDOR_ID_SYNAPTICS, HID_ANY_ID) },
+ 	{ }
+ };
+ MODULE_DEVICE_TABLE(hid, rmi_id);
+diff --git a/include/linux/hid.h b/include/linux/hid.h
+index 1b5f1e9..2fdd612 100644
+--- a/include/linux/hid.h
++++ b/include/linux/hid.h
+@@ -299,6 +299,19 @@ struct hid_item {
+ #define HID_GROUP_MULTITOUCH			0x0002
+ #define HID_GROUP_SENSOR_HUB			0x0003
+ #define HID_GROUP_MULTITOUCH_WIN_8		0x0004
++#define HID_GROUP_HAVE_SPECIAL_DRIVER		0xffff
++/*
++ * HID_GROUP_HAVE_SPECIAL_DRIVER should be used when the device needs to be
++ * scanned in case it is handled by either hid-multitouch, hid-generic,
++ * hid-sensor-hub or any other generic hid driver.
++ *
++ * Devices declared in hid_have_special_driver[] in hid-core.c can use
++ * HID_GROUP_ANY instead because there will be not overlap between their
++ * specific driver and a generic one.
++ *
++ * Note: HID_GROUP_ANY is declared in linux/mod_devicetable.h
++ * and has a value of 0x0000
++ */
+ 
+ /*
+  * This is the global environment of the parser. This information is
+-- 
+1.9.0
+
diff --git a/kernel.spec b/kernel.spec
index 9bb666b..f5be5b7 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -765,9 +765,6 @@ Patch25055: lib-percpu_counter.c-fix-bad-percpu-counter-state-du.patch
 #CVE-2014-0155 rhbz 1081589 1085016
 Patch25057: KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch
 
-#rhbz 1048314
-Patch25058: 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch
-
 #CVE-2014-2851 rhbz 1086730 1087420
 Patch25059: net-ipv4-current-group_info-should-be-put-after-using.patch
 
@@ -777,6 +774,12 @@ Patch25060: 0001-synaptics-Add-min-max-quirk-for-ThinkPad-T431s-L440-.patch
 #rhbz 1071914
 Patch25063: USB-serial-ftdi_sio-add-id-for-Brainboxes-serial-car.patch
 
+#rhbz 1048314
+Patch25062: 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch
+
+#rhbz 1089583
+Patch25064: 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1490,6 +1493,8 @@ ApplyPatch KVM-ioapic-fix-assignment-of-ioapic-rtc_status-pending_eoi.patch
 
 #rhbz 1048314
 ApplyPatch 0001-HID-rmi-introduce-RMI-driver-for-Synaptics-touchpads.patch
+#rhbz 1089583
+ApplyPatch 0001-HID-rmi-do-not-handle-touchscreens-through-hid-rmi.patch
 
 #CVE-2014-2851 rhbz 1086730 1087420
 ApplyPatch net-ipv4-current-group_info-should-be-put-after-using.patch
@@ -2312,6 +2317,9 @@ fi
 # and build.
 
 %changelog
+* Tue Apr 22 2014 Josh Boyer <jwboyer at fedoraproject.org>
+- Add patch to fix Synaptics touchscreens and HID rmi driver (rhbz 1089583)
+
 * Mon Apr 21 2014 Josh Boyer <jwboyer at fedoraproject.org>
 - Fix Brainboxes Express Cards (rhbz 1071914)
 


More information about the scm-commits mailing list