Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp261690pxy; Thu, 22 Apr 2021 01:17:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymwow1PXWhuSDdbjU+sBogb48nQ7HQjBL61ObviudMwA36vQPKqfDVvtcUWxz7Y2tJ+hmq X-Received: by 2002:a63:a0c:: with SMTP id 12mr2317376pgk.247.1619079456611; Thu, 22 Apr 2021 01:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619079456; cv=none; d=google.com; s=arc-20160816; b=InXklEobpuEZ3bcx759C2FqistyLDMfLenTQcxb8JA1eB+ynyajxIeYzEoCSLsE1p/ dmIzIbF9K+AZT+z4+6qKN+JpcUJ8Sd+qV5Mbyz2+hxy+x/4daf2WZ22k5IkUxmjQ/xxt frpQ42k5f37kzMLC82u4s5dIqikLwJ6sAgeayfPTsjz7K/XBso/Z46jyTgHGsEu4SxGt rJcQsCA/yg994BwEv3leYfqiYcoBjlzN/v+xTd/cSnhT3b7ecugwXJXbYY218ap7zCau VVH1x2CdEQHBBncnR1jL9M74NW4pn1oMYPuc91fjiaFbYHPcTY97y+KgL/nysNm+oM14 MwVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B8Q32rxESWbHGpGLlENhPxmZERQjdcYCBydL9+jMMiY=; b=ME9cFfJp0ugCZLi+B/Um53KHCHMwhzg+4J5E0xhVGZQXzB8C0sASzHYL5qNWUaDt3u sqWWknIRLO3Zp2debTwQvE0EKLxw0stTHU1ydME8hyS83b65g5DnKRvwPOHC9s+b/OQ/ h2x7uuwT19Oxzr+pIJFyAFgAy4Drd/rZFVf9p9DnW3zbT5pQuopqV0k1VS8A6L4VA8OS nwXG4Ah2fb3aC1RyjHxkhh1Sz0p3Yk5WsjyA6waiErYK+kWhDpONqOWySk3+GFRYu99/ VZHtfH6U9NS1/wRLmubUeC68HwOcRferRRXU4lDNycMKB2UdT6bWzc5LS0oi3653ohy1 Dozw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TfCp2hF3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si2627254pll.371.2021.04.22.01.17.25; Thu, 22 Apr 2021 01:17:36 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TfCp2hF3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235434AbhDVIQv (ORCPT + 99 others); Thu, 22 Apr 2021 04:16:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:48314 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235216AbhDVIQu (ORCPT ); Thu, 22 Apr 2021 04:16:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2079613DC; Thu, 22 Apr 2021 08:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1619079375; bh=poQJR1pO5d3haclh9Pnw8hwLbFU79fJkKdVKmgVjTwY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TfCp2hF3b5rwma1VIyd64845DC/YFDd9meDPC9Od2JNXxK7/mWKQ8+7OWFWouUbYP Mf1uYTrVdZYoFWPs3aHVTCQBVPhBsVsUgjdMyqD9tdahayOW6bOf0+tHZLa5VkBU82 COKWDf5mQTFazB/PcPNJNKO1aYfRJ0MGLAA8PKCMHYg/Dr2vHRtNKceozySPYPxYxt mlPrzH1vXDCCV0Da8LB8jiT3ZwORXSF9CpBWmT7TzXjXjjan4lw8Q/2/oB1J9thmra QZ96lSW6Furg8uHUVN9mjh9JZezrXig4NaPpbIPDAOt7/0Bo9ITd3uSSIIymr2BaUo S3XsGdOGHPuvQ== Date: Thu, 22 Apr 2021 11:16:11 +0300 From: Leon Romanovsky To: mohammad.athari.ismail@intel.com Cc: Jose Abreu , Andrew Lunn , Heiner Kallweit , "David S . Miller" , Jakub Kicinski , Russell King , Ong Boon Leong , Voon Weifeng , vee.khee.wong@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next] net: pcs: Enable pre-emption packet for 10/100Mbps Message-ID: References: <20210422074851.17375-1-mohammad.athari.ismail@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210422074851.17375-1-mohammad.athari.ismail@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 22, 2021 at 03:48:51PM +0800, mohammad.athari.ismail@intel.com wrote: > 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); () are useless here. Thanks > > return xpcs_write(xpcs, MDIO_MMD_VEND2, DW_VR_MII_DIG_CTRL1, ret); > } > -- > 2.17.1 >