summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-28 01:09:25 +0000
commitb9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 (patch)
tree42d07b0c7246ae2536a702e7c5de9e2732341116 /drivers/isdn
parent7406b0a326f2d70ade2671c37d1beef62249db97 (diff)
Merge with 2.3.99-pre6.
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/avmb1/b1dma.c9
-rw-r--r--drivers/isdn/avmb1/b1isa.c16
-rw-r--r--drivers/isdn/avmb1/b1pci.c17
-rw-r--r--drivers/isdn/avmb1/b1pcmcia.c16
-rw-r--r--drivers/isdn/avmb1/c4.c21
-rw-r--r--drivers/isdn/avmb1/capi.c13
-rw-r--r--drivers/isdn/avmb1/capidrv.c195
-rw-r--r--drivers/isdn/avmb1/capifs.c15
-rw-r--r--drivers/isdn/avmb1/kcapi.c46
-rw-r--r--drivers/isdn/avmb1/t1isa.c17
-rw-r--r--drivers/isdn/avmb1/t1pci.c25
-rw-r--r--drivers/isdn/hisax/hisax.h6
-rw-r--r--drivers/isdn/hisax/isar.c26
-rw-r--r--drivers/isdn/hisax/isdnl2.c15
-rw-r--r--drivers/isdn/hisax/isdnl3.c13
-rw-r--r--drivers/isdn/hisax/md5sums.asc14
-rw-r--r--drivers/isdn/hisax/niccy.c21
-rw-r--r--drivers/isdn/isdn_common.c13
-rw-r--r--drivers/isdn/isdn_net.c21
19 files changed, 349 insertions, 170 deletions
diff --git a/drivers/isdn/avmb1/b1dma.c b/drivers/isdn/avmb1/b1dma.c
index d61b88375..b40fafae9 100644
--- a/drivers/isdn/avmb1/b1dma.c
+++ b/drivers/isdn/avmb1/b1dma.c
@@ -1,11 +1,14 @@
/*
- * $Id: b1dma.c,v 1.3 2000/02/26 01:00:53 keil Exp $
+ * $Id: b1dma.c,v 1.4 2000/04/03 16:38:05 calle 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.4 2000/04/03 16:38:05 calle
+ * made suppress_pollack static.
+ *
* Revision 1.3 2000/02/26 01:00:53 keil
* changes from 2.3.47
*
@@ -34,13 +37,13 @@
#include "capicmd.h"
#include "capiutil.h"
-static char *revision = "$Revision: 1.3 $";
+static char *revision = "$Revision: 1.4 $";
/* ------------------------------------------------------------- */
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
-int suppress_pollack = 0;
+static int suppress_pollack = 0;
MODULE_PARM(suppress_pollack, "0-1i");
/* ------------------------------------------------------------- */
diff --git a/drivers/isdn/avmb1/b1isa.c b/drivers/isdn/avmb1/b1isa.c
index 590e825b6..9c67a0a42 100644
--- a/drivers/isdn/avmb1/b1isa.c
+++ b/drivers/isdn/avmb1/b1isa.c
@@ -1,11 +1,15 @@
/*
- * $Id: b1isa.c,v 1.7 2000/02/02 18:36:03 calle Exp $
+ * $Id: b1isa.c,v 1.8 2000/04/03 13:29:24 calle Exp $
*
* Module for AVM B1 ISA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1isa.c,v $
+ * Revision 1.8 2000/04/03 13:29:24 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.7 2000/02/02 18:36:03 calle
* - Modules are now locked while init_module is running
* - fixed problem with memory mapping if address is not aligned
@@ -69,7 +73,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.7 $";
+static char *revision = "$Revision: 1.8 $";
/* ------------------------------------------------------------- */
@@ -265,6 +269,9 @@ int b1isa_init(void)
{
struct capi_driver *driver = &b1isa_driver;
char *p;
+ int retval = 0;
+
+ MOD_INC_USE_COUNT;
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
@@ -279,9 +286,10 @@ int b1isa_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
- return -EIO;
+ retval = -EIO;
}
- return 0;
+ MOD_DEC_USE_COUNT;
+ return retval;
}
#ifdef MODULE
diff --git a/drivers/isdn/avmb1/b1pci.c b/drivers/isdn/avmb1/b1pci.c
index f7affea0d..c82de8717 100644
--- a/drivers/isdn/avmb1/b1pci.c
+++ b/drivers/isdn/avmb1/b1pci.c
@@ -1,11 +1,15 @@
/*
- * $Id: b1pci.c,v 1.20 2000/02/02 18:36:03 calle Exp $
+ * $Id: b1pci.c,v 1.21 2000/04/03 13:29:24 calle Exp $
*
* Module for AVM B1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1pci.c,v $
+ * Revision 1.21 2000/04/03 13:29:24 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.20 2000/02/02 18:36:03 calle
* - Modules are now locked while init_module is running
* - fixed problem with memory mapping if address is not aligned
@@ -75,7 +79,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.20 $";
+static char *revision = "$Revision: 1.21 $";
/* ------------------------------------------------------------- */
@@ -509,6 +513,8 @@ int b1pci_init(void)
char *p;
int retval;
+ MOD_INC_USE_COUNT;
+
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
p = strchr(driver->revision, '$');
@@ -522,6 +528,7 @@ int b1pci_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -534,6 +541,7 @@ int b1pci_init(void)
detach_capi_driver(driver);
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driverv4->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
#endif
@@ -545,6 +553,7 @@ int b1pci_init(void)
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
detach_capi_driver(driverv4);
#endif
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -554,6 +563,7 @@ int b1pci_init(void)
#ifdef MODULE
cleanup_module();
#endif
+ MOD_DEC_USE_COUNT;
return retval;
}
ncards++;
@@ -561,12 +571,15 @@ int b1pci_init(void)
if (ncards) {
printk(KERN_INFO "%s: %d B1-PCI card(s) detected\n",
driver->name, ncards);
+ MOD_DEC_USE_COUNT;
return 0;
}
printk(KERN_ERR "%s: NO B1-PCI card detected\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -ESRCH;
#else
printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
#endif
}
diff --git a/drivers/isdn/avmb1/b1pcmcia.c b/drivers/isdn/avmb1/b1pcmcia.c
index ff90b42c8..5774080fe 100644
--- a/drivers/isdn/avmb1/b1pcmcia.c
+++ b/drivers/isdn/avmb1/b1pcmcia.c
@@ -1,11 +1,15 @@
/*
- * $Id: b1pcmcia.c,v 1.8 2000/03/06 18:00:23 calle Exp $
+ * $Id: b1pcmcia.c,v 1.9 2000/04/03 13:29:24 calle Exp $
*
* Module for AVM B1/M1/M2 PCMCIA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1pcmcia.c,v $
+ * Revision 1.9 2000/04/03 13:29:24 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.8 2000/03/06 18:00:23 calle
* - Middleware extention now working with 2.3.49 (capifs).
* - Fixed typos in debug section of capi.c
@@ -75,7 +79,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.8 $";
+static char *revision = "$Revision: 1.9 $";
/* ------------------------------------------------------------- */
@@ -301,6 +305,9 @@ int b1pcmcia_init(void)
{
struct capi_driver *driver = &b1pcmcia_driver;
char *p;
+ int retval = 0;
+
+ MOD_INC_USE_COUNT;
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
@@ -315,9 +322,10 @@ int b1pcmcia_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
- return -EIO;
+ retval = -EIO;
}
- return 0;
+ MOD_DEC_USE_COUNT;
+ return retval;
}
#ifdef MODULE
diff --git a/drivers/isdn/avmb1/c4.c b/drivers/isdn/avmb1/c4.c
index e016bfde2..e3fcabf9b 100644
--- a/drivers/isdn/avmb1/c4.c
+++ b/drivers/isdn/avmb1/c4.c
@@ -1,11 +1,18 @@
/*
- * $Id: c4.c,v 1.6 2000/03/17 12:21:08 calle Exp $
+ * $Id: c4.c,v 1.8 2000/04/03 16:38:05 calle Exp $
*
* Module for AVM C4 card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: c4.c,v $
+ * Revision 1.8 2000/04/03 16:38:05 calle
+ * made suppress_pollack static.
+ *
+ * Revision 1.7 2000/04/03 13:29:24 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.6 2000/03/17 12:21:08 calle
* send patchvalues now working.
*
@@ -46,7 +53,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.6 $";
+static char *revision = "$Revision: 1.8 $";
#undef CONFIG_C4_DEBUG
#undef CONFIG_C4_POLLDEBUG
@@ -71,7 +78,7 @@ static char *revision = "$Revision: 1.6 $";
/* ------------------------------------------------------------- */
-int suppress_pollack = 0;
+static int suppress_pollack = 0;
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
@@ -1294,6 +1301,8 @@ int c4_init(void)
char *p;
int retval;
+ MOD_INC_USE_COUNT;
+
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
p = strchr(driver->revision, '$');
@@ -1307,6 +1316,7 @@ int c4_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -1314,6 +1324,7 @@ int c4_init(void)
if (!pci_present()) {
printk(KERN_ERR "%s: no PCI bus present\n", driver->name);
detach_capi_driver(driver);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -1337,6 +1348,7 @@ int c4_init(void)
#ifdef MODULE
cleanup_module();
#endif
+ MOD_DEC_USE_COUNT;
return retval;
}
ncards++;
@@ -1344,12 +1356,15 @@ int c4_init(void)
if (ncards) {
printk(KERN_INFO "%s: %d C4 card(s) detected\n",
driver->name, ncards);
+ MOD_DEC_USE_COUNT;
return 0;
}
printk(KERN_ERR "%s: NO C4 card detected\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -ESRCH;
#else
printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
#endif
}
diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c
index 3bbc329e1..06c0686af 100644
--- a/drivers/isdn/avmb1/capi.c
+++ b/drivers/isdn/avmb1/capi.c
@@ -1,11 +1,15 @@
/*
- * $Id: capi.c,v 1.30 2000/03/19 12:31:36 calle Exp $
+ * $Id: capi.c,v 1.31 2000/04/03 13:29:24 calle Exp $
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capi.c,v $
+ * Revision 1.31 2000/04/03 13:29:24 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.30 2000/03/19 12:31:36 calle
* PPP over CAPI raw driver disabled for now, ppp_generic has been changed.
*
@@ -189,7 +193,7 @@
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
#include <linux/slab.h>
-static char *revision = "$Revision: 1.30 $";
+static char *revision = "$Revision: 1.31 $";
MODULE_AUTHOR("Carsten Paeth (calle@calle.in-berlin.de)");
@@ -362,12 +366,13 @@ struct capiminor *capiminor_alloc(__u16 applid, __u32 ncci)
struct capiminor *mp, **pp;
unsigned int minor = 0;
+ MOD_INC_USE_COUNT;
mp = (struct capiminor *)kmem_cache_alloc(capiminor_cachep, GFP_ATOMIC);
if (!mp) {
+ MOD_DEC_USE_COUNT;
printk(KERN_ERR "capi: can't alloc capiminor\n");
return 0;
}
- MOD_INC_USE_COUNT;
#ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capiminor_alloc %d\n", GET_USE_COUNT(THIS_MODULE));
#endif
@@ -1835,7 +1840,7 @@ endloop:
*eof = 1;
if (off >= len+begin)
return 0;
- *start = page + (begin-off);
+ *start = page + (off-begin);
return ((count < begin+len-off) ? count : begin+len-off);
}
diff --git a/drivers/isdn/avmb1/capidrv.c b/drivers/isdn/avmb1/capidrv.c
index d35c21d77..9521140f1 100644
--- a/drivers/isdn/avmb1/capidrv.c
+++ b/drivers/isdn/avmb1/capidrv.c
@@ -1,11 +1,21 @@
/*
- * $Id: capidrv.c,v 1.30 2000/03/03 15:50:42 calle Exp $
+ * $Id: capidrv.c,v 1.32 2000/04/07 15:19:58 calle Exp $
*
* ISDN4Linux Driver, using capi20 interface (kernelcapi)
*
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capidrv.c,v $
+ * Revision 1.32 2000/04/07 15:19:58 calle
+ * remove warnings
+ *
+ * Revision 1.31 2000/04/06 15:01:25 calle
+ * Bugfix: crash in capidrv.c when reseting a capi controller.
+ * - changed code order on remove of controller.
+ * - using tq_schedule for notifier in kcapi.c.
+ * - now using spin_lock_irqsave() and spin_unlock_irqrestore().
+ * strange: sometimes even MP hang on unload of isdn.o ...
+ *
* Revision 1.30 2000/03/03 15:50:42 calle
* - kernel CAPI:
* - Changed parameter "param" in capi_signal from __u32 to void *.
@@ -182,8 +192,8 @@
#include "capicmd.h"
#include "capidrv.h"
-static char *revision = "$Revision: 1.30 $";
-int debugmode = 0;
+static char *revision = "$Revision: 1.32 $";
+static int debugmode = 0;
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
MODULE_PARM(debugmode, "i");
@@ -291,6 +301,7 @@ typedef struct capidrv_bchan capidrv_bchan;
/* -------- data definitions ----------------------------------------- */
static capidrv_data global;
+static spinlock_t global_lock = SPIN_LOCK_UNLOCKED;
static struct capi_interface *capifuncs;
static void handle_dtrace_data(capidrv_contr *card,
@@ -450,33 +461,27 @@ static inline __u8 cip2si2(__u16 cipval)
static inline capidrv_contr *findcontrbydriverid(int driverid)
{
- capidrv_contr *p = global.contr_list;
- long flags;
+ unsigned long flags;
+ capidrv_contr *p;
- save_flags(flags);
- cli();
- while (p) {
+ spin_lock_irqsave(&global_lock, flags);
+ for (p = global.contr_list; p; p = p->next)
if (p->myid == driverid)
break;
- p = p->next;
- }
- restore_flags(flags);
+ spin_unlock_irqrestore(&global_lock, flags);
return p;
}
static capidrv_contr *findcontrbynumber(__u32 contr)
{
+ unsigned long flags;
capidrv_contr *p = global.contr_list;
- long flags;
- save_flags(flags);
- cli();
- while (p) {
+ spin_lock_irqsave(&global_lock, flags);
+ for (p = global.contr_list; p; p = p->next)
if (p->contrnr == contr)
break;
- p = p->next;
- }
- restore_flags(flags);
+ spin_unlock_irqrestore(&global_lock, flags);
return p;
}
@@ -1564,47 +1569,41 @@ static void capidrv_signal(__u16 applid, void *dummy)
static void handle_dtrace_data(capidrv_contr *card,
int send, int level2, __u8 *data, __u16 len)
{
- long flags;
- __u8 *p, *end;
- isdn_ctrl cmd;
+ __u8 *p, *end;
+ isdn_ctrl cmd;
- if (!len) {
- printk(KERN_DEBUG "capidrv-%d: avmb1_q931_data: len == %d\n",
+ if (!len) {
+ printk(KERN_DEBUG "capidrv-%d: avmb1_q931_data: len == %d\n",
card->contrnr, len);
- return;
- }
+ return;
+ }
- save_flags(flags);
- cli();
-
- if (level2) {
- PUTBYTE_TO_STATUS(card, 'D');
- PUTBYTE_TO_STATUS(card, '2');
- PUTBYTE_TO_STATUS(card, send ? '>' : '<');
- PUTBYTE_TO_STATUS(card, ':');
- } else {
- PUTBYTE_TO_STATUS(card, 'D');
- PUTBYTE_TO_STATUS(card, '3');
- PUTBYTE_TO_STATUS(card, send ? '>' : '<');
- PUTBYTE_TO_STATUS(card, ':');
- }
+ if (level2) {
+ PUTBYTE_TO_STATUS(card, 'D');
+ PUTBYTE_TO_STATUS(card, '2');
+ PUTBYTE_TO_STATUS(card, send ? '>' : '<');
+ PUTBYTE_TO_STATUS(card, ':');
+ } else {
+ PUTBYTE_TO_STATUS(card, 'D');
+ PUTBYTE_TO_STATUS(card, '3');
+ PUTBYTE_TO_STATUS(card, send ? '>' : '<');
+ PUTBYTE_TO_STATUS(card, ':');
+ }
+
+ for (p = data, end = data+len; p < end; p++) {
+ __u8 w;
+ PUTBYTE_TO_STATUS(card, ' ');
+ w = (*p >> 4) & 0xf;
+ PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w);
+ w = *p & 0xf;
+ PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w);
+ }
+ PUTBYTE_TO_STATUS(card, '\n');
- for (p = data, end = data+len; p < end; p++) {
- __u8 w;
- PUTBYTE_TO_STATUS(card, ' ');
- w = (*p >> 4) & 0xf;
- PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w);
- w = *p & 0xf;
- PUTBYTE_TO_STATUS(card, (w < 10) ? '0'+w : 'A'-10+w);
- }
- PUTBYTE_TO_STATUS(card, '\n');
-
- restore_flags(flags);
-
- cmd.command = ISDN_STAT_STAVAIL;
- cmd.driver = card->myid;
- cmd.arg = len*3+5;
- card->interface.statcallb(&cmd);
+ cmd.command = ISDN_STAT_STAVAIL;
+ cmd.driver = card->myid;
+ cmd.arg = len*3+5;
+ card->interface.statcallb(&cmd);
}
/* ------------------------------------------------------------------- */
@@ -2009,8 +2008,8 @@ static int if_command(isdn_ctrl * c)
return capidrv_command(c, card);
printk(KERN_ERR
- "capidrv-%d: if_command %d called with invalid driverId %d!\n",
- card->contrnr, c->command, c->driver);
+ "capidrv: if_command %d called with invalid driverId %d!\n",
+ c->command, c->driver);
return -ENODEV;
}
@@ -2297,12 +2296,11 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp)
}
card->myid = card->interface.channels;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&global_lock, flags);
card->next = global.contr_list;
global.contr_list = card;
global.ncontr++;
- restore_flags(flags);
+ spin_unlock_irqrestore(&global_lock, flags);
memset(card->bchans, 0, sizeof(capidrv_bchan) * card->nbchan);
for (i = 0; i < card->nbchan; i++) {
@@ -2333,25 +2331,22 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp)
static int capidrv_delcontr(__u16 contr)
{
capidrv_contr **pp, *card;
+ unsigned long flags;
isdn_ctrl cmd;
- long flags;
- int i;
- save_flags(flags);
- cli();
- for (pp = &global.contr_list; *pp; pp = &(*pp)->next) {
- if ((*pp)->contrnr == contr)
+ spin_lock_irqsave(&global_lock, flags);
+ for (card = global.contr_list; card; card = card->next) {
+ if (card->contrnr == contr)
break;
}
- if (!*pp) {
- restore_flags(flags);
+ if (!card) {
+ spin_unlock_irqrestore(&global_lock, flags);
printk(KERN_ERR "capidrv: delcontr: no contr %u\n", contr);
return -1;
}
- card = *pp;
- *pp = (*pp)->next;
- global.ncontr--;
- restore_flags(flags);
+ spin_unlock_irqrestore(&global_lock, flags);
+
+ del_timer(&card->listentimer);
if (debugmode)
printk(KERN_DEBUG "capidrv-%d: id=%d unloading\n",
@@ -2361,28 +2356,51 @@ static int capidrv_delcontr(__u16 contr)
cmd.driver = card->myid;
card->interface.statcallb(&cmd);
- for (i = 0; i < card->nbchan; i++) {
+ while (card->nbchan) {
cmd.command = ISDN_STAT_DISCH;
cmd.driver = card->myid;
- cmd.arg = i;
+ cmd.arg = card->nbchan-1;
cmd.parm.num[0] = 0;
+ if (debugmode)
+ printk(KERN_DEBUG "capidrv-%d: id=%d disable chan=%ld\n",
+ card->contrnr, card->myid, cmd.arg);
card->interface.statcallb(&cmd);
- if (card->bchans[i].nccip)
- free_ncci(card, card->bchans[i].nccip);
- if (card->bchans[i].plcip)
- free_plci(card, card->bchans[i].plcip);
+ if (card->bchans[card->nbchan-1].nccip)
+ free_ncci(card, card->bchans[card->nbchan-1].nccip);
+ if (card->bchans[card->nbchan-1].plcip)
+ free_plci(card, card->bchans[card->nbchan-1].plcip);
if (card->plci_list)
printk(KERN_ERR "capidrv: bug in free_plci()\n");
+ card->nbchan--;
}
kfree(card->bchans);
- del_timer(&card->listentimer);
+ card->bchans = 0;
+
+ if (debugmode)
+ printk(KERN_DEBUG "capidrv-%d: id=%d isdn unload\n",
+ card->contrnr, card->myid);
cmd.command = ISDN_STAT_UNLOAD;
cmd.driver = card->myid;
card->interface.statcallb(&cmd);
+ if (debugmode)
+ printk(KERN_DEBUG "capidrv-%d: id=%d remove contr from list\n",
+ card->contrnr, card->myid);
+
+ spin_lock_irqsave(&global_lock, flags);
+ for (pp = &global.contr_list; *pp; pp = &(*pp)->next) {
+ if (*pp == card) {
+ *pp = (*pp)->next;
+ card->next = 0;
+ global.ncontr--;
+ break;
+ }
+ }
+ spin_unlock_irqrestore(&global_lock, flags);
+
kfree(card);
printk(KERN_INFO "%s: now down.\n", card->name);
@@ -2539,12 +2557,10 @@ int capidrv_init(void)
#ifdef MODULE
void cleanup_module(void)
{
- capidrv_contr *card, *next;
- long flags;
char rev[10];
char *p;
- if ((p = strchr(revision, ':'))) {
+ if ((p = strchr(revision, ':')) != 0) {
strcpy(rev, p + 1);
p = strchr(rev, '$');
*p = 0;
@@ -2552,21 +2568,10 @@ void cleanup_module(void)
strcpy(rev, " ??? ");
}
- for (card = global.contr_list; card; card = next) {
- next = card->next;
- disable_dchannel_trace(card);
- }
-
- save_flags(flags);
- cli();
- for (card = global.contr_list; card; card = next) {
- next = card->next;
- capidrv_delcontr(card->contrnr);
- }
- restore_flags(flags);
-
(void) (*capifuncs->capi_release) (global.appid);
+
detach_capi_interface(&cuser);
+
proc_exit();
printk(KERN_NOTICE "capidrv: Rev%s: unloaded\n", rev);
diff --git a/drivers/isdn/avmb1/capifs.c b/drivers/isdn/avmb1/capifs.c
index b869e6b5c..fcefa3d68 100644
--- a/drivers/isdn/avmb1/capifs.c
+++ b/drivers/isdn/avmb1/capifs.c
@@ -1,11 +1,15 @@
/*
- * $Id: capifs.c,v 1.5 2000/03/13 17:49:52 calle Exp $
+ * $Id: capifs.c,v 1.6 2000/04/03 13:29:25 calle Exp $
*
* (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
*
* Heavily based on devpts filesystem from H. Peter Anvin
*
* $Log: capifs.c,v $
+ * Revision 1.6 2000/04/03 13:29:25 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.5 2000/03/13 17:49:52 calle
* make it running with 2.3.51.
*
@@ -56,7 +60,7 @@
MODULE_AUTHOR("Carsten Paeth <calle@calle.de>");
-static char *revision = "$Revision: 1.5 $";
+static char *revision = "$Revision: 1.6 $";
struct capifs_ncci {
struct inode *inode;
@@ -554,6 +558,8 @@ int __init capifs_init(void)
char *p;
int err;
+ MOD_INC_USE_COUNT;
+
if ((p = strchr(revision, ':'))) {
strcpy(rev, p + 1);
p = strchr(rev, '$');
@@ -562,13 +568,16 @@ int __init capifs_init(void)
strcpy(rev, "1.0");
err = register_filesystem(&capifs_fs_type);
- if (err)
+ if (err) {
+ MOD_DEC_USE_COUNT;
return err;
+ }
#ifdef MODULE
printk(KERN_NOTICE "capifs: Rev%s: loaded\n", rev);
#else
printk(KERN_NOTICE "capifs: Rev%s: started\n", rev);
#endif
+ MOD_DEC_USE_COUNT;
return 0;
}
diff --git a/drivers/isdn/avmb1/kcapi.c b/drivers/isdn/avmb1/kcapi.c
index d678a8ad7..140023d49 100644
--- a/drivers/isdn/avmb1/kcapi.c
+++ b/drivers/isdn/avmb1/kcapi.c
@@ -1,11 +1,22 @@
/*
- * $Id: kcapi.c,v 1.13 2000/03/03 15:50:42 calle Exp $
+ * $Id: kcapi.c,v 1.15 2000/04/06 15:01:25 calle Exp $
*
* Kernel CAPI 2.0 Module
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: kcapi.c,v $
+ * Revision 1.15 2000/04/06 15:01:25 calle
+ * Bugfix: crash in capidrv.c when reseting a capi controller.
+ * - changed code order on remove of controller.
+ * - using tq_schedule for notifier in kcapi.c.
+ * - now using spin_lock_irqsave() and spin_unlock_irqrestore().
+ * strange: sometimes even MP hang on unload of isdn.o ...
+ *
+ * Revision 1.14 2000/04/03 13:29:25 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.13 2000/03/03 15:50:42 calle
* - kernel CAPI:
* - Changed parameter "param" in capi_signal from __u32 to void *.
@@ -98,7 +109,7 @@
#include <linux/b1lli.h>
#endif
-static char *revision = "$Revision: 1.13 $";
+static char *revision = "$Revision: 1.15 $";
/* ------------------------------------------------------------- */
@@ -270,7 +281,7 @@ endloop:
*eof = 1;
if (off >= len+begin)
return 0;
- *start = page + (begin-off);
+ *start = page + (off-begin);
return ((count < begin+len-off) ? count : begin+len-off);
}
@@ -541,20 +552,21 @@ static struct capi_notifier_list{
struct capi_notifier *tail;
} notifier_list;
+static spinlock_t notifier_lock = SPIN_LOCK_UNLOCKED;
+
static inline void notify_enqueue(struct capi_notifier *np)
{
struct capi_notifier_list *q = &notifier_list;
unsigned long flags;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&notifier_lock, flags);
if (q->tail) {
q->tail->next = np;
q->tail = np;
} else {
q->head = q->tail = np;
}
- restore_flags(flags);
+ spin_unlock_irqrestore(&notifier_lock, flags);
}
static inline struct capi_notifier *notify_dequeue(void)
@@ -563,15 +575,14 @@ static inline struct capi_notifier *notify_dequeue(void)
struct capi_notifier *np = 0;
unsigned long flags;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&notifier_lock, flags);
if (q->head) {
np = q->head;
if ((q->head = np->next) == 0)
q->tail = 0;
np->next = 0;
}
- restore_flags(flags);
+ spin_unlock_irqrestore(&notifier_lock, flags);
return np;
}
@@ -580,18 +591,24 @@ static int notify_push(unsigned int cmd, __u32 controller,
{
struct capi_notifier *np;
+ MOD_INC_USE_COUNT;
np = (struct capi_notifier *)kmalloc(sizeof(struct capi_notifier), GFP_ATOMIC);
- if (!np)
+ if (!np) {
+ MOD_DEC_USE_COUNT;
return -1;
+ }
memset(np, 0, sizeof(struct capi_notifier));
np->cmd = cmd;
np->controller = controller;
np->applid = applid;
np->ncci = ncci;
notify_enqueue(np);
- MOD_INC_USE_COUNT;
- queue_task(&tq_state_notify, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
+ /*
+ * The notifier will result in adding/deleteing
+ * of devices. Devices can only removed in
+ * user process, not in bh.
+ */
+ queue_task(&tq_state_notify, &tq_scheduler);
return 0;
}
@@ -1732,6 +1749,8 @@ int kcapi_init(void)
char *p;
char rev[10];
+ MOD_INC_USE_COUNT;
+
skb_queue_head_init(&recv_queue);
/* init_bh(CAPI_BH, do_capi_bh); */
@@ -1773,6 +1792,7 @@ int kcapi_init(void)
(void)c4_init();
#endif
#endif
+ MOD_DEC_USE_COUNT;
return 0;
}
diff --git a/drivers/isdn/avmb1/t1isa.c b/drivers/isdn/avmb1/t1isa.c
index e1efd3939..b87f7293e 100644
--- a/drivers/isdn/avmb1/t1isa.c
+++ b/drivers/isdn/avmb1/t1isa.c
@@ -1,11 +1,15 @@
/*
- * $Id: t1isa.c,v 1.10 2000/02/02 18:36:04 calle Exp $
+ * $Id: t1isa.c,v 1.11 2000/04/03 13:29:25 calle Exp $
*
* Module for AVM T1 HEMA-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1isa.c,v $
+ * Revision 1.11 2000/04/03 13:29:25 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.10 2000/02/02 18:36:04 calle
* - Modules are now locked while init_module is running
* - fixed problem with memory mapping if address is not aligned
@@ -81,7 +85,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.10 $";
+static char *revision = "$Revision: 1.11 $";
/* ------------------------------------------------------------- */
@@ -598,6 +602,9 @@ int t1isa_init(void)
{
struct capi_driver *driver = &t1isa_driver;
char *p;
+ int retval = 0;
+
+ MOD_INC_USE_COUNT;
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
@@ -612,9 +619,11 @@ int t1isa_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
- return -EIO;
+ retval = -EIO;
}
- return 0;
+
+ MOD_DEC_USE_COUNT;
+ return retval;
}
#ifdef MODULE
diff --git a/drivers/isdn/avmb1/t1pci.c b/drivers/isdn/avmb1/t1pci.c
index d24894d9b..10304be3b 100644
--- a/drivers/isdn/avmb1/t1pci.c
+++ b/drivers/isdn/avmb1/t1pci.c
@@ -1,11 +1,18 @@
/*
- * $Id: t1pci.c,v 1.5 2000/02/02 18:36:04 calle Exp $
+ * $Id: t1pci.c,v 1.7 2000/04/07 15:26:55 calle Exp $
*
* Module for AVM T1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1pci.c,v $
+ * Revision 1.7 2000/04/07 15:26:55 calle
+ * better error message if cabel not connected or T1 has no power.
+ *
+ * Revision 1.6 2000/04/03 13:29:25 calle
+ * make Tim Waugh happy (module unload races in 2.3.99-pre3).
+ * no real problem there, but now it is much cleaner ...
+ *
* Revision 1.5 2000/02/02 18:36:04 calle
* - Modules are now locked while init_module is running
* - fixed problem with memory mapping if address is not aligned
@@ -47,7 +54,7 @@
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.5 $";
+static char *revision = "$Revision: 1.7 $";
#undef CONFIG_T1PCI_DEBUG
#undef CONFIG_T1PCI_POLLDEBUG
@@ -164,7 +171,11 @@ static int t1pci_add_card(struct capi_driver *driver, struct capicardparams *p)
b1dma_reset(card);
if ((retval = t1pci_detect(card)) != 0) {
- printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
+ if (retval < 6)
+ printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
+ driver->name, card->port, retval);
+ else
+ printk(KERN_NOTICE "%s: card at 0x%x, but cabel not connected or T1 has no power (%d)\n",
driver->name, card->port, retval);
iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK));
kfree(card->ctrlinfo);
@@ -264,6 +275,8 @@ int t1pci_init(void)
char *p;
int retval;
+ MOD_INC_USE_COUNT;
+
if ((p = strchr(revision, ':'))) {
strncpy(driver->revision, p + 1, sizeof(driver->revision));
p = strchr(driver->revision, '$');
@@ -277,6 +290,7 @@ int t1pci_init(void)
if (!di) {
printk(KERN_ERR "%s: failed to attach capi_driver\n",
driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -284,6 +298,7 @@ int t1pci_init(void)
if (!pci_present()) {
printk(KERN_ERR "%s: no PCI bus present\n", driver->name);
detach_capi_driver(driver);
+ MOD_DEC_USE_COUNT;
return -EIO;
}
@@ -305,6 +320,7 @@ int t1pci_init(void)
#ifdef MODULE
cleanup_module();
#endif
+ MOD_DEC_USE_COUNT;
return retval;
}
ncards++;
@@ -312,12 +328,15 @@ int t1pci_init(void)
if (ncards) {
printk(KERN_INFO "%s: %d T1-PCI card(s) detected\n",
driver->name, ncards);
+ MOD_DEC_USE_COUNT;
return 0;
}
printk(KERN_ERR "%s: NO T1-PCI card detected\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -ESRCH;
#else
printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
+ MOD_DEC_USE_COUNT;
return -EIO;
#endif
}
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index da55eb2df..8495fed83 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -1,8 +1,11 @@
-/* $Id: hisax.h,v 2.41 2000/02/26 00:35:13 keil Exp $
+/* $Id: hisax.h,v 2.42 2000/04/09 19:02:44 keil Exp $
* Basic declarations, defines and prototypes
*
* $Log: hisax.h,v $
+ * Revision 2.42 2000/04/09 19:02:44 keil
+ * retry pump modulation settings if it fails
+ *
* Revision 2.41 2000/02/26 00:35:13 keil
* Fix skb freeing in interrupt context
*
@@ -500,6 +503,7 @@ struct isar_hw {
u_char mod;
u_char newcmd;
u_char newmod;
+ char try_mod;
struct timer_list ftimer;
u_char *rcvbuf; /* B-Channel receive Buffer */
u_char conmsg[16];
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c
index d53dc729a..3f0a5c5aa 100644
--- a/drivers/isdn/hisax/isar.c
+++ b/drivers/isdn/hisax/isar.c
@@ -1,4 +1,4 @@
-/* $Id: isar.c,v 1.10 2000/02/26 00:35:13 keil Exp $
+/* $Id: isar.c,v 1.11 2000/04/09 19:02:44 keil Exp $
* isar.c ISAR (Siemens PSB 7110) specific routines
*
@@ -6,6 +6,9 @@
*
*
* $Log: isar.c,v $
+ * Revision 1.11 2000/04/09 19:02:44 keil
+ * retry pump modulation settings if it fails
+ *
* Revision 1.10 2000/02/26 00:35:13 keil
* Fix skb freeing in interrupt context
*
@@ -1085,13 +1088,14 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
break;
case PCTRL_CMD_FRH:
case PCTRL_CMD_FRM:
- p1 = bcs->hw.isar.newmod;
+ p1 = bcs->hw.isar.mod = bcs->hw.isar.newmod;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.cmd = bcs->hw.isar.newcmd;
bcs->hw.isar.newcmd = 0;
sendmsg(cs, dps | ISAR_HIS_PUMPCTRL,
bcs->hw.isar.cmd, 1, &p1);
bcs->hw.isar.state = STFAX_LINE;
+ bcs->hw.isar.try_mod = 3;
break;
default:
if (cs->debug & L1_DEB_HSCX)
@@ -1117,13 +1121,14 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
if (cs->debug & L1_DEB_HSCX)
debugl1(cs, "pump stev RSP_SILDET");
if (bcs->hw.isar.state == STFAX_SILDET) {
- p1 = bcs->hw.isar.newmod;
+ p1 = bcs->hw.isar.mod = bcs->hw.isar.newmod;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.cmd = bcs->hw.isar.newcmd;
bcs->hw.isar.newcmd = 0;
sendmsg(cs, dps | ISAR_HIS_PUMPCTRL,
bcs->hw.isar.cmd, 1, &p1);
bcs->hw.isar.state = STFAX_LINE;
+ bcs->hw.isar.try_mod = 3;
}
break;
case PSEV_RSP_SILOFF:
@@ -1131,6 +1136,17 @@ isar_pump_statev_fax(struct BCState *bcs, u_char devt) {
debugl1(cs, "pump stev RSP_SILOFF");
break;
case PSEV_RSP_FCERR:
+ if (bcs->hw.isar.state == STFAX_LINE) {
+ if (cs->debug & L1_DEB_HSCX)
+ debugl1(cs, "pump stev RSP_FCERR try %d",
+ bcs->hw.isar.try_mod);
+ if (bcs->hw.isar.try_mod--) {
+ sendmsg(cs, dps | ISAR_HIS_PUMPCTRL,
+ bcs->hw.isar.cmd, 1,
+ &bcs->hw.isar.mod);
+ break;
+ }
+ }
if (cs->debug & L1_DEB_HSCX)
debugl1(cs, "pump stev RSP_FCERR");
bcs->hw.isar.state = STFAX_ESCAPE;
@@ -1441,6 +1457,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
bcs->hw.isar.mod = para;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.newcmd = 0;
+ bcs->hw.isar.try_mod = 3;
} else if ((bcs->hw.isar.state == STFAX_ACTIV) &&
(bcs->hw.isar.cmd == PCTRL_CMD_FTM) &&
(bcs->hw.isar.mod == para)) {
@@ -1463,6 +1480,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
bcs->hw.isar.mod = para;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.newcmd = 0;
+ bcs->hw.isar.try_mod = 3;
} else if ((bcs->hw.isar.state == STFAX_ACTIV) &&
(bcs->hw.isar.cmd == PCTRL_CMD_FTH) &&
(bcs->hw.isar.mod == para)) {
@@ -1485,6 +1503,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
bcs->hw.isar.mod = para;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.newcmd = 0;
+ bcs->hw.isar.try_mod = 3;
} else if ((bcs->hw.isar.state == STFAX_ACTIV) &&
(bcs->hw.isar.cmd == PCTRL_CMD_FRM) &&
(bcs->hw.isar.mod == para)) {
@@ -1507,6 +1526,7 @@ isar_pump_cmd(struct BCState *bcs, u_char cmd, u_char para)
bcs->hw.isar.mod = para;
bcs->hw.isar.newmod = 0;
bcs->hw.isar.newcmd = 0;
+ bcs->hw.isar.try_mod = 3;
} else if ((bcs->hw.isar.state == STFAX_ACTIV) &&
(bcs->hw.isar.cmd == PCTRL_CMD_FRH) &&
(bcs->hw.isar.mod == para)) {
diff --git a/drivers/isdn/hisax/isdnl2.c b/drivers/isdn/hisax/isdnl2.c
index 69e320262..6353c88db 100644
--- a/drivers/isdn/hisax/isdnl2.c
+++ b/drivers/isdn/hisax/isdnl2.c
@@ -1,4 +1,4 @@
-/* $Id: isdnl2.c,v 2.20 1999/08/25 16:52:04 keil Exp $
+/* $Id: isdnl2.c,v 2.22 2000/04/12 20:28:37 keil Exp $
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
@@ -11,6 +11,13 @@
* Fritz Elfert
*
* $Log: isdnl2.c,v $
+ * Revision 2.22 2000/04/12 20:28:37 keil
+ * a I frame may be contain zero information bytes
+ *
+ * Revision 2.21 2000/04/12 16:41:01 kai
+ * fix max iframe size
+ * fix bug in multicasting DL_RELEASE_IND
+ *
* Revision 2.20 1999/08/25 16:52:04 keil
* Make gcc on AXP happy
*
@@ -83,7 +90,7 @@
#include "hisax.h"
#include "isdnl2.h"
-const char *l2_revision = "$Revision: 2.20 $";
+const char *l2_revision = "$Revision: 2.22 $";
static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
@@ -361,7 +368,7 @@ IsRNR(u_char * data, struct PStack *st)
int
iframe_error(struct PStack *st, struct sk_buff *skb)
{
- int i = l2addrsize(&st->l2) + (test_bit(FLG_MOD128, &st->l2.flag) ? 1 : 0);
+ int i = l2addrsize(&st->l2) + (test_bit(FLG_MOD128, &st->l2.flag) ? 2 : 1);
int rsp = *skb->data & 0x2;
if (test_bit(FLG_ORIG, &st->l2.flag))
@@ -371,7 +378,7 @@ iframe_error(struct PStack *st, struct sk_buff *skb)
return 'L';
- if (skb->len <= i)
+ if (skb->len < i)
return 'N';
if ((skb->len - i) > st->l2.maxlen)
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
index 6dc8bd9d0..1783c5556 100644
--- a/drivers/isdn/hisax/isdnl3.c
+++ b/drivers/isdn/hisax/isdnl3.c
@@ -1,4 +1,4 @@
-/* $Id: isdnl3.c,v 2.10 1999/07/21 14:46:19 keil Exp $
+/* $Id: isdnl3.c,v 2.11 2000/04/12 16:41:01 kai Exp $
* Author Karsten Keil (keil@isdn4linux.de)
* based on the teles driver from Jan den Ouden
@@ -11,6 +11,10 @@
* Fritz Elfert
*
* $Log: isdnl3.c,v $
+ * Revision 2.11 2000/04/12 16:41:01 kai
+ * fix max iframe size
+ * fix bug in multicasting DL_RELEASE_IND
+ *
* Revision 2.10 1999/07/21 14:46:19 keil
* changes from EICON certification
*
@@ -68,7 +72,7 @@
#include "isdnl3.h"
#include <linux/config.h>
-const char *l3_revision = "$Revision: 2.10 $";
+const char *l3_revision = "$Revision: 2.11 $";
static
struct Fsm l3fsm =
@@ -375,10 +379,13 @@ static void
l3ml3p(struct PStack *st, int pr)
{
struct l3_process *p = st->l3.proc;
+ struct l3_process *np;
while (p) {
+ /* p might be kfreed under us, so we need to save where we want to go on */
+ np = p->next;
st->l3.l3ml3(st, pr, p);
- p = p->next;
+ p = np;
}
}
diff --git a/drivers/isdn/hisax/md5sums.asc b/drivers/isdn/hisax/md5sums.asc
index ec21e78c7..3ccbfc33a 100644
--- a/drivers/isdn/hisax/md5sums.asc
+++ b/drivers/isdn/hisax/md5sums.asc
@@ -8,8 +8,8 @@
#
3fb9c99465857a4c136ae2881f4e30ba isac.c
dd3955847bbf680b41233478fe521d88 isdnl1.c
-bb51bd223040b511c18f091da5ab6456 isdnl2.c
-b7aa7f97b2374967a4aca7c52991142c isdnl3.c
+d362523462c424a8bce8b596ed5bdf2e isdnl2.c
+92ea268891c222963a6ca70935bf1556 isdnl3.c
a23fbf8879c1432b04640b8b04bdf419 tei.c
838791b14269ec94c74ba4ae89c022e6 callc.c
bf9605b36429898f7be6630034e83230 cert.c
@@ -23,9 +23,9 @@ a296edc459b508bf0346c3132815a4db diva.c
Version: 2.6.3i
Charset: noconv
-iQCVAwUBONlcejpxHvX/mS9tAQFWYAP/WmxgwQ7W6gVnsMkUlwzE1TKGWVJdGUTC
-7WrKEtdweuzW3/7WEzjBoZgUEcpugJYK3JENby1xjh3yIHfws4HqLme1yXAmkYUK
-6LmW96HC2g4wj7PH0hvLnzTOtXDGTppU7KJibbB+ziyhBbs6SGXOD4zHrCWmT9ld
-CURhfNgftIs=
-=AA+Q
+iQCVAwUBOPT2aTpxHvX/mS9tAQFJyAQAj+eY8MhPxQ2TS3rtfjK7bv8jrOGeJYu6
+P0YPnkkc09pCA6UdmYP6VSFkhtDS43HEZiGMb1MV/Y4LQ4wVDNrFDk9AyUNhP2/0
+gY+nYON6hT9ilXYqsbqoqGmh5qLaxj64p9mKu+MIgZ69CS4g7aj/OAXWB06zh7li
+MiC65PNo6k0=
+=d7xA
-----END PGP SIGNATURE-----
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index 4198bb5e0..2cfbd146c 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -1,4 +1,4 @@
-/* $Id: niccy.c,v 1.8 1999/08/11 21:01:33 keil Exp $
+/* $Id: niccy.c,v 1.10 2000/04/11 11:12:39 keil Exp $
* niccy.c low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and
* compatible (SAGEM cybermodem)
@@ -8,6 +8,12 @@
* Thanks to Dr. Neuhaus and SAGEM for informations
*
* $Log: niccy.c,v $
+ * Revision 1.10 2000/04/11 11:12:39 keil
+ * cleanup
+ *
+ * Revision 1.9 2000/04/09 19:09:19 keil
+ * Bugfix: reset IRQ enable only valid for PCI version
+ *
* Revision 1.8 1999/08/11 21:01:33 keil
* new PCI codefix
*
@@ -42,7 +48,7 @@
#include <linux/pci.h>
extern const char *CardType[];
-const char *niccy_revision = "$Revision: 1.8 $";
+const char *niccy_revision = "$Revision: 1.10 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -228,12 +234,13 @@ release_io_niccy(struct IsdnCardState *cs)
static void
niccy_reset(struct IsdnCardState *cs)
{
- int val, nval;
-
- val = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
- nval = val | PCI_IRQ_ENABLE;
- outl(nval, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
+ if (cs->subtyp == NICCY_PCI) {
+ int val;
+ val = inl(cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
+ val |= PCI_IRQ_ENABLE;
+ outl(val, cs->hw.niccy.cfg_reg + PCI_IRQ_CTRL_REG);
+ }
inithscxisac(cs, 3);
}
diff --git a/drivers/isdn/isdn_common.c b/drivers/isdn/isdn_common.c
index e9c3ce50b..6462a10bc 100644
--- a/drivers/isdn/isdn_common.c
+++ b/drivers/isdn/isdn_common.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_common.c,v 1.100 2000/03/03 16:37:11 kai Exp $
+/* $Id: isdn_common.c,v 1.101 2000/04/07 14:50:34 calle Exp $
* Linux ISDN subsystem, common used functions (linklevel).
*
@@ -21,6 +21,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_common.c,v $
+ * Revision 1.101 2000/04/07 14:50:34 calle
+ * Bugfix: on my system 2.3.99-pre3 Dual PII 350, unload of module isdn.o
+ * hangs if vfree is called with interrupt disabled. After moving
+ * restore_flags in front of vfree it doesn't hang.
+ *
* Revision 1.100 2000/03/03 16:37:11 kai
* incorporated some cosmetic changes from the official kernel tree back
* into CVS
@@ -453,7 +458,7 @@
isdn_dev *dev = (isdn_dev *) 0;
-static char *isdn_revision = "$Revision: 1.100 $";
+static char *isdn_revision = "$Revision: 1.101 $";
extern char *isdn_net_revision;
extern char *isdn_tty_revision;
@@ -2780,12 +2785,14 @@ cleanup_module(void)
}
if (devfs_unregister_chrdev(ISDN_MAJOR, "isdn") != 0) {
printk(KERN_WARNING "isdn: controldevice busy, remove cancelled\n");
+ restore_flags(flags);
} else {
isdn_cleanup_devfs();
del_timer(&dev->timer);
+ restore_flags(flags);
+ /* call vfree with interrupts enabled, else it will hang */
vfree(dev);
printk(KERN_NOTICE "ISDN-subsystem unloaded\n");
}
- restore_flags(flags);
}
#endif
diff --git a/drivers/isdn/isdn_net.c b/drivers/isdn/isdn_net.c
index 8948e43f5..c22aadc4a 100644
--- a/drivers/isdn/isdn_net.c
+++ b/drivers/isdn/isdn_net.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.c,v 1.122 2000/03/20 22:37:46 detabc Exp $
+/* $Id: isdn_net.c,v 1.125 2000/04/05 21:25:55 detabc Exp $
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
@@ -21,6 +21,15 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: isdn_net.c,v $
+ * Revision 1.125 2000/04/05 21:25:55 detabc
+ * add leased-line support to abc-stuff
+ *
+ * Revision 1.124 2000/04/03 21:07:22 detabc
+ * change write_super handling for abc-stuff
+ *
+ * Revision 1.123 2000/04/03 19:14:36 kai
+ * fix "isdn BUG at isdn_net.c:1440!"
+ *
* Revision 1.122 2000/03/20 22:37:46 detabc
* modify abc-extension to work together with the new LL.
* remove abc frame-counter (is obsolete now).
@@ -647,7 +656,7 @@ static __inline__ void isdn_net_zero_frame_cnt(isdn_net_local *lp)
int isdn_net_force_dial_lp(isdn_net_local *);
static int isdn_net_start_xmit(struct sk_buff *, struct net_device *);
-char *isdn_net_revision = "$Revision: 1.122 $";
+char *isdn_net_revision = "$Revision: 1.125 $";
/*
* Code for raw-networking over ISDN
@@ -1437,12 +1446,16 @@ isdn_net_log_skb(struct sk_buff * skb, isdn_net_local * lp)
void isdn_net_write_super(isdn_net_local *lp, struct sk_buff *skb)
{
if (in_interrupt()) {
- printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__);
+ // we can't grab the lock from irq context,
+ // so we just queue the packet
+ skb_queue_tail(&lp->super_tx_queue, skb);
+ queue_task(&lp->tqueue, &tq_immediate);
return;
}
spin_lock_bh(&lp->xmit_lock);
- if (!isdn_net_lp_busy(lp)) {
+ if (!isdn_net_lp_busy(lp))
+ {
isdn_net_writebuf_skb(lp, skb);
} else {
skb_queue_tail(&lp->super_tx_queue, skb);