summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDevesh Sharma <devesh.sharma@broadcom.com>2017-06-29 12:28:17 -0700
committerDoug Ledford <dledford@redhat.com>2017-07-20 11:20:50 -0400
commit10d1dedf9b428ed776f244eb8b43f28974da3fb0 (patch)
treea22252253c2a494546587640fb30700fbbd987d4 /drivers
parent254cd2590d408f2c0375fbf73ef8250d47529e7b (diff)
downloadlinux-10d1dedf9b428ed776f244eb8b43f28974da3fb0.tar.bz2
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/bnxt_re/ib_verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index 7b17030d2696..b92a06d17186 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/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;