aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/multicast.c
diff options
context:
space:
mode:
authorMichael Wang <yun.wang@profitbricks.com>2015-05-05 14:50:37 +0200
committerDoug Ledford <dledford@redhat.com>2015-05-18 13:35:05 -0400
commita31ad3b0e35f7e340c1ab6668080cff91d48c90a (patch)
tree130fe332bfb568600dd26f6b724d649eb12c01d6 /drivers/infiniband/core/multicast.c
parentIB/Verbs: Use management helper rdma_cap_ib_sa() (diff)
downloadlinux-dev-a31ad3b0e35f7e340c1ab6668080cff91d48c90a.tar.xz
linux-dev-a31ad3b0e35f7e340c1ab6668080cff91d48c90a.zip
IB/Verbs: Use management helper rdma_cap_ib_mcast()
Introduce helper rdma_cap_ib_mcast() to help us check if the port of an IB device support Infiniband Multicast. 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/multicast.c')
-rw-r--r--drivers/infiniband/core/multicast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/core/multicast.c b/drivers/infiniband/core/multicast.c
index b57ed03a487e..605f20a9af85 100644
--- a/drivers/infiniband/core/multicast.c
+++ b/drivers/infiniband/core/multicast.c
@@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
int index;
dev = container_of(handler, struct mcast_device, event_handler);
- if (WARN_ON(!rdma_protocol_ib(dev->device, event->element.port_num)))
+ if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num)))
return;
index = event->element.port_num - dev->start_port;
@@ -820,7 +820,7 @@ static void mcast_add_one(struct ib_device *device)
}
for (i = 0; i <= dev->end_port - dev->start_port; i++) {
- if (!rdma_protocol_ib(device, dev->start_port + i))
+ if (!rdma_cap_ib_mcast(device, dev->start_port + i))
continue;
port = &dev->port[i];
port->dev = dev;
@@ -858,7 +858,7 @@ static void mcast_remove_one(struct ib_device *device)
flush_workqueue(mcast_wq);
for (i = 0; i <= dev->end_port - dev->start_port; i++) {
- if (rdma_protocol_ib(device, dev->start_port + i)) {
+ if (rdma_cap_ib_mcast(device, dev->start_port + i)) {
port = &dev->port[i];
deref_port(port);
wait_for_completion(&port->comp);