diff options
author | Pascal Speck (Iktek) <kernel@iktek.de> | 2015-12-04 16:55:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-18 14:46:05 -0500 |
commit | 1873c58d4a45bd4d7104ba1482fcd9c3bd094cd1 (patch) | |
tree | 5f2d3c11794775fa2947c6aff0b05034b1acc150 | |
parent | 73796d8bf27372e26c2b79881947304c14c2d353 (diff) | |
download | linux-1873c58d4a45bd4d7104ba1482fcd9c3bd094cd1.tar.gz linux-1873c58d4a45bd4d7104ba1482fcd9c3bd094cd1.tar.bz2 linux-1873c58d4a45bd4d7104ba1482fcd9c3bd094cd1.zip |
ethernet:ti:cpsw: fix phy identification with multiple slaves on fixed-phy
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.
Fixes: 1f71e8c96fc6 ("drivers: net: cpsw: Add support for fixed-link PHY")
Signed-off-by: Pascal Speck <kernel@iktek.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 48b92c9de12a..e3b220de3ed4 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -2047,7 +2047,7 @@ static int cpsw_probe_dt(struct cpsw_priv *priv, 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); |