lkml.org 
[lkml]   [2009]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 42/48] HID: adjust report descriptor fixup for MS 1028 receiver
    2.6.28-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jiri Kosina <jkosina@suse.cz>

    commit 0fb21de0799a985d2da3da14ae5625d724256638 upstream.

    Report descriptor fixup for MS 1028 receiver changes also values for
    Keyboard and Consumer, which incorrectly trims the range, causing correct
    events being thrown away before passing to userspace.

    We need to keep the GenDesk usage fixup though, as it reports totally bogus
    values about axis.

    Reported-by: Lucas Gadani <lgadani@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.cz>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/hid/hid-microsoft.c | 13 ++++---------
    1 file changed, 4 insertions(+), 9 deletions(-)

    --- a/drivers/hid/hid-microsoft.c
    +++ b/drivers/hid/hid-microsoft.c
    @@ -30,7 +30,7 @@
    #define MS_NOGET 0x10

    /*
    - * Microsoft Wireless Desktop Receiver (Model 1028) has several
    + * Microsoft Wireless Desktop Receiver (Model 1028) has
    * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
    */
    static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
    @@ -38,17 +38,12 @@ static void ms_report_fixup(struct hid_d
    {
    unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);

    - if ((quirks & MS_RDESC) && rsize == 571 && rdesc[284] == 0x19 &&
    - rdesc[286] == 0x2a && rdesc[304] == 0x19 &&
    - rdesc[306] == 0x29 && rdesc[352] == 0x1a &&
    - rdesc[355] == 0x2a && rdesc[557] == 0x19 &&
    + if ((quirks & MS_RDESC) && rsize == 571 && rdesc[557] == 0x19 &&
    rdesc[559] == 0x29) {
    dev_info(&hdev->dev, "fixing up Microsoft Wireless Receiver "
    "Model 1028 report descriptor\n");
    - rdesc[284] = rdesc[304] = rdesc[557] = 0x35;
    - rdesc[352] = 0x36;
    - rdesc[286] = rdesc[355] = 0x46;
    - rdesc[306] = rdesc[559] = 0x45;
    + rdesc[557] = 0x35;
    + rdesc[559] = 0x45;
    }
    }



    \
     
     \ /
      Last update: 2009-02-14 02:47    [W:0.030 / U:29.616 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site