From 9f63d7d2bb7edd40b39b6a1d228c6eb5ff8ff21d Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 12 Mar 2013 10:22:33 -0400 Subject: [PATCH] Add patch to fix Cypress trackpad on XPS 12 machines (rhbz 912166) --- ...s2-fix-trackpadi-found-in-Dell-XPS12.patch | 71 +++++++++++++++++++ kernel.spec | 9 ++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch diff --git a/Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch b/Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch new file mode 100644 index 000000000..15abce521 --- /dev/null +++ b/Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch @@ -0,0 +1,71 @@ +From 81bb5d31fbf3893a8e041c649dea704dd11d5272 Mon Sep 17 00:00:00 2001 +From: Kamal Mostafa +Date: Thu, 21 Feb 2013 11:55:05 -0800 +Subject: [PATCH] Input: cypress_ps2 - fix trackpadi found in Dell XPS12 + +Avoid firmware glitch in Cypress PS/2 Trackpad firmware version 11 +(as observed in Dell XPS12) which prevents driver from recognizing +the trackpad. + +BugLink: http://launchpad.net/bugs/1103594 + +Signed-off-by: Kamal Mostafa +Cc: Dudley Du +Signed-off-by: Dmitry Torokhov +--- + drivers/input/mouse/cypress_ps2.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/drivers/input/mouse/cypress_ps2.c b/drivers/input/mouse/cypress_ps2.c +index 1673dc6..f51765f 100644 +--- a/drivers/input/mouse/cypress_ps2.c ++++ b/drivers/input/mouse/cypress_ps2.c +@@ -236,6 +236,13 @@ static int cypress_read_fw_version(struct psmouse *psmouse) + cytp->fw_version = param[2] & FW_VERSION_MASX; + cytp->tp_metrics_supported = (param[2] & TP_METRICS_MASK) ? 1 : 0; + ++ /* ++ * Trackpad fw_version 11 (in Dell XPS12) yields a bogus response to ++ * CYTP_CMD_READ_TP_METRICS so do not try to use it. LP: #1103594. ++ */ ++ if (cytp->fw_version >= 11) ++ cytp->tp_metrics_supported = 0; ++ + psmouse_dbg(psmouse, "cytp->fw_version = %d\n", cytp->fw_version); + psmouse_dbg(psmouse, "cytp->tp_metrics_supported = %d\n", + cytp->tp_metrics_supported); +@@ -258,6 +265,9 @@ static int cypress_read_tp_metrics(struct psmouse *psmouse) + cytp->tp_res_x = cytp->tp_max_abs_x / cytp->tp_width; + cytp->tp_res_y = cytp->tp_max_abs_y / cytp->tp_high; + ++ if (!cytp->tp_metrics_supported) ++ return 0; ++ + memset(param, 0, sizeof(param)); + if (cypress_send_ext_cmd(psmouse, CYTP_CMD_READ_TP_METRICS, param) == 0) { + /* Update trackpad parameters. */ +@@ -315,18 +325,15 @@ static int cypress_read_tp_metrics(struct psmouse *psmouse) + + static int cypress_query_hardware(struct psmouse *psmouse) + { +- struct cytp_data *cytp = psmouse->private; + int ret; + + ret = cypress_read_fw_version(psmouse); + if (ret) + return ret; + +- if (cytp->tp_metrics_supported) { +- ret = cypress_read_tp_metrics(psmouse); +- if (ret) +- return ret; +- } ++ ret = cypress_read_tp_metrics(psmouse); ++ if (ret) ++ return ret; + + return 0; + } +-- +1.8.1.2 + diff --git a/kernel.spec b/kernel.spec index e54dcf41b..27ee3d054 100644 --- a/kernel.spec +++ b/kernel.spec @@ -62,7 +62,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 209 +%global baserelease 210 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -741,6 +741,9 @@ Patch22226: vt-Drop-K_OFF-for-VC_MUTE.patch Patch22240: Input-increase-struct-ps2dev-cmdbuf-to-8-bytes.patch Patch22241: Input-add-support-for-Cypress-PS2-Trackpads.patch +#rhbz 912166 +Patch22243: Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch + #rhbz 892811 Patch22247: ath9k_rx_dma_stop_check.patch @@ -1490,6 +1493,9 @@ ApplyPatch vt-Drop-K_OFF-for-VC_MUTE.patch ApplyPatch Input-increase-struct-ps2dev-cmdbuf-to-8-bytes.patch ApplyPatch Input-add-support-for-Cypress-PS2-Trackpads.patch +#rhbz 912166 +ApplyPatch Input-cypress_ps2-fix-trackpadi-found-in-Dell-XPS12.patch + #rhbz 892811 ApplyPatch ath9k_rx_dma_stop_check.patch @@ -2413,6 +2419,7 @@ fi # || || %changelog * Tue Mar 12 2013 Josh Boyer +- Add patch to fix Cypress trackpad on XPS 12 machines (rhbz 912166) - CVE-2013-0913 drm/i915: head writing overflow (rhbz 920471 920529) - CVE-2013-0914 sa_restorer information leak (rhbz 920499 920510)