patch-2.3.27 linux/drivers/isdn/hisax/isar.c
Next file: linux/drivers/isdn/hisax/isar.h
Previous file: linux/drivers/isdn/hisax/isac.c
Back to the patch index
Back to the overall index
- Lines: 107
- Date:
Sun Nov 7 16:34:00 1999
- Orig file:
v2.3.26/linux/drivers/isdn/hisax/isar.c
- Orig date:
Thu Aug 26 13:05:35 1999
diff -u --recursive --new-file v2.3.26/linux/drivers/isdn/hisax/isar.c linux/drivers/isdn/hisax/isar.c
@@ -1,4 +1,4 @@
-/* $Id: isar.c,v 1.5 1999/08/25 16:59:55 keil Exp $
+/* $Id: isar.c,v 1.7 1999/10/14 20:25:29 keil Exp $
* isar.c ISAR (Siemens PSB 7110) specific routines
*
@@ -6,6 +6,12 @@
*
*
* $Log: isar.c,v $
+ * 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!)
+ *
* Revision 1.5 1999/08/25 16:59:55 keil
* Make ISAR V32bis modem running
* Make LL->HL interface open for additional commands
@@ -459,7 +465,6 @@
case L1_MODE_TRANS:
case L1_MODE_V32:
if ((skb = dev_alloc_skb(ireg->clsb))) {
- SET_SKB_FREE(skb);
rcv_mbox(cs, ireg, (u_char *)skb_put(skb, ireg->clsb));
skb_queue_tail(&bcs->rqueue, skb);
isar_sched_event(bcs, B_RCVBUFREADY);
@@ -478,6 +483,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 {
@@ -493,7 +504,6 @@
} else if (!(skb = dev_alloc_skb(bcs->hw.isar.rcvidx-2))) {
printk(KERN_WARNING "ISAR: receive out of memory\n");
} else {
- SET_SKB_FREE(skb);
memcpy(skb_put(skb, bcs->hw.isar.rcvidx-2),
bcs->hw.isar.rcvbuf, bcs->hw.isar.rcvidx-2);
skb_queue_tail(&bcs->rqueue, skb);
@@ -593,7 +603,7 @@
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.isar.txcnt);
- idev_kfree_skb(bcs->tx_skb, FREE_WRITE);
+ dev_kfree_skb(bcs->tx_skb);
bcs->hw.isar.txcnt = 0;
bcs->tx_skb = NULL;
}
@@ -789,10 +799,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);
@@ -1022,8 +1041,8 @@
&bcs->hw.isar.reg->Flags))
bcs->hw.isar.dpath = 1;
else {
- printk(KERN_WARNING"isar modeisar analog funktions only with DP1\n");
- debugl1(cs, "isar modeisar analog funktions only with DP1");
+ printk(KERN_WARNING"isar modeisar analog works only with DP1\n");
+ debugl1(cs, "isar modeisar analog works only with DP1");
return(1);
}
break;
@@ -1159,7 +1178,7 @@
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- idev_kfree_skb(bcs->tx_skb, FREE_WRITE);
+ dev_kfree_skb(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
if (bcs->cs->debug & L1_DEB_HSCX)
@@ -1223,7 +1242,7 @@
ll_run(cs, features);
break;
default:
- printk(KERN_DEBUG "HiSax: invalid ioclt %d\n",
+ printk(KERN_DEBUG "HiSax: invalid ioctl %d\n",
(int) ic->arg);
return(-EINVAL);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)