From 4dc31c38a9146c74a35089442263bb31f82ead72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Fri, 16 Nov 2007 11:05:22 +0000 Subject: [PATCH] Enable mouse before resetting it svn path=/trunk/; revision=30499 --- reactos/drivers/input/i8042prt/pnp.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/reactos/drivers/input/i8042prt/pnp.c b/reactos/drivers/input/i8042prt/pnp.c index de66da8365f..c41da577834 100644 --- a/reactos/drivers/input/i8042prt/pnp.c +++ b/reactos/drivers/input/i8042prt/pnp.c @@ -333,19 +333,6 @@ EnableInterrupts( 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 */ if (DeviceExtension->Flags & KEYBOARD_PRESENT) { @@ -360,6 +347,19 @@ EnableInterrupts( if (!i8042ChangeMode(DeviceExtension, FlagsToDisable, FlagsToEnable)) 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; }