kernel - Fix keyboard probe for chromebooks (2)
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 3 Jan 2014 02:11:26 +0000 (18:11 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 3 Jan 2014 02:18:37 +0000 (18:18 -0800)
commit7f3d8d5546c701eceefe4437a49ffa6f01c7aa09
tree38ebae8100bffb08a3de3aabd3302753f050d4fb
parentad8b9749306613f2978808b43fe5e56019aeeb0f
kernel - Fix keyboard probe for chromebooks (2)

* Chromebooks (Acer C720 at least) appear to be using a BIOS emulator
  for the i8042 which gets really unhappy if the keyboard port is disabled,
  even temporarily.

* The original FreeBSD code disables and enables the keyboard port all the
  time, and even sends discrete disable commands (instead of just trusting
  that the command register flags will do the job).

  In addition, the PSM probe code may also disable the keyboard port
  temporarily while enabling and messing with the AUX port.

* Remove these actions.  The keyboard probe will now only disable the
  keyboard port during the probe and init_keyboard() call, which then
  proceeds to issue sufficient commands to the keyboard to wake it up
  again.

  The PSM probe now no longer touches the keyboard port disable/interrupt
  bits.  At all.  Theoetically it should not be necessary to disable the
  keyboard port while probing the aux port.

* The saved command_mask in the softc is no longer used, remove it.

* It is unclear whether the controller properly prioritizes data returned
  from controller commands in-front of the data returned from the keyboard
  or aux ports.  However, as it stands now, we cannot safely disable the
  data from the ports while issuing controller commands and waiting for
  controller command responses so...
sys/dev/misc/kbd/atkbd.c
sys/dev/misc/kbd/atkbdc.c
sys/dev/misc/kbd/atkbdcreg.h
sys/dev/misc/psm/psm.c