diff options
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 19 | ||||
-rw-r--r-- | drivers/infiniband/ulp/srp/ib_srp.c | 3 |
3 files changed, 13 insertions, 11 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 1e19b5ae7c4..ea0dfc77a7f 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -150,7 +150,7 @@ static int ipoib_stop(struct net_device *dev) | |||
150 | 150 | ||
151 | netif_stop_queue(dev); | 151 | netif_stop_queue(dev); |
152 | 152 | ||
153 | ipoib_ib_dev_down(dev, 0); | 153 | ipoib_ib_dev_down(dev, 1); |
154 | ipoib_ib_dev_stop(dev, 0); | 154 | ipoib_ib_dev_stop(dev, 0); |
155 | 155 | ||
156 | if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { | 156 | if (!test_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags)) { |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 75367249f44..cecb98a4c66 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -175,7 +175,9 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
175 | 175 | ||
176 | mcast->mcmember = *mcmember; | 176 | mcast->mcmember = *mcmember; |
177 | 177 | ||
178 | /* Set the cached Q_Key before we attach if it's the broadcast group */ | 178 | /* Set the multicast MTU and cached Q_Key before we attach if it's |
179 | * the broadcast group. | ||
180 | */ | ||
179 | if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4, | 181 | if (!memcmp(mcast->mcmember.mgid.raw, priv->dev->broadcast + 4, |
180 | sizeof (union ib_gid))) { | 182 | sizeof (union ib_gid))) { |
181 | spin_lock_irq(&priv->lock); | 183 | spin_lock_irq(&priv->lock); |
@@ -183,10 +185,17 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast, | |||
183 | spin_unlock_irq(&priv->lock); | 185 | spin_unlock_irq(&priv->lock); |
184 | return -EAGAIN; | 186 | return -EAGAIN; |
185 | } | 187 | } |
188 | priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu)); | ||
186 | priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); | 189 | priv->qkey = be32_to_cpu(priv->broadcast->mcmember.qkey); |
187 | spin_unlock_irq(&priv->lock); | 190 | spin_unlock_irq(&priv->lock); |
188 | priv->tx_wr.wr.ud.remote_qkey = priv->qkey; | 191 | priv->tx_wr.wr.ud.remote_qkey = priv->qkey; |
189 | set_qkey = 1; | 192 | set_qkey = 1; |
193 | |||
194 | if (!ipoib_cm_admin_enabled(dev)) { | ||
195 | rtnl_lock(); | ||
196 | dev_set_mtu(dev, min(priv->mcast_mtu, priv->admin_mtu)); | ||
197 | rtnl_unlock(); | ||
198 | } | ||
190 | } | 199 | } |
191 | 200 | ||
192 | if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { | 201 | if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &mcast->flags)) { |
@@ -574,14 +583,6 @@ void ipoib_mcast_join_task(struct work_struct *work) | |||
574 | return; | 583 | return; |
575 | } | 584 | } |
576 | 585 | ||
577 | priv->mcast_mtu = IPOIB_UD_MTU(ib_mtu_enum_to_int(priv->broadcast->mcmember.mtu)); | ||
578 | |||
579 | if (!ipoib_cm_admin_enabled(dev)) { | ||
580 | rtnl_lock(); | ||
581 | dev_set_mtu(dev, min(priv->mcast_mtu, priv->admin_mtu)); | ||
582 | rtnl_unlock(); | ||
583 | } | ||
584 | |||
585 | ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n"); | 586 | ipoib_dbg_mcast(priv, "successfully joined all multicast groups\n"); |
586 | 587 | ||
587 | clear_bit(IPOIB_MCAST_RUN, &priv->flags); | 588 | clear_bit(IPOIB_MCAST_RUN, &priv->flags); |
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 1b5b0c73005..922d845f76b 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c | |||
@@ -638,9 +638,9 @@ static void srp_reset_req(struct srp_target_port *target, struct srp_request *re | |||
638 | struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL); | 638 | struct scsi_cmnd *scmnd = srp_claim_req(target, req, NULL); |
639 | 639 | ||
640 | if (scmnd) { | 640 | if (scmnd) { |
641 | srp_free_req(target, req, scmnd, 0); | ||
641 | scmnd->result = DID_RESET << 16; | 642 | scmnd->result = DID_RESET << 16; |
642 | scmnd->scsi_done(scmnd); | 643 | scmnd->scsi_done(scmnd); |
643 | srp_free_req(target, req, scmnd, 0); | ||
644 | } | 644 | } |
645 | } | 645 | } |
646 | 646 | ||
@@ -1687,6 +1687,7 @@ static int srp_abort(struct scsi_cmnd *scmnd) | |||
1687 | SRP_TSK_ABORT_TASK); | 1687 | SRP_TSK_ABORT_TASK); |
1688 | srp_free_req(target, req, scmnd, 0); | 1688 | srp_free_req(target, req, scmnd, 0); |
1689 | scmnd->result = DID_ABORT << 16; | 1689 | scmnd->result = DID_ABORT << 16; |
1690 | scmnd->scsi_done(scmnd); | ||
1690 | 1691 | ||
1691 | return SUCCESS; | 1692 | return SUCCESS; |
1692 | } | 1693 | } |