[U-Boot] [PATCH v2] net/macb: increase RX buffer size for GEM

Stefan Roese sr at denx.de
Thu Aug 22 14:59:11 UTC 2019

Hi Ramon,

On 22.08.19 13:15, Ramon Fried wrote:
> On August 22, 2019 12:38:08 PM GMT+03:00, Stefan Roese <stefan.roese at gmail.com> wrote:
>> Hi Ramon,
>> On 14.07.19 17:25, Ramon Fried wrote:
>>> Macb Ethernet controller requires a RX buffer of 128 bytes. It is
>>> highly sub-optimal for Gigabit-capable GEM that is able to use
>>> a bigger DMA buffer. Change this constant and associated macros
>>> with data stored in the private structure.
>>> RX DMA buffer size has to be multiple of 64 bytes as indicated in
>>> DMA Configuration Register specification.
>>> Signed-off-by: Ramon Fried <rfried.dev at gmail.com>
>> This patch breaks ethernet on my AT91SAM9G25 based board. With this
>> patch now, tftp does not complete the xfer any more:
>> => tftp 21000000 big
>> ethernet at f802c000: PHY present at 1
>> ethernet at f802c000: Starting autonegotiation...
>> ethernet at f802c000: Autonegotiation complete
>> ethernet at f802c000: link up, 100Mbps full-duplex (lpa: 0xc5e1)
>> Using ethernet at f802c000 device
>> TFTP from server; our IP address is
>> Filename 'big'.
>> Load address: 0x21000000
>> Loading: #T T
>> With this patch reverted (as well as with v2019.07), tftp works
>> just fine.
>> I did not look into the patch yet. Perhaps you have a quick idea
>> on why this breaks my platform.
>> BTW: When I disable the dcache (dcache off), tftp also works fine
>> with this patch. So its definitely something cache / dma related.
> Thanks for letting me know, I'll be next to a PC tomorrow, I'll look
> into it.

I did look into this patch a bit and did not find any functional
change for the non-GEM part I'm using. Hopefully I'll find some more
time tomorrow to dig into this. If you spot something meanwhile,
then even better. ;)


More information about the U-Boot mailing list