Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2405228lqp; Sun, 24 Mar 2024 18:09:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8gm7i3wt07iVe98uie2/yRI2JNBdba4r6GOo6FLz45VbAKCitC2tH8fu8HQq21BQkynld4+ZeEVOmu59fpMyLyv8fUtE/iNUSUnU5/A== X-Google-Smtp-Source: AGHT+IFvTIfK/aF99adSzbV2uGbHxPdop3AEmZp+UsX24o1CmPk1BSKbyQTo7HkrsOin0zmnrq5s X-Received: by 2002:a25:8409:0:b0:dd1:5a17:c096 with SMTP id u9-20020a258409000000b00dd15a17c096mr3771123ybk.57.1711328971950; Sun, 24 Mar 2024 18:09:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328971; cv=pass; d=google.com; s=arc-20160816; b=vwfz5m+dVVrETRiti/4wwWLmDizDNxcgddxfvEn80C1RJZHjWAg2srqbxIW+MsU4Sj ulgTYKc7G+Pzi+n9lHZo+D8m2/DUdxL9ZOMSJo4A3NE9zdCHzGv2M77Yv3sWWOEBW8+w 7Ch3NOomxvDPV17ikkHNOgr1siCdz+7eMSXQCcKLSabyjAysBO5aU310U3MoypLdiBq0 Iy1KTF5bUbZ4O8HsMjup4Jy6CJ1ZLmIk9ZqIf8J7ED95i45fct+dDVo0hMteMMeHaRLW tl3j0/HgEYMGZZ2tN4yOoJ0NkNuYDZuoM2MJgrmU7Iax1p86usIvTPB1R5Y4ezvWwrbC 0K6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=3BctU0e5V1Mu1Djcx9X0lyyHjrO2MLeL/sGENWfywbI=; fh=UZBjq8x3IS5QFVi63dcFeSlw7nCVoeaE32RVP//6mHo=; b=JHuH1fJmK8RMMzAHPKSX0zE02xVDGJ9ZrA2Ey3CoifY5WeEvAjQZ/qpNPX9syeXWLy Od8HuvcfzqaqPrcUCw3hwtKV109PeDhNmTCDH57K5b/WeG8Mpr2zi24SstBScHoNW9Es xCc8SVnQbfIbZLobQ9LcAtPvtaBNXaMOd2YMYPRFlWlEkC5ELxVakwviXaXbjgDMyC9T i3QVN2TbJqhs5YsqybPnwMvQh75qMJfPfHPXEoQV+Lz5bzZ8IvYkhBcBlKA0yn4qoJb/ 0tf+70E+WZGrcszEFLCZqqHRivNLOmVro3vkyhJBuGijnF9D14U31VdvEiODlGDMa98X VS/Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fjQ5Onp6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 14-20020a0562140dce00b006968727785esi2231554qvt.105.2024.03.24.18.09.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:09:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fjQ5Onp6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113586-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113586-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A9AC01C24DFB for ; Mon, 25 Mar 2024 01:09:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88C251CADD5; Sun, 24 Mar 2024 22:46:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fjQ5Onp6" 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 910AE1CADB7; Sun, 24 Mar 2024 22:46:29 +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=1711320389; cv=none; b=g1PIVYGQapMjheGjftMz5A1PBozzW4eQLiupJDo1+tlQYrMNtwtypzSMMXPfrUCs5oEeEj+quVjVZ1zD7MW5NG282QKBs1lPPZQHqEnqyqf1ggfWrTcXWfRKZHamMqRLWotw+1TvkpX0whWllIRjalMc21Ig/EA/YaHSCl7GBCw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320389; c=relaxed/simple; bh=D0aVCUchj4fSjHjaibxfDzG7yWzsW9jxSYg7diF+IBc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gMAOAe1MNV28XxvYRoItd4ArlxbVkmN7+9n1Cju6CIi4eEm5kbCsQdH6Jh5ZfqCXdYmjbrZ+nuMALG0JNk+pUSKm0YhlzLwDx63iB1GNkUEUVWNuYJGpyVXVifqvY2GRi5jP7IWmbreuGn4ioxukPevWeyT8tiOUwdbSkBWBfBk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fjQ5Onp6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4270C433A6; Sun, 24 Mar 2024 22:46:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320389; bh=D0aVCUchj4fSjHjaibxfDzG7yWzsW9jxSYg7diF+IBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fjQ5Onp6zRW/LL1ph1dGOTY0Z2NJYnI2NMOB4QLaWk0l9ub/Lf/MrF2jZy1SSzvdO vk5cJHWTHX7hMkjw56ZRiAIaKnMMtj2hbim9uerf4KRDK8CF53vgeoaoDaKEv5g2bu nHkK59QcyjfCRzLwW1hNKqoI7CvvupM5FezCmAz98Hjb6QL7eGyVBHoVaHGdxXmLpF btXo8UvlTZP969rqx3KOm6q7GzOKZSaWe8bTb+YOa6OeYqrMdorTiWFbsFSLI3Ose+ JM5sZ0mGfXUZCTnTS6OYNNak4LJ+AoxDqnIm9t8d734oMUHbpgllQ3opgjcqpfEqnJ vtqZwjNRuuKZA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Subbaraya Sundeep , "David S . Miller" , Sasha Levin Subject: [PATCH 6.8 695/715] octeontx2-pf: Send UP messages to VF only when VF is up. Date: Sun, 24 Mar 2024 18:34:34 -0400 Message-ID: <20240324223455.1342824-696-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324223455.1342824-1-sashal@kernel.org> References: <20240324223455.1342824-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Subbaraya Sundeep [ Upstream commit dfcf6355f53b1796cf7fd50a4f27b18ee6a3497a ] When PF sending link status messages to VF, it is possible that by the time link_event_task work function is executed VF might have brought down. Hence before sending VF link status message check whether VF is up to receive it. Fixes: ad513ed938c9 ("octeontx2-vf: Link event notification support") Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c index f85d38fab3211..b40bd0e467514 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -3122,6 +3122,9 @@ static void otx2_vf_link_event_task(struct work_struct *work) vf_idx = config - config->pf->vf_configs; pf = config->pf; + if (config->intf_down) + return; + mutex_lock(&pf->mbox.lock); dwork = &config->link_event_work; -- 2.43.0