lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5661B765.3050504@iktek.de>
Date:	Fri, 04 Dec 2015 16:55:17 +0100
From:	"Pascal Speck (Iktek)" <kernel@...ek.de>
To:	davem@...emloft.net
CC:	netdev@...r.kernel.org
Subject: [PATCH] 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.

Signed-off-by: Pascal Speck <kernel@...ek.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);

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ