Author: hpoussin Date: Fri Nov 16 14:05:22 2007 New Revision: 30499
URL: http://svn.reactos.org/svn/reactos?rev=30499&view=rev Log: Enable mouse before resetting it
Modified: trunk/reactos/drivers/input/i8042prt/pnp.c
Modified: trunk/reactos/drivers/input/i8042prt/pnp.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/pnp.... ============================================================================== --- trunk/reactos/drivers/input/i8042prt/pnp.c (original) +++ trunk/reactos/drivers/input/i8042prt/pnp.c Fri Nov 16 14:05:22 2007 @@ -333,7 +333,21 @@
i8042Flush(DeviceExtension);
- /* First, reset the mouse (if any) to start the detection */ + /* Select the devices we have */ + if (DeviceExtension->Flags & KEYBOARD_PRESENT) + { + FlagsToDisable |= CCB_KBD_DISAB; + FlagsToEnable |= CCB_KBD_INT_ENAB; + } + if (DeviceExtension->Flags & MOUSE_PRESENT) + { + FlagsToDisable |= CCB_MOUSE_DISAB; + FlagsToEnable |= CCB_MOUSE_INT_ENAB; + } + if (!i8042ChangeMode(DeviceExtension, FlagsToDisable, FlagsToEnable)) + return STATUS_UNSUCCESSFUL; + + /* Reset the mouse (if any) to start the detection */ if (DeviceExtension->Flags & MOUSE_PRESENT) { KIRQL Irql; @@ -345,20 +359,6 @@
KeReleaseInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt, Irql); } - - /* Select the devices we have */ - if (DeviceExtension->Flags & KEYBOARD_PRESENT) - { - FlagsToDisable |= CCB_KBD_DISAB; - FlagsToEnable |= CCB_KBD_INT_ENAB; - } - if (DeviceExtension->Flags & MOUSE_PRESENT) - { - FlagsToDisable |= CCB_MOUSE_DISAB; - FlagsToEnable |= CCB_MOUSE_INT_ENAB; - } - if (!i8042ChangeMode(DeviceExtension, FlagsToDisable, FlagsToEnable)) - return STATUS_UNSUCCESSFUL;
return STATUS_SUCCESS; }