net/bootp.c: fix tftp load if autoload environment var isn't set
PATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
Commit 093498669 (Put common autoload code into auto_load() function) broke handling of autoload environment variable not being set. The bootp/dhcp code will just keep on requesting IP address forever and never start TFTP download.
Fix it by moving TftpStart() outside the conditional like it was before.
--- net/bootp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/bootp.c +1 -1
@@ -164,8 +164,8 @@ static void auto_load(void) return; }#endif -TftpStart (); } +TftpStart (); }#if !defined(CONFIG_CMD_DHCP )
Signature · 1 line
1.7.5.4
PATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
Quoted 8 lines · Peter Korsgaard
Commit 093498669 (Put common autoload code into
auto_load()function) broke handling of autoload environment variable not being set. The bootp/dhcp code will just keep on requesting IP address forever and never start TFTP download.Fix it by moving
TftpStart()outside the conditional like it was before.Signed-off-by Peter Korsgaard <[email protected]>
This makes mx31pdk networking to work again at my company's network.
Thanks,
Fabio Estevam
PATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
Hi Peter,
Quoted 6 lines · Fabio Estevam
Quoted 5 lines · Peter Korsgaard
Commit 093498669 (Put common autoload code into
auto_load()function) broke handling of autoload environment variable not being set. The bootp/dhcp code will just keep on requesting IP address forever and never start TFTP download.
Quoted 7 lines
Quoted 3 lines
Fix it by moving
TftpStart()outside the conditional like it was before.Signed-off-by Peter Korsgaard <[email protected]>This makes mx31pdk networking to work again at my company's network.
Tested-by Fabio Estevam <[email protected]>
I think we just had this discussion at the end of August. It would be good to get to the bottom of why this commit is considered a change of behaviour - it is something subtle that I cannot see.
But first: if autoload is not defined, it is supposed to default to 'y'. If you want it to be 'n' then you need to set it. It that what you expect?
Regards,
Simon
Quoted 5 lines
Thanks,
Fabio Estevam
PATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Simon" == Simon Glass <[email protected]> writes:
Hi,
Simon> I think we just had this discussion at the end of August. It Simon> would be good to get to the bottom of why this commit is Simon> considered a change of behaviour - it is something subtle that I Simon> cannot see.
Because with that commit it no longer calls TftpStart() if the autoload variable isn't set (it moved into the if (getenv..) conditional).
Simon> But first: if autoload is not defined, it is supposed to default to Simon> 'y'. If you want it to be 'n' then you need to set it. It that what Simon> you expect?
Yes, no autoload should behave like autoload=y, E.G. call TftpStart().
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
Hi Peter,
Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Simon" == Simon Glass <[email protected]> writes:
Hi,
?Simon> I think we just had this discussion at the end of August. It ?Simon> would be good to get to the bottom of why this commit is ?Simon> considered a change of behaviour - it is something subtle that I ?Simon> cannot see.
Because with that commit it no longer calls
TftpStart()if the autoload variable isn't set (it moved into the if (getenv..) conditional).
OK I see thank you.
Quoted 6 lines
?Simon> But first: if autoload is not defined, it is supposed to default to ?Simon> 'y'. If you want it to be 'n' then you need to set it. It that what ?Simon> you expect?
Yes, no autoload should behave like autoload=y, E.G. call
TftpStart().
Regards,
Simon
Quoted 4 lines
--
Bye, Peter Korsgaard
Wolfgang Denk
AppliedPATCH 1/1 net/bootp.c: fix tftp load if autoload environment var isn't set
In reply to Peter KorsgaardDear Peter Korsgaard,
Quoted 11 lines · In message <[email protected]> you wrote:
Commit 093498669 (Put common autoload code into
auto_load()function) broke handling of autoload environment variable not being set. The bootp/dhcp code will just keep on requesting IP address forever and never start TFTP download.Fix it by moving
TftpStart()outside the conditional like it was before.Signed-off-by Peter Korsgaard <[email protected]>--- net/bootp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 6 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 Real computer scientists despise the idea of actual hardware. Hard- ware has limitations, software doesn't. It's a real shame that Turing machines are so poor at I/O.