Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp406845pxb; Wed, 3 Mar 2021 06:22:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJysReaceQiQGpEhLdhZdKYx5FwzNETH0Nawmcj17Pv6YeJ9ICLQngeeUhH55bYMFlcFLMoO X-Received: by 2002:a50:e0c3:: with SMTP id j3mr26407558edl.32.1614781360641; Wed, 03 Mar 2021 06:22:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781360; cv=none; d=google.com; s=arc-20160816; b=uoFf6h5Hl8dRlNWAtL881/k13QLqTKOEtmKbNUMAbtVvXjjwaePA/DgHpqQ/Z4ybxs keDOizULyFmXHOevkNSWrqMeyHmpAxyxg8gNtvvb2IPZ5jhR5i/FqIV15j+hldN8zsBF dB0x70/ijzhMoo6VrF4j4/gss7VHxvE0JCPZs/VSrccoUdf1UA+ZC9QvAXhU/SLMiEjX br4scBSTg0VaGvAFHpl2yG9G8bazrB68TKB4y308ul5OE+rrjUvL8Ah7Gpe2lR6G/O9s IVdvTCXgqXOy1bhsxa2j1e5Kgx3tlwumrEBmWI7h1vbykPKMkQzcnCyYE8pFBdzGfFmA vyZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tU7JMRtNR/LeY8G7jrITLXgZ3ddIeSyTgWFxedz4uck=; b=prgpFEmckEsVD+vwsD9nTgN8Xd3Wk/ZZ0rRao0Jj7QIHFHPfNp5mYPHt2dxURwcuaJ 1Xn6yXhBJpN6XtoKaG9L60Moykdf+WHG3slUdgFHCsMdLRkTIX1Tgehz2BlzVwSHM6Ib lAk+jc66O2a4GqulenKqz8t0AQoQmVw5iXAf2uV6zSR/UUeEM/GjASr6PlTGdvFnHC0T qSND64TSHuWsn0N4vXOpUeFFerLH558N0ARZ2tUksHT32/uMgRs6hZdom36RptARSJ9P OGRmbndUOziXGFoo6fx29l6UrG3S78IfXX9BrlCQAr9CgcPm7rsBuuJQ5qLA3ZxVAbVC Ebbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RX+aR3Vk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df24si11853973edb.407.2021.03.03.06.21.42; Wed, 03 Mar 2021 06:22:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RX+aR3Vk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244167AbhCAVJG (ORCPT + 99 others); Mon, 1 Mar 2021 16:09:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:46316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237857AbhCARNg (ORCPT ); Mon, 1 Mar 2021 12:13:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7199964F49; Mon, 1 Mar 2021 16:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614617075; bh=i06Ue1D+x+J5O1aZ0G+2K1e34YMbhk1OMb9LwjGHnAM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RX+aR3VkpyUtRDcE6R6Ec1sCV7UWFNn7ImbcLMTLShtqcwkfv1aaA8Bcz7EMqSzMa jp5hnVkE+rZMsSO+1j+KXokI5A6O7h1ApZ0XTzTMCtOB/5czsdx8ZXWgYQZu4ms0EW vvlw1SpGNjMBUtrDum6d2fxTl4tUdL0p+O62YFEM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dawid Lukwinski , Mateusz Palczewski , Aleksandr Loktionov , Tony Brelinski , Tony Nguyen , Sasha Levin Subject: [PATCH 4.19 164/247] i40e: Fix overwriting flow control settings during driver loading Date: Mon, 1 Mar 2021 17:13:04 +0100 Message-Id: <20210301161039.696960092@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mateusz Palczewski [ Upstream commit 4cdb9f80dcd46aab3c0020b4a6920c22735c5d6e ] During driver loading flow control settings were written to FW using a variable which was always zero, since it was being set only by ethtool. This behavior has been corrected and driver no longer overwrites the default FW/NVM settings. Fixes: 373149fc99a0 ("i40e: Decrease the scope of rtnl lock") Signed-off-by: Dawid Lukwinski Signed-off-by: Mateusz Palczewski Reviewed-by: Aleksandr Loktionov Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 27 --------------------- 1 file changed, 27 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 2518e2d6484c0..7a9d8bf2e1d5f 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -9403,7 +9403,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) { struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; struct i40e_hw *hw = &pf->hw; - u8 set_fc_aq_fail = 0; i40e_status ret; u32 val; int v; @@ -9484,13 +9483,6 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) i40e_stat_str(&pf->hw, ret), i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status)); - /* make sure our flow control settings are restored */ - ret = i40e_set_fc(&pf->hw, &set_fc_aq_fail, true); - if (ret) - dev_dbg(&pf->pdev->dev, "setting flow control: ret = %s last_status = %s\n", - i40e_stat_str(&pf->hw, ret), - i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status)); - /* Rebuild the VSIs and VEBs that existed before reset. * They are still in our local switch element arrays, so only * need to rebuild the switch model in the HW. @@ -13629,7 +13621,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) int err; u32 val; u32 i; - u8 set_fc_aq_fail; err = pci_enable_device_mem(pdev); if (err) @@ -13909,24 +13900,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } INIT_LIST_HEAD(&pf->vsi[pf->lan_vsi]->ch_list); - /* Make sure flow control is set according to current settings */ - err = i40e_set_fc(hw, &set_fc_aq_fail, true); - if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_GET) - dev_dbg(&pf->pdev->dev, - "Set fc with err %s aq_err %s on get_phy_cap\n", - i40e_stat_str(hw, err), - i40e_aq_str(hw, hw->aq.asq_last_status)); - if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_SET) - dev_dbg(&pf->pdev->dev, - "Set fc with err %s aq_err %s on set_phy_config\n", - i40e_stat_str(hw, err), - i40e_aq_str(hw, hw->aq.asq_last_status)); - if (set_fc_aq_fail & I40E_SET_FC_AQ_FAIL_UPDATE) - dev_dbg(&pf->pdev->dev, - "Set fc with err %s aq_err %s on get_link_info\n", - i40e_stat_str(hw, err), - i40e_aq_str(hw, hw->aq.asq_last_status)); - /* if FDIR VSI was set up, start it now */ for (i = 0; i < pf->num_alloc_vsi; i++) { if (pf->vsi[i] && pf->vsi[i]->type == I40E_VSI_FDIR) { -- 2.27.0