All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: Increase shutdown complete time
@ 2014-03-31 16:24 Keith Busch
  2014-03-31 18:56 ` Dan McLeran
  2014-04-04 15:22 ` Laura Jessen-SSI
  0 siblings, 2 replies; 12+ messages in thread
From: Keith Busch @ 2014-03-31 16:24 UTC (permalink / 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

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-04-04 16:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-31 16:24 [PATCH] NVMe: Increase shutdown complete time Keith Busch
2014-03-31 18:56 ` 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

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.