Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp700291rdb; Fri, 2 Feb 2024 00:51:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEhVcOtZec8jCMDVSej+G6Tf91NjYWApT3bdWkNC1dKb1NLOGMayc9fh1fXQ21daYxSlH+S X-Received: by 2002:aa7:d842:0:b0:55f:c55f:f022 with SMTP id f2-20020aa7d842000000b0055fc55ff022mr2488342eds.2.1706863905996; Fri, 02 Feb 2024 00:51:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706863905; cv=pass; d=google.com; s=arc-20160816; b=pGfnRGL5u8FAr2B3eEv9HioKDCMAzJEKUEghTI6wNshChKvm86wnPRk/l1lC4ZYmnC 2gh8CRfUU8JYAmfyjHJFfRn0UmvyMf7vCp3YUsp48xRc7xKaMkQEV9SUoFmEziDugPwj GRcw+AUJtNO/6k62pFD7RzcdqVej8IpnSsLS6299CU2iJR80T3Va7pxYi1LVJKVyWwWZ RZ3v/RzeX4xro6c7Ac1t1WwmPGOa9lTjLxs8wEpNkm36K6zg9SnAf1rqDNGA3YkSrmS7 8mk2TVk3PYFybVE3GaBUFrErxGP9B3Z4ujWnMIXg06IwuhwmTWYByPFiLlXL/a8vBkRb tD9A== 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=zgcj+wX/L6IDdldqgziNCDsIyAb6c+kW8GcYNwM7sts=; fh=CQj7QYP+KiBrtyOFVvNGbQYmEtV8JE9CeVJ6D+ri42o=; b=BaD81/ya1ZCECgjhxP4QPNxydrhrOfAw7V6E4SZfYgNx8kRYkoaDlht9J0WVTlpSwV E2zX4HNfsky5u0X0VXF0fFuzsoa108EhYozcjqsEuCIFmgz0uwWw7V0oCFIEGQqrHM0p dUg+oelwS0wJ1Ofh8nKAtkdBQrCQ+Ge3Qp7asBlg4ptS6eCqmVA7B8zBnSdM5BVxo1mf wW3Ade3ZnQ7WHUb7cC50BT1WbQOZtcdb3fgm+qYlZezuqUWwrvHXbpnkAyHeVy+6yw8u p9kLdOeQHCiDA0LH8jdKhhb899G0FwVHFLlIIjfJuSSngIQiFXaj76+2q/wM2fZVYbV5 2n6g==; 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=GcEW7nTo; 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-49507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49507-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk X-Forwarded-Encrypted: i=1; AJvYcCXRrzlMapoooPGsFR6ir502LuocGUURUmlAJD7sE2b4elIH5byK3/XpfKOHa8hE+vFmv/27FXrswMKNEuhk9ct5u3VVkmOiDAQLgG68Qw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id z8-20020a05640235c800b005597f92d6b4si623523edc.325.2024.02.02.00.51.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 00:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=GcEW7nTo; 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-49507-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49507-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 61CAD1F260FF for ; Fri, 2 Feb 2024 08:51:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00C5060870; Fri, 2 Feb 2024 08:51:15 +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="GcEW7nTo" 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 E650D604C1; Fri, 2 Feb 2024 08:51:11 +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=1706863874; cv=none; b=hxOOagSH9RAwi933Wq5dQ282JH91OhMs9qyzEvKuFbx85x5w2ERBw7pyS4tvMr4nepqUNOtRwC4VxznVPZHOsy5Ql2RH/EArzjiSX0Pr48gw2UJSb0ZDuW6T3VFpj5jFSvHlbJHDC0HVRZy5XXTsEhEN1eUu3Q0JIxkDs5s0q5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706863874; c=relaxed/simple; bh=rPghlH4fKzDrgFUA2AU5udG4v87gHBMz2GHmtLMD1sY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uMnnW1XJ4FAnZkgHCCu7AmxtXch9Hww6k3kX97zrbXZnjBqJdyYPFgqI2aI4bpNEa4Juji/F3MJY5EK+kb+49oZ4chZWhYgHCGGHJT/I6oWM0VdSsWbX4QyOKEQNmfeQkvIFhBBkLIamfNTDzMmhfjm8OBVvU7gGUtXHjvCsc/Y= 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=GcEW7nTo; 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=zgcj+wX/L6IDdldqgziNCDsIyAb6c+kW8GcYNwM7sts=; b=GcEW7nToPq2txWV+ViSERXcFwc rIIQ4n6+rou3/R+i4yGctXiLFzZv29zF/60F+jjXeE+KHkkI+HTQgFIorTtxr6i5Za45zbgiGpucj p8gdiQ/Qz6wt/2SM4aIkw4zlWDE+fNPHZ2ovt3wAkQpvzQJanqF0SAHiMGwRu0K61OLmBUFMvdnzG 4NT4zFRK50O0q8jV7zYb1G+Dvhf+oOw/OamJj2xAG9XEZD52Lj7vD6df8J9yUZUZ/ULdzDWo6Nirg 26NrmJqI7PQdR8VJ1T9wQDKxln+BeKE210XOxjyZftyAu6H1aS4itKKLrMYDKPb1xVrgslxsJGmE1 J7sImYnQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49854) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rVpFx-0005e9-2k; Fri, 02 Feb 2024 08:50:41 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVpFq-0008Bx-Er; Fri, 02 Feb 2024 08:50:34 +0000 Date: Fri, 2 Feb 2024 08:50:34 +0000 From: "Russell King (Oracle)" To: Choong Yong Liang Cc: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Andrew Lunn , Heiner Kallweit , Philipp Zabel , Andrew Halaney , Simon Horman , Serge Semin , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Michael Sit Wei Hong , Lai Peter Jun Ann , Abdul Rahim Faizal Subject: Re: [PATCH net-next v4 06/11] net: stmmac: resetup XPCS according to the new interface mode Message-ID: References: <20240129130253.1400707-1-yong.liang.choong@linux.intel.com> <20240129130253.1400707-7-yong.liang.choong@linux.intel.com> <9e23671e-788c-4191-bdb4-94915ff7da5a@linux.intel.com> <2ad1f55c-f361-4439-9174-6af1bb429d55@linux.intel.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: <2ad1f55c-f361-4439-9174-6af1bb429d55@linux.intel.com> Sender: Russell King (Oracle) On Fri, Feb 02, 2024 at 11:00:58AM +0800, Choong Yong Liang wrote: > > > On 1/2/2024 4:38 pm, Russell King (Oracle) wrote: > > Note the "This must not modify any state." statement. By reinitialising > > the PCS in this method, you are violating that statement. > > > > This requirement is because this method will be called by > > phylink_validate_mac_and_pcs() at various times, potentially for each > > and every interface that stmmac supports, which will lead to you > > reinitialising the PCS, killing the link, each time we ask the MAC for > > a PCS, whether we are going to make use of it in that mode or not. > > > > You can not do this. Sorry. Hard NAK for this approach. > > > Thank you for taking the time to review, got your concerns, and I'll address > the following concerns before submitting a new patch series: > > 1. Remove allow_switch_interface and have the PHY driver fill in > phydev->possible_interfaces. Yes please. > 2. Rework on the PCS to have similar implementation with the following patch > "net: macb: use .mac_select_pcs() interface" > (https://lore.kernel.org/netdev/E1n568J-002SZX-Gr@rmk-PC.armlinux.org.uk/T/). mac_select_pcs() is about returning to phylink the PCS that the MAC needs to use for the specified interface mode, or NULL if no PCS is required, nothing more, nothing less. Plase do not copy that mac_select_pcs() implementation - changing the "ops" underneath phylink is no longer permitted. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!