From patchwork Mon Feb 1 07:27:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 576360 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EAD7B14056B for ; Mon, 1 Feb 2016 18:26:15 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750866AbcBAH0K (ORCPT ); Mon, 1 Feb 2016 02:26:10 -0500 Received: from mail1.windriver.com ([147.11.146.13]:52175 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbcBAH0G (ORCPT ); Mon, 1 Feb 2016 02:26:06 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id u117PvAO004599 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Sun, 31 Jan 2016 23:25:57 -0800 (PST) Received: from sustaining-1.corp.ad.wrs.com (128.224.162.225) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.248.2; Sun, 31 Jan 2016 23:25:56 -0800 From: To: , , , , , , Subject: [PATCH 1/1] ixgbe: get link speed as a slave nic unrelated with link up Date: Mon, 1 Feb 2016 15:27:55 +0800 Message-ID: <1454311675-24676-2-git-send-email-zyjzyj2000@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1454311675-24676-1-git-send-email-zyjzyj2000@gmail.com> References: <1452258030-63996-5-git-send-email-jeffrey.t.kirsher@intel.com> <1454311675-24676-1-git-send-email-zyjzyj2000@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Zhu Yanjun The commit 0e4d422f5f72 ("ixgbe: do not call check_link for ethtool in ixgbe_get_settings()") decreases the bonding failures. But the following time slice still results in a bonding failure. bonding ixgbe | | | carrier_on | | | <----------------| link_up | | | | carrier_off | | get_link_speed ------->| | | As such, the nic link speed can unconditionally be gotten as a slave nic whether the link is up or not. Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index bea96b3..53edf39 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -311,7 +311,7 @@ static int ixgbe_get_settings(struct net_device *netdev, break; } - if (netif_carrier_ok(netdev)) { + if (netif_carrier_ok(netdev) || (netdev->flags & IFF_SLAVE)) { switch (adapter->link_speed) { case IXGBE_LINK_SPEED_10GB_FULL: ethtool_cmd_speed_set(ecmd, SPEED_10000);