From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A4391EFFA6; Mon, 23 Jun 2025 21:18:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750713499; cv=none; b=efrCgFZ9Q+3GzmgzX1KURgS+G18DDtjCvU8smKj3dAeLT+8f4x3lCBHZyrt3TK8ugc2W6XMMCVQxHdIULjy1VRXVFOvdqba45ou5CIkzEpkh+dK8uye+/OIx3WUkFgGvi03oGv7aNuMTXhJgN3FLLgC304vWh2z7ge097qkZ2H8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750713499; c=relaxed/simple; bh=Pe0/pIhNdBD0ILoZb1sB1a4WQQ+ZbpU4oRLH0nRnKsU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ki1QbRCaj6GFNHyD9i42iM/Gknn5gLQQvs84Ix0hNV1VnBBTlcLzpcg9Z0v3e5J9TXdQj3NqGoaCDa5hJnTEGu8urLNVm7muIkHxJR6TrGMzuwsEhWecLktRa6kiaxK6geCOvQ9ao1AxrhDeVQqPk8cb+HoIA4BXw8Tq5u6mGfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OY3D7Fgd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OY3D7Fgd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A0EAC4CEEA; Mon, 23 Jun 2025 21:18:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750713499; bh=Pe0/pIhNdBD0ILoZb1sB1a4WQQ+ZbpU4oRLH0nRnKsU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OY3D7Fgdm4l0gpS74xDwC7pbWxVigFiuullLP8hTBvec5zYaTdexfpf7cBq+Gfx0t TZJIl7kTEp51K8hHTuxQqwcbPCdTWyZKQnPVab5xPZyYctUQ46hsGeMHLT7MBuLd1T Y1MkVL96RXrPf3UHELmv7BQRYWHaOZJW3vC8zJow= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Robert Malz , Rafal Romanowski , Tony Nguyen , Sasha Levin Subject: [PATCH 5.15 150/411] i40e: return false from i40e_reset_vf if reset is in progress Date: Mon, 23 Jun 2025 15:04:54 +0200 Message-ID: <20250623130637.401763034@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130632.993849527@linuxfoundation.org> References: <20250623130632.993849527@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Robert Malz [ Upstream commit a2c90d63b71223d69a813333c1abf4fdacddbbe5 ] The function i40e_vc_reset_vf attempts, up to 20 times, to handle a VF reset request, using the return value of i40e_reset_vf as an indicator of whether the reset was successfully triggered. Currently, i40e_reset_vf always returns true, which causes new reset requests to be ignored if a different VF reset is already in progress. This patch updates the return value of i40e_reset_vf to reflect when another VF reset is in progress, allowing the caller to properly use the retry mechanism. Fixes: 52424f974bc5 ("i40e: Fix VF hang when reset is triggered on another VF") Signed-off-by: Robert Malz Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c index 65a29f955d9c4..a5265b1a7184a 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c @@ -1548,8 +1548,8 @@ static void i40e_cleanup_reset_vf(struct i40e_vf *vf) * @vf: pointer to the VF structure * @flr: VFLR was issued or not * - * Returns true if the VF is in reset, resets successfully, or resets - * are disabled and false otherwise. + * Return: True if reset was performed successfully or if resets are disabled. + * False if reset is already in progress. **/ bool i40e_reset_vf(struct i40e_vf *vf, bool flr) { @@ -1568,7 +1568,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr) /* If VF is being reset already we don't need to continue. */ if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states)) - return true; + return false; i40e_trigger_vf_reset(vf, flr); -- 2.39.5