From pb@ludd.luth.se  Wed Jun 25 07:57:02 2003
Return-Path: <pb@ludd.luth.se>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1AAD937B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Jun 2003 07:57:02 -0700 (PDT)
Received: from mother.ludd.luth.se (mother.ludd.luth.se [130.240.16.3])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CE7EA43FEA
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Jun 2003 07:56:59 -0700 (PDT)
	(envelope-from pb@ludd.luth.se)
Received: from brother.ludd.luth.se (brother.ludd.luth.se [130.240.16.78])
	by mother.ludd.luth.se (8.11.6+Sun/8.9.3) with ESMTP id h5PEuw815052
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 25 Jun 2003 16:56:58 +0200 (MEST)
Received: (from pb@localhost)
	by brother.ludd.luth.se (8.11.6+Sun/8.9.3) id h5PEuwL09838
	for FreeBSD-gnats-submit@freebsd.org; Wed, 25 Jun 2003 16:56:58 +0200 (MEST)
Message-Id: <200306251456.h5PEuwL09838@brother.ludd.luth.se>
Date: Wed, 25 Jun 2003 16:56:58 +0200 (MEST)
From: Peter B <pb@ludd.luth.se>
To: FreeBSD-gnats-submit@freebsd.org
Subject: PS/2 optical mouse 'Samsung OMS3PB' won't init properly.

>Number:         53726
>Category:       kern
>Synopsis:       PS/2 optical mouse 'Samsung OMS3PB' won't init properly.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 25 08:00:12 PDT 2003
>Closed-Date:    Fri Aug 15 22:38:13 PDT 2003
>Last-Modified:  Fri Aug 15 22:38:13 PDT 2003
>Originator:     Peter B
>Release:        FreeBSD 4.7-RELEASE i386
>Organization:
>Environment:
   System: FreeBSD 4.7-RELEASE #0: Wed Mar  5 12:17:59 CET 2003 pb@host:/usr/src/sys/compile/XP1800 i386
 
   System setup:
     Arch:   i386
     Mouse:  PS/2 Samsung Optical Wheel Mouse OMS3PB
     MB:     Asus A7V333-R
     OS:     FreeBSD 4.7
     X11:    XFree86 4.2.0
 	
 
 Kernel configuration file: /usr/src/sys/i386/conf/XP1800
   
   machine	i386
   cpu		I686_CPU
   ident		GENERIC
   maxusers	0
   
   options         CPU_ATHLON_SSE_HACK	# Mplayer benefits
   options         CPU_ENABLE_SSE		# Mplayer benefits
   
   options 	INET			#InterNETworking
   options 	FFS			#Berkeley Fast Filesystem
   options 	FFS_ROOT		#FFS usable as root device [keep this!]
   options 	SOFTUPDATES		#Enable FFS soft updates support
   options 	UFS_DIRHASH		#Improve performance on big directories
   options 	MFS			#Memory Filesystem
   options 	NFS			#Network Filesystem
   options 	MSDOSFS			#MSDOS Filesystem
   options 	CD9660			#ISO 9660 Filesystem
   options 	PROCFS			#Process filesystem
   options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
   
   options         USER_LDT                #allow user-level control of i386 ldt
   
   options 	SCSI_DELAY=2000		#Delay (in ms) before probing SCSI
   options 	UCONSOLE		#Allow users to grab the console
   options 	USERCONFIG		#boot -c editor
   options 	VISUAL_USERCONFIG	#visual boot -c editor
   options 	KTRACE			#ktrace(1) support
   options 	SYSVSHM			#SYSV-style shared memory
   options 	SYSVMSG			#SYSV-style message queues
   options 	SYSVSEM			#SYSV-style semaphores
   options 	P1003_1B		#Posix P1003_1B real-time extensions
   options 	_KPOSIX_PRIORITY_SCHEDULING
   options		ICMP_BANDLIM		#Rate limit bad replies
   options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
   
   device		isa
   device		pci
   
   device		fdc0	at isa? port IO_FD1 irq 6 drq 2
   device		fd0	at fdc0 drive 0
   device		fd1	at fdc0 drive 1
   
   device		ata0	at isa? port IO_WD1 irq 14
   device		ata1	at isa? port IO_WD2 irq 15
   device		ata
   device		atadisk			# ATA disk drives
   device		atapicd			# ATAPI CDROM drives
   options 	ATA_STATIC_ID		#Static device numbering
   
   device		ahc		# AHA2940 and onboard AIC7xxx devices
   device		ncr		# NCR/Symbios Logic
   				# Allow ncr to attach legacy NCR devices when 
   				# both sym and ncr are configured
   
   device		scbus		# SCSI bus (required)
   device		da		# Direct Access (disks)
   device		sa		# Sequential Access (tape etc)
   device		cd		# CD
   device		pass		# Passthrough device (direct SCSI access)
   
   device		atkbdc0	at isa? port IO_KBD
   device		atkbd0	at atkbdc? irq 1 flags 0x1
   device		psm0	at atkbdc? irq 12
   
   device		vga0	at isa?
   
   pseudo-device	splash
   
   device		sc0	at isa? flags 0x100
   
   device		npx0	at nexus? port IO_NPX irq 13
   
   device		apm0    at nexus? disable flags 0x20 # Advanced Power Management
   
   device          smbus           # Bus support, required for smb below.
   
   device          viapm
   
   device          smb
   
   device          iicbus          # Bus support, required for ic/iic/iicsmb below.
   device          iicbb
   
   device          ic
   device          iic
   device          iicsmb          # smb over i2c bridge
   
   device          pcf0    at isa? port 0x320 irq 5
   
   device		sio0	at isa? port IO_COM1 flags 0x10 irq 4
   device		sio1	at isa? port IO_COM2 irq 3
   device		sio2	at isa? disable port IO_COM3 irq 5
   device		sio3	at isa? disable port IO_COM4 irq 9
   
   device		ppc0	at isa? irq 7
   device		ppbus		# Parallel port bus (required)
   device		lpt		# Printer
   device		plip		# TCP/IP over parallel
   device		ppi		# Parallel port interface device
   
   device		de		# DEC/Intel DC21x4x (``Tulip'')
   device		em		# Intel PRO/1000 adapter Gigabit Ethernet Card (``Wiseman'')
   device		txp		# 3Com 3cR990 (``Typhoon'')
   device		vx		# 3Com 3c590, 3c595 (``Vortex'')
   
   device		miibus		# MII bus support
   device		dc		# DEC/Intel 21143 and various workalikes
   device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
   device		pcn		# AMD Am79C97x PCI 10/100 NICs
   device		rl		# RealTek 8129/8139
   device		sf		# Adaptec AIC-6915 (``Starfire'')
   device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
   device		ste		# Sundance ST201 (D-Link DFE-550TX)
   device		tl		# Texas Instruments ThunderLAN
   device		tx		# SMC EtherPower II (83c170 ``EPIC'')
   device		vr		# VIA Rhine, Rhine II
   device		wb		# Winbond W89C840F
   device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')
   device		bge		# Broadcom BCM570x (``Tigon III'')
   
   device		ed0	at isa? disable port 0x280 irq 10 iomem 0xd8000
   
   device          bktr
   
   pseudo-device	loop		# Network loopback
   pseudo-device	ether		# Ethernet support
   pseudo-device	sl	1	# Kernel SLIP
   pseudo-device	ppp	1	# Kernel PPP
   pseudo-device	tun		# Packet tunnel.
   pseudo-device	pty		# Pseudo-ttys (telnet etc)
   pseudo-device	md		# Memory "disks"
   
   options         IPFIREWALL              #firewall
   options         IPFIREWALL_VERBOSE      #enable logging to syslogd(8)
   options         IPFIREWALL_VERBOSE_LIMIT=100    #limit verbosity
   
   pseudo-device	bpf		#Berkeley packet filter
   
   device		uhci		# UHCI PCI->USB interface
   device		usb		# USB Bus (required)
   device		ugen		# Generic
   device		uhid		# "Human Interface Devices"
   device		ukbd		# Keyboard
   device		ulpt		# Printer
   device		umass		# Disks/Mass storage - Requires scbus and da
   device		ums		# Mouse
   device		uscanner	# Scanners
   device		urio		# Diamond Rio MP3 Player
 
 Dmesg:
   Copyright (c) 1992-2002 The FreeBSD Project.
   Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
   The Regents of the University of California. All rights reserved.
   FreeBSD 4.7-RELEASE #0: Wed Mar  5 12:17:59 CET 2003
   pb@host:/usr/src/sys/compile/XP1800
   Timecounter "i8254"  frequency 1193182 Hz
   CPU: AMD Athlon(TM) XP 1800+ (1532.91-MHz 686-class CPU)
   Origin = "AuthenticAMD"  Id = 0x662  Stepping = 2
   Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
   AMD Features=0xc0480000<<b19>,AMIE,DSP,3DNow!>
   real memory  = 268419072 (262128K bytes)
   config> di pcic0
   config> di sn0
   config> di lnc0
   config> di ie0
   config> di fe0
   config> di ed0
   config> di cs0
   config> di bt0
   config> di aic0
   config> di aha0
   config> di adv0
   config> q
   avail memory = 257306624 (251276K bytes)
   Preloaded elf kernel "kernel" at 0xc03d1000.
   Preloaded userconfig_script "/boot/kernel.conf" at 0xc03d109c.
   Pentium Pro MTRR support enabled
   md0: Malloc disk
   Using $PIR table, 11 entries at 0xc00f2050
   npx0: <math processor> on motherboard
   npx0: INT 16 interface
   pcib0: <Host to PCI bridge> on motherboard
   pci0: <PCI bus> on pcib0
   pcib1: <PCI to PCI bridge (vendor=1106 device=b099)> at device 1.0 on pci0
   pci1: <PCI bus> on pcib1
   pci1: <ATI model 5157 graphics accelerator> at 0.0 irq 11
   pci0: <unknown card> (vendor=0x13f6, dev=0x0111) at 5.0 irq 10
   pci0: <unknown card> (vendor=0x104c, dev=0x8026) at 7.0 irq 10
   uhci0: <VIA 83C572 USB controller> port 0xb400-0xb41f irq 9 at device 9.0 on pci0
   usb0: <VIA 83C572 USB controller> on uhci0
   usb0: USB revision 1.0
   uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
   uhub0: 2 ports with 2 removable, self powered
   uhci1: <VIA 83C572 USB controller> port 0xb000-0xb01f irq 11 at device 9.1 on pci0
   usb1: <VIA 83C572 USB controller> on uhci1
   usb1: USB revision 1.0
   uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
   uhub1: 2 ports with 2 removable, self powered
   pci0: <USB controller> at 9.2 irq 10
   bktr0: <BrookTree 878> mem 0xcf000000-0xcf000fff irq 9 at device 12.0 on pci0
   iicbb0: <I2C bit-banging driver> on bti2c0
   iicbus0: <Philips I2C bus> on iicbb0 master-only
   iicsmb0: <I2C to SMB bridge> on iicbus0
   smbus0: <System Management Bus> on iicsmb0
   smb0: <SMBus general purpose I/O> on smbus0
   iic0: <I2C general purpose I/O> on iicbus0
   iicbus1: <Philips I2C bus> on iicbb0 master-only
   iicsmb1: <I2C to SMB bridge> on iicbus1
   smbus1: <System Management Bus> on iicsmb1
   smb1: <SMBus general purpose I/O> on smbus1
   iic1: <I2C general purpose I/O> on iicbus1
   smbus2: <System Management Bus> on bti2c0
   smb2: <SMBus general purpose I/O> on smbus2
   bktr0: Warning - card vendor 0xffff (model 0xffff) unknown.
   bktr0: Pinnacle/Miro TV, Temic NTSC tuner, remote control.
   pci0: <unknown card> (vendor=0x109e, dev=0x0878) at 12.1 irq 9
   ahc0: <Adaptec 19160B Ultra160 SCSI adapter> port 0xa800-0xa8ff mem 0xcb800000-0xcb800fff irq 11 at device 13.0 on pci0
   aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
   ed0: <NE2000 PCI Ethernet (RealTek 8029)> port 0xa400-0xa41f irq 10 at device 14.0 on pci0
   ed0: address 00:80:c8:df:8b:35, type NE2000 (16 bit) 
   ed1: <NE2000 PCI Ethernet (RealTek 8029)> port 0xa000-0xa01f irq 9 at device 15.0 on pci0
   ed1: address 00:80:c8:df:8e:48, type NE2000 (16 bit) 
   isab0: <PCI to ISA bridge (vendor=1106 device=3147)> at device 17.0 on pci0
   isa0: <ISA bus> on isab0
   atapci0: <VIA 8233 ATA133 controller> port 0x9800-0x980f irq 0 at device 17.1 on pci0
   ata0: at 0x1f0 irq 14 on atapci0
   ata1: at 0x170 irq 15 on atapci0
   uhci2: <VIA 83C572 USB controller> port 0x9400-0x941f irq 9 at device 17.2 on pci0
   usb2: <VIA 83C572 USB controller> on uhci2
   usb2: USB revision 1.0
   uhub2: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
   uhub2: 2 ports with 2 removable, self powered
   uhub3: Texas Instruments TUSB2046 hub, class 9/0, rev 1.10/1.25, addr 2
   uhub3: 4 ports with 4 removable, self powered
   uhci3: <VIA 83C572 USB controller> port 0x9000-0x901f irq 9 at device 17.3 on pci0
   usb3: <VIA 83C572 USB controller> on uhci3
   usb3: USB revision 1.0
   uhub4: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
   uhub4: 2 ports with 2 removable, self powered
   orm0: <Option ROM> at iomem 0xc0000-0xcbfff on isa0
   fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
   fdc0: FIFO enabled, 8 bytes threshold
   fd0: <1440-KB 3.5" drive> on fdc0 drive 0
   atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
   atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
   kbd0 at atkbd0
 
   psm0: <PS/2 Mouse> irq 12 on atkbdc0
   psm0: model Generic PS/2 mouse, device ID 0
 
   vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
   sc0: <System console> at flags 0x100 on isa0
   sc0: VGA <16 virtual consoles, flags=0x300>
   pcf0: <PCF8584 I2C bus controller> at port 0x320-0x321 irq 5 on isa0
   iicbus2: <Philips I2C bus> on pcf0 addr 0xaa
   iicsmb2: <I2C to SMB bridge> on iicbus2
   smbus3: <System Management Bus> on iicsmb2
   smb3: <SMBus general purpose I/O> on smbus3
   iic2: <I2C general purpose I/O> on iicbus2
   sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
   sio0: type 16550A
   sio1 at port 0x2f8-0x2ff irq 3 on isa0
   sio1: type 16550A
   ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
   ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
   plip0: <PLIP network interface> on ppbus0
   lpt0: <Printer> on ppbus0
   lpt0: Interrupt-driven port
   ppi0: <Parallel I/O> on ppbus0
   IP packet filtering initialized, divert disabled, rule-based forwarding enabled, default to deny, logging limited to 100 packets/entry by default
   ad0: 76319MB <ST380021A> [155061/16/63] at ata0-master UDMA100
   Waiting 2 seconds for SCSI devices to settle
   Mounting root from ufs:/dev/da0s1a
   da0 at ahc0 bus 0 target 0 lun 0
   da0: <SEAGATE ST318438LW 0003> Fixed Direct Access SCSI-3 device 
   da0: 160.000MB/s transfers (80.000MHz, offset 63, 16bit), Tagged Queueing Enabled
   da0: 19001MB (38914049 512 byte sectors: 64H 32S/T 19001C)
   WARNING: / was not properly dismounted
   cd0 at ahc0 bus 0 target 4 lun 0
   cd0: <NEC CD-ROM DRIVE:463 1.05> Removable CD-ROM SCSI-2 device 
   cd0: 10.000MB/s transfers (10.000MHz, offset 15)
   cd0: cd present [311568 x 2048 byte records]
   ed1: device timeout
   pcm0: <CMedia CMI8738> port 0xb800-0xb8ff irq 10 at device 5.0 on pci0
   bktr0: Warning - Unknown Hauppauge Tuner 0xff
 
>Description:

   I have an PS/2 'Samsung Optical Wheel Mouse OMS3PB' which works with
   XFree86 4.2.0 but only when doing some tricks in initialisation.
   The old mouse PS/2 (ball-type) 'Dexxa 3B Mouse' works flawlessly.
 
   Trick 1:
     Boot with dexxa mouse connected. Connect the samsung mouse.
     Start xfree86. Optical mouse works.
 
   Trick 2:
     Boot with samsung mouse connected. Start xfree86. Switch to text mode,
     connect the dexxa mouse. Switch to graphics mode (x11). Move mouse. Switch
     to text mode, connect the samsung mouse. Switch to graphics mode. And the
     optical mouse works.
 
   Trick 3:
     Boot with samsung mouse connected. Enter 'boot -c' config and type
     "flags psm0 0x200". Start xfree86. Mouse will work althought it
     doesn't give the right feeling..  (and 'xset m' is not the answer).
 
   If the psm driver detects this at boot:
     psm0: <PS/2 Mouse> irq 12 on atkbdc0
     psm0: model Generic PS/2 mouse, device ID 0
 
     Things works alright.
 
   If the psm driver detects this at boot:
     psm0: <PS/2 Mouse> irq 12 on atkbdc0
     psm0: model 4D+ Mouse, device ID 8
 
     The samsung mouse will not work.
 
   (When the samsung mouse fails the symptom is that all three mouse
    buttons work. Positive X or Y movement work. But Negative X or Y
    movement will go to respective left/bottom no matter what movement.)
 
 
   When doing "halt" and then useing reset it seems psm0 at times get this
   error:
     psm0: unable to allocate the IRQ resource (12).
 
     Is there a fix ?
 
   Relevant files:
     /usr/src/sys/i386/include/mouse.h
     /usr/src/sys/isa/psm.c
 
   ____________________________________________________________________________
   psm(4)
      0x200
      bit 9 NOIDPROBE
             The psm driver will not try to identify the model of the pointing
             device and will not carry out model-specific initialization. The
             device should always act like a standard PS/2 mouse without such
             initialization.  Extra features, such as wheels and additional
             buttons, won't be recognized by the psm driver.
 
 
>How-To-Repeat:

   Many ways, bu the most obvious is the following:
   * Connect 'Samsung Optical Wheel Mouse OMS3PB' to your PS/2 connector.
   * Coldboot.
   * Start xfree86, try to move the mouse (particulary towards left or down).
 
   Proper fix will handle this setup without problems.
 
>Fix:

   Maybe some additions to 'vendortype' in isa/psm.c could fix this in a
   convinient way.. ?
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Mon Jun 30 09:06:00 PDT 2003 
Responsible-Changed-Why:  
Reassign misfiled PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53726 
State-Changed-From-To: open->feedback 
State-Changed-By: mikeh 
State-Changed-When: Mon Jun 30 23:04:25 PDT 2003 
State-Changed-Why:  
Could you add: 
options PSM_DEBUG=2 
to your kernel config and rebuild your kernel. 
Then, boot into verbose mode by specifying boot -v at the bootloader 
prompt and send me the dmesg output. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53726 
State-Changed-From-To: feedback->closed 
State-Changed-By: kris 
State-Changed-When: Fri Aug 15 22:38:03 PDT 2003 
State-Changed-Why:  
Feedback timeout 

http://www.freebsd.org/cgi/query-pr.cgi?pr=53726 
>Unformatted:
