Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp585276rdb; Thu, 1 Feb 2024 19:01:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IE758EPFyHy7QMu9av43unVNo/aLPIJUVhwQceoZOpC1Cu8h0Dms6pKYgdgDZIifFCJkanE X-Received: by 2002:a05:6870:ac13:b0:218:d610:2285 with SMTP id kw19-20020a056870ac1300b00218d6102285mr4725537oab.14.1706842889242; Thu, 01 Feb 2024 19:01:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706842889; cv=pass; d=google.com; s=arc-20160816; b=zervacpw8/hiD9g39jMpBZtC7p8DmrS/PnsbLA/NFdczRkET+s1VbBSSeYKSP4xzqE uHJGCiLRjRHv9paDL9VNe8S5/NhGNaHlrIAWdL231wyhqGFZUaOOkBO9UwPN6L6LXAXv klL2/AN6tVcmON2rrm7ukVz10X8SbxSQuKeFHRhBXVIVPmxK+86yjyrCIdCWAlaQDMM8 jyMF+osLlkN7+22dMooU6nR1pGAsKcsuGcqrQHdjJm75CaVY/BwlnMuPHOwmlCgmtdki cc9Om6tTkGItmhvHM/XrOoAX1zSXlsvyF7iG4vhfrdYDEwKYEYRFg+v0WFWWPsNGTmA6 6fzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=0bcc2PhIecyQt3CIvs0bgC190e1GBCWsb9YhQDKtnaI=; fh=ty+H9oPw4Bs+CPfJXszcmGgo5QfJ/dmqzRoRoEKw2lQ=; b=RsTrHeqm0/Hmakxd+UZCfwIhEitiVFwmBoCjq8HSW8tctPRH1H1nhVMYhAjRBLzMJy AXzR3yUp6H/1LkKwCCPoV4a7xQjh16tZ6To5E+I1zkzsgonS4HO7vT/aLoxxZ16dFDf/ NLhVmknXAPGtY5V3hVhzyLIetuaFJ1VTlYHEuUONWocDxEHNQgNdiQjMGVU3sWZU8Duf n4BJBP8KKXz3J+GgfZ4jYWt5aUC6OMpkVR9iTLJHkNA7Hs97gCPT/q8nkO76daMCGwFA n3DwbTsH6/Tu8GhsaIRfJz0yZpY0EO1OQB+KPS+tI9DJ7OnCIzUGaheMTawDXrq/l9eK VlEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EZZiWmmc; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCWAWtyXBySXJyol8l8uTV9Y9E30AENv622cPRnsf1RljQ5vO8MBqyMuPjbWHk5SlQnsF9ytA+IKhBD2xR2a2DLLdHhDpDqtTb6QW1o+bw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b9-20020a05622a020900b0042ae92efe73si1023708qtx.502.2024.02.01.19.01.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 19:01:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49129-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=pass header.i=@intel.com header.s=Intel header.b=EZZiWmmc; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-49129-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 E473E1C23B4A for ; Fri, 2 Feb 2024 03:01:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73FBDD285; Fri, 2 Feb 2024 03:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EZZiWmmc" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (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 24E74C2CD; Fri, 2 Feb 2024 03:01:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.55.52.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706842875; cv=none; b=FkHQgC7oo5vNWBsqtZf8DhEaUWYRmvNsDwd+07X8JQ18laTDqa9PVSTfi5gRzYc3Y4xY8nTXKpJPliPhMtOekE4BGvBDjKQWu1NJc9RVCegfGI2Bf7JtPHm7k5YkHMlQ327BcrF5pcHA7d9mHHtawnCAoVvvVwcd9fEIAt1sD24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706842875; c=relaxed/simple; bh=QphI2QaFh5i8mpq3LXJuXnOJcGXvW8OtRDIwjhj/MoM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=dRpWGmIOoJnRV+FWDdiKkNv3f+pz0YjcKt/xPsLJ9NTXNPN7JFqsvZTSWhSer+tYrdLjGmg/giSxS0HwwIrAGoA+0z8RcyXGwW0iMW20VIQq510Szq7WXcXeHhGChJxNVbq9YEtirXLVshVwLLUvp4mZfUAfim+Gz9DEETdvSgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EZZiWmmc; arc=none smtp.client-ip=192.55.52.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706842873; x=1738378873; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=QphI2QaFh5i8mpq3LXJuXnOJcGXvW8OtRDIwjhj/MoM=; b=EZZiWmmcBpSq9tmUcL4yWi4pqMcGsklJrCIcNQ4aY5gzu+RaPRHW2sSK lKy8nTR+A/W8oZ3PyYrXetwL6sLD+DbPv5kOOKmMVhtoKcMmyiU8SCubr uTClcNYMFL4AuaDx+Cq6c4/B2zFT/UQavHBmuH2nlfQMlCfsxuFCSRLBF 8VojYry5uGu5a8TKckVGZgAiL5blbft9eFG7omIhdLpKja6+fAeJS1ixN swZ6sy+sDiiEZX8aOwLpMO5+RCgqm+vrqJvRJRvJauOmxYDDgpaC3nLA9 09gjNHI2h3ggZWH91XZxXGaSUguGATp2ktUuaKzU6lFrpggZzyZvnEcq9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10971"; a="401187693" X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="401187693" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 19:01:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,237,1701158400"; d="scan'208";a="257260" Received: from choongyo-mobl.gar.corp.intel.com (HELO [10.247.22.55]) ([10.247.22.55]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2024 19:01:00 -0800 Message-ID: <2ad1f55c-f361-4439-9174-6af1bb429d55@linux.intel.com> Date: Fri, 2 Feb 2024 11:00:58 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v4 06/11] net: stmmac: resetup XPCS according to the new interface mode To: "Russell King (Oracle)" 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 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> Content-Language: en-US From: Choong Yong Liang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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. 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/). Kindly let me know if there are any additional concerns or suggestions.