summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2015-03-22 17:09:07 -0500
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:11 -0600
commit5c421331d5a8eac754c4509a4c710ef334b823c5 (patch)
treecc50d15183f40a632f17d925415d75492dd9f783 /net
parentd2eaec600617346a143a07bb073466add7a68e97 (diff)
downloadu-boot-imx-5c421331d5a8eac754c4509a4c710ef334b823c5.zip
u-boot-imx-5c421331d5a8eac754c4509a4c710ef334b823c5.tar.gz
u-boot-imx-5c421331d5a8eac754c4509a4c710ef334b823c5.tar.bz2
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 Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
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 e5ab07c..37b4aab 100644
--- a/net/net.c
+++ b/net/net.c
@@ -527,6 +527,8 @@ restart:
(*x)();
}
+ if (net_state == NETLOOP_FAIL)
+ NetStartAgain();
switch (net_state) {
@@ -602,8 +604,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();