From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 722AC38238C; Mon, 16 Mar 2026 09:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773651811; cv=none; b=q4SPdWKE3P9OgTZMHQ95TyPDOnXFiUoIq/eEuyhHkxv43cRBVzSlPnevWZ7T3c78EQYjSg1e36oUqeTuoFQUmZKl+T3E0Pv4dkz7XWJrCggOEchkbrHcasoeoRauzyw9+h5hMwBvbN2pDhFsuNPRPeOTYIXMBBNqBsiwlDHPFNQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773651811; c=relaxed/simple; bh=5j4PLO1hnK9/bR8drxJpSC3gYAwLz+mJRyotjG4l4gw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X4zU3w52vleBHjSxHvYlm5chAYJlLxIjcu+vey1iXlnRzOdky/DVBfd6bGXFgm2S/rgjaNM5TiQL5C2Rn9GghY2z5pj8WsNSSuqW9saTTddctgLMjK+YiQm/DEKT1KRz2AONqQ6s0nmtkz2j+83XjdVR1+JYYWSUUf/MxwLsPQQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=MhTkSR+O; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="MhTkSR+O" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=x21XFiKWNX9OSKttQyxY4H13HZnCZYTMHuJhv60Nsyw=; b=MhTkSR+ONSdKHyO99rOR4NelmK EeNzxCC17brplbhzSS4XLCIaP23lo0lY470qFfFb7lUvkfraYhazE/cArAGUT5rMnJ+ThXRcDP9tJ N/B3Ol/B5g33wzaBR1lULFs2QvXrxWpNWvw9aF7XEQc/GZdXF6U8Au0rH3jYpnVkPQphbmneEWdIW OBKKs7I31VMXi/z6vKI9/RfGYBdry5Ofs18cQty9iafbqMJgaCx4x2uYk1ZEy/zC0NpvvNiDxsgr5 IO4xiCkEgdmjZ6h2e/U/NIa5bFVZnAMO1wN216HbavaGtd5i9J2kyirLJo3BPFWYuCp0vf/h+JwZi SoKzALbA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:44006) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w23r3-000000003Wg-3LDr; Mon, 16 Mar 2026 09:03:17 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1w23r0-000000004wi-3A9F; Mon, 16 Mar 2026 09:03:14 +0000 Date: Mon, 16 Mar 2026 09:03:14 +0000 From: "Russell King (Oracle)" To: Linus Walleij Cc: Christophe Roullier , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , antonio.borneo@foss.st.com, Maxime Chevallier , Vladimir Oltean , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] net: stmmac: fix pinctrl management during suspend/resume Message-ID: References: <20260313105718.359614-1-christophe.roullier@foss.st.com> <20260313105718.359614-2-christophe.roullier@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Russell King (Oracle) On Sat, Mar 14, 2026 at 12:37:19AM +0000, Russell King (Oracle) wrote: > On Sat, Mar 14, 2026 at 12:44:56AM +0100, Linus Walleij wrote: > > On Fri, Mar 13, 2026 at 12:08 PM Russell King (Oracle) > > wrote: > > > On Fri, Mar 13, 2026 at 11:57:16AM +0100, Christophe Roullier wrote: > > > > In the deepest low-power modes, the pinctrl configuration is lost > > > > and is never restored if the interface is down. > > > > This commit ensures that the pinctrl state is set in all cases. > > > > > > Shouldn't the pin state be restored by the pinctrl layer? > > > > What we have in the device core only applies "init" and "default" > > states, and provides these handles for transitioning to "sleep" > > and "default" again (like a state machine). > > What I was meaning is that - for a driver using the "default" state, > if the hardware loses the pinctrl state during sleep, isn't it the > responsibility of the pinctrl driver to restore the state rather > than leaving it in whatever states it happens to be when the SoC > comes back from suspend? > > If that is not the case, then don't we have a major issue where > drivers using pinctrl but do not issue any pinctrl calls in the > resume function are buggy? I would like an answer on this before this patch is merged, because even with your reviewed-by, I don't think this patch is correct. For example, if pinctrl loses the pinmux state across suspend/resume, then this patch only solves the case where the NIC is down when suspending. It does not address the case where the NIC is up but WoL is disabled. Also, what happens when WoL is enabled at the MAC, when we expect the NIC to still be functional - which means that the pinmux state must remain active over suspend. This is in addition to a more general concern that almost every driver in the kernel is likely broken if we need to switch pinmux modes on resume to ensure that the "default" pinmux state is restored upon resume, which seems to be what you're saying by giving a r-b for this patch. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!