]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Prevent waiting indefinitely if no xmodem reply is received
authorMarek Behún <marek.behun@nic.cz>
Fri, 24 Sep 2021 21:06:53 +0000 (23:06 +0200)
committerStefan Roese <sr@denx.de>
Fri, 1 Oct 2021 09:07:13 +0000 (11:07 +0200)
commit67fcd2b8d7373c8b9215f3ea5f960523d8fbd23a
tree528366acf2fe90fb805ae0e8949a5da115b5e410
parente3b09e0cabf8048703ad4fa1ef3bfcb8ca84bcf1
tools: kwboot: Prevent waiting indefinitely if no xmodem reply is received

Currently if BootROM fails to respond with ACK/NAK to a xmodem block, we
will be waiting indefinitely for such response.

Make sure that we only wait at most 1 second (blk_rsp_timeo) for ACK/NAK
for each block in case non-xmodem text output is not being expected.
Interpret this timeout expiration as NAK, to try to send the block
again.

On the other hand, if timeout expires without ACK while some non-xmodem
output was already received (DDR training output, for example), we know
that the block was received, since the code is being executed, so in
this case exit with ETIMEDOUT.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c