From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Andrew Lunn <andrew@lunn•ch>
Cc: Biju <biju.das.au@gmail•com>,
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>,
Ovidiu Panait <ovidiu.panait.rb@renesas•com>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
Geert Uytterhoeven <geert+renesas@glider•be>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp•renesas.com>,
linux-renesas-soc@vger•kernel.org,
Biju Das <biju.das.jz@bp•renesas.com>
Subject: Re: [PATCH net-next] net: phy: call phy_init_hw() in phy resume path
Date: Fri, 10 Apr 2026 16:22:23 +0100 [thread overview]
Message-ID: <adkVr0mMzDsXile1@shell.armlinux.org.uk> (raw)
In-Reply-To: <839fec66-5ec0-4cc0-a0c4-ae2de6902188@lunn.ch>
On Fri, Apr 10, 2026 at 05:15:21PM +0200, Andrew Lunn wrote:
> > Apart from that, looks fine to me - it seems some paths call
> > phy_init_hw() can be called with or without phydev->lock held, and
> > this one will call it with the lock held which seems to be okay.
>
> Haven't we had deadlocks in this area before?
If we have a problem calling phy_init_hw() with phydev->lock held, then:
phy_state_machine():
mutex_lock(&phydev->lock);
state_work = _phy_state_machine(phydev);
_phy_state_machine():
switch (phydev->state) {
...
case PHY_CABLETEST:
err = phydev->drv->cable_test_get_status(phydev, &finished);
if (err) {
phy_abort_cable_test(phydev);
phy_abort_cable_test():
err = phy_init_hw(phydev);
that path has a problem and needs fixing.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2026-04-10 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 14:29 [PATCH net-next] net: phy: call phy_init_hw() in phy resume path Biju
2026-04-10 14:51 ` Russell King (Oracle)
2026-04-10 14:55 ` Russell King (Oracle)
2026-04-10 17:27 ` Biju Das
2026-04-10 23:51 ` Russell King (Oracle)
2026-04-10 15:15 ` Andrew Lunn
2026-04-10 15:22 ` Russell King (Oracle) [this message]
2026-04-10 15:38 ` Biju Das
2026-04-10 16:00 ` Andrew Lunn
2026-04-10 16:41 ` Biju Das
2026-04-10 23:49 ` Russell King (Oracle)
2026-04-11 13:50 ` Andrew Lunn
2026-04-11 14:32 ` Biju Das
2026-04-11 16:46 ` Russell King (Oracle)
2026-04-12 12:05 ` Biju Das
2026-04-12 12:55 ` Russell King (Oracle)
2026-04-10 17:00 ` 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=adkVr0mMzDsXile1@shell.armlinux.org.uk \
--to=linux@armlinux$(echo .)org.uk \
--cc=andrew@lunn$(echo .)ch \
--cc=biju.das.au@gmail$(echo .)com \
--cc=biju.das.jz@bp$(echo .)renesas.com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=geert+renesas@glider$(echo .)be \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-renesas-soc@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=ovidiu.panait.rb@renesas$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=prabhakar.mahadev-lad.rj@bp$(echo .)renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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