Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp29126rdb; Thu, 1 Feb 2024 00:38:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQXDPGSPgLj63HIQL99NdZ4ikR5/+lQnfi+wcRhZqxC1mE4YH3dr5nHjE/RK0S3C89YdTW X-Received: by 2002:a05:6a00:13aa:b0:6de:1b5a:82dc with SMTP id t42-20020a056a0013aa00b006de1b5a82dcmr4746344pfg.6.1706776733086; Thu, 01 Feb 2024 00:38:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706776733; cv=pass; d=google.com; s=arc-20160816; b=cd1V17BCkLnYOt4naR3euygR8vSahZ0x27S3cEFkrNDz7bRLgqJ2e/gT5SRu8EClFT K9QkmxCDfihHqo/8Q4jmpHNiL8KvR52x/gV2BFf7NStJuhd81tJAOHb1NsTyc0sE1AtU vlhfTaKPCMt5JA3BOxkZX4XFToOy5vvUlodHR3/6OFJav1+LXaZhT2EmdK1zxEFJE3ni oydGEZ7IdlWhtGzerkzLb02yVE+VX7TfjYtRCPwuDG3xM/GCKv/MUTymUtYQfy68GhVm ybgf36IldAd9jKPJdbo5mdaLz7u5yo5K/Wa/yOHZ+MyIBOc1gEQ7GH53pJffd8Fw4l6w bUMg== 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=rrEM/L5CNb2Siaw0EtzA1uq6MEwvjM+ooAg4sDv+6Ys=; fh=qxLXUUmdUFbwEW8iHoeTNk9bjbMxJoroZzw5pSeSpdY=; b=yT7H3iEzyoLa4cvne/zrikd4yljc/bDnX5ZtgNoFFkky13iFHq+7IIlvbv7PFFykAl nJQA9MatcZvX9UQdzTbBepSN2tx/NO2PqARqaCvLNnG+SYLPx1QOPqS4x2AAxsZjVdCf NuhhrjohIc16keNky8NIk8cp5Fs0epFtDWxMKACdLisKAY/cLsDMaMZ/lMv5O+Kz7y50 5/dUSyQGT5noDA/uCNNXuJIJFPGn3W2loarsldH8cE1fJN+CfGYvJQkpddWdV6Vn8SVs YgqVYRRWM9ZLjQ2Bi5fC4aNatE6BCJm4NqBYCD1gdJXrLMghbHTMwB54sGobZCn8O4vb l6Vg==; 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=vUOaJTXw; 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-47786-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47786-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; AJvYcCX9UiBQWne4vSmqA6f4d/L2ywDspZ5cPoulacvleuaeIkxs90Kp47vOQQazBlwPNiVzl8niFjXmCeJlnhFpf5dmSPPO+F0F8GD/IQNVMA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g10-20020a056a0023ca00b006dfede3aaecsi275526pfc.271.2024.02.01.00.38.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 00:38:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47786-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=vUOaJTXw; 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-47786-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47786-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B2AD5294DC0 for ; Thu, 1 Feb 2024 08:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81EB315AAAA; Thu, 1 Feb 2024 08:38:40 +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="vUOaJTXw" 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 E05B7158D8B; Thu, 1 Feb 2024 08:38:37 +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=1706776719; cv=none; b=jtzKHNT5wO4yn/JZMOLmm55CHhqq3VcS4ljdlKtrWLDrzuryPnzVkEDnPTZ1WyOCX6hZhOvdbHqe8VdxZNOU8pHUvlVseg8S7dcjiysTy7vPbapXKyUnEC2uuXk2arMw3lBQTZ4lyWw8L+Ah8gNYM2VdGtRi//dcatd/CPVjHsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706776719; c=relaxed/simple; bh=vKbbomgjgBcY5l3J5iDAD1fwuBRayq3H73ZqACqcsOA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JHj1RG1clOWttvAAglkQk8jOB+DJjM3G2LEXJKVrcR6ry8L8eGmL9Q5bLzmIVnCewbjmz0rKt4pUBbSLvsc9Bk+zPnBtHCXEEN9lNppLse9fil4tcmEAKqQnPY3+osfWGOd0PXLZpD21KdP78RCIrY1NAXtSF9XFnjAIwiCdBS0= 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=vUOaJTXw; 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=rrEM/L5CNb2Siaw0EtzA1uq6MEwvjM+ooAg4sDv+6Ys=; b=vUOaJTXwWrDwPbjOYcQMYs5ISg vTGHLnDbiExdxCQU4+KTNPIU0vo8RUyQ92hzTz7icFpYBaS+dkVlGJPjkk0EWKQ3HSrTFCJB++nR2 7Aqg2M5Ejz5EUOn9yVorOeWvzHkLg8tTSHtgvny4nV3L4Zu1aEsQsALg3kraGBvpB07iF0i2h9Ho2 BjBcJ9Nr6VKJvSqEu4SvgsXcX67dpfHtE1vY56zz+LBPek48+qvQ38c/NqAo26nxZczitbF9m84Tv I9o63J9fpzCon81R3y7mgJvCKpSoiJ9Pqv+yR74mPmdZjG2ujzxls78qpTyAvI1sYV7rCA2INc7Tk 9YtOja1g==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35708) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rVSaG-0004IS-19; Thu, 01 Feb 2024 08:38:08 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rVSa9-0007FA-KA; Thu, 01 Feb 2024 08:38:01 +0000 Date: Thu, 1 Feb 2024 08:38:01 +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> 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: <9e23671e-788c-4191-bdb4-94915ff7da5a@linux.intel.com> Sender: Russell King (Oracle) On Thu, Feb 01, 2024 at 01:10:05PM +0800, Choong Yong Liang wrote: > > > On 30/1/2024 6:21 pm, Russell King (Oracle) wrote: > > NAK. Absolutely not. You haven't read the phylink documentation, nor > > understood how phylink works. > > > > Since you haven't read the phylink documentation, I'm not going to > > waste any more time reviewing this series since you haven't done your > > side of the bargin here. > > > Hi Russell, > > Sorry that previously I only studied the phylink based on the `phylink.h` > itself. From phylink.h: /** * mac_select_pcs: Select a PCS for the interface mode. * @config: a pointer to a &struct phylink_config. * @interface: PHY interface mode for PCS * * Return the &struct phylink_pcs for the specified interface mode, or * NULL if none is required, or an error pointer on error. * * This must not modify any state. It is used to query which PCS should * be used. Phylink will use this during validation to ensure that the * configuration is valid, and when setting a configuration to internally * set the PCS that will be used. */ 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. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!