diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_cq.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_cq.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c index 00d3eb9bc696..3e9241badba0 100644 --- a/drivers/infiniband/hw/ipath/ipath_cq.c +++ b/drivers/infiniband/hw/ipath/ipath_cq.c | |||
@@ -334,17 +334,18 @@ int ipath_destroy_cq(struct ib_cq *ibcq) | |||
334 | /** | 334 | /** |
335 | * ipath_req_notify_cq - change the notification type for a completion queue | 335 | * ipath_req_notify_cq - change the notification type for a completion queue |
336 | * @ibcq: the completion queue | 336 | * @ibcq: the completion queue |
337 | * @notify: the type of notification to request | 337 | * @notify_flags: the type of notification to request |
338 | * | 338 | * |
339 | * Returns 0 for success. | 339 | * Returns 0 for success. |
340 | * | 340 | * |
341 | * This may be called from interrupt context. Also called by | 341 | * This may be called from interrupt context. Also called by |
342 | * ib_req_notify_cq() in the generic verbs code. | 342 | * ib_req_notify_cq() in the generic verbs code. |
343 | */ | 343 | */ |
344 | int ipath_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | 344 | int ipath_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags) |
345 | { | 345 | { |
346 | struct ipath_cq *cq = to_icq(ibcq); | 346 | struct ipath_cq *cq = to_icq(ibcq); |
347 | unsigned long flags; | 347 | unsigned long flags; |
348 | int ret = 0; | ||
348 | 349 | ||
349 | spin_lock_irqsave(&cq->lock, flags); | 350 | spin_lock_irqsave(&cq->lock, flags); |
350 | /* | 351 | /* |
@@ -352,9 +353,15 @@ int ipath_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify notify) | |||
352 | * any other transitions (see C11-31 and C11-32 in ch. 11.4.2.2). | 353 | * any other transitions (see C11-31 and C11-32 in ch. 11.4.2.2). |
353 | */ | 354 | */ |
354 | if (cq->notify != IB_CQ_NEXT_COMP) | 355 | if (cq->notify != IB_CQ_NEXT_COMP) |
355 | cq->notify = notify; | 356 | cq->notify = notify_flags & IB_CQ_SOLICITED_MASK; |
357 | |||
358 | if ((notify_flags & IB_CQ_REPORT_MISSED_EVENTS) && | ||
359 | cq->queue->head != cq->queue->tail) | ||
360 | ret = 1; | ||
361 | |||
356 | spin_unlock_irqrestore(&cq->lock, flags); | 362 | spin_unlock_irqrestore(&cq->lock, flags); |
357 | return 0; | 363 | |
364 | return ret; | ||
358 | } | 365 | } |
359 | 366 | ||
360 | /** | 367 | /** |