[BNX2]: Add 5708S parallel detection.
[safe/jmp/linux-2.6] / drivers / dma / ioatdma.c
index 11d48b9..0358419 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/interrupt.h>
 #include <linux/dmaengine.h>
 #include <linux/delay.h>
+#include <linux/dma-mapping.h>
 #include "ioatdma.h"
 #include "ioatdma_io.h"
 #include "ioatdma_registers.h"
@@ -79,7 +80,7 @@ static int enumerate_dma_channels(struct ioat_device *device)
 
 static struct ioat_desc_sw *ioat_dma_alloc_descriptor(
        struct ioat_dma_chan *ioat_chan,
-       int flags)
+       gfp_t flags)
 {
        struct ioat_dma_descriptor *desc;
        struct ioat_desc_sw *desc_sw;
@@ -216,7 +217,7 @@ static void ioat_dma_free_chan_resources(struct dma_chan *chan)
 
 /**
  * do_ioat_dma_memcpy - actual function that initiates a IOAT DMA transaction
- * @chan: IOAT DMA channel handle
+ * @ioat_chan: IOAT DMA channel handle
  * @dest: DMA destination address
  * @src: DMA source address
  * @len: transaction length in bytes
@@ -382,7 +383,7 @@ static dma_cookie_t ioat_dma_memcpy_buf_to_pg(struct dma_chan *chan,
  * @dest_off: offset into that page
  * @src_pg: pointer to the page to copy from
  * @src_off: offset into that page
- * @len: transaction length in bytes. This is guaranteed to not make a copy
+ * @len: transaction length in bytes. This is guaranteed not to make a copy
  *      across a page boundary.
  */
 
@@ -406,7 +407,7 @@ static dma_cookie_t ioat_dma_memcpy_pg_to_pg(struct dma_chan *chan,
 }
 
 /**
- * ioat_dma_memcpy_issue_pending - push potentially unrecognoized appended descriptors to hw
+ * ioat_dma_memcpy_issue_pending - push potentially unrecognized appended descriptors to hw
  * @chan: DMA channel handle
  */
 
@@ -509,6 +510,8 @@ static void ioat_dma_memcpy_cleanup(struct ioat_dma_chan *chan)
  * ioat_dma_is_complete - poll the status of a IOAT DMA transaction
  * @chan: IOAT DMA channel handle
  * @cookie: DMA transaction identifier
+ * @done: if not %NULL, updated with last completed transaction
+ * @used: if not %NULL, updated with last used transaction
  */
 
 static enum dma_status ioat_dma_is_complete(struct dma_chan *chan,
@@ -560,7 +563,7 @@ static struct pci_driver ioat_pci_drv = {
        .remove = __devexit_p(ioat_remove),
 };
 
-static irqreturn_t ioat_do_interrupt(int irq, void *data, struct pt_regs *regs)
+static irqreturn_t ioat_do_interrupt(int irq, void *data)
 {
        struct ioat_device *instance = data;
        unsigned long attnstatus;
@@ -683,7 +686,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
 {
        int err;
        unsigned long mmio_start, mmio_len;
-       void *reg_base;
+       void __iomem *reg_base;
        struct ioat_device *device;
 
        err = pci_enable_device(pdev);
@@ -738,7 +741,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
                device->msi = 0;
        }
 #endif
-       err = request_irq(pdev->irq, &ioat_do_interrupt, SA_SHIRQ, "ioat",
+       err = request_irq(pdev->irq, &ioat_do_interrupt, IRQF_SHARED, "ioat",
                device);
        if (err)
                goto err_irq;
@@ -823,10 +826,9 @@ static int __init ioat_init_module(void)
 {
        /* it's currently unsafe to unload this module */
        /* if forced, worst case is that rmmod hangs */
-       if (THIS_MODULE != NULL)
-               THIS_MODULE->unsafe = 1;
+       __unsafe(THIS_MODULE);
 
-       return pci_module_init(&ioat_pci_drv);
+       return pci_register_driver(&ioat_pci_drv);
 }
 
 module_init(ioat_init_module);