From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Tue, 24 Feb 2015 18:02:19 -0600 Subject: [U-Boot] [RFC PATCH v4 10/23] net: Make netretry actually do something In-Reply-To: <1424822552-4366-1-git-send-email-joe.hershberger@ni.com> References: <1423618233-11397-1-git-send-email-joe.hershberger@ni.com> <1424822552-4366-1-git-send-email-joe.hershberger@ni.com> Message-ID: <1424822552-4366-11-git-send-email-joe.hershberger@ni.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v4: -New to v4 Changes in v3: None Changes in v2: None net/net.c | 8 ++++++-- 1 file 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(); -- 1.7.11.5