linux_dsm_epyc7002/drivers/net/ethernet/brocade
Benjamin Poirier d667f78514 bna: Add synchronization for tx ring.
We received two reports of BUG_ON in bnad_txcmpl_process() where
hw_consumer_index appeared to be ahead of producer_index. Out of order
write/read of these variables could explain these reports.

bnad_start_xmit(), as a producer of tx descriptors, has a few memory
barriers sprinkled around writes to producer_index and the device's
doorbell but they're not paired with anything in bnad_txcmpl_process(), a
consumer.

Since we are synchronizing with a device, we must use mandatory barriers,
not smp_*. Also, I didn't see the purpose of the last smp_mb() in
bnad_start_xmit().

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-09 13:31:10 -05:00
..
bna bna: Add synchronization for tx ring. 2016-11-09 13:31:10 -05:00
Kconfig drivers/net: remove all references to obsolete Ethernet-HOWTO 2015-06-23 06:50:35 -07:00
Makefile bna: QLogic BR-series Adapters Driver Rebranding 2015-02-21 22:05:22 -05:00