Hi,

Using this patch, I still receive a `pckbc: command timeout' when starting
X. And synaptics initialization fails.

Cédric

Monday 20 May 2013, 13:53:34 (+0600), Alexandr Shadchin:
> On Tue, May 14, 2013 at 03:01:03PM +0200, NeZetiC wrote:
> > >Synopsis:      Elantech touchpad v2 detected but synaptics fails
> > >Category:      kernel
> > >Environment:
> >         System      : OpenBSD 5.3
> >         Details     : OpenBSD 5.3 (EEEPC) #5: Tue May 14 11:51:36 CEST 2013
> >                          nezetic@dwalin.local
> > :/var/src/sys/arch/i386/compile/EEEPC
> > 
> >         Architecture: OpenBSD.i386
> >         Machine     : i386
> > >Description:
> >         My laptop have an Elantech touchpad. It's a v2 generation, firmware
> > version 0x140200.
> >         OpenBSD -current contains patchs for supporting this kind of
> > touchpad via synaptics.
> >         On my computer, -current kernel pms driver detects and initializes
> > it successfully.
> >         But synaptics xserver driver fail to load.
> >         Kernel report a timeout (pckbc: command timeout).
> > >How-To-Repeat:
> >         - Computer with Elantech touchpad (v2, firmware 0x140200)
> >         - Boot OpenBSD -current kernel
> >         - Touchpad is detected
> >         - Start X11
> >         - Synaptics module fails to initialize
> > >Fix:
> >     Patching pms kernel driver, using values from linux kernel
> >     fix the bug on my laptop (but I didn't investigated why).
> > 
> >     Synaptics loads without error, and touchpad is fully supported.
> > 
> >     --- dev/pckbc/pms-new.c Mon May 13 12:43:22 2013
> > +++ dev/pckbc/pms.c Tue May 14 11:59:15 2013
> > @@ -1492,22 +1492,22 @@
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, 0x10) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> > -       elantech_ps2_cmd(sc, 0x54) ||
> > +       elantech_ps2_cmd(sc, 0xc4) ||
> >         pms_set_scaling(sc, 1) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, ELANTECH_CMD_WRITE_REG) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, 0x11) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> > -       elantech_ps2_cmd(sc, 0x88) ||
> > -       pms_set_scaling(sc, 1) ||
> > -       elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> > +       elantech_ps2_cmd(sc, 0x8a) ||
> > +       pms_set_scaling(sc, 1)) //||
> > +       /*elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, ELANTECH_CMD_WRITE_REG) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, 0x21) ||
> >         elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> >         elantech_ps2_cmd(sc, 0x88) ||
> > -       pms_set_scaling(sc, 1))
> > +       pms_set_scaling(sc, 1))*/
> >         return (-1);
> > 
> >     /* Read back reg 0x10 to ensure hardware is ready. */
> > 
> > dmesg:
> > OpenBSD 5.3 (EEEPC) #5: Tue May 14 11:51:36 CEST 2013
> >     nezetic@dwalin.local:/var/src/sys/arch/i386/compile/EEEPC
> > cpu0: Intel(R) Atom(TM) CPU N455 @ 1.66GHz ("GenuineIntel" 686-class) 1.67
> > GHz
> > cpu0:
> > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,LAHF,PERF
> > real mem  = 1063383040 (1014MB)
> > avail mem = 1034997760 (987MB)
> > mainbus0 at root
> > bios0 at mainbus0: AT/286+ BIOS, date 04/12/11, BIOS32 rev. 0 @ 0xf0010,
> > SMBIOS rev. 2.6 @ 0xf0760 (31 entries)
> > bios0: vendor American Megatrends Inc. version "0703" date 04/12/2011
> > bios0: ASUSTeK Computer INC. 1001PXD
> > acpi0 at bios0: rev 2
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP APIC MCFG ECDT OEMB HPET GSCI SSDT SLIC
> > acpi0: wakeup devices P0P1(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: apic clock running at 166MHz
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Intel(R) Atom(TM) CPU N455 @ 1.66GHz ("GenuineIntel" 686-class) 1.67
> > GHz
> > cpu1:
> > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,LONG,SSE3,DTES64,MWAIT,DS-CPL,EST,TM2,SSSE3,CX16,xTPR,PDCM,MOVBE,LAHF,PERF
> > ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
> > ioapic0: misconfigured as apic 1, remapped to apid 2
> > acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
> > acpiec0 at acpi0
> > acpihpet0 at acpi0: 14318179 Hz
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpiprt1 at acpi0: bus 4 (P0P4)
> > acpiprt2 at acpi0: bus 2 (P0P5)
> > acpiprt3 at acpi0: bus -1 (P0P6)
> > acpiprt4 at acpi0: bus 1 (P0P7)
> > acpicpu0 at acpi0: C2, C1, PSS
> > acpicpu1 at acpi0: C2, C1, PSS
> > acpitz0 at acpi0: critical temperature is 98 degC
> > acpibat0 at acpi0: BAT0 model "1001PXD" serial   type LION oem "ASUS"
> > acpiac0 at acpi0: AC unit online
> > acpiasus0 at acpi0
> > acpibtn0 at acpi0: LID_
> > acpibtn1 at acpi0: SLPB
> > acpibtn2 at acpi0: PWRB
> > bios0: ROM list: 0xc0000/0xda00!
> > cpu0: Enhanced SpeedStep 1667 MHz: speeds: 1667, 1333, 1000 MHz
> > pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> > pchb0 at pci0 dev 0 function 0 "Intel Pineview DMI" rev 0x00
> > vga1 at pci0 dev 2 function 0 "Intel Pineview Video" rev 0x00
> > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> > wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> > intagp0 at vga1
> > agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
> > inteldrm0 at vga1: apic 2 int 16
> > drm0 at inteldrm0
> > "Intel Pineview Video" rev 0x00 at pci0 dev 2 function 1 not configured
> > azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x02: msi
> > azalia0: codecs: Realtek ALC269
> > audio0 at azalia0
> > ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x02: apic 2 int 16
> > pci1 at ppb0 bus 4
> > ppb1 at pci0 dev 28 function 1 "Intel 82801GB PCIE" rev 0x02: apic 2 int 17
> > pci2 at ppb1 bus 2
> > athn0 at pci2 dev 0 function 0 "Atheros AR9285" rev 0x01: apic 2 int 17
> > athn0: AR9285 rev 2 (1T1R), ROM rev 14, address 74:2f:68:8c:f3:14
> > ppb2 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x02: apic 2 int 19
> > pci3 at ppb2 bus 1
> > alc0 at pci3 dev 0 function 0 "Attansic Technology L2C" rev 0xc1: msi,
> > address 14:da:e9:3b:c3:4b
> > atphy0 at alc0 phy 0: F2 10/100 PHY, rev. 5
> > uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x02: apic 2 int 23
> > uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x02: apic 2 int 19
> > uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x02: apic 2 int 18
> > uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x02: apic 2 int 16
> > ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x02: apic 2 int 23
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > ppb3 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe2
> > pci4 at ppb3 bus 5
> > pcib0 at pci0 dev 31 function 0 "Intel NM10 LPC" rev 0x02
> > ahci0 at pci0 dev 31 function 2 "Intel 82801GR AHCI" rev 0x02: msi, AHCI 1.1
> > scsibus0 at ahci0: 32 targets
> > sd0 at scsibus0 targ 0 lun 0: <ATA, WDC WD3200BPVT-8, 01.0> SCSI3 0/direct
> > fixed naa.50014ee205fede22
> > sd0: 305245MB, 512 bytes/sector, 625142448 sectors
> > ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x02: apic 2
> > int 21
> > iic0 at ichiic0
> > spdmem0 at iic0 addr 0x50: 1GB DDR3 SDRAM PC3-10600 SO-DIMM
> > usb1 at uhci0: USB revision 1.0
> > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb2 at uhci1: USB revision 1.0
> > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb3 at uhci2: USB revision 1.0
> > uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb4 at uhci3: USB revision 1.0
> > uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > isa0 at pcib0
> > isadma0 at isa0
> > pckbc0 at isa0 port 0x60/5
> > pckbd0 at pckbc0 (kbd slot)
> > pckbc0: using irq 1 for kbd slot
> > wskbd0 at pckbd0: console keyboard, using wsdisplay0
> > pms0 at pckbc0 (aux slot)
> > pckbc0: using irq 12 for aux slot
> > wsmouse0 at pms0 mux 0
> > pms0: Elantech Touchpad, version 2
> > pcppi0 at isa0 port 0x61
> > spkr0 at pcppi0
> > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> > mtrr: Pentium Pro MTRR support
> > uvideo0 at uhub0 port 6 configuration 1 interface 0 "Azurewave USB 2.0 UVC
> > VGA WebCam" rev 2.00/12.04 addr 2
> > video0 at uvideo0
> > vscsi0 at root
> > scsibus1 at vscsi0: 256 targets
> > softraid0 at root
> > scsibus2 at softraid0: 256 targets
> > root on sd0a (ec0f1db50330855e.a) swap on sd0b dump on sd0b
> > 
> 
> Could you check this patch?
> 
> -- 
> Alexandr Shadchin
> 
> Index: pms.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pckbc/pms.c,v
> retrieving revision 1.41
> diff -u -p -r1.41 pms.c
> --- pms.c     20 Apr 2013 08:01:37 -0000      1.41
> +++ pms.c     20 May 2013 07:49:52 -0000
> @@ -1508,7 +1508,7 @@ elantech_set_absolute_mode_v2(struct pms
>           elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
>           elantech_ps2_cmd(sc, 0x21) ||
>           elantech_ps2_cmd(sc, ELANTECH_PS2_CUSTOM_COMMAND) ||
> -         elantech_ps2_cmd(sc, 0x88) ||
> +         elantech_ps2_cmd(sc, 0x60) ||
>           pms_set_scaling(sc, 1))
>               return (-1);

Reply via email to