diff options
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index b4b22576f12..4f258c88c1b 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -1240,6 +1240,7 @@ static struct net_device *ipoib_add_port(const char *format, | |||
1240 | goto alloc_mem_failed; | 1240 | goto alloc_mem_failed; |
1241 | 1241 | ||
1242 | SET_NETDEV_DEV(priv->dev, hca->dma_device); | 1242 | SET_NETDEV_DEV(priv->dev, hca->dma_device); |
1243 | priv->dev->dev_id = port - 1; | ||
1243 | 1244 | ||
1244 | if (!ib_query_port(hca, port, &attr)) | 1245 | if (!ib_query_port(hca, port, &attr)) |
1245 | priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu); | 1246 | priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu); |
@@ -1362,6 +1363,8 @@ static void ipoib_add_one(struct ib_device *device) | |||
1362 | } | 1363 | } |
1363 | 1364 | ||
1364 | for (p = s; p <= e; ++p) { | 1365 | for (p = s; p <= e; ++p) { |
1366 | if (rdma_port_get_link_layer(device, p) != IB_LINK_LAYER_INFINIBAND) | ||
1367 | continue; | ||
1365 | dev = ipoib_add_port("ib%d", device, p); | 1368 | dev = ipoib_add_port("ib%d", device, p); |
1366 | if (!IS_ERR(dev)) { | 1369 | if (!IS_ERR(dev)) { |
1367 | priv = netdev_priv(dev); | 1370 | priv = netdev_priv(dev); |