All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Hirst <rhirst@linuxcare.com>
To: Thomas Marteau <marteaut@esiee.fr>
Cc: "parisc-linux@parisc-linux.org" <parisc-linux@parisc-linux.org>
Subject: Re: [parisc-linux] The final patch for the keyboard problem
Date: Tue, 7 Aug 2001 22:36:50 +0100	[thread overview]
Message-ID: <20010807223650.F1011@linuxcare.com> (raw)
In-Reply-To: <20010807131419.B1011@linuxcare.com>; from rhirst@linuxcare.com on Tue, Aug 07, 2001 at 01:14:19PM +0100

On Tue, Aug 07, 2001 at 01:14:19PM +0100, Richard Hirst wrote:
> Went back to the HP keyboard, and CapsLock hangs the machine there also.


I've fixed the lockup on CapsLock, using an analyser to monitor what happened
on the PS/2 cable:

(fw=firmware, kb=keyboard, li=linux)

B180, HP keyboard, this is what the firmware does on reset:

fw F5	disable scanning
kb FA	ack

fw F2	???
kb FA	ack
kb AB
kb 83

fw FF	reset
kb FA	ack
kb AA	power-on reset

fw F0	???
kb FA	ack

fw 02	???
kb FA	ack

fw F0	???
kb FA	ack

fw 00	???
kb FA	ack
kb 02

fw ED	set leds
kb FA	ack

fw 02	NumLock
kb FA	ack

fw F4	enable scanning
kb FA	ack

Now CapsLock pressed and released:

kb 58	keypress

fw ED	set leds
kb FA	ack

fw 06	CapsLock + NumLock
kb FA	ack

kb F0	keyrelease
kb 58

Now we boot Linux:

li ED	set leds
kb FA	ack

li 00	No LEDs
kb FA	ack

li F4	enable scanning
kb FA	ack

Now we press and release '1':

kb 16	keypress

kb F0	keyrelease
kb 16

Now we press CapsLock:

kb 58	keypress

li ED	set leds
li ED	set leds
kb FA	ack

System is hung.

The problem was that the driver retried the 'set leds' every 1ms, but the data rate
on the serial PS/2 cable is such that it takes at least 1ms for the command to reach
the keyboard, and a further 1ms for the ack to return.

I changed the driver to allow 5ms rather than 1ms, and it works now.  In fact, for
my keyboard, the time from command being written to ack being received is about
2.5ms.

Can't say I like the idea of mdelay(5) being called 3 times every time I press
CapsLock though.

Richard

  reply	other threads:[~2001-08-07 21:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-07  7:27 [parisc-linux] The final patch for the keyboard problem Thomas Marteau
2001-08-07 10:58 ` Richard Hirst
2001-08-07 12:14   ` Richard Hirst
2001-08-07 21:36     ` Richard Hirst [this message]
2001-08-09 16:45       ` Grant Grundler
2001-08-07 23:31     ` Richard Hirst
2001-08-07 16:23 ` Matthew Wilcox
2001-08-10 17:23 ` Richard Hirst
2001-08-13 18:09   ` marteau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010807223650.F1011@linuxcare.com \
    --to=rhirst@linuxcare.com \
    --cc=marteaut@esiee.fr \
    --cc=parisc-linux@parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.