From patchwork Tue Jun 14 03:00:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12880380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC50DC433EF for ; Tue, 14 Jun 2022 03:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zlV9wLzXRonGyyW30aVdUZDhk8205TDGHUCoDsDH2mA=; b=ZsJGf8TpM8F3N8 PGYtFgRS0LT3MNHUGc3uLJMCZp2cGTiVhQrA9wlfABCNuxLRATMc5zZ6W48U8WpgsNwrCy5EpF6MG 2ilRrCFnpkGzo5beyHE+3aGMFB9se2b7+lG3chanv0VmReBDztsVGd390JsEn4kSshmVVpCHGE+4g 5phYIdFLMP1kGMGFIJoGcLS8L27Q7TKG89Zzh2N9pySeP4YfLASeHB7WvphUNPukD4SR1aEM76Tg8 hBntG7alcIRTfRkRhSlxt5rIviD/hjgQsrg9vp5nhzCl2nU2Q03zs4DO3vuD3moNTqCc5Y23OPI65 q0m91bSJo+DCg5y4MKsg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0wry-006pSd-VK; Tue, 14 Jun 2022 03:05:31 +0000 Received: from mga12.intel.com ([192.55.52.136]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0wrl-006pOT-7z for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 03:05:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655175917; x=1686711917; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YKMttFBPE2wCzfsgWycExPpf2Tu2U5inMYPLhQKTMdY=; b=NK2WoboXCiVUMFxG79ajGpbKUIekPKNECTqik90wKUz7twy4CofXJANc lvDnWq3OzdbxW/AYUwHtyxju6OVkB2R9kO3oeXh4mujmP5Gq6V8EqHE97 e7FzBDYwYc5nxoTpAUR79umaAYYmATZb5GUrtPrwe10Y24SYN6F2B8AyT A9YHR3a7qYE7QJotJFeB03NDNjCcVYgjbSBbt7vwq5wT/vxUt8U6cf9pp ENi0a9zHxC5moxwpmy/+xw40tjUl6vC+8JWVTPR4SfzSuwpGqD+3Y5GpK /8iUJC/fRw9RzNqZOP5B52K65/N3y6dFnkJCK+41wA0wPOPcUZqBQbKs2 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="258315669" X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="258315669" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jun 2022 20:05:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,298,1647327600"; d="scan'208";a="761787709" Received: from p12hl98bong5.png.intel.com ([10.158.65.178]) by orsmga005.jf.intel.com with ESMTP; 13 Jun 2022 20:05:12 -0700 From: Ong Boon Leong To: Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Vladimir Oltean , Vivien Didelot , Florian Fainelli , Maxime Coquelin , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Emilio Riva , Ong Boon Leong Subject: [PATCH net-next v4 2/5] stmmac: intel: prepare to support 1000BASE-X phy interface setting Date: Tue, 14 Jun 2022 11:00:27 +0800 Message-Id: <20220614030030.1249850-3-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614030030.1249850-1-boon.leong.ong@intel.com> References: <20220614030030.1249850-1-boon.leong.ong@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_200517_323493_1052BE9D X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Currently, intel_speed_mode_2500() redundantly fix-up phy_interface to PHY_INTERFACE_MODE_SGMII if the underlying controller is in 1000Mbps SGMII mode. The value of phy_interface has been initialized earlier. This patch removes such redundancy to prepare for setting 1000BASE-X mode for certain hardware platform configuration. Also update the intel_mgbe_common_data() to include 1000BASE-X setup. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 38fe77d1035..675dfb89b76 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -251,7 +251,6 @@ static void intel_speed_mode_2500(struct net_device *ndev, void *intel_data) priv->plat->mdio_bus_data->xpcs_an_inband = false; } else { priv->plat->max_speed = 1000; - priv->plat->phy_interface = PHY_INTERFACE_MODE_SGMII; priv->plat->mdio_bus_data->xpcs_an_inband = true; } } @@ -562,7 +561,8 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->vlan_fail_q = plat->rx_queues_to_use - 1; /* Intel mgbe SGMII interface uses pcs-xcps */ - if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII) { + if (plat->phy_interface == PHY_INTERFACE_MODE_SGMII || + plat->phy_interface == PHY_INTERFACE_MODE_1000BASEX) { plat->mdio_bus_data->has_xpcs = true; plat->mdio_bus_data->xpcs_an_inband = true; }