From f0111d2ca44e7c58346a66b0bb36f99d7b9aeb72 Mon Sep 17 00:00:00 2001 From: Urja Rannikko Date: Sat, 19 Oct 2013 23:35:28 +0000 Subject: [PATCH] serial: use internal_delay() for timeouts Using programmer_delay() for timeouts in serial writes could cause a (theoretically) endless recursion if serial communication is used to send the programmer the delay command to be executed on the programmer instead of the host which fails again, following a timeout which sends... Corresponding to flashrom svn r1759. Signed-off-by: Urja Rannikko Acked-by: Stefan Tauner --- serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serial.c b/serial.c index 4d912ba79..126079a5d 100644 --- a/serial.c +++ b/serial.c @@ -357,7 +357,7 @@ int serialport_write(unsigned char *buf, unsigned int writecnt) if (!tmp) { msg_pdbg2("Empty write\n"); empty_writes--; - programmer_delay(500); + internal_delay(500); if (empty_writes == 0) { msg_perr("Serial port is unresponsive!\n"); return 1;