mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Igor Velkov <iav@iav.lv>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Lukas Wunner <lukas@wunner.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: phy: postpone PHY interrupts during sleep with MAC-managed PM
Date: Sun, 4 Oct 2026 16:28:50 +0200	[thread overview]
Message-ID: <281b1def-a8ab-4edb-b35f-a30dcdfdd38d@lunn.ch> (raw)
In-Reply-To: <20261002043548.1302145-1-iav@iav.lv>

On Fri, Oct 02, 2026 at 07:35:48AM +0300, Igor Velkov wrote:
> mdio_bus_phy_suspend() and mdio_bus_phy_resume() return early when the
> MAC driver manages PHY PM

One obvious question. What exactly does it mean when the MAC driver
manages PHY PM. Maybe calling irq_suspend is part of that management?

> interrupt that wakes the system fires as soon as resume_device_irqs()
> re-enables the line, before the MAC driver resumes, and phy_interrupt()
> runs the PHY driver's handler at once. If the MDIO bus was powered down
> in suspend, the MDIO access in that handler stalls the CPU.

Ignoring MAC managed for a minute....

As far as i understand, suspend goes from leaf to root. Resume goes
from root to leaf. With WoL, we leave the PHY unsuspended, and the IRQ
controller as well. But the MDIO bus driver should get suspended and
then the MAC driver. On resume, the MAC driver is resumed, then the
MDIO bus driver, and then the PHY. At this point, during resume we can
handle the interrupt. It can then do MDIO transfers, since everything
towards the root should be up and running.

What exactly is going wrong with the ordering in your case?

     Andrew

  parent reply	other threads:[~2026-10-04 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  4:35 Igor Velkov
2026-10-02  5:03 ` Igor Velkov
2026-10-03 20:35 ` Igor Velkov
2026-10-04 14:28 ` Andrew Lunn [this message]
2026-10-04 18:21   ` Igor Velkov
2026-10-04 14:35 ` Andrew Lunn
2026-10-06  4:38 ` netdev-bot+sashiko

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=281b1def-a8ab-4edb-b35f-a30dcdfdd38d@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=iav@iav.lv \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lukas@wunner.de \
    --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®