RE: [PATCH 0/3] net: fec: Reset ethernet PHY whenever the enet_out clock

From: Duan Andy
Date: Mon Nov 30 2015 - 20:52:46 EST


From: Lothar WaÃmann <LW@xxxxxxxxxxxxxxxxxxx> Sent: Monday, November 30, 2015 7:33 PM
> To: Andrew Lunn; David S. Miller; Estevam Fabio-R49496; Greg Ungerer;
> Kevin Hao; Lothar WaÃmann; Lucas Stach; Duan Fugang-B38611; Philippe
> Reynes; Richard Cochran; Russell King; Sascha Hauer; Stefan Agner; linux-
> kernel@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; Jeff Kirsher; Uwe Kleine-
> KÃnig
> Subject: [PATCH 0/3] net: fec: Reset ethernet PHY whenever the enet_out
> clock
>
> This patchset fixes a regression introduced by commit 8fff755e9f8d ("net:
> fec: Ensure clocks are enabled while using mdio bus") for ethernet PHYs
> that are using ENET_OUT as reference clock (on i.MX6 or i.MX28)
>
Do you mean commit 8fff755e9f8d cause your problem ? This commit just manage ipg clock in runtime because mdio bus can access external phy switch no matter netdev status.

I don't think the commit cause phy link up/down issue. Phy link up/down is due to phy is not ready after power/clock on, it need to do reset.


> The first patch is a cleanup patch that removes redundant NULL checks.
> The second patch converts the driver to use the 'gpiod' framework.
> The third patch makes sure, fec_reset_phy() is called whenever the
> enet_out clock has been (re-)enabled to get the PHY into a
> consistent state.