]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: dp83867: fix hfs boot in rgmii mode
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 6 Dec 2019 12:34:32 +0000 (14:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Dec 2019 19:57:43 +0000 (11:57 -0800)
commit0d553bac616e2dfbd4888f40953f82bf4a359249
tree9859fae413a5d9f63f013e471417bcacd5b8ff74
parent76c0d029143ca44aa766bb0818039d386eee75e2
net: phy: dp83867: fix hfs boot in rgmii mode

The commit 927de32bb50e ("net: phy: dp83867: move dt parsing to probe")
causes regression on TI dra71x-evm and dra72x-evm, where DP83867 PHY is
used in "rgmii-id" mode - the networking stops working.
Unfortunately, it's not enough to just move DT parsing code to .probe() as
it depends on phydev->interface value, which is set to correct value abter
the .probe() is completed and before calling .config_init(). So, RGMII
configuration can't be loaded from DT.

To fix and issue
- move RGMII validation code to .config_init()
- parse RGMII parameters in dp83867_of_init(), but consider them as
optional.

Fixes: 927de32bb50e ("net: phy: dp83867: move dt parsing to probe")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/dp83867.c