]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Mar 2014 23:28:31 +0000 (16:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Mar 2014 23:28:31 +0000 (16:28 -0700)
added patches:
input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch
input-synaptics-add-manual-min-max-quirk.patch
x86-fix-boot-on-uniprocessor-systems.patch

queue-3.4/input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch [new file with mode: 0644]
queue-3.4/input-synaptics-add-manual-min-max-quirk.patch [new file with mode: 0644]
queue-3.4/series
queue-3.4/x86-fix-boot-on-uniprocessor-systems.patch [new file with mode: 0644]

diff --git a/queue-3.4/input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch b/queue-3.4/input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch
new file mode 100644 (file)
index 0000000..90fab6e
--- /dev/null
@@ -0,0 +1,37 @@
+From 8a0435d958fb36d93b8df610124a0e91e5675c82 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede@redhat.com>
+Date: Fri, 28 Mar 2014 01:01:38 -0700
+Subject: Input: synaptics - add manual min/max quirk for ThinkPad X240
+
+From: Hans de Goede <hdegoede@redhat.com>
+
+commit 8a0435d958fb36d93b8df610124a0e91e5675c82 upstream.
+
+This extends Benjamin Tissoires manual min/max quirk table with support for
+the ThinkPad X240.
+
+Signed-off-by: Hans de Goede <hdegoede@redhat.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/synaptics.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -1434,6 +1434,14 @@ static const struct dmi_system_id min_ma
+               .driver_data = (int []){1024, 5052, 2258, 4832},
+       },
+       {
++              /* Lenovo ThinkPad X240 */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X240"),
++              },
++              .driver_data = (int []){1232, 5710, 1156, 4696},
++      },
++      {
+               /* Lenovo ThinkPad T440s */
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
diff --git a/queue-3.4/input-synaptics-add-manual-min-max-quirk.patch b/queue-3.4/input-synaptics-add-manual-min-max-quirk.patch
new file mode 100644 (file)
index 0000000..06f3237
--- /dev/null
@@ -0,0 +1,105 @@
+From 421e08c41fda1f0c2ff6af81a67b491389b653a5 Mon Sep 17 00:00:00 2001
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Date: Fri, 28 Mar 2014 00:43:00 -0700
+Subject: Input: synaptics - add manual min/max quirk
+
+From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+
+commit 421e08c41fda1f0c2ff6af81a67b491389b653a5 upstream.
+
+The new Lenovo Haswell series (-40's) contains a new Synaptics touchpad.
+However, these new Synaptics devices report bad axis ranges.
+Under Windows, it is not a problem because the Windows driver uses RMI4
+over SMBus to talk to the device. Under Linux, we are using the PS/2
+fallback interface and it occurs the reported ranges are wrong.
+
+Of course, it would be too easy to have only one range for the whole
+series, each touchpad seems to be calibrated in a different way.
+
+We can not use SMBus to get the actual range because I suspect the firmware
+will switch into the SMBus mode and stop talking through PS/2 (this is the
+case for hybrid HID over I2C / PS/2 Synaptics touchpads).
+
+So as a temporary solution (until RMI4 land into upstream), start a new
+list of quirks with the min/max manually set.
+
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/input/mouse/synaptics.c |   47 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
+--- a/drivers/input/mouse/synaptics.c
++++ b/drivers/input/mouse/synaptics.c
+@@ -232,11 +232,22 @@ static int synaptics_identify(struct psm
+  * Read touchpad resolution and maximum reported coordinates
+  * Resolution is left zero if touchpad does not support the query
+  */
++
++static const int *quirk_min_max;
++
+ static int synaptics_resolution(struct psmouse *psmouse)
+ {
+       struct synaptics_data *priv = psmouse->private;
+       unsigned char resp[3];
++      if (quirk_min_max) {
++              priv->x_min = quirk_min_max[0];
++              priv->x_max = quirk_min_max[1];
++              priv->y_min = quirk_min_max[2];
++              priv->y_max = quirk_min_max[3];
++              return 0;
++      }
++
+       if (SYN_ID_MAJOR(priv->identity) < 4)
+               return 0;
+@@ -1412,10 +1423,46 @@ static const struct dmi_system_id __init
+       { }
+ };
++static const struct dmi_system_id min_max_dmi_table[] __initconst = {
++#if defined(CONFIG_DMI)
++      {
++              /* Lenovo ThinkPad Helix */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"),
++              },
++              .driver_data = (int []){1024, 5052, 2258, 4832},
++      },
++      {
++              /* Lenovo ThinkPad T440s */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T440"),
++              },
++              .driver_data = (int []){1024, 5112, 2024, 4832},
++      },
++      {
++              /* Lenovo ThinkPad T540p */
++              .matches = {
++                      DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"),
++              },
++              .driver_data = (int []){1024, 5056, 2058, 4832},
++      },
++#endif
++      { }
++};
++
+ void __init synaptics_module_init(void)
+ {
++      const struct dmi_system_id *min_max_dmi;
++
+       impaired_toshiba_kbc = dmi_check_system(toshiba_dmi_table);
+       broken_olpc_ec = dmi_check_system(olpc_dmi_table);
++
++      min_max_dmi = dmi_first_match(min_max_dmi_table);
++      if (min_max_dmi)
++              quirk_min_max = min_max_dmi->driver_data;
+ }
+ static int __synaptics_init(struct psmouse *psmouse, bool absolute_mode)
index d1ed9624301ccfcfc4ad5633b04e6bbbc036f8a2..c2bcea6273f26aeaf45a021731a70cd52dc655ed 100644 (file)
@@ -1,2 +1,5 @@
 staging-speakup-prefix-externally-visible-symbols.patch
 ext4-atomically-set-inode-i_flags-in-ext4_set_inode_flags.patch
+input-synaptics-add-manual-min-max-quirk.patch
+input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch
+x86-fix-boot-on-uniprocessor-systems.patch
diff --git a/queue-3.4/x86-fix-boot-on-uniprocessor-systems.patch b/queue-3.4/x86-fix-boot-on-uniprocessor-systems.patch
new file mode 100644 (file)
index 0000000..bb5eb15
--- /dev/null
@@ -0,0 +1,47 @@
+From 825600c0f20e595daaa7a6dd8970f84fa2a2ee57 Mon Sep 17 00:00:00 2001
+From: Artem Fetishev <artem_fetishev@epam.com>
+Date: Fri, 28 Mar 2014 13:33:39 -0700
+Subject: x86: fix boot on uniprocessor systems
+
+From: Artem Fetishev <artem_fetishev@epam.com>
+
+commit 825600c0f20e595daaa7a6dd8970f84fa2a2ee57 upstream.
+
+On x86 uniprocessor systems topology_physical_package_id() returns -1
+which causes rapl_cpu_prepare() to leave rapl_pmu variable uninitialized
+which leads to GPF in rapl_pmu_init().
+
+See arch/x86/kernel/cpu/perf_event_intel_rapl.c.
+
+It turns out that physical_package_id and core_id can actually be
+retreived for uniprocessor systems too.  Enabling them also fixes
+rapl_pmu code.
+
+Signed-off-by: Artem Fetishev <artem_fetishev@epam.com>
+Cc: Stephane Eranian <eranian@google.com>
+Cc: Ingo Molnar <mingo@elte.hu>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/topology.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -157,9 +157,10 @@ static inline void setup_node_to_cpumask
+ extern const struct cpumask *cpu_coregroup_mask(int cpu);
+-#ifdef ENABLE_TOPO_DEFINES
+ #define topology_physical_package_id(cpu)     (cpu_data(cpu).phys_proc_id)
+ #define topology_core_id(cpu)                 (cpu_data(cpu).cpu_core_id)
++
++#ifdef ENABLE_TOPO_DEFINES
+ #define topology_core_cpumask(cpu)            (per_cpu(cpu_core_map, cpu))
+ #define topology_thread_cpumask(cpu)          (per_cpu(cpu_sibling_map, cpu))