Skip to content

Commit 75eb779

Browse files
author
Christoph Hellwig
committed
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 <hch@lst.de> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
1 parent 658d9f7 commit 75eb779

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/nvme/host/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,10 +968,10 @@ static u32 nvme_known_admin_effects(u8 opcode)
968968
{
969969
switch (opcode) {
970970
case nvme_admin_format_nvm:
971-
return NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC |
971+
return NVME_CMD_EFFECTS_LBCC | NVME_CMD_EFFECTS_NCC |
972972
NVME_CMD_EFFECTS_CSE_MASK;
973973
case nvme_admin_sanitize_nvm:
974-
return NVME_CMD_EFFECTS_CSE_MASK;
974+
return NVME_CMD_EFFECTS_LBCC | NVME_CMD_EFFECTS_CSE_MASK;
975975
default:
976976
break;
977977
}

0 commit comments

Comments
 (0)