From patchwork Mon Oct 9 15:12:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Kirsher X-Patchwork-Id: 115260 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp2666796qgn; Mon, 9 Oct 2017 08:13:26 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAscbhE/fDS2B7TdRHQAILblX0W5zac4HJk+lnsmEdKdD/N+Nv99ucNT+cbsisVioZoaeuq X-Received: by 10.98.36.23 with SMTP id r23mr8884132pfj.256.1507562006053; Mon, 09 Oct 2017 08:13:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507562006; cv=none; d=google.com; s=arc-20160816; b=Y1kw3EhW+/VSDtE64w9JHfrI5jIf0xZPna2YXmPVeCW6PX4NdW2M+0wcQD+M7TYYlu yw119Y1CnRastjXeaQ3SOGU2AczjDbhnwDctd8NsSc+GrnyKsIzzepUQPfSrQGI5nU5H kLCaxq/IobTSnzL6A+ppGs1/mTMvhDfu+3Kju1VwNN89afck6U/2F6ftIeU67dCRtsHJ Tg5ozQDlq3xWXSluAPIhKTqe3AevUWzrudIaWBtXBvyhoNn4PhmMhujg4nDuqba1LmH0 LgmxAVsyqczKDeEBO0C75ulF07LuUvAst33qRVsYrtYTqHbA02EnLsVBdRB2kC4v9uhh /ejQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=gWGzWBfmxi/eUqhrlzBz5+VdqIJm5kAphkYDru/9zhA=; b=yxli3FmCdZ78xRElZ9Ht21OPC3LUR5aLJ92eOkuc2QHiFYspIBpR1GmV49M7wQL67A i50f2JexsB7QhyQPUY+4FtFEBvziLJxOHiAvTs8FHwRt1wNSR+mCri+Zg3BU40pmR1TI IvfvNBFcNfPQnBAwGEvNuFdXGQ9ytvjEVb2uv0QYW6X8pl86SwQpr1T4OItEE5NhCtor 6YHUPzHSVkALpq+S3H5c6LAag3muStuOQOYn/Xezy9XUXyzyAepd3WSb52cNsucxmOPM roQaoOr1EQ7iOJRTRMlM0sgjcCp8qrefCWTbfhXgjHblFP26g2QJE48oQmrMLGUyjbzo otPg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o82si1301941pfj.249.2017.10.09.08.13.25; Mon, 09 Oct 2017 08:13:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754434AbdJIPNY (ORCPT + 8 others); Mon, 9 Oct 2017 11:13:24 -0400 Received: from mga05.intel.com ([192.55.52.43]:14347 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbdJIPNP (ORCPT ); Mon, 9 Oct 2017 11:13:15 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP; 09 Oct 2017 08:13:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,500,1500966000"; d="scan'208";a="144436623" Received: from jtkirshe-desk.jf.intel.com (HELO jtkirshe-DESK.amr.corp.intel.com.com) ([134.134.177.54]) by orsmga002.jf.intel.com with ESMTP; 09 Oct 2017 08:13:13 -0700 From: Jeff Kirsher To: davem@davemloft.net Cc: Ding Tianhong , netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com, Jeff Kirsher Subject: [net 4/5] net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag Date: Mon, 9 Oct 2017 08:12:50 -0700 Message-Id: <20171009151251.53939-5-jeffrey.t.kirsher@intel.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171009151251.53939-1-jeffrey.t.kirsher@intel.com> References: <20171009151251.53939-1-jeffrey.t.kirsher@intel.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Ding Tianhong 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 Acked-by: Emil Tantilov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 22 ---------------------- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 ------------------- 2 files changed, 41 deletions(-) -- 2.14.2 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c index 523f9d05a810..8a32eb7d47b9 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 e8c1788aed1f..6e6ab6f6875e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -366,25 +366,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; }