Modified: trunk/reactos/drivers/dd/serial/circularbuffer.c
Modified: trunk/reactos/drivers/dd/serial/cleanup.c
Modified: trunk/reactos/drivers/dd/serial/close.c
Modified: trunk/reactos/drivers/dd/serial/create.c
Modified: trunk/reactos/drivers/dd/serial/devctrl.c
Modified: trunk/reactos/drivers/dd/serial/info.c
Modified: trunk/reactos/drivers/dd/serial/legacy.c
Modified: trunk/reactos/drivers/dd/serial/misc.c
Modified: trunk/reactos/drivers/dd/serial/pnp.c
Modified: trunk/reactos/drivers/dd/serial/power.c
Modified: trunk/reactos/drivers/dd/serial/rw.c
Modified: trunk/reactos/drivers/dd/serial/serial.c
Modified: trunk/reactos/drivers/dd/serial/serial.h
--- trunk/reactos/drivers/dd/serial/circularbuffer.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/circularbuffer.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/circularbuffer.c
* PURPOSE: Operations on a circular buffer
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/cleanup.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/cleanup.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/cleanup.c
* PURPOSE: Serial IRP_MJ_CLEANUP operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/close.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/close.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/close.c
* PURPOSE: Serial IRP_MJ_CLOSE operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/create.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/create.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/create.c
* PURPOSE: Serial IRP_MJ_CREATE operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/devctrl.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/devctrl.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/devctrl.c
* PURPOSE: Serial IRP_MJ_DEVICE_CONTROL operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
@@ -196,12 +195,13 @@
RtlZeroMemory(pCommProp, sizeof(SERIAL_COMMPROP));
- pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
+ if (!(pCommProp->ProvSpec1 & COMMPROP_INITIALIZED))
+ pCommProp->PacketLength = sizeof(SERIAL_COMMPROP);
pCommProp->PacketVersion = 2;
pCommProp->ServiceMask = SERIAL_SP_SERIALCOMM;
pCommProp->MaxTxQueue = pCommProp->CurrentTxQueue = DeviceExtension->OutputBuffer.Length - 1;
pCommProp->MaxRxQueue = pCommProp->CurrentRxQueue = DeviceExtension->InputBuffer.Length - 1;
- pCommProp->ProvSubType = 1; // PST_RS232;
+ pCommProp->ProvSubType = PST_RS232;
pCommProp->ProvCapabilities = SERIAL_PCF_DTRDSR | SERIAL_PCF_INTTIMEOUTS | SERIAL_PCF_PARITY_CHECK
| SERIAL_PCF_RTSCTS | SERIAL_PCF_SETXCHAR | SERIAL_PCF_SPECIALCHARS | SERIAL_PCF_TOTALTIMEOUTS
| SERIAL_PCF_XONXOFF;
@@ -227,6 +227,8 @@
pCommProp->SettableStopParity = SERIAL_STOPBITS_10 | SERIAL_STOPBITS_15 | SERIAL_STOPBITS_20
| SERIAL_PARITY_NONE | SERIAL_PARITY_ODD | SERIAL_PARITY_EVEN | SERIAL_PARITY_MARK | SERIAL_PARITY_SPACE;
+ pCommProp->ProvSpec2 = 0; /* Size of provider-specific data */
+
return STATUS_SUCCESS;
}
--- trunk/reactos/drivers/dd/serial/info.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/info.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/info.c
* PURPOSE: Serial IRP_MJ_QUERY_INFORMATION operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/legacy.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/legacy.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/bus/serial/legacy.c
* PURPOSE: Legacy serial port enumeration
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
* Mark Junker (mjscod@gmx.de)
*/
--- trunk/reactos/drivers/dd/serial/misc.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/misc.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/misc.c
* PURPOSE: Misceallenous operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
--- trunk/reactos/drivers/dd/serial/pnp.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/pnp.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/pnp.c
* PURPOSE: Serial IRP_MJ_PNP operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
/* FIXME: call IoAcquireRemoveLock/IoReleaseRemoveLock around each I/O operation */
--- trunk/reactos/drivers/dd/serial/power.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/power.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/power.c
* PURPOSE: Serial IRP_MJ_POWER operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/rw.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/rw.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial port driver
* FILE: drivers/dd/serial/create.c
* PURPOSE: Serial IRP_MJ_READ/IRP_MJ_WRITE operations
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
#define NDEBUG
--- trunk/reactos/drivers/dd/serial/serial.c 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/serial.c 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,11 +1,10 @@
-/* $Id:
- *
+/*
* COPYRIGHT: See COPYING in the top level directory
- * PROJECT: ReactOS kernel
+ * PROJECT: Serial driver
* FILE: drivers/dd/serial/serial.c
* PURPOSE: Serial driver loading/unloading
*
- * PROGRAMMERS: HervÚ Poussineau (poussine@freesurf.fr)
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
*/
//#define NDEBUG
--- trunk/reactos/drivers/dd/serial/serial.h 2005-06-23 18:15:04 UTC (rev 16249)
+++ trunk/reactos/drivers/dd/serial/serial.h 2005-06-23 20:34:17 UTC (rev 16250)
@@ -1,47 +1,42 @@
-#if defined(__GNUC__)
- #include <ddk/ntddk.h>
- #include <ddk/ntddser.h>
- #include <stdio.h>
+/*
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: Serial driver
+ * FILE: drivers/dd/serial/serial.h
+ * PURPOSE: Serial driver header
+ *
+ * PROGRAMMERS: HervÚ Poussineau (hpoussin@reactos.com)
+ */
- #include <debug.h>
+#include <ntddk.h>
+#include <ntddser.h>
+#include <stdio.h>
- /* FIXME: these prototypes MUST NOT be here! */
- NTSTATUS STDCALL
- IoAttachDeviceToDeviceStackSafe(
- IN PDEVICE_OBJECT SourceDevice,
- IN PDEVICE_OBJECT TargetDevice,
- OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
+#if defined(__GNUC__)
+ #include <debug.h>
#elif defined(_MSC_VER)
- #include <ntddk.h>
- #include <ntddser.h>
- #include <stdio.h>
-
#define STDCALL
#define DPRINT1 DbgPrint("(%s:%d) ", __FILE__, __LINE__), DbgPrint
#define CHECKPOINT1 DbgPrint("(%s:%d)\n", __FILE__, __LINE__)
-
- NTSTATUS STDCALL
- IoAttachDeviceToDeviceStackSafe(
- IN PDEVICE_OBJECT SourceDevice,
- IN PDEVICE_OBJECT TargetDevice,
- OUT PDEVICE_OBJECT *AttachedToDeviceObject);
-
- #ifdef NDEBUG2
- #define DPRINT
- #define CHECKPOINT
- #else
- #define DPRINT DPRINT1
- #define CHECKPOINT CHECKPOINT1
- #undef NDEBUG
- #endif
+ #define DPRINT
+ #define CHECKPOINT
#else
#error Unknown compiler!
#endif
#define TAG(A, B, C, D) (ULONG)(((A)<<0) + ((B)<<8) + ((C)<<16) + ((D)<<24))
+/* See winbase.h */
+#define PST_RS232 1
+#define COMMPROP_INITIALIZED 0xE73CF52E
+
+/* FIXME: I don't know why it is not defined anywhere... */
+NTSTATUS STDCALL
+IoAttachDeviceToDeviceStackSafe(
+ IN PDEVICE_OBJECT SourceDevice,
+ IN PDEVICE_OBJECT TargetDevice,
+ OUT PDEVICE_OBJECT *AttachedToDeviceObject);
+
typedef enum
{
dsStopped,