summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorDaniel Machon <daniel.machon@microchip.com>2026-10-26 14:47:05 +0100
committerJakub Kicinski <kuba@kernel.org>2026-10-27 15:20:52 -0700
commit573a6d4c7a21e34d7a2174b8d3c7ca67a5e850b6 (patch)
treefa29f8ef71a67faadbf6ac2b0396846fe0e514d8 /include/linux/timerqueue.h
parent074caa30a62726c0ee959e8b8ccb64cda0b26ae5 (diff)
net: microchip: fdma: fix DCB corruption under sustained load
__fdma_dcb_add() prepares a DCB and links it into a channel's chain by writing its address to the NEXT_PTR of the current last DCB. The FDMA may be processing the chain while this happens. Before this patch, the link is written before the new DCB's own nextptr and info fields, so the FDMA can follow it to a DCB that hasn't been fully prepared yet. Under sustained load this stalls the FDMA. Prepare the new DCB fully before linking it, and update the previous DCB's NEXT_PTR using the two-step sequence from the datasheet (poison the LSB and flush, then clear it) so the FDMA never observes a partially-updated pointer. Reported by a customer running iperf3 --bidir against a lan969x board. Reproduced on lan969x with iperf3, throughput collapsing to zero: [ 5] 1.00-2.00 sec 73.9 MBytes 620 Mbits/sec 0 305 KBytes [ 5] 2.00-3.00 sec 73.9 MBytes 620 Mbits/sec 0 305 KBytes [ 5] 3.00-4.00 sec 13.9 MBytes 116 Mbits/sec 2 1.41 KBytes [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes The race is timing-dependent: across three reproductions the stall appeared anywhere from ~400s to ~3000s into the run. Fixes: 30e48a75df9c ("net: microchip: add FDMA library") Signed-off-by: Daniel Machon <daniel.machon@microchip.com> Link: https://patch.msgid.link/20261026-microchip-fdma-dcb-corruption-v1-1-36dab6caca07@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions