summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorCheng Xu <chengyou@linux.alibaba.com>2023-03-20 11:46:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-20 13:35:07 +0300
commit132918e08e866622c570a93f1d8e8320ada1c238 (patch)
treea9e8487651c54289f17b78c6189272d86c27b309 /drivers
parentd682c9bc41fa8d2b2cb4575dda0eb02310882cd0 (diff)
downloadlinux-132918e08e866622c570a93f1d8e8320ada1c238.tar.xz
RDMA/erdma: Defer probing if netdevice can not be found
[ Upstream commit 6bd1bca858f1734a75572a788213d1e1143f2f0a ] ERDMA device may be probed before its associated netdevice, returning -EPROBE_DEFER allows OS try to probe erdma device later. Fixes: d55e6fb4803c ("RDMA/erdma: Add the erdma module") Signed-off-by: Cheng Xu <chengyou@linux.alibaba.com> Link: https://lore.kernel.org/r/20230320084652.16807-5-chengyou@linux.alibaba.com Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/erdma/erdma_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/erdma/erdma_main.c b/drivers/infiniband/hw/erdma/erdma_main.c
index 49778bb294ae..49d931921741 100644
--- a/drivers/infiniband/hw/erdma/erdma_main.c
+++ b/drivers/infiniband/hw/erdma/erdma_main.c
@@ -56,7 +56,7 @@ done:
static int erdma_enum_and_get_netdev(struct erdma_dev *dev)
{
struct net_device *netdev;
- int ret = -ENODEV;
+ int ret = -EPROBE_DEFER;
/* Already binded to a net_device, so we skip. */
if (dev->netdev)