diff options
| -rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 45 | ||||
| -rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 |
2 files changed, 23 insertions, 26 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index ffbcd40418d5..23a3f56c7899 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
| @@ -503,6 +503,25 @@ err_free_aux: | |||
| 503 | return err; | 503 | return err; |
| 504 | } | 504 | } |
| 505 | 505 | ||
| 506 | static void mthca_free_icms(struct mthca_dev *mdev) | ||
| 507 | { | ||
| 508 | u8 status; | ||
| 509 | |||
| 510 | mthca_free_icm_table(mdev, mdev->mcg_table.table); | ||
| 511 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | ||
| 512 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
| 513 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
| 514 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
| 515 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
| 516 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
| 517 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
| 518 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
| 519 | mthca_unmap_eq_icm(mdev); | ||
| 520 | |||
| 521 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
| 522 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
| 523 | } | ||
| 524 | |||
| 506 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | 525 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) |
| 507 | { | 526 | { |
| 508 | struct mthca_dev_lim dev_lim; | 527 | struct mthca_dev_lim dev_lim; |
| @@ -580,18 +599,7 @@ static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | |||
| 580 | return 0; | 599 | return 0; |
| 581 | 600 | ||
| 582 | err_free_icm: | 601 | err_free_icm: |
| 583 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 602 | mthca_free_icms(mdev); |
| 584 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
| 585 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
| 586 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
| 587 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
| 588 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
| 589 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
| 590 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
| 591 | mthca_unmap_eq_icm(mdev); | ||
| 592 | |||
| 593 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
| 594 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
| 595 | 603 | ||
| 596 | err_stop_fw: | 604 | err_stop_fw: |
| 597 | mthca_UNMAP_FA(mdev, &status); | 605 | mthca_UNMAP_FA(mdev, &status); |
| @@ -611,18 +619,7 @@ static void mthca_close_hca(struct mthca_dev *mdev) | |||
| 611 | mthca_CLOSE_HCA(mdev, 0, &status); | 619 | mthca_CLOSE_HCA(mdev, 0, &status); |
| 612 | 620 | ||
| 613 | if (mthca_is_memfree(mdev)) { | 621 | if (mthca_is_memfree(mdev)) { |
| 614 | if (mdev->mthca_flags & MTHCA_FLAG_SRQ) | 622 | mthca_free_icms(mdev); |
| 615 | mthca_free_icm_table(mdev, mdev->srq_table.table); | ||
| 616 | mthca_free_icm_table(mdev, mdev->cq_table.table); | ||
| 617 | mthca_free_icm_table(mdev, mdev->qp_table.rdb_table); | ||
| 618 | mthca_free_icm_table(mdev, mdev->qp_table.eqp_table); | ||
| 619 | mthca_free_icm_table(mdev, mdev->qp_table.qp_table); | ||
| 620 | mthca_free_icm_table(mdev, mdev->mr_table.mpt_table); | ||
| 621 | mthca_free_icm_table(mdev, mdev->mr_table.mtt_table); | ||
| 622 | mthca_unmap_eq_icm(mdev); | ||
| 623 | |||
| 624 | mthca_UNMAP_ICM_AUX(mdev, &status); | ||
| 625 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | ||
| 626 | 623 | ||
| 627 | mthca_UNMAP_FA(mdev, &status); | 624 | mthca_UNMAP_FA(mdev, &status); |
| 628 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); | 625 | mthca_free_icm(mdev, mdev->fw.arbel.fw_icm); |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 704f48e0b6a7..6c5bf07489f4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
| @@ -474,7 +474,7 @@ err: | |||
| 474 | spin_unlock(&priv->lock); | 474 | spin_unlock(&priv->lock); |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | static void path_lookup(struct sk_buff *skb, struct net_device *dev) | 477 | static void ipoib_path_lookup(struct sk_buff *skb, struct net_device *dev) |
| 478 | { | 478 | { |
| 479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); | 479 | struct ipoib_dev_priv *priv = netdev_priv(skb->dev); |
| 480 | 480 | ||
| @@ -569,7 +569,7 @@ static int ipoib_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 569 | 569 | ||
| 570 | if (skb->dst && skb->dst->neighbour) { | 570 | if (skb->dst && skb->dst->neighbour) { |
| 571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { | 571 | if (unlikely(!*to_ipoib_neigh(skb->dst->neighbour))) { |
| 572 | path_lookup(skb, dev); | 572 | ipoib_path_lookup(skb, dev); |
| 573 | goto out; | 573 | goto out; |
| 574 | } | 574 | } |
| 575 | 575 | ||
