diff options
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 36d76987a481..e9a7659eb1d7 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1111,13 +1111,16 @@ static void ipoib_add_one(struct ib_device *device) | |||
1111 | struct ipoib_dev_priv *priv; | 1111 | struct ipoib_dev_priv *priv; |
1112 | int s, e, p; | 1112 | int s, e, p; |
1113 | 1113 | ||
1114 | if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB) | ||
1115 | return; | ||
1116 | |||
1114 | dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL); | 1117 | dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL); |
1115 | if (!dev_list) | 1118 | if (!dev_list) |
1116 | return; | 1119 | return; |
1117 | 1120 | ||
1118 | INIT_LIST_HEAD(dev_list); | 1121 | INIT_LIST_HEAD(dev_list); |
1119 | 1122 | ||
1120 | if (device->node_type == IB_NODE_SWITCH) { | 1123 | if (device->node_type == RDMA_NODE_IB_SWITCH) { |
1121 | s = 0; | 1124 | s = 0; |
1122 | e = 0; | 1125 | e = 0; |
1123 | } else { | 1126 | } else { |
@@ -1141,6 +1144,9 @@ static void ipoib_remove_one(struct ib_device *device) | |||
1141 | struct ipoib_dev_priv *priv, *tmp; | 1144 | struct ipoib_dev_priv *priv, *tmp; |
1142 | struct list_head *dev_list; | 1145 | struct list_head *dev_list; |
1143 | 1146 | ||
1147 | if (rdma_node_get_transport(device->node_type) != RDMA_TRANSPORT_IB) | ||
1148 | return; | ||
1149 | |||
1144 | dev_list = ib_get_client_data(device, &ipoib_client); | 1150 | dev_list = ib_get_client_data(device, &ipoib_client); |
1145 | 1151 | ||
1146 | list_for_each_entry_safe(priv, tmp, dev_list, list) { | 1152 | list_for_each_entry_safe(priv, tmp, dev_list, list) { |