Allow interrupts indicating an empty buffer only if some bytes are pending
This should correct the boot in Qemu
Modified: trunk/reactos/drivers/dd/serial/misc.c

Modified: trunk/reactos/drivers/dd/serial/misc.c
--- trunk/reactos/drivers/dd/serial/misc.c	2005-04-15 22:02:37 UTC (rev 14630)
+++ trunk/reactos/drivers/dd/serial/misc.c	2005-04-15 22:14:13 UTC (rev 14631)
@@ -130,11 +130,13 @@
 			DeviceExtension->ComPort, Byte);
 		DeviceExtension->SerialPerfStats.TransmittedCount++;
 	}
+	if (!IsCircularBufferEmpty(&DeviceExtension->OutputBuffer))
+	{
+		/* allow new interrupts */
+		IER = READ_PORT_UCHAR(SER_IER(ComPortBase));
+		WRITE_PORT_UCHAR(SER_IER(ComPortBase), IER | SR_IER_THR_EMPTY);
+	}
 	KeReleaseSpinLock(&DeviceExtension->OutputBufferLock, Irql);
-	
-	/* allow new interrupts */
-	IER = READ_PORT_UCHAR(SER_IER(ComPortBase));
-	WRITE_PORT_UCHAR(SER_IER(ComPortBase), IER | SR_IER_THR_EMPTY);
 }
 
 BOOLEAN STDCALL