summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-03-22 17:09:07 -0500
committerDongjin Kim <tobetter@gmail.com>2018-07-30 16:45:35 +0900
commitacad5fdb0976fee0839c7bd4e779c97bc318599e (patch)
tree0abcf0e26c626c8a5072e4c730d1e424608c19d6 /net
parent013a69529032c6b7bf1c041e5fe7c3da9793117b (diff)
downloadu-boot-odroid-c1-acad5fdb0976fee0839c7bd4e779c97bc318599e.tar.gz
BACKPORT: net: Make netretry actually do something
netretry previously would only retry in one specific case (your MAC address is not set) and no other. This is basically useless. In the DM implementation for eth it turns this into a completely useless case since an un-configured MAC address results in not even entering the NetLoop. The behavior is now changed to retry any failed command (rotating through the eth adapters if ethrotate != no). It also defaulted to retry forever. It is now changed to default to not retry Change-Id: I3592b6e3c2db0d3512b46a41cf290cd8ccbfbfde Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Diffstat (limited to 'net')
-rw-r--r--net/net.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c
index 2bea07b3cd..8f5153c9f0 100644
--- a/net/net.c
+++ b/net/net.c
@@ -528,6 +528,8 @@ restart:
(*x)();
}
+ if (net_state == NETLOOP_FAIL)
+ NetStartAgain();
switch (net_state) {
@@ -603,8 +605,10 @@ void NetStartAgain(void)
retrycnt = 1;
else
retrycnt = simple_strtoul(nretry, NULL, 0);
- } else
- retry_forever = 1;
+ } else {
+ retrycnt = 0;
+ retry_forever = 0;
+ }
if ((!retry_forever) && (NetTryCount >= retrycnt)) {
eth_halt();