Skip to content

Commit

Permalink
i40iw: Correct CQ arming
Browse files Browse the repository at this point in the history
CQ is armed for solicited events only, ignoring other notification
flags. Correct this by arming for next and arming for solicited
event if IB_CQ_SOLICITED is set. Also protect CQ shadow area update
with spinlock.

Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
  • Loading branch information
Shiraz Saleem authored and Doug Ledford committed Jun 23, 2016
1 parent 61c78ee commit 747f1c6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/infiniband/hw/i40iw/i40iw_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,13 +2327,16 @@ static int i40iw_req_notify_cq(struct ib_cq *ibcq,
{
struct i40iw_cq *iwcq;
struct i40iw_cq_uk *ukcq;
enum i40iw_completion_notify cq_notify = IW_CQ_COMPL_SOLICITED;
unsigned long flags;
enum i40iw_completion_notify cq_notify = IW_CQ_COMPL_EVENT;

iwcq = (struct i40iw_cq *)ibcq;
ukcq = &iwcq->sc_cq.cq_uk;
if (notify_flags == IB_CQ_NEXT_COMP)
cq_notify = IW_CQ_COMPL_EVENT;
if (notify_flags == IB_CQ_SOLICITED)
cq_notify = IW_CQ_COMPL_SOLICITED;
spin_lock_irqsave(&iwcq->lock, flags);
ukcq->ops.iw_cq_request_notification(ukcq, cq_notify);
spin_unlock_irqrestore(&iwcq->lock, flags);
return 0;
}

Expand Down

0 comments on commit 747f1c6

Please sign in to comment.