mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Rosen Penev <rosenp@gmail.com>
Cc: netdev@vger.kernel.org, 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>,
	Michael Stapelberg <michael@stapelberg.de>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net v5] net: phy: marvell: keep WOL_EIE across interrupt reconfiguration
Date: Wed, 14 Oct 2026 18:15:36 +0200	[thread overview]
Message-ID: <6c488dc7-cfcb-4abe-8bbf-fc4e5359a6c7@lunn.ch> (raw)
In-Reply-To: <20261014002534.149200-1-rosenp@gmail.com>

On Tue, Oct 13, 2026 at 05:25:34PM -0700, Rosen Penev wrote:
> marvell_config_intr() rewrites the whole interrupt enable register, so
> the config_intr call from phy_init_hw() on resume silently cleared
> WOL_EIE on the 88E1318S and 88E1510: m88e1318_get_wol() still reported
> WAKE_MAGIC, but a matched magic packet was no longer routed to INTn and
> the board did not wake.
> 
> Bit 7 of that register is WOL_EIE only on these two PHYs; on others,
> such as the 88E1111, it enables a FIFO error interrupt. So give the
> 88E1318S and 88E1510 their own config_intr and handle_interrupt, and
> leave the shared callbacks unchanged.
> 
> m88e1318_set_wol() now records whether WoL is enabled, and both it and
> the new config_intr derive WOL_EIE from that state under the MDIO bus
> lock. WOL_EIE stays set across config_intr while WoL is enabled, except
> when the PHY has an interrupt line and interrupts are being disabled,
> as in phy_free_interrupt(): INTn is then the PHY IRQ, and nothing would
> read IEVENT after free_irq() to release it. The bit is set again once
> interrupts are re-enabled. phy_probe() still clears a WOL_EIE left by a
> previous boot, since WoL starts out disabled. The new handler also
> claims WoL events, so they do not go unacknowledged when the PHY IRQ is
> in use.
> 
> Helios4 (Armada 388, 88E1512), 7.2.9. With this patch WOL_EIE stays set
> over 3 link down/up cycles, "wol d" clears it, and a magic packet on a
> running board is a handled interrupt. Without it, WOL_EIE is lost on the
> first down/up, survives "wol d", and the magic packet is an unhandled
> interrupt.
> 
> Fixes: 3871c3876f80 ("mv643xx_eth with 88E1318S: support Wake on LAN")
> Assisted-by: LLM
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> Tested-by: Igor Velkov <iav@iav.lv>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2026-10-14 16:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-14  0:25 Rosen Penev
2026-10-14 16:15 ` Andrew Lunn [this message]
2026-10-14 19:48 [PATCH v3] powerpc/lib: prefetch ahead in __csum_partial() Rosen Penev
2026-10-14 19:48 ` [PATCH net v5] net: phy: marvell: keep WOL_EIE across interrupt reconfiguration Rosen Penev
2026-10-20 20:50   ` patchwork-bot+netdevbpf

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=6c488dc7-cfcb-4abe-8bbf-fc4e5359a6c7@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael@stapelberg.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rosenp@gmail.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®