summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-01-10 16:04:45 -0500
committerAndy Walls <awalls@radix.net>2009-01-10 16:04:45 -0500
commita7eec9c2d5f8725340da03c5509bf04980a03072 (patch)
tree4abbb7d4e5d82720e8201662eeac03266384a9ac /linux/drivers/media/video/saa7134
parent3ba27c900cccb378926138315d78e418be98bd37 (diff)
downloadmediapointer-dvb-s2-a7eec9c2d5f8725340da03c5509bf04980a03072.tar.gz
mediapointer-dvb-s2-a7eec9c2d5f8725340da03c5509bf04980a03072.tar.bz2
saa7134: Prevent Oops due to stale IRQ status when enabling interrupts
From: Andy Walls <awalls@radix.net> 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> Priority: normal Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video/saa7134')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 2e9a015e9..624ac4537 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -721,6 +721,10 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
saa_writel(SAA7134_IRQ1, 0);
saa_writel(SAA7134_IRQ2, 0);
+
+ /* Clear any stale IRQ reports */
+ saa_writel(SAA7134_IRQ_REPORT, saa_readl(SAA7134_IRQ_REPORT));
+
mutex_init(&dev->lock);
spin_lock_init(&dev->slock);