[U-Boot-Users] [PATCH] NFS Timeout with large files.

Hiroshi Ito ito at mlb.co.jp
Thu Jan 31 10:35:04 CET 2008


Retry to send NFS packet before reaching timeout.

Signed-off-by: Hiroshi Ito <ito at mlb.co.jp>
---

diff --git a/net/nfs.c b/net/nfs.c
index de789e1..4385e07 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -34,7 +34,8 @@
 #if ((CONFIG_COMMANDS & CFG_CMD_NET) && (CONFIG_COMMANDS & CFG_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 2
 
 static int fs_mounted = 0;
 static unsigned long rpc_id = 0;
@@ -587,6 +588,10 @@ Interfaces of U-BOOT
 static void
 NfsTimeout (void)
 {
+	if ( NfsTimeoutCount++ < NFS_RETRY_COUNT ) {
+		NfsSend ();
+		return;
+	}
 	puts ("Timeout\n");
 	NetState = NETLOOP_FAIL;
 	return;




More information about the U-Boot mailing list