summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-05-09 11:21:25 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-05-10 14:12:57 +0800
commit9c0dc0b01a79666c3ba8aa0c69ad92131aada113 (patch)
tree591bbe22f55f4836e5976ae5348aa4f8ce3b6d4f
parent09abc636756b5d1f29224402181f7fd34f736c5f (diff)
downloadedk2-platforms-9c0dc0b01a79666c3ba8aa0c69ad92131aada113.tar.xz
MdeModulePkg/PciSioSerialDxe: Do not flush the UART
The patch aligns to the IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe driver not flush the UART in Reset() and SetAttributes() function. It was found the flush causes hang on certain PCI serial devices. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Eric Jin <eric.jin@intel.com>
-rw-r--r--MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
index f1870f3a1b..cce61d7a23 100644
--- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
+++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c
@@ -1,7 +1,7 @@
/** @file
SerialIo implementation for PCI or SIO UARTs.
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -442,27 +442,6 @@ SerialReceiveTransmit (
return EFI_SUCCESS;
}
-/**
- Flush the serial hardware transmit FIFO and shift register.
-
- @param SerialDevice The device to flush.
-**/
-VOID
-SerialFlushTransmitFifo (
- SERIAL_DEV *SerialDevice
- )
-{
- SERIAL_PORT_LSR Lsr;
-
- //
- // Wait for the serial port to be ready, to make sure both the transmit FIFO
- // and shift register empty.
- //
- do {
- Lsr.Data = READ_LSR (SerialDevice);
- } while (Lsr.Bits.Temt == 0);
-}
-
//
// Interface Functions
//
@@ -503,8 +482,6 @@ SerialReset (
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
- SerialFlushTransmitFifo (SerialDevice);
-
//
// Make sure DLAB is 0.
//
@@ -683,8 +660,6 @@ SerialSetAttributes (
Tpl = gBS->RaiseTPL (TPL_NOTIFY);
- SerialFlushTransmitFifo (SerialDevice);
-
//
// Put serial port on Divisor Latch Mode
//