mirror of https://github.com/acidanthera/audk.git
Fix the hardware flow control logic in SerialIo driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10228 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1fafcca8b4
commit
711d0721b5
|
@ -909,7 +909,7 @@ IsaSerialReceiveTransmit (
|
|||
//
|
||||
TimeOut = 0;
|
||||
Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
|
||||
while ((Msr.Bits.Dcd == 1) && ((Msr.Bits.Cts == 0) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
|
||||
while ((Msr.Bits.Dcd == 1) && ((Msr.Bits.Cts == 0) ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
|
||||
gBS->Stall (TIMEOUT_STALL_INTERVAL);
|
||||
TimeOut++;
|
||||
if (TimeOut > 5) {
|
||||
|
@ -919,7 +919,7 @@ IsaSerialReceiveTransmit (
|
|||
Msr.Data = READ_MSR (SerialDevice->IsaIo, SerialDevice->BaseAddress);
|
||||
}
|
||||
|
||||
if ((Msr.Bits.Dcd == 0) && ((Msr.Bits.Cts == 1) || FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
|
||||
if ((Msr.Bits.Dcd == 0) || ((Msr.Bits.Cts == 1) ^ FeaturePcdGet(PcdIsaBusSerialUseHalfHandshake))) {
|
||||
IsaSerialFifoRemove (&SerialDevice->Transmit, &Data);
|
||||
WRITE_THR (SerialDevice->IsaIo, SerialDevice->BaseAddress, Data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue