From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DD65E37B8 for ; Sun, 4 Dec 2016 07:35:54 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 03 Dec 2016 22:35:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,740,1477983600"; d="scan'208";a="908483965" Received: from dpdk4.bj.intel.com ([172.16.182.178]) by orsmga003.jf.intel.com with ESMTP; 03 Dec 2016 22:35:53 -0800 From: Wei Dai To: helin.zhang@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Wei Dai Date: Sun, 4 Dec 2016 14:31:34 +0800 Message-Id: <1480833100-48545-23-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480833100-48545-1-git-send-email-wei.dai@intel.com> References: <1480833100-48545-1-git-send-email-wei.dai@intel.com> Subject: [dpdk-dev] [PATCH 23/29] net/ixgbe/base: update FW PHY flow control X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 06:35:55 -0000 This patch removes the flow control conversion from rx and tx to pause and asymmetric pause, as that is handled by the call to ixgbe_negotiate_fc. Performing the conversion prior to calling ixgbe_negotiate_fc results in an incorrect fc mode if RX only pause is selected when the link partner is advertising TX. Signed-off-by: Wei Dai --- drivers/net/ixgbe/base/ixgbe_x550.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index f1f1fbe..49b59e7 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -4199,7 +4199,6 @@ void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw) u32 info[FW_PHY_ACT_DATA_COUNT] = { 0 }; ixgbe_link_speed speed; bool link_up; - u32 fc; /* AN should have completed when the cable was plugged in. * Look for reasons to bail out. Bail out if: @@ -4227,21 +4226,8 @@ void ixgbe_fc_autoneg_sgmii_x550em_a(struct ixgbe_hw *hw) goto out; } - /* Get the advertized flow control and modify it to indicate - * pause and asymmetric pause instead of rx and tx - */ - fc = info[0]; - if (fc & FW_PHY_ACT_GET_LINK_INFO_FC_RX) - fc ^= FW_PHY_ACT_GET_LINK_INFO_FC_TX; - - /* Modify link partner's flow control to indicate pause and - * asymmetric pause instead of rx and tx - */ - if (fc & FW_PHY_ACT_GET_LINK_INFO_LP_FC_RX) - fc ^= FW_PHY_ACT_GET_LINK_INFO_LP_FC_TX; - /* Negotiate the flow control */ - status = ixgbe_negotiate_fc(hw, fc, fc, + status = ixgbe_negotiate_fc(hw, info[0], info[0], FW_PHY_ACT_GET_LINK_INFO_FC_RX, FW_PHY_ACT_GET_LINK_INFO_FC_TX, FW_PHY_ACT_GET_LINK_INFO_LP_FC_RX, -- 2.7.4