From: Andrew Lunn <andrew@lunn.ch>
To: Biju <biju.das.au@gmail.com>
Cc: 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>,
Biju Das <biju.das.jz@bp.renesas.com>,
Russell King <linux@armlinux.org.uk>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/5] net: phy: mscc: Drop unnecessary phydev->lock
Date: Tue, 14 Apr 2026 18:06:10 +0200 [thread overview]
Message-ID: <5431b5f1-2cea-4f32-8e03-51251dbbe648@lunn.ch> (raw)
In-Reply-To: <20260412140032.122841-4-biju.das.jz@bp.renesas.com>
On Sun, Apr 12, 2026 at 03:00:25PM +0100, Biju wrote:
> From: Biju Das <biju.das.jz@bp.renesas.com>
>
> Remove manual mutex_lock/unlock(&phydev->lock) calls from several
> functions in the MSCC PHY driver.
>
> In vsc85xx_edge_rate_cntl_set(), phydev->lock is taken around a single
> phy_modify_paged() call. phy_modify_paged() is already a fully locked
> atomic operation that acquires the MDIO bus lock internally, so the
> additional phydev->lock is unnecessary.
>
> The remaining three functions — vsc85xx_mac_if_set(),
> vsc8531_pre_init_seq_set(), and vsc85xx_eee_init_seq_set() — use
> phy_read(), phy_write(), phy_select_page(), and phy_restore_page(),
> all of which operate under the MDIO bus lock. Taking phydev->lock
> around them provides no additional serialisation.
>
> Along with dropping the locks, error-path labels are renamed from
> out_unlock to err or restore_oldpage to better reflect their purpose.
> In vsc8531_pre_init_seq_set() and vsc85xx_eee_init_seq_set(), the
> redundant intermediate assignment of oldpage before returning is also
> eliminated.
>
> No functional change intended.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2026-04-14 16:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-12 14:00 [PATCH net-next v3 0/5] net: phy: Fix phy_init_hw() placement and update locking Biju
2026-04-12 14:00 ` [PATCH net-next v3 1/5] net: phy: call phy_init_hw() in phy resume path Biju
2026-04-12 14:00 ` [PATCH net-next v3 2/5] r8169: Drop redundant phy_init_hw() call in rtl8169_up() Biju
2026-04-12 14:00 ` [PATCH net-next v3 3/5] net: phy: mscc: Drop unnecessary phydev->lock Biju
2026-04-14 16:06 ` Andrew Lunn [this message]
2026-04-14 17:47 ` Russell King (Oracle)
2026-04-14 18:45 ` Biju Das
2026-04-12 14:00 ` [PATCH net-next v3 4/5] net: phy: microchip_t1: Replace phydev->lock with mdio_lock in lan937x_dsp_workaround() Biju
2026-04-14 16:08 ` Andrew Lunn
2026-04-14 18:44 ` Biju Das
2026-04-12 14:00 ` [PATCH net-next v3 5/5] net: phy: Move phy_init_hw() from phy_resume() to __phy_resume() Biju
2026-04-14 16:03 ` Andrew Lunn
2026-04-14 18:43 ` Biju Das
2026-04-15 10:00 ` Biju Das
2026-04-14 15:39 ` [PATCH net-next v3 0/5] net: phy: Fix phy_init_hw() placement and update locking Jakub Kicinski
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=5431b5f1-2cea-4f32-8e03-51251dbbe648@lunn.ch \
--to=andrew@lunn.ch \
--cc=biju.das.au@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=vladimir.oltean@nxp.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