]> git.baikalelectronics.ru Git - kernel.git/commit
drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config
authorDavid Rivshin <drivshin@allworx.com>
Thu, 28 Apr 2016 01:25:25 +0000 (21:25 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Apr 2016 21:27:29 +0000 (17:27 -0400)
commit3b7d8697280d2b2a4a75b6e4390886a16b457b8d
tree06f54489122fed2183bffcff17c9e2327210b24f
parent51c05a4ba48ca56087c82487d73260c4d9a6a1de
drivers: net: cpsw: fix parsing of phy-handle DT property in dual_emac config

Commit f0a9ba90d1cac2f146eb47709feace2184b8650e ("drivers: net: cpsw: add
phy-handle parsing") saved the "phy-handle" phandle into a new cpsw_priv
field. However, phy connections are per-slave, so the phy_node field should
be in cpsw_slave_data rather than cpsw_priv.

This would go unnoticed in a single emac configuration. But in dual_emac
mode, the last "phy-handle" property parsed for either slave would be used
by both of them, causing them both to refer to the same phy_device.

Fixes: f0a9ba90d1ca ("drivers: net: cpsw: add phy-handle parsing")
Signed-off-by: David Rivshin <drivshin@allworx.com>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Tested-by: Andrew Goodbody <andrew.goodbody@cambrionix.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpsw.h