From: Hervé Poussineau Date: Fri, 20 Jan 2006 17:41:59 +0000 (+0000) Subject: Activate serial device interface only at the very end of IRP_MN_START_DEVICE X-Git-Tag: backups/expat-rbuild@40467~227 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=d5fbbf9cd4bf80e32944e33dcc57f8f47e0edb83;ds=sidebyside Activate serial device interface only at the very end of IRP_MN_START_DEVICE svn path=/trunk/; revision=20954 --- diff --git a/reactos/drivers/dd/serial/pnp.c b/reactos/drivers/dd/serial/pnp.c index 6ca35ef53a6..e1a9bcf6c37 100644 --- a/reactos/drivers/dd/serial/pnp.c +++ b/reactos/drivers/dd/serial/pnp.c @@ -242,15 +242,6 @@ SerialPnpStartDevice( 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 @@ SerialPnpStartDevice( 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; }