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  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:	Sat, 8 Nov 2014 13:00:34 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Pali Rohár <pali.rohar@...il.com>
Cc:	Hans de Goede <hdegoede@...hat.com>,
	Yunkang Tang <yunkang.tang@...alps.com>,
	Tommy Will <tommywill2011@...il.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/4] input: alps: Allow 2 invalid packets without
 resetting device

On Sun, Nov 02, 2014 at 12:25:08AM +0100, Pali Rohár wrote:
> On some Dell Latitude laptops ALPS device or Dell EC send one invalid byte in
> 6 bytes ALPS packet. In this case psmouse driver enter out of sync state. It
> looks like that all other bytes in packets are valid and also device working
> properly. So there is no need to do full device reset, just need to wait
> for byte which match condition for first byte (start of packet). Because ALPS
> packets are bigger (6 or 8 bytes) default limit is small.
> 
> This patch increase number of invalid bytes to size of 2 ALPS packets which
> psmouse driver can drop before do full reset.
> 
> Resetting ALPS devices take some time and when doing reset on some Dell laptops
> touchpad, trackstick and also keyboard do not respond. So it is better to do it
> only if really necessary.
> 
> Signed-off-by: Pali Rohár <pali.rohar@...il.com>
> Tested-by: Pali Rohár <pali.rohar@...il.com>
> Cc: stable@...r.kernel.org

Applied, thank you.

> ---
>  drivers/input/mouse/alps.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
> index a772745..7c47e97 100644
> --- a/drivers/input/mouse/alps.c
> +++ b/drivers/input/mouse/alps.c
> @@ -2391,6 +2391,9 @@ int alps_init(struct psmouse *psmouse)
>  	/* We are having trouble resyncing ALPS touchpads so disable it for now */
>  	psmouse->resync_time = 0;
>  
> +	/* Allow 2 invalid packets without resetting device */
> +	psmouse->resetafter = psmouse->pktsize * 2;
> +
>  	return 0;
>  
>  init_fail:
> -- 
> 1.7.9.5
> 

-- 
Dmitry
--
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