Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nvme: fix passthrough csi check

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>

authored by

Keith Busch and committed by
Christoph Hellwig
85eee634 5a5754a4

+1 -1
+1 -1
drivers/nvme/host/core.c
··· 1093 1093 if (ns) { 1094 1094 if (ns->head->effects) 1095 1095 effects = le32_to_cpu(ns->head->effects->iocs[opcode]); 1096 - if (ns->head->ids.csi == NVME_CAP_CSS_NVM) 1096 + if (ns->head->ids.csi == NVME_CSI_NVM) 1097 1097 effects |= nvme_known_nvm_effects(opcode); 1098 1098 if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC)) 1099 1099 dev_warn_once(ctrl->device,