I/OAT: cancel watchdog before dma remove
authorMaciej Sosnowski <maciej.sosnowski@intel.com>
Thu, 26 Feb 2009 10:05:07 +0000 (11:05 +0100)
committerDan Williams <dan.j.williams@intel.com>
Wed, 4 Mar 2009 23:04:40 +0000 (16:04 -0700)
Channel watchdog should be canceled before the rest of dma remove stuff.

Signed-off-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/ioat_dma.c

index 9012da7908f52b05f54ca68c7fba5325dac401c9..fc9b845ee8937094b15db37097bf1f3883a45ed7 100644 (file)
@@ -1705,6 +1705,9 @@ void ioat_dma_remove(struct ioatdma_device *device)
        struct dma_chan *chan, *_chan;
        struct ioat_dma_chan *ioat_chan;
 
+       if (device->version != IOAT_VER_3_0)
+               cancel_delayed_work(&device->work);
+
        ioat_dma_remove_interrupts(device);
 
        dma_async_device_unregister(&device->common);
@@ -1716,10 +1719,6 @@ void ioat_dma_remove(struct ioatdma_device *device)
        pci_release_regions(device->pdev);
        pci_disable_device(device->pdev);
 
-       if (device->version != IOAT_VER_3_0) {
-               cancel_delayed_work(&device->work);
-       }
-
        list_for_each_entry_safe(chan, _chan,
                                 &device->common.channels, device_node) {
                ioat_chan = to_ioat_chan(chan);