diff mbox series

[u-boot-marvell,01/14] tools: kwboot: Increase blk_rsp_timeo to 2s

Message ID 20220125171313.14498-2-kabel@kernel.org
State Accepted
Commit ef95143df4caaf8c144f33ad685d1c51f530f06b
Delegated to: Stefan Roese
Headers show
Series Another set of kwboot improvements | expand

Commit Message

Marek Behún Jan. 25, 2022, 5:13 p.m. UTC
From: Pali Rohár <pali@kernel.org>

Fix xmodem retry mechanism if some bytes from xmodem packet were lost and
BootROM is still waiting for completing previous xmodem packet.

It is required to wait at least 1.312s on A385, otherwise BootROM does not
accept next xmodem packet if previous one was not completely transferred.

2s should be enough timeout cause that BootROM will drop incomplete xmodem
packet and expects new packet.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
---
 tools/kwboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Stefan Roese Jan. 26, 2022, 3:34 p.m. UTC | #1
On 1/25/22 18:13, Marek Behún wrote:
> From: Pali Rohár <pali@kernel.org>
> 
> Fix xmodem retry mechanism if some bytes from xmodem packet were lost and
> BootROM is still waiting for completing previous xmodem packet.
> 
> It is required to wait at least 1.312s on A385, otherwise BootROM does not
> accept next xmodem packet if previous one was not completely transferred.
> 
> 2s should be enough timeout cause that BootROM will drop incomplete xmodem
> packet and expects new packet.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Signed-off-by: Marek Behún <marek.behun@nic.cz>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

> ---
>   tools/kwboot.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/kwboot.c b/tools/kwboot.c
> index c3d8ab6544..82cfd9a827 100644
> --- a/tools/kwboot.c
> +++ b/tools/kwboot.c
> @@ -75,7 +75,7 @@ struct kwboot_block {
>   	uint8_t csum;
>   } __packed;
>   
> -#define KWBOOT_BLK_RSP_TIMEO 1000 /* ms */
> +#define KWBOOT_BLK_RSP_TIMEO 2000 /* ms */
>   #define KWBOOT_HDR_RSP_TIMEO 10000 /* ms */
>   
>   /* ARM code to change baudrate */

Viele Grüße,
Stefan Roese
diff mbox series

Patch

diff --git a/tools/kwboot.c b/tools/kwboot.c
index c3d8ab6544..82cfd9a827 100644
--- a/tools/kwboot.c
+++ b/tools/kwboot.c
@@ -75,7 +75,7 @@  struct kwboot_block {
 	uint8_t csum;
 } __packed;
 
-#define KWBOOT_BLK_RSP_TIMEO 1000 /* ms */
+#define KWBOOT_BLK_RSP_TIMEO 2000 /* ms */
 #define KWBOOT_HDR_RSP_TIMEO 10000 /* ms */
 
 /* ARM code to change baudrate */