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 C32E3C74A5B for ; Thu, 16 Mar 2023 21:57:34 +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=i8FQEmmypR5KeU0BSiGxezPEadxeJlrF06phBDn4++s=; b=KQ70OPgs9OFDOh hjRYAeQYgf0lzI9wyz6aumHUUJt/YfQwQ9PXxo7+huUBgJCnJ5BinX0hA/mcj3tp17A44EpzU7UFE ww6atqtruNWkd2rcbYv0cPEQDiqDNlarGm5A07PB/Ro1w2SZUBDPnMr0fTIjhOKZoc8ILpG+9MlDy 7thpqeIgbGE/wsCqe6JRcl1QH6AC1c4HhOYzNvqgGQVdVf6tymmZzua4ZtNO9wkGmNAHejxRGpC7X Yc/Wi9rhMRy/awh3ncpsc4ufHQv969fwoxKT6fCHuqi97i/xSIQFfUcGJNUU3NKO/NFg0iERaFJ/5 9byBSJsCLATnwN6cz6Hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcvaP-0007Mb-2a; Thu, 16 Mar 2023 21:56:37 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcvaM-0007LF-1U for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2023 21:56:36 +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=LzJVT1YLVSxCwyYJDFQ7AijDbKEfkNXaVr/FyexpV4g=; b=ZPnkfwVee81qlCfWipMdH+IPb9 Z851th9zA8IaRyynxVNRckhSEGJUp+5eoxxJwuTejp3zvJDBPglDUhkG/K+YJZNW2CrVQkBPMiRGK YeqQT6lSq92JCLyJgNI3DDa0g6zrnbCXQZg5gDA9Rdd5UKyZTcY+IsRd1AUGdAheV5YZFT8VwHMcA XDuu83i1XUCYctPW+ikU8WJuxBQkpebYTZwFwiMkvdf6iePrVGG5S0dcIp7KuDEcy1n/i0H/cNalf dcyl7V89zs2B0Wgz52bjCfwqAIV74xwPeMjUniqOKxjoU5Lcn3o5EGKZgDRKM13vV4v1TNInze0sq rIcKFnlQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:59080) 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 1pcva2-0001Lk-Du; Thu, 16 Mar 2023 21:56:14 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pcvZx-0002mv-Fu; Thu, 16 Mar 2023 21:56:09 +0000 Date: Thu, 16 Mar 2023 21:56:09 +0000 From: "Russell King (Oracle)" To: Shenwei Wang Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev Subject: Re: [PATCH 1/1] net: stmmac: start PHY early in __stmmac_open Message-ID: References: <20230316205449.1659395-1-shenwei.wang@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230316205449.1659395-1-shenwei.wang@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230316_145634_501736_7235226E X-CRM114-Status: GOOD ( 14.45 ) 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 Thu, Mar 16, 2023 at 03:54:49PM -0500, Shenwei Wang wrote: > By initializing the PHY and establishing the link before setting the > MAC relating configurations, this change ensures that the PHY is > operational before the MAC logic starts relying on it. This can > prevent synchronization errors and improve system stability. > > This change especially applies to the RMII mode, where the PHY may drive > the REF_CLK signal, which requires the PHY to be started and operational > before the MAC logic initializes. > > This change should not impact other modes of operation. NAK. A patch similar to this has already been sent. The problem with just moving this is that phylink can call the mac_link_up() method *before* phylink_start() has returned - and as this driver has not completed the setup, it doesn't expect the link to come up at that point. There are several issues with this driver wanting the PHY clock early, and there have been two people working on addressing this previously, proposing two different changes to phylink. I sent them away to talk to each other and come back with a unified solution. Shock horror, they never came back. Now we seem to be starting again from the beginning. stmmac folk really need to get a handle on this so reviewers are not having to NAK similar patches time and time again, resulting in the problem not being solved. -- 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