RDMA/bnxt_re: Add memory barriers when processing CQ/EQ entries
authorSomnath Kotur <[email protected]>
Mon, 6 Nov 2017 16:07:29 +0000 (08:07 -0800)
committerDoug Ledford <[email protected]>
Mon, 13 Nov 2017 20:53:57 +0000 (15:53 -0500)
commit9b40183c08e48f1d26d06d39f29808c9c6037561
tree377a0f40b396d2b98a65ae0c2c7979527576b1bd
parent685894dd9bd03b92803fbc72565789713f067d4c
RDMA/bnxt_re: Add memory barriers when processing CQ/EQ entries

The code determines if the next ring entry is valid before proceeding
further to read the rest of the entry. The CPU can re-order and read
the rest of the entry first, possibly reading a stale entry, if DMA
of a new entry happens right after reading it.

Signed-off-by: Somnath Kotur <[email protected]>
Signed-off-by: Selvin Xavier <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
drivers/infiniband/hw/bnxt_re/qplib_fp.c
drivers/infiniband/hw/bnxt_re/qplib_rcfw.c