Input: synaptics - enable InterTouch for ThinkPad X1E/P1 2nd gen
Subsystems (2)
PATCH 1/1 Input: synaptics - enable InterTouch for ThinkPad X1E/P1 2nd gen
With the new RMI4 F3A support posted yesterday, this appears to maybe work, with a bootloader warning in dmesg:
psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4690] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1160..] psmouse serio1: synaptics: Trying to set up SMBus access rmi4_smbus 0-002c: registering SMbus-connected sensor
--> rmi4_f34 rmi4-00.fn34: rmi_f34v7_probe: Unrecognized bootloader version --> rmi4_f34: probe of rmi4-00.fn34 failed with error -22
rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3512-010, fw id: 2956703
input: Synaptics TM3512-010 as /devices/rmi4-00/input/input91
serio: RMI4 PS/2 pass-through port at rmi4-00.fn03
psmouse serio4: trackpoint: Elan TrackPoint firmware: 0x11, buttons: 3/3
input: TPPS/2 Elan TrackPoint as /devices/rmi4-00/rmi4-00.fn03/serio4/input/input92--- drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+)
drivers/input/mouse/synaptics.c +1 -0
@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */
Signature · 1 line
2.28.0
In addition to the dmesg warnings in the commit, I'm also getting this null ptr dereference, presumably when dereferencing f34->, which is NULL. Stack trace follows below, but it's pretty straightforward what's happening. Seems like Vincent's recent patchset might need some more work in being wired up with the f34 driver?
thinkpad /sys/devices/rmi4-00 # cat bootloader_id Killed
thinkpad /sys/devices/rmi4-00 # cat configuration_id (efault)
static ssize_t rmi_driver_bootloader_id_show(struct device *dev,
struct device_attribute *dattr, char *buf)
{
struct rmi_driver_data *data = dev_get_drvdata(dev);
struct rmi_function *fn = data->f34_container;
struct f34_data *f34;
if (fn) {
f34 = dev_get_drvdata(&fn->dev);
if (f34->bl_version == 5)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ f34-> dereferences
And then:
static ssize_t rmi_driver_configuration_id_show(struct device *dev,
struct device_attribute *dattr, char *buf)
{
struct rmi_driver_data *data = dev_get_drvdata(dev);
struct rmi_function *fn = data->f34_container;
struct f34_data *f34;
if (fn) {
f34 = dev_get_drvdata(&fn->dev);
return scnprintf(buf, PAGE_SIZE, "%s\n", f34->configuration_id);^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ f34-> dereferences
Same thing here, except scnprintf smartly just prints "(efault)".
[29815.060755] BUG: kernel NULL pointer dereference, address: 0000000000000008 [29815.060759] #PF: supervisor read access in kernel mode [29815.060761] #PF: error_code(0x0000) - not-present page [29815.060763] PGD 0 P4D 0 [29815.060768] Oops: 0000 [#1] SMP [29815.060773] CPU: 8 PID: 399580 Comm: cat Tainted: P S U W O 5.9.0-rc7+ #143 [29815.060775] Hardware name: LENOVO 20QTCTO1WW/20QTCTO1WW, BIOS N2OET47W (1.34 ) 08/06/2020 [29815.060789] RIP: 0010:rmi_driver_bootloader_id_show+0x1c/0x60 [rmi_core] [29815.060793] Code: 48 98 c3 66 66 2e 0f 1f 84 00 00 00 00 00 49 89 f8 49 8b 40 78 48 89 d7 48 8b 50 20 31 c0 48 85 d2 74 2c 48 8b 82 90 00 00 00 <80> 78 08 05 44 0f b6 48 09 0f b6 48 0a 74 17 45 89 c8 48 c7 c2 8a [29815.060796] RSP: 0018:ffff88888a2c3e38 EFLAGS: 00010286 [29815.060799] RAX: 0000000000000000 RBX: ffffffffa0405960 RCX: 0000000000000000 [29815.060801] RDX: ffff888fc51cb400 RSI: ffffffffa0405960 RDI: ffff8888b4366000 [29815.060803] RBP: 0000000000001000 R08: ffff888fc51cac00 R09: ffff8888b4366000 [29815.060805] R10: 000000000000eba8 R11: 0000000000001008 R12: ffffffff81c7bed0 [29815.060807] R13: ffff888fc51cac00 R14: ffff888dea8e2e40 R15: ffff888ff0bdb470 [29815.060810] FS: 00007f09168155c0(0000) GS:ffff888ffc400000(0000) knlGS:0000000000000000 [29815.060813] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [29815.060815] CR2: 0000000000000008 CR3: 0000000dffa43001 CR4: 00000000003706e0 [29815.060817] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [29815.060819] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [29815.060820] Call Trace: [29815.060831] dev_attr_show+0x11/0x30 [29815.060837] sysfs_kf_seq_show+0x8f/0xd0 [29815.060843] seq_read+0xa3/0x400 [29815.060850] vfs_read+0x94/0x180 [29815.060855] ksys_read+0x4a/0xc0 [29815.060861] do_syscall_64+0x2d/0x40 [29815.060866] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [29815.060869] RIP: 0033:0x7f091674145e [29815.060873] Code: c0 e9 b6 fe ff ff 50 48 8d 3d be e0 09 00 e8 f9 e4 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28 [29815.060875] RSP: 002b:00007ffffed954d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [29815.060879] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007f091674145e [29815.060881] RDX: 0000000000020000 RSI: 00007f0916823000 RDI: 0000000000000003 [29815.060882] RBP: 00007f0916823000 R08: 00007f0916822010 R09: 0000000000000000 [29815.060884] R10: fffffffffffffbcf R11: 0000000000000246 R12: 0000000000000000 [29815.060886] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000020000 [29815.060968] CR2: 0000000000000008 [29815.060973] ---[ end trace ab9fd5f66457177d ]--- [29815.205960] RIP: 0010:rmi_driver_bootloader_id_show+0x1c/0x60 [rmi_core] [29815.205965] Code: 48 98 c3 66 66 2e 0f 1f 84 00 00 00 00 00 49 89 f8 49 8b 40 78 48 89 d7 48 8b 50 20 31 c0 48 85 d2 74 2c 48 8b 82 90 00 00 00 <80> 78 08 05 44 0f b6 48 09 0f b6 48 0a 74 17 45 89 c8 48 c7 c2 8a [29815.205965] RSP: 0018:ffff88888a2c3e38 EFLAGS: 00010286 [29815.205967] RAX: 0000000000000000 RBX: ffffffffa0405960 RCX: 0000000000000000 [29815.205967] RDX: ffff888fc51cb400 RSI: ffffffffa0405960 RDI: ffff8888b4366000 [29815.205968] RBP: 0000000000001000 R08: ffff888fc51cac00 R09: ffff8888b4366000 [29815.205968] R10: 000000000000eba8 R11: 0000000000001008 R12: ffffffff81c7bed0 [29815.205969] R13: ffff888fc51cac00 R14: ffff888dea8e2e40 R15: ffff888ff0bdb470 [29815.205970] FS: 00007f09168155c0(0000) GS:ffff888ffc400000(0000) knlGS:0000000000000000 [29815.205971] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [29815.205971] CR2: 0000000000000008 CR3: 0000000dffa43001 CR4: 00000000003706e0 [29815.205972] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [29815.205972] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Quoted 37 lines · Jason A. Donenfeld
With the new RMI4 F3A support posted yesterday, this appears to maybe work, with a bootloader warning in dmesg:
psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4690] psmouse serio1: synaptics: queried min coordinates: x [1266..], y [1160..] psmouse serio1: synaptics: Trying to set up SMBus access
rmi4_smbus0-002c: registering SMbus-connected sensor
-->rmi4_f34rmi4-00.fn34:rmi_f34v7_probe: Unrecognized bootloader version -->rmi4_f34: probe of rmi4-00.fn34 failed with error -22rmi4_f01 rmi4-00.fn01: found RMI device, manufacturer: Synaptics, product: TM3512-010, fw id: 2956703 input: Synaptics TM3512-010 as /devices/rmi4-00/input/input91 serio: RMI4 PS/2 pass-through port at rmi4-00.fn03 psmouse serio4: trackpoint: Elan TrackPoint firmware: 0x11, buttons: 3/3 input: TPPS/2 Elan TrackPoint as /devices/rmi4-00/rmi4-00.fn03/serio4/input/input92Cc Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/input/mouse/synaptics.c | 1 + 1 file changed, 1 insertion(+)drivers/input/mouse/synaptics.c +1
-1@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */ --2.28.0
PATCH v2 1/1 Input: synaptics - enable InterTouch for ThinkPad X1E/P1 2nd gen
With the new RMI4 F3A support posted yesterday, this appears to maybe work, but requires us to add support for the newer bootloader, which this commit does.
--- drivers/input/mouse/synaptics.c | 1 + drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/input/mouse/synaptics.c +1 -0
@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */
drivers/input/rmi4/rmi_f34v7.c +5 -2
@@ -1364,9 +1364,12 @@ int rmi_f34v7_probe(struct f34_data *f34) f34->bl_version =6 ; }else if (f34->bootloader_id[1 ] ==7 ) { f34->bl_version =7 ; + }else if (f34->bootloader_id[1 ] ==8 ) { + f34->bl_version =8 ; }else { -dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version\n" , - __func__); +dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version: %d (%c) %d (%c)\n" , + __func__, f34->bootloader_id[0 ], f34->bootloader_id[0 ], + f34->bootloader_id[1 ], f34->bootloader_id[1 ]);return -EINVAL ; }
Signature · 1 line
2.28.0
Maybe correct the comment in smbus_pnp_ids to reflect this handles both the X1 Extreme and P2 2nd Gen. Then I'd probably split the bootloader change into a commit that comes before adding the new PnP IDs.
Otherwise though:
Let's see what the folks from synaptics say
Quoted 47 lines · Jason A. Donenfeld
With the new RMI4 F3A support posted yesterday, this appears to maybe work, but requires us to add support for the newer bootloader, which this commit does.
Cc Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/input/mouse/synaptics.c | 1 + drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)drivers/input/mouse/synaptics.c +1
-0@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */drivers/input/rmi4/rmi_f34v7.c +5
-2@@ -1364,9 +1364,12 @@ int rmi_f34v7_probe(struct f34_data *f34) f34->bl_version =6 ; }else if (f34->bootloader_id[1 ] ==7 ) { f34->bl_version =7 ; + }else if (f34->bootloader_id[1 ] ==8 ) { + f34->bl_version =8 ; }else { -dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version\n", - __func__); + dev_err(&f34->fn->dev, "%s: Unrecognized bootloader version: %d (%c) %d (%c)\n", + __func__, f34->bootloader_id[0], f34- >bootloader_id[0], + f34->bootloader_id[1], f34->bootloader_id[1]);drivers/input/rmi4/rmi_f34v7.c +0
-0return -EINVAL ; }
Signature · 3 lines
Cheers, Lyude Paul (she/her) Software Engineer at Red Hat
Quoted 4 lines · Lyude Paul
Maybe correct the comment in
smbus_pnp_idsto reflect this handles both the X1 Extreme and P2 2nd Gen. Then I'd probably split the bootloader change into a commit that comes before adding the new PnP IDs.
Okay, I'll submit a v3.
One thing I should note is that the sensitivity sysfs entry doesn't seem to do anything at all. push_to_click works, but not sensitivity. I don't know if this has bitrotted over the years and I shouldn't expect it to work, as it rarely does or something, but thought I should mention this.
Jason
Quoted 59 lines
Otherwise though:
Acked-by Lyude Paul <[email protected]>Let's see what the folks from synaptics say
Quoted 44 lines · Jason A. Donenfeld
With the new RMI4 F3A support posted yesterday, this appears to maybe work, but requires us to add support for the newer bootloader, which this commit does.
Cc Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/input/mouse/synaptics.c | 1 + drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)drivers/input/mouse/synaptics.c +1
-0@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */drivers/input/rmi4/rmi_f34v7.c +5
-2@@ -1364,9 +1364,12 @@ int rmi_f34v7_probe(struct f34_data *f34) f34->bl_version =6 ; }else if (f34->bootloader_id[1 ] ==7 ) { f34->bl_version =7 ; + }else if (f34->bootloader_id[1 ] ==8 ) { + f34->bl_version =8 ; }else { -dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version\n", - __func__); + dev_err(&f34->fn->dev, "%s: Unrecognized bootloader version: %d (%c) %d (%c)\n", + __func__, f34->bootloader_id[0], f34- >bootloader_id[0], + f34->bootloader_id[1], f34->bootloader_id[1]);Quoted 3 lines
return -EINVAL; }--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
Quoted 6 lines · Jason A. Donenfeld
Quoted 4 lines · Lyude Paul
Maybe correct the comment in
smbus_pnp_idsto reflect this handles both the X1
Extreme and P2 2nd Gen. Then I'd probably split the bootloader change into a commit that comes before adding the new PnP IDs.
Quoted 7 lines
Okay, I'll submit a v3.
One thing I should note is that the sensitivity sysfs entry doesn't seem to do anything at all.
push_to_clickworks, but not sensitivity. I don't know if this has bitrotted over the years and I shouldn't expect it to work, as it rarely does or something, but thought I should mention this.
Interesting-it's entirely possible that maybe the firmware on this trackpoint is different from the previous ones (only mention this possibility since it looks like at some point in time they switched over from using the legitimate IBM trackpoint modules to getting other manufacturers to make them). I know the sensitivity setting works on my laptop with PS/2 through RMI4 though.
Could you maybe enable rmi4 debugging by passing rmi_core.debug_flags=0xff when you boot your machine and get me the dmesg output from that after you've tried changing the sensitivity value? Not sure I could fix it, but it'd be interesting to see what's happening on the ps/2 side here
Quoted 63 lines
Jason
Quoted 60 lines
Otherwise though:
Acked-by Lyude Paul <[email protected]>Let's see what the folks from synaptics say
Quoted 46 lines · Jason A. Donenfeld
With the new RMI4 F3A support posted yesterday, this appears to maybe work, but requires us to add support for the newer bootloader, which this commit does.
Cc Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/input/mouse/synaptics.c | 1 + drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-)drivers/input/mouse/synaptics.c +1
-0@@ -180,6 +180,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ "LEN0099" ,/* X1 Extreme 1st */ +"LEN0402" ,/* X1 Extreme 2nd */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */drivers/input/rmi4/rmi_f34v7.c +5
-2@@ -1364,9 +1364,12 @@ int rmi_f34v7_probe(struct f34_data *f34) f34->bl_version =6 ; }else if (f34->bootloader_id[1 ] ==7 ) { f34->bl_version =7 ; + }else if (f34->bootloader_id[1 ] ==8 ) { + f34->bl_version =8 ; }else { -dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version\n", - __func__); + dev_err(&f34->fn->dev, "%s: Unrecognized bootloader version: %d (%c) %d (%c)\n", + __func__, f34->bootloader_id[0], f34- > bootloader_id[0], + f34->bootloader_id[1], f34-Quoted 1 line
bootloader_id[1]);
Quoted 3 lines
return -EINVAL; }--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
Signature · 3 lines
Sincerely,
Lyude Paul (she/her)
Software Engineer at Red HatQuoted 16 lines · Lyude Paul
Quoted 6 lines · Jason A. Donenfeld
Quoted 4 lines · Lyude Paul
Maybe correct the comment in
smbus_pnp_idsto reflect this handles both the X1
Extreme and P2 2nd Gen. Then I'd probably split the bootloader change into a commit that comes before adding the new PnP IDs.Quoted 7 lines
Okay, I'll submit a v3.
One thing I should note is that the sensitivity sysfs entry doesn't seem to do anything at all.
push_to_clickworks, but not sensitivity. I don't know if this has bitrotted over the years and I shouldn't expect it to work, as it rarely does or something, but thought I should mention this.
Quoted 4 lines
Interesting-it's entirely possible that maybe the firmware on this trackpoint is different from the previous ones (only mention this possibility since it looks like at some point in time they switched over from using the legitimate IBM trackpoint modules to getting other manufacturers to make them).
Yea, a bummer. The P1 gen 2 has an ELAN. Far cry from all the nice features supported by the IBM ones.
Quoted 2 lines
I know the
sensitivity setting works on my laptop with PS/2 through RMI4 though.
Right. My prior P50 worked fine with it.
Quoted 5 lines
Could you maybe enable rmi4 debugging by passing rmi_core.debug_flags=0xff when you boot your machine and get me the dmesg output from that after you've tried changing the sensitivity value? Not sure I could fix it, but it'd be interesting to see what's happening on the ps/2 side here
Sure. Writing 200 into sensitivity gives:
[28653.834012] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote f5 to PS/2 passthrough address [28653.834989] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (f5) [28653.848217] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa from PS2 guest T: N P: N [28653.848301] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote e2 to PS/2 passthrough address [28653.849079] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (e2) [28653.857787] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa from PS2 guest T: N P: N [28653.857868] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote 81 to PS/2 passthrough address [28653.858643] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (81) [28653.865220] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa from PS2 guest T: N P: N [28653.865285] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote 4a to PS/2 passthrough address [28653.866053] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (4a) [28653.872889] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa from PS2 guest T: N P: N [28653.872952] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote c8 to PS/2 passthrough address [28653.873927] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (c8) [28653.880331] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa from PS2 guest T: N P: N [28653.880397] rmi4_f03 rmi4-00.fn03: rmi_f03_pt_write: Wrote f4 to PS/2 passthrough address [28653.881156] rmi4_smbus 0-002c: wrote 1 bytes at 0x02: 0 (f4) [28653.888285] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received fa
from PS2 guest T: N P: N
Subsequently, moving the trackpoint around gives the usual output:
[28765.017676] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 05 from PS2 guest T: N P: N [28765.017677] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received ff from PS2 guest T: N P: N [28765.025214] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 28 from PS2 guest T: N P: N [28765.025216] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 06 from PS2 guest T: N P: N [28765.025216] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received ff from PS2 guest T: N P: N [28765.050927] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 28 from PS2 guest T: N P: N [28765.050929] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 05 from PS2 guest T: N P: N [28765.050951] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received ff from PS2 guest T: N P: N [28765.050958] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 08 from PS2 guest T: N P: N [28765.050959] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 04 from PS2 guest T: N P: N [28765.050959] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 00 from PS2 guest T: N P: N [28765.099642] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 18 from PS2 guest T: N P: N [28765.099644] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received ff from PS2 guest T: N P: N [28765.099644] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 00 from PS2 guest T: N P: N [28765.099651] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 18 from PS2 guest T: N P: N [28765.099652] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received ff from PS2 guest T: N P: N [28765.099652] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 00 from PS2 guest T: N P: N [28765.230269] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 08 from PS2 guest T: N P: N [28765.230276] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 00 from PS2 guest T: N P: N [28765.230279] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 01 from PS2 guest T: N P: N [28765.270171] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 08 from PS2 guest T: N P: N [28765.270178] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 00 from PS2 guest T: N P: N [28765.270181] rmi4_f03 rmi4-00.fn03: rmi_f03_attention: Received 01
from PS2 guest T: N P: N
v3 cover Support trackpoint and touchpad in Thinkpad P1 gen 2 / X1E gen 2
In reply to Lyude PaulThese piggyback on the recent F3A support from Vincent Huang to add RMI4 support to the Thinkpad P1 gen 2 and the Thinkpad X1E gen 2.
Jason A. Donenfeld (2):
Input: synaptics-rmi4 - support bootloader v8 in f34v7
Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
drivers/input/mouse/synaptics.c | 3 ++- drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-)
Signature · 1 line
2.28.0
PATCH v3 1/2 Input: synaptics-rmi4 - support bootloader v8 in f34v7
With the recent addition of the F3A support, we can now accept bootloader v8, which will help support recent Thinkpads.
--- drivers/input/rmi4/rmi_f34v7.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/input/rmi4/rmi_f34v7.c +5 -2
@@ -1364,9 +1364,12 @@ int rmi_f34v7_probe(struct f34_data *f34) f34->bl_version =6 ; }else if (f34->bootloader_id[1 ] ==7 ) { f34->bl_version =7 ; + }else if (f34->bootloader_id[1 ] ==8 ) { + f34->bl_version =8 ; }else { -dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version\n" , - __func__); +dev_err (&f34->fn->dev,"%s: Unrecognized bootloader version: %d (%c) %d (%c)\n" , + __func__, f34->bootloader_id[0 ], f34->bootloader_id[0 ], + f34->bootloader_id[1 ], f34->bootloader_id[1 ]);return -EINVAL ; }
Signature · 1 line
2.28.0
Re: [PATCH v3 1/2] Input: synaptics-rmi4 - support bootloader v8 in f34v7
Quoted 6 lines · Jason A. Donenfeld
With the recent addition of the F3A support, we can now accept bootloader v8, which will help support recent Thinkpads.
Acked-by Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry
PATCH v3 2/2 Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
In reply to Jason A. DonenfeldWith the new RMI4 F3A support, we're now able to enable full RMI4 support for this model. We also tidy up the comments a bit, as the X1E is essentially the same computer as the P1.
--- drivers/input/mouse/synaptics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/mouse/synaptics.c +2 -1
@@ -179,7 +179,8 @@ static const char * const smbus_pnp_ids[] = {"LEN0093" ,/* T480 */ "LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ -"LEN0099" ,/* X1 Extreme 1st */ +"LEN0099" ,/* X1 Extreme Gen 1 / P1 Gen 1 */ +"LEN0402" ,/* X1 Extreme Gen 2 / P1 Gen 2 */ "LEN009b" ,/* T580 */ "LEN200f" ,/* T450s */ "LEN2044", /* L470 */
Signature · 1 line
2.28.0
Dmitry Torokhov
maintainerRe: [PATCH v3 2/2] Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
Quoted 16 lines · Jason A. Donenfeld
With the new RMI4 F3A support, we're now able to enable full RMI4 support for this model. We also tidy up the comments a bit, as the X1E is essentially the same computer as the P1.
Acked-by Lyude Paul <[email protected]>Cc Vincent Huang <[email protected]>Signed-off-by Jason A. Donenfeld <[email protected]>--- drivers/input/mouse/synaptics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/input/mouse/synaptics.c +0
-0
drivers/input/mouse/synaptics.c static const char * const smbus_pnp_ids[] = { · line 183
Quoted 6 lines
drivers/input/mouse/synaptics.c +2
-1@@ -179,7 +179,8 @@ static const char * const smbus_pnp_ids[] = {"LEN0093" ,/* T480 */ "LEN0096" ,/* X280 */ "LEN0097" ,/* X280 -> ALPS trackpoint */ - "LEN0099", /* X1 Extreme 1st */ +"LEN0099" ,/* X1 Extreme Gen 1 / P1 Gen 1 */ + "LEN0402", /* X1 Extreme Gen 2 / P1 Gen 2 */
Moved this entry one down to keep the list sorted, and applied, thank you.
Signature · 1 line
Dmitry
Re: [PATCH v3 2/2] Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
In reply to Jason A. DonenfeldOddly, CPU usage seems exceedingly high when using the trackpoint, in the rmi4 irq handler. Running perf-top indicates a hotspot ini801_access calling "in (%dx),%al", which makes sense. I wonder:
is this a culprit of expensive accesses in general, which Sultan (CC'd) has been working on? Or are we hitting something different here? Improper IRQ masking in the i801 code?
Jason
Re: [PATCH v3 2/2] Input: synaptics - enable InterTouch for ThinkPad P1/X1E gen 2
More IRQ grumpiness:
[221465.585227] irq 16: nobody cared (try booting with the "irqpoll" option) [221465.585228] CPU: 0 PID: 0 Comm: swapper/0 Tainted: P S U O 5.9.0-rc8+ #145 [221465.585229] Hardware name: LENOVO 20QTCTO1WW/20QTCTO1WW, BIOS N2OET47W (1.34 ) 08/06/2020 [221465.585229] Call Trace: [221465.585230] <IRQ> [221465.585234] dump_stack+0x57/0x70 [221465.585236] __report_bad_irq+0x30/0xa2 [221465.585237] note_interrupt.cold+0xb/0x6b [221465.585237] handle_irq_event+0x78/0x7a [221465.585238] handle_fasteoi_irq+0x6d/0x190 [221465.585240] asm_call_irq_on_stack+0xf/0x20 [221465.585241] </IRQ> [221465.585242] common_interrupt+0xa9/0x120 [221465.585243] asm_common_interrupt+0x1e/0x40 [221465.585245] RIP: 0010:cpuidle_enter_state+0xc5/0x320 [221465.585246] Code: c7 0f 1f 44 00 00 31 ff e8 78 2c b0 ff 80 7c 24 0f 00 74 12 9c 58 f6 c4 02 0f 85 41 02 00 00 31 ff e8 0f a4 b4 ff fb 45 85 e4 <0f> 88 fd 00 00 00 49 63 d4 48 6b ca 68 4c 2b 3c 24 48 6b c2 38 48 [221465.585246] RSP: 0018:ffffffff82003e80 EFLAGS: 00000202 [221465.585247] RAX: ffff888ffc228f00 RBX: ffffe8ffffa37608 RCX: 000000000000001f [221465.585247] RDX: 0000000000000000 RSI: 00000000378e38e3 RDI: 0000000000000000 [221465.585248] RBP: ffffffff8209fdc0 R08: 0000c96bf989794d R09: 0000000000000008 [221465.585248] R10: 0000000000000005 R11: ffff888ffc228004 R12: 0000000000000001 [221465.585249] R13: ffffffff8209fe40 R14: 0000000000000001 R15: 0000c96bf989794d [221465.585250] cpuidle_enter+0x24/0x40 [221465.585252] do_idle+0x1a4/0x220 [221465.585253] cpu_startup_entry+0x14/0x20 [221465.585254] start_kernel+0x48d/0x497 [221465.585256] secondary_startup_64+0xb6/0xc0 [221465.585257] handlers: [221465.585258] [<00000000498461dd>] i801_isr [221465.585258] Disabling IRQ #16 [221480.253990] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221480.253995] i801_smbus 0000:00:1f.4: Transaction timeout [221480.256149] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221484.287300] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221484.287304] i801_smbus 0000:00:1f.4: Transaction timeout [221484.289461] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221484.490637] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221484.490641] i801_smbus 0000:00:1f.4: Transaction timeout [221484.492793] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221484.693965] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221484.693970] i801_smbus 0000:00:1f.4: Transaction timeout [221484.696126] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221484.897307] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221484.897311] i801_smbus 0000:00:1f.4: Transaction timeout [221484.899466] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221485.100643] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221485.100647] i801_smbus 0000:00:1f.4: Transaction timeout [221485.102800] rmi4_physical rmi4-00: Failed to read irqs, code=-110 [221485.303911] i801_smbus 0000:00:1f.4: Timeout waiting for interrupt! [221485.303915] i801_smbus 0000:00:1f.4: Transaction timeout [221485.306024] rmi4_physical rmi4-00: Failed to read irqs, code=-110