linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Murali Karicheri <m-karicheri2@ti.com>
To: <robh+dt@kernel.org>, <mark.rutland@arm.com>,
	<ssantosh@kernel.org>, <malat@debian.org>, <w-kwok2@ti.com>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <davem@davemloft.net>,
	<netdev@vger.kernel.org>
Subject: [net-next PATCH 4/5] Revert "net: netcp: remove dead code from the driver"
Date: Mon, 26 Mar 2018 16:15:11 -0400	[thread overview]
Message-ID: <1522095312-23249-5-git-send-email-m-karicheri2@ti.com> (raw)
In-Reply-To: <1522095312-23249-1-git-send-email-m-karicheri2@ti.com>

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 <m-karicheri2@ti.com>
---
 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:
-- 
1.9.1

  parent reply	other threads:[~2018-03-26 20:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-26 20:15 [net-next PATCH 0/5] Add support for netcp driver on K2G SoC Murali Karicheri
2018-03-26 20:15 ` [net-next PATCH 1/5] soc: ti: K2G: enhancement to support QMSS in NSS Murali Karicheri
2018-03-26 20:15 ` [net-next PATCH 2/5] soc: ti: K2G: provide APIs to support driver probe deferral Murali Karicheri
2018-03-26 20:48   ` Andrew Lunn
2018-03-27 13:32     ` Murali Karicheri
2018-03-27 14:03       ` Andrew Lunn
2018-03-27 14:31         ` Murali Karicheri
2018-03-26 20:15 ` [net-next PATCH 3/5] net: netcp: ethss enhancements to support 2u cpsw h/w on K2G SoC Murali Karicheri
2018-03-26 20:28   ` Andrew Lunn
2018-03-27 13:23     ` Murali Karicheri
2018-03-27 13:47       ` Andrew Lunn
2018-03-26 20:15 ` Murali Karicheri [this message]
2018-03-26 20:15 ` [net-next PATCH 5/5] net: netcp: support probe deferral Murali Karicheri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1522095312-23249-5-git-send-email-m-karicheri2@ti.com \
    --to=m-karicheri2@ti.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malat@debian.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=ssantosh@kernel.org \
    --cc=w-kwok2@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).