patch-2.3.14 linux/drivers/isdn/hisax/s0box.c
Next file: linux/drivers/isdn/hisax/saphir.c
Previous file: linux/drivers/isdn/hisax/niccy.c
Back to the patch index
Back to the overall index
- Lines: 87
- Date:
Thu Aug 12 09:42:33 1999
- Orig file:
v2.3.13/linux/drivers/isdn/hisax/s0box.c
- Orig date:
Sun May 23 10:03:41 1999
diff -u --recursive --new-file v2.3.13/linux/drivers/isdn/hisax/s0box.c linux/drivers/isdn/hisax/s0box.c
@@ -1,4 +1,4 @@
-/* $Id: s0box.c,v 2.1 1998/04/15 16:38:24 keil Exp $
+/* $Id: s0box.c,v 2.2 1999/07/12 21:05:25 keil Exp $
* s0box.c low level stuff for Creatix S0BOX
*
@@ -13,7 +13,7 @@
#include "isdnl1.h"
extern const char *CardType[];
-const char *s0box_revision = "$Revision: 2.1 $";
+const char *s0box_revision = "$Revision: 2.2 $";
static inline void
writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
@@ -148,9 +148,9 @@
static void
s0box_interrupt(int intno, void *dev_id, struct pt_regs *regs)
{
-#define MAXCOUNT 20
+#define MAXCOUNT 5
struct IsdnCardState *cs = dev_id;
- u_char val, stat = 0;
+ u_char val;
int count = 0;
if (!cs) {
@@ -159,16 +159,12 @@
}
val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_ISTA);
Start_HSCX:
- if (val) {
+ if (val)
hscx_int_main(cs, val);
- stat |= 1;
- }
val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_ISTA);
Start_ISAC:
- if (val) {
+ if (val)
isac_interrupt(cs, val);
- stat |= 2;
- }
count++;
val = readreg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_ISTA);
if (val && count < MAXCOUNT) {
@@ -184,16 +180,12 @@
}
if (count >= MAXCOUNT)
printk(KERN_WARNING "S0Box: more than %d loops in s0box_interrupt\n", count);
- if (stat & 1) {
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0xFF);
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0xFF);
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0x0);
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0x0);
- }
- if (stat & 2) {
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0xFF);
- writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0x0);
- }
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0xFF);
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0xFF);
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0xFF);
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.isac, ISAC_MASK, 0x0);
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[0], HSCX_MASK, 0x0);
+ writereg(cs->hw.teles3.cfg_reg, cs->hw.teles3.hscx[1], HSCX_MASK, 0x0);
}
void
@@ -211,9 +203,6 @@
case CARD_RELEASE:
release_io_s0box(cs);
break;
- case CARD_SETIRQ:
- return(request_irq(cs->irq, &s0box_interrupt,
- I4L_IRQ_FLAG, "HiSax", cs));
case CARD_INIT:
inithscxisac(cs, 3);
break;
@@ -266,6 +255,7 @@
cs->BC_Write_Reg = &WriteHSCX;
cs->BC_Send_Data = &hscx_fill_fifo;
cs->cardmsg = &S0Box_card_msg;
+ cs->irq_func = &s0box_interrupt;
ISACVersion(cs, "S0Box:");
if (HscxVersion(cs, "S0Box:")) {
printk(KERN_WARNING
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)