Skip to content

Commit

Permalink
RDMA/erdma: Defer probing if netdevice can not be found
Browse files Browse the repository at this point in the history
ERDMA device may be probed before its associated netdevice, returning
-EPROBE_DEFER allows OS try to probe erdma device later.

Fixes: d55e6fb ("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>
  • Loading branch information
Cheng Xu authored and Leon Romanovsky committed Mar 20, 2023
1 parent 0dd83a4 commit 6bd1bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/erdma/erdma_main.c
Original file line number Diff line number Diff line change
@@ -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)
{
struct net_device *netdev;
int ret = -ENODEV;
int ret = -EPROBE_DEFER;

/* Already binded to a net_device, so we skip. */
if (dev->netdev)

0 comments on commit 6bd1bca

Please sign in to comment.