From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0D2C3C352A1 for ; Wed, 30 Nov 2022 11:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To: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-Owner; bh=Hq4mFKTSdF2dD0vzSBD4wYiJUyXvKPb86N4WFVPNIvM=; b=gqKQg4lx9ui0ql hD2D6xyeAEeEVSLRU5SKteXO6LCa91JQI1J3gasE0FuIYlKmWXGexH3JuF6ut79gn36vemMAF51b+ FLvbezLNMSPUtgvLA7m0IFegiEOv1btkSElFHDEhEOWt98SP+EDBQQNObrwmk8a+BzwEDHLvZEHWx z7niPz/rz97lnG+UVDXi3g9yyqgDkRulsnJHXdBroV/EDAHjjms90vpcu51phPu4CPVV1k1wZsWw8 NMlEKsbwNs3SXZZhmBzxYgRwttZ10v3/ZxK7pgtkD1i4P/KFbxhZYC6PNc7LMD70rPm2WuMm0TCz2 wKhfx3ySJyMqyTqpEBTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0LCF-00Fmm7-CC; Wed, 30 Nov 2022 11:24:11 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p0LCB-00FmfE-D5 for linux-arm-kernel@lists.infradead.org; Wed, 30 Nov 2022 11:24:09 +0000 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-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding: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=6301NlmXCNSuGpCf/dSPGEa9RRPWwBQpP9USBwW/W3w=; b=ZxodPxa0H9FYjpkK5W+h5nwe4k OnGIlGaXgUjCNF1ESuXI213S7MG/j0h/6QJqt0JhSC+s5f/6hWPJoUQbC8+yc5UHVV4Pb5Y5Jz5ul sRTKIYanacZtUuy2gQD7+QBFIn1xxej8FFFP/aPxXtNk5fSPyXmYb86ndLM742OLUi7YWeKTgBNLJ hzirRHzwLlRvI5G56896hxWj0o4KWFA7My5lgI2MQU2y+HxXQzJj1cnn3hIo/3qDIrOk+GpwzYGUn 5Khv5vjKcvFHk+JjKTJzYBi9tNFt1E/qmcFaxm3mF4pmmC7vMR0zBMdCd/2feVUTaNdHHLxgxy3Dk HN13xWvA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35492) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1p0LBp-0001di-Kx; Wed, 30 Nov 2022 11:23:45 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1p0LBm-0002Rv-CO; Wed, 30 Nov 2022 11:23:42 +0000 Date: Wed, 30 Nov 2022 11:23:42 +0000 From: "Russell King (Oracle)" To: Clark Wang Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, andrew@lunn.ch, hkallweit1@gmail.com, 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 1/2] net: phylink: add sync flag mac_ready to fix resume issue with WoL enabled Message-ID: References: <20221130111148.1064475-1-xiaoning.wang@nxp.com> <20221130111148.1064475-2-xiaoning.wang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221130111148.1064475-2-xiaoning.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221130_032407_483521_6104946F X-CRM114-Status: GOOD ( 13.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Nov 30, 2022 at 07:11:47PM +0800, Clark Wang wrote: > Issue we met: > On some platforms, mac cannot work after resumed from the suspend with WoL > enabled. > > The cause of the issue: > 1. phylink_resolve() is in a workqueue which will not be executed immediately. > This is the call sequence: > phylink_resolve()->phylink_link_up()->pl->mac_ops->mac_link_up() > For stmmac driver, mac_link_up() will set the correct speed/duplex... > values which are from link_state. > 2. In stmmac_resume(), it will call stmmac_hw_setup() after called the > phylink_resume(). stmmac_core_init() is called in function stmmac_hw_setup(), ... and that is where the problem is. Don't call phylink_resume() before your hardware is ready to see a link-up event. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel