Staging: vme: Add syncronize interrupts before removing callback
authorMartyn Welch <martyn.welch@gefanuc.com>
Tue, 11 Aug 2009 12:50:49 +0000 (13:50 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:10 +0000 (12:02 -0700)
As identified by Jiri, there is no syncronisation before callback is removed.

Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/vme/bridges/vme_tsi148.c

index cdc2919893919e72777ba63571deea1bf736b40c..a4929ad3f08a7ed97573fb2d0d9a2c7107c43677 100644 (file)
@@ -480,6 +480,7 @@ int tsi148_request_irq(int level, int statid,
 void tsi148_free_irq(int level, int statid)
 {
        u32 tmp;
+       struct pci_dev *pdev;
 
        /* Get semaphore */
        down(&(vme_irq));
@@ -495,6 +496,10 @@ void tsi148_free_irq(int level, int statid)
                tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO);
                tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1];
                iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO);
+
+               pdev = container_of(tsi148_bridge->parent, struct pci_dev, dev);
+
+               synchronize_irq(pdev->irq);
        }
 
        tsi148_bridge->irq[level - 1].callback[statid].func = NULL;