nfs: NfsTimeout() updates
PATCH 1/1 nfs: NfsTimeout() updates
From: Evan Samanas <[email protected]>
- NfsTimeout() does not correctly update the NFS timeout value which results in NfsTimeout() only being called once in certain situations. This can result in the 'nfs' command hanging indefinetly. For example, the command:
nfs 192.168.0.1:/home/user/file
will not exit until ctrl-c is pressed if 192.168.0.1 does not have an NFS server running.
This issue is resolved by reinitializting the NFS timeout value inside NfsTimeout() when a timeout occurs.
- Make the 'nfs' command print the 'T' character when a timeout occurs. Previously there was no indication that timeouts were occuring.
- Mimic the 'tftpboot' command and when a download fails print "Retry count exceeded; starting again", and restart the download taking the 'netretry' environment variable into account.
--- net/nfs.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
net/nfs.c +6 -5
@@ -571,13 +571,14 @@ Interfaces of U-BOOTstatic void NfsTimeout (void ) { -if ( NfsTimeoutCount++ <NFS_RETRY_COUNT ) { +if ( ++NfsTimeoutCount >NFS_RETRY_COUNT ) { +puts ("\nRetry count exceeded; starting again\n" ); +NetStartAgain (); + }else { +puts ("T " ); +NetSetTimeout (NFS_TIMEOUT , NfsTimeout);NfsSend (); -return ; } -puts ("Timeout\n" ); - NetState =NETLOOP_FAIL ; -return ; } static void
Signature · 1 line
1.6.2.1
PATCH 1/1 nfs: NfsTimeout() updates
Dear Peter Tyser,
Quoted 18 lines · In message <[email protected]> you wrote:
From: Evan Samanas <[email protected]>
-
NfsTimeout()does not correctly update the NFS timeout value which results inNfsTimeout()only being called once in certain situations. This can result in the 'nfs' command hanging indefinetly. For example, the command:nfs 192.168.0.1:/home/user/filewill not exit until ctrl-c is pressed if 192.168.0.1 does not have an NFS server running.
This issue is resolved by reinitializting the NFS timeout value inside
NfsTimeout()when a timeout occurs.- Make the 'nfs' command print the 'T' character when a timeout occurs. Previously there was no indication that timeouts were occuring.
Quoted 6 lines
- Mimic the 'tftpboot' command and when a download fails print "Retry count exceeded; starting again", and restart the download taking the 'netretry' environment variable into account.
Signed-off-by Evan Samanas <[email protected]>Signed-off-by Peter Tyser <[email protected]>
Tested on TQM8xxL.
Tested by: Wolfgang Denk <[email protected]>
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I've got a bad feeling about this.
PATCH 1/1 nfs: NfsTimeout() updates
In reply to Peter TyserFrom: Peter Tyser
Quoted 2 lines
Sent: Monday, November 09, 2009 8:09 PM
Subject: [U-Boot] [PATCH] nfs:NfsTimeout()updates
Tested on MPC8527DS.
Tested by: Ed Swarthout <[email protected]>
Wolfgang Denk
AppliedPATCH 1/1 nfs: NfsTimeout() updates
In reply to Peter TyserDear Peter Tyser,
Quoted 22 lines · In message <[email protected]> you wrote:
From: Evan Samanas <[email protected]>
-
NfsTimeout()does not correctly update the NFS timeout value which results inNfsTimeout()only being called once in certain situations. This can result in the 'nfs' command hanging indefinetly. For example, the command:nfs 192.168.0.1:/home/user/filewill not exit until ctrl-c is pressed if 192.168.0.1 does not have an NFS server running.
This issue is resolved by reinitializting the NFS timeout value inside
NfsTimeout()when a timeout occurs.- Make the 'nfs' command print the 'T' character when a timeout occurs. Previously there was no indication that timeouts were occuring.
- Mimic the 'tftpboot' command and when a download fails print "Retry count exceeded; starting again", and restart the download taking the 'netretry' environment variable into account.
Quoted 5 lines
Signed-off-by Evan Samanas <[email protected]>Signed-off-by Peter Tyser <[email protected]>--- net/nfs.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
Applied, thanks.
Ben, I hope ... etc. :-)
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There's another way to survive. Mutual trust -- and help. -- Kirk, "Day of the Dove", stardate unknown