summaryrefslogtreecommitdiff
path: root/drivers/ddr/marvell/axp/ddr3_init.c
diff options
context:
space:
mode:
authorYasuharu Shibata <yasuharu.shibata@gmail.com>2024-06-02 17:24:03 +0900
committerTom Rini <trini@konsulko.com>2024-06-13 16:30:46 -0600
commitb993bd65ec249c842afefd39010946650bec4f8e (patch)
treeb08e06d14bc7baf4f2b72410da95fc4f92ab1d4c /drivers/ddr/marvell/axp/ddr3_init.c
parent5053784e62d79226ba27129f20000d7a1528fece (diff)
bcmgenet: fix Rx buffer corruption caused by lack of cache flush
When bcmgenet complete to write Rx buffer with the DMA, some U-Boot commands write data to the buffer directly. Those write data will become dirty in CPU cache. After this driver calls free_pkt to the buffer, the buffer is assigned as the future Rx buffer. At some point, if bcmgenet writes to a buffer with DMA and CPU cache flushes dirty data to the buffer, the buffer is corrupted. This patch calls flush_dcache_range in free_pkt to immediately flush the data written by U-Boot command and prevent data corruption. This issue can be reproduced using wget on Raspberry Pi4. If wget receives data larger than RX_BUF_LENGTH * RX_DESCS = 2048 * 256 bytes, it will timeout due to data corruption. In addition, if LOG_DEBUG is enabled in net/tcp.c, the following error log is output. TCP RX TCP xSum Error Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com>
Diffstat (limited to 'drivers/ddr/marvell/axp/ddr3_init.c')
0 files changed, 0 insertions, 0 deletions