Update madeye for changes for rdma_node_type and use utility function to
check the transport type based on the node type.

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

Index: linux-kernel/infiniband/util/madeye/madeye.c
===================================================================
--- linux-kernel/infiniband/util/madeye/madeye.c        (revision 5258)
+++ linux-kernel/infiniband/util/madeye/madeye.c        (working copy)
@@ -517,7 +517,10 @@ static void madeye_add_one(struct ib_dev
        int reg_flags;
        u8 i, s, e;
 
-       if (device->node_type == IB_NODE_SWITCH) {
+       if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB)
+               return;
+
+       if (device->node_type == RDMA_NODE_IB_SWITCH) {
                s = 0;
                e = 0;
        } else {
@@ -559,7 +562,7 @@ static void madeye_remove_one(struct ib_
        if (!port)
                return;
 
-       if (device->node_type == IB_NODE_SWITCH) {
+       if (device->node_type == RDMA_NODE_IB_SWITCH) {
                s = 0;
                e = 0;
        } else {



_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to