<br><div><span class="gmail_quote">On 1/8/08, <b class="gmail_sendername">Stefan Roese</b> <<a href="mailto:sr@denx.de">sr@denx.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thursday 29 November 2007, Upakul Barkakaty wrote:<br>> NET: Proper return code handling in eth_init() function in file eth.c<br>><br>> This patch modifies the return code handling in the eth_init()<br>> function, to be compatible with the handling of the return codes in
<br>> the other network stack files. It now returns a 0 on Success and -1 on<br>> error.<br><br>I just noticed that this patch breaks TFTP on 4xx platforms:<br><br>commit 505be87a65e4f87ad7d8da1d57ea4dcd487d7e32<br>
Author: Upakul Barkakaty <<a href="mailto:upakul@gmail.com">upakul@gmail.com</a>><br>Date: Thu Nov 29 12:16:13 2007 +0530<br><br> NET: Proper return code handling in eth_init() function in file eth.c<br><br> This patch modifies the return code handling in the eth_init()
<br> function, to be compatible with the handling of the return codes in<br> the other network stack files. It now returns a 0 on Success and -1 on<br> error.<br><br> Signed-off-by: Upakul Barkakaty <<a href="mailto:upakul.barkakaty@conexant.com">
upakul.barkakaty@conexant.com</a>><br> Signed-off-by: Ben Warren <<a href="mailto:biggerbadderben@gmail.com">biggerbadderben@gmail.com</a>><br><br>I just see link auto-negotiation going on, and after that no real transaction
<br>is happening! :-(<br><br>=> tftp 100000 u-image.bin<br>Waiting for PHY auto negotiation to complete.... done<br>ENET Speed is 1000 Mbps - FULL duplex connection (EMAC0)<br><br>Would be great if someone could look into this ASAP. Unfortunately I have no
<br>time left today.<br><br>Thanks.<br><br>Best regards,<br>Stefan<br><br>=====================================================================<br>DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel<br>
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany<br>Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: <a href="mailto:office@denx.de">office@denx.de</a><br>=====================================================================
<br></blockquote></div><br>Hi Stefan,<br>
<br>
Probably i got the reason why this is happening. As a convention that
is usually followed, the code in eth_init() function in the file eth.c
was reworked to handle 0 in case of Success and any non zero value in
case of an error.<br>
<br>
Most of the Ethernet driver's init routines adhere to the same
convention of returning a 0 on Success and a non zero value in case of
error. However, the driver you might be using, may be returning a non
zero value on Successful initialization, that is why the problem is
arising. The solution could be to return 0 in case of Success, from the
Ethernet driver's init() routine.<br>
<br>
Thanks!!<br clear="all"><br>-- <br>Regards,<br>Upakul Barkakaty