From owner-freebsd-bugs Mon Apr 3 03:41:42 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA03500 for bugs-outgoing; Mon, 3 Apr 1995 03:41:42 -0700 Received: from relay1.oleane.net (Relay1.OLEANE.NET [194.2.1.1]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id DAA03494 for ; Mon, 3 Apr 1995 03:41:38 -0700 Received: from ocegr.fr (hydra.dtsmtp.ocegr.fr [194.2.64.3]) by relay1.oleane.net (8.6.10/8.6.9) with SMTP id MAA07437 for ; Mon, 3 Apr 1995 12:41:11 +0200 Received: from pyxis by ocegr.fr (5.0/SMI-SVR4) id AA22422; Mon, 3 Apr 1995 12:28:02 +0200 Message-Id: <9504031028.AA22422@ocegr.fr> To: bugs@FreeBSD.org From: Gert-Jan.Vons@ocegr.fr Reply-To: Gert-Jan.Vons@ocegr.fr Subject: psm driver probe fails on ThinkPad 340 Date: Mon, 03 Apr 1995 12:28:31 +0200 content-length: 0 Sender: bugs-owner@FreeBSD.org Precedence: bulk [ I used send-pr to fill in the form, but don't have net-access at home ] SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: SEND-PR: Please consult the send-pr man page `send-pr(1)' or the Texinfo SEND-PR: manual if you are not sure how to fill out a problem report. SEND-PR: SEND-PR: Choose from the following categories: SEND-PR: SEND-PR: bin conf docs gnu i386 kern misc ports SEND-PR: To: FreeBSD-gnats-submit@freebsd.org Subject: From: vons Reply-To: vons X-send-pr-version: 3.2 >Submitter-Id: current-users >Originator: Gert-Jan Vons , Gert-Jan.Vons@ocegr.fr >Organization: none >Confidential: no >Synopsis: psm driver probe fails on ThinkPad 340 >Severity: serious >Priority: medium >Category: i386 >Release: FreeBSD 2.1.0-Development i386 >Class: sw-bug >Environment: Thinkpad 340 with integrated TrackPoint(tm) II, user-doc refers to it as an ps/2 mouse, irq 12 at 0x60-0x64. OS version is SNAP-950322, but 2.0R fails too (same psm driver). Kernel config file section: device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr options ALLOW_CONFLICT_IOADDR device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr >Description: During boot, the psm probe fails to recognise the mouse. The syscons driver recognises the keyboard at 0x60-0x6f irq 1, but the psm driver just says "psm0 not found at 0x60".` The probe function 1 int psmprobe(struct isa_device *dvp) 2 { 3 /* XXX: Needs a real probe routine. */ 4 5 int ioport,c,unit; 6 7 ioport=dvp->id_iobase; 8 unit=dvp->id_unit; 9 psm_write_dev(ioport,0xff); /* Reset aux device */ 10 psm_poll_status(); 11 outb(ioport+CNTRL,0xa9); 12 psm_poll_status(); 13 outb(ioport+CNTRL,0xaa); 14 c = inb(ioport+DATA); 15 if(c&0x04) { 16 /* printf("PS/2 AUX mouse is not found\n");*/ 17 psm_command(ioport,0x65); 18 psmaddr[unit] = 0; /* Device not found */ 19 return(0);} 20 /* printf("PS/2 AUX mouse found. Installing driver\n");*/ 21 return (4); 22 } What happens is that at line 15, c actually has the value 0x55, which results in a failed probe. I don't know what the 0xa9 at line 11 is supposed to do, but the 0xaa at line 13 is the command for a controller selftest (see KBC_SELFTEST in kbd.h) In that case, c should indeed be 0x55, since that indicates a sucessful selftest (KBC_STOK, see kbd.h). I don't know what this probe-code is trying to do, but the keyboard/ps2-mouse controller reacts correctly IMHO. Does this code really work on other systems ? And is it save to re-probe/re-init the controller when syscons did the same thing just before ? >How-To-Repeat: Just boot :) >Fix: A work-around is to just disable lines 15-19 above, the mouse works fine under XFree. Gert-Jan --------------------------------------------------------------------------- J.G. Vons, Oce engineering Creteil, France | E-mail: Gert-Jan.Vons@ocegr.fr