mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:23:05 +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:
parent
3674f2ef32
commit
c99914fdac
1 changed files with 6 additions and 9 deletions
|
@ -80,6 +80,10 @@ i8042BasicDetect(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
UCHAR Value = 0;
|
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);
|
i8042Flush(DeviceExtension);
|
||||||
|
|
||||||
if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_SELF_TEST))
|
if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_SELF_TEST))
|
||||||
|
@ -101,10 +105,6 @@ i8042BasicDetect(
|
||||||
return STATUS_IO_DEVICE_ERROR;
|
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
|
* 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.
|
* Pavilion notebooks the response to that command was incorrect.
|
||||||
|
@ -132,11 +132,6 @@ i8042DetectKeyboard(
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
if (!i8042ChangeMode(DeviceExtension, 0, CCB_KBD_DISAB))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
i8042Flush(DeviceExtension);
|
|
||||||
|
|
||||||
/* Set LEDs (that is not fatal if some error occurs) */
|
/* Set LEDs (that is not fatal if some error occurs) */
|
||||||
Status = i8042SynchWritePort(DeviceExtension, 0, KBD_CMD_SET_LEDS, TRUE);
|
Status = i8042SynchWritePort(DeviceExtension, 0, KBD_CMD_SET_LEDS, TRUE);
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
|
@ -333,6 +328,8 @@ EnableInterrupts(
|
||||||
UCHAR FlagsToDisable = 0;
|
UCHAR FlagsToDisable = 0;
|
||||||
UCHAR FlagsToEnable = 0;
|
UCHAR FlagsToEnable = 0;
|
||||||
|
|
||||||
|
i8042Flush(DeviceExtension);
|
||||||
|
|
||||||
/* Select the devices we have */
|
/* Select the devices we have */
|
||||||
if (DeviceExtension->Flags & KEYBOARD_PRESENT)
|
if (DeviceExtension->Flags & KEYBOARD_PRESENT)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue