Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbdHURly convert rfc822-to-8bit (ORCPT ); Mon, 21 Aug 2017 13:41:54 -0400 Received: from mga06.intel.com ([134.134.136.31]:15205 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbdHURlw (ORCPT ); Mon, 21 Aug 2017 13:41:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,409,1498546800"; d="scan'208";a="1164798846" From: "Tantilov, Emil S" To: Ding Tianhong , "davem@davemloft.net" , "Kirsher, Jeffrey T" , "keescook@chromium.org" , "linux-kernel@vger.kernel.org" , "sparclinux@vger.kernel.org" , "intel-wired-lan@lists.osuosl.org" , "alexander.duyck@gmail.com" , "netdev@vger.kernel.org" , "linuxarm@huawei.com" Subject: RE: [PATCH v3 net 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Thread-Topic: [PATCH v3 net 2/2] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Thread-Index: AQHTF+qCD1hAg1T5GkSwpK2aClU5iaKPFHJg Date: Mon, 21 Aug 2017 17:36:29 +0000 Message-ID: <87618083B2453E4A8714035B62D67992B4095D65@FMSMSX105.amr.corp.intel.com> References: <1503037265-11144-1-git-send-email-dingtianhong@huawei.com> <1503037265-11144-3-git-send-email-dingtianhong@huawei.com> In-Reply-To: <1503037265-11144-3-git-send-email-dingtianhong@huawei.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNmRlYjNiMTItYTQwZS00NTIyLThkNmEtYzExMzhjNTk1Y2QzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IndcL2RWNG94Nkp5TkpZc2lWbHJGM2lJXC9FaWlcL1RSaDQwV3FjWjdtTE42d3M9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3508 Lines: 107 >-----Original Message----- >From: linux-kernel-owner@vger.kernel.org [mailto:linux-kernel- >owner@vger.kernel.org] On Behalf Of Ding Tianhong >Sent: Thursday, August 17, 2017 11:21 PM >To: davem@davemloft.net; Kirsher, Jeffrey T ; >keescook@chromium.org; linux-kernel@vger.kernel.org; >sparclinux@vger.kernel.org; intel-wired-lan@lists.osuosl.org; >alexander.duyck@gmail.com; netdev@vger.kernel.org; linuxarm@huawei.com >Cc: Ding Tianhong >Subject: [PATCH v3 net 2/2] net: ixgbe: Use new >PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag > >The ixgbe driver use the compile check to determine if it can >send TLPs to Root Port with the Relaxed Ordering Attribute set, >this is too inconvenient, now the new flag >PCI_DEV_FLAGS_NO_RELAXED_ORDERING >has been added to the kernel and we could check the bit4 in the PCIe >Device Control register to determine whether we should use the Relaxed >Ordering Attributes or not, so use this new way in the ixgbe driver. > >Signed-off-by: Ding Tianhong >--- > drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 22 --------------------- >- > drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 ------------------- > 2 files changed, 41 deletions(-) This change looks good to me for ixgbe. Acked-by: Emil Tantilov Thanks, Emil > >diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c >b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c >index 523f9d0..8a32eb7 100644 >--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c >+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c >@@ -175,31 +175,9 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw >*hw) > **/ > static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) > { >-#ifndef CONFIG_SPARC >- u32 regval; >- u32 i; >-#endif > s32 ret_val; > > ret_val = ixgbe_start_hw_generic(hw); >- >-#ifndef CONFIG_SPARC >- /* Disable relaxed ordering */ >- for (i = 0; ((i < hw->mac.max_tx_queues) && >- (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { >- regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL(i)); >- regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; >- IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL(i), regval); >- } >- >- for (i = 0; ((i < hw->mac.max_rx_queues) && >- (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { >- regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); >- regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | >- IXGBE_DCA_RXCTRL_HEAD_WRO_EN); >- IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); >- } >-#endif > if (ret_val) > return ret_val; > >diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c >b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c >index d4933d2..96c324f 100644 >--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c >+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c >@@ -350,25 +350,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) > } > IXGBE_WRITE_FLUSH(hw); > >-#ifndef CONFIG_SPARC >- /* Disable relaxed ordering */ >- for (i = 0; i < hw->mac.max_tx_queues; i++) { >- u32 regval; >- >- regval = IXGBE_READ_REG(hw, IXGBE_DCA_TXCTRL_82599(i)); >- regval &= ~IXGBE_DCA_TXCTRL_DESC_WRO_EN; >- IXGBE_WRITE_REG(hw, IXGBE_DCA_TXCTRL_82599(i), regval); >- } >- >- for (i = 0; i < hw->mac.max_rx_queues; i++) { >- u32 regval; >- >- regval = IXGBE_READ_REG(hw, IXGBE_DCA_RXCTRL(i)); >- regval &= ~(IXGBE_DCA_RXCTRL_DATA_WRO_EN | >- IXGBE_DCA_RXCTRL_HEAD_WRO_EN); >- IXGBE_WRITE_REG(hw, IXGBE_DCA_RXCTRL(i), regval); >- } >-#endif > return 0; > } > >-- >1.8.3.1 >