mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
Disable keyboard and mouse before checking the i8042 controller.
Flush queue before enabling them svn path=/trunk/; revision=24368
This commit is contained in:
@@ -80,6 +80,10 @@ i8042BasicDetect(
|
||||
NTSTATUS Status;
|
||||
UCHAR Value = 0;
|
||||
|
||||
/* Don't enable keyboard and mouse interrupts, disable keyboard/mouse */
|
||||
if (!i8042ChangeMode(DeviceExtension, CCB_KBD_INT_ENAB | CCB_MOUSE_INT_ENAB, CCB_KBD_DISAB | CCB_MOUSE_DISAB))
|
||||
return STATUS_IO_DEVICE_ERROR;
|
||||
|
||||
i8042Flush(DeviceExtension);
|
||||
|
||||
if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_SELF_TEST))
|
||||
@@ -101,10 +105,6 @@ i8042BasicDetect(
|
||||
return STATUS_IO_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
/* Don't enable keyboard and mouse interrupts, disable keyboard/mouse */
|
||||
if (!i8042ChangeMode(DeviceExtension, CCB_KBD_INT_ENAB | CCB_MOUSE_INT_ENAB, CCB_KBD_DISAB | CCB_MOUSE_DISAB))
|
||||
return STATUS_IO_DEVICE_ERROR;
|
||||
|
||||
/*
|
||||
* We used to send a KBD_LINE_TEST (0xAB) command here, but on at least HP
|
||||
* Pavilion notebooks the response to that command was incorrect.
|
||||
@@ -132,11 +132,6 @@ i8042DetectKeyboard(
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
if (!i8042ChangeMode(DeviceExtension, 0, CCB_KBD_DISAB))
|
||||
return FALSE;
|
||||
|
||||
i8042Flush(DeviceExtension);
|
||||
|
||||
/* Set LEDs (that is not fatal if some error occurs) */
|
||||
Status = i8042SynchWritePort(DeviceExtension, 0, KBD_CMD_SET_LEDS, TRUE);
|
||||
if (NT_SUCCESS(Status))
|
||||
@@ -333,6 +328,8 @@ EnableInterrupts(
|
||||
UCHAR FlagsToDisable = 0;
|
||||
UCHAR FlagsToEnable = 0;
|
||||
|
||||
i8042Flush(DeviceExtension);
|
||||
|
||||
/* Select the devices we have */
|
||||
if (DeviceExtension->Flags & KEYBOARD_PRESENT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user