Skip to content

Commit

Permalink
nvme-core: check ctrl css before setting up zns
Browse files Browse the repository at this point in the history
[ Upstream commit 0ec84df ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
ChaitanayaKulkarni authored and gregkh committed Mar 30, 2021
1 parent 4994ebf commit 0defa56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4069,6 +4069,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:
Expand Down

0 comments on commit 0defa56

Please sign in to comment.