]> git.sur5r.net Git - u-boot/blobdiff - net/nfs.c
POST: replace the LOGBUFF_INITIALIZED flag in gd->post_log_word (1 << 31) with the...
[u-boot] / net / nfs.c
index 449ea3454d82021b87310c62c58b6a36d042c42b..6573c1716bb07fd731f5a03426cf1fd4cedb84ba 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
 
 /*#define NFS_DEBUG*/
 
-#if (((CONFIG_COMMANDS & CFG_CMD_NET) || defined(CONFIG_CMD_NET)) \
-    && ((CONFIG_COMMANDS & CFG_CMD_NFS)) || defined(CONFIG_CMD_NFS))
+#if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
 
 #define HASHES_PER_LINE 65     /* Number of "loading" hashes per line  */
-#define NFS_TIMEOUT 60
+#define NFS_RETRY_COUNT 30
+#define NFS_TIMEOUT 2UL
 
 static int fs_mounted = 0;
 static unsigned long rpc_id = 0;
@@ -406,7 +406,6 @@ rpc_lookup_reply (int prog, uchar *pkt, unsigned len)
 
        if (rpc_pkt.u.reply.rstatus  ||
            rpc_pkt.u.reply.verifier ||
-           rpc_pkt.u.reply.astatus  ||
            rpc_pkt.u.reply.astatus) {
                return -1;
        }
@@ -588,6 +587,10 @@ Interfaces of U-BOOT
 static void
 NfsTimeout (void)
 {
+       if ( NfsTimeoutCount++ < NFS_RETRY_COUNT ) {
+               NfsSend ();
+               return;
+       }
        puts ("Timeout\n");
        NetState = NETLOOP_FAIL;
        return;
@@ -776,4 +779,4 @@ NfsStart (void)
        NfsSend ();
 }
 
-#endif /* CONFIG_COMMANDS & CFG_CMD_NFS */
+#endif