static void t163c_interrupt(int intno, void *dev_id, struct pt_regs *regs) { struct IsdnCardState *cs = dev_id; u_char val, stat; char tmp[32]; if (!cs) { printk(KERN_WARNING "teles3c: Spurious interrupt!\n"); return; } if ((HFCD_ANYINT | HFCD_BUSY_NBUSY) & (stat = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_STAT))) { val = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_INT_S1); if (cs->debug & L1_DEB_ISAC) { sprintf(tmp, "teles3c: stat(%02x) s1(%02x)", stat, val); debugl1(cs, tmp); } hfc2bds0_interrupt(cs, val); } else { if (cs->debug & L1_DEB_ISAC) { sprintf(tmp, "teles3c: irq_no_irq stat(%02x)", stat); debugl1(cs, tmp); } } }
static irqreturn_t hfcs_interrupt(int intno, void *dev_id) { struct IsdnCardState *cs = dev_id; u_char val, stat; u_long flags; spin_lock_irqsave(&cs->lock, flags); if ((HFCD_ANYINT | HFCD_BUSY_NBUSY) & (stat = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_STAT))) { val = cs->BC_Read_Reg(cs, HFCD_DATA, HFCD_INT_S1); if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFCS: stat(%02x) s1(%02x)", stat, val); hfc2bds0_interrupt(cs, val); } else { if (cs->debug & L1_DEB_ISAC) debugl1(cs, "HFCS: irq_no_irq stat(%02x)", stat); } spin_unlock_irqrestore(&cs->lock, flags); return IRQ_HANDLED; }