Skip to content

Commit 666047f

Browse files
mustafakismailrleon
authored andcommitted
RDMA/irdma: Set the CQ read threshold for GEN 1
The CQ shadow read threshold is currently not set for GEN 2. This could cause an invalid CQ overflow condition, so remove the GEN check that exclused GEN 1. Fixes: b48c24c ("RDMA/irdma: Implement device supported verb APIs") Signed-off-by: Mustafa Ismail <[email protected]> Signed-off-by: Shiraz Saleem <[email protected]> Signed-off-by: Sindhu Devale <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Leon Romanovsky <[email protected]>
1 parent ee10718 commit 666047f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/infiniband/hw/irdma/verbs.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,9 +2186,8 @@ static int irdma_create_cq(struct ib_cq *ibcq,
21862186
info.cq_base_pa = iwcq->kmem.pa;
21872187
}
21882188

2189-
if (dev->hw_attrs.uk_attrs.hw_rev >= IRDMA_GEN_2)
2190-
info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
2191-
(u32)IRDMA_MAX_CQ_READ_THRESH);
2189+
info.shadow_read_threshold = min(info.cq_uk_init_info.cq_size / 2,
2190+
(u32)IRDMA_MAX_CQ_READ_THRESH);
21922191

21932192
if (irdma_sc_cq_init(cq, &info)) {
21942193
ibdev_dbg(&iwdev->ibdev, "VERBS: init cq fail\n");

0 commit comments

Comments
 (0)