Date: Thu, 9 Jan 1997 08:30:03 -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: <199701091630.IAA08141@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: Mark Schleifer <marks@roto.digex.net>, FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/2409: psm0: unable to set the command byte. psm0 not found at 0x60 Date: Thu, 9 Jan 1997 11:23:27 -0500 (EST) On 1/9/1997 (12:11:18 +0900), Kazutaka YOKOTA wrote: ] ] >w/ kernel.GENERIC: ] > ] >psm0 enabled in the kernel: System boots but doesn't take anything I ] > type. I have to powercycle after boot to ] > get out. ] >psm0 disabled in the kernel: System works OK unless something tries to ] > open psm0. ] > ] >w/ config OTOR-SCSI (the one sent in with the bug report): ] > ] >psm0 enabled in the kernel: System works OK unless something tries to ] > open psm0. ] > ] >w/ config OTOR-SCSI + PSM_NO_RESET: ] > ] >psm0 enabled in the kernel: System boots but doesn't take anything I ] > type. I have to powercycle after boot to ] > get out. ] > ] [...] ] >Jan 8 09:03:03 otor /kernel: Probing for devices on the ISA bus: ] >Jan 8 09:03:03 otor /kernel: kbdio: RESET_KBD return code:00fa ] >Jan 8 09:03:04 otor /kernel: kbdio: RESET_KBD status:00aa ] >Jan 8 09:03:04 otor /kernel: sc0 at 0x60-0x6f irq 1 on motherboard ] >Jan 8 09:03:04 otor /kernel: sc0: VGA color <16 virtual consoles, flags=0x0> ] >[...] ] >Jan 8 09:03:04 otor /kernel: kbdio: TEST_AUX_PORT status:0000 ] >Jan 8 09:03:04 otor /kernel: kbdio: RESET_AUX return code:00fa ] >Jan 8 09:03:04 otor /kernel: kbdio: RESET_AUX status:00aa ] >Jan 8 09:03:04 otor /kernel: kbdio: RESET_AUX ID:0000 ] >Jan 8 09:03:04 otor /kernel: psm0: unable to set the command byte. ] >Jan 8 09:03:04 otor /kernel: psm0 not found at 0x60 ] ] I see... The probe routine of the `psm' driver successfully reset the ] PS/2 mouse, but somehow the driver failed to talk to the keyboard ] controller just before finishing the probe. This is a nasty problem. ] ] Something went wrong after the device reset. I would be very grateful ] if you could take the following steps to narrow down the problem area. ] ] 1. Add the following #define to the top of /usr/src/sys/i386/isa/psm.c. ] #define PSM_DEBUG 2 ] Recompile the kernel, reboot the system, and see what it gives. ] There will be a lot of messages. Please examine `dmesg' output, ] if possible, as well as `syslogd' output, (Some messages are logged ] under kern.err.) Well, I did this and the messages did increase...And psm0 was found and operates correctly. I was able to run X with no trouble. Jan 9 10:20:18 otor /kernel: psm0: current command byte:0047 Jan 9 10:20:18 otor /kernel: kbdio: TEST_AUX_PORT status:0000 Jan 9 10:20:18 otor /kernel: kbdio: RESET_AUX return code:00fa Jan 9 10:20:18 otor /kernel: kbdio: RESET_AUX status:00aa Jan 9 10:20:18 otor /kernel: kbdio: RESET_AUX ID:0000 Jan 9 10:20:18 otor /kernel: psm: ENABLE_DEV return code:00fa Jan 9 10:20:19 otor /kernel: psm: DISABLE_DEV return code:00fa Jan 9 10:20:19 otor /kernel: psm: SEND_AUX_STATUS return code:00fa Jan 9 10:20:19 otor /kernel: psm0: status after reset 00 02 64 Jan 9 10:20:19 otor /kernel: psm: SEND_DEV_ID return code:00fa Jan 9 10:20:19 otor /kernel: psm: device ID: 0000 Jan 9 10:20:19 otor /kernel: psm: SET_RESOLUTION (0) 00fa Jan 9 10:20:19 otor /kernel: psm: SET_SCALING11 return code:00fa Jan 9 10:20:19 otor last message repeated 2 times Jan 9 10:20:19 otor /kernel: psm: SEND_AUX_STATUS return code:00fa Jan 9 10:20:19 otor /kernel: psm: status 00 00 64 (get_mouse_buttons) Jan 9 10:20:19 otor /kernel: psm: SET_SAMPLING_RATE (100) 00fa Jan 9 10:20:19 otor /kernel: psm: SET_RESOLUTION (2) 00fa Jan 9 10:20:19 otor /kernel: psm: SET_SCALING11 return code:00fa Jan 9 10:20:19 otor /kernel: psm: SET_STREAM_MODE return code:00fa Jan 9 10:20:19 otor /kernel: psm: SEND_AUX_STATUS return code:00fa Jan 9 10:20:19 otor /kernel: psm0: status 00 02 64 Jan 9 10:20:19 otor /kernel: psm0 at 0x60-0x64 irq 12 on motherboard Jan 9 10:20:19 otor /kernel: psm0: device ID 0, 2 buttons? And when I ran X: Jan 9 10:23:06 otor /kernel: psm: ENABLE_DEV return code:00fa Jan 9 10:23:06 otor /kernel: psm: SEND_AUX_STATUS return code:00fa Jan 9 10:23:06 otor /kernel: psm0: status 20 02 64 Jan 9 10:23:15 otor /kernel: psm: button 4 down (0000) (mkps2) Jan 9 10:23:26 otor last message repeated 167 times Jan 9 10:23:26 otor /kernel: psm: button 4 down (0001) (mkps2) Jan 9 10:23:29 otor last message repeated 69 times Jan 9 10:23:29 otor /kernel: psm: button 4 down (0000) (mkps2) Jan 9 10:23:29 otor /kernel: psm: DISABLE_DEV return code:00fa Jan 9 10:23:29 otor /kernel: psm0: failed to disable the aux port (psmclose). I rebooted twice just to be sure everything worked. Then I removed the #define and rebooted. The problem returned as expected ] 2. Apply the following patch to `psm.c' and see if it works. The patch ] reduces the amount of interaction between the driver and the keyboard ] controller, and uses less variety of mouse commands, thus, there should ] be less chance of communication failure. I added your patch without the '#define PSM_DEBUG 2' (since that by itself avoids the problem) and the the problem was still there: kbdio: TEST_AUX_PORT status:0000 kbdio: RESET_AUX return code:00fa kbdio: RESET_AUX status:00aa kbdio: RESET_AUX ID:0000 psm0: unable to set the command byte. psm0 not found at 0x60 What's next to try? Also, do you want be to remove the patch below before the next test? - Mark ] ] --- psm.c.orig Sat Jan 4 11:54:32 1997 ] +++ psm.c Thu Jan 9 11:15:48 1997 ] @@ -695,6 +695,7 @@ ] ] /* set mouse parameters */ ] /* FIXME:XXX should we set them in `psmattach()' rather than here? */ ] +#if 0 ] if (setparams) { ] if (sc->mode.rate > 0) ] sc->mode.rate = set_mouse_sampling_rate(ioport, sc->mode.rate); ] @@ -705,6 +706,11 @@ ] /* FIXME:XXX I don't know if these parameters are reasonable */ ] set_mouse_scaling(ioport); /* 1:1 scaling */ ] set_mouse_mode(ioport); /* stream mode */ ] +#else ] + i = send_aux_command(ioport, 0x00f6); ] + if (verbose) ] + log(LOG_DEBUG, "psm%d: SET_DEFAULT return code:%04x\n", unit, i); ] +#endif ] ] /* just check the status of the mouse */ ] if (verbose) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701091630.IAA08141>