Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp120451imm; Thu, 26 Jul 2018 00:02:14 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfhV4pQF7ftGiTM1hX4sBynVBnUXod8duA5yFnDuG2GNStulVrB91qSmOBzw/M+hDD1SrGz X-Received: by 2002:a63:8c51:: with SMTP id q17-v6mr807855pgn.236.1532588534430; Thu, 26 Jul 2018 00:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532588534; cv=none; d=google.com; s=arc-20160816; b=EeOTs1WU99LWz22eWF6N/CyEBwjp686iQzpLp6vo9oJfuaKuoU+bfS2fcnMWlyFLc0 62+K+QCB/XwirDMtG3QQGaHpWUESjvTJcpdzPlbebmc4wFFmhvccHpk9iWrFSmDG3X6c H3Xfp3zqm0G57CZbFJ2udbBQsQce2Cpap2Hntr66vIK7gzOCOBN6VSBk3D0ZthRoEMgY sGDjoYhruAGZRIwwEniAIQ1oZjEeq4sU/Qd4Ftbo3b6UPYcL7waG5VDnKq+szYfpf2hH QSCUqQ/9eFkTpM5qqiDu1Xj3u+m5268R1m6xVNxAyqnimWfe3MEpJ1dv+9xiA6sC5nhr 8HMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=AkLRQDrDZ2AtI3KJ6AoAjq+eAmzgisZzGW/p0rdow4w=; b=hLJvyZxsKheN5hoESIpVAg4NBdDrG6yU/cTiRmmZWIPBKJjsuaff938ZfGEb9c39qo 9RDXuin0vdKLLheAE6kd+Svj5XczALFIH0M5kTBympfSmkKXIYKYmqVP6magoGrHNC2/ lIPu6Yu/o7ZpDu1rVaufZAf8G7uEvJww30A6q5GWOCz0Qj9VFI2qKhMXA/1024juIBQz LRKW8esc1SGAGysy/hOtmgrQjLMM1yYutaLNwrx/CX40wN68VoSif7dHUJko92Xe2/D4 2pXQRmjxIfEBUX+D4VHsfQ4RWZgWliUsJtlgQoSyott90G7TR1kBA+sq6bNlyLAGCiNW FWNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=n+rmyVSk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 u12-v6si645536pgh.261.2018.07.26.00.01.59; Thu, 26 Jul 2018 00:02:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=n+rmyVSk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728792AbeGZIQe (ORCPT + 99 others); Thu, 26 Jul 2018 04:16:34 -0400 Received: from m12-12.163.com ([220.181.12.12]:52709 "EHLO m12-12.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726600AbeGZIQe (ORCPT ); Thu, 26 Jul 2018 04:16:34 -0400 X-Greylist: delayed 943 seconds by postgrey-1.27 at vger.kernel.org; Thu, 26 Jul 2018 04:16:33 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=AkLRQDrDZ2AtI3KJ6A oAjq+eAmzgisZzGW/p0rdow4w=; b=n+rmyVSkdUHotdngCUmLIIhx+CL9dtgn8N Xn42JngwFWGXCGbUB2fnF2xKOWVUVhYHONkd6QSnzrWvSWVr4K8avVTlhAo1xDej Vvcbv+Sroe/kznXVXdp6Vig6QltmFVWwAmj/eMxsBmdY6kza6vaBSl6c6NNx++oI LcNiUuK1Y= Received: from centos.localdomain (unknown [1.202.237.184]) by smtp8 (Coremail) with SMTP id DMCowADXn7IAbllboSC3Kw--.39391S3; Thu, 26 Jul 2018 14:45:20 +0800 (CST) From: tli012345@163.com To: thomas.lendacky@amd.com Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, tangpengpeng Subject: [PATCH] net: fix amd-xgbe flow-control issue Date: Thu, 26 Jul 2018 14:45:16 +0800 Message-Id: <20180726064516.56740-1-tli012345@163.com> X-Mailer: git-send-email 2.14.2 X-CM-TRANSID: DMCowADXn7IAbllboSC3Kw--.39391S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7JrykJry3tFWUKFyUAF4UCFg_yoW8Jr45pF Z8WryIvF40qrs0y3WrZ3W8Cr15ta93tFWaga9rAw1rAr1ak3s8Cr4DKay8uryv9rWUJF42 krW5Aan3C3Z8trUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jsOz3UUUUU= X-Originating-IP: [1.202.237.184] X-CM-SenderInfo: xwoliiistukqqrwthudrp/1tbiKQCP7FXlnRMJSAAAs1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: tangpengpeng If we enable or disable xgbe flow-control by ethtool , it does't work.Because the parameter is not properly assigned,so we need to adjust the assignment order of the parameters. Signed-off-by: tangpengpeng --- drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c index 4b5d625de8f0..8a3a60bb2688 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c @@ -1111,14 +1111,14 @@ static void xgbe_phy_adjust_link(struct xgbe_prv_data *pdata) if (pdata->tx_pause != pdata->phy.tx_pause) { new_state = 1; - pdata->hw_if.config_tx_flow_control(pdata); pdata->tx_pause = pdata->phy.tx_pause; + pdata->hw_if.config_tx_flow_control(pdata); } if (pdata->rx_pause != pdata->phy.rx_pause) { new_state = 1; - pdata->hw_if.config_rx_flow_control(pdata); pdata->rx_pause = pdata->phy.rx_pause; + pdata->hw_if.config_rx_flow_control(pdata); } /* Speed support */ -- 2.14.2