From: Florian Fainelli <f.fainelli@gmail.com>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>,
Florian Fainelli <f.fainelli@gmail.com>
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:09:11 -0700 [thread overview]
Message-ID: <d75b23fb-74e5-3986-26d0-9ae83158c7ce@gmail.com> (raw)
In-Reply-To: <YvqJyg3eUusc8jkC@shell.armlinux.org.uk>
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?
I could use phy_modify(), sure.
--
Florian
next prev parent reply other threads:[~2022-08-15 18:09 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 [this message]
2022-08-15 18:32 ` Florian Fainelli
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=d75b23fb-74e5-3986-26d0-9ae83158c7ce@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®