diff options
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_rc.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_rc.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 53259daeb4f8..5c29b2bfea17 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c | |||
@@ -1497,11 +1497,21 @@ send_ack: | |||
1497 | static void ipath_rc_error(struct ipath_qp *qp, enum ib_wc_status err) | 1497 | static void ipath_rc_error(struct ipath_qp *qp, enum ib_wc_status err) |
1498 | { | 1498 | { |
1499 | unsigned long flags; | 1499 | unsigned long flags; |
1500 | int lastwqe; | ||
1500 | 1501 | ||
1501 | spin_lock_irqsave(&qp->s_lock, flags); | 1502 | spin_lock_irqsave(&qp->s_lock, flags); |
1502 | qp->state = IB_QPS_ERR; | 1503 | qp->state = IB_QPS_ERR; |
1503 | ipath_error_qp(qp, err); | 1504 | lastwqe = ipath_error_qp(qp, err); |
1504 | spin_unlock_irqrestore(&qp->s_lock, flags); | 1505 | spin_unlock_irqrestore(&qp->s_lock, flags); |
1506 | |||
1507 | if (lastwqe) { | ||
1508 | struct ib_event ev; | ||
1509 | |||
1510 | ev.device = qp->ibqp.device; | ||
1511 | ev.element.qp = &qp->ibqp; | ||
1512 | ev.event = IB_EVENT_QP_LAST_WQE_REACHED; | ||
1513 | qp->ibqp.event_handler(&ev, qp->ibqp.qp_context); | ||
1514 | } | ||
1505 | } | 1515 | } |
1506 | 1516 | ||
1507 | static inline void ipath_update_ack_queue(struct ipath_qp *qp, unsigned n) | 1517 | static inline void ipath_update_ack_queue(struct ipath_qp *qp, unsigned n) |