diff options
Diffstat (limited to 'drivers/infiniband/ulp/iser/iser_verbs.c')
-rw-r--r-- | drivers/infiniband/ulp/iser/iser_verbs.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 805a9bdc9520..82bedbc260b2 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -1232,13 +1232,15 @@ static void iser_cq_tasklet_fn(unsigned long data) | |||
1232 | { | 1232 | { |
1233 | struct iser_comp *comp = (struct iser_comp *)data; | 1233 | struct iser_comp *comp = (struct iser_comp *)data; |
1234 | struct ib_cq *cq = comp->cq; | 1234 | struct ib_cq *cq = comp->cq; |
1235 | struct ib_wc wc; | 1235 | struct ib_wc *const wcs = comp->wcs; |
1236 | int completed = 0; | 1236 | int i, n, completed = 0; |
1237 | 1237 | ||
1238 | while (ib_poll_cq(cq, 1, &wc) == 1) { | 1238 | while ((n = ib_poll_cq(cq, ARRAY_SIZE(comp->wcs), wcs)) > 0) { |
1239 | iser_handle_wc(&wc); | 1239 | for (i = 0; i < n; i++) |
1240 | iser_handle_wc(&wcs[i]); | ||
1240 | 1241 | ||
1241 | if (++completed >= iser_cq_poll_limit) | 1242 | completed += n; |
1243 | if (completed >= iser_cq_poll_limit) | ||
1242 | break; | 1244 | break; |
1243 | } | 1245 | } |
1244 | 1246 | ||