mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: phy: broadcom: Implement suspend/resume for AC131 and BCM5241
Date: Mon, 15 Aug 2022 11:32:09 -0700	[thread overview]
Message-ID: <fef9c594-80f4-f155-b40e-3762590e3c8c@gmail.com> (raw)
In-Reply-To: <d75b23fb-74e5-3986-26d0-9ae83158c7ce@gmail.com>

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

      reply	other threads:[~2022-08-15 19:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 17:43 Florian Fainelli
2022-08-15 18:00 ` Russell King (Oracle)
2022-08-15 18:09   ` Florian Fainelli
2022-08-15 18:32     ` Florian Fainelli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fef9c594-80f4-f155-b40e-3762590e3c8c@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®