All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@codethink.co.uk>
To: Mugunthan V N <mugunthanvnm@ti.com>, Sekhar Nori <nsekhar@ti.com>
Cc: netdev@vger.kernel.org, CT kernel <linux-kernel@lists.codethink.co.uk>
Subject: [PATCH net-next] ti_cpsw: Check for disabled child nodes
Date: Tue, 21 Jun 2016 01:16:31 +0100	[thread overview]
Message-ID: <1466468191.26723.19.camel@codethink.co.uk> (raw)

Dual MAC devices don't necessarily have both MACs wired up, so ignore
those that are disabled.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
---
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -2023,7 +2023,7 @@ static int cpsw_probe_dt(struct cpsw_pri
 	if (ret)
 		dev_warn(&pdev->dev, "Doesn't have any child node\n");
 
-	for_each_child_of_node(node, slave_node) {
+	for_each_available_child_of_node(node, slave_node) {
 		struct cpsw_slave_data *slave_data = data->slave_data + i;
 		const void *mac_addr = NULL;
 		int lenp;

-- 
Ben Hutchings
Software Developer, Codethink Ltd.

             reply	other threads:[~2016-06-21  0:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  0:16 Ben Hutchings [this message]
2016-06-23 19:12 ` [PATCH net-next] ti_cpsw: Check for disabled child nodes David Miller

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=1466468191.26723.19.camel@codethink.co.uk \
    --to=ben.hutchings@codethink.co.uk \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.