Skip to content

Commit

Permalink
V4L/DVB (10219): saa7134: Prevent Oops due to stale IRQ status when e…
Browse files Browse the repository at this point in the history
…nabling 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>
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Jan 29, 2009
1 parent cd8f894 commit 7ef5e02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/video/saa7134/saa7134-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,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);

Expand Down

0 comments on commit 7ef5e02

Please sign in to comment.