From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 2/2] nvme: Provide option to disable ASPT feature
Date: Thu, 27 Jul 2017 12:58:41 -0400 [thread overview]
Message-ID: <1501174721-8253-2-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1501174721-8253-1-git-send-email-keith.busch@intel.com>
Similar to PCIe's APSM, the NVMe driver needs the ability to not use APST
feature so that users have a way to prevent this feature from making their
machines unusable. This patch makes that possible via module parameter
"apst_off".
Signed-off-by: Keith Busch <keith.busch at intel.com>
Cc: Andy Lutomirski <luto at amacapital.net>
---
drivers/nvme/host/core.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b150702..834913b 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -64,6 +64,10 @@ static bool force_apst;
module_param(force_apst, bool, 0644);
MODULE_PARM_DESC(force_apst, "allow APST for newly enumerated devices even if quirked off");
+static bool apst_off;
+module_param(apst_off, bool, 0644);
+MODULE_PARM_DESC(apst_off, "Disable APST driver support");
+
static bool streams;
module_param(streams, bool, 0644);
MODULE_PARM_DESC(streams, "turn on support for Streams write directives");
@@ -1542,7 +1546,7 @@ static int nvme_configure_apst(struct nvme_ctrl *ctrl)
* If APST isn't supported or if we haven't been initialized yet,
* then don't do anything.
*/
- if (!ctrl->apsta)
+ if (!ctrl->apsta || apst_off)
return 0;
if (ctrl->npss > 31) {
--
2.5.5
next prev parent reply other threads:[~2017-07-27 16:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 16:58 [PATCH 1/2] nvme: Fix nvme reset command timeout handling Keith Busch
2017-07-27 16:58 ` Keith Busch [this message]
2017-07-27 17:28 ` [PATCH 2/2] nvme: Provide option to disable ASPT feature Andy Lutomirski
2017-07-27 18:09 ` Keith Busch
2017-07-28 7:58 ` [PATCH 1/2] nvme: Fix nvme reset command timeout handling Johannes Thumshirn
2017-08-10 8:38 ` Christoph Hellwig
2017-08-10 8:48 ` Johannes Thumshirn
2017-08-10 8:57 ` Christoph Hellwig
2017-08-10 9:05 ` Johannes Thumshirn
2017-08-10 16:38 ` Keith Busch
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=1501174721-8253-2-git-send-email-keith.busch@intel.com \
--to=keith.busch@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.