From: Christoph Hellwig Date: Wed, 30 Nov 2022 16:27:07 +0000 (+0100) Subject: nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers X-Git-Tag: v6.6.7~3943^2~4^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b794d1c2ad6d7921f2867ce393815ad31b5b5a83;p=platform%2Fkernel%2Flinux-starfive.git nvme: only set reserved_tags in nvme_alloc_io_tag_set for fabrics controllers 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 --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index f31586c..ed163c5 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4899,7 +4899,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)