From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH] nvme-pci: Skip queue deletion if there are no queues
Date: Wed, 28 Mar 2018 14:22:40 -0600 [thread overview]
Message-ID: <20180328202240.GK13039@localhost.localdomain> (raw)
In-Reply-To: <d5c52e3e-977d-7f44-bd7d-4ec5b82d39c1@gmail.com>
On Wed, Mar 28, 2018@03:13:37PM -0500, Alex G. wrote:
> Which branch am I supposed to be using to test this? It doesn't apply to
> mainline.
This is targeted to the 4.17 staging trees (sorry, this doesn't seem to
be a good 4.16 candidate this late in the game). This should apply on
linux-block for-4.17/block here:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-4.17/block
A 4.16 port would would like this:
---
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index b6f43b738f03..2459067d208b 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2194,7 +2194,7 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
* Give the controller a chance to complete all entered requests if
* doing a safe shutdown.
*/
- if (!dead) {
+ if (!dead && dev->ctrl.queue_count > 0) {
if (shutdown)
nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);
--
next prev parent reply other threads:[~2018-03-28 20:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 18:04 [PATCH] nvme-pci: Skip queue deletion if there are no queues Keith Busch
[not found] ` <e872954fedc943c08ef11451679d5a2c@AUSX13MPS305.AMER.DELL.COM>
2018-03-28 20:13 ` Alex G.
2018-03-28 20:22 ` Keith Busch [this message]
2018-03-28 21:02 ` Alex G.
2018-04-04 13:00 ` Sagi Grimberg
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=20180328202240.GK13039@localhost.localdomain \
--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