Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp246117pxy; Thu, 22 Apr 2021 00:50:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIBqPMkRndRI2/2aqMJSyIDjGSd18YKOyihkgowAsXrjxaEpXjFPWXbSKQPIcfSkJK6jg7 X-Received: by 2002:a63:f303:: with SMTP id l3mr2290357pgh.263.1619077810639; Thu, 22 Apr 2021 00:50:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619077810; cv=none; d=google.com; s=arc-20160816; b=HNoj4SymNnx8cNyCEJQ+GHCX+MIYrCO6cU4OXblxwi68mBMjC8hBsrf8akYauKLJrO /o2I01w3n73z9rhqlx3fP7CW8tBJSleADxf2uZueVNxzqXNanFsQ2YgeAYlOl97UMCck NXK52LJwgqOmoM6rBQWYGyQNy99ZSK/6NNxG/nngVTZmBwk9ga5dUWyqh3CUjzY7kl/i Eij3OWzp2BZNCEijjoCvMYweZjP17HcPZZOt0XR3gA19WUS5nSkVkGif2bxeSRKw2Ya4 gKfJrnGCJf6LZxOXw10PUdlTnxNokUEGNiWapenLHBtsu5ccQ/VPyDCEIhGQG19b8War LrIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=tDe6hrjBvdtF3YW6G+bXpUst/cuqVqHlFJz8uK47wLk=; b=x4rko8CpFSuWXhJCsKeKqMCDS1rDaOqV42Eh+F8ot1U/6UiSthFdJ656PA0jI9wrKX BQ0kUrK6hg6/3j34UgIoo04/0BUf5IjkzyvZCsCSplkdt1omReRBRvF7UYmA9Vb50zN5 c1iMESzOA9RBGFxRIytR7K21LUCElwmZV9RFl6N3Lyszzod+xaVq7UyjYr7938jKJueH +g4EjHi7Ab+CuRIjtwdIIhDFVb03iPaOVUUVWkXBEaM0RbJeDMnCn/UxxS74dD/zWok8 Qazr0hzkmCUHV7ngpPuO95LMl1HXPMPyXGYNpCOqTZB0WKwcg/vEfpjFkyod0IJUKSZl cm9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fh23si2121163pjb.91.2021.04.22.00.49.58; Thu, 22 Apr 2021 00:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235160AbhDVHt4 (ORCPT + 99 others); Thu, 22 Apr 2021 03:49:56 -0400 Received: from mga09.intel.com ([134.134.136.24]:8025 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230285AbhDVHty (ORCPT ); Thu, 22 Apr 2021 03:49:54 -0400 IronPort-SDR: Pa91toOnpxRajShzMOiOSMvAs87/gN7aSRUJabAbiByFiuPq3lYdZQbqL66h3mUk8/KoDDS3q7 OB4C4ewb4odA== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="195956137" X-IronPort-AV: E=Sophos;i="5.82,241,1613462400"; d="scan'208";a="195956137" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 00:49:19 -0700 IronPort-SDR: CtZAtxYrpalam1QJw4BNM4q/i6wfpcPi/+QQm6biF6EyaTTNjdkCQrc2K3CsPsbwUzsIjTRVRz uYF6Ej2hqzfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="427830736" Received: from mismail5-ilbpg0.png.intel.com ([10.88.229.82]) by orsmga008.jf.intel.com with ESMTP; 22 Apr 2021 00:49:07 -0700 From: mohammad.athari.ismail@intel.com To: Jose Abreu , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , Russell King Cc: Ong Boon Leong , Voon Weifeng , vee.khee.wong@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mohammad.athari.ismail@intel.com Subject: [PATCH net-next] net: pcs: Enable pre-emption packet for 10/100Mbps Date: Thu, 22 Apr 2021 15:48:51 +0800 Message-Id: <20210422074851.17375-1-mohammad.athari.ismail@intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mohammad Athari Bin Ismail Set VR_MII_DIG_CTRL1 bit-6(PRE_EMP) to enable pre-emption packet for 10/100Mbps by default. This setting doesn`t impact pre-emption capability for other speeds. Signed-off-by: Mohammad Athari Bin Ismail --- drivers/net/pcs/pcs-xpcs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 944ba105cac1..2dbc1d46821e 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -66,6 +66,7 @@ /* VR_MII_DIG_CTRL1 */ #define DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW BIT(9) +#define DW_VR_MII_DIG_CTRL1_PRE_EMP BIT(6) /* VR_MII_AN_CTRL */ #define DW_VR_MII_AN_CTRL_TX_CONFIG_SHIFT 3 @@ -666,6 +667,10 @@ static int xpcs_config_aneg_c37_sgmii(struct mdio_xpcs_args *xpcs) * PHY about the link state change after C28 AN is completed * between PHY and Link Partner. There is also no need to * trigger AN restart for MAC-side SGMII. + * + * For pre-emption, the setting is :- + * 1) VR_MII_DIG_CTRL1 Bit(6) [PRE_EMP] = 1b (Enable pre-emption packet + * for 10/100Mbps) */ ret = xpcs_read(xpcs, MDIO_MMD_VEND2, DW_VR_MII_AN_CTRL); if (ret < 0) @@ -686,7 +691,7 @@ static int xpcs_config_aneg_c37_sgmii(struct mdio_xpcs_args *xpcs) if (ret < 0) return ret; - ret |= DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW; + ret |= (DW_VR_MII_DIG_CTRL1_MAC_AUTO_SW | DW_VR_MII_DIG_CTRL1_PRE_EMP); return xpcs_write(xpcs, MDIO_MMD_VEND2, DW_VR_MII_DIG_CTRL1, ret); } -- 2.17.1