* [PATCH for-next] IB/ipoib: Warn when one port fails to initialize
@ 2017-11-29 6:34 Yuval Shaia
[not found] ` <20171129063402.3963-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Yuval Shaia @ 2017-11-29 6:34 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-uk2M96/98Pc,
leonro-VPRAkNaXOzVWk0Htik3J/w, valex-VPRAkNaXOzVWk0Htik3J/w,
erezsh-VPRAkNaXOzVWk0Htik3J/w,
yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA,
ferasda-VPRAkNaXOzVWk0Htik3J/w,
dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w,
shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, majd-VPRAkNaXOzVWk0Htik3J/w,
alaa-VPRAkNaXOzVWk0Htik3J/w
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-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
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;
}
--
2.13.6
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-next] IB/ipoib: Warn when one port fails to initialize
[not found] ` <20171129063402.3963-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-11-29 8:00 ` Alex Vesker
2017-12-13 18:19 ` [for-next] " Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Alex Vesker @ 2017-11-29 8:00 UTC (permalink / raw)
To: Yuval Shaia, dledford-H+wXaHxf7aLQT0dZR+AlfA, jgg-uk2M96/98Pc,
leonro-VPRAkNaXOzVWk0Htik3J/w, erezsh-VPRAkNaXOzVWk0Htik3J/w,
ferasda-VPRAkNaXOzVWk0Htik3J/w,
dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w,
shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, majd-VPRAkNaXOzVWk0Htik3J/w,
alaa-VPRAkNaXOzVWk0Htik3J/w
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-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [for-next] IB/ipoib: Warn when one port fails to initialize
[not found] ` <20171129063402.3963-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-11-29 8:00 ` Alex Vesker
@ 2017-12-13 18:19 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2017-12-13 18:19 UTC (permalink / raw)
To: Yuval Shaia
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA, leonro-VPRAkNaXOzVWk0Htik3J/w,
valex-VPRAkNaXOzVWk0Htik3J/w, erezsh-VPRAkNaXOzVWk0Htik3J/w,
ferasda-VPRAkNaXOzVWk0Htik3J/w,
dasaratharaman.chandramouli-ral2JQCrhuEAvxtiuMwx3w,
shamir.rabinovitch-QHcLZuEGTsvQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, majd-VPRAkNaXOzVWk0Htik3J/w,
alaa-VPRAkNaXOzVWk0Htik3J/w
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-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-13 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 6:34 [PATCH for-next] IB/ipoib: Warn when one port fails to initialize Yuval Shaia
[not found] ` <20171129063402.3963-1-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-11-29 8:00 ` Alex Vesker
2017-12-13 18:19 ` [for-next] " Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.