All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pascal Speck (Iktek)" <kernel@iktek.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] ethernet:ti:cpsw: fix phy identification with multiple slaves on fixed-phy
Date: Fri, 04 Dec 2015 16:55:17 +0100	[thread overview]
Message-ID: <5661B765.3050504@iktek.de> (raw)

When using more than one slave with ti cpsw and fixed phy the pd->phy_id 
will be always zero, but slave_data->phy_id must be unique.
pd->phy_id means a "phy hardware id" whereas slave_data->phy_id means an 
"unique id", so we should use pd->addr which has the same unique meaning.

Signed-off-by: Pascal Speck <kernel@iktek.de>

---

--- a/drivers/net/ethernet/ti/cpsw.c 2015-11-30 03:58:26.000000000 +0100
+++ b/drivers/net/ethernet/ti/cpsw.c      2015-12-04 16:42:02.075450234 
+0100
@@ -2047,7 +2047,7 @@ static int cpsw_probe_dt(struct cpsw_pri
                         if (!pd)
                                 return -ENODEV;
                         snprintf(slave_data->phy_id, 
sizeof(slave_data->phy_id),
-                                PHY_ID_FMT, pd->bus->id, pd->phy_id);
+                                PHY_ID_FMT, pd->bus->id, pd->addr);
                         goto no_phy_slave;
                 }
                 parp = of_get_property(slave_node, "phy_id", &lenp);

         reply	other threads:[~2015-12-04 15:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10  3:31 [PATCH] drivers: net: cpsw: fix RMII/RGMII mode when used with fixed-link PHY David Rivshin (Allworx)
2015-12-10  3:31 ` David Rivshin (Allworx)
2015-12-04 15:55 ` Pascal Speck (Iktek) [this message]
2015-12-12 15:44 ` Markus Brunner
2015-12-12 15:44   ` Markus Brunner
2015-12-14 18:04   ` David Rivshin (Allworx)
2015-12-14 18:04     ` David Rivshin (Allworx)
2015-12-16  6:39     ` Markus Brunner
2015-12-16  6:39       ` Markus Brunner
2015-12-17  4:02       ` [PATCH v2 0/3] drivers: net: cpsw: Fix bugs in fixed-link PHY DT parsing David Rivshin (Allworx)
2015-12-17  4:02         ` David Rivshin (Allworx)
2015-12-17  4:02         ` [PATCH v2 1/3] ethernet:ti:cpsw: fix phy identification with multiple slaves on fixed-phy David Rivshin (Allworx)
2015-12-17  4:02           ` David Rivshin (Allworx)
2015-12-17  4:02         ` [PATCH v2 2/3] drivers: net: cpsw: fix RMII/RGMII mode when used with fixed-link PHY David Rivshin (Allworx)
2015-12-17  4:02           ` David Rivshin (Allworx)
2015-12-17  4:02         ` [PATCH v2 3/3] drivers: net: cpsw: increment reference count on fixed-link PHY node David Rivshin (Allworx)
2015-12-17  4:02           ` David Rivshin (Allworx)
2015-12-17 20:45         ` [PATCH v2 0/3] drivers: net: cpsw: Fix bugs in fixed-link PHY DT parsing David Miller
2015-12-17 20:45           ` David Miller
2015-12-18 10:20           ` Daniel Trautmann
2015-12-18 10:20             ` Daniel Trautmann
2015-12-18 22:06             ` David Rivshin (Allworx)
2015-12-18 22:06               ` David Rivshin (Allworx)
2015-12-18 22:06               ` David Rivshin (Allworx)
2015-12-18 19:46         ` David Miller
2015-12-18 19:46           ` David Miller
2015-12-17  5:04       ` [PATCH] drivers: net: cpsw: fix RMII/RGMII mode when used with fixed-link PHY David Rivshin (Allworx)
2015-12-17  5:04         ` David Rivshin (Allworx)

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=5661B765.3050504@iktek.de \
    --to=kernel@iktek.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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.