aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/xilinx/xilinx_axienet.h
diff options
context:
space:
mode:
authorRobert Hancock <robert.hancock@calian.com>2022-05-12 11:18:52 -0600
committerDavid S. Miller <davem@davemloft.net>2022-05-13 12:22:11 +0100
commitf0cf4000f5867ec4325d19d32bd83cf583065667 (patch)
treec2c09a341e6e456612642c389edc734114d81eda /drivers/net/ethernet/xilinx/xilinx_axienet.h
parent4915d50e300e96929d2462041d6f6c6f061167fd (diff)
net: axienet: Be more careful about updating tx_bd_tail
The axienet_start_xmit function was updating the tx_bd_tail variable multiple times, with potential rollbacks on error or invalid intermediate positions, even though this variable is also used in the TX completion path. Use READ_ONCE where this variable is read and WRITE_ONCE where it is written to make this update more atomic, and move the write before the MMIO write to start the transfer, so it is protected by that implicit write barrier. Signed-off-by: Robert Hancock <robert.hancock@calian.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_axienet.h')
0 files changed, 0 insertions, 0 deletions