]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
net: nfs: make NFS_TIMEOUT configurable
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Tue, 3 Jul 2012 22:25:21 +0000 (22:25 +0000)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 12 Jul 2012 19:13:24 +0000 (14:13 -0500)
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>
README
net/nfs.c

diff --git a/README b/README
index dac46f35b2e337e98961b10ea087e112eb374cb2..fb9d904a2eab0855879feb14f11359b73f0f5e60 100644 (file)
--- a/README
+++ b/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
 
index 5b9976354cc184d8ba7f17e048a7edadfec314ad..7f2393f6064c62976ea3bf0c5f10a2ac22e7d443 100644 (file)
--- a/net/nfs.c
+++ b/net/nfs.c
 
 #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;