Skip to content

Commit 3b8315f

Browse files
b-rad-NDimchehab
authored andcommitted
media: cx23885: Use PCI and TS masks in irq functions
Currently mask is read for pci_status/ts1_status/ts2_status, but otherwise ignored. The masks are now used to determine whether action is warranted. Signed-off-by: Brad Love <brad@nextdimension.cc> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1 parent 9a7dc2b commit 3b8315f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

drivers/media/pci/cx23885/cx23885-core.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,12 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id)
17041704

17051705
pci_status = cx_read(PCI_INT_STAT);
17061706
pci_mask = cx23885_irq_get_mask(dev);
1707+
if ((pci_status & pci_mask) == 0) {
1708+
dprintk(7, "pci_status: 0x%08x pci_mask: 0x%08x\n",
1709+
pci_status, pci_mask);
1710+
goto out;
1711+
}
1712+
17071713
vida_status = cx_read(VID_A_INT_STAT);
17081714
vida_mask = cx_read(VID_A_INT_MSK);
17091715
audint_status = cx_read(AUDIO_INT_INT_STAT);
@@ -1713,7 +1719,9 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id)
17131719
ts2_status = cx_read(VID_C_INT_STAT);
17141720
ts2_mask = cx_read(VID_C_INT_MSK);
17151721

1716-
if ((pci_status == 0) && (ts2_status == 0) && (ts1_status == 0))
1722+
if (((pci_status & pci_mask) == 0) &&
1723+
((ts2_status & ts2_mask) == 0) &&
1724+
((ts1_status & ts1_mask) == 0))
17171725
goto out;
17181726

17191727
vida_count = cx_read(VID_A_GPCNT);
@@ -1840,7 +1848,7 @@ static irqreturn_t cx23885_irq(int irq, void *dev_id)
18401848
}
18411849

18421850
if (handled)
1843-
cx_write(PCI_INT_STAT, pci_status);
1851+
cx_write(PCI_INT_STAT, pci_status & pci_mask);
18441852
out:
18451853
return IRQ_RETVAL(handled);
18461854
}

0 commit comments

Comments
 (0)