Skip to content

Commit

Permalink
I/OAT: fix I/OAT for kexec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Aloni authored and Dan Williams committed Jul 11, 2007
1 parent e00c5d8 commit 428ed60
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/dma/ioatdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -557,6 +558,7 @@ static struct pci_driver ioat_pci_driver = {
.name = "ioatdma",
.id_table = ioat_pci_tbl,
.probe = ioat_probe,
.shutdown = ioat_shutdown,
.remove = __devexit_p(ioat_remove),
};

Expand Down Expand Up @@ -781,9 +783,20 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
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;
Expand Down

0 comments on commit 428ed60

Please sign in to comment.