summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2019-05-02 14:31:34 +0300
committerChristoph Hellwig <hch@lst.de>2019-05-13 16:00:03 +0200
commitf4524cc45626e16264aabb930d0635eff19c7f73 (patch)
tree59c072d879ae55fef5a1e5530f69fe2a97c1ec2b
parente8fd41bb3cf149fb6df4be714f94fc04871ccbce (diff)
downloadlinux-stable-f4524cc45626e16264aabb930d0635eff19c7f73.tar.gz
linux-stable-f4524cc45626e16264aabb930d0635eff19c7f73.tar.bz2
linux-stable-f4524cc45626e16264aabb930d0635eff19c7f73.zip
nvme-pci: add known admin effects to augument admin effects log page
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>
-rw-r--r--drivers/nvme/host/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cd16d98d1f1a..eebaeadaa800 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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