Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp267102iog; Wed, 15 Jun 2022 01:46:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/39vIKGBDtWN7MZ+8JcuAfimIjZYHxF/D5+HJMo2MPyBFSxZEho9sBj/4Ga8SKCN9mGZe X-Received: by 2002:a05:6402:684:b0:431:503e:76e6 with SMTP id f4-20020a056402068400b00431503e76e6mr11074196edy.308.1655282770538; Wed, 15 Jun 2022 01:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655282770; cv=none; d=google.com; s=arc-20160816; b=MdRaX0oCb6oZgTVBNA8+9Sgr5mBFNjNXHrvcSTshReyciCG09I0AJ1BFtyAwmcnuWV bGOsb7qGU1YogsGoFtEAu+hUjNktQFmunUHlVfSEa8lF9JKdIDhxJPne94cpdJfd3+JZ db7o3sfPFOELl/roBhNdMJS+6615EClXaHowVB0bWf27qouE/YJdTXpqVKQj7DpQiFIl UVaq4QUgkmX1PX3etKItfjlgyYn/yGs55vLlEfN9kIOwd1rxmOs0ByvJiJXYODhbhnlO i2ZmWBEpNPy60AT2UCEyYUJA81Tb1K9wqY7x7ripmALa/OvUTvCIdvUhoPGOWVO/7xL1 ji7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JKS0SaeOy33bwygHvkzE8V1fQ4mtLIEiEXUfkSy5poc=; b=cgZ2EI6n04MClBgBQWGbzBz0KOpyJSRkMqU15wZb1UseXJb8Zca02PLrwxbRoiaK1y YavKTR+QSqhfce95xCJHBbv5IglIZhLNbcabuA+TxCIf9WbygU8DQ/cvx+PU04eaWdCm zlmkFaRl3Hsv6xH6+O5OTH7havsRlLUaF7wMTwkBEbtNGInGj6P6hKZhJCnfaDH8ErTm MJpeeExlnV4y7BD8EUydJfnAEGaypSn6s2Hj6Fdn62ZbMgk+mPzMaBQf74Rgq37TWt1i hBZtIHV31h7Sk1h3NiryEPrwKxx9y5dqUtMPZ4doF30DF/HGEhGQ0IBDlelUqSMnynSk b2rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AUkDJa67; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n13-20020a05640205cd00b0042d930aa536si14974098edx.429.2022.06.15.01.45.41; Wed, 15 Jun 2022 01:46:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AUkDJa67; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343876AbiFOIo1 (ORCPT + 99 others); Wed, 15 Jun 2022 04:44:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235631AbiFOIoE (ORCPT ); Wed, 15 Jun 2022 04:44:04 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D02B42492; Wed, 15 Jun 2022 01:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655282643; x=1686818643; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YKMttFBPE2wCzfsgWycExPpf2Tu2U5inMYPLhQKTMdY=; b=AUkDJa67BzUh+TyI0B4bkMLYvCEwlJhplLi2f/dzQbVFlFEsLlEsaYTu 1NcT4IOqoxVp0S636VS88R8RbBhRhYSM4bNEsKDxvLjfZLAEt89g0H9DB dRdSMEYf7bEeCbGbH6lqr/TW7Es7I6CkWfQBtwfKjP8Az5R2oVvMRYXmZ 6/KbCg+dcr9e0CiyaZjd9izOzNC8X46n4ck5mvTp/3RxpIiQetagdPUDi ieOzRWM1XQ+tFQ/QgCtNQS/WaRzgHk9JKoLWt3DSW++Dxfdm2TIqv2WCH 85TBwggmdw3Ap65jfEc52HDhT1yWfDTZt/BFfInbfNdZXWTG7RuRTMdOg g==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="277676345" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="277676345" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 01:44:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="712849391" Received: from p12hl98bong5.png.intel.com ([10.158.65.178]) by orsmga004.jf.intel.com with ESMTP; 15 Jun 2022 01:43:58 -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 v5 2/5] stmmac: intel: prepare to support 1000BASE-X phy interface setting Date: Wed, 15 Jun 2022 16:39:05 +0800 Message-Id: <20220615083908.1651975-3-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220615083908.1651975-1-boon.leong.ong@intel.com> References: <20220615083908.1651975-1-boon.leong.ong@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; } -- 2.25.1