All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sjöberg Andreas" <andreas.sjoberg2@saabgroup.com>
To: "u-boot@lists.denx.de" <u-boot@lists.denx.de>
Subject: U-boot patches
Date: Wed, 8 Sep 2021 07:35:50 +0000	[thread overview]
Message-ID: <32b052578281473d9061ca8c74edea80@saabgroup.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

Hi,
We have two patch files for u-boot:

Bootelf_async_abort_fix.patch:
Booting a .elf files sometimes triggers an asynchronous abort error disabling the icache and dcahe before boot turned out to prevent this and this patch adds disabling of these caches as a part of the bootelf command.

Tftp_next_ack_update:
When running tftp without any additional options (i.e no oack gets sent) the client does not change the expected block number of the next package from 0 to tftp_windowsize preventing acknowledgement of received data. There also was no prober mreset for this counter that instead only reset upon receiveing an oack. This patch increments  the value of next_ack when receiving a data packet instead of an oack and also ensures that sending a new read request or write request resets the counter to 0, indicating that the next packet should be an oack.

/Andreas Sjöberg

[-- Attachment #2: tftp_next_ack_update.patch --]
[-- Type: application/octet-stream, Size: 652 bytes --]

diff --git a/net/tftp.c b/net/tftp.c
index 2cfa0b1486..479bfa72a8 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -355,6 +355,7 @@ static void tftp_send(void)
 	switch (tftp_state) {
 	case STATE_SEND_RRQ:
 	case STATE_SEND_WRQ:
+	        tftp_next_ack = 0;
 		xp = pkt;
 		s = (ushort *)pkt;
 #ifdef CONFIG_CMD_TFTPPUT
@@ -631,6 +632,7 @@ static void tftp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
 		tftp_cur_block %= TFTP_SEQUENCE_SIZE;
 
 		if (tftp_state == STATE_SEND_RRQ)
+		  tftp_next_ack += tftp_windowsize;
 			debug("Server did not acknowledge any options!\n");
 
 		if (tftp_state == STATE_SEND_RRQ || tftp_state == STATE_OACK ||

[-- Attachment #3: bootelf_async_abort_fix.patch --]
[-- Type: application/octet-stream, Size: 365 bytes --]

diff --git a/cmd/elf.c b/cmd/elf.c
index d44b95d903..77d8abf997 100644
--- a/cmd/elf.c
+++ b/cmd/elf.c
@@ -25,6 +25,8 @@ static unsigned long do_bootelf_exec(ulong (*entry)(int, char * const[]),
 				     int argc, char *const argv[])
 {
 	unsigned long ret;
+	icache_disable();
+	dcache_disable();
 
 	/*
 	 * pass address parameter as argv[0] (aka command name),

             reply	other threads:[~2021-09-08 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  7:35 Sjöberg Andreas [this message]
2021-09-08 17:40 ` U-boot patches Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=32b052578281473d9061ca8c74edea80@saabgroup.com \
    --to=andreas.sjoberg2@saabgroup.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.