patch-2.2.12 linux/drivers/isdn/eicon/eicon_mod.c
Next file: linux/drivers/isdn/eicon/eicon_pci.c
Previous file: linux/drivers/isdn/eicon/eicon_isa.c
Back to the patch index
Back to the overall index
- Lines: 260
- Date:
Wed Aug 25 17:29:47 1999
- Orig file:
v2.2.11/linux/drivers/isdn/eicon/eicon_mod.c
- Orig date:
Mon Aug 9 16:05:55 1999
diff -u --recursive --new-file v2.2.11/linux/drivers/isdn/eicon/eicon_mod.c linux/drivers/isdn/eicon/eicon_mod.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.7 1999/07/11 17:16:27 armin Exp $
+/* $Id: eicon_mod.c,v 1.8 1999/07/25 15:12:08 armin Exp $
*
* ISDN lowlevel-module for Eicon.Diehl active cards.
*
@@ -26,6 +26,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_mod.c,v $
+ * Revision 1.8 1999/07/25 15:12:08 armin
+ * fix of some debug logs.
+ * enabled ISA-cards option.
+ *
* Revision 1.7 1999/07/11 17:16:27 armin
* Bugfixes in queue handling.
* Added DSP-DTMF decoder functions.
@@ -73,7 +77,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.7 $";
+static char *eicon_revision = "$Revision: 1.8 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -88,19 +92,23 @@
ulong DebugVar;
/* Parameters to be set by insmod */
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
static int membase = -1;
static int irq = -1;
+#endif
static char *id = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
MODULE_DESCRIPTION( "Driver for Eicon.Diehl active ISDN cards");
MODULE_AUTHOR( "Armin Schindler");
MODULE_SUPPORTED_DEVICE( "ISDN subsystem");
+MODULE_PARM_DESC(id, "ID-String of first card");
+MODULE_PARM(id, "s");
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
MODULE_PARM_DESC(membase, "Base address of first ISA card");
MODULE_PARM_DESC(irq, "IRQ of first card");
-MODULE_PARM_DESC(id, "ID-String of first card");
MODULE_PARM(membase, "i");
MODULE_PARM(irq, "i");
-MODULE_PARM(id, "s");
+#endif
char *eicon_ctype_name[] = {
"ISDN-S",
@@ -382,6 +390,7 @@
card->bus);
ret = -ENODEV;
}
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_IOCTL_SETMMIO:
if (card->flags & EICON_FLAGS_LOADED)
return -EBUSY;
@@ -401,6 +410,7 @@
card->bus);
ret = -ENODEV;
}
+#endif
case EICON_IOCTL_GETIRQ:
switch (card->bus) {
case EICON_BUS_ISA:
@@ -434,6 +444,7 @@
card->bus);
ret = -ENODEV;
}
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_IOCTL_LOADBOOT:
if (card->flags & EICON_FLAGS_RUNNING)
return -EBUSY;
@@ -452,6 +463,8 @@
ret = -ENODEV;
}
return ret;
+#endif
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_IOCTL_LOADISA:
if (card->flags & EICON_FLAGS_RUNNING)
return -EBUSY;
@@ -484,7 +497,7 @@
ret = -ENODEV;
}
return ret;
-
+#endif
case EICON_IOCTL_MANIF:
if (!card->flags & EICON_FLAGS_RUNNING)
return -ENODEV;
@@ -813,7 +826,9 @@
int i;
int j;
int qloop;
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
char qid[5];
+#endif
eicon_card *card;
#if CONFIG_PCI
eicon_pci_card *pcic;
@@ -854,6 +869,7 @@
card->myid = -1;
card->type = Type;
switch (Type) {
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
#if CONFIG_MCA /* only needed for MCA */
case EICON_CTYPE_S:
case EICON_CTYPE_SX:
@@ -913,6 +929,7 @@
card->nchannels = 2;
card->interface.channels = 1;
break;
+#endif
#if CONFIG_PCI
case EICON_CTYPE_MAESTRA:
(eicon_pci_card *)pcic = (eicon_pci_card *)membase;
@@ -964,6 +981,7 @@
card->interface.channels = 1;
break;
#endif
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_CTYPE_ISABRI:
if (membase == -1)
membase = EICON_ISA_MEMBASE;
@@ -992,6 +1010,7 @@
card->nchannels = 30;
card->interface.channels = 1;
break;
+#endif
default:
printk(KERN_WARNING "eicon_alloccard: Invalid type %d\n", Type);
kfree(card);
@@ -1029,6 +1048,7 @@
eicon_registercard(eicon_card * card)
{
switch (card->bus) {
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_BUS_ISA:
/* TODO something to print */
break;
@@ -1037,6 +1057,7 @@
eicon_isa_printpar(&card->hwif.isa);
break;
#endif
+#endif
case EICON_BUS_PCI:
#if CONFIG_PCI
eicon_pci_printpar(&card->hwif.pci);
@@ -1070,12 +1091,14 @@
cmd.driver = card->myid;
card->interface.statcallb(&cmd);
switch (card->bus) {
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_BUS_ISA:
#ifdef CONFIG_MCA
case EICON_BUS_MCA:
#endif
eicon_isa_release(&card->hwif.isa);
break;
+#endif
case EICON_BUS_PCI:
#if CONFIG_PCI
eicon_pci_release(&card->hwif.pci);
@@ -1107,9 +1130,11 @@
int added = 0;
int failed = 0;
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
if (!Type) /* ISA */
if ((Type = eicon_isa_find_card(membase, irq, id)) < 0)
return 0;
+#endif
eicon_alloccard(Type, membase, irq, id);
p = cards;
while (p) {
@@ -1120,12 +1145,14 @@
*/
added++;
switch (p->bus) {
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
case EICON_BUS_ISA:
case EICON_BUS_MCA:
if (eicon_registercard(p))
break;
registered = 1;
break;
+#endif
case EICON_BUS_PCI:
#if CONFIG_PCI
if (eicon_registercard(p))
@@ -1187,10 +1214,18 @@
printk("%s/", eicon_getrev(tmprev));
release += getrel(tmprev);
strcpy(tmprev, eicon_pci_revision);
+#if CONFIG_PCI
printk("%s/", eicon_getrev(tmprev));
+#else
+ printk("---/");
+#endif
release += getrel(tmprev);
strcpy(tmprev, eicon_isa_revision);
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
printk("%s/", eicon_getrev(tmprev));
+#else
+ printk("---/");
+#endif
release += getrel(tmprev);
strcpy(tmprev, eicon_idi_revision);
printk("%s\n", eicon_getrev(tmprev));
@@ -1199,6 +1234,7 @@
printk(KERN_INFO "%s Release: %s.%s\n", DRIVERNAME,
DRIVERRELEASE, tmprev);
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
#ifdef CONFIG_MCA
/* Check if we have MCA-bus */
if (!MCA_bus)
@@ -1216,14 +1252,23 @@
#else
card_count = eicon_addcard(0, membase, irq, id);
#endif /* CONFIG_MCA */
+#endif /* CONFIG_ISDN_DRV_EICON_ISA */
#if CONFIG_PCI
card_count += eicon_pci_find_card(id);
#endif
if (!cards) {
#ifdef MODULE
+#ifndef CONFIG_PCI
+#ifndef CONFIG_ISDN_DRV_EICON_ISA
+ printk(KERN_INFO "Eicon: Driver is neither ISA nor PCI compiled !\n");
+#else
printk(KERN_INFO "Eicon: No cards defined, driver not loaded !\n");
#endif
+#else
+ printk(KERN_INFO "Eicon: No PCI-cards found, driver not loaded !\n");
+#endif
+#endif
return -ENODEV;
} else
@@ -1291,7 +1336,7 @@
}
#endif /* MODULE */
-
+#ifdef CONFIG_ISDN_DRV_EICON_ISA
#ifdef CONFIG_MCA
struct eicon_mca_adapters_struct {
@@ -1457,4 +1502,5 @@
};
};
#endif /* CONFIG_MCA */
+#endif /* CONFIG_ISDN_DRV_EICON_ISA */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)