u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet
@ 2021-09-10 20:46 Pali Rohár
  2021-09-10 20:46 ` [PATCH 2/2] xyz-modem: Wait infinitely for initial x-modem packet Pali Rohár
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Pali Rohár @ 2021-09-10 20:46 UTC (permalink / raw)
  To: Simon Glass, Heinrich Schuchardt; +Cc: u-boot

Now when command loady can be aborted / cancelled by CTRL+C, change wait
timeout for initial packet to infinite. This would allow user to not be
hurry when locating file which want to send. Commands loadb and loads
already waits infinitely too.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 common/xyzModem.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/common/xyzModem.c b/common/xyzModem.c
index ece25acb183b..d6be489a174b 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -449,8 +449,14 @@ xyzModem_stream_open (connection_info_t * info, int *err)
       return 0;
     }
 
-  while (retries-- > 0)
+  while (1)
     {
+      if (--retries <= 0)
+        {
+          retries = xyzModem_MAX_RETRIES;
+          crc_retries = xyzModem_MAX_RETRIES_WITH_CRC;
+          xyz.crc_mode = true;
+        }
       stat = xyzModem_get_hdr ();
       if (stat == 0)
 	{
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-08-29 14:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 20:46 [PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet Pali Rohár
2021-09-10 20:46 ` [PATCH 2/2] xyz-modem: Wait infinitely for initial x-modem packet Pali Rohár
2021-09-13 10:43   ` Wolfgang Denk
2021-09-13 10:42 ` [PATCH 1/2] xyz-modem: Wait infinitely for initial y-modem packet Wolfgang Denk
2021-09-13 11:08   ` Pali Rohár
2021-09-13 12:12     ` Wolfgang Denk
2021-09-13 12:22       ` Pali Rohár
2021-09-13 13:02         ` Wolfgang Denk
2022-08-27 11:50           ` Pali Rohár
2021-09-13 14:32     ` Tom Rini
2022-08-27 11:48 ` [PATCH v2] xyz-modem: Allow to configure initial timeout for loadx and loady Pali Rohár
2022-08-27 12:53   ` Tom Rini
2022-08-27 12:56     ` Pali Rohár
2022-08-27 14:30       ` Tom Rini
2022-08-27 14:32         ` Pali Rohár
2022-08-27 14:41           ` Tom Rini
2022-08-27 14:47             ` Pali Rohár
2022-08-29 14:54   ` Heinrich Schuchardt
2022-08-27 14:37 ` [PATCH v3] " Pali Rohár

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).