浏览代码

net: nfs: make NFS_TIMEOUT configurable

NFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust.
This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file.

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Tetsuyuki Kobayashi 13 年之前
父节点
当前提交
48a3e999c8
共有 2 个文件被更改,包括 12 次插入1 次删除
  1. 7 0
      README
  2. 5 1
      net/nfs.c

+ 7 - 0
README

@@ -2149,6 +2149,13 @@ The following options need to be configured:
 
 		Timeout waiting for an ARP reply in milliseconds.
 
+		CONFIG_NFS_TIMEOUT
+
+		Timeout in milliseconds used in NFS protocol.
+		If you encounter "ERROR: Cannot umount" in nfs command,
+		try longer timeout such as
+		#define CONFIG_NFS_TIMEOUT 10000UL
+
 - Command Interpreter:
 		CONFIG_AUTO_COMPLETE
 

+ 5 - 1
net/nfs.c

@@ -31,7 +31,11 @@
 
 #define HASHES_PER_LINE 65	/* Number of "loading" hashes per line	*/
 #define NFS_RETRY_COUNT 30
-#define NFS_TIMEOUT 2000UL
+#ifndef CONFIG_NFS_TIMEOUT
+# define NFS_TIMEOUT 2000UL
+#else
+# define NFS_TIMEOUT CONFIG_NFS_TIMEOUT
+#endif
 
 static int fs_mounted;
 static unsigned long rpc_id;