<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>mpc5200: &quot;len bad&quot; messages from tftp (u-boot 1.1.1)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hello,<BR>
<BR>
We are seeing repeated errors during downloads using the tftp client built into u-boot version 1.1.1.<BR>
The error message we see is:<BR>
<BR>
&quot;len bad 494 &lt; 544&quot;<BR>
<BR>
I believe the messages must be generated by the following snippet of code from u-boot-1.1.1/net/net.c:<BR>
<BR>
&nbsp;case PROT_IP:<BR>
#ifdef ET_DEBUG<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; puts (&quot;Got IP\n&quot;);<BR>
#endif<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (len &lt; IP_HDR_SIZE) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; debug (&quot;len bad %d &lt; %d\n&quot;, len, IP_HDR_SIZE);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (len &lt; ntohs(ip-&gt;ip_len)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf(&quot;len bad %d &lt; %d\n&quot;, len, ntohs(ip-&gt;ip_len));<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>
<BR>
<BR>
The error is recoverable and occurs erratically - sometimes we see long strings of &quot;#&quot;'s between errors, and other times errors occur every couple of &quot;#&quot;'s.&nbsp; We always seem to end up with a good download.<BR>
<BR>
<BR>
We don't see this problem using the freescale Lite5200 boards, but we do see it on our custom mpc5200 boards.<BR>
<BR>
<BR>
Can anyone suggest where we should look to diagnose this problem?&nbsp; Perhaps it's hardware related, although I suppose it could be a configuration problem in the way u-boot is setting up the ethernet device - once we boot into linux we don't see many errors -- according to ifconfig, anyway.<BR>
<BR>
Pinging the board from another machine also shows no errors.<BR>
<BR>
&nbsp; thanks and best regards<BR>
&nbsp;&nbsp;&nbsp; Nick Caruso<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>