Attention is currently required from: Stanislav Ponomarev.
Hello Anastasia Klimchuk, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/79112?usp=email
to look at the new patch set (#3).
Change subject: serial: Fix sp_flush_incoming for serprog TCP connections ......................................................................
serial: Fix sp_flush_incoming for serprog TCP connections
During the development of an esp32 serprog-compatible SPI programmer, and implementation of the TCP over Wi-Fi for serprog, I discovered that sp_flush_incoming() silently fails if the underlying sp_fd descriptor is a TCP socket.
This patch adds a check for this case - tcflush returns ENOTTY, meaning tcflush is not supported for not terminal objects, in this case a fallback serialport_read_nonblock loop is used.
TESTED=esp32-serprog, TCP-over-WiFi mode, ~90% connection attempts fail to synchronize without patch; no synchronization issues with patch applied.
Signed-off-by: Stanislav Ponomarev me@stasponomarev.com
Change-Id: I9724a2fcd4a41dede2c15f83877efa6c3b0b7fae --- M serial.c 1 file changed, 20 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/12/79112/3