[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#712994: marked as done (Please add support for newer Elantech Touchpads)



Your message dated Fri, 06 Dec 2013 02:54:22 +0000
with message-id <1386298462.3000.43.camel@deadeye.wl.decadent.org.uk>
and subject line Re: Please add support for newer Elantech Touchpads
has caused the Debian Bug report #712994,
regarding Please add support for newer Elantech Touchpads
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
712994: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=712994
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src:linux
Version: 3.9.6-1
Severity: wishlist
Tags: patch

Hi,

I recently purchased a Samsung NP730U3E with a newer Elantech Touchpad.
Using the most recent kernel from unstable, 3.9.6, dmesg prints,

    psmouse serio1: elantech: unknown hardware version, aborting...

though the touchpad is still usable for basic clicking and pointing.


Rebuilding 3.9.6 with the attached patch fixes the issue for me, the
Touchpad is recognized as such (actually, as a Clickpad, which it is),
and Multitouch and so on just works.

A similar bug has been reported against Ubuntu[0] and Arch Linux[1]. I
took the patch from the latter, as it appears to be the newest iteration
of the same fix.

The fix from Arch Linux touches a number of files in
drivers/input/mouse/. However, in my case, it was sufficient to patch
drivers/input/mouse/elantech.c, as the attached patch does.

[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1166442
[1] https://aur.archlinux.org/packages.php?ID=51343&detail=1
>From 97fedf190f3359b1db60715a9f3ba4fbbb4b9a2f Mon Sep 17 00:00:00 2001
From: Matteo Delfino <bugs.kendatsuba@gmail.com>
Date: Fri, 14 Jun 2013 19:56:09 +0200
Subject: [PATCH] elantech: fix for newer hardware versions (v7)

* Fix version recognition in elantech_set_properties

  The new hardware reports itself as v7 but the packets'
  structure is unaltered.

* Fix packet type recognition in elantech_packet_check_v4

  The bitmask used for v6 is too wide, only the last three bits of
  the third byte in a packet (packet[3] & 0x03) are actually used to
  distinguish between packet types.
  Starting from v7, additional informations (to be interpreted) is
  stored in the remaining bits (packets[3] & 0x1c).
  In addition, the value stored in (packet[0] & 0x0c) is no longer
  a constant but contains additional information yet to be deciphered.
  This change should be backwards compatible with v6 hardware.

Additional-author: Giovanni Frigione <gio.frigione@gmail.com>
---
 drivers/input/mouse/elantech.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/elantech.c b/src/elantech.c
index e2a9867..4d54773 100644
--- a/src/elantech.c
+++ b/src/elantech.c
@@ -677,17 +677,15 @@ static int elantech_packet_check_v3(struct psmouse *psmouse)
 static int elantech_packet_check_v4(struct psmouse *psmouse)
 {
 	unsigned char *packet = psmouse->packet;
+	unsigned char packet_type = packet[3] & 0x03;
 
-	if ((packet[0] & 0x0c) == 0x04 &&
-	    (packet[3] & 0x1f) == 0x11)
+	if (packet_type == 0x01)
 		return PACKET_V4_HEAD;
 
-	if ((packet[0] & 0x0c) == 0x04 &&
-	    (packet[3] & 0x1f) == 0x12)
+	if (packet_type == 0x02)
 		return PACKET_V4_MOTION;
 
-	if ((packet[0] & 0x0c) == 0x04 &&
-	    (packet[3] & 0x1f) == 0x10)
+	if (packet_type == 0x00)
 		return PACKET_V4_STATUS;
 
 	return PACKET_UNKNOWN;
@@ -1226,6 +1224,7 @@ static int elantech_set_properties(struct elantech_data *etd)
 			etd->hw_version = 3;
 			break;
 		case 6:
+		case 7:
 			etd->hw_version = 4;
 			break;
 		default:
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Version: 3.11~rc4-1~exp1

On Mon, 2013-08-05 at 10:40 +0200, Christian Kastner wrote:
> Hi,
> 
> On 2013-06-21 18:54, Christian Kastner wrote:
> > Rebuilding 3.9.6 with the attached patch fixes the issue for me, the
> > Touchpad is recognized as such (actually, as a Clickpad, which it is),
> > and Multitouch and so on just works.
> 
> I discovered that in the mean time, this patch has been included in
> 3.11-rc1 (commit 9eebed7de660c0b5ab129a9de4f89d20b60de68c).

Closing the bug accordingly, thanks.

Ben.

-- 
Ben Hutchings
Knowledge is power.  France is bacon.

Attachment: signature.asc
Description: This is a digitally signed message part


--- End Message ---

Reply to: