浏览代码

NFS Timeout with large files.

Retry to send NFS packet before reaching timeout.

Signed-off-by: Hiroshi Ito <ito@mlb.co.jp>
Hiroshi Ito 17 年之前
父节点
当前提交
fe891ecf4d
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      net/nfs.c

+ 6 - 1
net/nfs.c

@@ -34,7 +34,8 @@
 #if defined(CONFIG_CMD_NET) && defined(CONFIG_CMD_NFS)
 
 #define HASHES_PER_LINE 65	/* Number of "loading" hashes per line	*/
-#define NFS_TIMEOUT 60UL
+#define NFS_RETRY_COUNT 30
+#define NFS_TIMEOUT 2UL
 
 static int fs_mounted = 0;
 static unsigned long rpc_id = 0;
@@ -586,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;