Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1489 - genpatches-2.6/trunk/2.6.28
Date: Sat, 31 Jan 2009 20:32:29
Message-Id: E1LTMVv-00047m-PP@stork.gentoo.org
1 Author: mpagano
2 Date: 2009-01-31 20:32:27 +0000 (Sat, 31 Jan 2009)
3 New Revision: 1489
4
5 Added:
6 genpatches-2.6/trunk/2.6.28/2600_Microsoft-kbd-rpt-descriptor-fix.patch
7 Modified:
8 genpatches-2.6/trunk/2.6.28/0000_README
9 Log:
10 Report descriptor fixup for MS keyboard receiver changes
11
12 Modified: genpatches-2.6/trunk/2.6.28/0000_README
13 ===================================================================
14 --- genpatches-2.6/trunk/2.6.28/0000_README 2009-01-26 18:41:23 UTC (rev 1488)
15 +++ genpatches-2.6/trunk/2.6.28/0000_README 2009-01-31 20:32:27 UTC (rev 1489)
16 @@ -67,6 +67,10 @@
17 From: http://bugs.gentoo.org/254793
18 Desc: Fix boot hang with pata_hpt366 driver
19
20 +Patch: 2600_Microsoft-kbd-rpt-descriptor-fix.patch
21 +From: http://bugs.gentoo.org/256355
22 +Desc: Report descriptor fixup for MS 1028 receiver changes
23 +
24 Patch: 2705_i915-no-vblank-on-disabled-pipe.patch
25 From: http://bugs.gentoo.org/253813
26 Desc: Fix crash with GEM + compiz
27
28 Added: genpatches-2.6/trunk/2.6.28/2600_Microsoft-kbd-rpt-descriptor-fix.patch
29 ===================================================================
30 --- genpatches-2.6/trunk/2.6.28/2600_Microsoft-kbd-rpt-descriptor-fix.patch (rev 0)
31 +++ genpatches-2.6/trunk/2.6.28/2600_Microsoft-kbd-rpt-descriptor-fix.patch 2009-01-31 20:32:27 UTC (rev 1489)
32 @@ -0,0 +1,53 @@
33 +From: Jiri Kosina <jkosina@××××.cz>
34 +Date: Wed, 14 Jan 2009 02:03:21 +0000 (+0100)
35 +Subject: HID: adjust report descriptor fixup for MS 1028 receiver
36 +X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=0fb21de0799a985d2da3da14ae5625d724256638
37 +
38 +HID: adjust report descriptor fixup for MS 1028 receiver
39 +
40 +Report descriptor fixup for MS 1028 receiver changes also values for
41 +Keyboard and Consumer, which incorrectly trims the range, causing correct
42 +events being thrown away before passing to userspace.
43 +
44 +We need to keep the GenDesk usage fixup though, as it reports totally bogus
45 +values about axis.
46 +
47 +Reported-by: Lucas Gadani <lgadani@×××××.com>
48 +Signed-off-by: Jiri Kosina <jkosina@××××.cz>
49 +---
50 +
51 +diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
52 +index d718b16..25b10dc 100644
53 +--- a/drivers/hid/hid-microsoft.c
54 ++++ b/drivers/hid/hid-microsoft.c
55 +@@ -30,7 +30,7 @@
56 + #define MS_NOGET 0x10
57 +
58 + /*
59 +- * Microsoft Wireless Desktop Receiver (Model 1028) has several
60 ++ * Microsoft Wireless Desktop Receiver (Model 1028) has
61 + * 'Usage Min/Max' where it ought to have 'Physical Min/Max'
62 + */
63 + static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
64 +@@ -38,17 +38,12 @@ static void ms_report_fixup(struct hid_device *hdev, __u8 *rdesc,
65 + {
66 + unsigned long quirks = (unsigned long)hid_get_drvdata(hdev);
67 +
68 +- if ((quirks & MS_RDESC) && rsize == 571 && rdesc[284] == 0x19 &&
69 +- rdesc[286] == 0x2a && rdesc[304] == 0x19 &&
70 +- rdesc[306] == 0x29 && rdesc[352] == 0x1a &&
71 +- rdesc[355] == 0x2a && rdesc[557] == 0x19 &&
72 ++ if ((quirks & MS_RDESC) && rsize == 571 && rdesc[557] == 0x19 &&
73 + rdesc[559] == 0x29) {
74 + dev_info(&hdev->dev, "fixing up Microsoft Wireless Receiver "
75 + "Model 1028 report descriptor\n");
76 +- rdesc[284] = rdesc[304] = rdesc[557] = 0x35;
77 +- rdesc[352] = 0x36;
78 +- rdesc[286] = rdesc[355] = 0x46;
79 +- rdesc[306] = rdesc[559] = 0x45;
80 ++ rdesc[557] = 0x35;
81 ++ rdesc[559] = 0x45;
82 + }
83 + }
84 +
85 +