diff --git a/i8042-Also-store-the-aux-firmware-id-in-multi-plexed.patch b/i8042-Also-store-the-aux-firmware-id-in-multi-plexed.patch new file mode 100644 index 0000000..f2a5454 --- /dev/null +++ b/i8042-Also-store-the-aux-firmware-id-in-multi-plexed.patch @@ -0,0 +1,32 @@ +From ef15224bce9875f9a5fbc93a2823219df6936a18 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Wed, 30 Jul 2014 17:56:05 +0200 +Subject: [PATCH 1/3] i8042: Also store the aux firmware id in multi-plexed aux + ports + +So that firmware-id matching can be used with multiplexed aux ports too. + +Bugzilla: 1110011 +Upstream-status: sent for 3.17/3.18 + +Signed-off-by: Hans de Goede +--- + drivers/input/serio/i8042.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c +index f1aeb0240d6e..4b5015f27f9e 100644 +--- a/drivers/input/serio/i8042.c ++++ b/drivers/input/serio/i8042.c +@@ -1253,6 +1253,8 @@ static int __init i8042_create_aux_port(int idx) + } else { + snprintf(serio->name, sizeof(serio->name), "i8042 AUX%d port", idx); + snprintf(serio->phys, sizeof(serio->phys), I8042_MUX_PHYS_DESC, idx + 1); ++ strlcpy(serio->firmware_id, i8042_aux_firmware_id, ++ sizeof(serio->firmware_id)); + } + + port->serio = serio; +-- +1.9.3 + diff --git a/kernel.spec b/kernel.spec index a29f0e4..50c6edc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -716,6 +716,11 @@ Patch26019: Input-wacom-Add-support-for-the-Cintiq-Companion.patch #CVE-2014-3631 rhbz 1116347 Patch26020: KEYS-Fix-termination-condition-in-assoc-array-garbag.patch +#rhbz 1110011 +Patch26021: i8042-Also-store-the-aux-firmware-id-in-multi-plexed.patch +Patch26022: psmouse-Add-psmouse_matches_pnp_id-helper-function.patch +Patch26023: psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1400,6 +1405,11 @@ ApplyPatch Input-wacom-Add-support-for-the-Cintiq-Companion.patch #CVE-2014-3631 rhbz 1116347 ApplyPatch KEYS-Fix-termination-condition-in-assoc-array-garbag.patch +#rhbz 1110011 +ApplyPatch i8042-Also-store-the-aux-firmware-id-in-multi-plexed.patch +ApplyPatch psmouse-Add-psmouse_matches_pnp_id-helper-function.patch +ApplyPatch psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2218,6 +2228,9 @@ fi # ||----w | # || || %changelog +* Thu Sep 11 2014 Josh Boyer +- Add support for touchpad in Asus X450 and X550 (rhbz 1110011) + * Wed Sep 10 2014 Josh Boyer - CVE-2014-3631 Add patch to fix oops on keyring gc (rhbz 1116347) diff --git a/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch b/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch new file mode 100644 index 0000000..899a20b --- /dev/null +++ b/psmouse-Add-psmouse_matches_pnp_id-helper-function.patch @@ -0,0 +1,100 @@ +From d0d1fbdb2d34a669ffbec814893696909381ac0e Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 27 Jun 2014 18:46:42 +0200 +Subject: [PATCH 2/3] psmouse: Add psmouse_matches_pnp_id helper function + +The matches_pnp_id function from the synaptics driver is useful for other +drivers too. Make it a generic psmouse helper function. + +Bugzilla: 1110011 +Upstream-status: sent for 3.17/3.18 + +Signed-off-by: Hans de Goede +--- + drivers/input/mouse/psmouse-base.c | 14 ++++++++++++++ + drivers/input/mouse/psmouse.h | 1 + + drivers/input/mouse/synaptics.c | 17 +++-------------- + 3 files changed, 18 insertions(+), 14 deletions(-) + +diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c +index cff065f6261c..bc1bc2653f15 100644 +--- a/drivers/input/mouse/psmouse-base.c ++++ b/drivers/input/mouse/psmouse-base.c +@@ -462,6 +462,20 @@ static int psmouse_poll(struct psmouse *psmouse) + PSMOUSE_CMD_POLL | (psmouse->pktsize << 8)); + } + ++/* ++ * psmouse_matches_pnp_id - check if psmouse matches one of the passed in ids. ++ */ ++bool psmouse_matches_pnp_id(struct psmouse *psmouse, const char * const ids[]) ++{ ++ int i; ++ ++ if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) ++ for (i = 0; ids[i]; i++) ++ if (strstr(psmouse->ps2dev.serio->firmware_id, ids[i])) ++ return true; ++ ++ return false; ++} + + /* + * Genius NetMouse magic init. +diff --git a/drivers/input/mouse/psmouse.h b/drivers/input/mouse/psmouse.h +index 2f0b39d59a9b..f4cf664c7db3 100644 +--- a/drivers/input/mouse/psmouse.h ++++ b/drivers/input/mouse/psmouse.h +@@ -108,6 +108,7 @@ void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution); + psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse); + int psmouse_activate(struct psmouse *psmouse); + int psmouse_deactivate(struct psmouse *psmouse); ++bool psmouse_matches_pnp_id(struct psmouse *psmouse, const char * const ids[]); + + struct psmouse_attribute { + struct device_attribute dattr; +diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c +index e8573c68f77e..854caca6e86e 100644 +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -185,18 +185,6 @@ static const char * const topbuttonpad_pnp_ids[] = { + NULL + }; + +-static bool matches_pnp_id(struct psmouse *psmouse, const char * const ids[]) +-{ +- int i; +- +- if (!strncmp(psmouse->ps2dev.serio->firmware_id, "PNP:", 4)) +- for (i = 0; ids[i]; i++) +- if (strstr(psmouse->ps2dev.serio->firmware_id, ids[i])) +- return true; +- +- return false; +-} +- + /***************************************************************************** + * Synaptics communications functions + ****************************************************************************/ +@@ -362,7 +350,8 @@ static int synaptics_resolution(struct psmouse *psmouse) + } + + for (i = 0; min_max_pnpid_table[i].pnp_ids; i++) { +- if (matches_pnp_id(psmouse, min_max_pnpid_table[i].pnp_ids)) { ++ if (psmouse_matches_pnp_id(psmouse, ++ min_max_pnpid_table[i].pnp_ids)) { + priv->x_min = min_max_pnpid_table[i].x_min; + priv->x_max = min_max_pnpid_table[i].x_max; + priv->y_min = min_max_pnpid_table[i].y_min; +@@ -1456,7 +1445,7 @@ static void set_input_params(struct psmouse *psmouse, + + if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) { + __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit); +- if (matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) ++ if (psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids)) + __set_bit(INPUT_PROP_TOPBUTTONPAD, dev->propbit); + /* Clickpads report only left button */ + __clear_bit(BTN_RIGHT, dev->keybit); +-- +1.9.3 + diff --git a/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch b/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch new file mode 100644 index 0000000..3282cc6 --- /dev/null +++ b/psmouse-Add-support-for-detecting-FocalTech-PS-2-tou.patch @@ -0,0 +1,159 @@ +From 4ab16f30317966f892342e8821a6dc26070d1a06 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 27 Jun 2014 18:50:33 +0200 +Subject: [PATCH 3/3] psmouse: Add support for detecting FocalTech PS/2 + touchpads + +The Asus X450 and X550 laptops use a PS/2 touchpad from a new manufacturer +called FocalTech: + +https://bugzilla.kernel.org/show_bug.cgi?id=77391 +https://bugzilla.redhat.com/show_bug.cgi?id=1110011 + +The protocol for these devices is not known at this time, but even without +knowing the protocol they need some special handling. They get upset by some +of our other PS/2 device probing, and once upset generate random mouse events +making things unusable even with an external mouse. + +This patch adds detection of these devices based on their pnp ids, and when +they are detected, treats them as a bare ps/2 mouse. Doing things this way +they at least work in their ps/2 mouse emulation mode. + +Signed-off-by: Hans de Goede +--- + drivers/input/mouse/Makefile | 2 +- + drivers/input/mouse/focaltech.c | 44 ++++++++++++++++++++++++++++++++++++++ + drivers/input/mouse/focaltech.h | 21 ++++++++++++++++++ + drivers/input/mouse/psmouse-base.c | 10 +++++++++ + 4 files changed, 76 insertions(+), 1 deletion(-) + create mode 100644 drivers/input/mouse/focaltech.c + create mode 100644 drivers/input/mouse/focaltech.h + +diff --git a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile +index c25efdb3f288..dda507f8b3a2 100644 +--- a/drivers/input/mouse/Makefile ++++ b/drivers/input/mouse/Makefile +@@ -23,7 +23,7 @@ obj-$(CONFIG_MOUSE_SYNAPTICS_I2C) += synaptics_i2c.o + obj-$(CONFIG_MOUSE_SYNAPTICS_USB) += synaptics_usb.o + obj-$(CONFIG_MOUSE_VSXXXAA) += vsxxxaa.o + +-psmouse-objs := psmouse-base.o synaptics.o ++psmouse-objs := psmouse-base.o synaptics.o focaltech.o + + psmouse-$(CONFIG_MOUSE_PS2_ALPS) += alps.o + psmouse-$(CONFIG_MOUSE_PS2_ELANTECH) += elantech.o +diff --git a/drivers/input/mouse/focaltech.c b/drivers/input/mouse/focaltech.c +new file mode 100644 +index 000000000000..d83a23554d63 +--- /dev/null ++++ b/drivers/input/mouse/focaltech.c +@@ -0,0 +1,44 @@ ++/* ++ * Focaltech TouchPad PS/2 mouse driver ++ * ++ * Copyright (c) 2014 Red Hat Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * Red Hat authors: ++ * ++ * Hans de Goede ++ */ ++ ++/* ++ * The Focaltech PS/2 touchpad protocol is unknown. This drivers deals with ++ * detection only, to avoid further detection attempts confusing the touchpad ++ * this way it at least works in PS/2 mouse compatibility mode. ++ */ ++ ++#include ++#include ++#include "psmouse.h" ++ ++static const char * const focaltech_pnp_ids[] = { ++ "FLT0101", ++ "FLT0102", ++ "FLT0103", ++ NULL ++}; ++ ++int focaltech_detect(struct psmouse *psmouse, bool set_properties) ++{ ++ if (!psmouse_matches_pnp_id(psmouse, focaltech_pnp_ids)) ++ return -ENODEV; ++ ++ if (set_properties) { ++ psmouse->vendor = "FocalTech"; ++ psmouse->name = "FocalTech Touchpad in mouse emulation mode"; ++ } ++ ++ return 0; ++} +diff --git a/drivers/input/mouse/focaltech.h b/drivers/input/mouse/focaltech.h +new file mode 100644 +index 000000000000..0d0fc49451fe +--- /dev/null ++++ b/drivers/input/mouse/focaltech.h +@@ -0,0 +1,21 @@ ++/* ++ * Focaltech TouchPad PS/2 mouse driver ++ * ++ * Copyright (c) 2014 Red Hat Inc. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * Red Hat authors: ++ * ++ * Hans de Goede ++ */ ++ ++#ifndef _FOCALTECH_H ++#define _FOCALTECH_H ++ ++int focaltech_detect(struct psmouse *psmouse, bool set_properties); ++ ++#endif +diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c +index bc1bc2653f15..0730209cddb0 100644 +--- a/drivers/input/mouse/psmouse-base.c ++++ b/drivers/input/mouse/psmouse-base.c +@@ -35,6 +35,7 @@ + #include "elantech.h" + #include "sentelic.h" + #include "cypress_ps2.h" ++#include "focaltech.h" + + #define DRIVER_DESC "PS/2 mouse driver" + +@@ -720,6 +721,13 @@ static int psmouse_extensions(struct psmouse *psmouse, + { + bool synaptics_hardware = false; + ++/* Always check for focaltech, this is safe as it uses pnp-id matching */ ++ if (psmouse_do_detect(focaltech_detect, psmouse, set_properties) == 0) { ++ /* Not supported yet, use bare protocol */ ++ psmouse_max_proto = max_proto = PSMOUSE_PS2; ++ goto reset_to_defaults; ++ } ++ + /* + * We always check for lifebook because it does not disturb mouse + * (it only checks DMI information). +@@ -871,6 +879,8 @@ static int psmouse_extensions(struct psmouse *psmouse, + } + } + ++reset_to_defaults: ++ + /* + * Reset to defaults in case the device got confused by extended + * protocol probes. Note that we follow up with full reset because +-- +1.9.3 +