diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index b766e40e9ebf..eabc4247860b 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c | |||
@@ -340,9 +340,16 @@ static int ipath_post_one_send(struct ipath_qp *qp, struct ib_send_wr *wr) | |||
340 | int acc; | 340 | int acc; |
341 | int ret; | 341 | int ret; |
342 | unsigned long flags; | 342 | unsigned long flags; |
343 | struct ipath_devdata *dd = to_idev(qp->ibqp.device)->dd; | ||
343 | 344 | ||
344 | spin_lock_irqsave(&qp->s_lock, flags); | 345 | spin_lock_irqsave(&qp->s_lock, flags); |
345 | 346 | ||
347 | if (qp->ibqp.qp_type != IB_QPT_SMI && | ||
348 | !(dd->ipath_flags & IPATH_LINKACTIVE)) { | ||
349 | ret = -ENETDOWN; | ||
350 | goto bail; | ||
351 | } | ||
352 | |||
346 | /* Check that state is OK to post send. */ | 353 | /* Check that state is OK to post send. */ |
347 | if (unlikely(!(ib_ipath_state_ops[qp->state] & IPATH_POST_SEND_OK))) | 354 | if (unlikely(!(ib_ipath_state_ops[qp->state] & IPATH_POST_SEND_OK))) |
348 | goto bail_inval; | 355 | goto bail_inval; |