aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c8
-rw-r--r--drivers/infiniband/ulp/srp/ib_srp.c2
2 files changed, 8 insertions, 2 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) {
diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 61c13d1e0506..feb1fcd0f2fb 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -1899,7 +1899,7 @@ static void srp_add_one(struct ib_device *device)
1899 if (IS_ERR(srp_dev->fmr_pool)) 1899 if (IS_ERR(srp_dev->fmr_pool))
1900 srp_dev->fmr_pool = NULL; 1900 srp_dev->fmr_pool = NULL;
1901 1901
1902 if (device->node_type == IB_NODE_SWITCH) { 1902 if (device->node_type == RDMA_NODE_IB_SWITCH) {
1903 s = 0; 1903 s = 0;
1904 e = 0; 1904 e = 0;
1905 } else { 1905 } else {