lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 21 May 2019 10:26:47 +0800
From:   Hui Wang <hui.wang@...onical.com>
To:     Xiaoxiao Liu <xiaoxiao.liu-1@...alps.com>,
        XiaoXiao Liu <sliuuxiaonxiao@...il.com>,
        "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>
Cc:     "pali.rohar@...il.com" <pali.rohar@...il.com>,
        "linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Xiaojian Cao <xiaojian.cao@...alps.com>,
        "zhangfp1@...ovo.com" <zhangfp1@...ovo.com>
Subject: Re: 答复: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.

Tested-by: Hui Wang <hui.wang@...onical.com>

On 2019/5/21 上午9:07, Xiaoxiao Liu wrote:
> Add Pali Rohár.
>
> -----邮件原件-----
> 发件人: XiaoXiao Liu <sliuuxiaonxiao@...il.com>
> 发送时间: Monday, May 20, 2019 7:02 PM
> 收件人: dmitry.torokhov@...il.com
> 抄送: linux-input@...r.kernel.org; linux-kernel@...r.kernel.org; hui.wang@...onical.com; 曹 曉建 Xiaojian Cao <xiaojian.cao@...alps.com>; zhangfp1@...ovo.com; 劉 曉曉 Xiaoxiao Liu <xiaoxiao.liu-1@...alps.com>; XiaoXiao Liu <sliuuxiaonxiao@...il.com>
> 主题: [PATCH] input: alps-fix the issue the special alps trackpoint do not work.
>
> when the alps trackpoint is detected and using the alps_v8_protocol_data procotol, the alps driver will not report the input data.
>
> solution: use standard mouse driver instead of alps driver when the specail trackpoint was detected.
>
> Signed-off-by: XiaoXiao Liu <sliuuxiaonxiao@...il.com>
> ---
>   drivers/input/mouse/alps.c | 23 ++++++++++++++++++++++-
>   1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0a6f7ca883e7..516ae1d0eb17 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -24,7 +24,7 @@
>   
>   #include "psmouse.h"
>   #include "alps.h"
> -
> +#include "trackpoint.h"
>   /*
>    * Definitions for ALPS version 3 and 4 command mode protocol
>    */
> @@ -2864,6 +2864,22 @@ static const struct alps_protocol_info *alps_match_table(unsigned char *e7,
>   	return NULL;
>   }
>   
> +int alps_check_is_trackpoint(struct psmouse *psmouse) {
> +	u8 param[2] = { 0 };
> +	int error;
> +
> +	error = ps2_command(&psmouse->ps2dev,
> +			    param, MAKE_PS2_CMD(0, 2, TP_READ_ID));
> +	if (error)
> +		return error;
> +
> +	if (param[0] == TP_VARIANT_ALPS)
> +		return 0;
> +	psmouse_warn(psmouse, "It is not alps trackpoint.\n");
> +	return -ENODEV;
> +}
> +
>   static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)  {
>   	const struct alps_protocol_info *protocol; @@ -2912,6 +2928,11 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
>   			protocol = &alps_v3_protocol_data;
>   		} else if (e7[0] == 0x73 && e7[1] == 0x03 &&
>   			   (e7[2] == 0x14 || e7[2] == 0x28)) {
> +				if (alps_check_is_trackpoint(psmouse) == 0) {
> +					psmouse_warn(psmouse,
> +					"It is alps trackpoint, use the standard mouse driver.\n");
> +					return -EINVAL;
> +				}
>   			protocol = &alps_v8_protocol_data;
>   		} else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0xc8) {
>   			protocol = &alps_v9_protocol_data;
> --
> 2.20.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ