patch-2.2.11 linux/drivers/isdn/hisax/ix1_micro.c
Next file: linux/drivers/isdn/hisax/jade.c
Previous file: linux/drivers/isdn/hisax/isurf.c
Back to the patch index
Back to the overall index
- Lines: 104
- Date:
Mon Aug 9 12:04:39 1999
- Orig file:
v2.2.10/linux/drivers/isdn/hisax/ix1_micro.c
- Orig date:
Wed Apr 1 16:21:01 1998
diff -u --recursive --new-file v2.2.10/linux/drivers/isdn/hisax/ix1_micro.c linux/drivers/isdn/hisax/ix1_micro.c
@@ -1,4 +1,4 @@
-/* $Id: ix1_micro.c,v 2.6 1998/02/11 17:28:09 keil Exp $
+/* $Id: ix1_micro.c,v 2.8 1999/07/12 21:05:19 keil Exp $
* ix1_micro.c low level stuff for ITK ix1-micro Rev.2 isdn cards
* derived from the original file teles3.c from Karsten Keil
@@ -11,6 +11,13 @@
* Beat Doebeli
*
* $Log: ix1_micro.c,v $
+ * Revision 2.8 1999/07/12 21:05:19 keil
+ * fix race in IRQ handling
+ * added watchdog for lost IRQs
+ *
+ * Revision 2.7 1998/04/15 16:44:31 keil
+ * new init code
+ *
* Revision 2.6 1998/02/11 17:28:09 keil
* Niccy PnP/PCI support
*
@@ -81,7 +88,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *ix1_revision = "$Revision: 2.6 $";
+const char *ix1_revision = "$Revision: 2.8 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -196,7 +203,7 @@
ix1micro_interrupt(int intno, void *dev_id, struct pt_regs *regs)
{
struct IsdnCardState *cs = dev_id;
- u_char val, stat = 0;
+ u_char val;
if (!cs) {
printk(KERN_WARNING "IX1: Spurious interrupt!\n");
@@ -204,16 +211,12 @@
}
val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40);
Start_HSCX:
- if (val) {
+ if (val)
hscx_int_main(cs, val);
- stat |= 1;
- }
val = readreg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_ISTA);
Start_ISAC:
- if (val) {
+ if (val)
isac_interrupt(cs, val);
- stat |= 2;
- }
val = readreg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_ISTA + 0x40);
if (val) {
if (cs->debug & L1_DEB_HSCX)
@@ -226,16 +229,12 @@
debugl1(cs, "ISAC IntStat after IntRoutine");
goto Start_ISAC;
}
- if (stat & 1) {
- writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0xFF);
- writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0xFF);
- writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0);
- writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0);
- }
- if (stat & 2) {
- writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0xFF);
- writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0);
- }
+ writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0xFF);
+ writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0xFF);
+ writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0xFF);
+ writereg(cs->hw.ix1.isac_ale, cs->hw.ix1.isac, ISAC_MASK, 0);
+ writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK, 0);
+ writereg(cs->hw.ix1.hscx_ale, cs->hw.ix1.hscx, HSCX_MASK + 0x40, 0);
}
void
@@ -273,14 +272,8 @@
case CARD_RELEASE:
release_io_ix1micro(cs);
return(0);
- case CARD_SETIRQ:
- return(request_irq(cs->irq, &ix1micro_interrupt,
- I4L_IRQ_FLAG, "HiSax", cs));
case CARD_INIT:
- clear_pending_isac_ints(cs);
- clear_pending_hscx_ints(cs);
- initisac(cs);
- inithscx(cs);
+ inithscxisac(cs, 3);
return(0);
case CARD_TEST:
return(0);
@@ -331,6 +324,7 @@
cs->BC_Write_Reg = &WriteHSCX;
cs->BC_Send_Data = &hscx_fill_fifo;
cs->cardmsg = &ix1_card_msg;
+ cs->irq_func = &ix1micro_interrupt;
ISACVersion(cs, "ix1-Micro:");
if (HscxVersion(cs, "ix1-Micro:")) {
printk(KERN_WARNING
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)