From patchwork Mon Apr 2 14:38:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10319919 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 1C60260375 for ; Mon, 2 Apr 2018 14:50:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BD6128A3F for ; Mon, 2 Apr 2018 14:50:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F413728ADD; Mon, 2 Apr 2018 14:50:30 +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 862F528A3F for ; Mon, 2 Apr 2018 14:50:30 +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=YY7tGoH/nKC2C/ eIN8V0bRIkl2XjIdRvrSCbNAfL+c+5U9AJjTcOLut/jCHQgmt4SJqe8DNdkPyjceIFbcVqAhN8F2H +0qkQ2yuT6WTRZx2xVOqoHWnyXlbbAd/owCKGTSn5x9RRtplwH0lDZd3RDb5cN0i8EL+Cu1aRicxf MFQybnTkwqSfmYT5uwsk7lj4ODdMVmkQRUlznVWsVLw/XaqGx+GWhD5PiVahLXz2VlnGRJmwnPPrz jQhz1nH5exsLZ/zuJ06R/1yn/9PKDdHqcIVxan7KRiksp/15LDlbCdxDhrq/H1XzK1/wM1YAE97MM 9P6niA/dAW6aCsFUHTLQ==; 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 1f30mu-0007be-7P; Mon, 02 Apr 2018 14:50:24 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f30Yk-0004Dd-Ri for linux-arm-kernel@bombadil.infradead.org; Mon, 02 Apr 2018 14:35:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FhoKhVOdbcuNQAk0Cqy5XNm//BZuteYCLQLtJPB2eEc=; b=u1lPOUZ3Z++GfobTpgYNJQYOf 0Lq+w2fsNFISyKmX6uQu59Ws3Uc1AnuMOh8X0peqxDmS3afRCvUGuC5dNoJik03J23DD1dkTDyzA/ qS89gWHH9mpc+TWrL1vOQUZbU1SDSnLTsUC+M7auJ0bZLQxjUdYM9ecvSbEuPDmegrMLE4wWjAeld m4M93rkjr6Qi6P1e5aWYdeNxQE0Rkz5TnwFAdEXLIHjVNFBPXie53bzH0TwVPhg1p/NvFx9zy907q W4eK0gioR9q3LUIYnxme+ljbzdhxPVAq+U3U8sc9fr6b/oiv2cL4kbzRfhICAreZ6kYy+TpJcP6Uu c/C/bXV0A==; Received: from fllnx209.ext.ti.com ([198.47.19.16]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f30Yh-0007sR-If for linux-arm-kernel@lists.infradead.org; Mon, 02 Apr 2018 14:35:44 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w32EZR4d017939; Mon, 2 Apr 2018 09:35:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1522679727; bh=GOLNCrk1T48W7MAq/90GQzgVf/o9rj616oIX8qS+Pc0=; h=From:To:Subject:Date:In-Reply-To:References; b=dBkeSJTYRIXClAJ0xdg8DHK1s7M8wycCa1EAKOiAjOR/7KTK2oV9Khp3yzkN0NwYU 4sAE3gclh7lKtR0FI2ad6FUSPF2IhLnhiAih8kvoFy9ZBjNiccxLXCB5OESaAXAzcy uVpxgDomoISCeT9sVWVBadlx4U5i3mOKOaT27qUQ= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w32EZRV6016380; Mon, 2 Apr 2018 09:35:27 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 2 Apr 2018 09:35:27 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 2 Apr 2018 09:35:27 -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 w32EZKc8025486; Mon, 2 Apr 2018 09:35:26 -0500 From: Murali Karicheri To: , , , , , , , , , Subject: [net-next PATCH v3 11/11] net: netcp: support probe deferral Date: Mon, 2 Apr 2018 10:38:01 -0400 Message-ID: <1522679881-25643-12-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522679881-25643-1-git-send-email-m-karicheri2@ti.com> References: <1522679881-25643-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-20180402_103543_780069_C88D0D07 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. 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;