/[linux-patches]/genpatches-2.6/tags/2.6.34-10/2600_synaptic-cap-ID-check-fix.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.34-10/2600_synaptic-cap-ID-check-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1771 - (show annotations) (download)
Tue Aug 31 14:13:10 2010 UTC (3 years, 10 months ago) by mpagano
File size: 1580 byte(s)
2.6.34-10 release
1 --- a/drivers/input/mouse/synaptics.c 2010-07-27 21:27:34.509890035 -0400
2 +++ b/drivers/input/mouse/synaptics.c 2010-07-27 21:23:43.779995139 -0400
3 @@ -139,8 +139,13 @@ static int synaptics_capability(struct p
4 priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];
5 priv->ext_cap = priv->ext_cap_0c = 0;
6
7 - if (!SYN_CAP_VALID(priv->capabilities))
8 + /*
9 + * Older firmwares had submodel ID fixed to 0x47
10 + */
11 + if (SYN_ID_FULL(priv->identity) < 0x705 &&
12 + SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {
13 return -1;
14 + }
15
16 /*
17 * Unless capExtended is set the rest of the flags should be ignored
18 --- a/drivers/input/mouse/synaptics.h 2010-07-27 21:27:38.599875008 -0400
19 +++ b/drivers/input/mouse/synaptics.h 2010-07-27 21:27:16.919875732 -0400
20 @@ -46,7 +46,7 @@
21 #define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3))
22 #define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1))
23 #define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0))
24 -#define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47)
25 +#define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8)
26 #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20)
27 #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12)
28 #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16)
29 @@ -64,6 +64,7 @@
30 #define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f)
31 #define SYN_ID_MAJOR(i) ((i) & 0x0f)
32 #define SYN_ID_MINOR(i) (((i) >> 16) & 0xff)
33 +#define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i))
34 #define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47)
35
36 /* synaptics special commands */

  ViewVC Help
Powered by ViewVC 1.1.20