Message ID | 20171129063402.3963-1-yuval.shaia@oracle.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
On 11/29/2017 8:34 AM, Yuval Shaia wrote: > 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> > --- > drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c > index 12b7f911f0e5..0c95101c45c8 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; > @@ -2326,8 +2328,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; > } > Looks like this will solve the issue, thanks for fixing. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Nov 29, 2017 at 08:34:02AM +0200, Yuval Shaia wrote: > 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> > drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) Thanks, applied to -next Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 12b7f911f0e5..0c95101c45c8 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; @@ -2326,8 +2328,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; }
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> --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)