freebsd-dev/sys/dev/atkbdc
Ruslan Ermilov ac3912b020 Fix LEDs not working when atkbd is an active keyboard and the physical
keyboard is attached only after the system has already booted.

If USB keyboard is also present, and there's no kbdmux(4), the problem
has been hiding itself because as soon as we get to multi-user, the
USB keyboard becomes an active keyboard (see devd.conf), thus marking
atkbd inactive and letting the old code initialize the keyboard.

With kbdmux(4), or if there's no USB keyboard, the atkbd keyboard is
always active, whether it's physically attached or not, thus it never
initialized itself properly on a physical attach.

To fix this, move block that initialized the keyboard on attach upper
so it doesn't depend on the (KBD_IS_ACTIVE(kbd) && KBD_IS_BUSY(kbd))
condition.  Also move KBD_FOUND_DEVICE() a few lines upper so that
KDSETLED and KDSETREPEAT that follow it propagate to the controller.

MFC after:	3 days
2006-10-25 13:35:42 +00:00
..
atkbd_atkbdc.c - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
atkbd.c Fix LEDs not working when atkbd is an active keyboard and the physical 2006-10-25 13:35:42 +00:00
atkbdc_ebus.c - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
atkbdc_isa.c Make sure command/data port (0x60) and status port (0x64) are in correct 2006-07-03 23:40:58 +00:00
atkbdc_subr.c - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
atkbdc_subr.h - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
atkbdc.c Avoid an infinite loop in empty_both_buffers() by adding a timeout. 2006-09-04 00:19:31 +00:00
atkbdcreg.h - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
atkbdreg.h - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
psm.c Add ALPS glide point ID and some compatibility IDs. 2006-03-15 07:04:33 +00:00
psm.h - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00