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
..
2016-08-06 09:20:13 -04:00
2016-08-15 11:57:55 -07:00
2016-09-19 01:25:22 -04:00
2016-11-07 13:17:29 -05:00
2016-08-31 14:33:09 -07:00
2016-10-30 20:56:13 -04:00
2016-09-20 22:55:23 -04:00
2016-08-30 22:27:18 -07:00
2016-10-29 20:56:31 -04:00