From: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][PATCH v3] net: nfs: make NFS_TIMEOUT configurable
Date: Wed, 04 Jul 2012 17:25:21 +0900 [thread overview]
Message-ID: <4FF3FDF1.2020509@kmckk.co.jp> (raw)
In-Reply-To: <20120704054028.29DA9202270@gemini.denx.de>
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>
---
Changes for v2:
- remove a wrong #error line
Changes for v3:
- add CONFIG_NFS_TIMEOUT after CONFIG_ARP_TIMEOUT in README file
- align #ifndef - #else - #endif format as same as tftp.c
README | 7 +++++++
net/nfs.c | 6 +++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/README b/README
index 67dc444..9a18a5c 100644
--- a/README
+++ b/README
@@ -2140,6 +2140,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
diff --git a/net/nfs.c b/net/nfs.c
index 5b99763..7f2393f 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
-#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;
--
1.7.9.5
next prev parent reply other threads:[~2012-07-04 8:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 12:35 [U-Boot] [RFC][PATCH] net: nfs: extend NFS_TIMEOUT Tetsuyuki Kobayashi
2012-06-25 21:34 ` Wolfgang Denk
2012-06-26 0:50 ` Tetsuyuki Kobayashi
2012-06-26 8:21 ` Tetsuyuki Kobayashi
2012-06-26 8:52 ` Wolfgang Denk
2012-06-26 15:30 ` Joe Hershberger
2012-06-26 18:34 ` Scott Wood
2012-06-26 18:45 ` Joe Hershberger
2012-06-27 4:32 ` Tetsuyuki Kobayashi
2012-07-03 11:22 ` [U-Boot] [RFC][PATCH] net: nfs: make NFS_TIMEOUT configurable Tetsuyuki Kobayashi
2012-07-03 13:47 ` Joe Hershberger
2012-07-03 14:13 ` Tetsuyuki Kobayashi
2012-07-04 2:47 ` [U-Boot] [RFC][PATCH v2] " Tetsuyuki Kobayashi
2012-07-04 5:40 ` Wolfgang Denk
2012-07-04 8:25 ` Tetsuyuki Kobayashi [this message]
2012-07-12 7:30 ` [U-Boot] [RFC][PATCH v3] " Tetsuyuki Kobayashi
2012-07-12 16:16 ` Joe Hershberger
2012-07-12 16:30 ` Tom Rini
2012-07-12 16:40 ` Joe Hershberger
2012-07-12 21:48 ` Tetsuyuki Kobayashi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FF3FDF1.2020509@kmckk.co.jp \
--to=koba@kmckk.co.jp \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox