Yasuharu Shibata
b993bd65ec
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 >
2024-06-13 16:30:46 -06:00
..
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2023-01-20 12:27:24 -05:00
2022-05-03 18:33:29 -04:00
2022-09-18 10:26:33 +02:00
2024-05-20 13:35:03 -06:00
2024-06-13 16:27:07 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-06-13 16:30:46 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2021-01-27 10:47:44 -05:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2023-11-05 16:11:38 -05:00
2024-05-20 13:35:03 -06:00
2021-09-28 18:50:56 +03:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-04-19 14:25:04 -06:00
2024-05-20 13:35:03 -06:00
2024-04-19 11:30:51 +02:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-03-26 19:58:26 -04:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2022-12-07 16:04:17 -05:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2022-09-25 08:30:05 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2023-02-10 13:41:07 -05:00
2024-05-20 13:35:03 -06:00
2024-03-26 19:58:26 -04:00
2024-03-26 19:58:26 -04:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2023-07-27 14:32:12 -04:00
2022-11-28 10:25:17 -05:00
2024-05-20 13:35:03 -06:00
2021-01-18 11:06:38 +08:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2021-01-05 12:24:41 -07:00
2021-04-06 11:10:29 +02:00
2023-12-19 11:24:38 +01:00
2021-04-06 11:10:29 +02:00
2022-04-10 08:44:12 +03:00
2020-12-13 08:00:25 -07:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2022-04-10 08:44:13 +03:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-03-01 16:35:52 -05:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2022-12-22 10:31:48 -05:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2022-12-23 10:15:12 -05:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2021-09-30 09:08:16 -04:00
2024-01-29 22:35:02 -05:00
2023-09-22 15:54:35 -04:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00
2024-06-13 16:27:07 -06:00
2024-05-20 13:35:03 -06:00
2023-07-21 09:00:38 +02:00
2024-05-20 13:35:03 -06:00
2024-05-20 13:35:03 -06:00