From: Vojtech Pavlik <vojtech@suse.cz>
To: Michael Gernoth <simigern@stud.uni-erlangen.de>,
linux-kernel@vger.kernel.org
Subject: Re: AT-Keyboard probing too strict in current bk?
Date: Fri, 28 Jan 2005 15:43:37 +0100 [thread overview]
Message-ID: <20050128144337.GC12137@ucw.cz> (raw)
In-Reply-To: <20050127164734.GA12899@cip.informatik.uni-erlangen.de>
On Thu, Jan 27, 2005 at 05:47:34PM +0100, Michael Gernoth wrote:
> Hi,
>
> since the introduction of libps2 in the mainline 2.6 kernel I had the
> issue that my keyboard[1] was no longer recognized.
> The cause of this is that my "keyboard" responds to all commands with
> an acknowledgement (0xFA), even if the command is not implemented. One
> of those not implemented commands is 0xF2 (ATKBD_GETID_CMD).
>
> In drivers/input/keyboard/atkbd.c ATKBD_GETID_CMD is used to probe
> for the keyboard, and if this fails, another method of detecting
> the keyboard is used. It seems that in 2.6.10 atkbd_command
> indicated that my keyboard did not successfully execute the command,
> but in the current bk-version ps2_command is used, which indicates
> a successfull execution, leaving behind invalid keyboard-ids.
> This leads to the kernel ignoring my keyboard.
This is a bug in libps2, that's been fixed and submitted for 2.6.11.
Your keyboard should work again with 2.6.11, if the fix makes it there.
If a keyboard doesn't report the ID on a GETID command, ps2_command
should fail.
Old AT keyboards don't know the GETID command but at least they know
the SETLEDS command, which is how they're identified.
As a temporary workaround you can use atkbd.dumbkbd=1, which will cause
your LEDs not to work as a side effect, though.
> I fixed the problem in my keyboard-converter, but I don't know if
> the checking in keyboard-probing shouldn't be changed to catch that
> case, too. I have included a patch which does that.
We don't need to check the values, since the ps2_command will return an
error when the bug in libps2 is fixed.
> [1] SUN Type 5 keyboard connected to a self-built sun->ps2 adapter
>
> --- 1.73/drivers/input/keyboard/atkbd.c 2005-01-06 17:42:09 +01:00
> +++ edited/drivers/input/keyboard/atkbd.c 2005-01-27 17:27:03 +01:00
> @@ -512,7 +512,8 @@
> */
>
> param[0] = param[1] = 0xa5; /* initialize with invalid values */
> - if (ps2_command(ps2dev, param, ATKBD_CMD_GETID)) {
> + if (ps2_command(ps2dev, param, ATKBD_CMD_GETID) ||
> + (param[0] == 0xa5 && param[1] == 0xa5)) {
>
> /*
> * If the get ID command failed, we check if we can at least set the LEDs on
--
Vojtech Pavlik
SuSE Labs, SuSE CR
prev parent reply other threads:[~2005-01-28 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-27 16:47 AT-Keyboard probing too strict in current bk? Michael Gernoth
2005-01-28 3:59 ` Dmitry Torokhov
2005-01-28 11:15 ` Michael Gernoth
2005-01-28 14:43 ` Vojtech Pavlik [this message]
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=20050128144337.GC12137@ucw.cz \
--to=vojtech@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=simigern@stud.uni-erlangen.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox