summaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/Config.in10
-rw-r--r--drivers/isdn/avmb1/capi.c14
-rw-r--r--drivers/isdn/avmb1/compat.h45
-rw-r--r--drivers/isdn/avmb1/kcapi.c26
-rw-r--r--drivers/isdn/avmb1/t1pci.c8
-rw-r--r--drivers/isdn/divert/divert_procfs.c20
-rw-r--r--drivers/isdn/eicon/eicon_isa.h6
-rw-r--r--drivers/isdn/eicon/eicon_mod.c19
-rw-r--r--drivers/isdn/hisax/hisax.h13
-rw-r--r--drivers/isdn/hisax/isurf.c34
-rw-r--r--drivers/isdn/hisax/sedlbauer.c135
-rw-r--r--drivers/isdn/hisax/teles0.c57
-rw-r--r--drivers/isdn/hisax/telespci.c27
-rw-r--r--drivers/isdn/pcbit/drv.c31
-rw-r--r--drivers/isdn/pcbit/pcbit.h8
-rw-r--r--drivers/isdn/sc/debug.h9
16 files changed, 269 insertions, 193 deletions
diff --git a/drivers/isdn/Config.in b/drivers/isdn/Config.in
index 98b11349a..2081f12fe 100644
--- a/drivers/isdn/Config.in
+++ b/drivers/isdn/Config.in
@@ -13,8 +13,8 @@ if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
bool ' Support AT-Fax Class 2 commands' CONFIG_ISDN_TTY_FAX
fi
bool ' Support isdn diversion services' CONFIG_ISDN_DIVERSION
-if [ "$CONFIG_X25" != "n" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool ' X.25 PLP on top of ISDN (EXPERIMENTAL)' CONFIG_ISDN_X25
+if [ "$CONFIG_X25" != "n" ]; then
+ bool ' X.25 PLP on top of ISDN' CONFIG_ISDN_X25
fi
dep_tristate ' ICN 2B and 4B support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN
dep_tristate ' isdnloop support' CONFIG_ISDN_DRV_LOOP $CONFIG_ISDN
@@ -52,15 +52,15 @@ if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
bool ' HiSax Support for Scitel Quadro card' CONFIG_HISAX_SCT_QUADRO
bool ' HiSax Support for Gazel cards' CONFIG_HISAX_GAZEL
bool ' HiSax Support for HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI
- if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
- bool ' HiSax Support for Winbond W6692 based cards (EXPERIMENTAL)' CONFIG_HISAX_W6692
+ bool ' HiSax Support for Winbond W6692 based cards' CONFIG_HISAX_W6692
+ if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
# bool ' HiSax Support for TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
bool ' HiSax Support for Am7930' CONFIG_HISAX_AMD7930
fi
fi
fi
-if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
+if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
dep_tristate ' Spellcaster support (EXPERIMENTAL)' CONFIG_ISDN_DRV_SC $CONFIG_ISDN
dep_tristate ' IBM Active 2000 support (EXPERIMENTAL)' CONFIG_ISDN_DRV_ACT2000 $CONFIG_ISDN
fi
diff --git a/drivers/isdn/avmb1/capi.c b/drivers/isdn/avmb1/capi.c
index 6d1159d56..c214b0b28 100644
--- a/drivers/isdn/avmb1/capi.c
+++ b/drivers/isdn/avmb1/capi.c
@@ -1,11 +1,14 @@
/*
- * $Id: capi.c,v 1.21 1999/09/10 17:24:18 calle Exp $
+ * $Id: capi.c,v 1.22 1999/11/13 21:27:16 keil Exp $
*
* CAPI 2.0 Interface for Linux
*
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: capi.c,v $
+ * Revision 1.22 1999/11/13 21:27:16 keil
+ * remove KERNELVERSION
+ *
* Revision 1.21 1999/09/10 17:24:18 calle
* Changes for proposed standard for CAPI2.0:
* - AK148 "Linux Exention"
@@ -282,20 +285,13 @@ static unsigned int
capi_poll(struct file *file, poll_table * wait)
{
unsigned int mask = 0;
-#if (LINUX_VERSION_CODE >= 0x02012d)
unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
-#else
- unsigned int minor = MINOR(file->f_inode->i_rdev);
-#endif
struct capidev *cdev;
if (!minor || minor > CAPI_MAXMINOR || !capidevs[minor].is_registered)
return POLLERR;
cdev = &capidevs[minor];
-#if (LINUX_VERSION_CODE < 0x020159) /* 2.1.89 */
-#define poll_wait(f,wq,w) poll_wait((wq),(w))
-#endif
poll_wait(file, &(cdev->recv_wait), wait);
mask = POLLOUT | POLLWRNORM;
if (!skb_queue_empty(&cdev->recv_queue))
@@ -523,9 +519,7 @@ static struct file_operations capi_fops =
capi_ioctl,
NULL, /* capi_mmap */
capi_open,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,118)
NULL, /* capi_flush */
-#endif
capi_release,
NULL, /* capi_fsync */
NULL, /* capi_fasync */
diff --git a/drivers/isdn/avmb1/compat.h b/drivers/isdn/avmb1/compat.h
deleted file mode 100644
index 15f471559..000000000
--- a/drivers/isdn/avmb1/compat.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * $Id: compat.h,v 1.4 1998/10/25 14:39:02 fritz Exp $
- *
- * Headerfile for Compartibility between different kernel versions
- *
- * (c) Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
- *
- * $Log: compat.h,v $
- * Revision 1.4 1998/10/25 14:39:02 fritz
- * Backported from MIPS (Cobalt).
- *
- * Revision 1.3 1997/11/04 06:12:15 calle
- * capi.c: new read/write in file_ops since 2.1.60
- * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware.
- * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON)
- * compat.h: added #define LinuxVersionCode
- *
- * Revision 1.2 1997/10/01 09:21:22 fritz
- * Removed old compatibility stuff for 2.0.X kernels.
- * From now on, this code is for 2.1.X ONLY!
- * Old stuff is still in the separate branch.
- *
- * Revision 1.1 1997/03/04 21:50:36 calle
- * Frirst version in isdn4linux
- *
- * Revision 2.2 1997/02/12 09:31:39 calle
- * new version
- *
- * Revision 1.1 1997/01/31 10:32:20 calle
- * Initial revision
- *
- *
- */
-#ifndef __COMPAT_H__
-#define __COMPAT_H__
-
-#include <linux/version.h>
-#include <asm/segment.h>
-#include <linux/isdnif.h>
-
-#ifndef LinuxVersionCode
-#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
-#endif
-
-#endif /* __COMPAT_H__ */
diff --git a/drivers/isdn/avmb1/kcapi.c b/drivers/isdn/avmb1/kcapi.c
index 75d3f01c2..84fb0d2f7 100644
--- a/drivers/isdn/avmb1/kcapi.c
+++ b/drivers/isdn/avmb1/kcapi.c
@@ -877,14 +877,8 @@ drivercb_attach_ctr(struct capi_driver *driver, char *name, void *driverdata)
*pp = card;
driver->ncontroller++;
sprintf(card->procfn, "capi/controllers/%d", card->cnr);
- card->procent = create_proc_entry(card->procfn, 0, 0);
- if (card->procent) {
- card->procent->read_proc =
- (int (*)(char *,char **,off_t,int,int *,void *))
- driver->ctr_read_proc;
- card->procent->data = card;
- }
-
+ card->procent = create_proc_read_entry(card->procfn, 0, 0,
+ driver->ctr_read_proc, card);
ncards++;
printk(KERN_NOTICE "kcapi: Controller %d: %s attached\n",
card->cnr, card->name);
@@ -960,17 +954,11 @@ struct capi_driver_interface *attach_capi_driver(struct capi_driver *driver)
t1isa_driver = driver;
#endif
sprintf(driver->procfn, "capi/drivers/%s", driver->name);
- driver->procent = create_proc_entry(driver->procfn, 0, 0);
- if (driver->procent) {
- if (driver->driver_read_proc) {
- driver->procent->read_proc =
- (int (*)(char *,char **,off_t,int,int *,void *))
- driver->driver_read_proc;
- } else {
- driver->procent->read_proc = driver_read_proc;
- }
- driver->procent->data = driver;
- }
+ driver->procent = create_proc_read_entry(driver->procfn, 0, 0,
+ driver->driver_read_proc
+ ? driver->driver_read_proc
+ : driver_read_proc,
+ driver);
return &di;
}
diff --git a/drivers/isdn/avmb1/t1pci.c b/drivers/isdn/avmb1/t1pci.c
index ad73e71cd..d77340bff 100644
--- a/drivers/isdn/avmb1/t1pci.c
+++ b/drivers/isdn/avmb1/t1pci.c
@@ -1,11 +1,14 @@
/*
- * $Id: t1pci.c,v 1.2 1999/11/05 16:38:02 calle Exp $
+ * $Id: t1pci.c,v 1.3 1999/11/13 21:27:16 keil Exp $
*
* Module for AVM T1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: t1pci.c,v $
+ * Revision 1.3 1999/11/13 21:27:16 keil
+ * remove KERNELVERSION
+ *
* Revision 1.2 1999/11/05 16:38:02 calle
* Cleanups before kernel 2.4:
* - Changed all messages to use card->name or driver->name instead of
@@ -30,13 +33,12 @@
#include <linux/pci.h>
#include <linux/capi.h>
#include <asm/io.h>
-#include "compat.h"
#include "capicmd.h"
#include "capiutil.h"
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.2 $";
+static char *revision = "$Revision: 1.3 $";
#undef CONFIG_T1PCI_DEBUG
#undef CONFIG_T1PCI_POLLDEBUG
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 58a47bcd8..09f148b5a 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -294,22 +294,6 @@ static struct file_operations isdn_fops =
struct inode_operations divert_file_inode_operations = {
&isdn_fops, /* default 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 */
};
@@ -329,10 +313,10 @@ int divert_dev_init(void)
init_waitqueue_head(&rd_queue);
#ifdef CONFIG_PROC_FS
- isdn_proc_entry = create_proc_entry("isdn", S_IFDIR | S_IRUGO | S_IXUGO ,proc_net);
+ isdn_proc_entry = proc_mkdir("isdn", proc_net);
if (!isdn_proc_entry)
return(-1);
- isdn_divert_entry = create_proc_entry("divert",S_IFREG | S_IRUGO,isdn_proc_entry);
+ isdn_divert_entry = create_proc_entry("divert",0,isdn_proc_entry);
if (!isdn_divert_entry)
{
remove_proc_entry("isdn",proc_net);
diff --git a/drivers/isdn/eicon/eicon_isa.h b/drivers/isdn/eicon/eicon_isa.h
index 7f86bd9ff..b0d0b0eb9 100644
--- a/drivers/isdn/eicon/eicon_isa.h
+++ b/drivers/isdn/eicon/eicon_isa.h
@@ -1,4 +1,4 @@
-/* $Id: eicon_isa.h,v 1.5 1999/09/08 20:17:31 armin Exp $
+/* $Id: eicon_isa.h,v 1.6 1999/11/15 19:37:04 keil Exp $
*
* ISDN low-level module for Eicon.Diehl active ISDN-Cards.
*
@@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_isa.h,v $
+ * Revision 1.6 1999/11/15 19:37:04 keil
+ * need config.h
+ *
* Revision 1.5 1999/09/08 20:17:31 armin
* Added microchannel patch from Erik Weber.
*
@@ -48,6 +51,7 @@
#define eicon_isa_h
#ifdef __KERNEL__
+#include <linux/config.h>
/* Factory defaults for ISA-Cards */
#define EICON_ISA_MEMBASE 0xd0000
diff --git a/drivers/isdn/eicon/eicon_mod.c b/drivers/isdn/eicon/eicon_mod.c
index 2cad8a504..8797e6aed 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.18 1999/10/11 18:13:25 armin Exp $
+/* $Id: eicon_mod.c,v 1.19 1999/11/12 13:21:44 armin Exp $
*
* ISDN lowlevel-module for Eicon.Diehl active cards.
*
@@ -31,6 +31,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: eicon_mod.c,v $
+ * Revision 1.19 1999/11/12 13:21:44 armin
+ * Bugfix of undefined reference with CONFIG_MCA
+ *
* Revision 1.18 1999/10/11 18:13:25 armin
* Added fax capabilities for Eicon Diva Server cards.
*
@@ -120,7 +123,7 @@
static eicon_card *cards = (eicon_card *) NULL; /* glob. var , contains
start of card-list */
-static char *eicon_revision = "$Revision: 1.18 $";
+static char *eicon_revision = "$Revision: 1.19 $";
extern char *eicon_pci_revision;
extern char *eicon_isa_revision;
@@ -1382,7 +1385,7 @@ eicon_init(void)
printk(KERN_INFO
"eicon: No MCA bus, ISDN-interfaces not probed.\n");
} else {
- eicon_log(card, 8,
+ eicon_log(NULL, 8,
"eicon_mca_find_card, irq=%d.\n",
irq);
if (!eicon_mca_find_card(0, membase, irq, id))
@@ -1511,7 +1514,7 @@ int eicon_mca_find_card(int type, /* type-idx of eicon-card */
{
int j, curr_slot = 0;
- eicon_log(card, 8,
+ eicon_log(NULL, 8,
"eicon_mca_find_card type: %d, membase: %#x, irq %d \n",
type, membase, irq);
/* find a no-driver-assigned eicon card */
@@ -1578,7 +1581,7 @@ int eicon_mca_probe(int slot, /* slot-nr where the card was detected */
int irq_array1[]={3,4,0,0,2,10,11,12};
adf_pos0 = mca_read_stored_pos(slot,2);
- eicon_log(card, 8,
+ eicon_log(NULL, 8,
"eicon_mca_probe irq=%d, membase=%d\n",
irq,
membase);
@@ -1636,7 +1639,7 @@ int eicon_mca_probe(int slot, /* slot-nr where the card was detected */
default:
return ENODEV;
};
- /* Uebereinstimmung vorgegebener membase & irq */
+ /* matching membase & irq */
if ( 1 == eicon_addcard(type, membase, irq, id)) {
mca_set_adapter_name(slot, eicon_mca_adapters[a_idx].name);
mca_set_adapter_procfn(slot, (MCA_ProcFn) eicon_info, cards);
@@ -1649,9 +1652,9 @@ int eicon_mca_probe(int slot, /* slot-nr where the card was detected */
/* reset card */
outb_p(0,cards_io+1);
- eicon_log(card, 8, "eicon_addcard: successful for slot # %d.\n",
+ eicon_log(NULL, 8, "eicon_addcard: successful for slot # %d.\n",
cards->mca_slot+1);
- return 0 ; /* eicon_addcard hat eine Karte zugefuegt */
+ return 0 ; /* eicon_addcard added a card */
} else {
return ENODEV;
};
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 230628486..0c67d5c4a 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -1,8 +1,11 @@
-/* $Id: hisax.h,v 2.37 1999/10/14 20:25:28 keil Exp $
+/* $Id: hisax.h,v 2.38 1999/11/14 23:37:03 keil Exp $
* Basic declarations, defines and prototypes
*
* $Log: hisax.h,v $
+ * Revision 2.38 1999/11/14 23:37:03 keil
+ * new ISA memory mapped IO
+ *
* Revision 2.37 1999/10/14 20:25:28 keil
* add a statistic for error monitoring
*
@@ -663,7 +666,8 @@ struct teles3_hw {
struct teles0_hw {
unsigned int cfg_reg;
- unsigned int membase;
+ unsigned long membase;
+ unsigned long phymem;
};
struct avm_hw {
@@ -803,8 +807,9 @@ struct hfcD_hw {
struct isurf_hw {
unsigned int reset;
- unsigned int isac;
- unsigned int isar;
+ unsigned long phymem;
+ unsigned long isac;
+ unsigned long isar;
struct isar_reg isar_r;
};
diff --git a/drivers/isdn/hisax/isurf.c b/drivers/isdn/hisax/isurf.c
index 245b40bc0..4ee5831fe 100644
--- a/drivers/isdn/hisax/isurf.c
+++ b/drivers/isdn/hisax/isurf.c
@@ -1,10 +1,13 @@
-/* $Id: isurf.c,v 1.6 1999/09/04 06:20:06 keil Exp $
+/* $Id: isurf.c,v 1.7 1999/11/14 23:37:03 keil Exp $
* isurf.c low level stuff for Siemens I-Surf/I-Talk cards
*
* Author Karsten Keil (keil@isdn4linux.de)
*
* $Log: isurf.c,v $
+ * Revision 1.7 1999/11/14 23:37:03 keil
+ * new ISA memory mapped IO
+ *
* Revision 1.6 1999/09/04 06:20:06 keil
* Changes from kernel set_current_state()
*
@@ -37,7 +40,7 @@
extern const char *CardType[];
-static const char *ISurf_revision = "$Revision: 1.6 $";
+static const char *ISurf_revision = "$Revision: 1.7 $";
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
@@ -50,7 +53,7 @@ static const char *ISurf_revision = "$Revision: 1.6 $";
#define ISURF_ISAR_OFFSET 0
#define ISURF_ISAC_OFFSET 0x100
-
+#define ISURF_IOMEM_SIZE 0x400
/* Interface functions */
static u_char
@@ -145,6 +148,8 @@ void
release_io_isurf(struct IsdnCardState *cs)
{
release_region(cs->hw.isurf.reset, 1);
+ iounmap((unsigned char *)cs->hw.isurf.isar);
+ release_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
}
static void
@@ -223,8 +228,7 @@ setup_isurf(struct IsdnCard *card))
return(0);
if (card->para[1] && card->para[2]) {
cs->hw.isurf.reset = card->para[1];
- cs->hw.isurf.isar = card->para[2] + ISURF_ISAR_OFFSET;
- cs->hw.isurf.isac = card->para[2] + ISURF_ISAC_OFFSET;
+ cs->hw.isurf.phymem = card->para[2];
cs->irq = card->para[0];
} else {
printk(KERN_WARNING "HiSax: %s port/mem not set\n",
@@ -240,11 +244,25 @@ setup_isurf(struct IsdnCard *card))
} else {
request_region(cs->hw.isurf.reset, 1, "isurf isdn");
}
-
+ if (check_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE)) {
+ printk(KERN_WARNING
+ "HiSax: %s memory region %lx-%lx already in use\n",
+ CardType[card->typ],
+ cs->hw.isurf.phymem,
+ cs->hw.isurf.phymem + ISURF_IOMEM_SIZE);
+ release_region(cs->hw.isurf.reset, 1);
+ return (0);
+ } else {
+ request_mem_region(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE,
+ "isurf iomem");
+ }
+ cs->hw.isurf.isar =
+ (unsigned long) ioremap(cs->hw.isurf.phymem, ISURF_IOMEM_SIZE);
+ cs->hw.isurf.isac = cs->hw.isurf.isar + ISURF_ISAC_OFFSET;
printk(KERN_INFO
- "ISurf: defined at 0x%x 0x%x IRQ %d\n",
+ "ISurf: defined at 0x%x 0x%lx IRQ %d\n",
cs->hw.isurf.reset,
- cs->hw.isurf.isar,
+ cs->hw.isurf.phymem,
cs->irq);
cs->cardmsg = &ISurf_card_msg;
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
index daa7953d9..b93895ea1 100644
--- a/drivers/isdn/hisax/sedlbauer.c
+++ b/drivers/isdn/hisax/sedlbauer.c
@@ -1,4 +1,4 @@
-/* $Id: sedlbauer.c,v 1.17 1999/09/04 06:20:06 keil Exp $
+/* $Id: sedlbauer.c,v 1.18 1999/11/13 21:25:03 keil Exp $
* sedlbauer.c low level stuff for Sedlbauer cards
* includes support for the Sedlbauer speed star (speed star II),
@@ -17,6 +17,9 @@
* Edgar Toernig
*
* $Log: sedlbauer.c,v $
+ * Revision 1.18 1999/11/13 21:25:03 keil
+ * Support for Speedfax+ PCI
+ *
* Revision 1.17 1999/09/04 06:20:06 keil
* Changes from kernel set_current_state()
*
@@ -79,12 +82,13 @@
* ---------------------------------------------------------------------
* Speed Card ISAC_HSCX DIP-SWITCH
* Speed Win ISAC_HSCX ISAPNP
- * Speed Fax+ ISAC_ISAR ISAPNP #HDLC works#
+ * Speed Fax+ ISAC_ISAR ISAPNP Full analog support
* Speed Star ISAC_HSCX CARDMGR
* Speed Win2 IPAC ISAPNP
* ISDN PC/104 IPAC DIP-SWITCH
* Speed Star2 IPAC CARDMGR
- * Speed PCI IPAC PNP
+ * Speed PCI IPAC PCI PNP
+ * Speed Fax+ ISAC_ISAR PCI PNP Full analog support
*
* Important:
* For the sedlbauer speed fax+ to work properly you have to download
@@ -106,15 +110,18 @@
extern const char *CardType[];
-const char *Sedlbauer_revision = "$Revision: 1.17 $";
+const char *Sedlbauer_revision = "$Revision: 1.18 $";
const char *Sedlbauer_Types[] =
{"None", "speed card/win", "speed star", "speed fax+",
- "speed win II / ISDN PC/104", "speed star II", "speed pci"};
+ "speed win II / ISDN PC/104", "speed star II", "speed pci",
+ "speed fax+ pci"};
#ifdef SEDLBAUER_PCI
#define PCI_VENDOR_SEDLBAUER 0xe159
-#define PCI_SPEEDPCI_ID 0x02
+#define PCI_SPEEDPCI_ID 0x02
+#define PCI_SUBVENDOR_SEDLBAUER 0x51
+#define PCI_SUB_ID_SPEEDFAXP 0x01
#endif
#define SEDL_SPEED_CARD_WIN 1
@@ -123,6 +130,7 @@ const char *Sedlbauer_Types[] =
#define SEDL_SPEED_WIN2_PC104 4
#define SEDL_SPEED_STAR2 5
#define SEDL_SPEED_PCI 6
+#define SEDL_SPEEDFAX_PCI 7
#define SEDL_CHIP_TEST 0
#define SEDL_CHIP_ISAC_HSCX 1
@@ -153,12 +161,19 @@ const char *Sedlbauer_Types[] =
#define SEDL_ISAR_ISA_ISAR_RESET_ON 10
#define SEDL_ISAR_ISA_ISAR_RESET_OFF 12
-#define SEDL_IPAC_ANY_ADR 0
-#define SEDL_IPAC_ANY_IPAC 2
+#define SEDL_IPAC_ANY_ADR 0
+#define SEDL_IPAC_ANY_IPAC 2
-#define SEDL_IPAC_PCI_BASE 0
-#define SEDL_IPAC_PCI_ADR 0xc0
-#define SEDL_IPAC_PCI_IPAC 0xc8
+#define SEDL_IPAC_PCI_BASE 0
+#define SEDL_IPAC_PCI_ADR 0xc0
+#define SEDL_IPAC_PCI_IPAC 0xc8
+#define SEDL_ISAR_PCI_ADR 0xc8
+#define SEDL_ISAR_PCI_ISAC 0xd0
+#define SEDL_ISAR_PCI_ISAR 0xe0
+#define SEDL_ISAR_PCI_ISAR_RESET_ON 0x01
+#define SEDL_ISAR_PCI_ISAR_RESET_OFF 0x18
+#define SEDL_ISAR_PCI_LED1 0x08
+#define SEDL_ISAR_PCI_LED2 0x10
#define SEDL_RESET 0x3 /* same as DOS driver */
@@ -235,24 +250,25 @@ WriteISACfifo(struct IsdnCardState *cs, u_char * data, int size)
static u_char
ReadISAC_IPAC(struct IsdnCardState *cs, u_char offset)
{
- return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80));}
+ return (readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80));
+}
static void
WriteISAC_IPAC(struct IsdnCardState *cs, u_char offset, u_char value)
{
- writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80, value);
+ writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, offset|0x80, value);
}
static void
ReadISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
{
- readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
+ readfifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
}
static void
WriteISACfifo_IPAC(struct IsdnCardState *cs, u_char * data, int size)
{
- writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
+ writefifo(cs->hw.sedl.adr, cs->hw.sedl.isac, 0x80, data, size);
}
static u_char
@@ -485,6 +501,17 @@ reset_sedlbauer(struct IsdnCardState *cs)
writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_MASK, 0xc0);
writereg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_PCFG, 0x12);
restore_flags(flags);
+ } else if ((cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) &&
+ (cs->hw.sedl.bus == SEDL_BUS_PCI)) {
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
+ save_flags(flags);
+ sti();
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout((20*HZ)/1000);
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout((20*HZ)/1000);
+ restore_flags(flags);
} else {
byteout(cs->hw.sedl.reset_on, SEDL_RESET); /* Reset On */
save_flags(flags);
@@ -537,6 +564,24 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0);
case CARD_TEST:
return(0);
+ case MDL_INFO_CONN:
+ if (cs->subtyp != SEDL_SPEEDFAX_PCI)
+ return(0);
+ if ((long) arg)
+ cs->hw.sedl.reset_off &= ~SEDL_ISAR_PCI_LED2;
+ else
+ cs->hw.sedl.reset_off &= ~SEDL_ISAR_PCI_LED1;
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
+ break;
+ case MDL_INFO_REL:
+ if (cs->subtyp != SEDL_SPEEDFAX_PCI)
+ return(0);
+ if ((long) arg)
+ cs->hw.sedl.reset_off |= SEDL_ISAR_PCI_LED2;
+ else
+ cs->hw.sedl.reset_off |= SEDL_ISAR_PCI_LED1;
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
+ break;
}
return(0);
}
@@ -551,6 +596,8 @@ setup_sedlbauer(struct IsdnCard *card))
int bytecnt, ver, val;
struct IsdnCardState *cs = card->cs;
char tmp[64];
+ u16 sub_vendor_id, sub_id;
+ long flags;
strcpy(tmp, Sedlbauer_revision);
printk(KERN_INFO "HiSax: Sedlbauer driver Rev. %s\n", HiSax_getrev(tmp));
@@ -598,15 +645,40 @@ setup_sedlbauer(struct IsdnCard *card))
printk(KERN_WARNING "Sedlbauer: No PCI card found\n");
return(0);
}
- cs->irq_flags |= SA_SHIRQ;
+ cs->irq_flags |= SA_SHIRQ;
cs->hw.sedl.bus = SEDL_BUS_PCI;
- cs->hw.sedl.chip = SEDL_CHIP_IPAC;
- cs->subtyp = SEDL_SPEED_PCI;
+ pci_read_config_word(dev_sedl, PCI_SUBSYSTEM_VENDOR_ID,
+ &sub_vendor_id);
+ pci_read_config_word(dev_sedl, PCI_SUBSYSTEM_ID,
+ &sub_id);
+ printk(KERN_INFO "Sedlbauer: PCI subvendor:%x subid %x\n",
+ sub_vendor_id, sub_id);
+ printk(KERN_INFO "Sedlbauer: PCI base adr %#x\n",
+ cs->hw.sedl.cfg_reg);
+ if ((sub_vendor_id == PCI_SUBVENDOR_SEDLBAUER) &&
+ (sub_id == PCI_SUB_ID_SPEEDFAXP)) {
+ cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR;
+ cs->subtyp = SEDL_SPEEDFAX_PCI;
+ cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_PCI_ISAR_RESET_ON;
+ cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_PCI_ISAR_RESET_OFF;
+ } else {
+ cs->hw.sedl.chip = SEDL_CHIP_IPAC;
+ cs->subtyp = SEDL_SPEED_PCI;
+ }
bytecnt = 256;
byteout(cs->hw.sedl.cfg_reg, 0xff);
byteout(cs->hw.sedl.cfg_reg, 0x00);
byteout(cs->hw.sedl.cfg_reg+ 2, 0xdd);
byteout(cs->hw.sedl.cfg_reg+ 5, 0x02);
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_on);
+ save_flags(flags);
+ sti();
+ current->state = TASK_INTERRUPTIBLE;
+ schedule_timeout((10*HZ)/1000);
+ byteout(cs->hw.sedl.cfg_reg +3, cs->hw.sedl.reset_off);
+ restore_flags(flags);
#else
printk(KERN_WARNING "Sedlbauer: NO_PCI_BIOS\n");
return (0);
@@ -688,7 +760,7 @@ setup_sedlbauer(struct IsdnCard *card))
cs->writeisacfifo = &WriteISACfifo_IPAC;
cs->irq_func = &sedlbauer_interrupt_ipac;
- val = readreg(cs->hw.sedl.adr,cs->hw.sedl.isac, IPAC_ID);
+ val = readreg(cs->hw.sedl.adr, cs->hw.sedl.isac, IPAC_ID);
printk(KERN_INFO "Sedlbauer: IPAC version %x\n", val);
reset_sedlbauer(cs);
} else {
@@ -698,18 +770,31 @@ setup_sedlbauer(struct IsdnCard *card))
cs->readisacfifo = &ReadISACfifo;
cs->writeisacfifo = &WriteISACfifo;
if (cs->hw.sedl.chip == SEDL_CHIP_ISAC_ISAR) {
- cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_ISAR_ISA_ADR;
- cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_ISAR_ISA_ISAC;
- cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_ISAR_ISA_ISAR;
- cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_ISAR_ISA_ISAR_RESET_ON;
- cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_ISAR_ISA_ISAR_RESET_OFF;
+ if (cs->hw.sedl.bus == SEDL_BUS_PCI) {
+ cs->hw.sedl.adr = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_PCI_ADR;
+ cs->hw.sedl.isac = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_PCI_ISAC;
+ cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_PCI_ISAR;
+ } else {
+ cs->hw.sedl.adr = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_ISA_ADR;
+ cs->hw.sedl.isac = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_ISA_ISAC;
+ cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_ISA_ISAR;
+ cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_ISA_ISAR_RESET_ON;
+ cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg +
+ SEDL_ISAR_ISA_ISAR_RESET_OFF;
+ }
cs->bcs[0].hw.isar.reg = &cs->hw.sedl.isar;
cs->bcs[1].hw.isar.reg = &cs->hw.sedl.isar;
test_and_set_bit(HW_ISAR, &cs->HW_Flags);
cs->irq_func = &sedlbauer_interrupt_isar;
cs->auxcmd = &isar_auxcmd;
ISACVersion(cs, "Sedlbauer:");
-
cs->BC_Read_Reg = &ReadISAR;
cs->BC_Write_Reg = &WriteISAR;
cs->BC_Send_Data = &isar_fill_fifo;
diff --git a/drivers/isdn/hisax/teles0.c b/drivers/isdn/hisax/teles0.c
index 866e8dac5..8e8017bbb 100644
--- a/drivers/isdn/hisax/teles0.c
+++ b/drivers/isdn/hisax/teles0.c
@@ -1,4 +1,4 @@
-/* $Id: teles0.c,v 2.9 1999/07/12 21:05:31 keil Exp $
+/* $Id: teles0.c,v 2.10 1999/11/14 23:37:03 keil Exp $
* teles0.c low level stuff for Teles Memory IO isdn cards
* based on the teles driver from Jan den Ouden
@@ -10,6 +10,9 @@
* Beat Doebeli
*
* $Log: teles0.c,v $
+ * Revision 2.10 1999/11/14 23:37:03 keil
+ * new ISA memory mapped IO
+ *
* Revision 2.9 1999/07/12 21:05:31 keil
* fix race in IRQ handling
* added watchdog for lost IRQs
@@ -58,71 +61,72 @@
extern const char *CardType[];
-const char *teles0_revision = "$Revision: 2.9 $";
+const char *teles0_revision = "$Revision: 2.10 $";
+#define TELES_IOMEM_SIZE 0x400
#define byteout(addr,val) outb(val,addr)
#define bytein(addr) inb(addr)
static inline u_char
-readisac(unsigned int adr, u_char off)
+readisac(unsigned long adr, u_char off)
{
return readb(adr + ((off & 1) ? 0x2ff : 0x100) + off);
}
static inline void
-writeisac(unsigned int adr, u_char off, u_char data)
+writeisac(unsigned long adr, u_char off, u_char data)
{
writeb(data, adr + ((off & 1) ? 0x2ff : 0x100) + off); mb();
}
static inline u_char
-readhscx(unsigned int adr, int hscx, u_char off)
+readhscx(unsigned long adr, int hscx, u_char off)
{
return readb(adr + (hscx ? 0x1c0 : 0x180) +
((off & 1) ? 0x1ff : 0) + off);
}
static inline void
-writehscx(unsigned int adr, int hscx, u_char off, u_char data)
+writehscx(unsigned long adr, int hscx, u_char off, u_char data)
{
writeb(data, adr + (hscx ? 0x1c0 : 0x180) +
((off & 1) ? 0x1ff : 0) + off); mb();
}
static inline void
-read_fifo_isac(unsigned int adr, u_char * data, int size)
+read_fifo_isac(unsigned long adr, u_char * data, int size)
{
register int i;
- register u_char *ad = (u_char *) ((long)adr + 0x100);
+ register u_char *ad = (u_char *)adr + 0x100;
for (i = 0; i < size; i++)
data[i] = readb(ad);
}
static inline void
-write_fifo_isac(unsigned int adr, u_char * data, int size)
+write_fifo_isac(unsigned long adr, u_char * data, int size)
{
register int i;
- register u_char *ad = (u_char *) ((long)adr + 0x100);
+ register u_char *ad = (u_char *)adr + 0x100;
for (i = 0; i < size; i++) {
writeb(data[i], ad); mb();
}
}
static inline void
-read_fifo_hscx(unsigned int adr, int hscx, u_char * data, int size)
+read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
{
register int i;
- register u_char *ad = (u_char *) ((long)adr + (hscx ? 0x1c0 : 0x180));
+ register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
for (i = 0; i < size; i++)
data[i] = readb(ad);
}
static inline void
-write_fifo_hscx(unsigned int adr, int hscx, u_char * data, int size)
+write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
{
int i;
- register u_char *ad = (u_char *) ((long)adr + (hscx ? 0x1c0 : 0x180));
+ register u_char *ad = (u_char *) (adr + (hscx ? 0x1c0 : 0x180));
for (i = 0; i < size; i++) {
writeb(data[i], ad); mb();
}
@@ -222,6 +226,8 @@ release_io_teles0(struct IsdnCardState *cs)
{
if (cs->hw.teles0.cfg_reg)
release_region(cs->hw.teles0.cfg_reg, 8);
+ iounmap((unsigned char *)cs->hw.teles0.membase);
+ release_mem_region(cs->hw.teles0.phymem, TELES_IOMEM_SIZE);
}
static int
@@ -262,7 +268,7 @@ reset_teles0(struct IsdnCardState *cs)
default:
return(1);
}
- cfval |= ((cs->hw.teles0.membase >> 9) & 0xF0);
+ cfval |= ((cs->hw.teles0.phymem >> 9) & 0xF0);
byteout(cs->hw.teles0.cfg_reg + 4, cfval);
HZDELAY(HZ / 10 + 1);
byteout(cs->hw.teles0.cfg_reg + 4, cfval | 1);
@@ -318,10 +324,9 @@ setup_teles0(struct IsdnCard *card))
"Teles0: membase configured DOSish, assuming 0x%lx\n",
(unsigned long) card->para[1]);
}
- cs->hw.teles0.membase = card->para[1];
cs->irq = card->para[0];
if (cs->hw.teles0.cfg_reg) {
- if (check_region((cs->hw.teles0.cfg_reg), 8)) {
+ if (check_region(cs->hw.teles0.cfg_reg, 8)) {
printk(KERN_WARNING
"HiSax: %s config port %x-%x already in use\n",
CardType[card->typ],
@@ -358,8 +363,24 @@ setup_teles0(struct IsdnCard *card))
}
/* 16.0 and 8.0 designed for IOM1 */
test_and_set_bit(HW_IOM1, &cs->HW_Flags);
+ cs->hw.teles0.phymem = card->para[1];
+ if (check_mem_region(cs->hw.teles0.phymem, TELES_IOMEM_SIZE)) {
+ printk(KERN_WARNING
+ "HiSax: %s memory region %lx-%lx already in use\n",
+ CardType[card->typ],
+ cs->hw.teles0.phymem,
+ cs->hw.teles0.phymem + TELES_IOMEM_SIZE);
+ if (cs->hw.teles0.cfg_reg)
+ release_region(cs->hw.teles0.cfg_reg, 8);
+ return (0);
+ } else {
+ request_mem_region(cs->hw.teles0.phymem, TELES_IOMEM_SIZE,
+ "teles iomem");
+ }
+ cs->hw.teles0.membase =
+ (unsigned long) ioremap(cs->hw.teles0.phymem, TELES_IOMEM_SIZE);
printk(KERN_INFO
- "HiSax: %s config irq:%d mem:0x%X cfg:0x%X\n",
+ "HiSax: %s config irq:%d mem:0x%lX cfg:0x%X\n",
CardType[cs->typ], cs->irq,
cs->hw.teles0.membase, cs->hw.teles0.cfg_reg);
if (reset_teles0(cs)) {
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c
index eee4ba322..3486b470a 100644
--- a/drivers/isdn/hisax/telespci.c
+++ b/drivers/isdn/hisax/telespci.c
@@ -1,4 +1,4 @@
-/* $Id: telespci.c,v 2.9 1999/08/11 21:01:34 keil Exp $
+/* $Id: telespci.c,v 2.10 1999/11/15 14:20:05 keil Exp $
* telespci.c low level stuff for Teles PCI isdn cards
*
@@ -7,6 +7,9 @@
*
*
* $Log: telespci.c,v $
+ * Revision 2.10 1999/11/15 14:20:05 keil
+ * 64Bit compatibility
+ *
* Revision 2.9 1999/08/11 21:01:34 keil
* new PCI codefix
*
@@ -44,7 +47,7 @@
#include <linux/pci.h>
extern const char *CardType[];
-const char *telespci_revision = "$Revision: 2.9 $";
+const char *telespci_revision = "$Revision: 2.10 $";
#define ZORAN_PO_RQ_PEN 0x02000000
#define ZORAN_PO_WR 0x00800000
@@ -66,7 +69,7 @@ const char *telespci_revision = "$Revision: 2.9 $";
} while (portdata & ZORAN_PO_RQ_PEN)
static inline u_char
-readisac(unsigned int adr, u_char off)
+readisac(unsigned long adr, u_char off)
{
register unsigned int portdata;
@@ -83,7 +86,7 @@ readisac(unsigned int adr, u_char off)
}
static inline void
-writeisac(unsigned int adr, u_char off, u_char data)
+writeisac(unsigned long adr, u_char off, u_char data)
{
register unsigned int portdata;
@@ -99,7 +102,7 @@ writeisac(unsigned int adr, u_char off, u_char data)
}
static inline u_char
-readhscx(unsigned int adr, int hscx, u_char off)
+readhscx(unsigned long adr, int hscx, u_char off)
{
register unsigned int portdata;
@@ -115,7 +118,7 @@ readhscx(unsigned int adr, int hscx, u_char off)
}
static inline void
-writehscx(unsigned int adr, int hscx, u_char off, u_char data)
+writehscx(unsigned long adr, int hscx, u_char off, u_char data)
{
register unsigned int portdata;
@@ -130,7 +133,7 @@ writehscx(unsigned int adr, int hscx, u_char off, u_char data)
}
static inline void
-read_fifo_isac(unsigned int adr, u_char * data, int size)
+read_fifo_isac(unsigned long adr, u_char * data, int size)
{
register unsigned int portdata;
register int i;
@@ -148,7 +151,7 @@ read_fifo_isac(unsigned int adr, u_char * data, int size)
}
static void
-write_fifo_isac(unsigned int adr, u_char * data, int size)
+write_fifo_isac(unsigned long adr, u_char * data, int size)
{
register unsigned int portdata;
register int i;
@@ -165,7 +168,7 @@ write_fifo_isac(unsigned int adr, u_char * data, int size)
}
static inline void
-read_fifo_hscx(unsigned int adr, int hscx, u_char * data, int size)
+read_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
{
register unsigned int portdata;
register int i;
@@ -183,7 +186,7 @@ read_fifo_hscx(unsigned int adr, int hscx, u_char * data, int size)
}
static inline void
-write_fifo_hscx(unsigned int adr, int hscx, u_char * data, int size)
+write_fifo_hscx(unsigned long adr, int hscx, u_char * data, int size)
{
unsigned int portdata;
register int i;
@@ -324,7 +327,7 @@ setup_telespci(struct IsdnCard *card))
printk(KERN_WARNING "Teles: No IRQ for PCI card found\n");
return(0);
}
- cs->hw.teles0.membase = (u_int) ioremap(dev_tel->resource[ 0].start,
+ cs->hw.teles0.membase = (u_long) ioremap(dev_tel->resource[ 0].start,
PAGE_SIZE);
printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
dev_tel->resource[ 0].start, dev_tel->irq);
@@ -348,7 +351,7 @@ setup_telespci(struct IsdnCard *card))
/* writel(0x00800000, cs->hw.teles0.membase + 0x200); */
printk(KERN_INFO
- "HiSax: %s config irq:%d mem:%x\n",
+ "HiSax: %s config irq:%d mem:%lx\n",
CardType[cs->typ], cs->irq,
cs->hw.teles0.membase);
diff --git a/drivers/isdn/pcbit/drv.c b/drivers/isdn/pcbit/drv.c
index 679aaddeb..3c21adb9f 100644
--- a/drivers/isdn/pcbit/drv.c
+++ b/drivers/isdn/pcbit/drv.c
@@ -37,6 +37,7 @@
#include <linux/isdnif.h>
#include <asm/string.h>
#include <asm/io.h>
+#include <linux/ioport.h>
#include "pcbit.h"
#include "edss1.h"
@@ -88,9 +89,21 @@ int pcbit_init_dev(int board, int mem_base, int irq)
memset(dev, 0, sizeof(struct pcbit_dev));
init_waitqueue_head(&dev->set_running_wq);
- if (mem_base >= 0xA0000 && mem_base <= 0xFFFFF )
- dev->sh_mem = (unsigned char*) mem_base;
- else
+ if (mem_base >= 0xA0000 && mem_base <= 0xFFFFF ) {
+ dev->ph_mem = mem_base;
+ if (check_mem_region(dev->ph_mem, 4096)) {
+ printk(KERN_WARNING
+ "PCBIT: memory region %lx-%lx already in use\n",
+ dev->ph_mem, dev->ph_mem + 4096);
+ kfree(dev);
+ dev_pcbit[board] = NULL;
+ return -EACCES;
+ } else {
+ request_mem_region(dev->ph_mem, 4096, "PCBIT mem");
+ }
+ dev->sh_mem = (unsigned char*)ioremap(dev->ph_mem, 4096);
+ }
+ else
{
printk("memory address invalid");
kfree(dev);
@@ -102,6 +115,8 @@ int pcbit_init_dev(int board, int mem_base, int irq)
if (!dev->b1) {
printk("pcbit_init: couldn't malloc pcbit_chan struct\n");
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
return -ENOMEM;
}
@@ -110,6 +125,8 @@ int pcbit_init_dev(int board, int mem_base, int irq)
printk("pcbit_init: couldn't malloc pcbit_chan struct\n");
kfree(dev->b1);
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
return -ENOMEM;
}
@@ -132,6 +149,8 @@ int pcbit_init_dev(int board, int mem_base, int irq)
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
dev_pcbit[board] = NULL;
return -EIO;
}
@@ -152,6 +171,8 @@ int pcbit_init_dev(int board, int mem_base, int irq)
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
dev_pcbit[board] = NULL;
return -EIO;
}
@@ -181,6 +202,8 @@ int pcbit_init_dev(int board, int mem_base, int irq)
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
dev_pcbit[board] = NULL;
return -EIO;
}
@@ -217,6 +240,8 @@ void pcbit_terminate(int board)
kfree(dev->b1);
kfree(dev->b2);
kfree(dev);
+ iounmap((unsigned char*)dev->sh_mem);
+ release_mem_region(dev->ph_mem, 4096);
}
}
#endif
diff --git a/drivers/isdn/pcbit/pcbit.h b/drivers/isdn/pcbit/pcbit.h
index d284cc70f..99aab08cc 100644
--- a/drivers/isdn/pcbit/pcbit.h
+++ b/drivers/isdn/pcbit/pcbit.h
@@ -46,6 +46,7 @@ struct pcbit_dev {
/* board */
volatile unsigned char* sh_mem; /* RDP address */
+ unsigned long ph_mem;
unsigned int irq;
unsigned int id;
unsigned int interrupt; /* set during interrupt
@@ -166,10 +167,3 @@ struct pcbit_ioctl {
#define L2_ERROR 6
#endif
-
-
-
-
-
-
-
diff --git a/drivers/isdn/sc/debug.h b/drivers/isdn/sc/debug.h
index bb5553514..f813b5c99 100644
--- a/drivers/isdn/sc/debug.h
+++ b/drivers/isdn/sc/debug.h
@@ -26,10 +26,5 @@
* +1 (416) 297-6433 Facsimile
*/
-#if LINUX_VERSION_CODE < 131072
- #error You cant use this driver on kernels older than 2.0
-#else
- #define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
- #define FREE_IRQ(a,b) free_irq(a,b)
-#endif
-
+#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
+#define FREE_IRQ(a,b) free_irq(a,b)