All of lore.kernel.org
 help / color / mirror / Atom feed
* U-boot patches
@ 2021-09-08  7:35 Sjöberg Andreas
  2021-09-08 17:40 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Sjöberg Andreas @ 2021-09-08  7:35 UTC (permalink / raw)
  To: u-boot

[-- 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),

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

* Re: U-boot patches
  2021-09-08  7:35 U-boot patches Sjöberg Andreas
@ 2021-09-08 17:40 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2021-09-08 17:40 UTC (permalink / raw)
  To: Sjöberg Andreas; +Cc: u-boot

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

On Wed, Sep 08, 2021 at 07:35:50AM +0000, Sjöberg Andreas wrote:

> 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

Please see http://www.denx.de/wiki/U-Boot/Patches and re-post each of
these patches with a proper commit message, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2021-09-08 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-08  7:35 U-boot patches Sjöberg Andreas
2021-09-08 17:40 ` Tom Rini

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.