Article View: linux.kernel.netdev
Article #21547Re: [PATCH net] net: macb: don't disable an IRQ wake that was never enabled
From: Nicolai Buchwitz
Date: Tue, 24 Nov 2026 06:12
Date: Tue, 24 Nov 2026 06:12
69 lines
10744 bytes
10744 bytes
Hi Théo On 23.11.2026 18:09, Théo Lebrun wrote: > Hello Nicolai & Dom, > > On Mon Nov 23, 2026 at 4:38 PM CET, Nicolai Buchwitz wrote: >> @@ -6589,7 +6590,11 @@ static int __maybe_unused macb_suspend(struct >> device *dev) >> } >> spin_unlock_irqrestore(&bp->lock, flags); >> >> - enable_irq_wake(bp->queues[0].irq); >> + err = enable_irq_wake(bp->queues[0].irq); >> + if (err) >> + netdev_warn(netdev, "Unable to enable IRQ %d as a wake source >> (error %d)\n", >> + bp->queues[0].irq, err); >> + bp->pm_data.irq_wake_enabled = !err; >> } > > Your error handling is surprising to me: if we get asked to be a wakeup > source and fail doing so, we should refuse and error out. This will in > turn abort the system-wide suspend. > > The risk is that we might be the only wakeup source. We'd sleep for a > really long time. Agreed. This also would match the WAKE_ARP check, which already aborts suspend. We could arm the IRQ before touching the hardware and return the error, so the flag goes away too? > > What's the behavior on the platform you noticed the issue? I can think > of two reasons that still make it work: > - you have another wakeup source or Yes, the bootloader / rtc alarm / power button. The GIC is off as it is on rp1 too, which is in reset I guess. This makes WoL IMHO impoissible. > - some other interrupt (PCI related) is your wakeup path. > > In my mind, we should instead propagate the enable_irq_wake() error in > macb_suspend(). > > To go even further, we could move the enable_irq_wake() into > macb_set_wol() to report early to userspace that WoL isn't supported. There is another downstream patch I plan to upstream, which sets MACB_CAPS_NO_WOL for rp1. As this in kinda feature I planned for net-next and just fix the bug in net > > Lastly, if this is indeed a PCI related topic, then we need to > special-case the enable_irq_wake() call. From my LLM report, many PCI > MAC drivers only call device_set_wakeup_enable() at the set_wol > request. Then everything is handled at the bus level at suspend: a > pci_enable_wake() call made if the device is on the wakeup path. macb is a platform device behind rp1, which is a mfd. PCIe is down in S3 anyway? > [...] Thanks, Nicolai
Technical Details
Message-ID:
<36b47d8ba8e6c52ac3ccdeea0f057e06@tipi-net.de>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370042-linux-kernel-netdev=dewy.ruReferences:
<20261123-nb-macb-irq-wake-net-v1-1-ccdd60a9a1bc@tipi-net.de> <DN2R8R6SGV27.DU4IEVFTHBC0@bootlin.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370042-linux-kernel-netdev=dewy.ru From: nb@tipi-net.de (Nicolai Buchwitz) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: macb: don't disable an IRQ wake that was never enabled Date: Tue, 24 Nov 2026 07:12:49 +0100 Organization: Usenet Network Message-ID: <36b47d8ba8e6c52ac3ccdeea0f057e06@tipi-net.de> References: <20261123-nb-macb-irq-wake-net-v1-1-ccdd60a9a1bc@tipi-net.de> <DN2R8R6SGV27.DU4IEVFTHBC0@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="4068039"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:T2mTvScmechFf3NoIy3MjGi+u/8= sha256:fuUIyE1wlQW9+me1jY/gPhEatdk7q3mjd32IJSDw0fk= sha1:gPykw31b/xYUcuG0KjtbxUL9+lQ= sha256:fZ0Oma9DeBGxDcLX1VmrLWzVmTGKeSVQqGaI54dyBDE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id D53EA125DD3; Tue, 24 Nov 2026 09:13:14 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=tipi-net.de X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ICktCEoNMsf; Tue, 24 Nov 2026 09:13:11 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370042-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id EB709125DDC; Tue, 24 Nov 2026 09:12:58 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 105F632192; Tue, 24 Nov 2026 06:12:55 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795500774; b=Sw1OgUdJr3vCucJ81cKJfS11adKrCxCp1Dl2//DRmcur6ZV2HZDxiLi6hPthl9ll+Vqr 9D8KTnVnLaGnBbBKc5oVK8TEHUDCcNEUDph7LjAKUdwNwf6IiMxWyR49Om7VipYLQioIg MkBsagtxOOuKy7FSPe5eMN3FtrnvFPRDoGA7t4P04kr4OGrd1dam7eHcI2pPThP9ioopo sP+Kd137QEycRraJsK0dZ6RsgoFKoHXuqY9BP6JIE61sjtYxlbN4bEZe+cxHJ5SS/JoPv 9joezDRVwn4PmqmWZkLSOyAHQLPgRd4bTEW9LKmddi6Y0TPzAabhbFypYnKdujl5deA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795500774; h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=bivwD7dHlqSpJW2NL3hME59nxpMUaH80jJVziWDQ6JI=; b=wY6q3mJT8t464FxpCP7N3zNXypq2HS8vDwyX9wlLmp5wsym2YP2jvgZqEfaecPwgbRJ7 v9zGPQBDLZTlhg+VlXL7/aobgnfsV39dMm8mprXCyqLKvO48IVJNDFh+L1643C83WiJS/ rM9BE7bgIfyvG8CNcQ5YlknpAO/ZVgXOZQTt+huzDe2c+yf2oli0P6idhBjydJIpr5eME ohUOJZEjwsQ3Pi06u7iVtJp+TkzXzc9Phj/hNaelWiWxTFrl4KLZ3fSZXK1RSl/OKIZmH WxVOJHNKY0Vmi8lwiaXzY1w0WbTRR4qSqB5mqjwdGmmCyRnhq/H7uVmcFrC8kDDVtDw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y8c8Hdmw; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0B24606A68B; Tue, 24 Nov 2026 06:12:54 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y8c8Hdmw X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=194.13.80.246 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795500773; b=gUZ0KclnTsqtBCU6eiliYSLC833JX6mrRPMic/YP9yb+Lwp2Dtg2EEchhS/yWMa34814 YBZjyfqE3+L683m9fE1L5/pDM4WfDYnuFdNRlWL4CnPPD/siy8IUVUlVr/7xlZWAxW5xe dNOQeDLVCEtIWbubD3oNjuYLh6h0PSIvJb4WyiQ2Esesx82Jt1anQ5IPo7YYnPXOZQg2U 4cL9lM6sgNA4dr4j2EDDk05Bny4I1SH37SrNf7CtynZB2y5awOVgRCvoYoMTZ50vtnebO 2n0OPSP4sf3WCW0XA9tXP5MI16LXXOV9OdxXo4aNXxts5txrk348kpZCAnqc7X7EF3g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795500773; h=DMARC-Filter:Received:DKIM-Signature:MIME-Version:Date:From:To:Cc: Subject:In-Reply-To:References:Message-ID:X-Sender:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=bivwD7dHlqSpJW2NL3hME59nxpMUaH80jJVziWDQ6JI=; b=JDtesApNwYywE4P3Kk+j+8chRUU7cqNbmm7btgLYFU8xmF+mMPPeNkrn6JaP8Sps0XOp tNk6vcn5h+A3pgcPIG4QS/Nw+6NBKxPyj8b7QHtLSttUz1x6bpTMhuKIF+3N2P69iAkEh tz+VaMvarUAtSsDUmXNPnADUYfgpPJsmUTqmluq/O8erHV0vK5LhjRrgUnkNlfmyAwSE/ Rs2OyPymtl571PVN1WRWXZFsv222sbEa1ewICrWUhgsMDfBs1xp1Jmx2fSMyAIKXfBU3G ZzZ1cbu+qliJkltmzpxbjbFbMcDdvnPjNoq3bc2/d124vgzbkbLTqYJkqGKI4NbpNGA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=tipi-net.de; spf=pass smtp.mailfrom=tipi-net.de; dkim=pass header.d=tipi-net.de header.i=@tipi-net.de header.a=rsa-sha256 header.s=dkim header.b=Y8c8Hdmw; arc=none smtp.remote-ip=194.13.80.246 X-Received: from mail.tipi-net.de (mail.tipi-net.de [194.13.80.246]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F35D606A32E for <netdev@vger.kernel.org>; Tue, 24 Nov 2026 06:12:53 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 6F35D606A32E X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tipi-net.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tipi-net.de X-Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BF841A05A6; Tue, 24 Nov 2026 07:12:49 +0100 (CET) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tipi-net.de; s=dkim; t=1795500770; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=bivwD7dHlqSpJW2NL3hME59nxpMUaH80jJVziWDQ6JI=; b=Y8c8Hdmw+fIP4NrNkb93ZHjJjrmBVXz3k2w/FUU7gqwAfumKmt0kO9OkHfZUMv0YogC/x6 tc4kKCpQCKgxY+dLQD4tM8R9WNnXWdWkZVcD0sWt0tG5iVTqc1xHj1vfUNrFnq5WeVTLjJ t8hWC9M8xpz+PAQGdznVYotnZL6uLXWe8QFjxsk0UlNUrTFQSDxzgx6F/KCqGlTOdHsyxc zd7nLqIb8DQ1uZY8EhXIb1+50ZoD7Ncyrdl1NlvVnJl03Za8FtaiS9vuYMXUBCFAd88SkB 1maHWFGJcUtwY4rK9xgJuvqTeVRVpKl5VPtRozVuUm+bI+A+LLzs9Wne/qepGQ== X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Conor Dooley <conor.dooley@microchip.com>, Sergio Prado <sergio.prado@e-labworks.com>, netdev@vger.kernel.org, Dom Cobley <popcornmix@gmail.com> X-In-Reply-To: <DN2R8R6SGV27.DU4IEVFTHBC0@bootlin.com> X-Sender: nb@tipi-net.de X-Last-TLS-Session-Version: TLSv1.3