On 16/10/11(Sun) 18:37, Okan Demirmen wrote: > On Mon 2011.10.17 at 02:32 +0600, Alexandr Shadchin wrote: > > On Sun, Oct 16, 2011 at 11:57:43AM -0400, Okan Demirmen wrote: > > > On Sun 2011.10.16 at 17:12 +0200, Martin Pieuchot wrote: > > > > On 16/10/11(Sun) 16:05, Mathieu - wrote: > > > > > Martin Pieuchot wrote: > > > > > > If your touchpad/clitpad is recognized as an ALPS Dualpoint, like: > > > > > > > > > > > > $ dmesg |grep pms0 > > > > > > pms0: ALPS Dualpoint, version 0x6222 > > > > > > > > > > > > Please test the diff below and report me any breakage/improvement. > > > > > > It should > > > > > > at least fix the "pms0: not in sync yet, discard input" error you > > > > > > may > > > > > > have seen recently. > > > > > > <snip> > > > > > > > > > > > > > > > Yes that diff does improve things. Before I wasn't even able to move > > > > > the > > > > > cursor getting tons of "not int sync yet" messages. > > > > > With this diff my touchpad works, including the scrolling part at the > > > > > right of the touchpad. > > > > > > > > Thanks for testings. Here's and improved version of the diff that should > > > > really handle interleaved packets. > > > > > > > > Can you tell me if you still see "not in sync yet" after applying this > > > > diff. If yes, how often? I'm also interested in the number of "PS/2 > > > > interleaved packet" messages. > > > > > > Hi Martin, > > > > > > Both of these diffs allow the pad to work, but the clit remains > > > unmovable. Below is a dmesg with this last diff. > > > > > > Cheers, > > > Okan > > > > > > > Small rework mpi@ diff. Test please. > > Hi - pad still works, but clip still doesn't; same 'not in sync yet' > messages. Cheers, Okan
Diff below should be enough to have your pad working, I would like to commit this before inspecting the packets sent by your clit mouse. Ok? Index: pms.c =================================================================== RCS file: /cvs/src/sys/dev/pckbc/pms.c,v retrieving revision 1.22 diff -u -p -r1.22 pms.c --- pms.c 4 Oct 2011 06:30:40 -0000 1.22 +++ pms.c 17 Oct 2011 08:40:13 -0000 @@ -87,6 +87,7 @@ struct synaptics_softc { struct alps_softc { int model; + int mask; int version; int min_x, min_y; @@ -141,28 +142,29 @@ static const u_int butmap[8] = { static const struct alps_model { int version; + int mask; int model; } alps_models[] = { - { 0x2021, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x2221, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x2222, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x3222, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x5212, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x5321, ALPS_GLIDEPOINT }, - { 0x5322, ALPS_GLIDEPOINT }, - { 0x603b, ALPS_GLIDEPOINT }, - { 0x6222, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x6321, ALPS_GLIDEPOINT }, - { 0x6322, ALPS_GLIDEPOINT }, - { 0x6323, ALPS_GLIDEPOINT }, - { 0x6324, ALPS_GLIDEPOINT }, - { 0x6325, ALPS_GLIDEPOINT }, - { 0x6326, ALPS_GLIDEPOINT }, - { 0x633b, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, - { 0x7301, ALPS_DUALPOINT }, - { 0x7321, ALPS_GLIDEPOINT }, - { 0x7322, ALPS_GLIDEPOINT }, - { 0x7325, ALPS_GLIDEPOINT }, + { 0x2021, 0xf8, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x2221, 0xf8, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x2222, 0xff, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x3222, 0xf8, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x5212, 0xff, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x5321, 0xf8, ALPS_GLIDEPOINT }, + { 0x5322, 0xf8, ALPS_GLIDEPOINT }, + { 0x603b, 0xf8, ALPS_GLIDEPOINT }, + { 0x6222, 0xcf, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x6321, 0xf8, ALPS_GLIDEPOINT }, + { 0x6322, 0xf8, ALPS_GLIDEPOINT }, + { 0x6323, 0xf8, ALPS_GLIDEPOINT }, + { 0x6324, 0x8f, ALPS_GLIDEPOINT }, + { 0x6325, 0xef, ALPS_GLIDEPOINT }, + { 0x6326, 0xf8, ALPS_GLIDEPOINT }, + { 0x633b, 0xf8, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, + { 0x7301, 0xf8, ALPS_DUALPOINT }, + { 0x7321, 0xf8, ALPS_GLIDEPOINT }, + { 0x7322, 0xf8, ALPS_GLIDEPOINT }, + { 0x7325, 0xcf, ALPS_GLIDEPOINT }, #if 0 { 0x7326, 0 }, /* XXX Uses unknown v3 protocol */ #endif @@ -1058,6 +1060,7 @@ alps_get_hwinfo(struct pms_softc *sc) for (i = 0; i < nitems(alps_models); i++) if (alps->version == alps_models[i].version) { alps->model = alps_models[i].model; + alps->mask = alps_models[i].mask; return (0); } @@ -1183,9 +1186,11 @@ pms_ioctl_alps(struct pms_softc *sc, u_l int pms_sync_alps(struct pms_softc *sc, int data) { + struct alps_softc *alps = sc->alps; + switch (sc->inputstate) { case 0: - if ((data & 0xf8) != 0xf8) /* XXX model dependant? */ + if ((data & alps->mask) != alps->mask) return (-1); break; case 1: