浏览代码

RDMA/bnxt_re: Fix return value of poll routine

Fix the incorrect reporting of number of polled
entries by taking into account the max CQ depth
in the driver.

Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Devesh Sharma 8 年之前
父节点
当前提交
10d1dedf9b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/infiniband/hw/bnxt_re/ib_verbs.c

+ 1 - 0
drivers/infiniband/hw/bnxt_re/ib_verbs.c

@@ -2900,6 +2900,7 @@ int bnxt_re_poll_cq(struct ib_cq *ib_cq, int num_entries, struct ib_wc *wc)
 
 	spin_lock_irqsave(&cq->cq_lock, flags);
 	budget = min_t(u32, num_entries, cq->max_cql);
+	num_entries = budget;
 	if (!cq->cql) {
 		dev_err(rdev_to_dev(cq->rdev), "POLL CQ : no CQL to use");
 		goto exit;