Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp214112rdb; Wed, 14 Feb 2024 19:14:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU/S5kgbDPXDtb5LGsBjQbP2wBXgVf+EDMC7vuUS5vthl72L36ENmpm0uTDWKpvmayAL9mCPsH4iVvrnxefDYvQ3Xdcwywr9r+9Yp1RSw== X-Google-Smtp-Source: AGHT+IFcfzeYdBe7xa8I5Jfu8FRu4rUJ6OTX3/q9aoUfKKGq9xAS2BYcAtVVGMbmgSb7c2U9gJSm X-Received: by 2002:aa7:d812:0:b0:560:7e85:2ce with SMTP id v18-20020aa7d812000000b005607e8502cemr309179edq.15.1707966894974; Wed, 14 Feb 2024 19:14:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707966894; cv=pass; d=google.com; s=arc-20160816; b=N02EQkCpZ2ZFC0PwHsegzEWyG0XxE8+bTeDVDn5BRm9qWkz0VnZqfKv7w24PrUs7Xf BMKg+HCLuismDGJK2YdGSXLfmGyG4Ol00XLyrS9vlGKFxDPtaZA65PP+8apSmbUWq0zA ZwK6z4UFp8JXNjbiTtcj4MZgYiin7noMuyWk+rGFkPpFphRcEabiZF058nO+AWg6VZD3 8E0f1IvJMqtAaXN0nvXmDFalV75jl1569NZv2nEdUVrcsgM1mKFTU3oT9YhGN2QKFrQl CG28YFmU4caJwmTHsqjsNisg1qhx2N6bE56AX4zyfHWc4Z9+ttBLZ76ZsptxhQahRPc6 NPmg== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Cx55wjfFCMYLxXG+A1B/+o5318zxNpFzS0n10VxOgPA=; fh=jYNfKFt42DTlgIlhsis3yPquHH4abvgz4H069owj4Fg=; b=O/zK5FU4dGZ/pIZyhp0PwWm0prbFeu2dBXUyA7QOvT/1p0BaGe27gkytJdcb0poSIZ r1brcYDrukGxfsNVQP7hGDTVjAjJz401lZnHDGBnnQdV+xV9SM5WBA70Xd+GJssTTCsq qxhGPLOmy78/d5JrC2IWBMtscRyT/K5dsjdpG7Q8pTupl2ADKBzy6m22qOaPo1dW0bru Z/h/FB5++iDT+T1Mf08/gwECU/37z5vEvQ/tGTxjmgKZBt6yx2EHeUo77X8AK+XpnEDn 4s+c3tu9K04iR8qIZ6DUaKXi3qopc+6pSLtllsJe0wAqn5ohHm23iaWemmtPDF8lG7QM CQPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="KY0/JGk1"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66261-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s23-20020a056402037700b00561b9f3d9b7si210425edw.138.2024.02.14.19.14.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 19:14:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="KY0/JGk1"; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-66261-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66261-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 am.mirrors.kernel.org (Postfix) with ESMTPS id AA2CE1F2D07F for ; Thu, 15 Feb 2024 03:14:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55D0B79DF; Thu, 15 Feb 2024 03:14:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KY0/JGk1" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 E74382CA4; Thu, 15 Feb 2024 03:14:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707966882; cv=none; b=exu1j13ilB1YnPGUt0oidr1e0xvf0k26VolTXn4uqyOAjLASHwCE4QcYwnFP9wbqjAWM1bWxMoOMQ+LEbAGpogd6W6eFl+I+q4d9XPjZIZX0XjFjGfMxNTHYpOwL2oNB/29M2GeA8dqsGmtA7HJ/24d10ZTlpRA2rAgaHsWdCCk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707966882; c=relaxed/simple; bh=sLEedRMDncb0IeCD2q4hOTg4DPcXH151vX4zjRS2Q+o=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ri3dVHASaTZaWYaSxfLeEiSUd7jjFEk5qbsvihorazbnYVk6hdMxRGwiqCQ0fecLM0mAz363EBPnbxf8BLqqpdKU/KPP3UU96ujRhmus0UdQYol9pXV56tIC13BSq2JYrCIEIAi4xFLDUOgRunHg1orQExqR0+/QoLouQYFM03w= 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=KY0/JGk1; arc=none smtp.client-ip=198.175.65.20 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=1707966881; x=1739502881; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=sLEedRMDncb0IeCD2q4hOTg4DPcXH151vX4zjRS2Q+o=; b=KY0/JGk16X+h8dtAIdWOH1qBQGZJnCVCGUvBpuI437YRwbVfCXscWzsu +BzYAXGMqBfmBZ+XswbI5/ANgh4vedbO66SQSfI9cOLqfCBhVJVcHBolL /UukKxpuyxJQNZCnZ4zuUbecWUeqvomfi1TTE9UXNW7BEoS2qXB2X9uu6 HuQR9AYZwUx6ksBhoMeXyl2OwvraKtFCFdPgjMCOk72CJHUJ1QLVS5rj7 bA4cTEojp91GXwy/tjcqlEsC5gOFdNuommmduY4Y2LppSYfvzEUXuke8+ +NIKfeYObQ2ymexRswtevifj5b3OfZiOtaFXe+c/2s21FCFrpjt7BLjWx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="1914711" X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="1914711" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 19:14:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="8056455" Received: from choongyo-mobl.gar.corp.intel.com (HELO [10.247.84.237]) ([10.247.84.237]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 19:14:30 -0800 Message-ID: <9154ea9e-863b-49b3-8729-1ba077872bcc@linux.intel.com> Date: Thu, 15 Feb 2024 11:14:27 +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 Content-Language: en-US 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 , 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> <2ad1f55c-f361-4439-9174-6af1bb429d55@linux.intel.com> From: Choong Yong Liang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/2/2024 4:50 pm, Russell King (Oracle) wrote: >> 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. > Hi Russell, I regret to inform you that I didn't implement everything exactly as proposed in the new patch series. My intention was to simplify the series, focusing solely on managing SGMII and 2500BASE-X interface mode switching. The recommendation to have the PHY driver fill in "phydev->possible_interfaces" will be addressed in a separate patch submission. I hope this is acceptable. In the new patch series, I removed "allow_switch_interface" patches. The current solution continues to work with PHYs that are C45 and follow the legacy path, such as Marvell Alaska 88E2110. For the upcoming patch series, I will implement "phydev->possible_interfaces" for C22 and C45 PHYs. >> 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. > Upon further examination, I discovered that no change is required for the "mac_select_pcs()" function; we can still use the same PCS. According to the XPCS datasheet, a soft reset is necessary to re-initiate Clause 37 auto-negotiation when switching to SGMII interface mode. This is the only setting required for properly configuring the SGMII interface mode, and nothing extra is needed for 2500BASE-X configuration. In the new patch series, I removed "mac_select_pcs()" related patches and added a "xpcs_soft_reset()" patch for the XPCS.