diff options
author | Bharat Potnuri <bharat@chelsio.com> | 2016-08-23 20:27:33 +0530 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-08-23 12:52:52 -0400 |
commit | cff069b78c21559f427c3fefe9ef3294e3dec094 (patch) | |
tree | 293a179997afae57cfae0c2d809194e7b4c85413 /drivers/infiniband/hw/cxgb4/t4.h | |
parent | faa739fb5df56aadab96bcd2f6eb3486cc3a3aec (diff) | |
download | linux-stable-cff069b78c21559f427c3fefe9ef3294e3dec094.tar.gz linux-stable-cff069b78c21559f427c3fefe9ef3294e3dec094.tar.bz2 linux-stable-cff069b78c21559f427c3fefe9ef3294e3dec094.zip |
iw_cxgb4: Fix cxgb4 arm CQ logic w/IB_CQ_REPORT_MISSED_EVENTS
Current cxgb4 arm CQ logic ignores IB_CQ_REPORT_MISSED_EVENTS for
request completion notification on a CQ. Due to this ib_poll_handler()
assumes all events polled and avoids further iopoll scheduling.
This patch adds logic to cxgb4 ib_req_notify_cq() handler to check if
CQ is not empty and return accordingly. Based on the return value of
ib_req_notify_cq() handler, ib_poll_handler() will schedule a run of
iopoll handler.
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/t4.h')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/t4.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb4/t4.h b/drivers/infiniband/hw/cxgb4/t4.h index 6126bbe36095..02173f4315fa 100644 --- a/drivers/infiniband/hw/cxgb4/t4.h +++ b/drivers/infiniband/hw/cxgb4/t4.h @@ -634,6 +634,11 @@ static inline int t4_valid_cqe(struct t4_cq *cq, struct t4_cqe *cqe) return (CQE_GENBIT(cqe) == cq->gen); } +static inline int t4_cq_notempty(struct t4_cq *cq) +{ + return cq->sw_in_use || t4_valid_cqe(cq, &cq->queue[cq->cidx]); +} + static inline int t4_next_hw_cqe(struct t4_cq *cq, struct t4_cqe **cqe) { int ret; |