Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2495313lqp; Sun, 24 Mar 2024 23:35:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV8achEf7hYKfvTz6/28YjKqg7SEyhi4/t4zHfPLaJ+cAezaMVL/Ba4avgQu3Nl+lITgDB4AMt8lOulmAB6uCj69gO47DBgB7WGjZIvkA== X-Google-Smtp-Source: AGHT+IFT0sO9G+WIeb+IIhdq9TLofsa2gTelPMOh9lBg49nh20DOwfCoecb4aaxkacqpJXa4ynX5 X-Received: by 2002:a17:903:22c4:b0:1e0:c070:b082 with SMTP id y4-20020a17090322c400b001e0c070b082mr2548768plg.14.1711348529117; Sun, 24 Mar 2024 23:35:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711348529; cv=pass; d=google.com; s=arc-20160816; b=RMZwPxAz0hknXZuSDa8xGsW9DRTcrpi5BbZ5I1wJxDSob4d4ClS94liXF2w6lL860Z 9M1wz9nuyvEw/FBNVPoEzW4pcThoygDlZBpVBWL3i3UTv1c1laZUruHykeT4GLAKIe1A ugxyOatJtQHt7d1CgDXMCMuxjPTE64qXLXR1A7M95/ytyu9aSbU78PZ4PRF6chmtXj3E oW7P17g61+b9ycjKGTYx9dRSGp3OCjlAy80RTzs2W1EXZSCfvXDJjxFHkiQw8AkDdWe4 W3BhheKtoVCp84vjMrziwg6qYpwHtO3I9pse6gS688E3N596yP3fo4pj3PEzNIPm8P6d KszA== 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=PD4r+fmdFPZkDUV3uYky+Qqa9T9o+ggojRdDRM2nV34=; fh=UZBjq8x3IS5QFVi63dcFeSlw7nCVoeaE32RVP//6mHo=; b=OvDNj1/0p9CNBDNF1kVA5Xf3IRRsOFlw3Nam6dRbxThWj0Slt5svzk7oHyKn/AS83x Bq7QjARF+ekbflreZjXljmXjKhfvrccUJB6WXAWI+O24nP+ahlI85cYMbHHn4lqB2Qqn /FFiE855O05pR5yW10HZPTeK+v9JrOg95OBKbdJavw37P3SX+O3lwX0pmCGknPkjAp46 E7z4Mj1SfAQ+upOlB/KG+IqlRMwMHXCy4q0UVooKv/dM31DZhxEoXdxDiY4d84xOtBqi kp1bOB8UHRwAai9VguGFRpp0ktB57GzKqNkkvLDMMeXZgpil6KkDXTPuuo7ZPQMUiWFI HvVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Z6LiakG/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id y2-20020a170902ed4200b001dddcceab03si4325138plb.644.2024.03.24.23.35.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 23:35:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Z6LiakG/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114701-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114701-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2327E296FD9 for ; Mon, 25 Mar 2024 06:26:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD90318BC40; Mon, 25 Mar 2024 00:00:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z6LiakG/" 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 8AA8615FA86; Sun, 24 Mar 2024 23:19:13 +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=1711322354; cv=none; b=Hxl0OtD27hVITjkQg6kh9bxIsPymnoj98og9MxZdQP+19g3AStfkP5w3R8rXdbNhtAZJpfiqAZ5aoA2eDOIWK4oq78ogbBYDMZUBIz2l7B8Sv8ovW9zjFNAUf4Bt0q/usg7cOlazNhXPnaPcwgIHJKp4Yr+uyswrvK4kFKfGosE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322354; c=relaxed/simple; bh=nJZ/aigk7V6NhgFPyvhOixWtqTeCEOdc8GJutmJugFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XplXjSO+12zjTYK4qQZ0wjYsjIhpmLbMBuEHs78UV9LmUeOMb3ZRXVCyf+d+mP6+NrKcTA291jO8hY+xyufrYCKlRu2ES6sKzHFME+96IFpASRMEn7ycihUeBFlS7qdE7115B89FtTbiWsyuC3CMNFI4bcShCR1NIXDSgxwEb/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z6LiakG/; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5E30C43390; Sun, 24 Mar 2024 23:19:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322353; bh=nJZ/aigk7V6NhgFPyvhOixWtqTeCEOdc8GJutmJugFk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z6LiakG/1reUwugY+U9imJXrHJQc1Vvb2xkKt28tvBTbj3m/1l/3RQL+Pdi1ZzQKn omRDvdiT3Nfi42iUmEWZ97EYOJgTymfRGTK5mCU/g4LIvfGWABKla4RE9gkErmrzwj ymBMVmvtuXjXyIoZrcjqZbaKblv/R8VWKAe0AMZqTRC9nxBuiNkWVAwly1ordEj9O4 GuIYeln07+p449XtJwtqxpycf5/klFHpuqOuE7VGvhPP2fPvtsizRL6ksj3bTqbFzt RI03ZuDVP25m5LKJbLbC9PHpw0O6jEqE/gBOsv6T0Vt9ROUtCDZmjUrBkf6HRfzTGA uc1t962aBRjBA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Subbaraya Sundeep , "David S . Miller" , Sasha Levin Subject: [PATCH 6.1 435/451] octeontx2-pf: Send UP messages to VF only when VF is up. Date: Sun, 24 Mar 2024 19:11:51 -0400 Message-ID: <20240324231207.1351418-436-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 a6c5f6a2dab07..7e2c30927c312 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c @@ -3062,6 +3062,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