summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2009-05-13 01:53:08 -0400
committerSteven Toth <stoth@kernellabs.com>2009-05-13 01:53:08 -0400
commit01b13c92eaf233aab8de166cc76ef91497f3820a (patch)
tree11a117a703f3c9c759add21784c0cce2bf5b8aea /linux
parent7c13d46c1e8706314c3a09e8e1090d065f8a6e3e (diff)
downloadmediapointer-dvb-s2-01b13c92eaf233aab8de166cc76ef91497f3820a.tar.gz
mediapointer-dvb-s2-01b13c92eaf233aab8de166cc76ef91497f3820a.tar.bz2
SAA7164: Fix IRQ related system hang when firmware is not found.
From: Steven Toth <stoth@kernellabs.com> SAA7164: Fix IRQ related system hang when firmware is not found. Priority: normal Signed-off-by: Steven Toth <stoth@kernellabs.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/saa7164/saa7164-core.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/linux/drivers/media/video/saa7164/saa7164-core.c b/linux/drivers/media/video/saa7164/saa7164-core.c
index 75f7a9b38..6bb86abb9 100644
--- a/linux/drivers/media/video/saa7164/saa7164-core.c
+++ b/linux/drivers/media/video/saa7164/saa7164-core.c
@@ -157,8 +157,7 @@ static irqreturn_t saa7164_irq_ts(struct saa7164_tsport *port)
static irqreturn_t saa7164_irq(int irq, void *dev_id)
{
struct saa7164_dev *dev = dev_id;
- u32 hwacc = 0, interruptid;
- u32 intstat[INT_SIZE/4];
+ u32 intid, intstat[INT_SIZE/4];
int i, handled = 0, bit;
if (dev == 0) {
@@ -178,15 +177,11 @@ static irqreturn_t saa7164_irq(int irq, void *dev_id)
/* Read the 4 hardware interrupt registers */
intstat[i] = saa7164_readl(dev->int_status + (i * 4));
- if (intstat[i] != 0xffffffff)
- hwacc = 1;
+ if (intstat[i])
+ handled = 1;
}
- if (hwacc == 0) {
- handled = 0;
+ if (handled == 0)
goto out;
- }
-
- handled = 1;
/* For each of the HW interrupt registers */
for (i = 0; i < INT_SIZE/4; i++) {
@@ -203,17 +198,17 @@ static irqreturn_t saa7164_irq(int irq, void *dev_id)
/* Calculate the interrupt id (0x00 to 0x7f) */
- interruptid = (i * 32) + bit;
- if (interruptid == dev->intfdesc.bInterruptId) {
+ intid = (i * 32) + bit;
+ if (intid == dev->intfdesc.bInterruptId) {
/* A response to an cmd/api call */
schedule_work(&dev->workcmd);
- } else if (interruptid ==
+ } else if (intid ==
dev->ts1.hwcfg.interruptid) {
/* Transport path 1 */
saa7164_irq_ts(&dev->ts1);
- } else if (interruptid ==
+ } else if (intid ==
dev->ts2.hwcfg.interruptid) {
/* Transport path 2 */
@@ -225,7 +220,7 @@ static irqreturn_t saa7164_irq(int irq, void *dev_id)
"%s() unhandled interrupt "
"reg 0x%x bit 0x%x "
"intid = 0x%x\n",
- __func__, i, bit, interruptid);
+ __func__, i, bit, intid);
}
}
@@ -640,8 +635,9 @@ static int __devinit saa7164_initdev(struct pci_dev *pci_dev,
err = saa7164_downloadfirmware(dev);
if (err < 0) {
printk(KERN_ERR
- "Failed to boot firmware, cannot continue\n");
- goto fail_irq;
+ "Failed to boot firmware, no features "
+ "registered\n");
+ goto fail_fw;
}
saa7164_get_descriptors(dev);
@@ -717,6 +713,7 @@ static int __devinit saa7164_initdev(struct pci_dev *pci_dev,
printk(KERN_ERR "%s() Unsupported board detected, "
"registering without firmware\n", __func__);
+fail_fw:
return 0;
fail_irq: