Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2544993lqb; Tue, 28 May 2024 03:24:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUKW/zBdUx+PGsNqqSjoQkxC/ImTJ13TAdHyOEDmy5NEEJmc50TkOYAhuRYikFJ47fTHDX5PEiBYTOZhZNi8daDWzE54Gh58hHZQNhxcQ== X-Google-Smtp-Source: AGHT+IH77Ec8O1ZMn1YmTvRsE+hKYUFoa9oVyBie3zmL4EHdBMaRJKdzC6iNcyzXRWtrUg0XGSnA X-Received: by 2002:a05:6870:611f:b0:24c:bb91:df59 with SMTP id 586e51a60fabf-24cbb91e025mr10335469fac.35.1716891849708; Tue, 28 May 2024 03:24:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716891849; cv=pass; d=google.com; s=arc-20160816; b=n1tpX/wQT+NDct8CBhncxnhPAeqJw6o/HeiWZaJgQF1w4MKG2sfoNw+5K5ZNoiMrzY 6Re3P6XR8Iyr22iGD26BlqY0IISRxCxePhCRemD43/5SWr3UM4ibpWYq5m+4hWEu1gSc Yr3dax4fnsuh8h/KLJutMODtBlFINvHI6undqNE3AmeciU5e+3mJfnpCGvCDqnQaEkRW ozITDLdTEwPHnOBCwNHs8XJsd6pnFOvWZTcsvtPdNd0qZLV0zhjKC87Ceg9ez/lOwIoY hMtgf/PH2X05rLeAhI9JUECs69AU5R0mGAI9W3qxIvK3xlBy2xIoLmPcbyyXGQ6FKpOV WOnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=xKVMZlVJjByQlTcWIHcb8ICc2Adw+z+dOdz53NVlpuo=; fh=815TTRjkBuEw28VVDERt2WYGbRGGHojOfGvV4+BrxFY=; b=CAlYpcr5IjKyezDRHfoPPROCanPkfSNlmaKgmwsgwsdhzeGPAKq6FPLx6micxuxU+L zlOGbE4cN8g8VuIJ9q4y9fZMePggFJupdIUu99uUZTSbpS26rNPPjlS/Os7jSJK/Duvh d3BrlSPcCZo9EKjidSBrfVRNN532GteiBqujy59JWlNdiFU8PxuSSoDgIFgor1ocZ3nN nB53Yfkxz2xSxoGzmf9x8H6GoMoAVsF762P93fdlhZET2aHRSwH+g0d3sb8ikd65akee 1s52dX42/lTe66w0S7GJBzuahnmunwWP/eKEovb3F96nhHq0qalhGaQ7lOAFuWYaS2+G soBg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=sqNnxhk5; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-192104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17bd017si102397801cf.98.2024.05.28.03.24.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:24:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=sqNnxhk5; arc=pass (i=1 dkim=pass dkdomain=armlinux.org.uk dmarc=pass fromdomain=armlinux.org.uk); spf=pass (google.com: domain of linux-kernel+bounces-192104-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192104-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3FFD51C23A94 for ; Tue, 28 May 2024 10:22:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25E3916C69E; Tue, 28 May 2024 10:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="sqNnxhk5" 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 69C5C16A384; Tue, 28 May 2024 10:22:05 +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=1716891727; cv=none; b=IE4dy0ne9HRpwpVfAQdE8cxNBYMX6hHKAn6rP/gWLQgDNvtwnLQCxzOJFQKmTkvFWVDSI9bUO4hVomxcDuvLaPzfk2SeZKJ5xsUSZAAhEiLo9HI9O1CcfzSd9SWXHFhZID8pImLWsuOzAcs+tHtr0dS6105vzhZz9gLXWuOwMrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716891727; c=relaxed/simple; bh=sRey+u5pmGwHMY7PBUYlpXaOnGtRIBoM3ykxb58m6ak=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BR2UsxsvqdOaWbpWwzgWaN0U0h7wC2IVc6TLIOjiGgu37t8tl4hHz4g/UXb7vORbGOScUsMXKB4Y/jO+UBdHr8Uc29agkB31RL3IrlLPTXAhGvJvGdg7GLldPZmKcBmXssrxP2LFBe3zR/PEGUYNHnNOh58y79ugvAxRLOWRErU= 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=sqNnxhk5; 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 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=xKVMZlVJjByQlTcWIHcb8ICc2Adw+z+dOdz53NVlpuo=; b=sqNnxhk5J6XXakffML7EBhL0FA 8kDy73eLiLSXZ0NN/9oIEJaRO1aECUF1NNEnpClyaHQO1C2xxRyDBWk/ySafx5iIaduFQM8cXLiZO Jr3adIdqJ0gPPUkb00oHQDK8GqXAt/APcH7lE8sn6KEtAnQnPdCd0nQd7r2wY3t/OxUB+AcC7EP72 Ys+VvkuY7agbOJXYLjA9KeG1hiuymXHK6yYl0Vd2It8wPBdbBjv8ZPaSUe0Lej6Gq4jiQjpH1p1Lm uHp5M3Sr52QMTDb2TDJi/OjZf+M6Ur1nS90+LiP+ScF4WL+DjmeNmzsN/OfJI2Ah/yUyJ1ykb072h Vfl7bTGQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:41282) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sBtxd-0004by-2l; Tue, 28 May 2024 11:21:41 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1sBtxc-0003BF-0p; Tue, 28 May 2024 11:21:40 +0100 Date: Tue, 28 May 2024 11:21:39 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Byungho An , Giuseppe CAVALLARO , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , bpf@vger.kernel.org, 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 RFC net-next 2/3] net: stmmac: Activate Inband/PCS flag based on the selected iface Message-ID: References: <20240524210304.9164-1-fancer.lancer@gmail.com> <20240524210304.9164-2-fancer.lancer@gmail.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=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) On Mon, May 27, 2024 at 12:57:02AM +0300, Serge Semin wrote: > On Sun, May 26, 2024 at 05:49:48PM +0100, Russell King (Oracle) wrote: > > On Sat, May 25, 2024 at 12:02:58AM +0300, Serge Semin wrote: > > > The HWFEATURE.PCSSEL flag is set if the PCS block has been synthesized > > > into the DW GMAC controller. It's always done if the controller supports > > > at least one of the SGMII, TBI, RTBI PHY interfaces. If none of these > > > interfaces support was activated during the IP-core synthesize the PCS > > > block won't be activated either and the HWFEATURE.PCSSEL flag won't be > > > set. Based on that the RGMII in-band status detection procedure > > > implemented in the driver hasn't been working for the devices with the > > > RGMII interface support and with none of the SGMII, TBI, RTBI PHY > > > interfaces available in the device. > > > > > > Fix that just by dropping the dma_cap.pcs flag check from the conditional > > > statement responsible for the In-band/PCS functionality activation. If the > > > RGMII interface is supported by the device then the in-band link status > > > detection will be also supported automatically (it's always embedded into > > > the RGMII RTL code). If the SGMII interface is supported by the device > > > then the PCS block will be supported too (it's unconditionally synthesized > > > into the controller). The later is also correct for the TBI/RTBI PHY > > > interfaces. > > > > > > Note while at it drop the netdev_dbg() calls since at the moment of the > > > stmmac_check_pcs_mode() invocation the network device isn't registered. So > > > the debug prints will be for the unknown/NULL device. > > > > > Thanks. As this is a fix, shouldn't it be submitted for the net tree as > > it seems to be fixing a bug in the driver as it stands today? > > From one point of view it could be submitted for the net tree indeed, > but on the second thought are you sure we should be doing that seeing > it will activate the RGMII-inband detection and the code with the > netif-carrier toggling behind the phylink back? Who knows what new > regressions the activated PCS-code can cause?.. If it's not a fix that is suitable without the remainder of the patch set, this should be stated in the commit description and it shouldn't have a Fixes: tag. The reason is because it wouldn't be stable kernel material without the other patches - if stable picks it up without the other patches then it could end up being applied without the other patches resulting in the situation you mention above. Shall I remove the Fixes: tag? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!