On 2009-05-30, at 21:37, Marcel Moolenaar wrote:
> On May 28, 2009, at 7:48 AM, Rafal Jaworowski wrote:
>
>>
>> On 2009-05-26, at 21:15, Rafal Jaworowski wrote:
>>
>>> On 2009-05-26, at 18:50, Marcel Moolenaar wrote:
>>>
>>>> I think I recently updated the FreeBSD loader on my CDS
>>>> that has U-Boot version 1.3.2-rc1 on it (yes, that sounds
>>>> rather fuzzy :-) In any case, the latest PowerPC U-Boot
>>>> loader is having a problem with netbooting. I see packets
>>>> being transmitted (BOOTP), but none of the responses seem
>>>> to arrive at the loader. Then the ARP resolution is
>>>> attempted, which fails as well.
>>>
>>> I'll try the latest loader tomorrow and let you know how this work
>>> here.
>>
>> I checked a freshly built loader from HEAD and it works fine with U-
>> Boot 2008.10-rc2-00091-g2f4342b.
>
> Ok, the problem is this: when packets arrive on the interface that
> are larger than the buffer being passed to U-Boot from the loader,
> then the eth_receive returns -1 and leaves the packet saved. The
> next call to eth_receive(0 will find that same packet and can fail
> for the exact same reason. A typical scenario is the loader doing
> ARP with a buffer of 66 bytes. The end result is that the ARP
> will fail and the loader panics.
>
> This obviously depends on the amount and kind of traffic on the
> LAN in question...
>
> The following U-Boot patch fixes the problem (against 1.3.4):
>
> diff -u u-boot-1.3.4-orig/net/eth.c u-boot-1.3.4-local/net/eth.c
> --- u-boot-1.3.4-orig/net/eth.c 2008-08-12 07:08:38.000000000 -0700
> +++ u-boot-1.3.4-local/net/eth.c 2009-05-30 12:19:20.000000000 -0700
> @@ -526,10 +526,7 @@
> return -1;
> }
>
> - if (length < eth_rcv_bufs[eth_rcv_current].length)
> - return -1;
> -
> - length = eth_rcv_bufs[eth_rcv_current].length;
> + length = min(length, eth_rcv_bufs[eth_rcv_current].length);
>
> for (i = 0; i < length; i++)
> p[i] = eth_rcv_bufs[eth_rcv_current].data[i];
>
> FYI,
So this seems like a bug in generic networking U-Boot code. Are you
willing to push this fix to the U-Boot main line?
Rafal
_______________________________________________
freebsd-ppc@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ppcTo unsubscribe, send any mail to "
freebsd-ppc-unsubscribe@..."