summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/mad.c
diff options
context:
space:
mode:
authorMichael Wang <yun.wang@profitbricks.com>2015-05-05 14:50:32 +0200
committerDoug Ledford <dledford@redhat.com>2015-05-18 13:35:05 -0400
commitc757dea816407dc472452091e3ea941cef6638a2 (patch)
tree41e259db498572735da19e96139fc891baf64159 /drivers/infiniband/core/mad.c
parentfef60902ef7f3066a62377f8d37753314d7c8351 (diff)
IB/Verbs: Use management helper rdma_cap_ib_mad()
Introduce helper rdma_cap_ib_mad() to help us check if the port of an IB device support Infiniband Management Datagrams. Signed-off-by: Michael Wang <yun.wang@profitbricks.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Tested-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Sean Hefty <sean.hefty@intel.com> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Tested-by: Doug Ledford <dledford@redhat.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/mad.c')
-rw-r--r--drivers/infiniband/core/mad.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/mad.c b/drivers/infiniband/core/mad.c
index 507eb67d14cc..80777cdaaccc 100644
--- a/drivers/infiniband/core/mad.c
+++ b/drivers/infiniband/core/mad.c
@@ -3066,7 +3066,7 @@ static void ib_mad_init_device(struct ib_device *device)
}
for (i = start; i <= end; i++) {
- if (!rdma_ib_or_iboe(device, i))
+ if (!rdma_cap_ib_mad(device, i))
continue;
if (ib_mad_port_open(device, i)) {
@@ -3087,7 +3087,7 @@ error_agent:
error:
while (--i >= start) {
- if (!rdma_ib_or_iboe(device, i))
+ if (!rdma_cap_ib_mad(device, i))
continue;
if (ib_agent_port_close(device, i))
@@ -3111,7 +3111,7 @@ static void ib_mad_remove_device(struct ib_device *device)
}
for (i = start; i <= end; i++) {
- if (!rdma_ib_or_iboe(device, i))
+ if (!rdma_cap_ib_mad(device, i))
continue;
if (ib_agent_port_close(device, i))