Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp882124pxy; Thu, 22 Apr 2021 16:10:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQStp736koStV9EHQYIscFQcXlF2sY6jNC7MZxMYYjvGsbZ1KrwnLcYXGTi3AvB31Irl9O X-Received: by 2002:a05:6402:484:: with SMTP id k4mr923279edv.321.1619133026330; Thu, 22 Apr 2021 16:10:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619133026; cv=none; d=google.com; s=arc-20160816; b=RQmqs4R9gxuRQVSJroBY2e/2ZBYcSo/kgN5S7IJICMu5UT/Y0fLu35s33Bpa8EIvFJ hi8xxY5kXlvgdWuv6OqxCY5Vl6sDg/QIJgI48UudZ4XEhD2H44t5m4u1GffbqiKhYI+z HiETKXXAuQ8GWHaqv5+Ct89SFJ4efSVWLy9RnPXn7gr67AuBZh8+NiYS0fSLqXgewnG1 XPXbXag4m81rkkVGgXdq8g8ycSawCjh1EOa3MAODlCC/2EacJywpZNzm7j3rUNXABCTY /diON7iDSWI0DzUhKb3T0ILT7X+wqpNBQ9pTehzli8GSaqwQDe5c0edFhLd4YuZj0QR3 650w== 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=ruBqmQUFpir8jUJilo2vNi4eyHdBE4t2rT7ewASnvho=; b=ocHmOwMvyPKAm+nSysX9q01K6J1tlxyoH+8IeOrUPxWHTbkaYmqNWXi/NzOexHLtdD X5A8LffS8eUHlZoWI1h7rc9GAdkUKCc4q0oCfQ7KnLp6n59ba0kIVb3DoVXdqw+BIJeD 2z14xE/jMH9clQUxCiL5hCDfX8mM5bf5HNt/xdvg9yexA1dY4esjTnhXMgodXXGsgCrg 1a/+mnFbwGLcJ+VprxfcB0l+UVgV/hZcqaSb771U6bVP5/gYzGJOWztLTmPAwZc4cupB sZePqEM+dNqkW+P5WgfNo+BqeBzb8nOr8DxWjAqF9O7w0NP8aVURQyuz93DSUoSTSQOK eRNw== 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 t3si3631938edd.259.2021.04.22.16.09.57; Thu, 22 Apr 2021 16:10:26 -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 S239812AbhDVXHm (ORCPT + 99 others); Thu, 22 Apr 2021 19:07:42 -0400 Received: from mga07.intel.com ([134.134.136.100]:60916 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235977AbhDVXHm (ORCPT ); Thu, 22 Apr 2021 19:07:42 -0400 IronPort-SDR: VLDgnOw0v/bAeHDYa8/PO11uQqMGPdTcLWkGplLIEk2ftbVZfyakNxCjiGNUCgmNSR/f4w8hDs h2E4fKN4puOQ== X-IronPort-AV: E=McAfee;i="6200,9189,9962"; a="259941511" X-IronPort-AV: E=Sophos;i="5.82,244,1613462400"; d="scan'208";a="259941511" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 16:07:06 -0700 IronPort-SDR: iw6rdYTWxrrSYSa6YB+4+iC0FdoUaaTo3F0ZPS8xiL2TagiWR3ZgrCaWavKz6TjiEKv2mqdwhI G/HHPSJDKDnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,244,1613462400"; d="scan'208";a="603374991" Received: from mismail5-ilbpg0.png.intel.com ([10.88.229.82]) by orsmga005.jf.intel.com with ESMTP; 22 Apr 2021 16:07:02 -0700 From: mohammad.athari.ismail@intel.com To: Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Andrew Lunn , Heiner Kallweit , Russell King Cc: Ong Boon Leong , Voon Weifeng , Wong Vee Khee , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mohammad.athari.ismail@intel.com Subject: [PATCH v2 net-next] net: pcs: Enable pre-emption packet for 10/100Mbps Date: Fri, 23 Apr 2021 07:06:45 +0800 Message-Id: <20210422230645.23736-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 --- v2 changelog: -Removed useless (). Comment fron Leon Romanovsky. --- 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..ea33842eb0f4 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