psm(4) - synaptics touch pad strange behavier

From: Norikatsu Shigemura <nork_at_FreeBSD.org>
Date: Mon, 27 Sep 2010 00:44:36 +0900
Hi psm(4) masters!

	I have trouble using Synaptics TouchPad, psm(4) on my CF-R9.
	The trouble is that the mouse cursor moves at random, and the
	mouse button is clicked without button action.  I heard same
	trouble from ume_at_'s CF-R8. 
 
	So I enabled options PSM_DEBUG=5 and traced psm's packets.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 :
FreeBSD 9.0-CURRENT #39: Sun Sep 26 22:07:37 JST 2010
    nork_at_pelsia.ninth-nine.com:/usr/obj/usr/src/sys/PELSIA amd64
 :
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
atkbd: the current kbd controller command byte 0065
atkbd: keyboard ID 0x41ab (2)
kbd0 at atkbd0
kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000
ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 67
atkbd0: [GIANT-LOCKED]
psm0: unable to allocate IRQ
psmcpnp0: <PS/2 mouse port> irq 12 on acpi0
psm0: current command byte:0065
Synaptics Touchpad v6.2
  Model information:
   infoRot180: 0
   infoPortrait: 0
   infoSensor: 57
   infoHardware: 80
   infoNewAbs: 1
   capPen: 0
   infoSimplC: 1
   infoGeometry: 2
  Extended capabilities:
   capExtended: 1
   capPassthrough: 0
   capSleep: 1
   capFourButtons: 0
   capMultiFinger: 0
   capPalmDetect: 1
  Additional Buttons: 0
psm0: found Synaptics Touchpad
psm0: <PS/2 Mouse> flags 0x3000 irq 12 on atkbdc0
ioapic0: routing intpin 12 (ISA IRQ 12) to lapic 0 vector 68
psm0: [GIANT-LOCKED]
psm0: model Synaptics Touchpad, device ID 0-00, 3 buttons
psm0: config:00007000, flags:00000008, packet size:6
psm0: syncmask:c0, syncbits:00
 :
atkbdc: atkbdc0 already exists; skipping it
 :
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

* service moused onestart
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3b 47 c1
               ~~ ~~ required, OK!
               synaptics signature, OK!
psm: ENABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 01 64
               ~~ ~~ bad..
               synaptics signature, NG!
psm0: lost interrupt?
psm0: lost interrupt?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

* touch to panel
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
psmintr: 4a d0 ba 1e 90 d0
         ~~       ~~ & 0xc0 must be 0xc0
         & 0xc8 must be 0x80
        These are NG.
psmintr: Sync bytes now 00c0,00c0
                        ~~~~~~~~~ So mismatch!
psmintr: bd 1d 90 be 1a 90
psmintr: out of sync (0080 != 0040) 1 cmds since last error.
psmintr: discard a byte (1)
psmintr: 1d 90 be 1a 90 59
psmintr: out of sync (0000 != 0040) 0 cmds since last error.
psmintr: discard a byte (2)
psmintr: 90 be 1a 90 59 d0
psmintr: out of sync (0080 != 0040) 0 cmds since last error.
psmintr: discard a byte (3)
psmintr: be 1a 90 59 d0 c1
psmintr: out of sync (0080 != 0040) 0 cmds since last error.
psmintr: discard a byte (4)
psmintr: 1a 90 59 d0 c1 19
psmintr: out of sync (0000 != 0040) 0 cmds since last error.
psmintr: discard a byte (5)
psmintr: 90 59 d0 c1 19 90
psmintr: out of sync (0080 != 0040) 0 cmds since last error.

	* Data is discarded, so broken data into proc_synaptics().


psmintr: re-enable the mouse.
psm: DISABLE_DEV return code:00fa
psm: ENABLE_DEV return code:00fa
psmintr: 5c d0 ba 5d d0 aa
psmintr: 7c 03 90 3c e7 90
psmintr: cf 6b c0 cf 71 c0
psmintr: out of sync (00c0 != 0040) 0 cmds since last error.
psmintr: reset the mouse.
psm0: current command byte: 0047 (reinitialize).
psm: DISABLE_DEV return code:00fa
kbdc: TEST_AUX_PORT status:0000
kbdc: RESET_AUX return code:00fa
kbdc: RESET_AUX status:00aa
kbdc: RESET_AUX ID:0000
psm: ENABLE_DEV return code:00fa
psm: DISABLE_DEV return code:00fa
psm: SET_RESOLUTION (3) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 03 64
               ~~ ~~ bad..
               synaptics signature, NG!
psm: SET_RESOLUTION (3) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SET_SCALING11 return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 03 64
               ~~ ~~ bad..
               synaptics signature, NG!
psm: SET_SCALING11 return code:00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SEND_AUX_DEV_DATA return code:00fa
psm: data 08 00 00
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SET_SAMPLING_RATE (200) 00fa
psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_SAMPLING_RATE (80) 00fa
psm: SET_SAMPLING_RATE (60) 00fa
psm: SET_SAMPLING_RATE (40) 00fa
psm: SET_SAMPLING_RATE (20) 00fa
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000
psm: SEND_DEV_ID return code:00fa
psm: device ID: 0000

	* start enable_synaptics()

synaptics: BEGIN init
psm: SET_SCALING11 return code:00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 02 47 16
               ~~ ~~ extcmd(0x00)'s result is 0x16
               synaptics signature, OK!
Synaptics Touchpad v6.2
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (3) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 39 a0 b2
               ~~~~~ extcmd(0x03)'s result is OK like following:
  Model information:
   infoRot180: 0
   infoPortrait: 0
   infoSensor: 57
   infoHardware: 80
   infoNewAbs: 1
   capPen: 0
   infoSimplC: 1
   infoGeometry: 2
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status a0 47 51
               ~~~~~ extcmd(0x02)'s result is OK like following:
  Extended capabilities:
   capExtended: 1
   capPassthrough: 0
   capSleep: 1
   capFourButtons: 0
   capMultiFinger: 0
   capPalmDetect: 1
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 00 00
               ~~~~~ extcmd(0x09)'s result is OK like following:
  Additional Buttons: 0
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3b 47 41
               ~~ ~~ extcmd(0x01)'s result is 0x41
               synaptics signature, OK!
psm: SET_RESOLUTION (3) 00fa	<- 11------
psm: SET_RESOLUTION (0) 00fa	<- --00----
psm: SET_RESOLUTION (0) 00fa	<- ----00--
psm: SET_RESOLUTION (1) 00fa	<- ------01 | or
					 0b11000001 = 0xc1
	mode byte(0xc1) is set, OK.
		0xc1 = Absolute mode with W, high packet rate

psm: SET_SAMPLING_RATE (20) 00fa
synaptics: END init (3 buttons)
psm0: found Synaptics Touchpad

	* finish enable_synaptics()

psm: SET_SAMPLING_RATE (100) 00fa
psm: SET_RESOLUTION (2) 00fa
psm: SET_SCALING11 return code:00fa
psm: SET_STREAM_MODE return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 02 64
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (0) 00fa
psm: SET_RESOLUTION (1) 00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 3b 47 c1
psm: ENABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 20 01 64
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
psm0: lost interrupt?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

* service moused stop
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
psm0: lost interrupt?
psm: DISABLE_DEV return code:00fa
psm: SEND_AUX_DEV_STATUS return code:00fa
psm: status 00 01 64
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	I read Synaptics's "Synaptics PS/2 TouchPad Interfacing Guide",
	PN: 511-000275-01 Rev.A and sys/dev/atkbdc/psm.c.  Accordingly
	these, I think no problem about implementing synaptics processing
	part, maybe.

	But read_aux_data_no_wait is really OK?  Accordingly, my dumped
	data pointed out 'not synaptics data.'.  Some initialization is
	required?  I didn't know what.

psmintr() in sys/dev/atkbdc/psm.c
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	while((c = read_aux_data_no_wait(sc->kbdc)) != -1) {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	To fix this issue, should I do other?

-- 
Norikatsu Shigemura <nork_at_FreeBSD.org>
Received on Sun Sep 26 2010 - 13:44:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC