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

    HID: clean up quirk for Sony RF receivers

to the 3.4-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-clean-up-quirk-for-sony-rf-receivers.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 76610d6dfbe4d5f47ce59582d99e1355efaea916 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20Luis=20V=C3=A1zquez=20Cao?=
 <[email protected]>
Date: Tue, 22 Jan 2013 15:20:38 +0900
Subject: HID: clean up quirk for Sony RF receivers

From: =?UTF-8?q?Fernando=20Luis=20V=C3=A1zquez=20Cao?=

commit 99d249021abd4341771523ed8dd7946276103432 upstream.

Document what the fix-up is does and make it more robust by ensuring
that it is only applied to the USB interface that corresponds to the
mouse (sony_report_fixup() is called once per interface during probing).

Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Cc: Yijing Wang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/hid/hid-sony.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -44,9 +44,19 @@ static __u8 *sony_report_fixup(struct hi
 {
        struct sony_sc *sc = hid_get_drvdata(hdev);
 
-       if ((sc->quirks & VAIO_RDESC_CONSTANT) &&
-                       *rsize >= 56 && rdesc[54] == 0x81 && rdesc[55] == 0x07) 
{
+       /*
+        * Some Sony RF receivers wrongly declare the mouse pointer as a
+        * a constant non-data variable.
+        */
+       if ((sc->quirks & VAIO_RDESC_CONSTANT) && *rsize >= 56 &&
+           /* usage page: generic desktop controls */
+           /* rdesc[0] == 0x05 && rdesc[1] == 0x01 && */
+           /* usage: mouse */
+           rdesc[2] == 0x09 && rdesc[3] == 0x02 &&
+           /* input (usage page for x,y axes): constant, variable, relative */
+           rdesc[54] == 0x81 && rdesc[55] == 0x07) {
                hid_info(hdev, "Fixing up Sony RF Receiver report 
descriptor\n");
+               /* input: data, variable, relative */
                rdesc[55] = 0x06;
        }
 


Patches currently in stable-queue which might be from [email protected] 
are

queue-3.4/hid-clean-up-quirk-for-sony-rf-receivers.patch
queue-3.4/hid-add-support-for-sony-rf-receiver-with-usb-product-id-0x0374.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to