Commit 6bd1bca8 authored by Cheng Xu's avatar Cheng Xu Committed by Leon Romanovsky

RDMA/erdma: Defer probing if netdevice can not be found

ERDMA device may be probed before its associated netdevice, returning
-EPROBE_DEFER allows OS try to probe erdma device later.

Fixes: d55e6fb4 ("RDMA/erdma: Add the erdma module")
Signed-off-by: default avatarCheng Xu <chengyou@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230320084652.16807-5-chengyou@linux.alibaba.comSigned-off-by: default avatarLeon Romanovsky <leon@kernel.org>
parent 0dd83a4d
...@@ -56,7 +56,7 @@ static int erdma_netdev_event(struct notifier_block *nb, unsigned long event, ...@@ -56,7 +56,7 @@ static int erdma_netdev_event(struct notifier_block *nb, unsigned long event,
static int erdma_enum_and_get_netdev(struct erdma_dev *dev) static int erdma_enum_and_get_netdev(struct erdma_dev *dev)
{ {
struct net_device *netdev; struct net_device *netdev;
int ret = -ENODEV; int ret = -EPROBE_DEFER;
/* Already binded to a net_device, so we skip. */ /* Already binded to a net_device, so we skip. */
if (dev->netdev) if (dev->netdev)
......
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