]> git.dujemihanovic.xyz Git - linux.git/commitdiff
RDMA/erdma: Defer probing if netdevice can not be found
authorCheng Xu <chengyou@linux.alibaba.com>
Mon, 20 Mar 2023 08:46:52 +0000 (16:46 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 20 Mar 2023 10:53:24 +0000 (12:53 +0200)
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>
drivers/infiniband/hw/erdma/erdma_main.c

index 5dc31e5df5cba78ca1025120186fbe891e4551c3..4a29a53a6652eacde0bf5619a3b63850cf9faf2a 100644 (file)
@@ -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)