]> git.dujemihanovic.xyz Git - u-boot.git/commit
net: sh_eth: Workaround cache issues
authorValentine Barshak <valentine.barshak@cogentembedded.com>
Tue, 30 May 2023 22:51:30 +0000 (00:51 +0200)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Sat, 10 Jun 2023 11:34:05 +0000 (13:34 +0200)
commitd49ba9c8d70c30d6f009e069cf43b4817be3546d
tree862e89b75099da8dd6086e96f19e7b6882c0ceac
parent92c312c734f5193205dd170a01ae4192f67a2ee5
net: sh_eth: Workaround cache issues

U-Boot writes to RX packets when constructing replies.
This can cause stale cached data to be written to RX
buffer while we're receiving a packet. This causes RX
packet corruption because we invalidate the cache right
before processing the packet. Invalidate packet buffer
cache when preparing RX descriptor as well. This seems
to fix RX packet drops with high RX traffic.

While at it flush the descriptors right before enabling
RX/TX in sh_eth_tx_desc_init/sh_eth_rx_desc_init callbacks
when they are ready instead of flushing after allocation.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
drivers/net/sh_eth.c