patch-2.2.14 linux/drivers/isdn/hisax/netjet.c
Next file: linux/drivers/isdn/hisax/rawhdlc.c
Previous file: linux/drivers/isdn/hisax/md5sums.asc
Back to the patch index
Back to the overall index
- Lines: 107
- Date:
Tue Jan 4 10:12:16 2000
- Orig file:
v2.2.13/linux/drivers/isdn/hisax/netjet.c
- Orig date:
Tue Jan 4 11:10:35 2000
diff -u --recursive --new-file v2.2.13/linux/drivers/isdn/hisax/netjet.c linux/drivers/isdn/hisax/netjet.c
@@ -1,4 +1,4 @@
-/* $Id: netjet.c,v 1.15 1999/09/04 06:20:06 keil Exp $
+/* $Id: netjet.c,v 1.17 1999/12/19 13:09:42 keil Exp $
* netjet.c low level stuff for Traverse Technologie NETJet ISDN cards
*
@@ -7,6 +7,13 @@
* Thanks to Traverse Technologie Australia for documents and informations
*
* $Log: netjet.c,v $
+ * Revision 1.17 1999/12/19 13:09:42 keil
+ * changed TASK_INTERRUPTIBLE into TASK_UNINTERRUPTIBLE for
+ * signal proof delays
+ *
+ * Revision 1.16 1999/10/14 20:25:29 keil
+ * add a statistic for error monitoring
+ *
* Revision 1.15 1999/09/04 06:20:06 keil
* Changes from kernel set_current_state()
*
@@ -78,7 +85,7 @@
extern const char *CardType[];
-const char *NETjet_revision = "$Revision: 1.15 $";
+const char *NETjet_revision = "$Revision: 1.17 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -528,19 +535,26 @@
debugl1(bcs->cs, "tiger: frame not byte aligned");
state=HDLC_FLAG_SEARCH;
bcs->hw.tiger.r_err++;
+#ifdef ERROR_STATISTIC
+ bcs->err_inv++;
+#endif
} else {
if (bcs->cs->debug & L1_DEB_HSCX)
debugl1(bcs->cs,"tiger frame end(%d,%d): fcs(%x) i %x",
i,j,bcs->hw.tiger.r_fcs, bcs->cs->hw.njet.irqstat0);
if (bcs->hw.tiger.r_fcs == PPP_GOODFCS) {
got_frame(bcs, (bitcnt>>3)-3);
- } else
+ } else {
if (bcs->cs->debug) {
debugl1(bcs->cs, "tiger FCS error");
printframe(bcs->cs, bcs->hw.tiger.rcvbuf,
(bitcnt>>3)-1, "rec");
bcs->hw.tiger.r_err++;
}
+#ifdef ERROR_STATISTIC
+ bcs->err_crc++;
+#endif
+ }
state=HDLC_FLAG_FOUND;
}
bitcnt=0;
@@ -562,6 +576,9 @@
r_val=0;
state=HDLC_FLAG_SEARCH;
bcs->hw.tiger.r_err++;
+#ifdef ERROR_STATISTIC
+ bcs->err_inv++;
+#endif
} else {
bcs->hw.tiger.rcvbuf[(bitcnt>>3)-1] = r_val;
bcs->hw.tiger.r_fcs =
@@ -586,6 +603,12 @@
if ((cs->hw.njet.irqstat0 & cs->hw.njet.last_is0) & NETJET_IRQM0_READ) {
debugl1(cs,"tiger warn read double dma %x/%x",
cs->hw.njet.irqstat0, cs->hw.njet.last_is0);
+#ifdef ERROR_STATISTIC
+ if (cs->bcs[0].mode)
+ cs->bcs[0].err_rdo++;
+ if (cs->bcs[1].mode)
+ cs->bcs[1].err_rdo++;
+#endif
return;
} else {
cs->hw.njet.last_is0 &= ~NETJET_IRQM0_READ;
@@ -757,6 +780,12 @@
if ((cs->hw.njet.irqstat0 & cs->hw.njet.last_is0) & NETJET_IRQM0_WRITE) {
debugl1(cs,"tiger warn write double dma %x/%x",
cs->hw.njet.irqstat0, cs->hw.njet.last_is0);
+#ifdef ERROR_STATISTIC
+ if (cs->bcs[0].mode)
+ cs->bcs[0].err_tx++;
+ if (cs->bcs[1].mode)
+ cs->bcs[1].err_tx++;
+#endif
return;
} else {
cs->hw.njet.last_is0 &= ~NETJET_IRQM0_WRITE;
@@ -1029,11 +1058,11 @@
sti();
cs->hw.njet.ctrl_reg = 0xff; /* Reset On */
byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
- current->state = TASK_INTERRUPTIBLE;
+ current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
cs->hw.njet.ctrl_reg = 0x00; /* Reset Off and status read clear */
byteout(cs->hw.njet.base + NETJET_CTRL, cs->hw.njet.ctrl_reg);
- current->state = TASK_INTERRUPTIBLE;
+ current->state = TASK_UNINTERRUPTIBLE;
schedule_timeout((10*HZ)/1000); /* Timeout 10ms */
restore_flags(flags);
cs->hw.njet.auxd = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)