coreboot/src/drivers
Werner Zeh c3ed2b3013 UPSTREAM: uart: Fix bug in {uart8250, uart8250_mem, ns16550}_rx_byte functions
We have several different UART implementations of which three support a
timeout when receiving characters. In all of these three implementations
there is a bug where when the timeout is hit the last received character
will be returned instead of the needed 0.

The problem is that the timeout variable i is decremented after it has
been checked in the while-loop. That leads to the fact that when the
while-loop is aborted due to a timeout i will contain 0xffffffff and not
0. Thus in turn will fool the following if-statement leading to wrong
return value to the caller in this case. Therefore the caller will see a
received character event if there is none.

BUG=none
BRANCH=none
TEST=none

Change-Id: I9b846abcdbc3b0e4777ff541dbb0ae7aa9f5f8d5
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 43314ffae5
Original-Change-Id: I23ff531a1e729e816764f1a071484c924dcb0f85
Original-Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Original-Reviewed-on: https://review.coreboot.org/19731
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/508780
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2017-05-18 18:07:14 -07:00
..
ams drivers/ams: Set default values in Kconfig 2015-11-22 01:39:44 +01:00
aspeed UPSTREAM: drivers/{aspeed,xgi_z9s}/Kconfig: Don't override NATIVE_VGA_USE_EDID 2017-05-07 07:41:14 -07:00
ati/ragexl UPSTREAM: src/drivers: Add required space before opening parenthesis '(' 2016-09-04 19:36:54 -07:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog UPSTREAM: elog: Print timestamp when logging event 2017-04-19 08:23:06 -07:00
emulation/qemu drivers/emulation: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:37:08 +02:00
generic UPSTREAM: drivers/regulator: Add driver for handling GPIO-based fixed regulator 2016-12-19 09:55:05 -08:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c UPSTREAM: drivers/i2c: Add new driver for RTC type RX6110 SA 2017-05-15 08:17:45 -07:00
ics/954309 drivers/ics: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:43 +02:00
intel UPSTREAM: drivers/intel/wifi: provide weak get_wifi_sar_limits() 2017-05-08 07:04:05 -07:00
ipmi UPSTREAM: src/drivers: Add required space before opening parenthesis '(' 2016-09-04 19:36:54 -07:00
lenovo UPSTREAM: Remove extra newlines from the end of all coreboot files. 2016-08-04 23:36:56 -07:00
maxim drivers/aspeed: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:17 +02:00
net UPSTREAM: drivers/net/rt8168: Add a macaddress cbfsfile using Kconfig 2017-01-28 04:11:03 -08:00
parade UPSTREAM: lib/edid.c: Differentiate between absent and non-conformant EDID 2017-05-07 07:41:12 -07:00
pc80 UPSTREAM: drivers/pc80/rtc: Rename mc146818rtc_early.c -> _romcc.c 2017-05-15 08:17:53 -07:00
ricoh/rce822 UPSTREAM: buildsystem: Drop explicit (k)config.h includes 2016-12-09 03:29:54 -08:00
siemens/nc_fpga UPSTREAM: siemens/nc_fpga: Add driver for Siemens NC FPGA 2016-07-07 01:09:51 -07:00
sil/3114 drivers/sil: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:05 +02:00
spi UPSTREAM: drivers/spi: Re-factor spi_crop_chunk 2017-05-07 16:25:58 -07:00
ti drivers/ti: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:36 +02:00
uart UPSTREAM: uart: Fix bug in {uart8250, uart8250_mem, ns16550}_rx_byte functions 2017-05-18 18:07:14 -07:00
usb UPSTREAM: drivers/usb: Add option for baudrate of FT232H UART 2016-11-21 11:54:11 -08:00
xgi UPSTREAM: drivers/{aspeed,xgi_z9s}/Kconfig: Don't override NATIVE_VGA_USE_EDID 2017-05-07 07:41:14 -07:00
xpowers/axp209 UPSTREAM: Remove non-ascii & unprintable characters 2016-08-05 11:45:20 -07:00