diff mbox

[U-Boot,RFC,v2] net: nfs: make NFS_TIMEOUT configurable

Message ID 4FF3AEC4.9050808@kmckk.co.jp
State Superseded
Delegated to: Joe Hershberger
Headers show

Commit Message

Tetsuyuki Kobayashi July 4, 2012, 2:47 a.m. UTC
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.
For example,
#define CONFIG_NFS_TIMEOUT 10000UL

Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
---
Changes for v2:
   - remove a wrong #error line

 net/nfs.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Wolfgang Denk July 4, 2012, 5:40 a.m. UTC | #1
Dear Tetsuyuki Kobayashi,

In message <4FF3AEC4.9050808@kmckk.co.jp> you wrote:
> 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.
> For example,
> #define CONFIG_NFS_TIMEOUT 10000UL

Please add documentation to the new CONFIG_ option to the README.

Thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/net/nfs.c b/net/nfs.c
index 5b99763..3a7f123 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -31,7 +31,11 @@ 
 
 #define HASHES_PER_LINE 65	/* Number of "loading" hashes per line	*/
 #define NFS_RETRY_COUNT 30
+#ifdef CONFIG_NFS_TIMEOUT
+#define NFS_TIMEOUT CONFIG_NFS_TIMEOUT
+#else
 #define NFS_TIMEOUT 2000UL
+#endif
 
 static int fs_mounted;
 static unsigned long rpc_id;