diff options
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_cm.c | 4 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_ib.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 9d411f21460e..9db7b0bd9134 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -1007,9 +1007,9 @@ static int ipoib_cm_modify_tx_init(struct net_device *dev, | |||
1007 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 1007 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
1008 | struct ib_qp_attr qp_attr; | 1008 | struct ib_qp_attr qp_attr; |
1009 | int qp_attr_mask, ret; | 1009 | int qp_attr_mask, ret; |
1010 | ret = ib_find_cached_pkey(priv->ca, priv->port, priv->pkey, &qp_attr.pkey_index); | 1010 | ret = ib_find_pkey(priv->ca, priv->port, priv->pkey, &qp_attr.pkey_index); |
1011 | if (ret) { | 1011 | if (ret) { |
1012 | ipoib_warn(priv, "pkey 0x%x not in cache: %d\n", priv->pkey, ret); | 1012 | ipoib_warn(priv, "pkey 0x%x not found: %d\n", priv->pkey, ret); |
1013 | return ret; | 1013 | return ret; |
1014 | } | 1014 | } |
1015 | 1015 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index 8b4ff69ecb80..0205eb7c1bd3 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c | |||
@@ -594,7 +594,7 @@ static void ipoib_pkey_dev_check_presence(struct net_device *dev) | |||
594 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 594 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
595 | u16 pkey_index = 0; | 595 | u16 pkey_index = 0; |
596 | 596 | ||
597 | if (ib_find_cached_pkey(priv->ca, priv->port, priv->pkey, &pkey_index)) | 597 | if (ib_find_pkey(priv->ca, priv->port, priv->pkey, &pkey_index)) |
598 | clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); | 598 | clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); |
599 | else | 599 | else |
600 | set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); | 600 | set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); |
@@ -835,13 +835,13 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv, int pkey_event) | |||
835 | clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); | 835 | clear_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); |
836 | ipoib_ib_dev_down(dev, 0); | 836 | ipoib_ib_dev_down(dev, 0); |
837 | ipoib_ib_dev_stop(dev, 0); | 837 | ipoib_ib_dev_stop(dev, 0); |
838 | ipoib_pkey_dev_delay_open(dev); | 838 | if (ipoib_pkey_dev_delay_open(dev)) |
839 | return; | 839 | return; |
840 | } | 840 | } |
841 | set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags); | ||
842 | 841 | ||
843 | /* restart QP only if P_Key index is changed */ | 842 | /* restart QP only if P_Key index is changed */ |
844 | if (new_index == priv->pkey_index) { | 843 | if (test_and_set_bit(IPOIB_PKEY_ASSIGNED, &priv->flags) && |
844 | new_index == priv->pkey_index) { | ||
845 | ipoib_dbg(priv, "Not flushing - P_Key index not changed.\n"); | 845 | ipoib_dbg(priv, "Not flushing - P_Key index not changed.\n"); |
846 | return; | 846 | return; |
847 | } | 847 | } |