34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
|
commit e3609c2c453fc3198a759db17d660f04781f8583
|
||
|
Author: Devesh Sharma <devesh.sharma@broadcom.com>
|
||
|
Date: Thu Nov 9 02:31:58 2017 -0500
|
||
|
|
||
|
bnxt_re/lib: fix the memory barrier call during poll-cq
|
||
|
|
||
|
Putting a read barrier before issuing a read on valid bit
|
||
|
is incorrect. When checking for the validity of CQE in the
|
||
|
CQ buffer the code must wait for the read-barrier to finish
|
||
|
after issuing a read operation on CQE valid bit.
|
||
|
|
||
|
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
|
||
|
|
||
|
diff --git providers/bnxt_re/main.h providers/bnxt_re/main.h
|
||
|
index 9688fec6..82c89484 100644
|
||
|
--- providers/bnxt_re/main.h
|
||
|
+++ providers/bnxt_re/main.h
|
||
|
@@ -366,9 +366,13 @@ static inline uint8_t bnxt_re_to_ibv_wc_status(uint8_t bnxt_wcst,
|
||
|
static inline uint8_t bnxt_re_is_cqe_valid(struct bnxt_re_cq *cq,
|
||
|
struct bnxt_re_bcqe *hdr)
|
||
|
{
|
||
|
+ uint8_t valid = 0;
|
||
|
+
|
||
|
+ valid = ((le32toh(hdr->flg_st_typ_ph) &
|
||
|
+ BNXT_RE_BCQE_PH_MASK) == cq->phase);
|
||
|
udma_from_device_barrier();
|
||
|
- return ((le32toh(hdr->flg_st_typ_ph) &
|
||
|
- BNXT_RE_BCQE_PH_MASK) == cq->phase);
|
||
|
+
|
||
|
+ return valid;
|
||
|
}
|
||
|
|
||
|
static inline void bnxt_re_change_cq_phase(struct bnxt_re_cq *cq)
|