Skip to content

Commit

Permalink
net: netcp: support probe deferral
Browse files Browse the repository at this point in the history
The netcp driver shouldn't proceed until the knav qmss and dma
devices are ready. So return -EPROBE_DEFER if these devices are not
ready.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Murali Karicheri authored and David S. Miller committed Apr 19, 2018
1 parent c52b678 commit 21f706b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/ti/netcp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,10 @@ static int netcp_probe(struct platform_device *pdev)
struct netcp_module *module;
int ret;

if (!knav_dma_device_ready() ||
!knav_qmss_device_ready())
return -EPROBE_DEFER;

if (!node) {
dev_err(dev, "could not find device info\n");
return -ENODEV;
Expand Down

0 comments on commit 21f706b

Please sign in to comment.