IB/ipoib: Warn when one port fails to initialize
PATCH 1/1 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).
init").
--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/infiniband/ulp/ipoib/ipoib_main.c +4 -3
@@ -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 ; }
Signature · 6 lines
2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20171129063402.3963-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Quoted 29 lines · Yuval Shaia
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 toinit").
Signed-off-by Yuval Shaia <[email protected]>--- drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/infiniband/ulp/ipoib/ipoib_main.c +3
-1@@ -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 ;
drivers/infiniband/ulp/ipoib/ipoib_main.c static void ipoib_add_one(struct ib_device *device) · line 2334
Quoted 9 lines
drivers/infiniband/ulp/ipoib/ipoib_main.c +1
-2@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe
AppliedQuoted 10 lines · Yuval Shaia
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 toinit").
Signed-off-by Yuval Shaia <[email protected]>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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html