[i8042prt]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 16 Mar 2014 12:57:39 +0000 (12:57 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 16 Mar 2014 12:57:39 +0000 (12:57 +0000)
fix keyboard detection on Dell D531 notebook and on other devices with PS/2 multiplexing controllers

svn path=/trunk/; revision=62517

reactos/drivers/input/i8042prt/pnp.c
reactos/drivers/usb/usbd/usbd.c
reactos/ntoskrnl/io/pnpmgr/pnpmgr.c

index 3d70785..3cb70ca 100644 (file)
@@ -437,6 +437,7 @@ StartProcedure(
         Status = EnableInterrupts(DeviceExtension, FlagsToDisable, FlagsToEnable);
         if (!NT_SUCCESS(Status))
         {
+            WARN_(I8042PRT, "EnableInterrupts failed: %lx\n", Status);
             DeviceExtension->Flags &= ~(KEYBOARD_PRESENT | MOUSE_PRESENT);
             return Status;
         }
@@ -454,6 +455,10 @@ StartProcedure(
         {
             DeviceExtension->Flags |= KEYBOARD_INITIALIZED;
         }
+        else
+        {
+            WARN_(I8042PRT, "i8042ConnectKeyboardInterrupt failed: %lx\n", Status);
+        }
     }
 
     if (DeviceExtension->Flags & MOUSE_PRESENT &&
@@ -467,7 +472,11 @@ StartProcedure(
         {
             DeviceExtension->Flags |= MOUSE_INITIALIZED;
         }
-
+        else
+        {
+            WARN_(I8042PRT, "i8042ConnectMouseInterrupt failed: %lx\n", Status);
+        }
+        
         /* Start the mouse */
         Irql = KeAcquireInterruptSpinLock(DeviceExtension->HighestDIRQLInterrupt);
         i8042IsrWritePort(DeviceExtension, MOU_CMD_RESET, CTRL_WRITE_MOUSE);
@@ -533,7 +542,7 @@ i8042PnpStartDevice(
             {
                 if (ResourceDescriptor->u.Port.Length == 1)
                 {
-                    /* We assume that the first ressource will
+                    /* We assume that the first resource will
                      * be the control port and the second one
                      * will be the data port...
                      */
@@ -551,8 +560,8 @@ i8042PnpStartDevice(
                     }
                     else
                     {
-                        WARN_(I8042PRT, "Too much I/O ranges provided: 0x%lx\n", ResourceDescriptor->u.Port.Length);
-                        return STATUS_INVALID_PARAMETER;
+                        /* FIXME: implement PS/2 Active Multiplexing */
+                        ERR_(I8042PRT, "Unhandled I/O ranges provided: 0x%lx\n", ResourceDescriptor->u.Port.Length);
                     }
                 }
                 else
index 958f017..f551ea9 100644 (file)
@@ -17,7 +17,7 @@
  * Notes:
  *    This driver was obsoleted in Windows XP and most functions
  *    became pure stubs. But some of them were retained for backward
- *    compatibilty with existing drivers.
+ *    compatibility with existing drivers.
  *
  *    Preserved functions:
  *
index 5f41772..5c18437 100644 (file)
@@ -648,7 +648,7 @@ IopStartDevice2(IN PDEVICE_OBJECT DeviceObject)
     
     ASSERT(!(DeviceNode->Flags & DNF_DISABLED));
 
-    /* Build the I/O stack locaiton */
+    /* Build the I/O stack location */
     RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION));
     Stack.MajorFunction = IRP_MJ_PNP;
     Stack.MinorFunction = IRP_MN_START_DEVICE;