From patchwork Mon Mar 26 20:15:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10308639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8CC5960212 for ; Mon, 26 Mar 2018 20:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8524529844 for ; Mon, 26 Mar 2018 20:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78AAB29847; Mon, 26 Mar 2018 20:15:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB3A829845 for ; Mon, 26 Mar 2018 20:15:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EmZEI9IZj5um1Wix1JJb8WQ4sXl+s3aNUZojAmqSWaA=; b=oVOEFB7DJwRdFs OKVvVD8RTIZRVDqo8ITA39Q39FQcNCUl1gyfT9BmEPq3G0bJrywRzYfAHiJgL9b9XQSaFGXcF9G8b afbLa4g8af2TOISEw+gTZ2TXpgPJUfr8c9qOjVTSSKpqdzUok/+E3URhMWcPvs5GZskzQEhurDf34 HcMROgFMvYY9QcamC2WQXR1ABfr8JNk3pq5C6T0KpzoRcCgRcYGM/5H1s3uQ0t0CPMzDV4D1VwmiV afFE/NMCkNAj3tbv86bYLpU2cQs7RbakuwpbkvheOLd9RWSb2RWVcrJMS1rp7MWksc9QwRFaLSZPm /7qDdPSboDov4WyQx4gQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0YWA-0001FL-0I; Mon, 26 Mar 2018 20:14:58 +0000 Received: from lelnx194.ext.ti.com ([198.47.27.80]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0YUG-00087V-DV for linux-arm-kernel@lists.infradead.org; Mon, 26 Mar 2018 20:13:01 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2QKCc90003046; Mon, 26 Mar 2018 15:12:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522095158; bh=GOLNCrk1T48W7MAq/90GQzgVf/o9rj616oIX8qS+Pc0=; h=From:To:Subject:Date:In-Reply-To:References; b=fQ7uk1nlknWVxWS7xFOSURdNYdcQvvYIy7YwD1yMndrKOCLPwm3aJm3WmKqWCnH+v 3go5N19KuVXWmyPtstdvx/PN3B7x668lnkdeaSdpuzASJbLYgsekuHCpX7ZD4bxLKW gK+BPKunUaSvTpAcqoFV7jvHKkpz7fzZBmLRtUno= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2QKCcFI031576; Mon, 26 Mar 2018 15:12:38 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 26 Mar 2018 15:12:38 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 26 Mar 2018 15:12:38 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2QKCYLP005546; Mon, 26 Mar 2018 15:12:38 -0500 From: Murali Karicheri To: , , , , , , , , , Subject: [net-next PATCH 5/5] net: netcp: support probe deferral Date: Mon, 26 Mar 2018 16:15:12 -0400 Message-ID: <1522095312-23249-6-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522095312-23249-1-git-send-email-m-karicheri2@ti.com> References: <1522095312-23249-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180326_131300_537756_C70A30AE X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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;