Patch "HID: lenovo: Restrict detection of patched firmware only to USB cptkbd" has been added to the 5.15-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    HID: lenovo: Restrict detection of patched firmware only to USB cptkbd

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     hid-lenovo-restrict-detection-of-patched-firmware-on.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 23f45bd23d4b9e078ef08fe97bbb3d7236a3f31c
Author: Mikhail Khvainitski <me@xxxxxxxxxxxxxxx>
Date:   Tue Dec 12 15:31:48 2023 +0200

    HID: lenovo: Restrict detection of patched firmware only to USB cptkbd
    
    [ Upstream commit 43527a0094c10dfbf0d5a2e7979395a38de3ff65 ]
    
    Commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and
    stop applying workaround") introduced a regression for ThinkPad
    TrackPoint Keyboard II which has similar quirks to cptkbd (so it uses
    the same workarounds) but slightly different so that there are
    false-positives during detecting well-behaving firmware. This commit
    restricts detecting well-behaving firmware to the only model which
    known to have one and have stable enough quirks to not cause
    false-positives.
    
    Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround")
    Link: https://lore.kernel.org/linux-input/ZXRiiPsBKNasioqH@jekhomev/
    Link: https://bbs.archlinux.org/viewtopic.php?pid=2135468#p2135468
    Signed-off-by: Mikhail Khvainitski <me@xxxxxxxxxxxxxxx>
    Tested-by: Yauhen Kharuzhy <jekhor@xxxxxxxxx>
    Signed-off-by: Jiri Kosina <jkosina@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 901c1959efed4..965bddaa90aee 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -540,7 +540,8 @@ static int lenovo_event_cptkbd(struct hid_device *hdev,
 		 * so set middlebutton_state to 3
 		 * to never apply workaround anymore
 		 */
-		if (cptkbd_data->middlebutton_state == 1 &&
+		if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD &&
+				cptkbd_data->middlebutton_state == 1 &&
 				usage->type == EV_REL &&
 				(usage->code == REL_X || usage->code == REL_Y)) {
 			cptkbd_data->middlebutton_state = 3;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux