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]
Message-ID: <1361179560.7859.5.camel@liguang.fnst.cn.fujitsu.com>
Date:	Mon, 18 Feb 2013 17:26:00 +0800
From:	li guang <lig.fnst@...fujitsu.com>
To:	Chung-yih Wang <cywang@...omium.org>
Cc:	linux-input@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Tai-hwa Liang <avatar@...telic.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Paul Fox <pgf@...top.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: psmouse - retry getid command in psmouse_probe()

seems a special change for a special device
so, you may need to place this change with
corresponding CONFIG_xxx_xxx.
generally, if command F2 failed, we will assume
there's no ps2 device, it's normal, 
or do you have some materials(SPEC) to specify
the change you have made?



在 2012-10-31三的 18:11 +0800,Chung-yih Wang写道:
> As the synaptics device may not respond to the first command in psmouse_probe
> when a machine is booting up, the patch gives a second probe if the first
> one fails.
> 
> Signed-off-by: Chung-yih Wang <cywang@...omium.org>
> ---
>  drivers/input/mouse/psmouse-base.c |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
> index 22fe254..c4fc5ad 100644
> --- a/drivers/input/mouse/psmouse-base.c
> +++ b/drivers/input/mouse/psmouse-base.c
> @@ -1053,8 +1053,17 @@ static int psmouse_probe(struct psmouse *psmouse)
>   */
>  
>  	param[0] = 0xa5;
> -	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
> -		return -1;
> +	if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID)) {
> +		/*
> +		 * Reprobe the device if it did not respond to the GETID
> +		 * command. Before retry, additional dummy command is sent
> +		 * to clear the 'RESEND' response if exists.
> +		 */
> +		psmouse_warn(psmouse, "GETID probe failed, retrying...\n");
> +		ps2_command(ps2dev, NULL, PSMOUSE_CMD_SETSCALE11);
> +		if (ps2_command(ps2dev, param, PSMOUSE_CMD_GETID))
> +			return -1;
> +	}
>  
>  	if (param[0] != 0x00 && param[0] != 0x03 &&
>  	    param[0] != 0x04 && param[0] != 0xff)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ