public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] bootp: Fix bug in auto_load function
@ 2011-08-31 10:36 Michal Simek
  2011-08-31 16:31 ` Simon Glass
  2011-08-31 20:01 ` Wolfgang Denk
  0 siblings, 2 replies; 5+ messages in thread
From: Michal Simek @ 2011-08-31 10:36 UTC (permalink / raw)
  To: u-boot

Patch: "Put common autoload code into auto_load() function"
(sha1: 093498669e77597635a24f326f11efeab213d394) is not simple code
cleanup but code change which introduce new bug.

If autoload variable is not setup it worked as autoload=yes.

Currently if autoload is not setup dhcp sends request in
forever loop.

There are two options how to fix it:
1. Move TftpStart() which is in this patch
2. Change functionality if autoload is not setup, set NetSate and ends.

@@ -165,7 +165,8 @@ static void auto_load(void)
                }
 #endif
        TftpStart();
-       }
+       } else
+               NetState = NETLOOP_SUCCESS;
 }

CC: Eric B?nard <eric@eukrea.com>
CC: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 net/bootp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/bootp.c b/net/bootp.c
index 3db08ea..a003c42 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -164,8 +164,8 @@ static void auto_load(void)
 			return;
 		}
 #endif
-	TftpStart();
 	}
+	TftpStart();
 }
 
 #if !defined(CONFIG_CMD_DHCP)
-- 
1.5.5.6

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

end of thread, other threads:[~2011-09-01  5:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-31 10:36 [U-Boot] [PATCH] bootp: Fix bug in auto_load function Michal Simek
2011-08-31 16:31 ` Simon Glass
2011-08-31 19:11   ` Michal Simek
2011-08-31 20:01 ` Wolfgang Denk
2011-09-01  5:39   ` Michal Simek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox