提交 9247a8eb 编写于 作者: M Moni Shoua 提交者: Doug Ledford

IB/core: Don't warn on no SA support in event handler

Registering an event handler is done for a device. This device may have
one RoCE port (no SA cap) and one InfiniBand port (has SA cap).
Therefore, warning from the event handler about a specific port that
doesn't have SA cap is correct but pollutes the kernel log without a
need.
Signed-off-by: NMoni Shoua <monis@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 db75d054
...@@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler, ...@@ -780,7 +780,7 @@ static void mcast_event_handler(struct ib_event_handler *handler,
int index; int index;
dev = container_of(handler, struct mcast_device, event_handler); dev = container_of(handler, struct mcast_device, event_handler);
if (WARN_ON(!rdma_cap_ib_mcast(dev->device, event->element.port_num))) if (!rdma_cap_ib_mcast(dev->device, event->element.port_num))
return; return;
index = event->element.port_num - dev->start_port; index = event->element.port_num - dev->start_port;
......
...@@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event ...@@ -450,7 +450,7 @@ static void ib_sa_event(struct ib_event_handler *handler, struct ib_event *event
struct ib_sa_port *port = struct ib_sa_port *port =
&sa_dev->port[event->element.port_num - sa_dev->start_port]; &sa_dev->port[event->element.port_num - sa_dev->start_port];
if (WARN_ON(!rdma_cap_ib_sa(handler->device, port->port_num))) if (!rdma_cap_ib_sa(handler->device, port->port_num))
return; return;
spin_lock_irqsave(&port->ah_lock, flags); spin_lock_irqsave(&port->ah_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册