Skip to content

Commit

Permalink
nvme-pci: add known admin effects to augument admin effects log page
Browse files Browse the repository at this point in the history
Add known admin effects even if hardware has known admin effects page,
since hardware can't be ever trusted to report sane values.
(on my Intel DC P3700, it reports no side effects for namespace format)

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Maxim Levitsky authored and Christoph Hellwig committed May 13, 2019
1 parent e8fd41b commit f4524cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,9 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
return 0;
}

effects |= nvme_known_admin_effects(opcode);
if (ctrl->effects)
effects = le32_to_cpu(ctrl->effects->acs[opcode]);
else
effects = nvme_known_admin_effects(opcode);

/*
* For simplicity, IO to all namespaces is quiesced even if the command
Expand Down

0 comments on commit f4524cc

Please sign in to comment.