]> git.baikalelectronics.ru Git - kernel.git/commit
net: fec: add phy_reset_after_clk_enable() support
authorRichard Leitner <richard.leitner@skidata.com>
Mon, 11 Dec 2017 12:17:00 +0000 (13:17 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 16:22:54 +0000 (11:22 -0500)
commitb11d3ebf0116d5b44b84f257871ef0d5aca8fa72
tree251b3f0f1e9d6b490d0d3bac90e94dc78f645a0e
parent10eda3806656f2f375bcb6b2bb3094f39f8fba6c
net: fec: add phy_reset_after_clk_enable() support

Some PHYs (for example the SMSC LAN8710/LAN8720) doesn't allow turning
the refclk on and off again during operation (according to their
datasheet). Nonetheless exactly this behaviour was introduced for power
saving reasons by commit 229950af2928 ("net: fec: optimize the clock management to save power").
Therefore add support for the phy_reset_after_clk_enable function from
phylib to mitigate this issue.

Generally speaking this issue is only relevant if the ref clk for the
PHY is generated by the SoC and therefore the PHY is configured to
"REF_CLK In Mode". In our specific case (PCB) this problem does occur at
about every 10th to 50th POR of an LAN8710 connected to an i.MX6SOLO
SoC. The typical symptom of this problem is a "swinging" ethernet link.
Similar issues were reported by users of the NXP forum:
https://community.nxp.com/thread/389902
https://community.nxp.com/message/309354
With this patch applied the issue didn't occur for at least a few
hundret PORs of our board.

Fixes: 229950af2928 ("net: fec: optimize the clock management to save power")
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c