On 03.07.2018 18:44, Florian Fainelli wrote:
>
>
> On 07/02/2018 02:24 PM, Heiner Kallweit wrote:
>> On 02.07.2018 23:06, Andrew Lunn wrote:
>>>> static void r8168_pll_power_down(struct rtl8169_private *tp)
>>>> {
>>>> if (r8168_check_dash(tp))
>>>> @@ -4510,7 +4469,8 @@ static void r8168_pll_power_down(struct
>>>> rtl8169_private *tp)
>>>> if (rtl_wol_pll_power_down(tp))
>>>> return;
>>>>
>>>> - r8168_phy_power_down(tp);
>>>> + /* cover the case that PHY isn't connected */
>>>> + phy_suspend(mdiobus_get_phy(tp->mii_bus, 0));
>>>
>>> This could do some more explanation. Why would it not be connected?
>>>
>> The PHY gets connected when the net_device is opened. If a network
>> port isn't used then it will be runtime-suspended a few seconds after
>> boot. In this case we call r8168_pll_power_down() with the PHY not
>> being connected.
>
> Would not the !netif_running() check in rtl8169_net_suspend() take care
> of that though?
>
We don't come that far ..
If the interface is down then tp->TxDescArray is NULL. Means we call
rtl_pll_power_down() in rtl8169_runtime_suspend() before reaching
rtl8169_net_suspend().