]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xyz-modem: Close stream after processing/sending terminate sequence
authorPali Rohár <pali@kernel.org>
Tue, 3 Aug 2021 14:28:41 +0000 (16:28 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Sep 2021 18:32:41 +0000 (14:32 -0400)
Obviously it is not possible to send terminate sequence over stream after
closing stream.

Signed-off-by: Pali Rohár <pali@kernel.org>
cmd/load.c

index 3904e133c4a04c8e65306b3cd4b6ceafd58344ff..e0c896bb79a35e9ac288470524cba59050241a9e 100644 (file)
@@ -1009,8 +1009,8 @@ static ulong load_serial_ymodem(ulong offset, int mode)
                printf("%s\n", xyzModem_error(err));
        }
 
-       xyzModem_stream_close(&err);
        xyzModem_stream_terminate(false, &getcxmodem);
+       xyzModem_stream_close(&err);
 
 
        flush_cache(offset, ALIGN(size, ARCH_DMA_MINALIGN));