[U-Boot] [PATCH v3 1/4] Add support for SMSC95XX USB 2.0 10/100MBit Ethernet Adapter

Simon Glass sjg at chromium.org
Thu Apr 14 00:33:47 CEST 2011


On Wed, Apr 13, 2011 at 12:16 PM, Andy Fleming <afleming at gmail.com> wrote:
> I think you missed this one...

Thanks, yes - have done a better rebase so can test properly now.
(where do I get ppc_8xx-gcc so I can use MAKEALL?)

>
>> +       read_buf &= ~HW_CFG_RXDOFF_;
>> +
>> +#ifdef CONFIG_TEGRA2
>> +       /* Tegra2 requires NET_IP_ALIGN = 0 */
>> +#define NET_IP_ALIGN 0
>> +#else
>> +       /* set Rx data offset=2, Make IP header aligns on word boundary. */
>> +#define NET_IP_ALIGN 2
>> +#endif
>> +       read_buf |= NET_IP_ALIGN << 9;
>
>
> This is usually a performance optimization, which isn't all that
> useful in u-boot. And doesn't it mean that you can't rx directly into
> the NetRxPackets array?

Actually I think it doesn't work without it. In any case I will remove
it for now.
>
> Also, more importantly, platform-specific code in the driver should be
> avoided, if possible.  Either make NET_IP_ALIGN a config option, or
> make whether you set it to 2 or 0 trigger on a driver-specific config
> option.

It's actually USB-specific, but a bit ugly. Will address for Tegra later.

Regards,
Simon

>
> Andy
>


More information about the U-Boot mailing list