Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3203cb86d22c63504f8368151029bf9dad014ddb
Commit:     3203cb86d22c63504f8368151029bf9dad014ddb
Parent:     0d65cd4f2bfe70872e4218d9d35d37a7000d6739
Author:     Maxim Levitsky <[EMAIL PROTECTED]>
AuthorDate: Sun Nov 4 19:34:23 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:44 2008 -0200

    V4L/DVB (6668): Fix theoretical races between IRQ handler and 
.suspend/resume
    
    *dev->insuspend = 1 should be set before synchronize_irq
     *ACK interrupts after synchronize_irq, to make sure there aren't
     pending interrupts.
     *Add barrier before we restart interrupts so the handler will 100%
     see the dev->insuspend
    
    Signed-off-by: Maxim Levitsky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/saa7134/saa7134-core.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/saa7134/saa7134-core.c 
b/drivers/media/video/saa7134/saa7134-core.c
index 40cdec2..85c165d 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -1181,8 +1181,13 @@ static int saa7134_suspend(struct pci_dev *pci_dev , 
pm_message_t state)
        saa_writel(SAA7134_IRQ2, 0);
        saa_writel(SAA7134_MAIN_CTRL, 0);
 
-       synchronize_irq(pci_dev->irq);
        dev->insuspend = 1;
+       synchronize_irq(pci_dev->irq);
+
+       /* ACK interrupts once more, just in case,
+               since the IRQ handler won't ack them anymore*/
+
+       saa_writel(SAA7134_IRQ_REPORT, saa_readl(SAA7134_IRQ_REPORT));
 
        /* Disable timeout timers - if we have active buffers, we will
           fill them on resume*/
@@ -1246,6 +1251,7 @@ static int saa7134_resume(struct pci_dev *pci_dev)
 
        /* start DMA now*/
        dev->insuspend = 0;
+       smp_wmb();
        saa7134_set_dmabits(dev);
        spin_unlock_irqrestore(&dev->slock, flags);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to