Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2494992lqp; Sun, 24 Mar 2024 23:34:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVO4an5KHzsulqwX6SEC/JaSzYbmcGBH/awJtCTIpVlEYF7qICk1mLWW2uRC5eL8DgYAVT+8h13bWIE4z22LssF/BoGnnF0+G5P8cYL+g== X-Google-Smtp-Source: AGHT+IEA4+4hMnDMJSaHdkam+ujLVSfhGVT7jl/XBXNeDNgiUcNkslDpm+1yQFEJeX5oH8E/OMjn X-Received: by 2002:a05:6a20:48a6:b0:1a3:6750:f8b2 with SMTP id fo38-20020a056a2048a600b001a36750f8b2mr5597910pzb.29.1711348464082; Sun, 24 Mar 2024 23:34:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711348464; cv=pass; d=google.com; s=arc-20160816; b=TMSPjAGjq5MSsJONPYMvGJJXgdkCUrmAMc+OUzgaE3ZLmgWQ8BXLFT4dZbUU9c4IcZ yLFVy2XMAa7BYGxHFva6DThnObtfxL1pmk+W7qfGScClTXC1ZvL4VoRBZnS5ryiwtp0p Lg+4iDC7fZOIBb7Zu9fYA1z6YlEKvzoNBhtK1nxBvLJJha2j0KUGLIVDw56fz0MFOYUr j8bQnRp8C9WFHdSFuLQUvyrc97KfVGuc8ZgZf0nXL4z8kY/4BDa7eXFIHC/10q6a4+fq DT1td1NJPHN8OvZfwyvzN9RTMoPHAdJL4mhKrVPRu9YnmRWEz2V+ahgXClDbPqTcGig+ ckiA== 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=7xV7A+zRegjJJ9u4/1sRWj5KI2lfNIsdjXOghIn45lE=; fh=PahuNMbNcED2tncpKPpx2dmDbxhfmByEV/2R01KyMvs=; b=e2uxHgz9pTmC5ZKJIVUr7yrWUZPADC9mVewr3HKMtyKqXhh/TSHjRAefNesSvas5UP WeodhWvn2xE2VpCMMzM4GGVY1W+PwJGjDva9cCm9h6c7Hgps4E/XB+cB9hpjdXpA2okV UYAqImA8ktlARtBNuIiV+/ZNOvN4E+c9XiBl5IT7szNJs5yzVNGshqRj+oXio/xDjHni F/e4BTY58vk7rGhDWFlc4SO3BYQyjPHoEfBG1mQsx7MbOQ9SybU+XyixsFnxqEBzVcvI KENo76DzuTAHta/li76xIGbdc7eWCcq0WU6W/xhM7YfvCHlphvSgNcmMLyF1Q6GQH3kO +mwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hjdpmCtg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114680-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114680-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 q6-20020a17090ad38600b0029b948f63f8si10539930pju.56.2024.03.24.23.34.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 23:34:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-114680-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=hjdpmCtg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-114680-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-114680-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 B7A062949ED for ; Mon, 25 Mar 2024 06:24:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D46C18BC33; Sun, 24 Mar 2024 23:59:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hjdpmCtg" 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 AA224238F1F; Sun, 24 Mar 2024 23:18:47 +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=1711322328; cv=none; b=OzNNpMKTZpnZyUAaYGm5e5+TpCnXfiQ5dN9ktfTtwy6M0gsaTNcU6TdjiqSaWfBW8uiMW+vqEmtF/dxbzZCLFTv1xhN/sqe/KCULc+KEDye9rDk1nVjfKuS6A5bBWnNVZv2SmugTrIUPJpdRYi3acdFthuqaLOm5pBCg6pITcxQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322328; c=relaxed/simple; bh=NHOVg9Wt8Q8qQd/3bLj5eFPcQMFrrz+ujue+JYbi8ag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DETl18A+36kvQ8l/s/Wkqw6LxtIPX0mwy/SbMMuxmIZy//B9wtp2ZQ0EUtsgjxmMW6pZqOzBUNYe5qpwm0facTDloyQhL2SibNy/1DDvmLm84vKkmlTtxL48F92PpyZFRbajy+BO6AjlmZDrs5oF53JGiTza6yTtvcH9hKLj9v8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hjdpmCtg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D450CC43394; Sun, 24 Mar 2024 23:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322327; bh=NHOVg9Wt8Q8qQd/3bLj5eFPcQMFrrz+ujue+JYbi8ag=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hjdpmCtgH8oRa+aTivI1OO9vxV/A5iS+Sg7tSE9wzawUGlm3/ZGmmBrxfLHvbgQxz L78A7PUmMuJdBWbvGrMC6yhaJhdDn5XevO3v5Y7t7sl90Jbc3zLq5wjCvv269HNcez xc8StFh7CpL/msf5knXR99DdPwdokyMLpQBm80XZEvj7yqZ1EFbgVNJgqIPNyC83zW nR0+u2W/m+lg8ccROq2IL4x0HghDHu2eI0z3RnikOMxMZzzJohjSA8F0zwFmdvca5f 9cVJq8WbKEftAysYQWVtPqMDxYb3X+tTo2S4nSa2H38DW/W8LQf/euG8YQuRD83yWG XxguQgoOAsUNg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Christoph Hellwig , Sagi Grimberg , Chaitanya Kulkarni , Sasha Levin Subject: [PATCH 6.1 410/451] nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers Date: Sun, 24 Mar 2024 19:11:26 -0400 Message-ID: <20240324231207.1351418-411-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: Christoph Hellwig [ Upstream commit b794d1c2ad6d7921f2867ce393815ad31b5b5a83 ] The reserved_tags are only needed for fabrics controllers. Right now only fabrics drivers call this helper, so this is harmless, but we'll use it in the PCIe driver soon. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Stable-dep-of: de105068fead ("nvme: fix reconnection fail due to reserved tag allocation") Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 0c088db944706..98a8d90feb37d 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -5029,7 +5029,8 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set, memset(set, 0, sizeof(*set)); set->ops = ops; set->queue_depth = ctrl->sqsize + 1; - set->reserved_tags = NVMF_RESERVED_TAGS; + if (ctrl->ops->flags & NVME_F_FABRICS) + set->reserved_tags = NVMF_RESERVED_TAGS; set->numa_node = ctrl->numa_node; set->flags = BLK_MQ_F_SHOULD_MERGE; if (ctrl->ops->flags & NVME_F_BLOCKING) -- 2.43.0