summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /drivers/isdn
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/avmb1/b1.c2
-rw-r--r--drivers/isdn/avmb1/b1dma.c3
-rw-r--r--drivers/isdn/avmb1/c4.c3
-rw-r--r--drivers/isdn/avmb1/capi.c20
-rw-r--r--drivers/isdn/avmb1/capidrv.c18
-rw-r--r--drivers/isdn/avmb1/t1isa.c2
-rw-r--r--drivers/isdn/eicon/Divas_mod.c14
-rw-r--r--drivers/isdn/eicon/common.c62
-rw-r--r--drivers/isdn/eicon/eicon_mod.c45
-rw-r--r--drivers/isdn/eicon/idi.h4
-rw-r--r--drivers/isdn/eicon/md5sums.asc2
-rw-r--r--drivers/isdn/hisax/hfc_pci.c2
12 files changed, 98 insertions, 79 deletions
diff --git a/drivers/isdn/avmb1/b1.c b/drivers/isdn/avmb1/b1.c
index 747b5ea7f..8ccf5fc7e 100644
--- a/drivers/isdn/avmb1/b1.c
+++ b/drivers/isdn/avmb1/b1.c
@@ -517,7 +517,7 @@ void b1_handle_interrupt(avmcard * card)
struct sk_buff *skb;
unsigned ApplId;
- unsigned MsgLen;
+ signed MsgLen;
unsigned DataB3Len;
unsigned NCCI;
unsigned WindowSize;
diff --git a/drivers/isdn/avmb1/b1dma.c b/drivers/isdn/avmb1/b1dma.c
index 3bd6a01c0..94f493620 100644
--- a/drivers/isdn/avmb1/b1dma.c
+++ b/drivers/isdn/avmb1/b1dma.c
@@ -475,7 +475,8 @@ static void b1dma_handle_rx(avmcard *card)
struct capi_ctr *ctrl = cinfo->capi_ctrl;
struct sk_buff *skb;
void *p = dma->recvbuf+4;
- __u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
+ __u32 ApplId, DataB3Len, NCCI, WindowSize;
+ __s32 MsgLen;
__u8 b1cmd = _get_byte(&p);
#ifdef CONFIG_B1DMA_DEBUG
diff --git a/drivers/isdn/avmb1/c4.c b/drivers/isdn/avmb1/c4.c
index d814eec1a..bbb5d5793 100644
--- a/drivers/isdn/avmb1/c4.c
+++ b/drivers/isdn/avmb1/c4.c
@@ -572,7 +572,8 @@ static void c4_handle_rx(avmcard *card)
avmctrl_info *cinfo;
struct sk_buff *skb;
void *p = dma->recvbuf;
- __u32 ApplId, MsgLen, DataB3Len, NCCI, WindowSize;
+ __u32 ApplId, DataB3Len, NCCI, WindowSize;
+ __s32 MsgLen;
__u8 b1cmd = _get_byte(&p);
__u32 cidx;
diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c
index 0b7cc80d2..ff91a89f8 100644
--- a/drivers/isdn/avmb1/capi.c
+++ b/drivers/isdn/avmb1/capi.c
@@ -212,6 +212,7 @@
#include <linux/capi.h>
#include <linux/kernelcapi.h>
#include <linux/devfs_fs_kernel.h>
+#include <linux/init.h>
#include "capiutil.h"
#include "capicmd.h"
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -1930,7 +1931,7 @@ static struct procfsentries {
{ "capi/capi20ncci", 0 , proc_capincci_read_proc },
};
-static void proc_init(void)
+static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int i;
@@ -1942,7 +1943,7 @@ static void proc_init(void)
}
}
-static void proc_exit(void)
+static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int i;
@@ -1981,7 +1982,7 @@ static void alloc_exit(void)
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
}
-static int alloc_init(void)
+static int __init alloc_init(void)
{
capidev_cachep = kmem_cache_create("capi20_dev",
sizeof(struct capidev),
@@ -2052,10 +2053,6 @@ static void lower_callback(unsigned int cmd, __u32 contr, void *data)
}
}
-#ifdef MODULE
-#define capi_init init_module
-#endif
-
static struct capi_interface_user cuser = {
"capi20",
lower_callback,
@@ -2063,7 +2060,7 @@ static struct capi_interface_user cuser = {
static char rev[10];
-int capi_init(void)
+int __init capi_init(void)
{
char *p;
@@ -2152,8 +2149,7 @@ int capi_init(void)
return 0;
}
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit capi_exit(void)
{
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
unsigned int j;
@@ -2177,4 +2173,8 @@ void cleanup_module(void)
printk(KERN_NOTICE "capi: Rev%s: unloaded\n", rev);
}
+#ifdef MODULE
+module_init(capi_init);
#endif
+module_exit(capi_exit);
+
diff --git a/drivers/isdn/avmb1/capidrv.c b/drivers/isdn/avmb1/capidrv.c
index 58b2eb9c6..a66057e1c 100644
--- a/drivers/isdn/avmb1/capidrv.c
+++ b/drivers/isdn/avmb1/capidrv.c
@@ -200,6 +200,7 @@
#include <linux/capi.h>
#include <linux/kernelcapi.h>
#include <linux/ctype.h>
+#include <linux/init.h>
#include <asm/segment.h>
#include "capiutil.h"
@@ -2436,7 +2437,7 @@ static struct procfsentries {
{ "capi/capidrv", 0 , proc_capidrv_read_proc },
};
-static void proc_init(void)
+static void __init proc_init(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int i;
@@ -2448,7 +2449,7 @@ static void proc_init(void)
}
}
-static void proc_exit(void)
+static void __exit proc_exit(void)
{
int nelem = sizeof(procfsentries)/sizeof(procfsentries[0]);
int i;
@@ -2467,11 +2468,7 @@ static struct capi_interface_user cuser = {
lower_callback
};
-#ifdef MODULE
-#define capidrv_init init_module
-#endif
-
-int capidrv_init(void)
+int __init capidrv_init(void)
{
struct capi_register_params rparam;
capi_profile profile;
@@ -2531,8 +2528,7 @@ int capidrv_init(void)
return 0;
}
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit capidrv_exit(void)
{
char rev[10];
char *p;
@@ -2554,4 +2550,8 @@ void cleanup_module(void)
printk(KERN_NOTICE "capidrv: Rev%s: unloaded\n", rev);
}
+#ifdef MODULE
+module_init(capidrv_init);
#endif
+module_exit(capidrv_exit);
+
diff --git a/drivers/isdn/avmb1/t1isa.c b/drivers/isdn/avmb1/t1isa.c
index b6ec1aa52..2abd7ed4c 100644
--- a/drivers/isdn/avmb1/t1isa.c
+++ b/drivers/isdn/avmb1/t1isa.c
@@ -200,7 +200,7 @@ static void t1_handle_interrupt(avmcard * card)
struct sk_buff *skb;
unsigned ApplId;
- unsigned MsgLen;
+ signed MsgLen;
unsigned DataB3Len;
unsigned NCCI;
unsigned WindowSize;
diff --git a/drivers/isdn/eicon/Divas_mod.c b/drivers/isdn/eicon/Divas_mod.c
index 8cb2a0409..53217f81f 100644
--- a/drivers/isdn/eicon/Divas_mod.c
+++ b/drivers/isdn/eicon/Divas_mod.c
@@ -42,11 +42,13 @@
#ifdef MODULE
#include "idi.h"
-void EtdM_DIDD_Write(DESCRIPTOR *, int);
-EXPORT_SYMBOL_NOVERS(EtdM_DIDD_Read);
-EXPORT_SYMBOL_NOVERS(EtdM_DIDD_Write);
+void DIVA_DIDD_Write(DESCRIPTOR *, int);
+EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
+EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Write);
EXPORT_SYMBOL_NOVERS(DivasPrintf);
#define Divas_init init_module
+#else
+#define Divas_init eicon_init
#endif
extern char *file_check(void);
@@ -58,7 +60,7 @@ Divas_init(void)
{
printk(KERN_DEBUG "DIVA Server Driver - initialising\n");
- printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.12 (%s)\n",file_check());
+ printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.15 (%s)\n",file_check());
#if !defined(CONFIG_PCI)
@@ -164,9 +166,5 @@ void mod_dec_use_count(void)
MOD_DEC_USE_COUNT;
}
-#else
-Divas_setup(char *str, int *ints)
-{
-}
#endif
diff --git a/drivers/isdn/eicon/common.c b/drivers/isdn/eicon/common.c
index 4a4f77d9f..1f9ae145e 100644
--- a/drivers/isdn/eicon/common.c
+++ b/drivers/isdn/eicon/common.c
@@ -81,29 +81,33 @@ card_t DivasCards[MAX_CARDS];
dia_config_t *DivasConfig(card_t *, dia_config_t *);
static
-DESCRIPTOR DIDD_Table[16];
-static
-int DIDD_Length = 0;
+DESCRIPTOR DIDD_Table[32];
-void EtdM_DIDD_Read( DESCRIPTOR *table, int *tablelength )
+void DIVA_DIDD_Read( DESCRIPTOR *table, int tablelength )
{
- int table_size = sizeof(DIDD_Table);
+ bzero(table, tablelength);
+
+ if (tablelength > sizeof(DIDD_Table))
+ tablelength = sizeof(DIDD_Table);
- bcopy((caddr_t)DIDD_Table, (caddr_t)table, table_size);
+ if(tablelength % sizeof(DESCRIPTOR)) {
+ tablelength /= sizeof(DESCRIPTOR);
+ tablelength *= sizeof(DESCRIPTOR);
+ }
- *tablelength = DIDD_Length;
+ if (tablelength > 0)
+ bcopy((caddr_t)DIDD_Table, (caddr_t)table, tablelength);
return;
}
static
-void EtdM_DIDD_Write(DESCRIPTOR *table, int tablelength)
+void DIVA_DIDD_Write(DESCRIPTOR *table, int tablelength)
{
- int table_size = sizeof(DIDD_Table);
-
- bcopy((caddr_t)table, (caddr_t)DIDD_Table, table_size);
+ if (tablelength > sizeof(DIDD_Table))
+ tablelength = sizeof(DIDD_Table);
- DIDD_Length = tablelength;
+ bcopy((caddr_t)table, (caddr_t)DIDD_Table, tablelength);
return;
}
@@ -111,19 +115,16 @@ void EtdM_DIDD_Write(DESCRIPTOR *table, int tablelength)
static
void init_idi_tab(void)
{
- int length = 0;
+ DESCRIPTOR d[32];
- DESCRIPTOR d[16];
+ bzero(d, sizeof(d));
- EtdM_DIDD_Read(d, &length);
-
- d[length].type = IDI_DIMAINT; /* identify the DIMAINT entry */
- d[length].channels = 0; /* zero channels associated with dimaint*/
- d[length].features = 0; /* no features associated with dimaint */
- d[length].request = (IDI_CALL) DivasPrintf;
- length++;
+ d[0].type = IDI_DIMAINT; /* identify the DIMAINT entry */
+ d[0].channels = 0; /* zero channels associated with dimaint*/
+ d[0].features = 0; /* no features associated with dimaint */
+ d[0].request = (IDI_CALL) DivasPrintf;
- EtdM_DIDD_Write(d, length);
+ DIVA_DIDD_Write(d, sizeof(d));
return;
}
@@ -663,7 +664,7 @@ int DivasCardLoad(dia_load_t *load)
static int idi_register(card_t *card, byte channels)
{
- DESCRIPTOR d[16];
+ DESCRIPTOR d[32];
int length, num_entities;
DPRINTF(("divas: registering card with IDI"));
@@ -680,9 +681,12 @@ static int idi_register(card_t *card, byte channels)
bzero(card->e_tbl, sizeof(E_INFO) * num_entities);
card->e_max = num_entities;
- EtdM_DIDD_Read(d, &length);
+ DIVA_DIDD_Read(d, sizeof(d));
+
+ for(length=0; length < DIM(d); length++)
+ if (d[length].type == 0) break;
- if (length == DIM(d))
+ if (length >= DIM(d))
{
KDPRINTF((KERN_WARNING "Divas: IDI register failed - table full"));
return -1;
@@ -692,18 +696,18 @@ static int idi_register(card_t *card, byte channels)
{
case DIA_CARD_TYPE_DIVA_SERVER:
d[length].type = IDI_ADAPTER_PR;
- d[length].serial = card->serial_no;
+ /* d[length].serial = card->serial_no; */
break;
case DIA_CARD_TYPE_DIVA_SERVER_B:
d[length].type = IDI_ADAPTER_MAESTRA;
- d[length].serial = card->serial_no;
+ /* d[length].serial = card->serial_no; */
break;
// 4BRI is treated as 4 BRI adapters
case DIA_CARD_TYPE_DIVA_SERVER_Q:
d[length].type = IDI_ADAPTER_MAESTRA;
- d[length].serial = card->cfg.serial;
+ /* d[length].serial = card->cfg.serial; */
}
d[length].features = 0;
@@ -727,7 +731,7 @@ static int idi_register(card_t *card, byte channels)
length++;
- EtdM_DIDD_Write(d, length);
+ DIVA_DIDD_Write(d, sizeof(d));
return 0;
}
diff --git a/drivers/isdn/eicon/eicon_mod.c b/drivers/isdn/eicon/eicon_mod.c
index f3af22b27..bd3d33e0a 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.35 2000/08/12 18:00:47 armin Exp $
+/* $Id: eicon_mod.c,v 1.37 2000/09/02 11:16:47 armin Exp $
*
* ISDN lowlevel-module for Eicon active cards.
*
@@ -32,7 +32,7 @@
#define DRIVERNAME "Eicon active ISDN driver"
#define DRIVERRELEASE "2.0"
-#define DRIVERPATCH ".14"
+#define DRIVERPATCH ".15"
#include <linux/config.h>
@@ -55,7 +55,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.35 $";
+static char *eicon_revision = "$Revision: 1.37 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -78,8 +78,7 @@ ulong DebugVar;
spinlock_t eicon_lock;
-DESCRIPTOR idi_d[16];
-int idi_dlength;
+DESCRIPTOR idi_d[32];
/* Parameters to be set by insmod */
#ifdef CONFIG_ISDN_DRV_EICON_ISA
@@ -210,6 +209,7 @@ eicon_command(eicon_card * card, isdn_ctrl * c)
#ifdef CONFIG_PCI
#ifdef CONFIG_ISDN_DRV_EICON_PCI
dia_start_t dstart;
+ int idi_length = 0;
#endif
#endif
isdn_ctrl cmd;
@@ -399,8 +399,15 @@ eicon_command(eicon_card * card, isdn_ctrl * c)
(unsigned long) a);
if (((c->arg - EICON_IOCTL_DIA_OFFSET)==DIA_IOCTL_START) && (!ret)) {
if (card->type != EICON_CTYPE_MAESTRAQ) {
- EtdM_DIDD_Read(idi_d, &idi_dlength);
- card->d = &idi_d[idi_dlength - 1];
+ DIVA_DIDD_Read(idi_d, sizeof(idi_d));
+ for(idi_length = 0; idi_length < 32; idi_length++) {
+ if (idi_d[idi_length].type == 0) break;
+ }
+ if ((idi_length < 1) || (idi_length >= 32)) {
+ eicon_log(card, 1, "eicon: invalid idi table length.\n");
+ break;
+ }
+ card->d = &idi_d[idi_length - 1];
card->flags |= EICON_FLAGS_LOADED;
card->flags |= EICON_FLAGS_RUNNING;
eicon_pci_init_conf(card);
@@ -414,19 +421,25 @@ eicon_command(eicon_card * card, isdn_ctrl * c)
cmd.driver = card->myid;
cmd.arg = 0;
card->interface.statcallb(&cmd);
- eicon_log(card, 1, "Eicon: %s started, %d channels (feat. 0x%x, SerNo. %d)\n",
+ eicon_log(card, 1, "Eicon: %s started, %d channels (feat. 0x%x)\n",
(card->type == EICON_CTYPE_MAESTRA) ? "BRI" : "PRI",
- card->d->channels, card->d->features, card->d->serial);
+ card->d->channels, card->d->features);
} else {
int i;
- EtdM_DIDD_Read(idi_d, &idi_dlength);
+ DIVA_DIDD_Read(idi_d, sizeof(idi_d));
+ for(idi_length = 0; idi_length < 32; idi_length++)
+ if (idi_d[idi_length].type == 0) break;
+ if ((idi_length < 1) || (idi_length >= 32)) {
+ eicon_log(card, 1, "eicon: invalid idi table length.\n");
+ break;
+ }
for(i = 3; i >= 0; i--) {
if (!(card = eicon_findnpcicard(dstart.card_id - i)))
return -EINVAL;
card->flags |= EICON_FLAGS_LOADED;
card->flags |= EICON_FLAGS_RUNNING;
- card->d = &idi_d[idi_dlength - (i+1)];
+ card->d = &idi_d[idi_length - (i+1)];
eicon_pci_init_conf(card);
if (card->d->channels > 1) {
cmd.command = ISDN_STAT_ADDCH;
@@ -438,8 +451,8 @@ eicon_command(eicon_card * card, isdn_ctrl * c)
cmd.driver = card->myid;
cmd.arg = 0;
card->interface.statcallb(&cmd);
- eicon_log(card, 1, "Eicon: %d/4BRI started, %d channels (feat. 0x%x, SerNo. %d)\n",
- 4-i, card->d->channels, card->d->features, card->d->serial);
+ eicon_log(card, 1, "Eicon: %d/4BRI started, %d channels (feat. 0x%x)\n",
+ 4-i, card->d->channels, card->d->features);
}
}
}
@@ -1392,9 +1405,9 @@ void mod_dec_use_count(void)
}
#ifdef CONFIG_ISDN_DRV_EICON_PCI
-void EtdM_DIDD_Write(DESCRIPTOR *, int);
-EXPORT_SYMBOL_NOVERS(EtdM_DIDD_Read);
-EXPORT_SYMBOL_NOVERS(EtdM_DIDD_Write);
+void DIVA_DIDD_Write(DESCRIPTOR *, int);
+EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Read);
+EXPORT_SYMBOL_NOVERS(DIVA_DIDD_Write);
EXPORT_SYMBOL_NOVERS(DivasPrintf);
#else
int DivasCardNext;
diff --git a/drivers/isdn/eicon/idi.h b/drivers/isdn/eicon/idi.h
index 0819665fe..5988cb8ed 100644
--- a/drivers/isdn/eicon/idi.h
+++ b/drivers/isdn/eicon/idi.h
@@ -112,11 +112,11 @@ typedef struct {
byte type;
byte channels;
word features;
- dword serial;
+ /* dword serial; */
IDI_CALL request;
} DESCRIPTOR;
-extern void EtdM_DIDD_Read(DESCRIPTOR *, int *);
+extern void DIVA_DIDD_Read(DESCRIPTOR *, int);
/* descriptor type field coding */
#define IDI_ADAPTER_S 1
diff --git a/drivers/isdn/eicon/md5sums.asc b/drivers/isdn/eicon/md5sums.asc
index aa1cd9065..e7ae38c42 100644
--- a/drivers/isdn/eicon/md5sums.asc
+++ b/drivers/isdn/eicon/md5sums.asc
@@ -3,7 +3,7 @@
# For changes and modifications in these files please
# read ../../../Documentation/isdn/README.eicon
#
-9b0e381d4558af3a6eba66843e1ee5d9 common.c
+34bfe8d08d337a97c699ac8326f1d9b6 common.c
dbb92cba52db31ff8325a252b3f595c3 idi.c
15687687ef82f099966ed42772001cd3 bri.c
c3e3b720c3351b66635bd548195e29e8 pri.c
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index c0ff9b642..b61f397d2 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1686,6 +1686,7 @@ __initfunc(int
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
return (0);
}
+#ifdef notdef
if (((int) cs->hw.hfcpci.pci_io & (PAGE_SIZE - 1))) {
printk(KERN_WARNING "HFC-PCI shared mem address will be corrected\n");
pcibios_write_config_word(cs->hw.hfcpci.pci_bus,
@@ -1719,6 +1720,7 @@ __initfunc(int
}
dev_hfcpci->resource[1].start = (int) cs->hw.hfcpci.pci_io;
}
+#endif
if (!cs->hw.hfcpci.pci_io) {
printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
return (0);