netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Leech <christopher.leech@intel.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 9/9] I/OAT: fix I/OAT for kexec
Date: Fri, 02 Mar 2007 18:24:34 -0800	[thread overview]
Message-ID: <20070303022434.31033.78320.stgit@gitlost.site> (raw)
In-Reply-To: <20070303022238.31033.84558.stgit@gitlost.site>

Under kexec, I/OAT initialization breaks over busy resources because the
previous kernel did not release them.

I'm not sure this fix can be considered a complete one but it works for me.
 I guess something similar to the *_remove method should occur there..

Signed-off-by: Dan Aloni <da-x@monatomic.org>
Signed-off-by: Chris Leech <christopher.leech@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/dma/ioatdma.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c
index cbf93ca..1d259e5 100644
--- a/drivers/dma/ioatdma.c
+++ b/drivers/dma/ioatdma.c
@@ -41,6 +41,7 @@
 
 /* internal functions */
 static int __devinit ioat_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+static void ioat_shutdown(struct pci_dev *pdev);
 static void __devexit ioat_remove(struct pci_dev *pdev);
 
 static int enumerate_dma_channels(struct ioat_device *device)
@@ -557,6 +558,7 @@ static struct pci_driver ioat_pci_drv = {
 	.name 	= "ioatdma",
 	.id_table = ioat_pci_tbl,
 	.probe	= ioat_probe,
+	.shutdown = ioat_shutdown,
 	.remove	= __devexit_p(ioat_remove),
 };
 
@@ -781,9 +783,20 @@ err_request_regions:
 err_set_dma_mask:
 	pci_disable_device(pdev);
 err_enable_device:
+
+	printk(KERN_ERR "Intel(R) I/OAT DMA Engine initialization failed\n");
+
 	return err;
 }
 
+static void ioat_shutdown(struct pci_dev *pdev)
+{
+	struct ioat_device *device;
+	device = pci_get_drvdata(pdev);
+
+	dma_async_device_unregister(&device->common);
+}
+
 static void __devexit ioat_remove(struct pci_dev *pdev)
 {
 	struct ioat_device *device;


      parent reply	other threads:[~2007-03-03  2:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03  2:22 [PATCH 0/9] I/OAT fixes Chris Leech
2007-03-03  2:24 ` [PATCH 1/9] ioatdma: Push pending transactions to hardware more frequently Chris Leech
2007-03-03  3:14   ` Jeff Garzik
2007-03-03  4:27     ` David Miller
2007-03-03  6:00       ` Chris Leech
2007-03-03  2:24 ` [PATCH 2/9] drivers/dma: handle sysfs errors Chris Leech
2007-03-03  2:24 ` [PATCH 3/9] ioatdma: Remove the wrappers around read(bwl)/write(bwl) in ioatdma Chris Leech
2007-03-03  2:24 ` [PATCH 4/9] ioatdma: Remove the use of writeq from the ioatdma driver Chris Leech
2007-03-03  2:24 ` [PATCH 5/9] I/OAT: Add documentation for the tcp_dma_copybreak sysctl Chris Leech
2007-03-03  2:24 ` [PATCH 6/9] I/OAT: Add entries to MAINTAINERS for the DMA memcpy subsystem and ioatdma Chris Leech
2007-03-03  2:24 ` [PATCH 7/9] I/OAT: Only offload copies for TCP when there will be a context switch Chris Leech
2007-03-03  2:24 ` [PATCH 8/9] I/OAT: warning fix Chris Leech
2007-03-03  2:24 ` Chris Leech [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=20070303022434.31033.78320.stgit@gitlost.site \
    --to=christopher.leech@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).