aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_ib.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_ib.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 192fef884e21..0a6f578f18c8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -486,15 +486,16 @@ int ipoib_ib_dev_stop(struct net_device *dev)
486{ 486{
487 struct ipoib_dev_priv *priv = netdev_priv(dev); 487 struct ipoib_dev_priv *priv = netdev_priv(dev);
488 struct ib_qp_attr qp_attr; 488 struct ib_qp_attr qp_attr;
489 int attr_mask;
490 unsigned long begin; 489 unsigned long begin;
491 struct ipoib_tx_buf *tx_req; 490 struct ipoib_tx_buf *tx_req;
492 int i; 491 int i;
493 492
494 /* Kill the existing QP and allocate a new one */ 493 /*
494 * Move our QP to the error state and then reinitialize in
495 * when all work requests have completed or have been flushed.
496 */
495 qp_attr.qp_state = IB_QPS_ERR; 497 qp_attr.qp_state = IB_QPS_ERR;
496 attr_mask = IB_QP_STATE; 498 if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE))
497 if (ib_modify_qp(priv->qp, &qp_attr, attr_mask))
498 ipoib_warn(priv, "Failed to modify QP to ERROR state\n"); 499 ipoib_warn(priv, "Failed to modify QP to ERROR state\n");
499 500
500 /* Wait for all sends and receives to complete */ 501 /* Wait for all sends and receives to complete */
@@ -541,8 +542,7 @@ int ipoib_ib_dev_stop(struct net_device *dev)
541 542
542timeout: 543timeout:
543 qp_attr.qp_state = IB_QPS_RESET; 544 qp_attr.qp_state = IB_QPS_RESET;
544 attr_mask = IB_QP_STATE; 545 if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE))
545 if (ib_modify_qp(priv->qp, &qp_attr, attr_mask))
546 ipoib_warn(priv, "Failed to modify QP to RESET state\n"); 546 ipoib_warn(priv, "Failed to modify QP to RESET state\n");
547 547
548 /* Wait for all AHs to be reaped */ 548 /* Wait for all AHs to be reaped */