Commit 428ed602 authored by Dan Aloni's avatar Dan Aloni Committed by Dan Williams

I/OAT: fix I/OAT for kexec

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: default avatarDan Aloni <da-x@monatomic.org>
Signed-off-by: default avatarChris Leech <christopher.leech@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent e00c5d8b
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
/* internal functions */ /* internal functions */
static int __devinit ioat_probe(struct pci_dev *pdev, const struct pci_device_id *ent); 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 void __devexit ioat_remove(struct pci_dev *pdev);
static int enumerate_dma_channels(struct ioat_device *device) static int enumerate_dma_channels(struct ioat_device *device)
...@@ -557,6 +558,7 @@ static struct pci_driver ioat_pci_driver = { ...@@ -557,6 +558,7 @@ static struct pci_driver ioat_pci_driver = {
.name = "ioatdma", .name = "ioatdma",
.id_table = ioat_pci_tbl, .id_table = ioat_pci_tbl,
.probe = ioat_probe, .probe = ioat_probe,
.shutdown = ioat_shutdown,
.remove = __devexit_p(ioat_remove), .remove = __devexit_p(ioat_remove),
}; };
...@@ -781,9 +783,20 @@ static int __devinit ioat_probe(struct pci_dev *pdev, ...@@ -781,9 +783,20 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
err_set_dma_mask: err_set_dma_mask:
pci_disable_device(pdev); pci_disable_device(pdev);
err_enable_device: err_enable_device:
printk(KERN_ERR "Intel(R) I/OAT DMA Engine initialization failed\n");
return err; 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) static void __devexit ioat_remove(struct pci_dev *pdev)
{ {
struct ioat_device *device; struct ioat_device *device;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment