Patch "HID: magicmouse: Do not set BTN_MOUSE on double report" has been added to the 4.9-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: magicmouse: Do not set BTN_MOUSE on double report

to the 4.9-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-magicmouse-do-not-set-btn_mouse-on-double-report.patch
and it can be found in the queue-4.9 subdirectory.

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



commit 6feb6f6beea6f291c6a5ab049e23e8451af4c4ae
Author: José Expósito <jose.exposito89@xxxxxxxxx>
Date:   Sun Oct 9 20:27:47 2022 +0200

    HID: magicmouse: Do not set BTN_MOUSE on double report
    
    [ Upstream commit bb5f0c855dcfc893ae5ed90e4c646bde9e4498bf ]
    
    Under certain conditions the Magic Trackpad can group 2 reports in a
    single packet. The packet is split and the raw event function is
    invoked recursively for each part.
    
    However, after processing each part, the BTN_MOUSE status is updated,
    sending multiple click events. [1]
    
    Return after processing double reports to avoid this issue.
    
    Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/811  # [1]
    Fixes: a462230e16ac ("HID: magicmouse: enable Magic Trackpad support")
    Reported-by: Nulo <git@xxxxxxx>
    Signed-off-by: José Expósito <jose.exposito89@xxxxxxxxx>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221009182747.90730-1-jose.exposito89@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 8c993f95e3ba..396a3c720b51 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -342,7 +342,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,
 		magicmouse_raw_event(hdev, report, data + 2, data[1]);
 		magicmouse_raw_event(hdev, report, data + 2 + data[1],
 			size - 2 - data[1]);
-		break;
+		return 0;
 	default:
 		return 0;
 	}



[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