From: Greg Kroah-Hartman Date: Mon, 31 Mar 2014 23:28:31 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.86~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b75e16351757030a34d63228fb7085c199a144a6;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches 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 --- 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 index 00000000000..90fab6e0f6b --- /dev/null +++ b/queue-3.4/input-synaptics-add-manual-min-max-quirk-for-thinkpad-x240.patch @@ -0,0 +1,37 @@ +From 8a0435d958fb36d93b8df610124a0e91e5675c82 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 28 Mar 2014 01:01:38 -0700 +Subject: Input: synaptics - add manual min/max quirk for ThinkPad X240 + +From: Hans de Goede + +commit 8a0435d958fb36d93b8df610124a0e91e5675c82 upstream. + +This extends Benjamin Tissoires manual min/max quirk table with support for +the ThinkPad X240. + +Signed-off-by: Hans de Goede +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..06f323762d1 --- /dev/null +++ b/queue-3.4/input-synaptics-add-manual-min-max-quirk.patch @@ -0,0 +1,105 @@ +From 421e08c41fda1f0c2ff6af81a67b491389b653a5 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Fri, 28 Mar 2014 00:43:00 -0700 +Subject: Input: synaptics - add manual min/max quirk + +From: Benjamin Tissoires + +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 +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + 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) diff --git a/queue-3.4/series b/queue-3.4/series index d1ed9624301..c2bcea6273f 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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 index 00000000000..bb5eb15b493 --- /dev/null +++ b/queue-3.4/x86-fix-boot-on-uniprocessor-systems.patch @@ -0,0 +1,47 @@ +From 825600c0f20e595daaa7a6dd8970f84fa2a2ee57 Mon Sep 17 00:00:00 2001 +From: Artem Fetishev +Date: Fri, 28 Mar 2014 13:33:39 -0700 +Subject: x86: fix boot on uniprocessor systems + +From: Artem Fetishev + +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 +Cc: Stephane Eranian +Cc: Ingo Molnar +Cc: "H. Peter Anvin" +Cc: Thomas Gleixner +Cc: Peter Zijlstra +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + 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)) +