Date: Mon, 03 Apr 1995 12:28:31 +0200 From: Gert-Jan.Vons@ocegr.fr To: bugs@FreeBSD.org Subject: psm driver probe fails on ThinkPad 340 Message-ID: <9504031028.AA22422@ocegr.fr>
next in thread | raw e-mail | index | archive | help
[ 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: <Relevant environment information (multiple lines)> 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: <Precise description of the problem (multiple lines)> 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: <Code/input/activities to reproduce the problem (multiple lines)> Just boot :) >Fix: <How to correct or work around the problem, if known (multiple lines)> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9504031028.AA22422>