1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00

fix handling of separated MSI IRQs

This commit is contained in:
Ralph Metzler 2018-03-04 23:43:39 +01:00
parent dedb5bd387
commit 948c6c4fe7

View File

@ -2775,16 +2775,17 @@ static void irq_handle_io(struct ddb *dev, u32 s)
irqreturn_t ddb_irq_handler0(int irq, void *dev_id)
{
struct ddb *dev = (struct ddb *)dev_id;
u32 s = ddbreadl(dev, INTERRUPT_STATUS);
u32 mask = 0x8fffff00;
u32 s = mask & ddbreadl(dev, INTERRUPT_STATUS);
if (!s)
return IRQ_NONE;
do {
if (s & 0x80000000)
return IRQ_NONE;
if (!(s & 0xfffff00))
return IRQ_NONE;
ddbwritel(dev, s & 0xfffff00, INTERRUPT_ACK);
ddbwritel(dev, s, INTERRUPT_ACK);
irq_handle_io(dev, s);
} while ((s = ddbreadl(dev, INTERRUPT_STATUS)));
} while ((s = mask & ddbreadl(dev, INTERRUPT_STATUS)));
return IRQ_HANDLED;
}
@ -2792,16 +2793,17 @@ irqreturn_t ddb_irq_handler0(int irq, void *dev_id)
irqreturn_t ddb_irq_handler1(int irq, void *dev_id)
{
struct ddb *dev = (struct ddb *)dev_id;
u32 s = ddbreadl(dev, INTERRUPT_STATUS);
u32 mask = 0x8000000f;
u32 s = mask & ddbreadl(dev, INTERRUPT_STATUS);
if (!s)
return IRQ_NONE;
do {
if (s & 0x80000000)
return IRQ_NONE;
if (!(s & 0x0000f))
return IRQ_NONE;
ddbwritel(dev, s & 0x0000f, INTERRUPT_ACK);
ddbwritel(dev, s, INTERRUPT_ACK);
irq_handle_msg(dev, s);
} while ((s = ddbreadl(dev, INTERRUPT_STATUS)));
} while ((s = mask & ddbreadl(dev, INTERRUPT_STATUS)));
return IRQ_HANDLED;
}