Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: mlevitsk@redhat.com (Maxim Levitsky)
Subject: [PATCH 2/2] nvme/pci: add known admin effects to augument admin effects log page
Date: Thu,  2 May 2019 14:31:34 +0300	[thread overview]
Message-ID: <20190502113134.20835-3-mlevitsk@redhat.com> (raw)
In-Reply-To: <20190502113134.20835-1-mlevitsk@redhat.com>

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 at redhat.com>
---
 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 3dd043aa6d1f..2e11d014d514 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1259,8 +1259,8 @@ static u32 nvme_passthru_start(struct nvme_ctrl *ctrl, struct nvme_ns *ns,
 
 	if (ctrl->effects)
 		effects = le32_to_cpu(ctrl->effects->acs[opcode]);
-	else
-		effects = nvme_known_admin_effects(opcode);
+
+	effects |= nvme_known_admin_effects(opcode);
 
 	/*
 	 * For simplicity, IO to all namespaces is quiesced even if the command
-- 
2.17.2

  parent reply	other threads:[~2019-05-02 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 11:31 [PATCH 0/2] Few NVME fixes Maxim Levitsky
2019-05-02 11:31 ` [PATCH 1/2] nvme/pci: init shadow doorbell after each reset Maxim Levitsky
2019-05-02 13:08   ` Keith Busch
2019-05-05  4:18   ` Minwoo Im
2019-05-02 11:31 ` Maxim Levitsky [this message]
2019-05-08  7:10 ` [PATCH 0/2] Few NVME fixes Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190502113134.20835-3-mlevitsk@redhat.com \
    --to=mlevitsk@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox