- Attempt to avoid interaction with kernel debugging over serial port.
authorFilip Navara <filip.navara@gmail.com>
Wed, 18 Feb 2004 16:00:56 +0000 (16:00 +0000)
committerFilip Navara <filip.navara@gmail.com>
Wed, 18 Feb 2004 16:00:56 +0000 (16:00 +0000)
svn path=/trunk/; revision=8246

reactos/drivers/input/sermouse/sermouse.c

index 9f73ee8..f1b64e1 100644 (file)
 #include <ddk/ntddk.h>
 #include <ddk/ntddmou.h>
 
+/*
+ * HAL:KdComPortInUse used to prevent detecting mouse on port
+ * that is occupied by kernel debugger.
+ */
+ULONG DECLSPEC_IMPORT KdComPortInUse;
+
 /*
  * Compile time options
  */
@@ -568,6 +574,10 @@ InitializeMouse(ULONG Port, ULONG Irq, PDRIVER_OBJECT DriverObject)
        KAFFINITY Affinity;
        ULONG MouseType;
 
+       /* Don't detect mouse on port that is occupied by kernel debugger */
+       if (KdComPortInUse == Port)
+               return FALSE;
+
        /* Try to detect mouse on specified port */
        MouseType = DetectMicrosoftMouse(Port);