Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3419650pxf; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEfiDKCq/TEeJhPM5m6HSi6g9EbYqzvzzbUgtmxYgcoHIuZXrWhZovwCWOzG6ulsuSWaPg X-Received: by 2002:a17:906:4d96:: with SMTP id s22mr27288384eju.189.1617006658351; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617006658; cv=none; d=google.com; s=arc-20160816; b=et6alHkUyQezG07lkq85C6H1BQRYDWqZ4tbb+qkG2atoivWMqWnCbCwFwWuQgLXV5x p4wG7kI7OH6dHlMzS/tMNk4hiQ8Gs4YAjITXpFaCWRCcZw31JwqKkI4uOaRf0hyy7xIS RacfTUvICPtSwu8hWL3FaQGr8SlQG6P/vIKMVZ7Fq+0HZkm1LFKuBLC4phgwBeGnhYEb jcG5oFWHIAgLZreH9EJ469Qs/ot93arsLNuJqCZ6zCkhozcoWFVLet7dU8OcDSaWZMMN idIBmwQki9mrvplVqNqO0oviu/oYYg+S6VA9qY9PLIls/LU+kwiW3lXh1/EuXmfweJYe Mv+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jNahzRJJyvrmU4plKA+H6IbVhJKSETMSdn3xq1Lhffg=; b=lCcoXg3qw8zZJ/hPkphc25xt5ZDz3eScfNy5Wb6eCK3qHvn4TvK3geFPuHCMIqKh1K 1qdgm8aVnYy5WYvoYPedTN9XvMmRj+rfo1W3Hn2LcyFCB8Sg/7c0wrKybOtT4Z60j8UM EHpbSiN8r0k4oOfVuAa7MTAHmh2IP8/uwZ5C4O5mZJlIcKOTbxihu8A2LntBbzXkfSy7 T9ssg9sb43DnwMTiTSYOX7zbu8BrkWn5/+zHrJDuClMmcjMhnBBkt6yc/UcSR5bNh3NA 9ZVEmeMetVyWXODSvmdtX8WXtOfQ0WAVFuoUhHPc9uNYQ0ja04ZxChTDQB0k0hNAMozG dQ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F3nimKNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si12012156ejf.752.2021.03.29.01.30.35; Mon, 29 Mar 2021 01:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=F3nimKNu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234789AbhC2I3C (ORCPT + 99 others); Mon, 29 Mar 2021 04:29:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbhC2ISf (ORCPT ); Mon, 29 Mar 2021 04:18:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 035FB61481; Mon, 29 Mar 2021 08:18:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617005912; bh=UTjRhRZipRt5fVqetDoXAozWE+ENWkTdY+VzugbfmhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F3nimKNuQbItOb151ISWIu8QMPKKk1LFk3Syu970qYZy1I+h24R3v4DNPmfYqNhfO W6Zy5AV384hX5cCTJP10+wdtCE1uoiJJ7wc+S/xBXdzfnEztfJqFP0JtvgxSlx9s6X kes4NVjrVQoi2MfGPXqX3xjlq0a/tbadbp1zhWz0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chaitanya Kulkarni , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 049/221] nvme-core: check ctrl css before setting up zns Date: Mon, 29 Mar 2021 09:56:20 +0200 Message-Id: <20210329075630.816658126@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chaitanya Kulkarni [ Upstream commit 0ec84df4953bd42c6583a555773f1d4996a061eb ] Ensure multiple Command Sets are supported before starting to setup a ZNS namespace. Signed-off-by: Chaitanya Kulkarni [hch: move the check around a bit] Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 30e834d84f36..140f19cbe73a 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4019,6 +4019,12 @@ static void nvme_validate_or_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid) nsid); break; } + if (!nvme_multi_css(ctrl)) { + dev_warn(ctrl->device, + "command set not reported for nsid: %d\n", + ns->head->ns_id); + break; + } nvme_alloc_ns(ctrl, nsid, &ids); break; default: -- 2.30.1