Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 4cf3f37c87ba1f9d58072444bd735e40e4779e70
      
https://github.com/tianocore/edk2/commit/4cf3f37c87ba1f9d58072444bd735e40e4779e70
  Author: Star Zeng <star.z...@intel.com>
  Date:   2017-08-08 (Tue, 08 Aug 2017)

  Changed paths:
    M MdeModulePkg/Universal/SerialDxe/SerialIo.c

  Log Message:
  -----------
  MdeModulePkg SerialDxe: Process timeout consistently in SerialRead

https://lists.01.org/pipermail/edk2-devel/2017-July/012385.html
reported the timeout processing in SerialRead is not consistent.

Since SerialPortPoll only checks the status of serial port and
returns immediately, and SerialPortRead does not really implement
a time out mechanism and will always wait for enough input,
it will cause below results:
1. If there is no serial input at all, this interface will return
timeout immediately without any waiting;
2. If there is A characters in serial port FIFO, and caller requires
A+1 characters, it will wait until a new input is coming and timeout
will not really occur.

This patch is to update SerialRead() to check SerialPortPoll() and
read data through SerialPortRead() one byte by one byte, and check
timeout against mSerialIoMode.Timeout if no input.

Cc: Heyi Guo <heyi....@linaro.org>
Cc: Ruiyu Ni <ruiyu...@intel.com>
Cc: Laszlo Ersek <ler...@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.z...@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu...@intel.com>


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to