Date: Tue, 7 Jan 1997 19:20:02 -0800 (PST) From: Mark Schleifer <marks@roto.digex.net> To: freebsd-bugs Subject: Re: kern/2409: psm0: unable to set the command byte. psm0 not found at 0x60 Message-ID: <199701080320.TAA09267@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/2409; it has been noted by GNATS. From: Mark Schleifer <marks@roto.digex.net> To: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> Cc: FreeBSD-gnats-submit@freebsd.org, marks@digex.net Subject: Re: kern/2409: psm0: unable to set the command byte. psm0 not found at 0x60 Date: Tue, 7 Jan 1997 22:18:42 -0500 (EST) On 1/8/1997 (10:23:25 +0900), Kazutaka YOKOTA wrote: ] ] >>Number: 2409 ] >>Category: kern ] >>Synopsis: psm0: unable to set the command byte. psm0 not found at 0x60 ] >>Confidential: no ] >>Severity: serious ] >>Priority: high ] >>Responsible: freebsd-bugs ] >>State: open ] >>Class: sw-bug ] >>Submitter-Id: current-users ] >>Arrival-Date: Tue Jan 7 15:40:03 PST 1997 ] >>Last-Modified: ] >>Originator: Mark Schleifer ] >>Organization: ] >DIGEX ] >>Release: FreeBSD 2.2-BETA_A i386 ] >>Environment: ] > ] >DEC HiNote Ultra II Laptop ] >Pentium 133MHz ] >32 MB Ram ] > ] >>Description: ] > ] >On Boot: ] > ] >psm0: unable to set the command byte. ] >psm0 not found at 0x60 ] ] The message means that the `psm' driver has difficulty with the ] keyboard controller, and gives up probing the PS/2 mouse device. As ] far as the driver is concerned, no PS/2 mouse exists in the system. ] ] >Worked under SNAPs and ALPHA. Seems to be root cause of moused and ] >X crashing system. ] ] There recently was a patch to the `psm' driver. It cures system ] crash occurring when the `psm' driver thinks there is no PS/2 mouse ] attached, and someone, such as moused or X, tries to open `psm'. (See ] the end of this mail.) ] ] But, this patch doesn't solve the problem of your built-in(?) PS/2 ] pointing device not detected... Yes, it's a 2-button track ball that shows up as a PS/2 mouse ] ] BTW, did `moused' work properly to access the PS/2 mouse under SNAPs ] and ALPHA in your system? How did X access the mouse, directly or via ] `moused'? I don't remember trying moused before this BETA. X talked to the mouse (/dev/psm0) directly. ] >>How-To-Repeat: ] > ] >Kernel made with following config file. This file worked with SNAPs and ] >ALPHA after applying PAO patches. Also tried with PSM_NO_RESET with BETA ] >but that caused the keyboard to lockup at first input request. ] ] PSM_NO_RESET is no longer available in 2.2-BETA, thus, has nothing to do ] with the keyboard lockup; the lockup which shouldn't be happening *sigh* Interesting...It was just giving me the errors until I added that config option (which it didn't complain about). With that option in, it doesn't allow keyboard input. ] Did you see any message from the `sc' (syscons) driver on boot? sc had no errors during boot. Just the usual: Jan 7 22:13:07 otor /kernel: sc0 at 0x60-0x6f irq 1 on motherboard Jan 7 22:13:07 otor /kernel: sc0: VGA color <16 virtual consoles, flags=0x0> ] I would also ask you to add ] options "KBDIO_DEBUG=2" ] to your config file. With this option `sc' and `psm' drivers will log ] quite a few messages via `syslogd' on boot and later. The messages are ] marked with "kbdio: blugh blugh". I did this but saw nothing in the syslogs. What does it log them under? kern.debug? Just for grins, I tried starting moused again, which crashed immediately: # moused -p /dev/psm0 -t ps/2 Fault trap 12: page fault while in kernel mode fault virtual address = 0x8 fault code = supervisor read, page not present instruction pointer = 0x8:0xf01b880b stack pointer = 0x10:0xefbffdb4 frame pointer = 0x10:0xefbffdcc code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 208 (moused) interrupt mask = panic: page fault syncing disks... 4 4 2 done Any ideas? - Mark ] -- patch to psm.c --- ] ] RCS file: /home/ncvs/src/sys/i386/isa/psm.c,v ] retrieving revision 1.25.2.3 ] retrieving revision 1.25.2.4 ] diff -u -r1.25.2.3 -r1.25.2.4 ] --- src/sys/i386/isa/psm.c 1996/12/03 10:47:24 1.25.2.3 ] +++ src/sys/i386/isa/psm.c 1997/01/05 06:34:11 1.25.2.4 ] @@ -19,7 +19,7 @@ ] * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ] * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ] * ] - * $Id: psm.c,v 1.25.2.3 1996/12/03 10:47:24 phk Exp $ ] + * $Id: psm.c,v 1.25.2.4 1997/01/05 06:34:11 nate Exp $ ] */ ] ] /* ] @@ -508,6 +508,8 @@ ] if (unit >= NPSM) ] return (0); ] ] + psm_softc[unit] = NULL; ] + ] sc = malloc(sizeof *sc, M_DEVBUF, M_NOWAIT); ] ] bzero(sc, sizeof *sc); ] @@ -745,6 +747,9 @@ ] int unit = dvp->id_unit; ] struct psm_softc *sc = psm_softc[unit]; ] ] + if (sc == NULL) /* shouldn't happen */ ] + return (0); ] + ] /* initial operation mode */ ] sc->mode.accelfactor = PSM_ACCEL; ] sc->mode.protocol = MOUSE_PROTO_PS2; ] @@ -786,7 +791,7 @@ ] ] /* Get device data */ ] sc = psm_softc[unit]; ] - if ((sc->state & PSM_VALID) == 0) ] + if ((sc == NULL) || (sc->state & PSM_VALID) == 0) ] /* the device is no longer valid/functioning */ ] return (ENXIO); ] ioport = sc->addr;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701080320.TAA09267>