summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-06-15 10:44:43 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-06-28 10:45:25 +0200
commitb3c91fbf5fcfb6d9b022bce8727abadb93266c1f (patch)
treeb37dcaa140623983a280e624b12722c2685501d8
parent80c071dd56bdd021b41b0d303f1f190bd79f590c (diff)
downloadbarebox-b3c91fbf5fcfb6d9b022bce8727abadb93266c1f.tar.gz
barebox-b3c91fbf5fcfb6d9b022bce8727abadb93266c1f.tar.xz
nfs: resend requests after timeout
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--net/nfs.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/nfs.c b/net/nfs.c
index bdf05bd405..4ca1d6e528 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -124,7 +124,7 @@ struct rpc_t {
} u;
};
-#define NFS_TIMEOUT 60
+#define NFS_TIMEOUT 1
static unsigned long rpc_id = 0;
static int nfs_offset = -1;
@@ -399,6 +399,8 @@ static void nfs_send(void)
nfs_readlink_req();
break;
}
+
+ nfs_timer_start = get_time_ns();
}
static int rpc_check_reply(unsigned char *pkt, int isnfs)
@@ -661,8 +663,6 @@ static void nfs_start(char *p)
printf("\nFilename '%s/%s'.\n", nfs_path, nfs_filename);
- nfs_timer_start = get_time_ns();
-
nfs_state = STATE_PRCLOOKUP_PROG_MOUNT_REQ;
nfs_send();
@@ -706,8 +706,10 @@ static int do_nfs(struct command *cmdtp, int argc, char *argv[])
break;
}
net_poll();
- if (is_timeout(nfs_timer_start, NFS_TIMEOUT * SECOND))
- break;
+ if (is_timeout(nfs_timer_start, NFS_TIMEOUT * SECOND)) {
+ show_progress(-1);
+ nfs_send();
+ }
}
net_unregister(nfs_con);