From: Keith Busch <keith.busch@intel.com>
To: Alexander Kappner <agk@godking.net>
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
sagi@grimberg.me, hch@lst.de, axboe@fb.com
Subject: Re: [PATCH] nvme-core: add apst_override param to force APST if controller does not report APSTA=1
Date: Wed, 3 May 2017 22:40:13 -0400 [thread overview]
Message-ID: <20170504024013.GA30314@localhost.localdomain> (raw)
In-Reply-To: <1493863327-18024-1-git-send-email-agk@godking.net>
On Wed, May 03, 2017 at 07:02:07PM -0700, Alexander Kappner wrote:
> Some buggy NVMe controllers support APST (autonomous power
> state transitions), but do not report APSTA=1. On these controllers, the NVMe
> driver does not enable APST support. I have verified this problem occurring
> on
> - Samsung 960 Pro 2TB (Firmware 2B6QCXP7, current as of 5/4/17)
> - Samsung 960 Pro 1TB (Firmware 3L0QCXY7)
>
> These disks support APST, but
> assert APSTA=0 and so never get enabled in the driver.
>
> This patch introduces an apst_override module parameter.
> By booting with nvme_core.apst_override=1, the driver can force using APST
> on disks which claim to not support it. This patch
> successfully enables APST on both Samsung disks.
>
> This patch also introduces an additional sanity check on the NPSS to mitigate
> the risk of force-enabling APST on disks that genuinely do not support it.
It sounds like you really want to target this to specific devices rather
than on the module. This param potenially does undefined things if you set
it on a system with a mixure of devices. We've at least 27 bits left for
quirks so maybe you want to reserve one for these devices while they're
still available.
> + if (nvme_apst_override != -1 && ctrl->apsta != nvme_apst_override) {
> + dev_dbg(ctrl->device, "Overriding APSTA.\n");
> + ctrl->apsta = nvme_apst_override;
> + }
> + /*
> * If APST isn't supported or if we haven't been initialized yet,
> * then don't do anything.
> */
> if (!ctrl->apsta)
> + dev_dbg(ctrl->device, "APSTA not set, disabling APST.\n");
> return;
You're missing some { brackets } here.
prev parent reply other threads:[~2017-05-04 2:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 2:02 [PATCH] nvme-core: add apst_override param to force APST if controller does not report APSTA=1 Alexander Kappner
2017-05-04 2:40 ` Keith Busch [this message]
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=20170504024013.GA30314@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=agk@godking.net \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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