]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/infiniband/core/mad.c
RDMA: iWARP Core Changes.
[karo-tx-linux.git] / drivers / infiniband / core / mad.c
index 32d3028b274b81c43fae4313ea609e05feee02ce..082f03c158f006825bba87446b442fc0f726eb60 100644 (file)
@@ -2876,7 +2876,10 @@ static void ib_mad_init_device(struct ib_device *device)
 {
        int start, end, i;
 
-       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) {
                start = 0;
                end   = 0;
        } else {
@@ -2923,7 +2926,7 @@ static void ib_mad_remove_device(struct ib_device *device)
 {
        int i, num_ports, cur_port;
 
-       if (device->node_type == IB_NODE_SWITCH) {
+       if (device->node_type == RDMA_NODE_IB_SWITCH) {
                num_ports = 1;
                cur_port = 0;
        } else {