]> git.baikalelectronics.ru Git - uboot.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)
commit1d10fccbda3b5b72e92783e7474c223f13225257
tree862e89b75099da8dd6086e96f19e7b6882c0ceac
parentea9c7ce08b59beae44af1450b01150b41b1dbb62
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