mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-26 22:52:34 +02:00
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 <urjaman@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
parent
370f5829e1
commit
f0111d2ca4
2
serial.c
2
serial.c
@ -357,7 +357,7 @@ int serialport_write(unsigned char *buf, unsigned int writecnt)
|
|||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
msg_pdbg2("Empty write\n");
|
msg_pdbg2("Empty write\n");
|
||||||
empty_writes--;
|
empty_writes--;
|
||||||
programmer_delay(500);
|
internal_delay(500);
|
||||||
if (empty_writes == 0) {
|
if (empty_writes == 0) {
|
||||||
msg_perr("Serial port is unresponsive!\n");
|
msg_perr("Serial port is unresponsive!\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user