From a5725fabc0c6378f583df6fc6491ec07eab154ab Mon Sep 17 00:00:00 2001 From: wdenk Date: Tue, 28 Sep 2004 21:51:42 +0000 Subject: [PATCH] * Patch by Ganapathi C, 04 Aug 2004: Fix NFS timeout issue --- CHANGELOG | 3 +++ net/nfs.c | 16 +++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 96593f379e..36d7a5c90b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes since U-Boot 1.1.1: ====================================================================== +* Patch by Ganapathi C, 04 Aug 2004: + Fix NFS timeout issue + * Patch by Yuli Barcohen, 19 Jul 2004: - Fix host tools building in Cygwin environment - Fix header files search order for host tools diff --git a/net/nfs.c b/net/nfs.c index 281d0f5722..2d94c08f76 100644 --- a/net/nfs.c +++ b/net/nfs.c @@ -582,6 +582,14 @@ nfs_read_reply (uchar *pkt, unsigned len) 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) { @@ -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) -- 2.39.5