Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2405134lqp; Sun, 24 Mar 2024 18:09:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVMYzVy5PAUl0t2ZRUlcdHzSEl50m1Ih+ectPU/nr6/CaWO1pxsCE4NM0NZVClyxg4fDq9YbGcImxXjKw0teKZqQIACebN7xlKEtAIghw== X-Google-Smtp-Source: AGHT+IFMhdiCNwxzvaHWDuflfhKSqYEj83XYg8d51Kp3m5wBoSnYNrGPu7G1VhilcC7sJDFYNywT X-Received: by 2002:ae9:e008:0:b0:78a:56c:e288 with SMTP id m8-20020ae9e008000000b0078a056ce288mr5760483qkk.31.1711328951664; Sun, 24 Mar 2024 18:09:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711328951; cv=pass; d=google.com; s=arc-20160816; b=TyvisCT7pB+Elbi4ltNaztaqyTCLj2DZx9McIS357DifBqClbOO6x9Bdi369si7oS5 9iA+S8CbzyAdRvOaABxXM24cF90dEaLtojXHTH8v6btnqFSNHU0RGQs2qJRYADmMTvQ0 QpiiaJmsRFZK5CMK/EJNmiwGZ6khvvOvJoBq/BbOBGqv0FGpPtc01JfoE+IyI6ptDKQY i5lWVJZgzIwDpNLQBSfXvmPrF2rrQCAN/JYXicDC4IM/Ikucn29dA6+xKxeUkGH8nE6E xleNM5XlbqgyYx6Ph7g5GbraCRrbohgJzDDzjBJkiWFr5gwOKgBP5sU4NFPvsZUv3bmY Yi2A== 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=KI2cIpHhwKPA9X4KywtnHLqT6AWxtLXNoPlVfft6jQ4=; fh=UZBjq8x3IS5QFVi63dcFeSlw7nCVoeaE32RVP//6mHo=; b=tTYuQH74h8POpe5NpX+rV19kNRvSD4PeMser/stkKoHNJJOjYhlgyUAYUSHdvH3rJc MLJ8bhUEkAePiSvxg+oQdQ+tbCqFbL7gZqLplNPUkMV2OB4KEixwD+SvHNOx10uuuagY e4MQU2oL5efvzyoubj0gnF7we+hiLI0Qcb4RTFHXy9oFoDfMqOZgUuRIlEcm6vlmsTAj +SDLeBunUzYrwQx4SuyW+RVz9RSaV5qr7axTpx8uMZFevJcbMiUSaACX6v2kWqLNYeu8 kSK21Zf/4SEwhTKTROYM7dlPGoycfqAB9fifAmj/Siyw3rXFSUrdcAn7NoRtClCBEa4x OAAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZI+J+dRy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113584-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113584-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 j13-20020a05620a146d00b0078a0f2cec57si4512272qkl.429.2024.03.24.18.09.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 18:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-113584-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=ZI+J+dRy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-113584-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-113584-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 663661C24D6A for ; Mon, 25 Mar 2024 01:09:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA4BC1CADA3; Sun, 24 Mar 2024 22:46:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZI+J+dRy" 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 E51B274E3F; Sun, 24 Mar 2024 22:46:27 +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=1711320388; cv=none; b=eAKYiqGUKVBd4at67XxDav00XbPraLlEf3fUwOneawkvnEagj0MJYKgcd6SS0GqAJeLqDUkTrdHsTKueAepx/NLj5p/9133Y4qwKZOCoxw86vD3Q9tQf4zvrhalYJ9Ry+BTsHptnzReIOkyOiVTa6h0ExdKgHz7urS2mwrGGSyY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711320388; c=relaxed/simple; bh=vwZ5D5SxX73diJEFAtTAeHLjd4n9ybGa/CBUkh1hVtU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yt5par6kFy6bcNlgwEURzJ0xvbD5buujlUVwZEhqFvpZ0mHhg37smpjcHl8rJ1m6JbarPeVqy/irfWOp8t9nD0Uv2SFpoHR/K+NblL0xpGQCmnYAfYEHFpIpGUhezm0p7LbW8DxhoqaPR3ctWokTR/vHLXJWUrkDEzvDhHQfBhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZI+J+dRy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECC60C433F1; Sun, 24 Mar 2024 22:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711320387; bh=vwZ5D5SxX73diJEFAtTAeHLjd4n9ybGa/CBUkh1hVtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZI+J+dRyfocEZoQPIHnPuz2rrNBEdd98x2lpA3bt6NFU81ZLLMIfl/f9YuIiNIhAq xPG3clDpbtk/9N+XCAvNOWzTD/9vSodN1jKM7iGKUYKvwYjtdw4fs5ArMHGq6wsTj3 dXGVo7b4ZqCSk6HpvFqkjCUl6EqadNlcAwKlKP2xHq5YkHBDxxushYVS+6NtladZsd gh+PRg5JzTm8TkD/zB0iqUrNTmJUfJPwX3InvCEUORqaLJ9qJYxE3dDZtLIU+ssg5o 2TwsrngJ4eJ20gK8MuM8UbjXB9ZiMShBS7jKuGNbIkRjXg1kqFoAGthat5lQ4akVQ8 VJuQOatcc6FTw== 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 693/715] octeontx2-pf: Wait till detach_resources msg is complete Date: Sun, 24 Mar 2024 18:34:32 -0400 Message-ID: <20240324223455.1342824-694-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 cbf2f24939a5dafce6de4dd4422e543ce8f610cf ] During VF driver remove, a message is sent to detach VF resources to PF but VF is not waiting until message is complete. Also mailbox interrupts need to be turned off after the detach resource message is complete. This patch fixes that problem. Fixes: 05fcc9e08955 ("octeontx2-pf: Attach NIX and NPA block LFs") Signed-off-by: Subbaraya Sundeep Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 2 +- drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index 02d0b707aea5b..a85ac039d779b 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -1592,7 +1592,7 @@ int otx2_detach_resources(struct mbox *mbox) detach->partial = false; /* Send detach request to AF */ - otx2_mbox_msg_send(&mbox->mbox, 0); + otx2_sync_mbox_msg(mbox); mutex_unlock(&mbox->lock); return 0; } diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c index ced456cec8baf..cf0aa16d75407 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c @@ -775,8 +775,8 @@ static void otx2vf_remove(struct pci_dev *pdev) otx2_mcam_flow_del(vf); otx2_shutdown_tc(vf); otx2_shutdown_qos(vf); - otx2vf_disable_mbox_intr(vf); otx2_detach_resources(&vf->mbox); + otx2vf_disable_mbox_intr(vf); free_percpu(vf->hw.lmt_info); if (test_bit(CN10K_LMTST, &vf->hw.cap_flag)) qmem_free(vf->dev, vf->dync_lmt); -- 2.43.0