aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-01-10 16:04:45 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-29 05:35:38 -0500
commit7ef5e025535ee220d7ba45dcd82f05ddce8c3e4c (patch)
tree6914684de5874aa3a1fd93aff3443b8f2169b961 /drivers/media/video/saa7134
parentcd8f894eacf13996d920fdd2aef1afc55156b191 (diff)
V4L/DVB (10219): saa7134: Prevent Oops due to stale IRQ status when enabling interrupts
When enabling a shared IRQ line, then saa7134_irq handler could be invoked before the driver had completely set up internal structures, due to a shared interrupt line firing. Clear the saa7134 interrupt status reg, before requesting the irq line, so that stale IRQ status isn't processed before the internal structures are set up. Marcin Slusarz recently brought this Oops to the attention of the v4l-dvb lists and provided an initial analysis by investigating reports found here: http://kerneloops.org/guilty.php?guilty=mute_input_7133&version=2.6.27-release&start=1802240&end=1835007&class=oops Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index dfbe08a9ad9..99221d726ed 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -660,6 +660,10 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
660 660
661 saa_writel(SAA7134_IRQ1, 0); 661 saa_writel(SAA7134_IRQ1, 0);
662 saa_writel(SAA7134_IRQ2, 0); 662 saa_writel(SAA7134_IRQ2, 0);
663
664 /* Clear any stale IRQ reports */
665 saa_writel(SAA7134_IRQ_REPORT, saa_readl(SAA7134_IRQ_REPORT));
666
663 mutex_init(&dev->lock); 667 mutex_init(&dev->lock);
664 spin_lock_init(&dev->slock); 668 spin_lock_init(&dev->slock);
665 669