From patchwork Wed Dec 30 09:16:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhu Yanjun X-Patchwork-Id: 561719 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 C22DC140BE2 for ; Wed, 30 Dec 2015 20:17:18 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754379AbbL3JRM (ORCPT ); Wed, 30 Dec 2015 04:17:12 -0500 Received: from mail5.windriver.com ([192.103.53.11]:52801 "EHLO mail5.wrs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754389AbbL3JQs (ORCPT ); Wed, 30 Dec 2015 04:16:48 -0500 Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id tBU9GeOt021054 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Wed, 30 Dec 2015 01:16:40 -0800 Received: from sustaining-2.corp.ad.wrs.com (128.224.162.248) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server id 14.3.248.2; Wed, 30 Dec 2015 01:16:39 -0800 From: To: , , , , , , , , , , , CC: , , Subject: [PATCH 3/3] ixgbe: synchronize the link_speed and link_up of a slave interface Date: Wed, 30 Dec 2015 17:16:35 +0800 Message-ID: <1451466995-19015-4-git-send-email-zyjzyj2000@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1451466995-19015-1-git-send-email-zyjzyj2000@gmail.com> References: <53C6554C-8692-4EF3-BF5D-7217D2C9FDA0@intel.com> <1451466995-19015-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 According to the suggestion from Rustad, Mark D, this behavior perhaps is more related to the copper phy. But to make fiber phy more robust, to all the interfaces as a slave interface, the link_speed and link_up is synchronized. Signed-off-by: Zhu Yanjun --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1bb6056..ce47639 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -6441,10 +6441,12 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter) * a bonding driver in 802.3ad mode. When X540 NIC acts as an * independent interface, it is not necessary to synchronize link_up * and link_speed. - * In the end, not continue if (X540 NIC && SLAVE && link_speed UNKNOWN) + * According to the suggestion from Rustad, Mark D, this behavior + * perhaps is related to the copper phy. To make fiber phy more robust, + * To all the interfaces as a slave, the link_speed is checked. + * In the end, not continue if (SLAVE && link_speed UNKNOWN) */ - if ((hw->mac.type == ixgbe_mac_X540) && - (netdev->flags & IFF_SLAVE)) + if (netdev->flags & IFF_SLAVE) if (link_speed == IXGBE_LINK_SPEED_UNKNOWN) return;