From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] NVMe: Increase shutdown complete time
Date: Mon, 31 Mar 2014 10:24:04 -0600 [thread overview]
Message-ID: <1396283044-31926-1-git-send-email-keith.busch@intel.com> (raw)
The spec doesn't have a recommendation for shutdown beyond "that the host
wait a minimum of one second for the shutdown operations to complete",
so we need to choose an arbitrarily value so we don't wait forever but
high enough to prevent unsafe shutdowns. Some h/w vendors say the previous
two seconds is not long enough at some capacities. Twenty seconds ought
to be enough for anybody, right?
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/block/nvme-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 625259d..103da93 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1352,7 +1352,7 @@ static int nvme_shutdown_ctrl(struct nvme_dev *dev)
cc = (readl(&dev->bar->cc) & ~NVME_CC_SHN_MASK) | NVME_CC_SHN_NORMAL;
writel(cc, &dev->bar->cc);
- timeout = 2 * HZ + jiffies;
+ timeout = 20 * HZ + jiffies;
while ((readl(&dev->bar->csts) & NVME_CSTS_SHST_MASK) !=
NVME_CSTS_SHST_CMPLT) {
msleep(100);
--
1.7.10.4
next reply other threads:[~2014-03-31 16:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-31 16:24 Keith Busch [this message]
2014-03-31 18:56 ` [PATCH] NVMe: Increase shutdown complete time Dan McLeran
2014-03-31 20:37 ` Robles, Raymond C
2014-03-31 23:57 ` Dan McLeran
2014-04-03 22:55 ` Yung-Chin Chen
2014-04-03 23:12 ` Keith Busch
2014-04-04 0:18 ` Yung-Chin Chen
2014-04-04 15:33 ` Keith Busch
2014-04-04 3:23 ` Dan McLeran
2014-04-04 16:31 ` Matthew Wilcox
2014-04-04 15:22 ` Laura Jessen-SSI
2014-04-04 15:36 ` 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=1396283044-31926-1-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox