Activate serial device interface only at the very end of
IRP_MN_START_DEVICE
Modified: trunk/reactos/drivers/dd/serial/pnp.c
_____
Modified: trunk/reactos/drivers/dd/serial/pnp.c
--- trunk/reactos/drivers/dd/serial/pnp.c 2006-01-20 17:29:50 UTC
(rev 20953)
+++ trunk/reactos/drivers/dd/serial/pnp.c 2006-01-20 17:41:59 UTC
(rev 20954)
@@ -242,15 +242,6 @@
return Status;
}
- /* Activate serial interface */
- Status =
IoSetDeviceInterfaceState(&DeviceExtension->SerialInterfaceName, TRUE);
- if (!NT_SUCCESS(Status))
- {
- DPRINT("Serial: IoSetDeviceInterfaceState() failed with
status 0x%08x\n", Status);
- IoDeleteSymbolicLink(&LinkName);
- return Status;
- }
-
/* Connect interrupt and enable them */
Status = IoConnectInterrupt(
&DeviceExtension->Interrupt, SerialInterruptService,
@@ -289,6 +280,10 @@
DeviceExtension->MCR |= SR_MCR_DTR | SR_MCR_RTS;
WRITE_PORT_UCHAR(SER_MCR(ComPortBase), DeviceExtension->MCR);
+ /* Activate serial interface */
+ IoSetDeviceInterfaceState(&DeviceExtension->SerialInterfaceName,
TRUE);
+ /* We don't really care if the call succeeded or not... */
+
return STATUS_SUCCESS;
}
Show replies by date