Re: /dev/psaux troubles with 2.2.2

Vojtech Pavlik (vojtech-lists@twilight.ucw.cz)
Wed, 10 Mar 1999 23:59:16 +0100


On Wed, Mar 10, 1999 at 05:54:50PM +0000, Johan Myréen wrote:

> That might be a good idea. The current detection code seems to work for
> most people, anyway. Linus (or somebody) took out the BIOS code, let's
> see if I can persuade him to put it back again...

What about trying another detection method?

The current driver uses the 0xD3 - Write to AUX output buffer command to
detect the AUX presence. This is a feature that is not critical for a
working PS/2 implementation and thus doesn't have to be implemented in every
i8042 BIOS.

There are other commands that relate to the AUX port and are more likely to
be implemented:

0xA9 - AUX interface test. Should return 0x00 if OK. If doesn't return
anything, there is no AUX interface. Some AMIKEY i8042's can return
the cache flag (0x00) here, but as far as I know this is limited to
80286 machines only.

0xA7 + 0xA8 - Enable + Disable AUX interface. This, if AUX is present,
should toggle the AUX Disable bit (bit 5) in the i8042
control register.

Finally, I think that if 0xD3 isn't implemented, 0xD2 won't be also, which
is 'Write to KBD output buffer', so, it might be reasonable to try that if
the probe fails, and if this doesn't fail, then assume the AUX port isn't
here. If it fails, too, then do some of the abovementioned tests ...

Yes, I know it's quite complex, but you have to keep in mind that with
a hardware that has history of incompatibilities dating back to 80186 days,
like the i8042 has, you will have to live with workarounds ...

Vojtech

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/