From: Giuseppe Cavallaro <peppe.cavall...@st.com>
Date: Tue, 25 Oct 2016 10:31:22 +0200

> These PHY chips, by default, enable the hibernation feature
> so, if the cable is unplugged the device enters in hibernation
> mode after some time. This can generate problems on some cases.
> It has been noticed, on some platforms that, if the phy enters
> in hibernation, the missing of the rx clock signal can force
> a mac to fail when setup some parts that need to be properly
> clocked.
> For example, while booting a Kernel the SYNP MAC (stmmac) fails
> to initialize own DMA engine if the phy entered in hibernation
> before.
> 
> So, the patch just disables this feature by default when init
> the PHY driver.
> 
> Signed-off-by: Giuseppe Cavallaro <peppe.cavall...@st.com>
> Cc: Matus Ujhelyi <ujhely...@gmail.com>

Like Andrew, I think this is attacking the problem from the wrong
side.

The stmmac driver, if it needs the proper PHY RX clocks to initialize
properly, should do the work to make sure it is there.

If this means forcing the PHY out of hibernation mode, so that it
can initialize properly, this is what the stammc can do.

After initialization, it can allow the chip to fall back into
hibernation mode again if the cable is still unplugged.

Disabling a whole feature of the PHY instead doesn't make a lot of
sense when it certainly seems like stmmac can do what it needs to do
in the presence of this feature being enabled.

Reply via email to