diff options
| author | Keith Busch <kbusch@kernel.org> | 2023-01-24 13:29:14 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-02-01 08:27:28 +0100 |
| commit | 071a8392869fb5a30bbfaf0096d0b4388781a385 (patch) | |
| tree | 1546a96b1f50a770746b07cd252735383103d66a | |
| parent | 614471b7f7cd28a2c96ab9c90b37471c82258ffb (diff) | |
| download | linux-071a8392869fb5a30bbfaf0096d0b4388781a385.tar.gz linux-071a8392869fb5a30bbfaf0096d0b4388781a385.tar.bz2 linux-071a8392869fb5a30bbfaf0096d0b4388781a385.zip | |
nvme: fix passthrough csi check
[ Upstream commit 85eee6341abb81ac6a35062ffd5c3029eb53be6b ]
The namespace head saves the Command Set Indicator enum, so use that
instead of the Command Set Selected. The two values are not the same.
Fixes: 831ed60c2aca2d ("nvme: also return I/O command effects from nvme_command_effects")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 672f53d5651a..06750f3d5274 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1132,7 +1132,7 @@ u32 nvme_command_effects(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode) if (ns) { if (ns->head->effects) effects = le32_to_cpu(ns->head->effects->iocs[opcode]); - if (ns->head->ids.csi == NVME_CAP_CSS_NVM) + if (ns->head->ids.csi == NVME_CSI_NVM) effects |= nvme_known_nvm_effects(opcode); if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC)) dev_warn_once(ctrl->device, |
