Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp409265pxb; Wed, 3 Mar 2021 06:26:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJztyjuZ+VhrYoC8S8mjjN/KiQ+3NJi1skbQ3zrEhyjewR0NvjsvP3jLcNcFJf27ABkigm91 X-Received: by 2002:a17:906:358c:: with SMTP id o12mr5472454ejb.156.1614781572210; Wed, 03 Mar 2021 06:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614781572; cv=none; d=google.com; s=arc-20160816; b=TBCeLUrrirQBJhD5eZqWz1vfVoA+WZM5/TrAzY8ItD1etBVce6pskvV0mgRlkZY5lE /8ZzXEmbs3BS2oAnFRS0aW8HgmU43oaQjN1xpV4m2BUL6xYt4u4hRnE22S4IYFNjeppS wFIAlzpp/u8zhn/oEnMvntcGUrN272EIUmlfBptqbcJ1H2eIgZQ3a+3uAOuU1y5xk65u uWKVHO2YmPob3wV8g/RxjnwwRO9Wj9bzEs/0mM0RGSmIMbxXxY0bFPGAFdyN8Qdu0jhC fXyshmvoErA7BC9HMrXCgN19CC2jPaf5G12/qdi9jmLTBid6DGUF5tStwF838lOK8XL2 T/MA== 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=GhZEDA74bLqft4pN8RetwCn83TTZBNPEPuuWTqIwhwc=; b=SpFAVOmjq8p4cKLkF3qVJ+Bt2YGs3M+BNRtU4KAMoJS6xu99BT9baC8b7a+HqeQhwv zGxMQcnSv5lSCyh3YdyWEloQ3RMlVkDXH9WO11gjr5iGW1i25hmWcaXlxgQuuJvtF2lh Jq8G2EMyCWxgj2OrAY5nJpTekytmoQMqMXLrv6nK2gOct3vUCaLzJtNI5u9m765mVEHB 1y50O21AwPu8K4Q6lBzmqOD7RfX64WoY7n4+PhzV+4lyypfXXcAp98zndUMReWOkrQoX TXYouSRPlrpom1NJUsVsjnVpI31Uf2EFr29Q2VTIx08Sp8QR6JwDkFEE+MisyZbohOu9 Y5AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KwsKK9Wn; 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 m23si117295ejo.18.2021.03.03.06.25.15; Wed, 03 Mar 2021 06:26:12 -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=KwsKK9Wn; 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 S238377AbhCAVAv (ORCPT + 99 others); Mon, 1 Mar 2021 16:00:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:48318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237406AbhCARLW (ORCPT ); Mon, 1 Mar 2021 12:11:22 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1437664E46; Mon, 1 Mar 2021 16:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616990; bh=V+EjzTbAXKAY+ovy3Nv56uktnC+iL3gHReEb15TQSlw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KwsKK9Wny4TRK7OwnolJvMPXXjtxRR9UqU9T6PUIUHxlK8AGKvSz9TOU4MlYvbFAd KkHvOyEvIUVALjK/e2k6SabFtgF7OeuIuTVRW4xG9SlLa0Vf8y20ziUL3wi/hGSkD8 ZnyfNoPvBHK0iE3n3spl+awTGnZ8WDfgHRAO3cGs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sylwester Dziedziuch , Konrad Jankowski , Tony Nguyen , Sasha Levin Subject: [PATCH 4.19 165/247] i40e: Fix VFs not created Date: Mon, 1 Mar 2021 17:13:05 +0100 Message-Id: <20210301161039.747012587@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: Sylwester Dziedziuch [ Upstream commit dc8812626440fa6a27f1f3f654f6dc435e042e42 ] When creating VFs they were sometimes not getting resources. It was caused by not executing i40e_reset_all_vfs due to flag __I40E_VF_DISABLE being set on PF. Because of this IAVF was never able to finish setup sequence never getting reset indication from PF. Changed test_and_set_bit __I40E_VF_DISABLE in i40e_sync_filters_subtask to test_bit and removed clear_bit. This function should not set this bit it should only check if it hasn't been already set. Fixes: a7542b876075 ("i40e: check __I40E_VF_DISABLE bit in i40e_sync_filters_subtask") Signed-off-by: Sylwester Dziedziuch Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 7a9d8bf2e1d5f..eba6f7b118a9b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -2577,7 +2577,7 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf) return; if (!test_and_clear_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state)) return; - if (test_and_set_bit(__I40E_VF_DISABLE, pf->state)) { + if (test_bit(__I40E_VF_DISABLE, pf->state)) { set_bit(__I40E_MACVLAN_SYNC_PENDING, pf->state); return; } @@ -2595,7 +2595,6 @@ static void i40e_sync_filters_subtask(struct i40e_pf *pf) } } } - clear_bit(__I40E_VF_DISABLE, pf->state); } /** -- 2.27.0