]> git.sur5r.net Git - u-boot/blobdiff - net/nfs.c
asm-generic/signal.h: import from linux
[u-boot] / net / nfs.c
index c39f616d9ba98b7f0686bd8f4304d7d066090be5..d11bb4c15fb87803eb252c764616ed814571262a 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -29,8 +29,6 @@
 #include "nfs.h"
 #include "bootp.h"
 
-#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
-
 #define HASHES_PER_LINE 65     /* Number of "loading" hashes per line  */
 #define NFS_RETRY_COUNT 30
 #define NFS_TIMEOUT 2000UL
@@ -571,13 +569,14 @@ Interfaces of U-BOOT
 static void
 NfsTimeout (void)
 {
-       if ( NfsTimeoutCount++ < NFS_RETRY_COUNT ) {
+       if ( ++NfsTimeoutCount > NFS_RETRY_COUNT ) {
+               puts ("\nRetry count exceeded; starting again\n");
+               NetStartAgain ();
+       } else {
+               puts("T ");
+               NetSetTimeout (NFS_TIMEOUT, NfsTimeout);
                NfsSend ();
-               return;
        }
-       puts ("Timeout\n");
-       NetState = NETLOOP_FAIL;
-       return;
 }
 
 static void
@@ -754,5 +753,3 @@ NfsStart (void)
 
        NfsSend ();
 }
-
-#endif