[PATCH 14/20] nvme: update the known admin effects
Damien Le Moal
Damien.LeMoal at wdc.com
Mon Sep 28 10:57:47 EDT 2020
On 2020/09/28 21:35, Christoph Hellwig wrote:
> A Format NVM command can change the capabilities of namespaces, and
> Sanity does change the Logical Block Content, and must be serialized.
s/Sanity/sanitize
>
> 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 at lst.de>
> ---
> drivers/nvme/host/core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index bb630d5fcb9647..4737591c1143ae 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;
> }
>
With the commit message fixed, looks good.
Reviewed-by: Damien Le Moal <damien.lemoal at wdc.com>
--
Damien Le Moal
Western Digital Research
More information about the Linux-nvme
mailing list