Commit 3ccbd933 authored by Jack Wang's avatar Jack Wang Committed by Jason Gunthorpe

RDMA/ipoib: Print a message if only child interface is UP

When "enhanced IPoIB" is enabled for CX-5 devices it requires the parent
device to be UP, otherwise the child devices won't work.

Thus add a debug message to give admin a hint when only the child
interface is UP but parent interface is not.

Link: https://lore.kernel.org/r/20210408093215.24023-1-jinpu.wang@ionos.comSigned-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 719d1341
...@@ -164,8 +164,13 @@ int ipoib_open(struct net_device *dev) ...@@ -164,8 +164,13 @@ int ipoib_open(struct net_device *dev)
dev_change_flags(cpriv->dev, flags | IFF_UP, NULL); dev_change_flags(cpriv->dev, flags | IFF_UP, NULL);
} }
up_read(&priv->vlan_rwsem); up_read(&priv->vlan_rwsem);
} } else if (priv->parent) {
struct ipoib_dev_priv *ppriv = ipoib_priv(priv->parent);
if (!test_bit(IPOIB_FLAG_ADMIN_UP, &ppriv->flags))
ipoib_dbg(priv, "parent device %s is not up, so child device may be not functioning.\n",
ppriv->dev->name);
}
netif_start_queue(dev); netif_start_queue(dev);
return 0; return 0;
......
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