Commit 5c421331 authored by Joe Hershberger's avatar Joe Hershberger Committed by Simon Glass
Browse files

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
Signed-off-by: default avatarJoe Hershberger <>
Reviewed-by: default avatarSimon Glass <>
parent d2eaec60
......@@ -527,6 +527,8 @@ restart:
if (net_state == NETLOOP_FAIL)
switch (net_state) {
......@@ -602,8 +604,10 @@ void NetStartAgain(void)
retrycnt = 1;
retrycnt = simple_strtoul(nretry, NULL, 0);
} else
retry_forever = 1;
} else {
retrycnt = 0;
retry_forever = 0;
if ((!retry_forever) && (NetTryCount >= retrycnt)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment