diff options
author | Roland Dreier <roland@topspin.com> | 2005-04-16 18:26:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:26:32 -0400 |
commit | d10ddbf6d7f6699c386d1f41bf542189de32b6be (patch) | |
tree | b2e3ab95925407472fa9c62bb6016d85f822cb68 /drivers/infiniband/hw/mthca/mthca_provider.c | |
parent | 6bd6228eed52ef188ebe46865ccff72da936c968 (diff) |
[PATCH] IB/mthca: encapsulate mem-free check into mthca_is_memfree()
Clean up mem-free mode support by introducing mthca_is_memfree() function,
which encapsulates the logic of deciding if a device is mem-free.
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_provider.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index 28199e42b36f..501c9cc4e1a1 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -625,7 +625,7 @@ static int mthca_unmap_fmr(struct list_head *fmr_list) | |||
625 | if (!mdev) | 625 | if (!mdev) |
626 | return 0; | 626 | return 0; |
627 | 627 | ||
628 | if (mdev->hca_type == ARBEL_NATIVE) { | 628 | if (mthca_is_memfree(mdev)) { |
629 | list_for_each_entry(fmr, fmr_list, list) | 629 | list_for_each_entry(fmr, fmr_list, list) |
630 | mthca_arbel_fmr_unmap(mdev, to_mfmr(fmr)); | 630 | mthca_arbel_fmr_unmap(mdev, to_mfmr(fmr)); |
631 | 631 | ||
@@ -710,7 +710,7 @@ int mthca_register_device(struct mthca_dev *dev) | |||
710 | dev->ib_dev.alloc_fmr = mthca_alloc_fmr; | 710 | dev->ib_dev.alloc_fmr = mthca_alloc_fmr; |
711 | dev->ib_dev.unmap_fmr = mthca_unmap_fmr; | 711 | dev->ib_dev.unmap_fmr = mthca_unmap_fmr; |
712 | dev->ib_dev.dealloc_fmr = mthca_dealloc_fmr; | 712 | dev->ib_dev.dealloc_fmr = mthca_dealloc_fmr; |
713 | if (dev->hca_type == ARBEL_NATIVE) | 713 | if (mthca_is_memfree(dev)) |
714 | dev->ib_dev.map_phys_fmr = mthca_arbel_map_phys_fmr; | 714 | dev->ib_dev.map_phys_fmr = mthca_arbel_map_phys_fmr; |
715 | else | 715 | else |
716 | dev->ib_dev.map_phys_fmr = mthca_tavor_map_phys_fmr; | 716 | dev->ib_dev.map_phys_fmr = mthca_tavor_map_phys_fmr; |
@@ -720,7 +720,7 @@ int mthca_register_device(struct mthca_dev *dev) | |||
720 | dev->ib_dev.detach_mcast = mthca_multicast_detach; | 720 | dev->ib_dev.detach_mcast = mthca_multicast_detach; |
721 | dev->ib_dev.process_mad = mthca_process_mad; | 721 | dev->ib_dev.process_mad = mthca_process_mad; |
722 | 722 | ||
723 | if (dev->hca_type == ARBEL_NATIVE) { | 723 | if (mthca_is_memfree(dev)) { |
724 | dev->ib_dev.req_notify_cq = mthca_arbel_arm_cq; | 724 | dev->ib_dev.req_notify_cq = mthca_arbel_arm_cq; |
725 | dev->ib_dev.post_send = mthca_arbel_post_send; | 725 | dev->ib_dev.post_send = mthca_arbel_post_send; |
726 | dev->ib_dev.post_recv = mthca_arbel_post_receive; | 726 | dev->ib_dev.post_recv = mthca_arbel_post_receive; |