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] [day] [month] [year] [list]
Date:   Mon, 15 Aug 2022 11:32:09 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     "Russell King (Oracle)" <linux@...linux.org.uk>
Cc:     netdev@...r.kernel.org,
        Broadcom internal kernel review list 
        <bcm-kernel-feedback-list@...adcom.com>,
        Andrew Lunn <andrew@...n.ch>,
        Heiner Kallweit <hkallweit1@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: broadcom: Implement suspend/resume for
 AC131 and BCM5241

On 8/15/22 11:09, Florian Fainelli wrote:
> On 8/15/22 11:00, Russell King (Oracle) wrote:
>> On Mon, Aug 15, 2022 at 10:43:56AM -0700, Florian Fainelli wrote:
>>> +    /* We cannot use a read/modify/write here otherwise the PHY 
>>> continues
>>> +     * to drive LEDs which defeats the purpose of low power mode.
>>> +     */
>> ...
>>> +    /* Set standby mode */
>>> +    reg = phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4);
>>> +    if (reg < 0) {
>>> +        err = reg;
>>> +        goto done;
>>> +    }
>>> +
>>> +    reg |= MII_BRCM_FET_SHDW_AM4_STANDBY;
>>> +
>>> +    err = phy_write(phydev, MII_BRCM_FET_SHDW_AUXMODE4, reg);
>>
>> Does the read-modify-write problem extend to this register? Why would
>> the PHY behave differently whether you used phy_modify() here or not?
>> On the mdio bus, it should be exactly the same - the only difference
>> is that we're guaranteed to hold the lock over the sequence whereas
>> this drops and re-acquires the lock.
> 
> What read-modify-write problem are you referring to, that is, are you 
> talking about my statement about setting BMCR.PDOWN only or something else?

Sorry, hit send too quickly, I see what problem you are referring to. v2 
coming up shortly utilizing phy_modify() and simplifying the return path 
(no need for done label, etc.)

Thanks
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ