patch-2.2.14 linux/drivers/isdn/hisax/isar.c
Next file: linux/drivers/isdn/hisax/isar.h
Previous file: linux/drivers/isdn/hisax/isac.h
Back to the patch index
Back to the overall index
- Lines: 103
- Date:
Tue Jan 4 10:12:16 2000
- Orig file:
v2.2.13/linux/drivers/isdn/hisax/isar.c
- Orig date:
Tue Jan 4 11:10:34 2000
diff -u --recursive --new-file v2.2.13/linux/drivers/isdn/hisax/isar.c linux/drivers/isdn/hisax/isar.c
@@ -1,4 +1,4 @@
-/* $Id: isar.c,v 1.6 1999/08/31 11:20:20 paul Exp $
+/* $Id: isar.c,v 1.8 1999/12/19 13:00:56 keil Exp $
* isar.c ISAR (Siemens PSB 7110) specific routines
*
@@ -6,6 +6,12 @@
*
*
* $Log: isar.c,v $
+ * Revision 1.8 1999/12/19 13:00:56 keil
+ * Fix races in setting a new mode
+ *
+ * Revision 1.7 1999/10/14 20:25:29 keil
+ * add a statistic for error monitoring
+ *
* Revision 1.6 1999/08/31 11:20:20 paul
* various spelling corrections (new checksums may be needed, Karsten!)
*
@@ -480,6 +486,12 @@
if (cs->debug & L1_DEB_WARN)
debugl1(cs, "isar frame error %x len %d",
ireg->cmsb, ireg->clsb);
+#ifdef ERROR_STATISTIC
+ if (ireg->cmsb & HDLC_ERR_RER)
+ bcs->err_inv++;
+ if (ireg->cmsb & HDLC_ERR_CER)
+ bcs->err_crc++;
+#endif
bcs->hw.isar.rcvidx = 0;
cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
} else {
@@ -790,10 +802,19 @@
check_send(cs, ireg->cmsb);
break;
case ISAR_IIS_BSTEV:
- cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+#ifdef ERROR_STATISTIC
+ if ((bcs = sel_bcs_isar(cs, ireg->iis >> 6))) {
+ if (ireg->cmsb == BSTEV_TBO)
+ bcs->err_tx++;
+ if (ireg->cmsb == BSTEV_RBO)
+ bcs->err_rdo++;
+ }
+#endif
if (cs->debug & L1_DEB_WARN)
debugl1(cs, "Buffer STEV dpath%d msb(%x)",
ireg->iis>>6, ireg->cmsb);
+ cs->BC_Write_Reg(cs, 1, ISAR_IIA, 0);
+ break;
case ISAR_IIS_PSTEV:
if ((bcs = sel_bcs_isar(cs, ireg->iis >> 6))) {
rcv_mbox(cs, ireg, (u_char *)ireg->par);
@@ -900,11 +921,9 @@
}
break;
}
- if (!sendmsg(cs, dps | ISAR_HIS_PSTREQ, 0, 0, NULL)) {
- if (cs->debug)
- debugl1(cs, "isar pump status req dp%d failed",
- bcs->hw.isar.dpath);
- }
+ udelay(1000);
+ sendmsg(cs, dps | ISAR_HIS_PSTREQ, 0, 0, NULL);
+ udelay(1000);
}
static void
@@ -948,11 +967,9 @@
}
break;
}
- if (!sendmsg(cs, dps | ISAR_HIS_BSTREQ, 0, 0, NULL)) {
- if (cs->debug)
- debugl1(cs, "isar buf stat req dp%d failed",
- bcs->hw.isar.dpath);
- }
+ udelay(1000);
+ sendmsg(cs, dps | ISAR_HIS_BSTREQ, 0, 0, NULL);
+ udelay(1000);
}
static void
@@ -977,15 +994,10 @@
cmsb |= IOM_CTRL_ALAW | IOM_CTRL_RCV;
break;
}
- if (!sendmsg(cs, dps | ISAR_HIS_IOM2CFG, cmsb, 5, msg)) {
- if (cs->debug)
- debugl1(cs, "isar iom2 dp%d failed", bcs->hw.isar.dpath);
- }
- if (!sendmsg(cs, dps | ISAR_HIS_IOM2REQ, 0, 0, NULL)) {
- if (cs->debug)
- debugl1(cs, "isar IOM2 cfg req dp%d failed",
- bcs->hw.isar.dpath);
- }
+ sendmsg(cs, dps | ISAR_HIS_IOM2CFG, cmsb, 5, msg);
+ udelay(1000);
+ sendmsg(cs, dps | ISAR_HIS_IOM2REQ, 0, 0, NULL);
+ udelay(1000);
}
int
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)