lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Apr 2021 17:38:21 +0200
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Jon Hunter <jonathanh@...dia.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Joakim Zhang <qiangqing.zhang@....com>,
        "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
        "alexandre.torgue@...s.st.com" <alexandre.torgue@...s.st.com>,
        "joabreu@...opsys.com" <joabreu@...opsys.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "mcoquelin.stm32@...il.com" <mcoquelin.stm32@...il.com>,
        "andrew@...n.ch" <andrew@...n.ch>
Cc:     dl-linux-imx <linux-imx@....com>,
        "treding@...dia.com" <treding@...dia.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [RFC net-next] net: stmmac: should not modify RX descriptor when
 STMMAC resume

On 23.04.2021 15:46, Jon Hunter wrote:
> 
> On 22/04/2021 19:20, Florian Fainelli wrote:
>>
>>
>> On 4/22/2021 11:18 AM, Jon Hunter wrote:
>>>
>>> On 22/04/2021 18:32, Florian Fainelli wrote:
>>>>
>>>>
>>>> On 4/22/2021 10:00 AM, Jon Hunter wrote:
>>>>>
>>>>> On 22/04/2021 17:12, Florian Fainelli wrote:
>>>>>
>>>>> ...
>>>>>
>>>>>> What does the resumption failure looks like? Does the stmmac driver
>>>>>> successfully resume from your suspend state, but there is no network
>>>>>> traffic? Do you have a log by any chance?
>>>>>
>>>>> The board fails to resume and appears to hang. With regard to the
>>>>> original patch I did find that moving the code to re-init the RX buffers
>>>>> to before the PHY is enabled did work [0].
>>>>
>>>> You indicated that you are using a Broadcom PHY, which specific PHY are
>>>> you using?
>>>>
>>>> I suspect that the stmmac is somehow relying on the PHY to provide its
>>>> 125MHz RXC clock back to you in order to have its RX logic work correctly.
>>>>
>>>> One difference between using the Broadcom PHY and the Generic PHY
>>>> drivers could be whether your Broadcom PHY driver entry has a
>>>> .suspend/.resume callback implemented or not.
>>>
>>>
>>> This board has a BCM89610 and uses the drivers/net/phy/broadcom.c
>>> driver. Interestingly I don't see any suspend/resume handlers for this phy.
>>
>> Now if you do add .suspend = genphy_suspend and .resume = bcm54xx_resume
>> for this PHY entry does it work better?
> 
> Thanks for the suggestion. I tried this and this appears to breaking
> networking altogether. In other words, the board was not longer able to
> request an IP address. I also tried the genphy_resume and the board was
> able to get an IP address, but it is still unable to resume from suspend.
> 
Maybe MDIO bus PM and MAC driver PM interfere. Following changes dealt
with such an issue with the fec driver and a specific PHY model.

fba863b81604 ("net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM")
557d5dc83f68 ("net: fec: use mac-managed PHY PM")

If stmmac suspend/resume take care also of PHY pm, you may try a similar
change in stmmac.


> Thanks
> Jon
> 
Heiner

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ