Skip to content
Snippets Groups Projects
Commit fa0f9e83 authored by Marek Vasut's avatar Marek Vasut
Browse files

net: rswitch: Add missing cache invalidate of TX descriptor


TFTP transfers of large files, for example 128 MiB, can sporadically
get stuck and the transfer slows down considerably.

This happens because the TX DMA descriptor in DRAM becomes out of sync
with the view of the TX DMA descriptor content from the CPU side, which
is viewed through the CPU caches. In order to guarantee these two views
are consistent, the cache over TX DMA descriptor that has possibly been
written by the rswitch hardware must first be invalidated, only then can
the descriptor be cleared and updated by the CPU, and finally the cache
over that area must be flushed back into DRAM to make sure the rswitch
hardware has consistent view of the updated descriptor content.

The very first invalidation operation was missing, which led to sporadic
corruption of the TX DMA descriptor. Fix it, add the missing invalidation
operation.

Reported-by: default avatarEnric Balletbo i Serra <eballetb@redhat.com>
Signed-off-by: default avatarMarek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: default avatarEnric Balletbo i Serra <eballetb@redhat.com>
parent 9899a6a7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment