summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMurali Karicheri <m-karicheri2@ti.com>2018-04-17 17:30:40 -0400
committerDavid S. Miller <davem@davemloft.net>2018-04-18 21:00:57 -0400
commit21f706bb10cf7d905d89ceb3f689b8b844520127 (patch)
treea4ad4017c9850ab1c5c7229adc92e03ec2c33cbe /drivers
parentc52b6782d00e4de299647dc6448aa844a9f4941b (diff)
downloadlinux-21f706bb10cf7d905d89ceb3f689b8b844520127.tar.bz2
net: netcp: support probe deferral
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/ti/netcp_core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index 9c51b25d7fd0..736f6f713c09 100644
--- a/drivers/net/ethernet/ti/netcp_core.c
+++ b/drivers/net/ethernet/ti/netcp_core.c
@@ -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;