[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1522095312-23249-6-git-send-email-m-karicheri2@ti.com>
Date: Mon, 26 Mar 2018 16:15:12 -0400
From: Murali Karicheri <m-karicheri2@...com>
To: <robh+dt@...nel.org>, <mark.rutland@....com>,
<ssantosh@...nel.org>, <malat@...ian.org>, <w-kwok2@...com>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <davem@...emloft.net>,
<netdev@...r.kernel.org>
Subject: [net-next PATCH 5/5] 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@...com>
---
drivers/net/ethernet/ti/netcp_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c
index 9c51b25..736f6f7 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;
--
1.9.1
Powered by blists - more mailing lists