Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1821503imm; Mon, 3 Sep 2018 10:18:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZFcfihd8HdZ7+mCyB7Dl6ruXPex+Lh3rqmCQkXU08uLCYRmNCGnTGxAl0CQSFi9LBn3Ggu X-Received: by 2002:a63:2043:: with SMTP id r3-v6mr27252839pgm.105.1535995087166; Mon, 03 Sep 2018 10:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995087; cv=none; d=google.com; s=arc-20160816; b=NMdtYQ25rqAowTiWY8JTr2IOlIjisPgPVOcasa1h3W/MA1pfAEzAIBPq3L5YUdQhYm RDQHudSEQrgE5aBmUvFMNBl1BknonrPxJ4yJcb8rmb9Jryq6aPzdBrZDAUrkeuJYIBSt 9dt5UHDgWj2w2CtAqN/H+IoeJUEQKIcyapcNKZ7aogD36x3jfaqe1hYXnl7cROUZdMaH UafZQOUDcXe/2j1wPYCx30V7vuUqOlPSzfukvMOh5Eww6ODOqskP94ZfOWK+jr8baNZb HFtUz8RpgKCGvoNk46PW1Ps85uJQQ1WBmPnFrhfSEBRLg3nDDNUbKE+KZSnSSxqTxbWX wloA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=eUUmJOYqvbaJkar97sFl0ffhSXDlkH4Z+b4pRsJP66Q=; b=VMYIshVu6ImP/WmLQLe5fBuAGvNRERC7LkqPstlyzu1S0II3Y+Pyleh7hAomUVSZIf PuKI7uwhrA6q4j+tT68nGaBoMxf5gJDFj838Dr+1wBkBoTpnJ/VpjvyNaL6weg2z0Ik8 svIBJx9ACRbixeq/rGpSlNfMyFx5uOVQXHeFzyC2F6WOV+rSF9NYOyykXnQSMjyqtX4M KgyV6yT2GBdl2yOIM48rZMNgMHqJ+9EnAK4T95W6WKgI0S1Y1RBzV8xe9QQIibJznjmK 01gIP2l8ClR9Wkj/VeYWF3OoPAE+MxUL3QR525xOZulz54VsaGMQJ0jAsiDWpyZsO1qn 4urw== ARC-Authentication-Results: i=1; mx.google.com; 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 k1-v6si17643369pgj.522.2018.09.03.10.17.52; Mon, 03 Sep 2018 10:18:07 -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; 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 S1730048AbeICVhy (ORCPT + 99 others); Mon, 3 Sep 2018 17:37:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42648 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728405AbeICVhx (ORCPT ); Mon, 3 Sep 2018 17:37:53 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C5BDAD02; Mon, 3 Sep 2018 17:16:48 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudarsana Reddy Kalluru , Ariel Elior , Michal Kalderon , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 034/165] qed: Fix link flap issue due to mismatching EEE capabilities. Date: Mon, 3 Sep 2018 18:55:20 +0200 Message-Id: <20180903165656.805713360@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sudarsana Reddy Kalluru [ Upstream commit 4ad95a93a702ec4f4fb5159b822797ba67b8cbbe ] Apparently, MFW publishes EEE capabilities even for Fiber-boards that don't support them, and later since qed internally sets adv_caps it would cause link-flap avoidance (LFA) to fail when driver would initiate the link. This in turn delays the link, causing traffic to fail. Driver has been modified to not to ask MFW for any EEE config if EEE isn't to be enabled. Fixes: 645874e5 ("qed: Add support for Energy efficient ethernet.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c @@ -1279,9 +1279,15 @@ int qed_mcp_set_link(struct qed_hwfn *p_ phy_cfg.pause |= (params->pause.forced_tx) ? ETH_PAUSE_TX : 0; phy_cfg.adv_speed = params->speed.advertised_speeds; phy_cfg.loopback_mode = params->loopback_mode; - if (p_hwfn->mcp_info->capabilities & FW_MB_PARAM_FEATURE_SUPPORT_EEE) { - if (params->eee.enable) - phy_cfg.eee_cfg |= EEE_CFG_EEE_ENABLED; + + /* There are MFWs that share this capability regardless of whether + * this is feasible or not. And given that at the very least adv_caps + * would be set internally by qed, we want to make sure LFA would + * still work. + */ + if ((p_hwfn->mcp_info->capabilities & + FW_MB_PARAM_FEATURE_SUPPORT_EEE) && params->eee.enable) { + phy_cfg.eee_cfg |= EEE_CFG_EEE_ENABLED; if (params->eee.tx_lpi_enable) phy_cfg.eee_cfg |= EEE_CFG_TX_LPI; if (params->eee.adv_caps & QED_EEE_1G_ADV)