diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-03-08 20:58:21 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-03-11 11:48:35 +0100 |
commit | 0ec84df4953bd42c6583a555773f1d4996a061eb (patch) | |
tree | cae59b02fcd7b8e55b8b5f32fdc9e877804d023c /drivers/nvme | |
parent | f20ef34d71abc1fc56b322aaa251f90f94320140 (diff) |
nvme-core: check ctrl css before setting up zns
Ensure multiple Command Sets are supported before starting to setup a
ZNS namespace.
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
[hch: move the check around a bit]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 63bb1da0861e..82ad5eef9d0c 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -4096,6 +4096,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: |