From patchwork Tue Apr 17 21:30:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10346887 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 BFB6060542 for ; Tue, 17 Apr 2018 21:28:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B35ED27CAF for ; Tue, 17 Apr 2018 21:28:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A752927FA8; Tue, 17 Apr 2018 21:28:38 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI 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 3DA3F27F94 for ; Tue, 17 Apr 2018 21:28:37 +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=cUE6BHLuC0TGAF LdRCkGXhZkinEXlM3DRJtj8OsEi0Vc3oSMwtGCCYm51vCJwKCr83ninm9CaiToeOB9lGJx3H/UOI0 Fyvav4c9AWJhBR8Z6fztBgwxyUalziSZwm9TFwtFJrhyEru11f9Ry/yIkABMmEGat9WGX9sI13gQq vhgvDW/WoFl5rGp9JYba5Dr/gbeiWIbBbDo9NQ6ikhUzXb5rekq79bXYFWk8sVj3iRHwV2ZRwY7Db YKbLMyj5OXcp7/QzZA8iDmyUZP/SOEKz+M4zmHVHB/FAUUpcKsDz3aEknuef1mu6rZ1p51Hl48bjW EdkLTMbW6tjGg/qGTmBQ==; 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 1f8Y9K-0001Aw-Ph; Tue, 17 Apr 2018 21:28:26 +0000 Received: from fllnx210.ext.ti.com ([198.47.19.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8Y9A-00012t-F0 for linux-arm-kernel@lists.infradead.org; Tue, 17 Apr 2018 21:28:19 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3HLS5YT022382; Tue, 17 Apr 2018 16:28:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524000485; bh=GOLNCrk1T48W7MAq/90GQzgVf/o9rj616oIX8qS+Pc0=; h=From:To:Subject:Date:In-Reply-To:References; b=IGcwQk/5U/4SlpJdhskaMX8Uq+UQ/5rdCkbfCoidwD8B3ZllMCawBUzO+tGC3afnk 6AfQMw8Q9sdr1hxi9DW496ZaCHqWXOIzBGj7HRn78PmhcIfswRakRkkLUFKhsq66TI acjoU7ewJX7thrS4O6EgoxrfG5tsSbKBW/pTxDDI= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3HLS52A012109; Tue, 17 Apr 2018 16:28:05 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 17 Apr 2018 16:28:02 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) 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; Tue, 17 Apr 2018 16:28:02 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3HLRrkO004328; Tue, 17 Apr 2018 16:28:01 -0500 From: Murali Karicheri To: , , , , , , , , , , , Subject: [net-next PATCH v4 11/13] net: netcp: support probe deferral Date: Tue, 17 Apr 2018 17:30:40 -0400 Message-ID: <1524000642-23944-12-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1524000642-23944-1-git-send-email-m-karicheri2@ti.com> References: <1524000642-23944-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-20180417_142816_677816_5B017FA9 X-CRM114-Status: GOOD ( 14.74 ) 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;