summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/avmb1/b1dma.c7
-rw-r--r--drivers/isdn/avmb1/capi.c5
-rw-r--r--drivers/isdn/divert/divert_procfs.c6
-rw-r--r--drivers/isdn/eicon/eicon_idi.c57
-rw-r--r--drivers/isdn/eicon/eicon_isa.c11
-rw-r--r--drivers/isdn/eicon/eicon_mod.c14
-rw-r--r--drivers/isdn/hisax/avm_pci.c11
-rw-r--r--drivers/isdn/hisax/config.c9
-rw-r--r--drivers/isdn/hisax/diva.c9
-rw-r--r--drivers/isdn/hisax/elsa_ser.c8
-rw-r--r--drivers/isdn/hisax/hfc_2bds0.c21
-rw-r--r--drivers/isdn/hisax/hfc_2bs0.c13
-rw-r--r--drivers/isdn/hisax/hfc_pci.c17
-rw-r--r--drivers/isdn/hisax/hfc_sx.c20
-rw-r--r--drivers/isdn/hisax/hisax.h8
-rw-r--r--drivers/isdn/hisax/hscx.c7
-rw-r--r--drivers/isdn/hisax/hscx_irq.c7
-rw-r--r--drivers/isdn/hisax/isac.c11
-rw-r--r--drivers/isdn/hisax/isar.c9
-rw-r--r--drivers/isdn/hisax/jade.c7
-rw-r--r--drivers/isdn/hisax/jade_irq.c7
-rw-r--r--drivers/isdn/hisax/l3dss1.c12
-rw-r--r--drivers/isdn/hisax/md5sums.asc24
-rw-r--r--drivers/isdn/hisax/netjet.c11
-rw-r--r--drivers/isdn/hisax/w6692.c17
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c6
-rw-r--r--drivers/isdn/hysdn/hysdn_procfs.c23
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c6
-rw-r--r--drivers/isdn/isdn_common.c28
-rw-r--r--drivers/isdn/isdn_net.c28
-rw-r--r--drivers/isdn/isdn_tty.c164
-rw-r--r--drivers/isdn/isdn_tty.h36
-rw-r--r--drivers/isdn/sc/debug.h2
33 files changed, 372 insertions, 249 deletions
diff --git a/drivers/isdn/avmb1/b1dma.c b/drivers/isdn/avmb1/b1dma.c
index 8bf595282..d61b88375 100644
--- a/drivers/isdn/avmb1/b1dma.c
+++ b/drivers/isdn/avmb1/b1dma.c
@@ -1,11 +1,14 @@
/*
- * $Id: b1dma.c,v 1.2 2000/01/25 14:44:47 calle Exp $
+ * $Id: b1dma.c,v 1.3 2000/02/26 01:00:53 keil Exp $
*
* Common module for AVM B1 cards that support dma with AMCC
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1dma.c,v $
+ * Revision 1.3 2000/02/26 01:00:53 keil
+ * changes from 2.3.47
+ *
* Revision 1.2 2000/01/25 14:44:47 calle
* typo in b1pciv4_detect().
*
@@ -31,7 +34,7 @@
#include "capicmd.h"
#include "capiutil.h"
-static char *revision = "$Revision: 1.2 $";
+static char *revision = "$Revision: 1.3 $";
/* ------------------------------------------------------------- */
diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c
index 62f246407..fb8a32460 100644
--- a/drivers/isdn/avmb1/capi.c
+++ b/drivers/isdn/avmb1/capi.c
@@ -1,11 +1,14 @@
/*
- * $Id: capi.c,v 1.22 1999/11/13 21:27:16 keil Exp $
+ * $Id: capi.c,v 1.23 2000/02/26 01:00:53 keil Exp $
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capi.c,v $
+ * Revision 1.23 2000/02/26 01:00:53 keil
+ * changes from 2.3.47
+ *
* Revision 1.22 1999/11/13 21:27:16 keil
* remove KERNELVERSION
*
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 110b5a172..de56823c0 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -315,8 +315,6 @@ static struct file_operations isdn_fops =
NULL /* fsync */
};
-struct inode_operations divert_file_inode_operations;
-
/****************************/
/* isdn subdir in /proc/net */
/****************************/
@@ -342,9 +340,7 @@ divert_dev_init(void)
remove_proc_entry("isdn", proc_net);
return (-1);
}
- memset(&divert_file_inode_operations, 0, sizeof(struct inode_operations));
- divert_file_inode_operations.default_file_ops = &isdn_fops;
- isdn_divert_entry->ops = &divert_file_inode_operations;
+ isdn_divert_entry->proc_fops = &isdn_fops;
#endif /* CONFIG_PROC_FS */
return (0);
diff --git a/drivers/isdn/eicon/eicon_idi.c b/drivers/isdn/eicon/eicon_idi.c
index e53469070..eb3590069 100644
--- a/drivers/isdn/eicon/eicon_idi.c
+++ b/drivers/isdn/eicon/eicon_idi.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_idi.c,v 1.29 2000/01/23 21:21:23 armin Exp $
+/* $Id: eicon_idi.c,v 1.31 2000/02/22 16:26:40 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
* IDI interface
@@ -26,6 +26,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_idi.c,v $
+ * Revision 1.31 2000/02/22 16:26:40 armin
+ * Fixed membase error message.
+ * Fixed missing log buffer struct.
+ *
+ * Revision 1.30 2000/02/16 16:08:46 armin
+ * Fixed virtual channel handling of IDI.
+ *
* Revision 1.29 2000/01/23 21:21:23 armin
* Added new trace capability and some updates.
* DIVA Server BRI now supports data for ISDNLOG.
@@ -149,7 +156,7 @@
#undef EICON_FULL_SERVICE_OKTETT
-char *eicon_idi_revision = "$Revision: 1.29 $";
+char *eicon_idi_revision = "$Revision: 1.31 $";
eicon_manifbuf *manbuf;
@@ -255,10 +262,10 @@ idi_assign_req(eicon_REQ *reqbuf, int signet, eicon_chan *chan)
}
int
-idi_put_req(eicon_REQ *reqbuf, int rq, int signet)
+idi_put_req(eicon_REQ *reqbuf, int rq, int signet, int Ch)
{
reqbuf->Req = rq;
- reqbuf->ReqCh = 0;
+ reqbuf->ReqCh = Ch;
reqbuf->ReqId = 1;
reqbuf->XBuffer.length = 1;
reqbuf->XBuffer.P[0] = 0;
@@ -368,34 +375,34 @@ idi_do_req(eicon_card *card, eicon_chan *chan, int cmd, int layer)
break;
case REMOVE:
case REMOVE|0x700:
- idi_put_req(reqbuf, REMOVE, layer);
+ idi_put_req(reqbuf, REMOVE, layer, 0);
break;
case INDICATE_REQ:
- idi_put_req(reqbuf, INDICATE_REQ, 0);
+ idi_put_req(reqbuf, INDICATE_REQ, 0, 0);
break;
case HANGUP:
- idi_put_req(reqbuf, HANGUP, 0);
+ idi_put_req(reqbuf, HANGUP, 0, 0);
break;
case REJECT:
- idi_put_req(reqbuf, REJECT, 0);
+ idi_put_req(reqbuf, REJECT, 0 ,0);
break;
case CALL_ALERT:
- idi_put_req(reqbuf, CALL_ALERT, 0);
+ idi_put_req(reqbuf, CALL_ALERT, 0, 0);
break;
case CALL_RES:
idi_call_res_req(reqbuf, chan);
break;
case IDI_N_CONNECT|0x700:
- idi_put_req(reqbuf, IDI_N_CONNECT, 1);
+ idi_put_req(reqbuf, IDI_N_CONNECT, 1, 0);
break;
case IDI_N_CONNECT_ACK|0x700:
- idi_put_req(reqbuf, IDI_N_CONNECT_ACK, 1);
+ idi_put_req(reqbuf, IDI_N_CONNECT_ACK, 1, 0);
break;
case IDI_N_DISC|0x700:
- idi_put_req(reqbuf, IDI_N_DISC, 1);
+ idi_put_req(reqbuf, IDI_N_DISC, 1, chan->e.IndCh);
break;
case IDI_N_DISC_ACK|0x700:
- idi_put_req(reqbuf, IDI_N_DISC_ACK, 1);
+ idi_put_req(reqbuf, IDI_N_DISC_ACK, 1, chan->e.IndCh);
break;
default:
eicon_log(card, 1, "idi_req: Ch%d: Unknown request\n", chan->No);
@@ -813,6 +820,11 @@ idi_IndParse(eicon_card *ccard, eicon_chan *chan, idi_ind_message *message, unsi
message->osa[i] = buffer[pos++];
eicon_log(ccard, 2, "idi_inf: Ch%d: OSA=%s\n", chan->No, message->osa);
break;
+ case CAD:
+ pos += wlen;
+ eicon_log(ccard, 2, "idi_inf: Ch%d: Connected Address in ind, len:%x\n",
+ chan->No, wlen);
+ break;
case BC:
if (wlen > sizeof(message->bc)) {
pos += wlen;
@@ -1206,7 +1218,7 @@ idi_send_edata(eicon_card *card, eicon_chan *chan)
reqbuf = (eicon_REQ *)skb_put(skb, sizeof(eicon_t30_s) + sizeof(eicon_REQ));
reqbuf->Req = IDI_N_EDATA;
- reqbuf->ReqCh = 0;
+ reqbuf->ReqCh = chan->e.IndCh;
reqbuf->ReqId = 1;
reqbuf->XBuffer.length = idi_fill_in_T30(chan, reqbuf->XBuffer.P);
@@ -2205,7 +2217,7 @@ idi_send_udata(eicon_card *card, eicon_chan *chan, int UReq, u_char *buffer, int
reqbuf = (eicon_REQ *)skb_put(skb, 1 + len + sizeof(eicon_REQ));
reqbuf->Req = IDI_N_UDATA;
- reqbuf->ReqCh = 0;
+ reqbuf->ReqCh = chan->e.IndCh;
reqbuf->ReqId = 1;
reqbuf->XBuffer.length = len + 1;
@@ -2322,7 +2334,7 @@ eicon_parse_trace(eicon_card *ccard, unsigned char *buffer, int len)
unsigned char data[1];
} *q;
- if (!(p = kmalloc(buflen, GFP_KERNEL))) {
+ if (!(p = kmalloc(buflen, GFP_ATOMIC))) {
eicon_log(ccard, 1, "idi_err: Ch??: could not allocate trace buffer\n");
return;
}
@@ -2380,7 +2392,7 @@ idi_handle_ind(eicon_card *ccard, struct sk_buff *skb)
return;
}
- if (ind->Ind != 8)
+ if ((ind->Ind != 8) && (ind->Ind != 0xc))
dlev = 144;
else
dlev = 128;
@@ -2634,6 +2646,7 @@ idi_handle_ind(eicon_card *ccard, struct sk_buff *skb)
break;
case IDI_N_CONNECT:
eicon_log(ccard, 16,"idi_ind: Ch%d: N_Connect\n", chan->No);
+ chan->e.IndCh = ind->IndCh;
if (chan->e.B2Id) idi_do_req(ccard, chan, IDI_N_CONNECT_ACK, 1);
if (chan->l2prot == ISDN_PROTO_L2_FAX) {
break;
@@ -2664,6 +2677,7 @@ idi_handle_ind(eicon_card *ccard, struct sk_buff *skb)
idi_fax_hangup(ccard, chan);
}
#endif
+ chan->e.IndCh = 0;
save_flags(flags);
cli();
chan->queued = 0;
@@ -2693,7 +2707,7 @@ idi_handle_ind(eicon_card *ccard, struct sk_buff *skb)
#endif
break;
case IDI_N_DATA_ACK:
- eicon_log(ccard, 16, "idi_ind: Ch%d: N_DATA_ACK\n", chan->No);
+ eicon_log(ccard, 128, "idi_ind: Ch%d: N_DATA_ACK\n", chan->No);
break;
case IDI_N_DATA:
skb_pull(skb, sizeof(eicon_IND) - 1);
@@ -2774,6 +2788,11 @@ idi_handle_ack_ok(eicon_card *ccard, eicon_chan *chan, eicon_RC *ack)
} else {
/* Network layer */
switch(chan->e.Req & 0x0f) {
+ case IDI_N_CONNECT:
+ chan->e.IndCh = ack->RcCh;
+ eicon_log(ccard, 16, "idi_ack: Ch%d: RC OK Id=%x Ch=%d (ref:%d)\n", chan->No,
+ ack->RcId, ack->RcCh, ack->Reference);
+ break;
case IDI_N_MDATA:
case IDI_N_DATA:
if ((chan->e.Req & 0x0f) == IDI_N_DATA) {
@@ -2999,7 +3018,7 @@ idi_send_data(eicon_card *card, eicon_chan *chan, int ack, struct sk_buff *skb,
reqbuf->Req = IDI_N_DATA;
if (ack) reqbuf->Req |= N_D_BIT;
}
- reqbuf->ReqCh = 0;
+ reqbuf->ReqCh = chan->e.IndCh;
reqbuf->ReqId = 1;
memcpy(&reqbuf->XBuffer.P, skb->data + offset, plen);
reqbuf->XBuffer.length = plen;
diff --git a/drivers/isdn/eicon/eicon_isa.c b/drivers/isdn/eicon/eicon_isa.c
index 86e6c0ef7..265e07e08 100644
--- a/drivers/isdn/eicon/eicon_isa.c
+++ b/drivers/isdn/eicon/eicon_isa.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_isa.c,v 1.13 2000/01/23 21:21:23 armin Exp $
+/* $Id: eicon_isa.c,v 1.14 2000/02/22 16:26:40 armin Exp $
*
* ISDN low-level module for Eicon active ISDN-Cards.
* Hardware-specific code for old ISA cards.
@@ -22,6 +22,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_isa.c,v $
+ * Revision 1.14 2000/02/22 16:26:40 armin
+ * Fixed membase error message.
+ * Fixed missing log buffer struct.
+ *
* Revision 1.13 2000/01/23 21:21:23 armin
* Added new trace capability and some updates.
* DIVA Server BRI now supports data for ISDNLOG.
@@ -83,7 +87,7 @@
#define release_shmem release_region
#define request_shmem request_region
-char *eicon_isa_revision = "$Revision: 1.13 $";
+char *eicon_isa_revision = "$Revision: 1.14 $";
#undef EICON_MCA_DEBUG
@@ -146,6 +150,9 @@ eicon_isa_find_card(int Mem, int Irq, char * Id)
if (!strlen(Id))
return -1;
+ if (Mem == -1)
+ return -1;
+
/* Check for valid membase address */
if ((Mem < 0x0c0000) ||
(Mem > 0x0fc000) ||
diff --git a/drivers/isdn/eicon/eicon_mod.c b/drivers/isdn/eicon/eicon_mod.c
index 688d74de3..9bc91d6f4 100644
--- a/drivers/isdn/eicon/eicon_mod.c
+++ b/drivers/isdn/eicon/eicon_mod.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.24 2000/01/23 21:21:23 armin Exp $
+/* $Id: eicon_mod.c,v 1.25 2000/02/22 16:26:40 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
*
@@ -31,6 +31,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_mod.c,v $
+ * Revision 1.25 2000/02/22 16:26:40 armin
+ * Fixed membase error message.
+ * Fixed missing log buffer struct.
+ *
* Revision 1.24 2000/01/23 21:21:23 armin
* Added new trace capability and some updates.
* DIVA Server BRI now supports data for ISDNLOG.
@@ -140,7 +144,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.24 $";
+static char *eicon_revision = "$Revision: 1.25 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -886,8 +890,10 @@ eicon_putstatus(eicon_card * card, char * buf)
u_char *p;
struct sk_buff *skb;
- if (!card)
- return;
+ if (!card) {
+ if (!(card = cards))
+ return;
+ }
save_flags(flags);
cli();
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index 319e0b264..d87c43f37 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -1,4 +1,4 @@
-/* $Id: avm_pci.c,v 1.14 1999/12/19 13:09:41 keil Exp $
+/* $Id: avm_pci.c,v 1.15 2000/02/26 00:35:12 keil Exp $
* avm_pci.c low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
* Thanks to AVM, Berlin for informations
@@ -7,6 +7,9 @@
*
*
* $Log: avm_pci.c,v $
+ * Revision 1.15 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.14 1999/12/19 13:09:41 keil
* changed TASK_INTERRUPTIBLE into TASK_UNINTERRUPTIBLE for
* signal proof delays
@@ -63,7 +66,7 @@
#include <linux/interrupt.h>
extern const char *CardType[];
-static const char *avm_pci_rev = "$Revision: 1.14 $";
+static const char *avm_pci_rev = "$Revision: 1.15 $";
#define AVM_FRITZ_PCI 1
#define AVM_FRITZ_PNP 2
@@ -499,7 +502,7 @@ HDLC_irq(struct BCState *bcs, u_int stat) {
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.hdlc.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_irq(bcs->tx_skb);
bcs->hw.hdlc.count = 0;
bcs->tx_skb = NULL;
}
@@ -626,7 +629,7 @@ close_hdlcstate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 8d389c623..377819551 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1,10 +1,13 @@
-/* $Id: config.c,v 2.43 2000/01/20 19:49:36 keil Exp $
+/* $Id: config.c,v 2.44 2000/02/26 00:35:12 keil Exp $
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
*
*
* $Log: config.c,v $
+ * Revision 2.44 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 2.43 2000/01/20 19:49:36 keil
* Support teles 13.3c vendor version 2.1
*
@@ -549,9 +552,9 @@ HiSaxVersion(void))
printk(KERN_INFO "HiSax: Linux Driver for passive ISDN cards\n");
#ifdef MODULE
- printk(KERN_INFO "HiSax: Version 3.3d (module)\n");
+ printk(KERN_INFO "HiSax: Version 3.3e (module)\n");
#else
- printk(KERN_INFO "HiSax: Version 3.3d (kernel)\n");
+ printk(KERN_INFO "HiSax: Version 3.3e (kernel)\n");
#endif
strcpy(tmp, l1_revision);
printk(KERN_INFO "HiSax: Layer1 Revision %s\n", HiSax_getrev(tmp));
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index 5dc868942..30c6331a5 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -1,4 +1,4 @@
-/* $Id: diva.c,v 1.18 1999/12/19 13:09:41 keil Exp $
+/* $Id: diva.c,v 1.19 2000/02/26 00:35:12 keil Exp $
* diva.c low level stuff for Eicon.Diehl Diva Family ISDN cards
*
@@ -12,6 +12,9 @@
*
*
* $Log: diva.c,v $
+ * Revision 1.19 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.18 1999/12/19 13:09:41 keil
* changed TASK_INTERRUPTIBLE into TASK_UNINTERRUPTIBLE for
* signal proof delays
@@ -84,7 +87,7 @@
extern const char *CardType[];
-const char *Diva_revision = "$Revision: 1.18 $";
+const char *Diva_revision = "$Revision: 1.19 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -585,7 +588,7 @@ Memhscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.hscx.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_irq(bcs->tx_skb);
bcs->hw.hscx.count = 0;
bcs->tx_skb = NULL;
}
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
index 529a74815..8bff1db1c 100644
--- a/drivers/isdn/hisax/elsa_ser.c
+++ b/drivers/isdn/hisax/elsa_ser.c
@@ -298,7 +298,7 @@ modem_fill(struct BCState *bcs) {
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st,
bcs->hw.hscx.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
}
}
@@ -442,13 +442,13 @@ close_elsastate(struct BCState *bcs)
bcs->hw.hscx.rcvbuf = NULL;
}
while ((skb = skb_dequeue(&bcs->rqueue))) {
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
}
while ((skb = skb_dequeue(&bcs->squeue))) {
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
}
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/hfc_2bds0.c b/drivers/isdn/hisax/hfc_2bds0.c
index 2b22cdfea..bc4665863 100644
--- a/drivers/isdn/hisax/hfc_2bds0.c
+++ b/drivers/isdn/hisax/hfc_2bds0.c
@@ -1,4 +1,4 @@
-/* $Id: hfc_2bds0.c,v 1.11 1999/12/23 15:09:32 keil Exp $
+/* $Id: hfc_2bds0.c,v 1.12 2000/02/26 00:35:12 keil Exp $
*
* specific routines for CCD's HFC 2BDS0
*
@@ -6,6 +6,9 @@
*
*
* $Log: hfc_2bds0.c,v $
+ * Revision 1.12 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.11 1999/12/23 15:09:32 keil
* change email
*
@@ -293,7 +296,7 @@ static struct sk_buff
sti();
debugl1(cs, "RFIFO BUSY error");
printk(KERN_WARNING "HFC FIFO channel %d BUSY Error\n", bcs->channel);
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = NULL;
} else {
cli();
@@ -309,7 +312,7 @@ static struct sk_buff
bcs->channel, chksum, stat);
if (stat) {
debugl1(cs, "FIFO CRC error");
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = NULL;
#ifdef ERROR_STATISTIC
bcs->err_crc++;
@@ -401,7 +404,7 @@ hfc_fill_fifo(struct BCState *bcs)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->tx_skb->len);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
}
WaitForBusy(cs);
@@ -603,7 +606,7 @@ close_2bs0(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
@@ -751,7 +754,7 @@ int receive_dmsg(struct IsdnCardState *cs)
sti();
debugl1(cs, "RFIFO D BUSY error");
printk(KERN_WARNING "HFC DFIFO channel BUSY Error\n");
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = NULL;
#ifdef ERROR_STATISTIC
cs->err_rx++;
@@ -770,7 +773,7 @@ int receive_dmsg(struct IsdnCardState *cs)
chksum, stat);
if (stat) {
debugl1(cs, "FIFO CRC error");
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
skb = NULL;
#ifdef ERROR_STATISTIC
cs->err_crc++;
@@ -870,7 +873,7 @@ hfc_fill_dfifo(struct IsdnCardState *cs)
cli();
WaitNoBusy(cs);
ReadReg(cs, HFCD_DATA, HFCD_FIFO | HFCD_F1_INC | HFCD_SEND);
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_skb = NULL;
sti();
WaitForBusy(cs);
@@ -1004,7 +1007,7 @@ hfc2bds0_interrupt(struct IsdnCardState *cs, u_char val)
}
goto afterXPR;
} else {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_irq(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
}
diff --git a/drivers/isdn/hisax/hfc_2bs0.c b/drivers/isdn/hisax/hfc_2bs0.c
index f3edefa3e..8a1d29762 100644
--- a/drivers/isdn/hisax/hfc_2bs0.c
+++ b/drivers/isdn/hisax/hfc_2bs0.c
@@ -1,4 +1,4 @@
-/* $Id: hfc_2bs0.c,v 1.12 1999/12/19 14:17:12 keil Exp $
+/* $Id: hfc_2bs0.c,v 1.13 2000/02/26 00:35:12 keil Exp $
* specific routines for CCD's HFC 2BS0
*
@@ -6,6 +6,9 @@
*
*
* $Log: hfc_2bs0.c,v $
+ * Revision 1.13 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.12 1999/12/19 14:17:12 keil
* fix compiler warning
*
@@ -249,7 +252,7 @@ hfc_empty_fifo(struct BCState *bcs, int count)
if (idx != count) {
debugl1(cs, "RFIFO BUSY error");
printk(KERN_WARNING "HFC FIFO channel %d BUSY Error\n", bcs->channel);
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
if (bcs->mode != L1_MODE_TRANS) {
WaitNoBusy(cs);
stat = cs->BC_Read_Reg(cs, HFC_DATA, HFC_CIP | HFC_F2_INC | HFC_REC |
@@ -270,7 +273,7 @@ hfc_empty_fifo(struct BCState *bcs, int count)
bcs->channel, chksum, stat);
if (stat) {
debugl1(cs, "FIFO CRC error");
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
skb = NULL;
#ifdef ERROR_STATISTIC
bcs->err_crc++;
@@ -359,7 +362,7 @@ hfc_fill_fifo(struct BCState *bcs)
bcs->tx_cnt -= count;
if (PACKET_NOACK == bcs->tx_skb->pkt_type)
count = -1;
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
if (bcs->mode != L1_MODE_TRANS) {
WaitForBusy(cs);
@@ -573,7 +576,7 @@ close_hfcstate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 76f353861..f2e7abf10 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1,4 +1,4 @@
-/* $Id: hfc_pci.c,v 1.26 2000/02/09 20:22:55 werner Exp $
+/* $Id: hfc_pci.c,v 1.27 2000/02/26 00:35:12 keil Exp $
* hfc_pci.c low level driver for CCD´s hfc-pci based cards
*
@@ -23,6 +23,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: hfc_pci.c,v $
+ * Revision 1.27 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.26 2000/02/09 20:22:55 werner
*
* Updated PCI-ID table
@@ -126,7 +129,7 @@
extern const char *CardType[];
-static const char *hfcpci_revision = "$Revision: 1.26 $";
+static const char *hfcpci_revision = "$Revision: 1.27 $";
/* table entry in the PCI devices list */
typedef struct {
@@ -636,7 +639,7 @@ hfcpci_fill_dfifo(struct IsdnCardState *cs)
df->f1 = new_f1; /* next frame */
restore_flags(flags);
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_skb = NULL;
return;
}
@@ -710,7 +713,7 @@ hfcpci_fill_fifo(struct BCState *bcs)
debugl1(cs, "hfcpci_fill_fifo_trans %d frame length %d discarded",
bcs->channel, bcs->tx_skb->len);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
cli();
bcs->tx_skb = skb_dequeue(&bcs->squeue); /* fetch next data */
sti();
@@ -778,7 +781,7 @@ hfcpci_fill_fifo(struct BCState *bcs)
bz->f1 = new_f1; /* next frame */
restore_flags(flags);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
return;
@@ -1130,7 +1133,7 @@ hfcpci_interrupt(int intno, void *dev_id, struct pt_regs *regs)
}
goto afterXPR;
} else {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_irq(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
}
@@ -1522,7 +1525,7 @@ close_hfcpci(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c
index 462de9d91..85040aabf 100644
--- a/drivers/isdn/hisax/hfc_sx.c
+++ b/drivers/isdn/hisax/hfc_sx.c
@@ -1,4 +1,4 @@
-/* $Id: hfc_sx.c,v 1.3 2000/01/20 19:49:36 keil Exp $
+/* $Id: hfc_sx.c,v 1.4 2000/02/26 00:35:12 keil Exp $
* hfc_sx.c low level driver for CCD´s hfc-s+/sp based cards
*
@@ -22,6 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: hfc_sx.c,v $
+ * Revision 1.4 2000/02/26 00:35:12 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.3 2000/01/20 19:49:36 keil
* Support teles 13.3c vendor version 2.1
*
@@ -38,6 +41,7 @@
*
*/
+#include <linux/config.h>
#define __NO_VERSION__
#include "hisax.h"
#include "hfc_sx.h"
@@ -46,7 +50,7 @@
extern const char *CardType[];
-static const char *hfcsx_revision = "$Revision: 1.3 $";
+static const char *hfcsx_revision = "$Revision: 1.4 $";
/***************************************/
/* IRQ-table for CCDs demo board */
@@ -327,7 +331,7 @@ read_fifo(struct IsdnCardState *cs, u_char fifo, int trans_max)
Read_hfc(cs, HFCSX_FIF_DRD); /* CRC 1 */
Read_hfc(cs, HFCSX_FIF_DRD); /* CRC 2 */
if (Read_hfc(cs, HFCSX_FIF_DRD)) {
- dev_kfree_skb(skb);
+ dev_kfree_skb_irq(skb);
if (cs->debug & L1_DEB_ISAC_FIFO)
debugl1(cs, "hfcsx_read_fifo %d crc error", fifo);
skb = NULL;
@@ -600,7 +604,7 @@ hfcsx_fill_dfifo(struct IsdnCardState *cs)
return;
if (write_fifo(cs, cs->tx_skb, HFCSX_SEL_D_TX, 0)) {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_skb = NULL;
}
return;
@@ -633,7 +637,7 @@ hfcsx_fill_fifo(struct BCState *bcs)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->tx_skb->len);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
@@ -777,7 +781,7 @@ receive_emsg(struct IsdnCardState *cs)
} else
HiSax_putstatus(cs, "LogEcho: ", "warning Frame too big (%d)", skb->len);
}
- dev_kfree_skb(skb);
+ dev_kfree_skb_any(skb);
}
} while (--count && skb);
@@ -931,7 +935,7 @@ hfcsx_interrupt(int intno, void *dev_id, struct pt_regs *regs)
}
goto afterXPR;
} else {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_irq(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
}
@@ -1305,7 +1309,7 @@ close_hfcsx(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 6f5b5615c..da55eb2df 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -1,8 +1,11 @@
-/* $Id: hisax.h,v 2.40 2000/01/20 19:51:46 keil Exp $
+/* $Id: hisax.h,v 2.41 2000/02/26 00:35:13 keil Exp $
* Basic declarations, defines and prototypes
*
* $Log: hisax.h,v $
+ * Revision 2.41 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 2.40 2000/01/20 19:51:46 keil
* Fix AddTimer message
* Change CONFIG defines
@@ -157,8 +160,9 @@
#include <linux/isdnif.h>
#include <linux/tty.h>
#include <linux/serial_reg.h>
+#include <linux/netdevice.h>
-#undef ERROR_STATISTIC
+#define ERROR_STATISTIC
#define REQUEST 0
#define CONFIRM 1
diff --git a/drivers/isdn/hisax/hscx.c b/drivers/isdn/hisax/hscx.c
index 1c57cd3f1..092b23243 100644
--- a/drivers/isdn/hisax/hscx.c
+++ b/drivers/isdn/hisax/hscx.c
@@ -1,4 +1,4 @@
-/* $Id: hscx.c,v 1.17 1999/07/01 08:11:41 keil Exp $
+/* $Id: hscx.c,v 1.18 2000/02/26 00:35:13 keil Exp $
* hscx.c HSCX specific routines
*
@@ -6,6 +6,9 @@
*
*
* $Log: hscx.c,v $
+ * Revision 1.18 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.17 1999/07/01 08:11:41 keil
* Common HiSax version for 2.0, 2.1, 2.2 and 2.3 kernel
*
@@ -219,7 +222,7 @@ close_hscxstate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/hscx_irq.c b/drivers/isdn/hisax/hscx_irq.c
index 655508f70..821f5bc8b 100644
--- a/drivers/isdn/hisax/hscx_irq.c
+++ b/drivers/isdn/hisax/hscx_irq.c
@@ -1,4 +1,4 @@
-/* $Id: hscx_irq.c,v 1.13 1999/10/14 20:25:28 keil Exp $
+/* $Id: hscx_irq.c,v 1.14 2000/02/26 00:35:13 keil Exp $
* hscx_irq.c low level b-channel stuff for Siemens HSCX
*
@@ -7,6 +7,9 @@
* This is an include file for fast inline IRQ stuff
*
* $Log: hscx_irq.c,v $
+ * Revision 1.14 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.13 1999/10/14 20:25:28 keil
* add a statistic for error monitoring
*
@@ -250,7 +253,7 @@ hscx_interrupt(struct IsdnCardState *cs, u_char val, u_char hscx)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.hscx.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_irq(bcs->tx_skb);
bcs->hw.hscx.count = 0;
bcs->tx_skb = NULL;
}
diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c
index a992f76c4..07c76cf2f 100644
--- a/drivers/isdn/hisax/isac.c
+++ b/drivers/isdn/hisax/isac.c
@@ -1,4 +1,4 @@
-/* $Id: isac.c,v 1.24 1999/10/14 20:25:28 keil Exp $
+/* $Id: isac.c,v 1.25 2000/02/26 00:35:13 keil Exp $
* isac.c ISAC specific routines
*
@@ -9,6 +9,9 @@
* ../../../Documentation/isdn/HiSax.cert
*
* $Log: isac.c,v $
+ * Revision 1.25 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.24 1999/10/14 20:25:28 keil
* add a statistic for error monitoring
*
@@ -338,7 +341,7 @@ isac_interrupt(struct IsdnCardState *cs, u_char val)
isac_fill_fifo(cs);
goto afterXPR;
} else {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_irq(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
}
@@ -627,7 +630,7 @@ ISAC_l1hw(struct PStack *st, int pr, void *arg)
discard_queue(&cs->rq);
discard_queue(&cs->sq);
if (cs->tx_skb) {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_skb = NULL;
}
if (test_and_clear_bit(FLG_DBUSY_TIMER, &cs->HW_Flags))
@@ -683,7 +686,7 @@ dbusy_timer_handler(struct IsdnCardState *cs)
/* discard frame; reset transceiver */
test_and_clear_bit(FLG_DBUSY_TIMER, &cs->HW_Flags);
if (cs->tx_skb) {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
} else {
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index bfff86707..d53dc729a 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -1,4 +1,4 @@
-/* $Id: isar.c,v 1.9 2000/01/20 19:47:45 keil Exp $
+/* $Id: isar.c,v 1.10 2000/02/26 00:35:13 keil Exp $
* isar.c ISAR (Siemens PSB 7110) specific routines
*
@@ -6,6 +6,9 @@
*
*
* $Log: isar.c,v $
+ * Revision 1.10 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.9 2000/01/20 19:47:45 keil
* Add Fax Class 1 support
*
@@ -774,7 +777,7 @@ send_frames(struct BCState *bcs)
}
}
}
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->hw.isar.txcnt = 0;
bcs->tx_skb = NULL;
}
@@ -1631,7 +1634,7 @@ close_isarstate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
if (bcs->cs->debug & L1_DEB_HSCX)
diff --git a/drivers/isdn/hisax/jade.c b/drivers/isdn/hisax/jade.c
index 4f07eed87..c1bf72ca8 100644
--- a/drivers/isdn/hisax/jade.c
+++ b/drivers/isdn/hisax/jade.c
@@ -1,10 +1,13 @@
-/* $Id: jade.c,v 1.2 1999/07/01 08:07:57 keil Exp $
+/* $Id: jade.c,v 1.3 2000/02/26 00:35:13 keil Exp $
*
* jade.c JADE stuff (derived from original hscx.c)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* $Log: jade.c,v $
+ * Revision 1.3 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.2 1999/07/01 08:07:57 keil
* Initial version
*
@@ -214,7 +217,7 @@ close_jadestate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/jade_irq.c b/drivers/isdn/hisax/jade_irq.c
index e54c80c1a..02fef2627 100644
--- a/drivers/isdn/hisax/jade_irq.c
+++ b/drivers/isdn/hisax/jade_irq.c
@@ -1,10 +1,13 @@
-/* $Id: jade_irq.c,v 1.2 1999/07/01 08:07:59 keil Exp $
+/* $Id: jade_irq.c,v 1.3 2000/02/26 00:35:13 keil Exp $
*
* jade_irq.c Low level JADE IRQ stuff (derived from original hscx_irq.c)
*
* Author Roland Klabunde (R.Klabunde@Berkom.de)
*
* $Log: jade_irq.c,v $
+ * Revision 1.3 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.2 1999/07/01 08:07:59 keil
* Initial version
*
@@ -192,7 +195,7 @@ jade_interrupt(struct IsdnCardState *cs, u_char val, u_char jade)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.hscx.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_irq(bcs->tx_skb);
bcs->hw.hscx.count = 0;
bcs->tx_skb = NULL;
}
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c
index 9fa10e326..2b0451a0a 100644
--- a/drivers/isdn/hisax/l3dss1.c
+++ b/drivers/isdn/hisax/l3dss1.c
@@ -1,4 +1,4 @@
-/* $Id: l3dss1.c,v 2.22 2000/01/20 19:44:20 keil Exp $
+/* $Id: l3dss1.c,v 2.23 2000/02/26 01:38:14 keil Exp $
* EURO/DSS1 D-channel protocol
*
@@ -13,6 +13,9 @@
* Fritz Elfert
*
* $Log: l3dss1.c,v $
+ * Revision 2.23 2000/02/26 01:38:14 keil
+ * Fixes for V.110 encoding LLC from Jens Jakobsen
+ *
* Revision 2.22 2000/01/20 19:44:20 keil
* Fixed uninitialiesed location
* Fixed redirecting number IE in Setup
@@ -104,7 +107,7 @@
#include <linux/config.h>
extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.22 $";
+const char *dss1_revision = "$Revision: 2.23 $";
#define EXT_BEARER_CAPS 1
@@ -1045,7 +1048,8 @@ u_char *
EncodeASyncParams(u_char * p, u_char si2)
{ // 7c 06 88 90 21 42 00 bb
- p[0] = p[1] = 0;
+ p[0] = 0;
+ p[1] = 0x40; // Intermediate rate: 16 kbit/s jj 2000.02.19
p[2] = 0x80;
if (si2 & 32) // 7 data bits
@@ -1059,7 +1063,7 @@ EncodeASyncParams(u_char * p, u_char si2)
p[2] += 96;
else // 1 stop bit
- p[2] = 32;
+ p[2] += 32;
if (si2 & 8) // even parity
diff --git a/drivers/isdn/hisax/md5sums.asc b/drivers/isdn/hisax/md5sums.asc
index 985bd4cb4..afb83e1c8 100644
--- a/drivers/isdn/hisax/md5sums.asc
+++ b/drivers/isdn/hisax/md5sums.asc
@@ -6,26 +6,26 @@
# Eicon Technology Diva 2.01 PCI cards in the moment.
# Read ../../../Documentation/isdn/HiSax.cert for more informations.
#
-3c2b1c96274cba97a8261d1cecc662b8 isac.c
-a9a15d069dbacb383cc24c238cb5ebbe isdnl1.c
+3fb9c99465857a4c136ae2881f4e30ba isac.c
+dd3955847bbf680b41233478fe521d88 isdnl1.c
bb51bd223040b511c18f091da5ab6456 isdnl2.c
b7aa7f97b2374967a4aca7c52991142c isdnl3.c
a23fbf8879c1432b04640b8b04bdf419 tei.c
-d7072dbbeeb7c4c45f3810ed13cf5545 callc.c
+ce248e56c2e1326012d0b25f92bbf99b callc.c
bf9605b36429898f7be6630034e83230 cert.c
-0e500813968adacaea2ef22c9cdd89eb l3dss1.c
-2d748ced0eea375b21fe7ea91ca7917c l3_1tr6.c
-d45fde1c90dda636ab134f2a51db435e elsa.c
-0b5fb429f5bfe188fd42a5be01abbb14 diva.c
+6ce0a184127be1a44747e2017ed24ad9 l3dss1.c
+a3a570781f828b6d59e6b231653133de l3_1tr6.c
+4aeba32c4c3480d2a6b9af34600b974f elsa.c
+a296edc459b508bf0346c3132815a4db diva.c
# end of md5sums
-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
-iQCVAwUBOCYF6jpxHvX/mS9tAQFnxQP/dpHyNjbo5BhFEZ8qIgpPJzoCgV+b2pB+
-h9Z/Q1jg8l23L/lP9dW00ogrKnKziVUUJqg+wWVEAA7BnNVr3aeyQKFTVuOnK5MC
-Oy0Z98p530vgOBiZ47elNfpefjhfD3duSSYNA4R9fEHVZB/atKFYvB5GDGmrwjIZ
-2f3g3kBP5Os=
-=zNnO
+iQCVAwUBOLcvXDpxHvX/mS9tAQGPWAP9Fg14RXcAwjCy4VeFoDBMOFpxllvG7xZR
+HQKENCYIzXKPb6I/IBUv3+BhL8Lnhjw8a2DXz6c6u+0nmUIFnzyt1BfzT70P9rKd
+BBN7f1KdIiQEmv0fZwd79Rz5PYvRDbY520bNTJZhorwqGI/qc3gGgHVtSR8OHhuS
+ZMQ1pb9W6jE=
+=CA5N
-----END PGP SIGNATURE-----
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
index 3855625bd..b1b0fd8d4 100644
--- a/drivers/isdn/hisax/netjet.c
+++ b/drivers/isdn/hisax/netjet.c
@@ -1,4 +1,4 @@
-/* $Id: netjet.c,v 1.17 1999/12/19 13:09:42 keil Exp $
+/* $Id: netjet.c,v 1.18 2000/02/26 00:35:13 keil Exp $
* netjet.c low level stuff for Traverse Technologie NETJet ISDN cards
*
@@ -7,6 +7,9 @@
* Thanks to Traverse Technologie Australia for documents and informations
*
* $Log: netjet.c,v $
+ * Revision 1.18 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.17 1999/12/19 13:09:42 keil
* changed TASK_INTERRUPTIBLE into TASK_UNINTERRUPTIBLE for
* signal proof delays
@@ -85,7 +88,7 @@
extern const char *CardType[];
-const char *NETjet_revision = "$Revision: 1.17 $";
+const char *NETjet_revision = "$Revision: 1.18 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -730,7 +733,7 @@ static void write_raw(struct BCState *bcs, u_int *buf, int cnt) {
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->tx_skb->len);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
}
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
@@ -873,7 +876,7 @@ close_tigerstate(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
index 724ce52c9..c6fe2acdd 100644
--- a/drivers/isdn/hisax/w6692.c
+++ b/drivers/isdn/hisax/w6692.c
@@ -1,4 +1,4 @@
-/* $Id: w6692.c,v 1.1 1999/09/04 06:28:58 keil Exp $
+/* $Id: w6692.c,v 1.2 2000/02/26 00:35:13 keil Exp $
* w6692.c Winbond W6692 specific routines
*
@@ -8,6 +8,9 @@
* This file is (c) under GNU PUBLIC LICENSE
*
* $Log: w6692.c,v $
+ * Revision 1.2 2000/02/26 00:35:13 keil
+ * Fix skb freeing in interrupt context
+ *
* Revision 1.1 1999/09/04 06:28:58 keil
* first revision
*
@@ -47,7 +50,7 @@ static const PCI_ENTRY id_list[] =
extern const char *CardType[];
-const char *w6692_revision = "$Revision: 1.1 $";
+const char *w6692_revision = "$Revision: 1.2 $";
#define DBUSY_TIMER_VALUE 80
@@ -378,7 +381,7 @@ W6692B_interrupt(struct IsdnCardState *cs, u_char bchan)
if (bcs->st->lli.l1writewakeup &&
(PACKET_NOACK != bcs->tx_skb->pkt_type))
bcs->st->lli.l1writewakeup(bcs->st, bcs->hw.w6692.count);
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_irq(bcs->tx_skb);
bcs->hw.w6692.count = 0;
bcs->tx_skb = NULL;
}
@@ -478,7 +481,7 @@ W6692_interrupt(int intno, void *dev_id, struct pt_regs *regs)
W6692_fill_fifo(cs);
goto afterXFR;
} else {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_irq(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
}
@@ -655,7 +658,7 @@ W6692_l1hw(struct PStack *st, int pr, void *arg)
discard_queue(&cs->rq);
discard_queue(&cs->sq);
if (cs->tx_skb) {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_skb = NULL;
}
if (test_and_clear_bit(FLG_DBUSY_TIMER, &cs->HW_Flags))
@@ -704,7 +707,7 @@ dbusy_timer_handler(struct IsdnCardState *cs)
/* discard frame; reset transceiver */
test_and_clear_bit(FLG_DBUSY_TIMER, &cs->HW_Flags);
if (cs->tx_skb) {
- dev_kfree_skb(cs->tx_skb);
+ dev_kfree_skb_any(cs->tx_skb);
cs->tx_cnt = 0;
cs->tx_skb = NULL;
} else {
@@ -819,7 +822,7 @@ close_w6692state(struct BCState *bcs)
discard_queue(&bcs->rqueue);
discard_queue(&bcs->squeue);
if (bcs->tx_skb) {
- dev_kfree_skb(bcs->tx_skb);
+ dev_kfree_skb_any(bcs->tx_skb);
bcs->tx_skb = NULL;
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
}
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index 81e1b84f0..4cb480588 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -416,8 +416,6 @@ static struct file_operations conf_fops =
NULL /* fsync */
};
-static struct inode_operations conf_inode_operations;
-
/*****************************/
/* hysdn subdir in /proc/net */
/*****************************/
@@ -446,10 +444,8 @@ hysdn_procconf_init(void)
if ((card->procconf = (void *) create_proc_entry(conf_name,
S_IFREG | S_IRUGO | S_IWUSR,
hysdn_proc_entry)) != NULL) {
- memset(&conf_inode_operations, 0, sizeof(struct inode_operations));
- conf_inode_operations.default_file_ops = &conf_fops;
- ((struct proc_dir_entry *) card->procconf)->ops = &conf_inode_operations;
+ ((struct proc_dir_entry *) card->procconf)->proc_fops = &conf_fops;
hysdn_proclog_init(card); /* init the log file entry */
}
card = card->next; /* next entry */
diff --git a/drivers/isdn/hysdn/hysdn_procfs.c b/drivers/isdn/hysdn/hysdn_procfs.c
index d70d350e9..b43e2ade7 100644
--- a/drivers/isdn/hysdn/hysdn_procfs.c
+++ b/drivers/isdn/hysdn/hysdn_procfs.c
@@ -351,27 +351,6 @@ static struct file_operations log_fops =
NULL /* fsync */
};
-struct inode_operations log_inode_operations =
-{
- &log_fops, /* log proc file-ops */
- NULL, /* create */
- NULL, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- NULL, /* readlink */
- NULL, /* follow_link */
- NULL, /* readpage */
- NULL, /* writepage */
- NULL, /* bmap */
- NULL, /* truncate */
- NULL /* permission */
-};
-
/*****************************************/
/* Output info data to the cardinfo file */
/*****************************************/
@@ -464,7 +443,7 @@ hysdn_procfs_init(void)
sprintf(pd->log_name, "%s%d", PROC_LOG_BASENAME, card->myid);
if ((pd->log = create_proc_entry(pd->log_name, S_IFREG | S_IRUGO | S_IWUSR, hysdn_proc_entry)) != NULL)
- pd->log->ops = &log_inode_operations; /* set new operations table */
+ pd->log->proc_fops = &log_fops; /* set new operations table */
init_waitqueue_head(&(pd->rd_queue));
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index aea6a96ad..67a91cf0f 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -433,8 +433,6 @@ static struct file_operations log_fops =
NULL /* fsync */
};
-struct inode_operations log_inode_operations;
-
/***********************************************************************************/
/* hysdn_proclog_init is called when the module is loaded after creating the cards */
/* conf files. */
@@ -448,12 +446,10 @@ hysdn_proclog_init(hysdn_card * card)
if ((pd = (struct procdata *) kmalloc(sizeof(struct procdata), GFP_KERNEL)) != NULL) {
memset(pd, 0, sizeof(struct procdata));
- memset(&log_inode_operations, 0, sizeof(struct inode_operations));
- log_inode_operations.default_file_ops = &log_fops;
sprintf(pd->log_name, "%s%d", PROC_LOG_BASENAME, card->myid);
if ((pd->log = create_proc_entry(pd->log_name, S_IFREG | S_IRUGO | S_IWUSR, hysdn_proc_entry)) != NULL)
- pd->log->ops = &log_inode_operations; /* set new operations table */
+ pd->log->proc_fops = &log_fops; /* set new operations table */
init_waitqueue_head(&(pd->rd_queue));
diff --git a/drivers/isdn/isdn_common.c b/drivers/isdn/isdn_common.c
index f1df11f55..b259cdc4b 100644
--- a/drivers/isdn/isdn_common.c
+++ b/drivers/isdn/isdn_common.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.97 2000/01/23 18:45:37 keil Exp $
+/* $Id: isdn_common.c,v 1.99 2000/02/26 01:00:52 keil Exp $
* Linux ISDN subsystem, common used functions (linklevel).
*
@@ -21,6 +21,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_common.c,v $
+ * Revision 1.99 2000/02/26 01:00:52 keil
+ * changes from 2.3.47
+ *
+ * Revision 1.98 2000/02/16 14:56:27 paul
+ * translated ISDN_MODEM_ANZREG to ISDN_MODEM_NUMREG for english speakers
+ *
* Revision 1.97 2000/01/23 18:45:37 keil
* Change EAZ mapping to forbit the use of cards (insert a "-" for the MSN)
*
@@ -443,7 +449,7 @@
isdn_dev *dev = (isdn_dev *) 0;
-static char *isdn_revision = "$Revision: 1.97 $";
+static char *isdn_revision = "$Revision: 1.99 $";
extern char *isdn_net_revision;
extern char *isdn_tty_revision;
@@ -1795,15 +1801,15 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
int i;
if ((ret = verify_area(VERIFY_WRITE, (void *) arg,
- (ISDN_MODEM_ANZREG + ISDN_MSNLEN + ISDN_LMSNLEN)
+ (ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN)
* ISDN_MAX_CHANNELS)))
return ret;
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
if (copy_to_user(p, dev->mdm.info[i].emu.profile,
- ISDN_MODEM_ANZREG))
+ ISDN_MODEM_NUMREG))
return -EFAULT;
- p += ISDN_MODEM_ANZREG;
+ p += ISDN_MODEM_NUMREG;
if (copy_to_user(p, dev->mdm.info[i].emu.pmsn, ISDN_MSNLEN))
return -EFAULT;
p += ISDN_MSNLEN;
@@ -1811,7 +1817,7 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
return -EFAULT;
p += ISDN_LMSNLEN;
}
- return (ISDN_MODEM_ANZREG + ISDN_MSNLEN + ISDN_LMSNLEN) * ISDN_MAX_CHANNELS;
+ return (ISDN_MODEM_NUMREG + ISDN_MSNLEN + ISDN_LMSNLEN) * ISDN_MAX_CHANNELS;
} else
return -EINVAL;
break;
@@ -1822,15 +1828,15 @@ isdn_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
int i;
if ((ret = verify_area(VERIFY_READ, (void *) arg,
- (ISDN_MODEM_ANZREG + ISDN_MSNLEN)
+ (ISDN_MODEM_NUMREG + ISDN_MSNLEN)
* ISDN_MAX_CHANNELS)))
return ret;
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
if (copy_from_user(dev->mdm.info[i].emu.profile, p,
- ISDN_MODEM_ANZREG))
+ ISDN_MODEM_NUMREG))
return -EFAULT;
- p += ISDN_MODEM_ANZREG;
+ p += ISDN_MODEM_NUMREG;
if (copy_from_user(dev->mdm.info[i].emu.pmsn, p, ISDN_MSNLEN))
return -EFAULT;
p += ISDN_MSNLEN;
@@ -2632,7 +2638,7 @@ static void isdn_cleanup_devfs(void)
devfs_unregister (devfs_handle);
}
-#else /* CONFIG_DEVFS_FS */
+#else /* CONFIG_DEVFS_FS */
static void isdn_register_devfs(int dummy)
{
return;
@@ -2653,7 +2659,7 @@ static void isdn_cleanup_devfs(void)
return;
}
-#endif /* CONFIG_DEVFS_FS */
+#endif /* CONFIG_DEVFS_FS */
/*
* Allocate and initialize all data, register modem-devices
diff --git a/drivers/isdn/isdn_net.c b/drivers/isdn/isdn_net.c
index 592d20ed9..ee3af91fa 100644
--- a/drivers/isdn/isdn_net.c
+++ b/drivers/isdn/isdn_net.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.c,v 1.107 2000/02/13 09:52:05 kai Exp $
+/* $Id: isdn_net.c,v 1.110 2000/02/26 01:00:53 keil Exp $
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
@@ -21,6 +21,16 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_net.c,v $
+ * Revision 1.110 2000/02/26 01:00:53 keil
+ * changes from 2.3.47
+ *
+ * Revision 1.109 2000/02/25 11:29:17 paul
+ * changed chargetime to ulong from int (after about 20 days the "chargetime of
+ * ipppX is now 1234" message displays a negative number on alpha).
+ *
+ * Revision 1.108 2000/02/15 12:54:01 kai
+ * set TX timeout back to 2 secs for 2.2.x, just to be safe
+ *
* Revision 1.107 2000/02/13 09:52:05 kai
* increased TX_TIMEOUT to 20sec
*
@@ -521,6 +531,14 @@ static void __inline__ isdn_net_lp_xon(isdn_net_local * lp)
netif_wake_queue(&lp->netdev->dev);
}
+/* For 2.2.x we leave the transmitter busy timeout at 2 secs, just
+ * to be safe.
+ * For 2.3.x we push it up to 20 secs, because call establishment
+ * (in particular callback) may take such a long time, and we
+ * don't want confusing messages in the log. However, there is a slight
+ * possibility that this large timeout will break other things like MPPP,
+ * which might rely on the tx timeout. If so, we'll find out this way...
+ */
#define ISDN_NET_TX_TIMEOUT (20*HZ)
@@ -530,7 +548,7 @@ int isdn_net_force_dial_lp(isdn_net_local *);
static int isdn_net_start_xmit(struct sk_buff *, struct net_device *);
static int isdn_net_xmit(struct net_device *, isdn_net_local *, struct sk_buff *);
-char *isdn_net_revision = "$Revision: 1.107 $";
+char *isdn_net_revision = "$Revision: 1.110 $";
/*
* Code for raw-networking over ISDN
@@ -727,7 +745,7 @@ isdn_net_autohup()
isdn_net_hangup(&p->dev);
} else if (jiffies - l->chargetime > l->chargeint) {
printk(KERN_DEBUG
- "isdn_net: %s: chtime = %d, chint = %d\n",
+ "isdn_net: %s: chtime = %lu, chint = %d\n",
l->name, l->chargetime, l->chargeint);
isdn_net_hangup(&p->dev);
}
@@ -868,7 +886,7 @@ isdn_net_stat_callback(int idx, isdn_ctrl *c)
* we correct the timestamp here.
*/
lp->chargetime = jiffies;
- printk(KERN_DEBUG "isdn_net: chargetime of %s now %d\n",
+ printk(KERN_DEBUG "isdn_net: chargetime of %s now %lu\n",
lp->name, lp->chargetime);
/* reset dial-timeout */
@@ -915,7 +933,7 @@ isdn_net_stat_callback(int idx, isdn_ctrl *c)
if (lp->hupflags & ISDN_WAITCHARGE)
lp->hupflags |= ISDN_HAVECHARGE;
lp->chargetime = jiffies;
- printk(KERN_DEBUG "isdn_net: Got CINF chargetime of %s now %d\n",
+ printk(KERN_DEBUG "isdn_net: Got CINF chargetime of %s now %lu\n",
lp->name, lp->chargetime);
return 1;
}
diff --git a/drivers/isdn/isdn_tty.c b/drivers/isdn/isdn_tty.c
index 0503c67a2..1e314128c 100644
--- a/drivers/isdn/isdn_tty.c
+++ b/drivers/isdn/isdn_tty.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_tty.c,v 1.82 2000/01/23 18:45:37 keil Exp $
+/* $Id: isdn_tty.c,v 1.84 2000/02/16 15:10:14 paul Exp $
* Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
*
@@ -20,6 +20,15 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_tty.c,v $
+ * Revision 1.84 2000/02/16 15:10:14 paul
+ * If a ttyI has no open FDs, don't connect incoming calls to it.
+ * (Hangup on close of last FD is still to be done.)
+ *
+ * Revision 1.83 2000/02/16 14:59:33 paul
+ * translated ISDN_MODEM_ANZREG to ISDN_MODEM_NUMREG for english speakers;
+ * used defines for result codes;
+ * fixed RING ... RUNG problem (no empty lines in between).
+ *
* Revision 1.82 2000/01/23 18:45:37 keil
* Change EAZ mapping to forbit the use of cards (insert a "-" for the MSN)
*
@@ -379,7 +388,7 @@ static int bit2si[8] =
static int si2bit[8] =
{4, 1, 4, 4, 4, 4, 4, 4};
-char *isdn_tty_revision = "$Revision: 1.82 $";
+char *isdn_tty_revision = "$Revision: 1.84 $";
/* isdn_tty_try_read() is called from within isdn_tty_rcv_skb()
@@ -901,7 +910,7 @@ static void
isdn_tty_modem_do_ncarrier(unsigned long data)
{
modem_info *info = (modem_info *) data;
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
}
/* Next routine is called, whenever the DTR-signal is raised.
@@ -986,7 +995,7 @@ isdn_tty_dial(char *n, modem_info * info, atemu * m)
i = isdn_get_free_channel(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
if (i < 0) {
restore_flags(flags);
- isdn_tty_modem_result(6, info);
+ isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
} else {
info->isdn_driver = dev->drvmap[i];
info->isdn_channel = dev->chanmap[i];
@@ -1056,8 +1065,7 @@ isdn_tty_modem_hup(modem_info * info, int local)
if (info->online) {
info->last_lhup = local;
info->online = 0;
- /* NO CARRIER message */
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
}
#ifdef CONFIG_ISDN_AUDIO
info->vonline = 0;
@@ -1086,7 +1094,7 @@ isdn_tty_modem_hup(modem_info * info, int local)
#endif
if ((info->msr & UART_MSR_RI) &&
(info->emu.mdmreg[REG_RUNG] & BIT_RUNG))
- isdn_tty_modem_result(12, info);
+ isdn_tty_modem_result(RESULT_RUNG, info);
info->msr &= ~(UART_MSR_DCD | UART_MSR_RI);
info->lsr |= UART_LSR_TEMT;
if (info->isdn_driver >= 0) {
@@ -1197,7 +1205,7 @@ isdn_tty_resume(char *id, modem_info * info, atemu * m)
i = isdn_get_free_channel(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
if (i < 0) {
restore_flags(flags);
- isdn_tty_modem_result(6, info);
+ isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
} else {
info->isdn_driver = dev->drvmap[i];
info->isdn_channel = dev->chanmap[i];
@@ -1265,7 +1273,7 @@ isdn_tty_send_msg(modem_info * info, atemu * m, char *msg)
l = strlen(msg);
if (!l) {
- isdn_tty_modem_result(4, info);
+ isdn_tty_modem_result(RESULT_ERROR, info);
return;
}
for (j = 7; j >= 0; j--)
@@ -1291,7 +1299,7 @@ isdn_tty_send_msg(modem_info * info, atemu * m, char *msg)
i = isdn_get_free_channel(usg, l2, m->mdmreg[REG_L3PROT], -1, -1, m->msn);
if (i < 0) {
restore_flags(flags);
- isdn_tty_modem_result(6, info);
+ isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
} else {
info->isdn_driver = dev->drvmap[i];
info->isdn_channel = dev->chanmap[i];
@@ -1589,7 +1597,7 @@ isdn_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int co
#ifdef ISDN_DEBUG_MODEM_HUP
printk(KERN_DEBUG "Mhup in isdn_tty_write\n");
#endif
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
isdn_tty_modem_hup(info, 1);
} else
c = isdn_tty_edit_at(buf, c, info, from_user);
@@ -2321,7 +2329,7 @@ isdn_tty_modem_reset_regs(modem_info * info, int force)
{
atemu *m = &info->emu;
if ((m->mdmreg[REG_DTRR] & BIT_DTRR) || force) {
- memcpy(m->mdmreg, m->profile, ISDN_MODEM_ANZREG);
+ memcpy(m->mdmreg, m->profile, ISDN_MODEM_NUMREG);
memcpy(m->msn, m->pmsn, ISDN_MSNLEN);
memcpy(m->lmsn, m->plmsn, ISDN_LMSNLEN);
info->xmit_size = m->mdmreg[REG_PSIZE] * 16;
@@ -2338,7 +2346,7 @@ isdn_tty_modem_reset_regs(modem_info * info, int force)
static void
modem_write_profile(atemu * m)
{
- memcpy(m->profile, m->mdmreg, ISDN_MODEM_ANZREG);
+ memcpy(m->profile, m->mdmreg, ISDN_MODEM_NUMREG);
memcpy(m->pmsn, m->msn, ISDN_MSNLEN);
memcpy(m->plmsn, m->lmsn, ISDN_LMSNLEN);
if (dev->profd)
@@ -2447,6 +2455,13 @@ isdn_tty_modem_init(void)
return 0;
}
+
+/*
+ * isdn_tty_match_icall(char *MSN, atemu *tty_emulator, int dev_idx)
+ * match the MSN against the MSNs (glob patterns) defined for tty_emulator,
+ * and return 0 for match, 1 for no match, 2 if MSN could match if longer.
+ */
+
static int
isdn_tty_match_icall(char *cid, atemu *emu, int di)
{
@@ -2512,15 +2527,14 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
int idx;
int si1;
int si2;
- char nr[32];
+ char *nr;
ulong flags;
if (!setup.phone[0]) {
- nr[0] = '0';
- nr[1] = '\0';
+ nr = "0";
printk(KERN_INFO "isdn_tty: Incoming call without OAD, assuming '0'\n");
} else
- strcpy(nr, setup.phone);
+ nr = setup.phone;
si1 = (int) setup.si1;
si2 = (int) setup.si2;
if (!setup.eazmsn[0]) {
@@ -2537,6 +2551,8 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
for (i = 0; i < ISDN_MAX_CHANNELS; i++) {
modem_info *info = &dev->mdm.info[i];
+ if (info->count == 0)
+ continue;
if ((info->emu.mdmreg[REG_SI1] & si2bit[si1]) && /* SI1 is matching */
(info->emu.mdmreg[REG_SI2] == si2)) { /* SI2 is matching */
idx = isdn_dc2minor(di, ch);
@@ -2574,7 +2590,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm setup)
printk(KERN_INFO "isdn_tty: call from %s, -> RING on ttyI%d\n", nr,
info->line);
info->msr |= UART_MSR_RI;
- isdn_tty_modem_result(2, info);
+ isdn_tty_modem_result(RESULT_RING, info);
isdn_timer_ctrl(ISDN_TIMER_MODEMRING, 1);
return 1;
}
@@ -2660,9 +2676,9 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
#endif
if (TTY_IS_ACTIVE(info)) {
if (info->dialing == 1)
- isdn_tty_modem_result(7, info);
+ isdn_tty_modem_result(RESULT_BUSY, info);
if (info->dialing > 1)
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
info->dialing = 0;
#ifdef ISDN_DEBUG_MODEM_HUP
printk(KERN_DEBUG "Mhup in ISDN_STAT_DHUP\n");
@@ -2691,12 +2707,12 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
if (USG_MODEM(dev->usage[i])) {
if (info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) {
strcpy(info->emu.connmsg, c->parm.num);
- isdn_tty_modem_result(1, info);
+ isdn_tty_modem_result(RESULT_CONNECT, info);
} else
- isdn_tty_modem_result(5, info);
+ isdn_tty_modem_result(RESULT_CONNECT64000, info);
}
if (USG_VOICE(dev->usage[i]))
- isdn_tty_modem_result(11, info);
+ isdn_tty_modem_result(RESULT_VCON, info);
return 1;
}
break;
@@ -2722,7 +2738,7 @@ isdn_tty_stat_callback(int i, isdn_ctrl *c)
info->last_l2 = -1;
info->last_si = 0;
sprintf(info->last_cause, "0000");
- isdn_tty_modem_result(6, info);
+ isdn_tty_modem_result(RESULT_NO_DIALTONE, info);
}
isdn_tty_modem_hup(info, 0);
return 1;
@@ -2937,6 +2953,7 @@ isdn_tty_check_esc(const u_char * p, u_char plus, int count, int *pluscount,
* For CONNECT-messages also switch to online-mode.
* For RING-message handle auto-ATA if register 0 != 0
*/
+
static void
isdn_tty_modem_result(int code, modem_info * info)
{
@@ -2949,14 +2966,13 @@ isdn_tty_modem_result(int code, modem_info * info)
char s[ISDN_MSNLEN+10];
switch (code) {
- case 2:
- m->mdmreg[REG_RINGCNT]++; /* RING */
+ case RESULT_RING:
+ m->mdmreg[REG_RINGCNT]++;
if (m->mdmreg[REG_RINGCNT] == m->mdmreg[REG_RINGATA])
/* Automatically accept incoming call */
isdn_tty_cmd_ATA(info);
break;
- case 3:
- /* NO CARRIER */
+ case RESULT_NO_CARRIER:
#ifdef ISDN_DEBUG_MODEM_HUP
printk(KERN_DEBUG "modem_result: NO CARRIER %d %d\n",
(info->flags & ISDN_ASYNC_CLOSING),
@@ -2991,13 +3007,13 @@ isdn_tty_modem_result(int code, modem_info * info)
}
#endif
break;
- case 1:
- case 5:
+ case RESULT_CONNECT:
+ case RESULT_CONNECT64000:
sprintf(info->last_cause, "0000");
if (!info->online)
info->online = 2;
break;
- case 11:
+ case RESULT_VCON:
#ifdef ISDN_DEBUG_MODEM_VOICE
printk(KERN_DEBUG "res3: send VCON on ttyI%d\n",
info->line);
@@ -3006,27 +3022,30 @@ isdn_tty_modem_result(int code, modem_info * info)
if (!info->online)
info->online = 1;
break;
- }
+ } /* switch(code) */
+
if (m->mdmreg[REG_RESP] & BIT_RESP) {
/* Show results */
- isdn_tty_at_cout("\r\n", info);
if (m->mdmreg[REG_RESPNUM] & BIT_RESPNUM) {
- /* Show numeric results */
- sprintf(s, "%d", code);
+ /* Show numeric results only */
+ sprintf(s, "\r\n%d\r\n", code);
isdn_tty_at_cout(s, info);
} else {
- if ((code == 2) &&
- (m->mdmreg[REG_RUNG] & BIT_RUNG) &&
- (m->mdmreg[REG_RINGCNT] > 1))
- return;
- if ((code == 2) && (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE))) {
- isdn_tty_at_cout("CALLER NUMBER: ", info);
- isdn_tty_at_cout(dev->num[info->drv_index], info);
- isdn_tty_at_cout("\r\n", info);
+ if (code == RESULT_RING) {
+ /* return if "show RUNG" and ringcounter>1 */
+ if ((m->mdmreg[REG_RUNG] & BIT_RUNG) &&
+ (m->mdmreg[REG_RINGCNT] > 1))
+ return;
+ /* print CID, _before_ _every_ ring */
+ if (!(m->mdmreg[REG_CIDONCE] & BIT_CIDONCE)) {
+ isdn_tty_at_cout("\r\nCALLER NUMBER: ", info);
+ isdn_tty_at_cout(dev->num[info->drv_index], info);
+ }
}
+ isdn_tty_at_cout("\r\n", info);
isdn_tty_at_cout(msg[code], info);
switch (code) {
- case 1:
+ case RESULT_CONNECT:
switch (m->mdmreg[REG_L2PROT]) {
case ISDN_PROTO_L2_MODEM:
isdn_tty_at_cout(" ", info);
@@ -3034,13 +3053,13 @@ isdn_tty_modem_result(int code, modem_info * info)
break;
}
break;
- case 2:
+ case RESULT_RING:
/* Append CPN, if enabled */
if ((m->mdmreg[REG_CPN] & BIT_CPN)) {
sprintf(s, "/%s", m->cpn);
isdn_tty_at_cout(s, info);
}
- /* Print CID only once, _after_ 1.st RING */
+ /* Print CID only once, _after_ 1st RING */
if ((m->mdmreg[REG_CIDONCE] & BIT_CIDONCE) &&
(m->mdmreg[REG_RINGCNT] == 1)) {
isdn_tty_at_cout("\r\n", info);
@@ -3048,10 +3067,10 @@ isdn_tty_modem_result(int code, modem_info * info)
isdn_tty_at_cout(dev->num[info->drv_index], info);
}
break;
- case 3:
- case 6:
- case 7:
- case 8:
+ case RESULT_NO_CARRIER:
+ case RESULT_NO_DIALTONE:
+ case RESULT_BUSY:
+ case RESULT_NO_ANSWER:
m->mdmreg[REG_RINGCNT] = 0;
/* Append Cause-Message if enabled */
if (m->mdmreg[REG_RESPXT] & BIT_RESPXT) {
@@ -3059,7 +3078,7 @@ isdn_tty_modem_result(int code, modem_info * info)
isdn_tty_at_cout(s, info);
}
break;
- case 5:
+ case RESULT_CONNECT64000:
/* Append Protocol to CONNECT message */
switch (m->mdmreg[REG_L2PROT]) {
case ISDN_PROTO_L2_X75I:
@@ -3087,10 +3106,10 @@ isdn_tty_modem_result(int code, modem_info * info)
}
break;
}
+ isdn_tty_at_cout("\r\n", info);
}
- isdn_tty_at_cout("\r\n", info);
}
- if (code == 3) {
+ if (code == RESULT_NO_CARRIER) {
save_flags(flags);
cli();
if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
@@ -3108,6 +3127,7 @@ isdn_tty_modem_result(int code, modem_info * info)
}
}
+
/*
* Display a modem-register-value.
*/
@@ -3160,8 +3180,8 @@ isdn_tty_getdial(char *p, char *q,int cnt)
*q = 0;
}
-#define PARSE_ERROR { isdn_tty_modem_result(4, info); return; }
-#define PARSE_ERROR1 { isdn_tty_modem_result(4, info); return 1; }
+#define PARSE_ERROR { isdn_tty_modem_result(RESULT_ERROR, info); return; }
+#define PARSE_ERROR1 { isdn_tty_modem_result(RESULT_ERROR, info); return 1; }
static void
isdn_tty_report(modem_info * info)
@@ -3329,8 +3349,8 @@ isdn_tty_cmd_ATand(char **p, modem_info * info)
/* &L -Set Numbers to listen on */
p[0]++;
i = 0;
- while ((strchr("0123456789,-*[]?;", *p[0])) &&
- (i < ISDN_LMSNLEN) && *p[0])
+ while (*p[0] && (strchr("0123456789,-*[]?;", *p[0])) &&
+ (i < ISDN_LMSNLEN))
m->lmsn[i++] = *p[0]++;
m->lmsn[i] = '\0';
break;
@@ -3381,7 +3401,7 @@ isdn_tty_cmd_ATand(char **p, modem_info * info)
/* &V - Show registers */
p[0]++;
isdn_tty_at_cout("\r\n", info);
- for (i = 0; i < ISDN_MODEM_ANZREG; i++) {
+ for (i = 0; i < ISDN_MODEM_NUMREG; i++) {
sprintf(rb, "S%02d=%03d%s", i,
m->mdmreg[i], ((i + 1) % 10) ? " " : "\r\n");
isdn_tty_at_cout(rb, info);
@@ -3486,7 +3506,7 @@ isdn_tty_cmd_ATS(char **p, modem_info * info)
int bval;
mreg = isdn_getnum(p);
- if (mreg < 0 || mreg >= ISDN_MODEM_ANZREG)
+ if (mreg < 0 || mreg >= ISDN_MODEM_NUMREG)
PARSE_ERROR1;
switch (*p[0]) {
case '=':
@@ -3589,7 +3609,7 @@ isdn_tty_cmd_ATA(modem_info * info)
isdn_command(&cmd);
isdn_timer_ctrl(ISDN_TIMER_CARRIER, 1);
} else
- isdn_tty_modem_result(8, info);
+ isdn_tty_modem_result(RESULT_NO_ANSWER, info);
}
#ifdef CONFIG_ISDN_AUDIO
@@ -3779,7 +3799,7 @@ isdn_tty_cmd_PLUSV(char **p, modem_info * info)
if (!m->vpar[0])
PARSE_ERROR1;
if (info->online != 1) {
- isdn_tty_modem_result(8, info);
+ isdn_tty_modem_result(RESULT_NO_ANSWER, info);
return 1;
}
info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
@@ -3803,7 +3823,7 @@ isdn_tty_cmd_PLUSV(char **p, modem_info * info)
printk(KERN_DEBUG "AT: +VRX\n");
#endif
info->vonline |= 1;
- isdn_tty_modem_result(1, info);
+ isdn_tty_modem_result(RESULT_CONNECT, info);
return 0;
break;
case 4:
@@ -3893,7 +3913,7 @@ isdn_tty_cmd_PLUSV(char **p, modem_info * info)
if (!m->vpar[0])
PARSE_ERROR1;
if (info->online != 1) {
- isdn_tty_modem_result(8, info);
+ isdn_tty_modem_result(RESULT_NO_ANSWER, info);
return 1;
}
info->dtmf_state = isdn_audio_dtmf_init(info->dtmf_state);
@@ -3913,7 +3933,7 @@ isdn_tty_cmd_PLUSV(char **p, modem_info * info)
#endif
m->lastDLE = 0;
info->vonline |= 2;
- isdn_tty_modem_result(1, info);
+ isdn_tty_modem_result(RESULT_CONNECT, info);
return 0;
break;
case 7:
@@ -3998,13 +4018,13 @@ isdn_tty_parse_at(modem_info * info)
if (info->msr & UART_MSR_DCD)
PARSE_ERROR;
if (info->msr & UART_MSR_RI) {
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
return;
}
isdn_tty_getdial(++p, ds, sizeof ds);
p += strlen(p);
if (!strlen(m->msn))
- isdn_tty_modem_result(10, info);
+ isdn_tty_modem_result(RESULT_NO_MSN_EAZ, info);
else if (strlen(ds))
isdn_tty_dial(ds, info, m);
else
@@ -4076,9 +4096,9 @@ isdn_tty_parse_at(modem_info * info)
p++;
if (info->msr & UART_MSR_DCD)
/* if B-Channel is up */
- isdn_tty_modem_result((m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) ? 1:5, info);
+ isdn_tty_modem_result((m->mdmreg[REG_L2PROT] == ISDN_PROTO_L2_MODEM) ? RESULT_CONNECT:RESULT_CONNECT64000, info);
else
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
return;
case 'Q':
/* Q - Turn Emulator messages on/off */
@@ -4171,7 +4191,7 @@ isdn_tty_parse_at(modem_info * info)
#ifdef CONFIG_ISDN_AUDIO
if (!info->vonline)
#endif
- isdn_tty_modem_result(0, info);
+ isdn_tty_modem_result(RESULT_OK, info);
}
/* Need own toupper() because standard-toupper is not available
@@ -4282,7 +4302,7 @@ isdn_tty_modem_escape(void)
((jiffies - info->emu.lastplus) > PLUSWAIT2)) {
info->emu.pluscount = 0;
info->online = 0;
- isdn_tty_modem_result(0, info);
+ isdn_tty_modem_result(RESULT_OK, info);
}
}
}
@@ -4304,7 +4324,7 @@ isdn_tty_modem_ring(void)
modem_info *info = &dev->mdm.info[i];
if (info->msr & UART_MSR_RI) {
ton = 1;
- isdn_tty_modem_result(2, info);
+ isdn_tty_modem_result(RESULT_RING, info);
}
}
isdn_timer_ctrl(ISDN_TIMER_MODEMRING, ton);
@@ -4346,7 +4366,7 @@ isdn_tty_carrier_timeout(void)
if (info->dialing) {
if (info->emu.carrierwait++ > info->emu.mdmreg[REG_WAITC]) {
info->dialing = 0;
- isdn_tty_modem_result(3, info);
+ isdn_tty_modem_result(RESULT_NO_CARRIER, info);
isdn_tty_modem_hup(info, 1);
}
else
diff --git a/drivers/isdn/isdn_tty.h b/drivers/isdn/isdn_tty.h
index ff7e479f0..ed9190cfe 100644
--- a/drivers/isdn/isdn_tty.h
+++ b/drivers/isdn/isdn_tty.h
@@ -1,4 +1,4 @@
-/* $Id: isdn_tty.h,v 1.18 2000/01/20 19:55:33 keil Exp $
+/* $Id: isdn_tty.h,v 1.19 2000/02/16 14:59:33 paul Exp $
* header for Linux ISDN subsystem, tty related functions (linklevel).
*
@@ -20,6 +20,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_tty.h,v $
+ * Revision 1.19 2000/02/16 14:59:33 paul
+ * translated ISDN_MODEM_ANZREG to ISDN_MODEM_NUMREG for english speakers;
+ * used defines for result codes;
+ * fixed RING ... RUNG problem (no empty lines in between).
+ *
* Revision 1.18 2000/01/20 19:55:33 keil
* Add FAX Class 1 support
*
@@ -110,7 +115,7 @@
* Definition of some special Registers of AT-Emulator
*/
#define REG_RINGATA 0
-#define REG_RINGCNT 1
+#define REG_RINGCNT 1 /* ring counter register */
#define REG_ESC 2
#define REG_CR 3
#define REG_LF 4
@@ -118,10 +123,10 @@
#define REG_WAITC 7
-#define REG_RESP 12
-#define BIT_RESP 1
-#define REG_RESPNUM 12
-#define BIT_RESPNUM 2
+#define REG_RESP 12 /* show response messages register */
+#define BIT_RESP 1 /* show response messages bit */
+#define REG_RESPNUM 12 /* show numeric responses register */
+#define BIT_RESPNUM 2 /* show numeric responses bit */
#define REG_ECHO 12
#define BIT_ECHO 4
#define REG_DCD 12
@@ -144,8 +149,8 @@
#define BIT_RESPXT 8
#define REG_CIDONCE 13
#define BIT_CIDONCE 16
-#define REG_RUNG 13
-#define BIT_RUNG 64
+#define REG_RUNG 13 /* show RUNG message register */
+#define BIT_RUNG 64 /* show RUNG message bit */
#define REG_DISPLAY 13
#define BIT_DISPLAY 128
@@ -163,6 +168,21 @@
#define BIT_CPN 1
#define BIT_CPNFCON 2
+/* defines for result codes */
+#define RESULT_OK 0
+#define RESULT_CONNECT 1
+#define RESULT_RING 2
+#define RESULT_NO_CARRIER 3
+#define RESULT_ERROR 4
+#define RESULT_CONNECT64000 5
+#define RESULT_NO_DIALTONE 6
+#define RESULT_BUSY 7
+#define RESULT_NO_ANSWER 8
+#define RESULT_RINGING 9
+#define RESULT_NO_MSN_EAZ 10
+#define RESULT_VCON 11
+#define RESULT_RUNG 12
+
#define TTY_IS_FCLASS1(info) \
((info->emu.mdmreg[REG_L2PROT] == ISDN_PROTO_L2_FAX) && \
(info->emu.mdmreg[REG_L3PROT] == ISDN_PROTO_L3_FCLASS1))
diff --git a/drivers/isdn/sc/debug.h b/drivers/isdn/sc/debug.h
index f813b5c99..ba100543d 100644
--- a/drivers/isdn/sc/debug.h
+++ b/drivers/isdn/sc/debug.h
@@ -1,5 +1,5 @@
/*
- * $Id: debug.h,v 1.1 1996/11/07 13:07:42 fritz Exp $
+ * $Id: debug.h,v 1.2 2000/02/26 01:00:53 keil Exp $
* Copyright (C) 1996 SpellCaster Telecommunications Inc.
*
* This program is free software; you can redistribute it and/or modify