All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NVMe: Skip orderly shutdown on failed devices
@ 2014-06-23 17:46 Keith Busch
  2014-06-25 12:37 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2014-06-23 17:46 UTC (permalink / raw)


Rather than skipping shutdown only for device's that have been removed,
skip the orderly shutdown on failed devices to avoid the long timeout
handling that inevitably happens when deleting queues on such a device.

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 b634233..30b7f64 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -2525,7 +2525,7 @@ static void nvme_dev_shutdown(struct nvme_dev *dev)
 	dev->initialized = 0;
 	nvme_dev_list_remove(dev);
 
-	if (!dev->bar || (dev->bar && readl(&dev->bar->csts) == -1)) {
+	if (!dev->bar || (dev->bar && readl(&dev->bar->csts) & NVME_CSTS_CFS)) {
 		for (i = dev->queue_count - 1; i >= 0; i--) {
 			struct nvme_queue *nvmeq = raw_nvmeq(dev, i);
 			nvme_suspend_queue(nvmeq);
-- 
1.7.10.4

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

end of thread, other threads:[~2014-06-25 17:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-23 17:46 [PATCH] NVMe: Skip orderly shutdown on failed devices Keith Busch
2014-06-25 12:37 ` Matthew Wilcox
2014-06-25 17:06   ` 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.