* [PATCH V2] HID: i2c-hid: fix race condition reading reports
From: Antonio Borneo @ 2014-11-19 16:46 UTC (permalink / raw)
To: Jiri Kosina, linux-input, Benjamin Tissoires
Cc: linux-kernel, Jean-Baptiste Maneyrol
In-Reply-To: <1416149064-25655-1-git-send-email-borneo.antonio@gmail.com>
From: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
Current driver uses a common buffer for reading reports either
synchronously in i2c_hid_get_raw_report() and asynchronously in
the interrupt handler.
There is race condition if an interrupt arrives immediately after
the report is received in i2c_hid_get_raw_report(); the common
buffer is modified by the interrupt handler with the new report
and then i2c_hid_get_raw_report() proceed using wrong data.
Fix it by using a separate buffers for synchronous reports.
Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com>
[Antonio Borneo: cleanup, rebase to v3.17, submit mainline]
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Cc: stable@vger.kernel.org
---
V1 -> V2
rename the synchronous buffer as rawbuf (instead of the
asynchronous one)
drivers/hid/i2c-hid/i2c-hid.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 933bf10..c66e6ac 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -137,6 +137,7 @@ struct i2c_hid {
* descriptor. */
unsigned int bufsize; /* i2c buffer size */
char *inbuf; /* Input buffer */
+ char *rawbuf; /* Raw Input buffer */
char *cmdbuf; /* Command buffer */
char *argsbuf; /* Command arguments buffer */
@@ -504,9 +505,11 @@ static void i2c_hid_find_max_report(struct hid_device *hid, unsigned int type,
static void i2c_hid_free_buffers(struct i2c_hid *ihid)
{
kfree(ihid->inbuf);
+ kfree(ihid->rawbuf);
kfree(ihid->argsbuf);
kfree(ihid->cmdbuf);
ihid->inbuf = NULL;
+ ihid->rawbuf = NULL;
ihid->cmdbuf = NULL;
ihid->argsbuf = NULL;
ihid->bufsize = 0;
@@ -522,10 +525,11 @@ static int i2c_hid_alloc_buffers(struct i2c_hid *ihid, size_t report_size)
report_size; /* report */
ihid->inbuf = kzalloc(report_size, GFP_KERNEL);
+ ihid->rawbuf = kzalloc(report_size, GFP_KERNEL);
ihid->argsbuf = kzalloc(args_len, GFP_KERNEL);
ihid->cmdbuf = kzalloc(sizeof(union command) + args_len, GFP_KERNEL);
- if (!ihid->inbuf || !ihid->argsbuf || !ihid->cmdbuf) {
+ if (!ihid->inbuf || !ihid->rawbuf || !ihid->argsbuf || !ihid->cmdbuf) {
i2c_hid_free_buffers(ihid);
return -ENOMEM;
}
@@ -552,12 +556,12 @@ static int i2c_hid_get_raw_report(struct hid_device *hid,
ret = i2c_hid_get_report(client,
report_type == HID_FEATURE_REPORT ? 0x03 : 0x01,
- report_number, ihid->inbuf, ask_count);
+ report_number, ihid->rawbuf, ask_count);
if (ret < 0)
return ret;
- ret_count = ihid->inbuf[0] | (ihid->inbuf[1] << 8);
+ ret_count = ihid->rawbuf[0] | (ihid->rawbuf[1] << 8);
if (ret_count <= 2)
return 0;
@@ -566,7 +570,7 @@ static int i2c_hid_get_raw_report(struct hid_device *hid,
/* The query buffer contains the size, dropping it in the reply */
count = min(count, ret_count - 2);
- memcpy(buf, ihid->inbuf + 2, count);
+ memcpy(buf, ihid->rawbuf + 2, count);
return count;
}
--
2.1.3
^ permalink raw reply related
* [PATCH 1/1] HID-picoLCD: Deletion of unnecessary checks before three function calls
From: SF Markus Elfring @ 2014-11-19 17:38 UTC (permalink / raw)
To: Bruno Prémont, Jiri Kosina, linux-input
Cc: LKML, kernel-janitors, Julia Lawall
In-Reply-To: <5317A59D.4@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 19 Nov 2014 18:30:22 +0100
The functions backlight_device_unregister(), lcd_device_unregister() and
rc_unregister_device() test whether their argument is NULL and then
return immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/hid/hid-picolcd_backlight.c | 3 +--
drivers/hid/hid-picolcd_cir.c | 3 +--
drivers/hid/hid-picolcd_lcd.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/hid/hid-picolcd_backlight.c b/drivers/hid/hid-picolcd_backlight.c
index a32c5f8..808807a 100644
--- a/drivers/hid/hid-picolcd_backlight.c
+++ b/drivers/hid/hid-picolcd_backlight.c
@@ -94,8 +94,7 @@ void picolcd_exit_backlight(struct picolcd_data *data)
struct backlight_device *bdev = data->backlight;
data->backlight = NULL;
- if (bdev)
- backlight_device_unregister(bdev);
+ backlight_device_unregister(bdev);
}
int picolcd_resume_backlight(struct picolcd_data *data)
diff --git a/drivers/hid/hid-picolcd_cir.c b/drivers/hid/hid-picolcd_cir.c
index 045f8eb..9628651 100644
--- a/drivers/hid/hid-picolcd_cir.c
+++ b/drivers/hid/hid-picolcd_cir.c
@@ -145,7 +145,6 @@ void picolcd_exit_cir(struct picolcd_data *data)
struct rc_dev *rdev = data->rc_dev;
data->rc_dev = NULL;
- if (rdev)
- rc_unregister_device(rdev);
+ rc_unregister_device(rdev);
}
diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c
index 89821c2..22dcbe1 100644
--- a/drivers/hid/hid-picolcd_lcd.c
+++ b/drivers/hid/hid-picolcd_lcd.c
@@ -92,8 +92,7 @@ void picolcd_exit_lcd(struct picolcd_data *data)
struct lcd_device *ldev = data->lcd;
data->lcd = NULL;
- if (ldev)
- lcd_device_unregister(ldev);
+ lcd_device_unregister(ldev);
}
int picolcd_resume_lcd(struct picolcd_data *data)
--
2.1.3
^ permalink raw reply related
* Re: [git pull] Input updates for 3.18-rc4
From: Marcus Overhagen @ 2014-11-19 18:00 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: Ulrik De Bie, Hans de Goede, Dmitry Torokhov,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <CAN+gG=FaovQETa3+qQsLoBBQnbZ8Q2uoQJD6_XvAmCCvGTHT1g@mail.gmail.com>
I'm not sure if my problems are related, but anyway:
I'm using a Samsung NP730U3E notebook that also has an elantech touchpad.
With 3.18.0-rc3 two finger scrolling in Firefox is smoth, but with
3.18.0-rc5 I have to press a
lot harder and usually scrolling only startes after stopping the
movement shortly and retrying once
I skipped rc4.
from RC3 dmesg:
[ 20.507633] psmouse serio1: elantech: assuming hardware version 4
(with firmware version 0x675f04)
[ 20.520740] psmouse serio1: elantech: Synaptics capabilities query
result 0x10, 0x15, 0x0e.
regards
Marcus
On Wed, Nov 19, 2014 at 4:32 PM, Benjamin Tissoires
<benjamin.tissoires@gmail.com> wrote:
> Hi Ulrik,
>
>
> On Fri, Nov 14, 2014 at 5:26 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>> Hi Linus,
>>
>> Please pull from:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git for-linus
>> or
>> master.kernel.org:/pub/scm/linux/kernel/git/dtor/input.git for-linus
>>
>> to receive updates for the input subsystem. Mostly small fixups to PS/2
>> tochpad drivers (ALPS, Elantech, Synaptics) to better deal with specific
>> hardware.
>>
>> Changelog:
>> ---------
>>
>> NeilBrown (1):
>> Input: twl4030-pwrbutton - ensure a wakeup event is recorded.
>>
>> Pali Rohár (3):
>> Input: alps - ignore potential bare packets when device is out of sync
>> Input: alps - allow up to 2 invalid packets without resetting device
>> Input: alps - ignore bad data on Dell Latitudes E6440 and E7440
>>
>> Takashi Iwai (1):
>> Input: synaptics - add min/max quirk for Lenovo T440s
>>
>> Ulrik De Bie (5):
>> Input: elantech - use elantech_report_trackpoint for hardware v4 too
>> Input: elantech - fix crc_enabled for Fujitsu H730
>> Input: elantech - report the middle button of the touchpad
>> Input: elantech - provide a sysfs knob for crc_enabled
>> Input: elantech - update the documentation
>
> It looks like this elantech changes raise some warnings on a Samsung
> laptop. Can you have a look please?
> https://bugzilla.redhat.com/show_bug.cgi?id=1165390
>
> Hans and myself are in CC of the bug report, we can ask further
> details to the reporter if requested.
>
> Cheers,
> Benjamin
>
>>
>>
>> Diffstat:
>> --------
>>
>> Documentation/input/elantech.txt | 81 +++++++++++++++++++++++++++++++---
>> drivers/input/misc/twl4030-pwrbutton.c | 1 +
>> drivers/input/mouse/alps.c | 28 +++++++++++-
>> drivers/input/mouse/elantech.c | 56 +++++++++++++++++++++--
>> drivers/input/mouse/synaptics.c | 5 ++-
>> 5 files changed, 158 insertions(+), 13 deletions(-)
>>
>> --
>> Dmitry
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] driver: input: touchscreen: add Raydium i2c touchscreen driver
From: Benson Leung @ 2014-11-19 18:05 UTC (permalink / raw)
To: jeffrey.lin
Cc: Dmitry Torokhov, Henrik Rydberg, dh.herrmann, charliemooney, floe,
jeffrey.lin, roger.yang, KP.li, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org, jeffrey.lin
In-Reply-To: <1416411048-23526-1-git-send-email-jeffrey.lin@rad-ic.com>
Hi Jeffrey,
On Wed, Nov 19, 2014 at 7:30 AM, jeffrey.lin <yajohn@gmail.com> wrote:
> From: "jeffrey.lin" <jeffrey.lin@gmail.com>
>
> this patch is porting Raydium I2C touch driver. Developer can enable
> raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
>
> BUG: None
> TEST: built and test with peppy
These two lines serve no purpose in the upstream kernel. Please remove them.
>
> Signed-off-by: jeffrey.lin@rad-ic.com
> Change-Id: I05d54e5ef29249d2a6eae97222c90bed11e839f9
The Change-Id: line is an artifact of the gerrit code review system.
Please remove it before sending patches upstream.
--
Benson Leung
Software Engineer, Chrom* OS
bleung@chromium.org
^ permalink raw reply
* Re: [PATCH] driver: input: touchscreen: add Raydium i2c touchscreen driver
From: Dmitry Torokhov @ 2014-11-19 18:06 UTC (permalink / raw)
To: Daniel Mack
Cc: jeffrey.lin, rydberg, bleung, dh.herrmann, charliemooney, floe,
jeffrey.lin, roger.yang, KP.li, linux-kernel, linux-input,
jeffrey.lin
In-Reply-To: <546CC900.8000506@zonque.org>
On Wed, Nov 19, 2014 at 05:44:48PM +0100, Daniel Mack wrote:
> On 11/19/2014 04:30 PM, jeffrey.lin wrote:
> > From: "jeffrey.lin" <jeffrey.lin@gmail.com>
> >
> > this patch is porting Raydium I2C touch driver. Developer can enable
> > raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
> >
> > BUG: None
> > TEST: built and test with peppy
> >
> > Signed-off-by: jeffrey.lin@rad-ic.com
> > Change-Id: I05d54e5ef29249d2a6eae97222c90bed11e839f9
> > ---
>
> Just some general remarks that IMO need to be addressed before a more
> thorough review can happen:
>
>
> * Please remove all dead code, such as code in comments and in #if 0
> blocks.
>
> * Use the regmap framework to abstract the hardware access on the I2C
> layer (see drivers/input/keyboard/cap1106.c and many other drivers
> as an example, and check include/linux/regmap.h). That makes the code
> a lot shorter and more comprehensible to read.
>
> * By using request_threaded_irq(), you don't have to manually control
> your worker and can simplify your code quite a bit.
>
> * See if you can claim all the resources the driver needs by using
> devm_* variants.
>
> * Don't use uppercase names for filenames, structs, functions and IDs
>
> * Why do you need a miscdevice for this? Isn't the input event layer
> enough?
>
> * Also, run scripts/checkpatch.pl on the new patch, which will help
> you find some more typical pitfalls.
Also please convert driver to MT-B (slotted) protocol (you are currently
using MT-Ai version).
And please remove join_bytes(). It is called get_unaligned_le16().
Most of the things that need fixing have already been listed in response
to your original submission, please do address them before posting the
driver again.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH] driver: input: touchscreen: add Raydium i2c touchscreen driver
From: Benson Leung @ 2014-11-19 18:08 UTC (permalink / raw)
To: jeffrey.lin
Cc: Dmitry Torokhov, Henrik Rydberg, dh.herrmann, charliemooney, floe,
jeffrey.lin, roger.yang, KP.li, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org
In-Reply-To: <1416411048-23526-1-git-send-email-jeffrey.lin@rad-ic.com>
On Wed, Nov 19, 2014 at 7:30 AM, jeffrey.lin <yajohn@gmail.com> wrote:
> From: "jeffrey.lin" <jeffrey.lin@gmail.com>
Also, this email address appears to not be active. Please do not list
dead email addresses as the author.
>
> this patch is porting Raydium I2C touch driver. Developer can enable
> raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
>
> BUG: None
> TEST: built and test with peppy
>
> Signed-off-by: jeffrey.lin@rad-ic.com
> Change-Id: I05d54e5ef29249d2a6eae97222c90bed11e839f9
> ---
--
Benson Leung
Software Engineer, Chrom* OS
bleung@chromium.org
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: Dmitry Torokhov @ 2014-11-19 18:12 UTC (permalink / raw)
To: Marcus Overhagen
Cc: Benjamin Tissoires, Ulrik De Bie, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <CAJBHPojp7JVG6KKgrNfbC-V5ibPs-j6+BnqrSDkxvak0vNGM8w@mail.gmail.com>
Hi Marcus,
On Wed, Nov 19, 2014 at 07:00:16PM +0100, Marcus Overhagen wrote:
> I'm not sure if my problems are related, but anyway:
>
> I'm using a Samsung NP730U3E notebook that also has an elantech touchpad.
>
> With 3.18.0-rc3 two finger scrolling in Firefox is smoth, but with
> 3.18.0-rc5 I have to press a
> lot harder and usually scrolling only startes after stopping the
> movement shortly and retrying once
>
> I skipped rc4.
>
> from RC3 dmesg:
> [ 20.507633] psmouse serio1: elantech: assuming hardware version 4
> (with firmware version 0x675f04)
> [ 20.520740] psmouse serio1: elantech: Synaptics capabilities query
> result 0x10, 0x15, 0x0e.
>
Can you try reverting caeb0d37fa3e387eb0dd22e5d497523c002033d1 please?
The rest should have no effect on you.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: Marcus Overhagen @ 2014-11-19 18:20 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Benjamin Tissoires, Ulrik De Bie, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <20141119181247.GE37989@dtor-ws>
Hi,
I will try reverting that, but may need until tomorrow or Friday.
Just now I made a warm reboot from rc3 to rc5 and initially scrolling
behaviour was ok, but after about a minute it went wrong and I got
this:
[ 179.705362] ------------[ cut here ]------------
[ 179.705382] WARNING: CPU: 3 PID: 0 at
drivers/input/mouse/elantech.c:433
elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]()
[ 179.705385] psmouse serio1: elantech: Unexpected trackpoint message
[ 179.705387] Modules linked in: fuse ctr ccm nls_utf8 cifs
dns_resolver fscache joydev mousedev iTCO_wdt iTCO_vendor_support ecb
coretemp arc4 intel_rapl uvcvideo x86_pkg_temp_thermal iwldvm
intel_powerclamp samsung_laptop videobuf2_vmalloc videobuf2_memops
mac80211 kvm_intel videobuf2_core evdev v4l2_common btusb r8169 radeon
iwlwifi psmouse videodev mac_hid tpm_infineon kvm serio_raw bluetooth
pcspkr i2c_i801 lpc_ich rtsx_usb_ms snd_hda_codec_hdmi mii cfg80211
ttm i915 media tpm_tis rfkill ac memstick fan thermal hwmon wmi tpm
snd_hda_codec_realtek battery snd_hda_codec_generic button video
snd_hda_intel drm_kms_helper snd_hda_controller snd_hda_codec drm
snd_hwdep snd_pcm intel_gtt i2c_algo_bit snd_timer i2c_core mei_me snd
mei soundcore shpchp sch_fq_codel processor ext4 crc16 mbcache jbd2
algif_skcipher
[ 179.705458] af_alg dm_crypt dm_mod crct10dif_pclmul crc32_pclmul
crc32c_intel ghash_clmulni_intel rtsx_usb_sdmmc led_class mmc_core
rtsx_usb sd_mod aesni_intel ahci aes_x86_64 lrw gf128mul libahci atkbd
glue_helper ablk_helper libps2 cryptd libata ehci_pci xhci_pci
xhci_hcd ehci_hcd scsi_mod usbcore usb_common i8042 serio
[ 179.705490] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.18.0-rc5-marcus-1 #1
[ 179.705493] Hardware name: SAMSUNG ELECTRONICS CO., LTD.
730U3E/740U3E/NP730U3E-S05DE, BIOS P03ABW.051.130226.dg 02/26/2013
[ 179.705495] 0000000000000000 f7eda65f9c13f6f4 ffff8801af383c48
ffffffff81547b54
[ 179.705500] 0000000000000000 ffff8801af383ca0 ffff8801af383c88
ffffffff8106bbc1
[ 179.705504] 0000000000000000 ffff8800c4489400 ffff8801a5e50d78
ffff8800c47dd400
[ 179.705509] Call Trace:
[ 179.705512] <IRQ> [<ffffffff81547b54>] dump_stack+0x4e/0x71
[ 179.705523] [<ffffffff8106bbc1>] warn_slowpath_common+0x81/0xa0
[ 179.705527] [<ffffffff8106bc35>] warn_slowpath_fmt+0x55/0x70
[ 179.705536] [<ffffffffa0748639>]
elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]
[ 179.705543] [<ffffffffa0748e28>] elantech_process_byte+0x6e8/0xf90 [psmouse]
[ 179.705548] [<ffffffff810a37d8>] ? enqueue_task_fair+0x128/0x5d0
[ 179.705555] [<ffffffffa073ee95>] psmouse_handle_byte+0x15/0x150 [psmouse]
[ 179.705561] [<ffffffffa073f073>] psmouse_interrupt+0xa3/0x380 [psmouse]
[ 179.705571] [<ffffffffa0000f0a>] serio_interrupt+0x4a/0xa0 [serio]
[ 179.705580] [<ffffffffa000a607>] i8042_interrupt+0x197/0x3a0 [i8042]
[ 179.705585] [<ffffffff810d50bc>] ? __hrtimer_start_range_ns+0x2fc/0x420
[ 179.705591] [<ffffffff810c3bce>] handle_irq_event_percpu+0x3e/0x1f0
[ 179.705596] [<ffffffff810c3dc1>] handle_irq_event+0x41/0x70
[ 179.705601] [<ffffffff810c6eee>] handle_edge_irq+0x9e/0x110
[ 179.705607] [<ffffffff810172b2>] handle_irq+0x22/0x40
[ 179.705612] [<ffffffff81550201>] do_IRQ+0x51/0xf0
[ 179.705617] [<ffffffff8154e1ad>] common_interrupt+0x6d/0x6d
[ 179.705619] <EOI> [<ffffffff813fbbc5>] ? cpuidle_enter_state+0x65/0x1a0
[ 179.705629] [<ffffffff813fbbb1>] ? cpuidle_enter_state+0x51/0x1a0
[ 179.705634] [<ffffffff813fbde7>] cpuidle_enter+0x17/0x20
[ 179.705638] [<ffffffff810ac509>] cpu_startup_entry+0x3d9/0x460
[ 179.705644] [<ffffffff81044074>] start_secondary+0x1b4/0x1f0
[ 179.705647] ---[ end trace c9ff680de7cfddf7 ]---
[ 179.705652] psmouse serio1: elantech: PS/2 packet [
[ 179.705654] 0x24 , 0xed , 0xcf , 0x46 , 0xfd , 0xf3 ]
[ 179.716569] psmouse serio1: elantech: PS/2 packet [
[ 179.716573] 0x24 , 0xfa , 0xe9 , 0x46 , 0xfc , 0xec ]
[ 179.727776] psmouse serio1: elantech: PS/2 packet [
[ 179.727780] 0x24 , 0xfd , 0xe9 , 0x46 , 0xfa , 0xdc ]
[ 179.738985] psmouse serio1: elantech: PS/2 packet [
[ 179.738991] 0x24 , 0xff , 0xe9 , 0x46 , 0xf7 , 0xde ]
[ 179.851051] psmouse serio1: elantech: PS/2 packet [
[ 179.851057] 0x20 , 0x00 , 0xfd , 0x46 , 0x00 , 0x00 ]
On Wed, Nov 19, 2014 at 7:12 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Marcus,
>
> On Wed, Nov 19, 2014 at 07:00:16PM +0100, Marcus Overhagen wrote:
>> I'm not sure if my problems are related, but anyway:
>>
>> I'm using a Samsung NP730U3E notebook that also has an elantech touchpad.
>>
>> With 3.18.0-rc3 two finger scrolling in Firefox is smoth, but with
>> 3.18.0-rc5 I have to press a
>> lot harder and usually scrolling only startes after stopping the
>> movement shortly and retrying once
>>
>> I skipped rc4.
>>
>> from RC3 dmesg:
>> [ 20.507633] psmouse serio1: elantech: assuming hardware version 4
>> (with firmware version 0x675f04)
>> [ 20.520740] psmouse serio1: elantech: Synaptics capabilities query
>> result 0x10, 0x15, 0x0e.
>>
>
> Can you try reverting caeb0d37fa3e387eb0dd22e5d497523c002033d1 please?
> The rest should have no effect on you.
>
> Thanks.
>
> --
> Dmitry
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: Dmitry Torokhov @ 2014-11-19 18:39 UTC (permalink / raw)
To: Marcus Overhagen
Cc: Benjamin Tissoires, Ulrik De Bie, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <CAJBHPohu71BXqyZ4u74tAiP84UcQhXgto34k8NtNHPgw61WvLQ@mail.gmail.com>
On Wed, Nov 19, 2014 at 07:20:21PM +0100, Marcus Overhagen wrote:
> Hi,
>
> I will try reverting that, but may need until tomorrow or Friday.
>
> Just now I made a warm reboot from rc3 to rc5 and initially scrolling
> behaviour was ok, but after about a minute it went wrong and I got
> this:
>
> [ 179.705362] ------------[ cut here ]------------
> [ 179.705382] WARNING: CPU: 3 PID: 0 at
> drivers/input/mouse/elantech.c:433
> elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]()
> [ 179.705385] psmouse serio1: elantech: Unexpected trackpoint message
Or just this for now:
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 3fcb6b3..294f613 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -793,7 +793,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
unsigned char packet_type = packet[3] & 0x03;
bool sanity_check;
- if ((packet[3] & 0x0f) == 0x06)
+ if ((packet[3] & 0x0f) == 0x06 && etd->tp_dev)
return PACKET_TRACKPOINT;
/*
--
Dmitry
^ permalink raw reply related
* [PATCH] hid-multitouch: Add quirk for VTL touch panels
From: Mathieu Magnaudet @ 2014-11-19 18:41 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires; +Cc: linux-input, linux-kernel
VTL panels do not switch to the multitouch mode until the input mode
feature is read by the host. This should normally be done by
usbhid, but it looks like an other bug prevents usbhid to properly
retrieve the feature state. As a workaround, we force the reading of
the feature in mt_set_input_mode for such devices.
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Mathieu Magnaudet <mathieu.magnaudet@enac.fr>
---
drivers/hid/hid-ids.h | 3 +++
drivers/hid/hid-multitouch.c | 27 +++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 7c86373..d6cc6a9 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -931,6 +931,9 @@
#define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004
#define USB_DEVICE_ID_VERNIER_LCSPEC 0x0006
+#define USB_VENDOR_ID_VTL 0x0306
+#define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F 0xff3f
+
#define USB_VENDOR_ID_WACOM 0x056a
#define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81
#define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH 0x00BD
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 51e25b9..a4bc111 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -67,6 +67,7 @@ MODULE_LICENSE("GPL");
#define MT_QUIRK_IGNORE_DUPLICATES (1 << 10)
#define MT_QUIRK_HOVERING (1 << 11)
#define MT_QUIRK_CONTACT_CNT_ACCURATE (1 << 12)
+#define MT_QUIRK_FORCE_GET_FEATURE (1 << 13)
#define MT_INPUTMODE_TOUCHSCREEN 0x02
#define MT_INPUTMODE_TOUCHPAD 0x03
@@ -150,6 +151,7 @@ static void mt_post_parse(struct mt_device *td);
#define MT_CLS_FLATFROG 0x0107
#define MT_CLS_GENERALTOUCH_TWOFINGERS 0x0108
#define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0x0109
+#define MT_CLS_VTL 0x0110
#define MT_DEFAULT_MAXCONTACT 10
#define MT_MAX_MAXCONTACT 250
@@ -255,6 +257,11 @@ static struct mt_class mt_classes[] = {
.sn_move = 2048,
.maxcontacts = 40,
},
+ { .name = MT_CLS_VTL,
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+ MT_QUIRK_CONTACT_CNT_ACCURATE |
+ MT_QUIRK_FORCE_GET_FEATURE,
+ },
{ }
};
@@ -809,6 +816,9 @@ static void mt_set_input_mode(struct hid_device *hdev)
struct mt_device *td = hid_get_drvdata(hdev);
struct hid_report *r;
struct hid_report_enum *re;
+ struct mt_class *cls = &td->mtclass;
+ char *buf;
+ int report_len;
if (td->inputmode < 0)
return;
@@ -816,6 +826,18 @@ static void mt_set_input_mode(struct hid_device *hdev)
re = &(hdev->report_enum[HID_FEATURE_REPORT]);
r = re->report_id_hash[td->inputmode];
if (r) {
+ if (cls->quirks & MT_QUIRK_FORCE_GET_FEATURE) {
+ report_len = ((r->size - 1) >> 3) + 1 + (r->id > 0);
+ buf = kzalloc(report_len, GFP_KERNEL);
+ if (!buf) {
+ hid_err(hdev, "failed to allocate buffer for report\n");
+ return;
+ }
+ hid_hw_raw_request(hdev, r->id, buf, report_len,
+ HID_FEATURE_REPORT,
+ HID_REQ_GET_REPORT);
+ kfree(buf);
+ }
r->field[0]->value[td->inputmode_index] = td->inputmode_value;
hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
}
@@ -1281,6 +1303,11 @@ static const struct hid_device_id mt_devices[] = {
MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
+ /* VTL panels */
+ { .driver_data = MT_CLS_VTL,
+ MT_USB_DEVICE(USB_VENDOR_ID_VTL,
+ USB_DEVICE_ID_VTL_MULTITOUCH_FF3F) },
+
/* Wistron panels */
{ .driver_data = MT_CLS_NSMU,
MT_USB_DEVICE(USB_VENDOR_ID_WISTRON,
--
1.9.3
^ permalink raw reply related
* Re: [git pull] Input updates for 3.18-rc4
From: Marcus Overhagen @ 2014-11-19 19:23 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Benjamin Tissoires, Ulrik De Bie, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <20141119183921.GF37989@dtor-ws>
Hi Dmitry,
luckily I found some time right now. I haven't reverted the original large
patch, but I tested your short patch and it fixes the problem for me.
regards
Marcus
On Wed, Nov 19, 2014 at 7:39 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, Nov 19, 2014 at 07:20:21PM +0100, Marcus Overhagen wrote:
>> Hi,
>>
>> I will try reverting that, but may need until tomorrow or Friday.
>>
>> Just now I made a warm reboot from rc3 to rc5 and initially scrolling
>> behaviour was ok, but after about a minute it went wrong and I got
>> this:
>>
>> [ 179.705362] ------------[ cut here ]------------
>> [ 179.705382] WARNING: CPU: 3 PID: 0 at
>> drivers/input/mouse/elantech.c:433
>> elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]()
>> [ 179.705385] psmouse serio1: elantech: Unexpected trackpoint message
>
> Or just this for now:
>
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index 3fcb6b3..294f613 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -793,7 +793,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
> unsigned char packet_type = packet[3] & 0x03;
> bool sanity_check;
>
> - if ((packet[3] & 0x0f) == 0x06)
> + if ((packet[3] & 0x0f) == 0x06 && etd->tp_dev)
> return PACKET_TRACKPOINT;
>
> /*
>
> --
> Dmitry
^ permalink raw reply
* Re: bisected: IR press/release behavior changed in 3.17, repeat events
From: David Härdeman @ 2014-11-19 19:50 UTC (permalink / raw)
To: Stephan Raue; +Cc: linux-input, m.chehab, linux-media
In-Reply-To: <54679469.1010500@openelec.tv>
On Sat, Nov 15, 2014 at 06:59:05PM +0100, Stephan Raue wrote:
>Hi
>
>with kernel 3.17 using a RC6 remote with a buildin nuvoton IR receiver (not
>tested others, but i think its a common problem) when pressing/releasing the
>same button often within 1 second there will no release event sent. Instead
>we get repeat events. To get the release event i must press the same button
>with a delay of ~ 1sec.
>
>the evtest output for kernel with the difference 3.16 and 3.17 looks like
Hi,
could you try the working and non-working versions with debugging output
enabled from the in-kernel rc6 decoder (i.e. set debug for the rc-core
module) and post the two different outputs?
//David
^ permalink raw reply
* [Question: drivers/input/input.c] Why input_no is initialized to 0 ?
From: Aniroop Mathur @ 2014-11-19 20:01 UTC (permalink / raw)
To: Dmitry Torokhov, linux-input@vger.kernel.org
Dear Mr. Torokhov,
Greetings of the day ! :)
Recently, I saw input_allocate_device() funtion in input.c file and
faced one small doubt about it.
Unfortunately, I could not find the decent answer on internet. Can you
help to answer the query as follows:
In this function, input_no is initialized to 0.
static atomic_t input_no = ATOMIC_INIT(0);
and then it is used to set input device name like below:
dev_set_name(&dev->dev, "input%ld", (unsigned long)
atomic_inc_return(&input_no) - 1);
Here, we are increamenting input no by 1 and then again decreamenting by 1.
I think, it is because we have initialized input_no to 0 and we want
name of input devices to start from input0.
Is it not a good idea to initialize input_no to -1 and then only
increamenting input_no without subtracting when setting input device
name ?
With this, we will be able to save one extra subtraction instruction
every time input device is allocated.
Thanks in advance ! :)
Regards,
Aniroop Mathur
^ permalink raw reply
* Re: [Question: drivers/input/input.c] Why input_no is initialized to 0 ?
From: Dmitry Torokhov @ 2014-11-19 20:57 UTC (permalink / raw)
To: Aniroop Mathur; +Cc: linux-input@vger.kernel.org
In-Reply-To: <CADYu3087SYHPSzzEP+92Kh69fUN7gXS1otAsmT8SfuPLQB3h_A@mail.gmail.com>
Hi Aniroop,
On Thu, Nov 20, 2014 at 01:31:44AM +0530, Aniroop Mathur wrote:
> Dear Mr. Torokhov,
> Greetings of the day ! :)
>
> Recently, I saw input_allocate_device() funtion in input.c file and
> faced one small doubt about it.
> Unfortunately, I could not find the decent answer on internet. Can you
> help to answer the query as follows:
>
> In this function, input_no is initialized to 0.
> static atomic_t input_no = ATOMIC_INIT(0);
> and then it is used to set input device name like below:
> dev_set_name(&dev->dev, "input%ld", (unsigned long)
> atomic_inc_return(&input_no) - 1);
>
> Here, we are increamenting input no by 1 and then again decreamenting by 1.
> I think, it is because we have initialized input_no to 0 and we want
> name of input devices to start from input0.
>
> Is it not a good idea to initialize input_no to -1 and then only
> increamenting input_no without subtracting when setting input device
> name ?
> With this, we will be able to save one extra subtraction instruction
> every time input device is allocated.
Historically atomic_t on sparc32 had only 24 usable bits so I think
setting it to -1 would not have worked. Now it is no longer a concern,
but neither that extra subtraction is expensive so nobody bothered to
change it.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: ulrik.debie-os @ 2014-11-19 21:05 UTC (permalink / raw)
To: Marcus Overhagen
Cc: Dmitry Torokhov, Benjamin Tissoires, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <CAJBHPog3qRMQgNnso_csUOgR30A6eFPx4PkTzfCzkB3Gd5oVfQ@mail.gmail.com>
Hi,
Thanks Dmitry, the fix you provided will mitigate the regression. But
there might be more that is going on for v4 hardware. The detection
of PACKET_TRACKPOINT can be made more strict.
Thank you Marcus and Benjamin for the reports.
Sorry for the regression, it was not expected that lowest nibble of packet[3]
is 0x6 for non-trackpoint packets.
So we have two laptops where
1) according to the msb of the capabilities has no trackpoint
Benjamin, can you give feedback if the laptop has actually a trackpoint/stick/
how else one calls that strange but convenient thing in the middle of the
keyboard ?
Marcus, do you even have a trackpoint ?
2) mouse packets are received on serio that smell like a trackpoint packet.
When I look at the packet dump from marcus,
It would also fail the sanity check when crc_enabled is off, but probably
succeeds on marcus laptop ?
Marcus, can you send the firmware and capabilities information for your laptop
(it is available in the kernel messages). Could you send me a kernel message log for a period of 1 minute when using the touchpad with the debug set to 2 ?
I wonder packet[3]==0x46, why the 0x40 and 0x04 bits are set and the current
elantech driver does not do anything with that part of the information. The
packets from Marcus are probably v4 'MOTION' packets, and since the odd
behaviour when they are ignored, they at least are containing the motion
information, but maybe some extra information is hidden. There are multiple
of those packets in a very short timeframe (milliseconds), I wonder if all
of the MOTION packets have this signature.
At least now I'm happy that the warning is there, because otherwise it
might be more difficult to pinpoint the cause.
Thanks,
Ulrik
On Wed, Nov 19, 2014 at 08:23:32PM +0100, Marcus Overhagen wrote:
> Date: Wed, 19 Nov 2014 20:23:32 +0100
> From: Marcus Overhagen <marcus.overhagen@gmail.com>
> To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: Benjamin Tissoires <benjamin.tissoires@gmail.com>, Ulrik De Bie
> <ulrik.debie-os@e2big.org>, Hans de Goede <hdegoede@redhat.com>,
> "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, linux-input
> <linux-input@vger.kernel.org>, Jiri Kosina <jkosina@suse.cz>
> Subject: Re: [git pull] Input updates for 3.18-rc4
>
> Hi Dmitry,
>
> luckily I found some time right now. I haven't reverted the original large
> patch, but I tested your short patch and it fixes the problem for me.
>
> regards
> Marcus
>
> On Wed, Nov 19, 2014 at 7:39 PM, Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> > On Wed, Nov 19, 2014 at 07:20:21PM +0100, Marcus Overhagen wrote:
> >> Hi,
> >>
> >> I will try reverting that, but may need until tomorrow or Friday.
> >>
> >> Just now I made a warm reboot from rc3 to rc5 and initially scrolling
> >> behaviour was ok, but after about a minute it went wrong and I got
> >> this:
> >>
> >> [ 179.705362] ------------[ cut here ]------------
> >> [ 179.705382] WARNING: CPU: 3 PID: 0 at
> >> drivers/input/mouse/elantech.c:433
> >> elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]()
> >> [ 179.705385] psmouse serio1: elantech: Unexpected trackpoint message
> >
> > Or just this for now:
> >
> > diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> > index 3fcb6b3..294f613 100644
> > --- a/drivers/input/mouse/elantech.c
> > +++ b/drivers/input/mouse/elantech.c
> > @@ -793,7 +793,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
> > unsigned char packet_type = packet[3] & 0x03;
> > bool sanity_check;
> >
> > - if ((packet[3] & 0x0f) == 0x06)
> > + if ((packet[3] & 0x0f) == 0x06 && etd->tp_dev)
> > return PACKET_TRACKPOINT;
> >
> > /*
> >
> > --
> > Dmitry
^ permalink raw reply
* Re: [Question: drivers/input/input.c] Why input_no is initialized to 0 ?
From: Aniroop Mathur @ 2014-11-19 21:19 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input@vger.kernel.org
In-Reply-To: <20141119205713.GG37989@dtor-ws>
Hello Mr. Torokhov,
Thank you for your answer.
As it is not a problem now, How about changing it to -1 ?
Although extra subtraction is not expensive but still we could optimize it
as we want kernel to optimized as much as possible.
Regards,
Aniroop Mathur
On Thu, Nov 20, 2014 at 2:27 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Aniroop,
>
> On Thu, Nov 20, 2014 at 01:31:44AM +0530, Aniroop Mathur wrote:
>> Dear Mr. Torokhov,
>> Greetings of the day ! :)
>>
>> Recently, I saw input_allocate_device() funtion in input.c file and
>> faced one small doubt about it.
>> Unfortunately, I could not find the decent answer on internet. Can you
>> help to answer the query as follows:
>>
>> In this function, input_no is initialized to 0.
>> static atomic_t input_no = ATOMIC_INIT(0);
>> and then it is used to set input device name like below:
>> dev_set_name(&dev->dev, "input%ld", (unsigned long)
>> atomic_inc_return(&input_no) - 1);
>>
>> Here, we are increamenting input no by 1 and then again decreamenting by 1.
>> I think, it is because we have initialized input_no to 0 and we want
>> name of input devices to start from input0.
>>
>> Is it not a good idea to initialize input_no to -1 and then only
>> increamenting input_no without subtracting when setting input device
>> name ?
>> With this, we will be able to save one extra subtraction instruction
>> every time input device is allocated.
>
> Historically atomic_t on sparc32 had only 24 usable bits so I think
> setting it to -1 would not have worked. Now it is no longer a concern,
> but neither that extra subtraction is expensive so nobody bothered to
> change it.
>
> Thanks.
>
> --
> Dmitry
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: Marcus Overhagen @ 2014-11-19 21:49 UTC (permalink / raw)
To: Ulrik De Bie
Cc: Dmitry Torokhov, Benjamin Tissoires, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <20141119210552.GA5464@lantern>
On Wed, Nov 19, 2014 at 10:05 PM, <ulrik.debie-os@e2big.org> wrote:
> Marcus, do you even have a trackpoint ?
This is a clickpad without buttons and without trackpoint.
Looks similar to this image: http://i.imgur.com/5pcCxqa.jpg
> Marcus, can you send the firmware and capabilities information for your laptop
> (it is available in the kernel messages). Could you send me a kernel message log for a period of 1 minute when using the touchpad with the debug set to 2 ?
I sent you an email. hope that helps.
regards
Marcus
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: ulrik.debie-os @ 2014-11-19 21:54 UTC (permalink / raw)
To: Marcus Overhagen
Cc: Dmitry Torokhov, Benjamin Tissoires, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <CAJBHPoiQ0ZuW2TjDu68SQrgOS=+OMTt0hptBmVedMLS55td1Rg@mail.gmail.com>
On Wed, Nov 19, 2014 at 10:49:05PM +0100, Marcus Overhagen wrote:
> On Wed, Nov 19, 2014 at 10:05 PM, <ulrik.debie-os@e2big.org> wrote:
>
> > Marcus, do you even have a trackpoint ?
> This is a clickpad without buttons and without trackpoint.
> Looks similar to this image: http://i.imgur.com/5pcCxqa.jpg
>
> > Marcus, can you send the firmware and capabilities information for your laptop
> > (it is available in the kernel messages). Could you send me a kernel message log for a period of 1 minute when using the touchpad with the debug set to 2 ?
> I sent you an email. hope that helps.
>
I received it, thanks. It contains both packet[3]==0x42 and packet[3]==0x46,
but the touchpad part of the driver does not do anything different for the
bit 0x04. I'll anaylze the dump and look for patterns in the coming days.
Thanks again,
Ulrik
^ permalink raw reply
* Re: [git pull] Input updates for 3.18-rc4
From: Marcus Overhagen @ 2014-11-19 22:21 UTC (permalink / raw)
To: Ulrik De Bie
Cc: Dmitry Torokhov, Benjamin Tissoires, Hans de Goede,
linux-kernel@vger.kernel.org, linux-input, Jiri Kosina
In-Reply-To: <20141119215417.GC5464@lantern>
Hi,
when moving a single finger [3] seems to be one of 0x21, 0x25, 0x31, 0x35
moving two fingers [3] seems to be mostly 0x22, 0x26, 0x32, 0x36 but
also sometimes it's 0x42, 0x46, 0x52, 0x56.
It seems to occationally seems to switch between these two groups
after touching the pad with three or more fingers, but not every time.
Moving three fingers I see[3] beeing 0x26, 0x36, 0x76, 0x66 (probably more)
regards
Marcus
^ permalink raw reply
* Re: bisected: IR press/release behavior changed in 3.17, repeat events
From: Stephan Raue @ 2014-11-19 23:20 UTC (permalink / raw)
To: David Härdeman; +Cc: linux-input, m.chehab, linux-media
In-Reply-To: <20141119195019.GA20784@hardeman.nu>
Am 19.11.2014 um 20:50 schrieb David Härdeman:
> On Sat, Nov 15, 2014 at 06:59:05PM +0100, Stephan Raue wrote:
>> Hi
>>
>> with kernel 3.17 using a RC6 remote with a buildin nuvoton IR receiver (not
>> tested others, but i think its a common problem) when pressing/releasing the
>> same button often within 1 second there will no release event sent. Instead
>> we get repeat events. To get the release event i must press the same button
>> with a delay of ~ 1sec.
>>
>> the evtest output for kernel with the difference 3.16 and 3.17 looks like
> Hi,
>
> could you try the working and non-working versions with debugging output
> enabled from the in-kernel rc6 decoder (i.e. set debug for the rc-core
> module) and post the two different outputs?
>
> //David
>
Hi David
with kernel 3.17: (you dont see the messages with "toggle 1" here)
if i press once and wait:
[ 72.175548] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 72.175555] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 72.175559] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, protocol 0x0011, scancode 0x800f041f
[ 72.350377] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 72.350385] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 72.598265] keyup key 0x006c
[ 81.456175] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 81.456182] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 81.456186] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, protocol 0x0011, scancode 0x800f041f
[ 81.631033] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 81.631045] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 81.878230] keyup key 0x006c
[ 98.976060] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 98.976067] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 98.976071] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, protocol 0x0011, scancode 0x800f041f
[ 99.150910] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 99.150918] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 99.398575] keyup key 0x006c
with kernel 3.17 if i press the same key often without a longer break:
[ 298.971043] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 298.971051] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 298.971055] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, protocol 0x0011, scancode 0x800f041f
[ 299.162854] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.162863] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.273112] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.273119] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.396907] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.396913] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.484521] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.484533] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.649523] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.649533] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.822100] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.822107] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 299.970903] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 299.970910] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 300.133381] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 300.133392] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 300.310163] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 300.310168] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 300.496736] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 300.496743] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 300.660526] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 300.660535] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 300.829385] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 300.829390] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.005423] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.005430] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.167183] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.167195] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.330419] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.330426] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.505621] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.505628] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.686007] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.686013] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 301.846361] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 301.846370] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.016169] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.016180] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.186990] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.186997] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.364885] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.364893] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.507666] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.507673] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.634184] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.634191] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.762198] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.762206] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 302.942671] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 302.942678] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.085449] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.085456] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.186777] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.186784] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.271129] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.271143] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.348733] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.348743] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.513377] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.513382] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.616009] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.616019] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.688259] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.688265] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.752897] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.752905] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 303.940450] RC6(6A) proto 0x0011, scancode 0x800f041f (toggle: 0)
[ 303.940458] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 304.187848] keyup key 0x006c
[ 311.405294] RC6 decode failed at state 0 (250us pulse)
[ 311.405302] RC6 decode failed at state 0 (6350us space)
[ 331.899445] RC6 decode failed at state 0 (250us pulse)
[ 331.899454] RC6 decode failed at state 0 (6350us space)
with kernel 3.16: (you see messages with "RC6(6A) scancode 0x800f041f
(toggle: 1)"
pressing the buttons with some delay between:
[ 112.360318] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 112.360326] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 112.360330] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 112.484703] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 112.484711] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 112.733389] keyup key 0x006c
[ 114.605782] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 114.605795] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 114.605802] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 114.730174] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 114.730182] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 114.979244] keyup key 0x006c
[ 117.093793] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 117.093800] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 117.093805] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 117.218137] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 117.218144] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 117.465012] keyup key 0x006c
[ 125.029704] RC6 decode failed at state 0 (300us pulse)
[ 125.029714] RC6 decode failed at state 0 (95250us space)
[ 125.795347] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 125.795354] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 125.795358] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 125.919612] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 125.919623] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 126.168501] keyup key 0x006c
[ 128.740748] RC6 decode failed at state 0 (250us pulse)
[ 128.740756] RC6 decode failed at state 0 (95250us space)
pressing fast:
[ 192.644815] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 192.753373] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 192.753384] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 192.854618] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 192.854625] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 192.854627] keyup key 0x006c
[ 192.854631] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 192.960172] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 192.960178] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.063672] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 193.063686] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.063690] keyup key 0x006c
[ 193.063698] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 193.161351] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 193.161359] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.263223] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 193.263235] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.263238] keyup key 0x006c
[ 193.263245] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 193.366792] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 193.366800] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.487952] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 193.487959] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.487962] keyup key 0x006c
[ 193.487966] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 193.655452] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 193.655459] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.655462] keyup key 0x006c
[ 193.655466] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 193.757056] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 193.757064] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.858806] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 193.858811] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 193.858813] keyup key 0x006c
[ 193.858816] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 193.975154] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 193.975165] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 194.078759] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 194.078769] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 194.078772] keyup key 0x006c
[ 194.078776] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 194.204414] RC6(6A) scancode 0x800f041f (toggle: 1)
[ 194.204420] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 194.376145] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 194.376153] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 194.376156] keyup key 0x006c
[ 194.376160] Nuvoton w836x7hg Infrared Remote Transceiver: key down
event, key 0x006c, scancode 0x800f041f
[ 194.500541] RC6(6A) scancode 0x800f041f (toggle: 0)
[ 194.500548] Nuvoton w836x7hg Infrared Remote Transceiver: scancode
0x800f041f keycode 0x6c
[ 194.750393] keyup key 0x006c
greetings and thanks for your help
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 0/7] Fixes for ALPS trackstick
From: Pali Rohár @ 2014-11-19 23:29 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Hans de Goede, Yunkang Tang, Vadim Klishko, linux-input,
linux-kernel
In-Reply-To: <201411170839.17504@pali>
[-- Attachment #1: Type: Text/Plain, Size: 1083 bytes --]
On Monday 17 November 2014 08:39:14 Pali Rohár wrote:
> On Friday 14 November 2014 21:59:31 Dmitry Torokhov wrote:
> > Hi Pali,
> >
> > On Friday, November 14, 2014 08:38:19 PM Pali Rohár wrote:
> > > This patch series fix detection and identifying trackstick
> > > on machines with ALPS devices. Last patch split trackstick
> > > and bare PS/2 mouse packets between dev2 and dev3 input
> > > devices which make sure that driver will send only
> > > trackstick data to trackstick input device.
> >
> > Thank you for splitting the change, unfortunately it is now
> > quite big to apply to 3.18. Any chance you could try
> > implementing what I suggested in
> > http://www.spinics.net/lists/linux-input/msg34029.html and
> > then we can do the more comprehensive solution in 3.19.
> >
> > Thanks.
>
> Hello, I think that patches 1/7 and 5/7 could do that job. I
> did not tested them alone (without other patches), but if you
> think that two patches are ok for 3.18 & stable I can test
> them...
Dmitry, ping.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: bisected: IR press/release behavior changed in 3.17, repeat events
From: David Härdeman @ 2014-11-19 23:45 UTC (permalink / raw)
To: Stephan Raue; +Cc: linux-input, m.chehab, linux-media
In-Reply-To: <546D25D7.9050703@openelec.tv>
On Thu, Nov 20, 2014 at 12:20:55AM +0100, Stephan Raue wrote:
>with kernel 3.17: (you dont see the messages with "toggle 1" here)
>if i press once and wait:
Ummm...kinda embarassing...try swapping the order of the scancode and
toggle lines in the rc6 decoder (drivers/media/rc/ir-rc6-decoder.c).
They're somewhere around line 259, right after the case 32 statement.
case 32:
if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
protocol = RC_TYPE_RC6_MCE;
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
^ permalink raw reply
* Re: bisected: IR press/release behavior changed in 3.17, repeat events
From: Stephan Raue @ 2014-11-20 0:30 UTC (permalink / raw)
To: David Härdeman; +Cc: linux-input, m.chehab, linux-media
In-Reply-To: <20141119234539.GB16939@hardeman.nu>
Am 20.11.2014 um 00:45 schrieb David Härdeman:
> On Thu, Nov 20, 2014 at 12:20:55AM +0100, Stephan Raue wrote:
>> with kernel 3.17: (you dont see the messages with "toggle 1" here)
>> if i press once and wait:
> Ummm...kinda embarassing...try swapping the order of the scancode and
> toggle lines in the rc6 decoder (drivers/media/rc/ir-rc6-decoder.c).
>
> They're somewhere around line 259, right after the case 32 statement.
>
> case 32:
> if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
> protocol = RC_TYPE_RC6_MCE;
> scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
> toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
>
>
many thanks!!! this works :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] hid-multitouch: Add quirk for VTL touch panels
From: Benjamin Tissoires @ 2014-11-20 3:30 UTC (permalink / raw)
To: Jiri Kosina
Cc: Mathieu Magnaudet, Benjamin Tissoires, linux-input,
linux-kernel@vger.kernel.org
In-Reply-To: <1416422480-3241-1-git-send-email-mathieu.magnaudet@enac.fr>
On Wed, Nov 19, 2014 at 1:41 PM, Mathieu Magnaudet
<mathieu.magnaudet@gmail.com> wrote:
> VTL panels do not switch to the multitouch mode until the input mode
> feature is read by the host. This should normally be done by
> usbhid, but it looks like an other bug prevents usbhid to properly
> retrieve the feature state. As a workaround, we force the reading of
> the feature in mt_set_input_mode for such devices.
>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Signed-off-by: Mathieu Magnaudet <mathieu.magnaudet@enac.fr>
> ---
Jiri,
though this patch works for this particular device, I just thought at
something which may solve the problem in a different way. I asked
Mathieu to test the different solution, so I'd rather you to wait for
final confirmation before merging this patch.
Thanks,
Benjamin
> drivers/hid/hid-ids.h | 3 +++
> drivers/hid/hid-multitouch.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 30 insertions(+)
>
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 7c86373..d6cc6a9 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -931,6 +931,9 @@
> #define USB_DEVICE_ID_VERNIER_CYCLOPS 0x0004
> #define USB_DEVICE_ID_VERNIER_LCSPEC 0x0006
>
> +#define USB_VENDOR_ID_VTL 0x0306
> +#define USB_DEVICE_ID_VTL_MULTITOUCH_FF3F 0xff3f
> +
> #define USB_VENDOR_ID_WACOM 0x056a
> #define USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH 0x81
> #define USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH 0x00BD
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 51e25b9..a4bc111 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -67,6 +67,7 @@ MODULE_LICENSE("GPL");
> #define MT_QUIRK_IGNORE_DUPLICATES (1 << 10)
> #define MT_QUIRK_HOVERING (1 << 11)
> #define MT_QUIRK_CONTACT_CNT_ACCURATE (1 << 12)
> +#define MT_QUIRK_FORCE_GET_FEATURE (1 << 13)
>
> #define MT_INPUTMODE_TOUCHSCREEN 0x02
> #define MT_INPUTMODE_TOUCHPAD 0x03
> @@ -150,6 +151,7 @@ static void mt_post_parse(struct mt_device *td);
> #define MT_CLS_FLATFROG 0x0107
> #define MT_CLS_GENERALTOUCH_TWOFINGERS 0x0108
> #define MT_CLS_GENERALTOUCH_PWT_TENFINGERS 0x0109
> +#define MT_CLS_VTL 0x0110
>
> #define MT_DEFAULT_MAXCONTACT 10
> #define MT_MAX_MAXCONTACT 250
> @@ -255,6 +257,11 @@ static struct mt_class mt_classes[] = {
> .sn_move = 2048,
> .maxcontacts = 40,
> },
> + { .name = MT_CLS_VTL,
> + .quirks = MT_QUIRK_ALWAYS_VALID |
> + MT_QUIRK_CONTACT_CNT_ACCURATE |
> + MT_QUIRK_FORCE_GET_FEATURE,
> + },
> { }
> };
>
> @@ -809,6 +816,9 @@ static void mt_set_input_mode(struct hid_device *hdev)
> struct mt_device *td = hid_get_drvdata(hdev);
> struct hid_report *r;
> struct hid_report_enum *re;
> + struct mt_class *cls = &td->mtclass;
> + char *buf;
> + int report_len;
>
> if (td->inputmode < 0)
> return;
> @@ -816,6 +826,18 @@ static void mt_set_input_mode(struct hid_device *hdev)
> re = &(hdev->report_enum[HID_FEATURE_REPORT]);
> r = re->report_id_hash[td->inputmode];
> if (r) {
> + if (cls->quirks & MT_QUIRK_FORCE_GET_FEATURE) {
> + report_len = ((r->size - 1) >> 3) + 1 + (r->id > 0);
> + buf = kzalloc(report_len, GFP_KERNEL);
> + if (!buf) {
> + hid_err(hdev, "failed to allocate buffer for report\n");
> + return;
> + }
> + hid_hw_raw_request(hdev, r->id, buf, report_len,
> + HID_FEATURE_REPORT,
> + HID_REQ_GET_REPORT);
> + kfree(buf);
> + }
> r->field[0]->value[td->inputmode_index] = td->inputmode_value;
> hid_hw_request(hdev, r, HID_REQ_SET_REPORT);
> }
> @@ -1281,6 +1303,11 @@ static const struct hid_device_id mt_devices[] = {
> MT_USB_DEVICE(USB_VENDOR_ID_UNITEC,
> USB_DEVICE_ID_UNITEC_USB_TOUCH_0A19) },
>
> + /* VTL panels */
> + { .driver_data = MT_CLS_VTL,
> + MT_USB_DEVICE(USB_VENDOR_ID_VTL,
> + USB_DEVICE_ID_VTL_MULTITOUCH_FF3F) },
> +
> /* Wistron panels */
> { .driver_data = MT_CLS_NSMU,
> MT_USB_DEVICE(USB_VENDOR_ID_WISTRON,
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* Bisected two-finger scrolling regression on Lenovo Y50 (Re: [PATCH 1/5] Input: elantech - use elantech_report_trackpoint for hardware v4 too)
From: Anders Kaseorg @ 2014-11-20 6:58 UTC (permalink / raw)
To: Ulrik De Bie, Dmitry Torokhov; +Cc: linux-input, Hans de Goede, David Herrmann
In-Reply-To: <1409407846-15449-2-git-send-email-ulrik.debie-os@e2big.org>
On 08/30/2014 10:10 AM, Ulrik De Bie wrote:
> The Fujitsu H730 has hardware v4 with a trackpoint. This enables
> the elantech_report_trackpoint for v4.
Kernel 3.18-rc5 has made two-finger scrolling unusably glitchy on my
Lenovo Y50-70 Touch, and caused an associated kernel warning. I
bisected the regression to this commit (caeb0d37).
This may be the same as https://bugzilla.redhat.com/1165390, although
that only reports the warning, not the glitchy scrolling.
Anders
psmouse serio1: elantech: assuming hardware version 4 (with firmware
version 0x495f01)
psmouse serio1: elantech: Synaptics capabilities query result 0x70,
0x15, 0x0e.
input: ETPS/2 Elantech Touchpad as
/devices/platform/i8042/serio1/input/input6
[…]
------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at drivers/input/mouse/elantech.c:433
elantech_report_trackpoint.isra.5+0x199/0x1b0 [psmouse]()
psmouse serio1: elantech: Unexpected trackpoint message
Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE iptable_nat
nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
nf_conntrack ipt_REJECT xt_tcpudp iptable_filter ip_tables x_tables
bridge stp llc ctr ccm binfmt_misc bbswitch(OE) arc4 nls_iso8859_1
iwlmvm snd_hda_codec_hdmi mac80211 snd_hda_codec_realtek
snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec
intel_rapl uvcvideo snd_hwdep x86_pkg_temp_thermal videobuf2_vmalloc
intel_powerclamp snd_pcm videobuf2_memops videobuf2_core coretemp
v4l2_common snd_seq_midi videodev kvm_intel snd_seq_midi_event iwlwifi
media kvm joydev btusb snd_rawmidi serio_raw bluetooth cfg80211
hid_multitouch rtsx_pci_ms memstick snd_seq snd_seq_device snd_timer
ideapad_laptop mei_me sparse_keymap mei snd ie31200_edac
lpc_ich mac_hid edac_core soundcore shpchp parport_pc ppdev lp parport
autofs4 btrfs xor raid6_pq dm_crypt hid_generic usbhid hid
rtsx_pci_sdmmc crct10dif_pclmul crc32_pclmul ghash_clmulni_intel
aesni_intel i915 aes_x86_64 lrw gf128mul i2c_algo_bit glue_helper
ablk_helper drm_kms_helper cryptd psmouse ahci r8169 drm rtsx_pci
libahci mii wmi video
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G OE 3.17.0+ #2
Hardware name: LENOVO 20349/Lenovo Y50-70 Touch, BIOS 9ECN30WW(V1.13)
07/16/2014
0000000000000009 ffff88045f203cb0 ffffffff8277a436 ffff88045f203cf8
ffff88045f203ce8 ffffffff8207144d ffff88044352ea00 ffff880448b044f0
ffff880035da6400 0000000000000002 ffff88044352ea00 ffff88045f203d48
Call Trace:
<IRQ> [<ffffffff8277a436>] dump_stack+0x45/0x56
[<ffffffff8207144d>] warn_slowpath_common+0x7d/0xa0
[<ffffffff820714bc>] warn_slowpath_fmt+0x4c/0x50
[<ffffffffc0185309>] elantech_report_trackpoint.isra.5+0x199/0x1b0
[psmouse]
[<ffffffffc0185af8>] elantech_process_byte+0x6e8/0xf90 [psmouse]
[<ffffffffc017bd45>] psmouse_handle_byte+0x15/0x150 [psmouse]
[<ffffffffc017bf1f>] psmouse_interrupt+0x9f/0x360 [psmouse]
[<ffffffff825c2d06>] serio_interrupt+0x46/0x90
[<ffffffff825c44f7>] i8042_interrupt+0x197/0x3a0
[<ffffffff820c8477>] handle_irq_event_percpu+0x77/0x1a0
[<ffffffff820c85dd>] handle_irq_event+0x3d/0x60
[<ffffffff820cb316>] handle_edge_irq+0x66/0x130
[<ffffffff8201576e>] handle_irq+0x1e/0x40
[<ffffffff8278522d>] do_IRQ+0x4d/0xe0
[<ffffffff827830ad>] common_interrupt+0x6d/0x6d
<EOI> [<ffffffff82614965>] ? cpuidle_enter_state+0x65/0x160
[<ffffffff82614b47>] cpuidle_enter+0x17/0x20
[<ffffffff820b1dc7>] cpu_startup_entry+0x387/0x3c0
[<ffffffff8276f5f7>] rest_init+0x77/0x80
[<ffffffff82d45f9b>] start_kernel+0x461/0x46e
[<ffffffff82d45120>] ? early_idt_handlers+0x120/0x120
[<ffffffff82d454d7>] x86_64_start_reservations+0x2a/0x2c
[<ffffffff82d4561c>] x86_64_start_kernel+0x143/0x152
---[ end trace b67972f4dffebd79 ]---
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x06 , 0xe3 , 0x26 , 0x01 , 0xf3 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x09 , 0xbd , 0x26 , 0x00 , 0xe5 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0b , 0x90 , 0x36 , 0xfb , 0xb7 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0c , 0x84 , 0x36 , 0xfe , 0x9e ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x0c , 0x94 , 0x26 , 0x00 , 0x99 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x05 , 0x98 , 0x26 , 0x00 , 0x99 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0d , 0xba , 0x36 , 0xfd , 0xb3 ]
psmouse serio1: elantech: PS/2 packet [
0x50 , 0x00 , 0x19 , 0x26 , 0x00 , 0x1c ]
psmouse serio1: elantech: PS/2 packet [
0x50 , 0x04 , 0x1b , 0x26 , 0x00 , 0x19 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x11 , 0x46 , 0x36 , 0x01 , 0x53 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x09 , 0x48 , 0x36 , 0x0d , 0x39 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0b , 0x30 , 0x36 , 0x06 , 0x30 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0d , 0x2e , 0x36 , 0x06 , 0x2c ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0a , 0x1c , 0x36 , 0x01 , 0x18 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x07 , 0x17 , 0x36 , 0x06 , 0x11 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x01 , 0x0b , 0x36 , 0x04 , 0x07 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x02 , 0x03 , 0x36 , 0x02 , 0x02 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x03 , 0xfe , 0x26 , 0x02 , 0xfd ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x00 , 0xf8 , 0x26 , 0x01 , 0xfb ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x00 , 0x02 , 0x36 , 0x00 , 0x01 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x01 , 0x09 , 0x26 , 0xff , 0x02 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x07 , 0x18 , 0x36 , 0x00 , 0x07 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x0e , 0x3d , 0x36 , 0x0b , 0x29 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x1d , 0x6f , 0x36 , 0x19 , 0x5f ]
psmouse serio1: elantech: PS/2 packet [
0x50 , 0x06 , 0x19 , 0x26 , 0x05 , 0x1a ]
psmouse serio1: elantech: PS/2 packet [
0x50 , 0x07 , 0x1a , 0x26 , 0x06 , 0x18 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x26 , 0x6d , 0x36 , 0x1e , 0x6f ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x27 , 0x5f , 0x36 , 0x1f , 0x62 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x18 , 0x36 , 0x36 , 0x1c , 0x38 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x19 , 0x2a , 0x36 , 0x1b , 0x27 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x13 , 0x19 , 0x36 , 0x11 , 0x14 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x09 , 0x06 , 0x36 , 0x09 , 0x06 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x01 , 0xfd , 0x26 , 0x07 , 0xf5 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x00 , 0xf9 , 0x26 , 0x0a , 0xf1 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x03 , 0xd1 , 0x26 , 0x07 , 0xd0 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x06 , 0xe5 , 0x26 , 0x08 , 0xd6 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x04 , 0xf6 , 0x26 , 0x06 , 0xe8 ]
psmouse serio1: elantech: PS/2 packet [
0x44 , 0x02 , 0xfd , 0x26 , 0x04 , 0xf1 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x11 , 0x1d , 0x36 , 0x0e , 0x0b ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x16 , 0x2b , 0x36 , 0x18 , 0x18 ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x24 , 0x5a , 0x36 , 0x25 , 0x3c ]
psmouse serio1: elantech: PS/2 packet [
0x40 , 0x28 , 0x53 , 0x36 , 0x1d , 0x4e ]
> Reported-by: Stefan Valouch <stefan@valouch.com>
> Tested-by: Stefan Valouch <stefan@valouch.com>
> Tested-by: Alfredo Gemma <alfredo.gemma@gmail.com>
> Signed-off-by: Ulrik De Bie <ulrik.debie-os@e2big.org>
> ---
> drivers/input/mouse/elantech.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
> index da51738..f0a55b4d 100644
> --- a/drivers/input/mouse/elantech.c
> +++ b/drivers/input/mouse/elantech.c
> @@ -792,6 +792,9 @@ static int elantech_packet_check_v4(struct psmouse *psmouse)
> unsigned char packet_type = packet[3] & 0x03;
> bool sanity_check;
>
> + if ((packet[3]&0x0f) == 0x06)
> + return PACKET_TRACKPOINT;
> +
> /*
> * Sanity check based on the constant bits of a packet.
> * The constant bits change depending on the value of
> @@ -877,10 +880,19 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse)
>
> case 4:
> packet_type = elantech_packet_check_v4(psmouse);
> - if (packet_type == PACKET_UNKNOWN)
> + switch (packet_type) {
> + case PACKET_UNKNOWN:
> return PSMOUSE_BAD_DATA;
>
> - elantech_report_absolute_v4(psmouse, packet_type);
> + case PACKET_TRACKPOINT:
> + elantech_report_trackpoint(psmouse, packet_type);
> + break;
> +
> + default:
> + elantech_report_absolute_v4(psmouse, packet_type);
> + break;
> + }
> +
> break;
> }
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox