RE: [PATCH] net: fec: fix enet_out clock handling

Duan Andy
2015-11-30T02:18:46Z

From: Andrew Lunn <andrew@lunn.ch> Sent: Sunday, November 29, 2015 12:44 AM
> To: Duan Fugang-B38611
> Cc: Lothar Wa?mann; David S. Miller; Estevam Fabio-R49496; Kevin Hao;
> Lucas Stach; Philippe Reynes; Russell King; Uwe Kleine-K?nig; linux-
> kernel@vger.kernel.org; netdev@vger.kernel.org; Stefan Agner
> Subject: Re: [PATCH] net: fec: fix enet_out clock handling
>
> > When MAC is not ready with clocks disabled, it is not necessary to
> > supply clock for PHY. In fact, PHY also is not ready, why does it need
> > clock ?
>
> How about the case of the "PHY" is actually a switch? You can use the
> MDIO bus separate from the MAC, you can configure the switch while the
> MAC is down, etc. Packets can be flowing in and out of switch ports,
> while the MAC is down. You only need the MAC up when the host wants to
> send packets.
>
> Andrew

Do you mean PHY switch also use the enet_out clock ?
- If not, this topic is not related to the patch.
- If so, we should add flag check, we can disable the enet_out clock when the phy is not switch or switch phy doesn't use the clock in real case, which can save power. And the patch title is not right, not "fix" since it is not a issue, just different usage for different cases.

Regards,
Andy