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

Ramon Fried rfried.dev at gmail.com
Fri Aug 23 05:54:48 UTC 2019



On August 22, 2019 5:59:11 PM GMT+03:00, Stefan Roese <sr at denx.de> wrote:
>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 192.168.1.5; our IP address is 192.168.1.249
>>> 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. ;)
Are you sure this is the bad patch? 
try master branch and bisect. 
I would also make sure that your HW is doesn't identify as GEM. 
Thanks, Ramon 
>
>Thanks,
>Stefan

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the U-Boot mailing list