Allow interrupts indicating an empty buffer only if some bytes are pending

This should correct the boot in Qemu

svn path=/trunk/; revision=14631
This commit is contained in:
Hervé Poussineau 2005-04-15 22:14:13 +00:00
parent 91ec410e2f
commit 1eb9c1db51

View file

@ -130,11 +130,13 @@ SerialSendByte(
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