Commit ac6dbf7f authored by Yuval Shaia's avatar Yuval Shaia Committed by Jason Gunthorpe

IB/ipoib: Warn when one port fails to initialize

If one port fails to initialize an error message should indicate the
reason and driver should continue serving the working port(s) and other
HCA(s).

Fixes: e4b2d068 ("IB/ipoib: Remove device when one port fails to init").
Signed-off-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 30278472
...@@ -2196,8 +2196,10 @@ static struct net_device *ipoib_add_port(const char *format, ...@@ -2196,8 +2196,10 @@ static struct net_device *ipoib_add_port(const char *format,
int result = -ENOMEM; int result = -ENOMEM;
priv = ipoib_intf_alloc(hca, port, format); priv = ipoib_intf_alloc(hca, port, format);
if (!priv) if (!priv) {
pr_warn("%s, %d: ipoib_intf_alloc failed\n", hca->name, port);
goto alloc_mem_failed; goto alloc_mem_failed;
}
SET_NETDEV_DEV(priv->dev, hca->dev.parent); SET_NETDEV_DEV(priv->dev, hca->dev.parent);
priv->dev->dev_id = port - 1; priv->dev->dev_id = port - 1;
...@@ -2325,8 +2327,7 @@ static void ipoib_add_one(struct ib_device *device) ...@@ -2325,8 +2327,7 @@ static void ipoib_add_one(struct ib_device *device)
} }
if (!count) { if (!count) {
pr_err("Failed to init port, removing it\n"); kfree(dev_list);
ipoib_remove_one(device, dev_list);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment