diff options
author | Yuval Shaia <yuval.shaia@oracle.com> | 2017-11-29 08:34:02 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2017-12-13 10:55:49 -0700 |
commit | ac6dbf7fa4707c75a247b540cc0b5c881f3d0ba8 (patch) | |
tree | f1d259bf9299db3d2b85a8dadafa9e660f52d1e0 /drivers/infiniband/ulp/ipoib/ipoib_main.c | |
parent | 302784729e7fb29d5888686fe83b42bb18f81ab8 (diff) | |
download | op-kernel-dev-ac6dbf7fa4707c75a247b540cc0b5c881f3d0ba8.zip op-kernel-dev-ac6dbf7fa4707c75a247b540cc0b5c881f3d0ba8.tar.gz |
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: e4b2d06892c7 ("IB/ipoib: Remove device when one port fails to init").
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_main.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 6930ee0d..567dbd4 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -2196,8 +2196,10 @@ static struct net_device *ipoib_add_port(const char *format, int result = -ENOMEM; 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; + } SET_NETDEV_DEV(priv->dev, hca->dev.parent); priv->dev->dev_id = port - 1; @@ -2325,8 +2327,7 @@ static void ipoib_add_one(struct ib_device *device) } if (!count) { - pr_err("Failed to init port, removing it\n"); - ipoib_remove_one(device, dev_list); + kfree(dev_list); return; } |