All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Lukas Wunner <lukas@wunner.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	netdev@vger.kernel.org,
	Steve Glendinning <steve.glendinning@shawell.net>,
	UNGLinuxDriver@microchip.com, Oliver Neukum <oneukum@suse.com>,
	Andre Edich <andre.edich@microchip.com>,
	Oleksij Rempel <linux@rempel-privat.de>,
	Martyn Welch <martyn.welch@collabora.com>,
	Gabriel Hojda <ghojda@yo2urs.ro>,
	Christoph Fritz <chf.fritz@googlemail.com>,
	Lino Sanfilippo <LinoSanfilippo@gmx.de>,
	Philipp Rosenberger <p.rosenberger@kunbus.com>,
	Ferry Toth <fntoth@gmail.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	linux-samsung-soc@vger.kernel.org
Subject: Re: [PATCH net] net: phy: Don't trigger state machine while in suspend
Date: Mon, 6 Jun 2022 03:40:49 +0200	[thread overview]
Message-ID: <Yp1bIdwLjiLftWgW@lunn.ch> (raw)
In-Reply-To: <688f559346ea747d3b47a4d16ef8277e093f9ebe.1653556322.git.lukas@wunner.de>

> +	if (phy_interrupt_is_valid(phydev)) {
> +		phydev->irq_suspended = 0;
> +		synchronize_irq(phydev->irq);
> +
> +		/* Rerun interrupts which were postponed by phy_interrupt()
> +		 * because they occurred during the system sleep transition.
> +		 */
> +		if (phydev->irq_rerun) {
> +			phydev->irq_rerun = 0;
> +			enable_irq(phydev->irq);
> +			irq_wake_thread(phydev->irq, phydev);
> +		}
> +	}

As i said in a previous thread, PHY interrupts are generally level,
not edge. So when you call enable_irq(phydev->irq), doesn't it
immediately fire? You need to first call the handler, and then
re-enable the interrupt.

      Andrew

  parent reply	other threads:[~2022-06-06  1:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220526092819eucas1p2f05c11c571f47b0330e42d00b5d32b50@eucas1p2.samsung.com>
2022-05-26  9:28 ` [PATCH net] net: phy: Don't trigger state machine while in suspend Lukas Wunner
2022-05-26 10:34   ` Marek Szyprowski
2022-06-06  1:40   ` Andrew Lunn [this message]
2022-06-06  5:53     ` Lukas Wunner
2022-06-06 12:19       ` Andrew Lunn

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=Yp1bIdwLjiLftWgW@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=LinoSanfilippo@gmx.de \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andre.edich@microchip.com \
    --cc=chf.fritz@googlemail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fntoth@gmail.com \
    --cc=ghojda@yo2urs.ro \
    --cc=hkallweit1@gmail.com \
    --cc=krzk@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linux@rempel-privat.de \
    --cc=lukas@wunner.de \
    --cc=m.szyprowski@samsung.com \
    --cc=martyn.welch@collabora.com \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=p.rosenberger@kunbus.com \
    --cc=pabeni@redhat.com \
    --cc=steve.glendinning@shawell.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.