mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 12:33:05 +00:00
Enable mouse before resetting it
svn path=/trunk/; revision=30499
This commit is contained in:
parent
f1ca500ada
commit
4dc31c38a9
1 changed files with 13 additions and 13 deletions
|
@ -333,19 +333,6 @@ EnableInterrupts(
|
||||||
|
|
||||||
i8042Flush(DeviceExtension);
|
i8042Flush(DeviceExtension);
|
||||||
|
|
||||||
/* First, reset the mouse (if any) to start the detection */
|
|
||||||
if (DeviceExtension->Flags & MOUSE_PRESENT)
|
|
||||||
{
|
|
||||||
KIRQL Irql;
|
|
||||||
|
|
||||||
Irql = KeAcquireInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt);
|
|
||||||
|
|
||||||
i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_WRITE_MOUSE);
|
|
||||||
i8042Write(DeviceExtension, DeviceExtension->DataPort, MOU_CMD_RESET);
|
|
||||||
|
|
||||||
KeReleaseInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt, Irql);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Select the devices we have */
|
/* Select the devices we have */
|
||||||
if (DeviceExtension->Flags & KEYBOARD_PRESENT)
|
if (DeviceExtension->Flags & KEYBOARD_PRESENT)
|
||||||
{
|
{
|
||||||
|
@ -360,6 +347,19 @@ EnableInterrupts(
|
||||||
if (!i8042ChangeMode(DeviceExtension, FlagsToDisable, FlagsToEnable))
|
if (!i8042ChangeMode(DeviceExtension, FlagsToDisable, FlagsToEnable))
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
|
|
||||||
|
/* Reset the mouse (if any) to start the detection */
|
||||||
|
if (DeviceExtension->Flags & MOUSE_PRESENT)
|
||||||
|
{
|
||||||
|
KIRQL Irql;
|
||||||
|
|
||||||
|
Irql = KeAcquireInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt);
|
||||||
|
|
||||||
|
i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_WRITE_MOUSE);
|
||||||
|
i8042Write(DeviceExtension, DeviceExtension->DataPort, MOU_CMD_RESET);
|
||||||
|
|
||||||
|
KeReleaseInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt, Irql);
|
||||||
|
}
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue