From: keith.busch@intel.com (Keith Busch)
Subject: [PATCHv2 5/5] NVMe: Add shutdown pci callback
Date: Fri, 16 Aug 2013 16:00:32 -0600 [thread overview]
Message-ID: <1376690432-9775-6-git-send-email-keith.busch@intel.com> (raw)
In-Reply-To: <1376690432-9775-1-git-send-email-keith.busch@intel.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
A couple vendors at FMS as well as a few firmware engineers I spoke with
highly recommended we do a safe shutdown sequence for their devices.
drivers/block/nvme-core.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index cb64866..84bb905 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -2272,6 +2272,12 @@ static void nvme_remove(struct pci_dev *pdev)
kref_put(&dev->kref, nvme_free_dev);
}
+static void nvme_shutdown(struct pci_dev *pdev)
+{
+ struct nvme_dev *dev = pci_get_drvdata(pdev);
+ nvme_dev_shutdown(dev);
+}
+
/* These functions are yet to be implemented */
#define nvme_error_detected NULL
#define nvme_dump_registers NULL
@@ -2325,6 +2331,7 @@ static struct pci_driver nvme_driver = {
.id_table = nvme_id_table,
.probe = nvme_probe,
.remove = nvme_remove,
+ .shutdown = nvme_shutdown,
.driver = {
.pm = &nvme_dev_pm_ops,
},
--
1.7.10.4
prev parent reply other threads:[~2013-08-16 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 22:00 [PATCHv2 0/5] NVMe: Controller reset and shutdown Keith Busch
2013-08-16 22:00 ` [PATCHv2 1/5] NVMe: Reset failed controller Keith Busch
2013-08-16 22:00 ` [PATCHv2 2/5] NVMe: User initiated controller reset Keith Busch
2013-08-16 22:00 ` [PATCHv2 3/5] NVMe: Reset controller on timed out commands Keith Busch
2013-08-16 22:00 ` [PATCHv2 4/5] NVMe: Don't wait for delete queues to finish Keith Busch
2013-08-16 22:00 ` 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=1376690432-9775-6-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;
as well as URLs for NNTP newsgroup(s).