OSDN Git Service

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[tomoyo/tomoyo-test1.git] / drivers / infiniband / core / cache.c
index 73f913c..7acc0f9 100644 (file)
@@ -1457,6 +1457,17 @@ static int config_non_roce_gid_cache(struct ib_device *device,
                                 i);
                        goto err;
                }
+
+               if (rdma_protocol_iwarp(device, port)) {
+                       struct net_device *ndev;
+
+                       ndev = ib_device_get_netdev(device, port);
+                       if (!ndev)
+                               continue;
+                       RCU_INIT_POINTER(gid_attr.ndev, ndev);
+                       dev_put(ndev);
+               }
+
                gid_attr.index = i;
                tprops->subnet_prefix =
                        be64_to_cpu(gid_attr.gid.global.subnet_prefix);