summaryrefslogtreecommitdiff
path: root/net/nfs.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-09-28 21:51:42 +0000
committerwdenk <wdenk>2004-09-28 21:51:42 +0000
commita5725fabc0c6378f583df6fc6491ec07eab154ab (patch)
tree9e08522614d348e9d0ed4c1c2eb2d27c2a8b7ba5 /net/nfs.c
parente1a3f6b39b46086954fc9746724e784b155d2402 (diff)
downloadu-boot-imx-a5725fabc0c6378f583df6fc6491ec07eab154ab.zip
u-boot-imx-a5725fabc0c6378f583df6fc6491ec07eab154ab.tar.gz
u-boot-imx-a5725fabc0c6378f583df6fc6491ec07eab154ab.tar.bz2
* Patch by Ganapathi C, 04 Aug 2004:
Fix NFS timeout issue
Diffstat (limited to 'net/nfs.c')
-rw-r--r--net/nfs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/nfs.c b/net/nfs.c
index 281d0f5..2d94c08 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -583,6 +583,14 @@ Interfaces of U-BOOT
**************************************************************************/
static void
+NfsTimeout (void)
+{
+ puts ("Timeout\n");
+ NetState = NETLOOP_FAIL;
+ return;
+}
+
+static void
NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
{
int rlen;
@@ -660,6 +668,7 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
case STATE_READ_REQ:
rlen = nfs_read_reply (pkt, len);
+ NetSetTimeout (NFS_TIMEOUT * CFG_HZ, NfsTimeout);
if (rlen > 0) {
nfs_offset += rlen;
NfsSend ();
@@ -676,13 +685,6 @@ NfsHandler (uchar *pkt, unsigned dest, unsigned src, unsigned len)
}
}
-static void
-NfsTimeout (void)
-{
- puts ("Timeout\n");
- NetState = NETLOOP_FAIL;
- return;
-}
void
NfsStart (void)