I was having deja-vu with this and realized that I have fixed at least some of the objections to this patch. <br><br>Wolfgang you may want to look at the patch in my 5121 git tree here:<br><br><a href="http://git.denx.de/?p=linux-mpc512x.git;a=commit;h=2950be3be42af7449941c3340998c27ef918f10f">http://git.denx.de/?p=linux-mpc512x.git;a=commit;h=2950be3be42af7449941c3340998c27ef918f10f</a><br>
<br>It does runtime tx packet alignment It also has fewer ifdefs and trys to share more code. It also has a header that explains everything including that fact that there is not a runtime conflict sine the only other ppc that has fec is 8xx which is not in the same family.<br>
<br><div class="gmail_quote">On Wed, May 6, 2009 at 4:42 PM, Grant Likely <span dir="ltr"><<a href="mailto:grant.likely@secretlab.ca">grant.likely@secretlab.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Wed, May 6, 2009 at 4:12 PM, Wolfgang Denk <<a href="mailto:wd@denx.de">wd@denx.de</a>> wrote:<br>
> Dear Grant Likely,<br>
><br>
> In message <<a href="mailto:fa686aa40905061337w6aa82f5aj787618ba108e528f@mail.gmail.com">fa686aa40905061337w6aa82f5aj787618ba108e528f@mail.gmail.com</a>> you wrote:<br>
>><br>
>> > The FEC on 5121 has problems with misaligned tx buffers.<br>
>> > The RM says any alignment is ok but empirical results<br>
>> > show that packet buffers ending in 0x1E will sometimes<br>
>> > hang the FEC. Other bad alignment does not hang but will<br>
>> > cause silent TX failures resulting in about a 1% packet<br>
>> > loss as tested by ping -f from a remote host.<br>
>> ><br>
>> > This patch is a work around that copies every tx packet<br>
>> > to an aligned skb before sending.<br>
>><br>
>> OUCH!<br>
><br>
> Yes :-(<br>
><br>
>> > +#else<br>
>> > +#define tx_skb_align_workaround(dev, skb) (skb)<br>
>> > +#endif<br>
>><br>
>> Another use of #ifdef blocks. What is the multiplatform impact?<br>
><br>
> Hm... Can you recommend a better way to solve the problem? Suggestions<br>
> are welcome.<br>
<br>
</div>I'd rather see a runtime selectable workaround. ie. enable it based<br>
on the compatible property.<br>
<div><div></div><div class="h5"><br>
g.<br>
<br>
--<br>
Grant Likely, B.Sc., P.Eng.<br>
Secret Lab Technologies Ltd.<br>
</div></div></blockquote></div><br>