From patchwork Mon Mar 26 20:15:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 10308619 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 5F53460212 for ; Mon, 26 Mar 2018 20:13:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 431AA29840 for ; Mon, 26 Mar 2018 20:13:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36D2B29845; Mon, 26 Mar 2018 20:13:12 +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 0B8C329840 for ; Mon, 26 Mar 2018 20:13:10 +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=dmQipzqy0Z3RlfYMUWQjLPv+auIQlj3y/Bku7Y0o4ZE=; b=hWHz4jVdlM+hEy LrOaQGibnx3VVDZn0KT75PitVQj/WLlpw0+Dohq9N0Z92dBs/DbuAE/t8CNKLfXocnGqNENSLdU7J Xj/My02Dl9cLAY7BKV60r62FAv2MFKMEfxLZ0IL0IJ7PVtpTTfOLKByWMp+L9nviR/WPguto++SxO vF/H0MycLMYsAIRDZx2BaMCdVOR1yR4R4oG3iYaRrezI6QtfMUOXhVvW6rCJ1fWD5+zqjP08R/lsD JRvkbWpwBrYkH094uH2S+N7a0E2odprcrPMfLRTBI1Dk51QLaqQlF9G4KIPEqCAjvT/NTZch9lyPy vY3A8IcpMMyROI+c5U6w==; 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 1f0YUI-0008Ae-EZ; Mon, 26 Mar 2018 20:13:02 +0000 Received: from lelnx193.ext.ti.com ([198.47.27.77]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0YUE-00087S-FM for linux-arm-kernel@lists.infradead.org; Mon, 26 Mar 2018 20:12:59 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2QKCcqA010302; 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=dMnOC/Hs5pkxq9f8cNfpkQCy3T58AsZKl1HFQJY45gU=; h=From:To:Subject:Date:In-Reply-To:References; b=nJxD8vmHQZqrmMD7lKMQHkJsD5bmXKT2M/eRzGfb7A0K8CENnaOWLGy8C5dmvOuqR MJJFG2+b21lZYFBDQJ3fHbyx4p9+6rJAoGx4Sd98QijtdD2yrgtgImDSNejSC8MIBY WpU8CQG6YQaq6Dnuq39teH8vIxSRLjFD+92fGrk8= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2QKCcJT031570; Mon, 26 Mar 2018 15:12:38 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) 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 DLEE105.ent.ti.com (157.170.170.35) 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 w2QKCYLO005546; Mon, 26 Mar 2018 15:12:37 -0500 From: Murali Karicheri To: , , , , , , , , , Subject: [net-next PATCH 4/5] Revert "net: netcp: remove dead code from the driver" Date: Mon, 26 Mar 2018 16:15:11 -0400 Message-ID: <1522095312-23249-5-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_131258_637307_3705380B X-CRM114-Status: GOOD ( 15.50 ) 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 As the probe sequence is not guaranteed contrary to the assumption of the commit 2d8e276a9030, same has to be reverted. commit 2d8e276a9030 ("net: netcp: remove dead code from the driver") Signed-off-by: Murali Karicheri --- drivers/net/ethernet/ti/netcp_core.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index f5a7eb2..9c51b25 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -2155,6 +2155,7 @@ static int netcp_probe(struct platform_device *pdev) struct device_node *child, *interfaces; struct netcp_device *netcp_device; struct device *dev = &pdev->dev; + struct netcp_module *module; int ret; if (!node) { @@ -2203,6 +2204,14 @@ static int netcp_probe(struct platform_device *pdev) /* Add the device instance to the list */ list_add_tail(&netcp_device->device_list, &netcp_devices); + /* Probe & attach any modules already registered */ + mutex_lock(&netcp_modules_lock); + for_each_netcp_module(module) { + ret = netcp_module_probe(netcp_device, module); + if (ret < 0) + dev_err(dev, "module(%s) probe failed\n", module->name); + } + mutex_unlock(&netcp_modules_lock); return 0; probe_quit_interface: