From: Christoph Hellwig Date: Fri, 25 Sep 2020 06:34:43 +0000 (+0200) Subject: nvme: update the known admin effects X-Git-Tag: v5.10-rc1~165^2~1^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75eb779ee0d343d1eb6d8c19205bc76a1d3ba2ed;p=thirdparty%2Fkernel%2Flinux.git nvme: update the known admin effects A Format NVM command can change the capabilities of namespaces, while Sanitize does change the Logical Block Content and must be serialized. Also remove CSUPP bit for Format - it is not a mandatory command, and we don't check for the bit anyway. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Damien Le Moal --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index bb630d5fcb964..4737591c1143a 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -968,10 +968,10 @@ static u32 nvme_known_admin_effects(u8 opcode) { switch (opcode) { case nvme_admin_format_nvm: - return NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC | + return NVME_CMD_EFFECTS_LBCC | NVME_CMD_EFFECTS_NCC | NVME_CMD_EFFECTS_CSE_MASK; case nvme_admin_sanitize_nvm: - return NVME_CMD_EFFECTS_CSE_MASK; + return NVME_CMD_EFFECTS_LBCC | NVME_CMD_EFFECTS_CSE_MASK; default: break; }