public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v2 0/1] PHY interruptus horribilis
@ 2022-06-08  9:52 Lukas Wunner
  2022-06-08  9:52 ` [PATCH net v2 1/1] net: phy: Don't trigger state machine while in suspend Lukas Wunner
  2022-06-08 10:35 ` [PATCH net v2 0/1] PHY interruptus horribilis Rafael J. Wysocki
  0 siblings, 2 replies; 5+ messages in thread
From: Lukas Wunner @ 2022-06-08  9:52 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet,
	Andrew Lunn, Heiner Kallweit, Russell King, Marek Szyprowski,
	Thomas Gleixner, Rafael J. Wysocki, Len Brown, Pavel Machek
  Cc: netdev, Steve Glendinning, UNGLinuxDriver, Oliver Neukum,
	Andre Edich, Oleksij Rempel, Martyn Welch, Gabriel Hojda,
	Christoph Fritz, Lino Sanfilippo, Philipp Rosenberger, Ferry Toth,
	Krzysztof Kozlowski, linux-samsung-soc, linux-kernel, linux-pm

Andrew Lunn (PHY maintainer) asked me to resend this patch and cc the
IRQ maintainer.  I'm also cc'ing PM maintainers for good measure.

The patch addresses an issue with PHY interrupts occurring during a
system sleep transition after the PHY has already been suspended.

The IRQ subsystem uses an internal flag IRQD_WAKEUP_ARMED to avoid
handling such interrupts, but it's not set until suspend_device_irqs()
is called during the ->suspend_noirq() phase.  That's too late in this
case as PHYs are suspended in the ->suspend() phase.  And there's
no external interface to set the flag earlier.

As I'm lacking access to the flag, I'm open coding its functionality
in this patch.  Is this the correct approach or should I instead look
into providing an external interface to the flag?

Side note: suspend_device_irqs() and resume_device_irqs() have been
exported since forever even though there's no module user...

Thanks!

Changes since v1:
* Extend rationale in the commit message.
* Drop Fixes tag, add Tested-by tag (Marek).

Link to v1:
https://lore.kernel.org/netdev/688f559346ea747d3b47a4d16ef8277e093f9ebe.1653556322.git.lukas@wunner.de/

Lukas Wunner (1):
  net: phy: Don't trigger state machine while in suspend

 drivers/net/phy/phy.c        | 23 +++++++++++++++++++++++
 drivers/net/phy/phy_device.c | 23 +++++++++++++++++++++++
 include/linux/phy.h          |  6 ++++++
 3 files changed, 52 insertions(+)

-- 
2.35.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-08 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08  9:52 [PATCH net v2 0/1] PHY interruptus horribilis Lukas Wunner
2022-06-08  9:52 ` [PATCH net v2 1/1] net: phy: Don't trigger state machine while in suspend Lukas Wunner
2022-06-08 10:11   ` Rafael J. Wysocki
2022-06-08 10:35 ` [PATCH net v2 0/1] PHY interruptus horribilis Rafael J. Wysocki
2022-06-08 11:09   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox