Commit 8ada990c authored by Linus Torvalds's avatar Linus Torvalds

Merge http://linux-isdn.bkbits.net/linux-2.5.isdn

into home.transmeta.com:/home/torvalds/v2.5/linux
parents fd3020fe bc3d07b5
...@@ -41,9 +41,10 @@ ELSA Quickstep 3000 (same settings as QS1000) ...@@ -41,9 +41,10 @@ ELSA Quickstep 3000 (same settings as QS1000)
ELSA Quickstep 3000PCI ELSA Quickstep 3000PCI
ELSA PCMCIA ELSA PCMCIA
ITK ix1-micro Rev.2 ITK ix1-micro Rev.2
Eicon.Diehl Diva 2.0 ISA and PCI (S0 and U interface, no PRO version) Eicon Diva 2.0 ISA and PCI (S0 and U interface, no PRO version)
Eicon.Diehl Diva 2.01 ISA and PCI Eicon Diva 2.01 ISA and PCI
Eicon.Diehl Diva Piccola Eicon Diva 2.02 PCI
Eicon Diva Piccola
ASUSCOM NETWORK INC. ISDNLink 128K PC adapter (order code I-IN100-ST-D) ASUSCOM NETWORK INC. ISDNLink 128K PC adapter (order code I-IN100-ST-D)
Dynalink IS64PH (OEM version of ASUSCOM NETWORK INC. ISDNLink 128K adapter) Dynalink IS64PH (OEM version of ASUSCOM NETWORK INC. ISDNLink 128K adapter)
PCBIT-DP (OEM version of ASUSCOM NETWORK INC. ISDNLink) PCBIT-DP (OEM version of ASUSCOM NETWORK INC. ISDNLink)
...@@ -52,6 +53,7 @@ Sedlbauer Speed Card (Speed Win, Teledat 100, PCI, Fax+) ...@@ -52,6 +53,7 @@ Sedlbauer Speed Card (Speed Win, Teledat 100, PCI, Fax+)
Sedlbauer Speed Star/Speed Star2 (PCMCIA) Sedlbauer Speed Star/Speed Star2 (PCMCIA)
Sedlbauer ISDN-Controller PC/104 Sedlbauer ISDN-Controller PC/104
USR Sportster internal TA (compatible Stollmann tina-pp V3) USR Sportster internal TA (compatible Stollmann tina-pp V3)
USR internal TA PCI
ith Kommunikationstechnik GmbH MIC 16 ISA card ith Kommunikationstechnik GmbH MIC 16 ISA card
Traverse Technologie NETjet PCI S0 card and NETspider U card Traverse Technologie NETjet PCI S0 card and NETspider U card
Ovislink ISDN sc100-p card (NETjet driver) Ovislink ISDN sc100-p card (NETjet driver)
...@@ -66,13 +68,14 @@ Gazel ISDN cards ...@@ -66,13 +68,14 @@ Gazel ISDN cards
HFC-PCI based cards HFC-PCI based cards
Winbond W6692 based cards Winbond W6692 based cards
HFC-S+, HFC-SP/PCMCIA cards HFC-S+, HFC-SP/PCMCIA cards
formula-n enternow
Gerdes Power ISDN
Note: PCF, PCF-Pro: up to now, only the ISDN part is supported Note: PCF, PCF-Pro: up to now, only the ISDN part is supported
PCC-8: not tested yet PCC-8: not tested yet
Eicon.Diehl Diva U interface not tested Eicon.Diehl Diva U interface not tested
If you know other passive cards with the Siemens chipset, please let me know. If you know other passive cards with the Siemens chipset, please let me know.
To use the PNP cards you need the isapnptools.
You can combine any card, if there is no conflict between the resources You can combine any card, if there is no conflict between the resources
(io, mem, irq). (io, mem, irq).
...@@ -88,8 +91,15 @@ There is also some config needed before you compile the kernel and/or ...@@ -88,8 +91,15 @@ There is also some config needed before you compile the kernel and/or
modules. It is included in the normal "make [menu]config" target at the modules. It is included in the normal "make [menu]config" target at the
kernel. Don't forget it, especially to select the right D-channel protocol. kernel. Don't forget it, especially to select the right D-channel protocol.
Please note: All PnP cards need to be configured with isapnp and will work Please note: In older versions of the HiSax driver, all PnP cards
only with the HiSax driver used as a module. needed to be configured with isapnp and worked only with the HiSax
driver used as a module.
In the current version, HiSax will automatically use the in-kernel
ISAPnP support, provided you selected it during kernel configuration
(CONFIG_ISAPNP), if you don't give the io=, irq= command line parameters.
The affected card types are: 4,7,12,14,19,27-30
a) when built as a module a) when built as a module
------------------------- -------------------------
...@@ -190,6 +200,8 @@ Card types: ...@@ -190,6 +200,8 @@ Card types:
37 HFC 2BDS0 S+, SP irq,io 37 HFC 2BDS0 S+, SP irq,io
38 NETspider U PCI card none 38 NETspider U PCI card none
39 HFC 2BDS0 SP/PCMCIA irq,io (set with cardmgr) 39 HFC 2BDS0 SP/PCMCIA irq,io (set with cardmgr)
40 hotplug interface
41 Formula-n enter:now PCI none
At the moment IRQ sharing is only possible with PCI cards. Please make sure At the moment IRQ sharing is only possible with PCI cards. Please make sure
that your IRQ is free and enabled for ISA use. that your IRQ is free and enabled for ISA use.
...@@ -215,6 +227,13 @@ Examples for module loading ...@@ -215,6 +227,13 @@ Examples for module loading
(IO 1 (BASE 0x0180)) (IO 1 (BASE 0x0180))
modprobe hisax type=4 protocol=2 irq=10 io0=0x580 io1=0x180 modprobe hisax type=4 protocol=2 irq=10 io0=0x580 io1=0x180
In the current version of HiSax, you can instead simply use
modprobe hisax type=4 protocol=2
if you configured your kernel for ISAPnP. Don't run isapnp in
this case!
6. Teles 16.3, Euro ISDN, I/O base 280 hex, IRQ 12 and 6. Teles 16.3, Euro ISDN, I/O base 280 hex, IRQ 12 and
Teles 16.0, 1TR6, IRQ 5, Memory d0000 hex Teles 16.0, 1TR6, IRQ 5, Memory d0000 hex
modprobe hisax type=3,1 protocol=2,1 io=0x280 mem=0,0xd0000 modprobe hisax type=3,1 protocol=2,1 io=0x280 mem=0,0xd0000
...@@ -295,7 +314,9 @@ type ...@@ -295,7 +314,9 @@ type
36 W6692 based PCI cards none 36 W6692 based PCI cards none
37 HFC 2BDS0 S+,SP/PCMCIA ONLY WORKS AS A MODULE ! 37 HFC 2BDS0 S+,SP/PCMCIA ONLY WORKS AS A MODULE !
38 NETspider U PCI card none 38 NETspider U PCI card none
39 HFC 2BDS0 SP/PCMCIA ONLY WORKS AS A MODULE !
40 hotplug interface ONLY WORKS AS A MODULE !
41 Formula-n enter:now PCI none
Running the driver Running the driver
------------------ ------------------
......
...@@ -141,13 +141,6 @@ static rwlock_t capiminor_list_lock = RW_LOCK_UNLOCKED; ...@@ -141,13 +141,6 @@ static rwlock_t capiminor_list_lock = RW_LOCK_UNLOCKED;
static LIST_HEAD(capiminor_list); static LIST_HEAD(capiminor_list);
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
static kmem_cache_t *capidev_cachep;
static kmem_cache_t *capincci_cachep;
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
static kmem_cache_t *capiminor_cachep;
static kmem_cache_t *capidh_cachep;
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
/* -------- datahandles --------------------------------------------- */ /* -------- datahandles --------------------------------------------- */
...@@ -155,8 +148,7 @@ static int capincci_add_ack(struct capiminor *mp, u16 datahandle) ...@@ -155,8 +148,7 @@ static int capincci_add_ack(struct capiminor *mp, u16 datahandle)
{ {
struct datahandle_queue *n, **pp; struct datahandle_queue *n, **pp;
n = (struct datahandle_queue *) n = kmalloc(sizeof(*n), GFP_ATOMIC);
kmem_cache_alloc(capidh_cachep, GFP_ATOMIC);
if (!n) { if (!n) {
printk(KERN_ERR "capi: alloc datahandle failed\n"); printk(KERN_ERR "capi: alloc datahandle failed\n");
return -1; return -1;
...@@ -177,7 +169,7 @@ static int capiminor_del_ack(struct capiminor *mp, u16 datahandle) ...@@ -177,7 +169,7 @@ static int capiminor_del_ack(struct capiminor *mp, u16 datahandle)
if ((*pp)->datahandle == datahandle) { if ((*pp)->datahandle == datahandle) {
p = *pp; p = *pp;
*pp = (*pp)->next; *pp = (*pp)->next;
kmem_cache_free(capidh_cachep, p); kfree(p);
mp->nack--; mp->nack--;
return 0; return 0;
} }
...@@ -193,7 +185,7 @@ static void capiminor_del_all_ack(struct capiminor *mp) ...@@ -193,7 +185,7 @@ static void capiminor_del_all_ack(struct capiminor *mp)
while (*pp) { while (*pp) {
p = *pp; p = *pp;
*pp = (*pp)->next; *pp = (*pp)->next;
kmem_cache_free(capidh_cachep, p); kfree(p);
mp->nack--; mp->nack--;
} }
} }
...@@ -209,7 +201,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) ...@@ -209,7 +201,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)
unsigned long flags; unsigned long flags;
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
mp = kmem_cache_alloc(capiminor_cachep, GFP_ATOMIC); mp = kmalloc(sizeof(*mp), GFP_ATOMIC);
if (!mp) { if (!mp) {
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
printk(KERN_ERR "capi: can't alloc capiminor\n"); printk(KERN_ERR "capi: can't alloc capiminor\n");
...@@ -258,7 +250,7 @@ static void capiminor_free(struct capiminor *mp) ...@@ -258,7 +250,7 @@ static void capiminor_free(struct capiminor *mp)
skb_queue_purge(&mp->inqueue); skb_queue_purge(&mp->inqueue);
skb_queue_purge(&mp->outqueue); skb_queue_purge(&mp->outqueue);
capiminor_del_all_ack(mp); capiminor_del_all_ack(mp);
kmem_cache_free(capiminor_cachep, mp); kfree(mp);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
#ifdef _DEBUG_REFCOUNT #ifdef _DEBUG_REFCOUNT
printk(KERN_DEBUG "capiminor_free %d\n", GET_USE_COUNT(THIS_MODULE)); printk(KERN_DEBUG "capiminor_free %d\n", GET_USE_COUNT(THIS_MODULE));
...@@ -294,7 +286,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) ...@@ -294,7 +286,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci)
kdev_t kdev; kdev_t kdev;
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
np = (struct capincci *)kmem_cache_alloc(capincci_cachep, GFP_ATOMIC); np = kmalloc(sizeof(*np), GFP_ATOMIC);
if (!np) if (!np)
return 0; return 0;
memset(np, 0, sizeof(struct capincci)); memset(np, 0, sizeof(struct capincci));
...@@ -350,7 +342,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci) ...@@ -350,7 +342,7 @@ static void capincci_free(struct capidev *cdev, u32 ncci)
} }
} }
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
kmem_cache_free(capincci_cachep, np); kfree(np);
if (*pp == 0) return; if (*pp == 0) return;
} else { } else {
pp = &(*pp)->next; pp = &(*pp)->next;
...@@ -376,7 +368,7 @@ static struct capidev *capidev_alloc(void) ...@@ -376,7 +368,7 @@ static struct capidev *capidev_alloc(void)
struct capidev *cdev; struct capidev *cdev;
unsigned long flags; unsigned long flags;
cdev = kmem_cache_alloc(capidev_cachep, GFP_KERNEL); cdev = kmalloc(sizeof(*cdev), GFP_KERNEL);
if (!cdev) if (!cdev)
return 0; return 0;
memset(cdev, 0, sizeof(struct capidev)); memset(cdev, 0, sizeof(struct capidev));
...@@ -402,7 +394,7 @@ static void capidev_free(struct capidev *cdev) ...@@ -402,7 +394,7 @@ static void capidev_free(struct capidev *cdev)
write_lock_irqsave(&capidev_list_lock, flags); write_lock_irqsave(&capidev_list_lock, flags);
list_del(&cdev->list); list_del(&cdev->list);
write_unlock_irqrestore(&capidev_list_lock, flags); write_unlock_irqrestore(&capidev_list_lock, flags);
kmem_cache_free(capidev_cachep, cdev); kfree(cdev);
} }
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
...@@ -1476,72 +1468,6 @@ static void __exit proc_exit(void) ...@@ -1476,72 +1468,6 @@ static void __exit proc_exit(void)
/* -------- init function and module interface ---------------------- */ /* -------- init function and module interface ---------------------- */
static void alloc_exit(void)
{
if (capidev_cachep) {
(void)kmem_cache_destroy(capidev_cachep);
capidev_cachep = 0;
}
if (capincci_cachep) {
(void)kmem_cache_destroy(capincci_cachep);
capincci_cachep = 0;
}
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
if (capidh_cachep) {
(void)kmem_cache_destroy(capidh_cachep);
capidh_cachep = 0;
}
if (capiminor_cachep) {
(void)kmem_cache_destroy(capiminor_cachep);
capiminor_cachep = 0;
}
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
}
static int __init alloc_init(void)
{
capidev_cachep = kmem_cache_create("capi20_dev",
sizeof(struct capidev),
0,
SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (!capidev_cachep) {
alloc_exit();
return -ENOMEM;
}
capincci_cachep = kmem_cache_create("capi20_ncci",
sizeof(struct capincci),
0,
SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (!capincci_cachep) {
alloc_exit();
return -ENOMEM;
}
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
capidh_cachep = kmem_cache_create("capi20_dh",
sizeof(struct datahandle_queue),
0,
SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (!capidh_cachep) {
alloc_exit();
return -ENOMEM;
}
capiminor_cachep = kmem_cache_create("capi20_minor",
sizeof(struct capiminor),
0,
SLAB_HWCACHE_ALIGN,
NULL, NULL);
if (!capiminor_cachep) {
alloc_exit();
return -ENOMEM;
}
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
return 0;
}
static char rev[32]; static char rev[32];
static int __init capi_init(void) static int __init capi_init(void)
...@@ -1578,19 +1504,7 @@ static int __init capi_init(void) ...@@ -1578,19 +1504,7 @@ static int __init capi_init(void)
} }
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
if (alloc_init() < 0) { proc_init();
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
capinc_tty_exit();
#endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
devfs_unregister_chrdev(capi_major, "capi20");
devfs_unregister(devfs_find_handle(NULL, "capi20",
capi_major, 0,
DEVFS_SPECIAL_CHR, 0));
MOD_DEC_USE_COUNT;
return -ENOMEM;
}
(void)proc_init();
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE)
...@@ -1610,8 +1524,7 @@ static int __init capi_init(void) ...@@ -1610,8 +1524,7 @@ static int __init capi_init(void)
static void __exit capi_exit(void) static void __exit capi_exit(void)
{ {
alloc_exit(); proc_exit();
(void)proc_exit();
devfs_unregister_chrdev(capi_major, "capi20"); devfs_unregister_chrdev(capi_major, "capi20");
devfs_unregister(devfs_find_handle(NULL, "isdn/capi20", capi_major, 0, DEVFS_SPECIAL_CHR, 0)); devfs_unregister(devfs_find_handle(NULL, "isdn/capi20", capi_major, 0, DEVFS_SPECIAL_CHR, 0));
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "kcapi.h" #include "kcapi.h"
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <linux/init.h>
static char * static char *
cardstate2str(unsigned short cardstate) cardstate2str(unsigned short cardstate)
......
...@@ -43,6 +43,7 @@ if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then ...@@ -43,6 +43,7 @@ if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
bool ' HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX bool ' HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
# bool ' TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU # bool ' TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
bool ' Formula-n enter:now PCI card' CONFIG_HISAX_ENTERNOW_PCI
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
bool ' Am7930' CONFIG_HISAX_AMD7930 bool ' Am7930' CONFIG_HISAX_AMD7930
fi fi
......
...@@ -6,7 +6,7 @@ EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS) ...@@ -6,7 +6,7 @@ EXTRA_CFLAGS += -DHISAX_MAX_CARDS=$(CONFIG_HISAX_MAX_CARDS)
# Objects that export symbols. # Objects that export symbols.
export-objs := config.o fsm.o hisax_isac.o hisax_hscx.o export-objs := config.o hisax_isac.o hisax_hscx.o
# Each configuration option enables a list of files. # Each configuration option enables a list of files.
...@@ -39,7 +39,7 @@ hisax-objs-$(CONFIG_HISAX_AVM_A1_PCMCIA) += avm_a1p.o isac.o arcofi.o hscx.o ...@@ -39,7 +39,7 @@ hisax-objs-$(CONFIG_HISAX_AVM_A1_PCMCIA) += avm_a1p.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_FRITZPCI) += avm_pci.o isac.o arcofi.o hisax-objs-$(CONFIG_HISAX_FRITZPCI) += avm_pci.o isac.o arcofi.o
hisax-objs-$(CONFIG_HISAX_ELSA) += elsa.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_ELSA) += elsa.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_IX1MICROR2) += ix1_micro.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_IX1MICROR2) += ix1_micro.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_DIEHLDIVA) += diva.o isac.o arcofi.o hscx.o ipacx.o
hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_ASUSCOM) += asuscom.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o hisax-objs-$(CONFIG_HISAX_TELEINT) += teleint.o isac.o arcofi.o hfc_2bs0.o
hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o isar.o hisax-objs-$(CONFIG_HISAX_SEDLBAUER) += sedlbauer.o isac.o arcofi.o hscx.o isar.o
...@@ -57,6 +57,7 @@ hisax-objs-$(CONFIG_HISAX_BKM_A4T) += bkm_a4t.o isac.o arcofi.o jade.o ...@@ -57,6 +57,7 @@ hisax-objs-$(CONFIG_HISAX_BKM_A4T) += bkm_a4t.o isac.o arcofi.o jade.o
hisax-objs-$(CONFIG_HISAX_SCT_QUADRO) += bkm_a8.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_SCT_QUADRO) += bkm_a8.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_GAZEL) += gazel.o isac.o arcofi.o hscx.o hisax-objs-$(CONFIG_HISAX_GAZEL) += gazel.o isac.o arcofi.o hscx.o
hisax-objs-$(CONFIG_HISAX_W6692) += w6692.o hisax-objs-$(CONFIG_HISAX_W6692) += w6692.o
hisax-objs-$(CONFIG_HISAX_ENTERNOW_PCI) += enternow_pci.o amd7930_fn.o
#hisax-objs-$(CONFIG_HISAX_TESTEMU) += testemu.o #hisax-objs-$(CONFIG_HISAX_TESTEMU) += testemu.o
hisax-objs += $(hisax-objs-y) hisax-objs += $(hisax-objs-y)
......
This diff is collapsed.
/* 2001/10/02
*
* gerdes_amd7930.h Header-file included by
* gerdes_amd7930.c
*
* Author Christoph Ersfeld <info@formula-n.de>
* Formula-n Europe AG (www.formula-n.com)
* previously Gerdes AG
*
*
* This file is (c) under GNU PUBLIC LICENSE
*/
#define BYTE unsigned char
#define WORD unsigned int
#define rByteAMD(cs, reg) cs->readisac(cs, reg)
#define wByteAMD(cs, reg, val) cs->writeisac(cs, reg, val)
#define rWordAMD(cs, reg) ReadWordAmd7930(cs, reg)
#define wWordAMD(cs, reg, val) WriteWordAmd7930(cs, reg, val)
#define HIBYTE(w) ((unsigned char)((w & 0xff00) / 256))
#define LOBYTE(w) ((unsigned char)(w & 0x00ff))
#define AmdIrqOff(cs) cs->dc.amd7930.setIrqMask(cs, 0)
#define AmdIrqOn(cs) cs->dc.amd7930.setIrqMask(cs, 1)
#define AMD_CR 0x00
#define AMD_DR 0x01
#define DBUSY_TIMER_VALUE 80
static WORD initAMD[] = {
0x0100,
0x00A5, 3, 0x01, 0x40, 0x58, // LPR, LMR1, LMR2
0x0086, 1, 0x0B, // DMR1 (D-Buffer TH-Interrupts on)
0x0087, 1, 0xFF, // DMR2
0x0092, 1, 0x03, // EFCR (extended mode d-channel-fifo on)
0x0090, 4, 0xFE, 0xFF, 0x02, 0x0F, // FRAR4, SRAR4, DMR3, DMR4 (address recognition )
0x0084, 2, 0x80, 0x00, // DRLR
0x00C0, 1, 0x47, // PPCR1
0x00C8, 1, 0x01, // PPCR2
0x0102,
0x0107,
0x01A1, 1,
0x0121, 1,
0x0189, 2,
0x0045, 4, 0x61, 0x72, 0x00, 0x00, // MCR1, MCR2, MCR3, MCR4
0x0063, 2, 0x08, 0x08, // GX
0x0064, 2, 0x08, 0x08, // GR
0x0065, 2, 0x99, 0x00, // GER
0x0066, 2, 0x7C, 0x8B, // STG
0x0067, 2, 0x00, 0x00, // FTGR1, FTGR2
0x0068, 2, 0x20, 0x20, // ATGR1, ATGR2
0x0069, 1, 0x4F, // MMR1
0x006A, 1, 0x00, // MMR2
0x006C, 1, 0x40, // MMR3
0x0021, 1, 0x02, // INIT
0x00A3, 1, 0x40, // LMR1
0xFFFF};
extern void Amd7930_interrupt(struct IsdnCardState *cs, unsigned char irflags);
extern void Amd7930_init(struct IsdnCardState *cs);
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#define __NO_VERSION__ #define __NO_VERSION__
#include <linux/init.h> #include <linux/init.h>
#include <linux/isapnp.h>
#include "hisax.h" #include "hisax.h"
#include "isac.h" #include "isac.h"
#include "ipac.h" #include "ipac.h"
...@@ -309,6 +310,27 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -309,6 +310,27 @@ Asus_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
#ifdef __ISAPNP__
static struct isapnp_device_id asus_ids[] __initdata = {
{ ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1688),
(unsigned long) "Asus1688 PnP" },
{ ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690),
ISAPNP_VENDOR('A', 'S', 'U'), ISAPNP_FUNCTION(0x1690),
(unsigned long) "Asus1690 PnP" },
{ ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020),
ISAPNP_VENDOR('S', 'I', 'E'), ISAPNP_FUNCTION(0x0020),
(unsigned long) "Isurf2 PnP" },
{ ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000),
ISAPNP_VENDOR('E', 'L', 'F'), ISAPNP_FUNCTION(0x0000),
(unsigned long) "Iscas TE320" },
{ 0, }
};
static struct isapnp_device_id *adev = &asus_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __init int __init
setup_asuscom(struct IsdnCard *card) setup_asuscom(struct IsdnCard *card)
{ {
...@@ -321,7 +343,45 @@ setup_asuscom(struct IsdnCard *card) ...@@ -321,7 +343,45 @@ setup_asuscom(struct IsdnCard *card)
printk(KERN_INFO "HiSax: Asuscom ISDNLink driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Asuscom ISDNLink driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_ASUSCOM) if (cs->typ != ISDN_CTYPE_ASUSCOM)
return (0); return (0);
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(adev->card_vendor) {
if ((pb = isapnp_find_card(adev->card_vendor,
adev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
adev->vendor, adev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)adev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] = pd->resource[0].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "AsusPnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
break;
} else {
printk(KERN_ERR "AsusPnP: PnP error card found, no device\n");
}
}
adev++;
pnp_c=NULL;
}
if (!adev->card_vendor) {
printk(KERN_INFO "AsusPnP: no ISAPnP card found\n");
return(0);
}
}
#endif
bytecnt = 8; bytecnt = 8;
cs->hw.asus.cfg_reg = card->para[1]; cs->hw.asus.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "isac.h" #include "isac.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/isapnp.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
extern const char *CardType[]; extern const char *CardType[];
...@@ -763,6 +764,10 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -763,6 +764,10 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
} }
static struct pci_dev *dev_avm __initdata = NULL; static struct pci_dev *dev_avm __initdata = NULL;
#ifdef __ISAPNP__
static struct pci_bus *bus_avm __initdata = NULL;
static struct pci_dev *pnp_avm __initdata = NULL;
#endif
int __init int __init
setup_avm_pcipnp(struct IsdnCard *card) setup_avm_pcipnp(struct IsdnCard *card)
...@@ -776,10 +781,47 @@ setup_avm_pcipnp(struct IsdnCard *card) ...@@ -776,10 +781,47 @@ setup_avm_pcipnp(struct IsdnCard *card)
if (cs->typ != ISDN_CTYPE_FRITZPCI) if (cs->typ != ISDN_CTYPE_FRITZPCI)
return (0); return (0);
if (card->para[1]) { if (card->para[1]) {
/* old manual method */
cs->hw.avm.cfg_reg = card->para[1]; cs->hw.avm.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
cs->subtyp = AVM_FRITZ_PNP; cs->subtyp = AVM_FRITZ_PNP;
} else { } else {
#ifdef __ISAPNP__
if (isapnp_present()) {
struct pci_bus *ba;
if ((ba = isapnp_find_card(
ISAPNP_VENDOR('A', 'V', 'M'),
ISAPNP_FUNCTION(0x0900), bus_avm))) {
bus_avm = ba;
pnp_avm = NULL;
if ((pnp_avm = isapnp_find_dev(bus_avm,
ISAPNP_VENDOR('A', 'V', 'M'),
ISAPNP_FUNCTION(0x0900), pnp_avm))) {
pnp_avm->prepare(pnp_avm);
pnp_avm->deactivate(pnp_avm);
pnp_avm->activate(pnp_avm);
cs->hw.avm.cfg_reg =
pnp_avm->resource[0].start;
cs->irq =
pnp_avm->irq_resource[0].start;
if (!cs->irq) {
printk(KERN_ERR "FritzPnP:No IRQ\n");
pnp_avm->deactivate(pnp_avm);
return(0);
}
if (!cs->hw.avm.cfg_reg) {
printk(KERN_ERR "FritzPnP:No IO address\n");
pnp_avm->deactivate(pnp_avm);
return(0);
}
cs->subtyp = AVM_FRITZ_PNP;
goto ready;
}
}
} else {
printk(KERN_INFO "FritzPnP: no ISA PnP present\n");
}
#endif
#if CONFIG_PCI #if CONFIG_PCI
if (!pci_present()) { if (!pci_present()) {
printk(KERN_ERR "FritzPCI: no PCI bus present\n"); printk(KERN_ERR "FritzPCI: no PCI bus present\n");
...@@ -810,6 +852,7 @@ setup_avm_pcipnp(struct IsdnCard *card) ...@@ -810,6 +852,7 @@ setup_avm_pcipnp(struct IsdnCard *card)
return (0); return (0);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
} }
ready:
cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10; cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10;
if (check_region((cs->hw.avm.cfg_reg), 32)) { if (check_region((cs->hw.avm.cfg_reg), 32)) {
printk(KERN_WARNING printk(KERN_WARNING
......
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
* 37 HFC 2BDS0 S+/SP p0=irq p1=iobase * 37 HFC 2BDS0 S+/SP p0=irq p1=iobase
* 38 Travers Technologies NETspider-U PCI card * 38 Travers Technologies NETspider-U PCI card
* 39 HFC 2BDS0-SP PCMCIA p0=irq p1=iobase * 39 HFC 2BDS0-SP PCMCIA p0=irq p1=iobase
* 40 hotplug interface
* 41 Formula-n enter:now ISDN PCI a/b none
* *
* protocol can be either ISDN_PTYPE_EURO or ISDN_PTYPE_1TR6 or ISDN_PTYPE_NI1 * protocol can be either ISDN_PTYPE_EURO or ISDN_PTYPE_1TR6 or ISDN_PTYPE_NI1
* *
...@@ -93,6 +95,7 @@ const char *CardType[] = { ...@@ -93,6 +95,7 @@ const char *CardType[] = {
"Siemens I-Surf", "Acer P10", "HST Saphir", "Telekom A4T", "Siemens I-Surf", "Acer P10", "HST Saphir", "Telekom A4T",
"Scitel Quadro", "Gazel", "HFC 2BDS0 PCI", "Winbond 6692", "Scitel Quadro", "Gazel", "HFC 2BDS0 PCI", "Winbond 6692",
"HFC 2BDS0 SX", "NETspider-U", "HFC-2BDS0-SP PCMCIA", "HFC 2BDS0 SX", "NETspider-U", "HFC-2BDS0-SP PCMCIA",
"Hotplug", "Formula-n enter:now PCI a/b",
}; };
void HiSax_closecard(int cardnr); void HiSax_closecard(int cardnr);
...@@ -601,6 +604,10 @@ extern int setup_w6692(struct IsdnCard *card); ...@@ -601,6 +604,10 @@ extern int setup_w6692(struct IsdnCard *card);
extern int setup_netjet_u(struct IsdnCard *card); extern int setup_netjet_u(struct IsdnCard *card);
#endif #endif
#if CARD_FN_ENTERNOW_PCI
extern int setup_enternow_pci(struct IsdnCard *card);
#endif
/* /*
* Find card with given driverId * Find card with given driverId
*/ */
...@@ -1137,6 +1144,11 @@ static int __devinit checkcard(int cardnr, char *id, int *busy_flag) ...@@ -1137,6 +1144,11 @@ static int __devinit checkcard(int cardnr, char *id, int *busy_flag)
case ISDN_CTYPE_NETJET_U: case ISDN_CTYPE_NETJET_U:
ret = setup_netjet_u(card); ret = setup_netjet_u(card);
break; break;
#endif
#if CARD_FN_ENTERNOW_PCI
case ISDN_CTYPE_ENTERNOW:
ret = setup_enternow_pci(card);
break;
#endif #endif
case ISDN_CTYPE_DYNAMIC: case ISDN_CTYPE_DYNAMIC:
ret = 2; ret = 2;
...@@ -2094,6 +2106,7 @@ static struct pci_device_id hisax_pci_tbl[] __initdata = { ...@@ -2094,6 +2106,7 @@ static struct pci_device_id hisax_pci_tbl[] __initdata = {
{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20, PCI_ANY_ID, PCI_ANY_ID}, {PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20, PCI_ANY_ID, PCI_ANY_ID},
{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20_U, PCI_ANY_ID, PCI_ANY_ID}, {PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA20_U, PCI_ANY_ID, PCI_ANY_ID},
{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA201, PCI_ANY_ID, PCI_ANY_ID}, {PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA201, PCI_ANY_ID, PCI_ANY_ID},
{PCI_VENDOR_ID_EICON, PCI_DEVICE_ID_EICON_DIVA202, PCI_ANY_ID, PCI_ANY_ID},
#endif #endif
#ifdef CONFIG_HISAX_ELSA #ifdef CONFIG_HISAX_ELSA
{PCI_VENDOR_ID_ELSA, PCI_DEVICE_ID_ELSA_MICROLINK, PCI_ANY_ID, PCI_ANY_ID}, {PCI_VENDOR_ID_ELSA, PCI_DEVICE_ID_ELSA_MICROLINK, PCI_ANY_ID, PCI_ANY_ID},
...@@ -2152,3 +2165,11 @@ MODULE_DEVICE_TABLE(pci, hisax_pci_tbl); ...@@ -2152,3 +2165,11 @@ MODULE_DEVICE_TABLE(pci, hisax_pci_tbl);
module_init(HiSax_init); module_init(HiSax_init);
module_exit(HiSax_exit); module_exit(HiSax_exit);
EXPORT_SYMBOL(FsmNew);
EXPORT_SYMBOL(FsmFree);
EXPORT_SYMBOL(FsmEvent);
EXPORT_SYMBOL(FsmChangeState);
EXPORT_SYMBOL(FsmInitTimer);
EXPORT_SYMBOL(FsmDelTimer);
EXPORT_SYMBOL(FsmRestartTimer);
This diff is collapsed.
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "hscx.h" #include "hscx.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/isapnp.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_reg.h> #include <linux/serial_reg.h>
...@@ -860,6 +861,21 @@ probe_elsa(struct IsdnCardState *cs) ...@@ -860,6 +861,21 @@ probe_elsa(struct IsdnCardState *cs)
static struct pci_dev *dev_qs1000 __devinitdata = NULL; static struct pci_dev *dev_qs1000 __devinitdata = NULL;
static struct pci_dev *dev_qs3000 __devinitdata = NULL; static struct pci_dev *dev_qs3000 __devinitdata = NULL;
#ifdef __ISAPNP__
static struct isapnp_device_id elsa_ids[] __initdata = {
{ ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133),
ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0133),
(unsigned long) "Elsa QS1000" },
{ ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0134),
ISAPNP_VENDOR('E', 'L', 'S'), ISAPNP_FUNCTION(0x0134),
(unsigned long) "Elsa QS3000" },
{ 0, }
};
static struct isapnp_device_id *pdev = &elsa_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __devinit int __devinit
setup_elsa(struct IsdnCard *card) setup_elsa(struct IsdnCard *card)
{ {
...@@ -874,6 +890,7 @@ setup_elsa(struct IsdnCard *card) ...@@ -874,6 +890,7 @@ setup_elsa(struct IsdnCard *card)
cs->hw.elsa.ctrl_reg = 0; cs->hw.elsa.ctrl_reg = 0;
cs->hw.elsa.status = 0; cs->hw.elsa.status = 0;
cs->hw.elsa.MFlag = 0; cs->hw.elsa.MFlag = 0;
cs->subtyp = 0;
if (cs->typ == ISDN_CTYPE_ELSA) { if (cs->typ == ISDN_CTYPE_ELSA) {
cs->hw.elsa.base = card->para[0]; cs->hw.elsa.base = card->para[0];
printk(KERN_INFO "Elsa: Microlink IO probing\n"); printk(KERN_INFO "Elsa: Microlink IO probing\n");
...@@ -935,9 +952,60 @@ setup_elsa(struct IsdnCard *card) ...@@ -935,9 +952,60 @@ setup_elsa(struct IsdnCard *card)
return (0); return (0);
} }
} else if (cs->typ == ISDN_CTYPE_ELSA_PNP) { } else if (cs->typ == ISDN_CTYPE_ELSA_PNP) {
cs->hw.elsa.base = card->para[1]; #ifdef __ISAPNP__
cs->irq = card->para[0]; if (!card->para[1] && isapnp_present()) {
cs->subtyp = ELSA_QS1000; struct pci_bus *pb;
struct pci_dev *pd;
while(pdev->card_vendor) {
if ((pb = isapnp_find_card(pdev->card_vendor,
pdev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
pdev->vendor, pdev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)pdev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] =
pd->resource[0].start;
card->para[0] =
pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "Elsa PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
if (pdev->function == ISAPNP_FUNCTION(0x133))
cs->subtyp = ELSA_QS1000;
else
cs->subtyp = ELSA_QS3000;
break;
} else {
printk(KERN_ERR "Elsa PnP: PnP error card found, no device\n");
return(0);
}
}
pdev++;
pnp_c=NULL;
}
if (!pdev->card_vendor) {
printk(KERN_INFO "Elsa PnP: no ISAPnP card found\n");
return(0);
}
}
#endif
if (card->para[1] && card->para[0]) {
cs->hw.elsa.base = card->para[1];
cs->irq = card->para[0];
if (!cs->subtyp)
cs->subtyp = ELSA_QS1000;
} else {
printk(KERN_ERR "Elsa PnP: no parameter\n");
}
cs->hw.elsa.cfg = cs->hw.elsa.base + ELSA_CONFIG; cs->hw.elsa.cfg = cs->hw.elsa.base + ELSA_CONFIG;
cs->hw.elsa.ale = cs->hw.elsa.base + ELSA_ALE; cs->hw.elsa.ale = cs->hw.elsa.base + ELSA_ALE;
cs->hw.elsa.isac = cs->hw.elsa.base + ELSA_ISAC; cs->hw.elsa.isac = cs->hw.elsa.base + ELSA_ISAC;
...@@ -1048,6 +1116,7 @@ setup_elsa(struct IsdnCard *card) ...@@ -1048,6 +1116,7 @@ setup_elsa(struct IsdnCard *card)
break; break;
case ELSA_PCFPRO: case ELSA_PCFPRO:
case ELSA_PCF: case ELSA_PCF:
case ELSA_QS3000:
case ELSA_QS3000PCI: case ELSA_QS3000PCI:
bytecnt = 16; bytecnt = 16;
break; break;
...@@ -1073,7 +1142,7 @@ setup_elsa(struct IsdnCard *card) ...@@ -1073,7 +1142,7 @@ setup_elsa(struct IsdnCard *card)
} }
if ((cs->subtyp == ELSA_QS1000PCI) || (cs->subtyp == ELSA_QS3000PCI)) { if ((cs->subtyp == ELSA_QS1000PCI) || (cs->subtyp == ELSA_QS3000PCI)) {
if (!pci_request_region(cs->hw.elsa.cfg, 0x80, "elsa isdn pci")) { if (!request_region(cs->hw.elsa.cfg, 0x80, "elsa isdn pci")) {
printk(KERN_WARNING printk(KERN_WARNING
"HiSax: %s pci port %x-%x already in use\n", "HiSax: %s pci port %x-%x already in use\n",
CardType[card->typ], CardType[card->typ],
......
/* 2001/10/02
*
* enternow.h Header-file included by
* enternow_pci.c
*
* Author Christoph Ersfeld <info@formula-n.de>
* Formula-n Europe AG (www.formula-n.com)
* previously Gerdes AG
*
*
* This file is (c) under GNU PUBLIC LICENSE
*/
/* ***************************************************************************************** *
* ****************************** datatypes and macros ************************************* *
* ***************************************************************************************** */
#define BYTE unsigned char
#define WORD unsigned int
#define HIBYTE(w) ((unsigned char)((w & 0xff00) / 256))
#define LOBYTE(w) ((unsigned char)(w & 0x00ff))
#define InByte(addr) inb(addr)
#define OutByte(addr,val) outb(val,addr)
/* ***************************************************************************************** *
* *********************************** card-specific *************************************** *
* ***************************************************************************************** */
/* fr PowerISDN PCI */
#define TJ_AMD_IRQ 0x20
#define TJ_LED1 0x40
#define TJ_LED2 0x80
/* Das Fenster zum AMD...
* Ab Adresse hw.njet.base + TJ_AMD_PORT werden vom AMD jeweils 8 Bit in
* den TigerJet i/o-Raum gemappt
* -> 0x01 des AMD bei hw.njet.base + 0C4 */
#define TJ_AMD_PORT 0xC0
/* ***************************************************************************************** *
* *************************************** Prototypen ************************************** *
* ***************************************************************************************** */
BYTE ReadByteAmd7930(struct IsdnCardState *cs, BYTE offset);
void WriteByteAmd7930(struct IsdnCardState *cs, BYTE offset, BYTE value);
This diff is collapsed.
...@@ -21,14 +21,6 @@ ...@@ -21,14 +21,6 @@
#define FSM_TIMER_DEBUG 0 #define FSM_TIMER_DEBUG 0
EXPORT_SYMBOL(FsmNew);
EXPORT_SYMBOL(FsmFree);
EXPORT_SYMBOL(FsmEvent);
EXPORT_SYMBOL(FsmChangeState);
EXPORT_SYMBOL(FsmInitTimer);
EXPORT_SYMBOL(FsmDelTimer);
EXPORT_SYMBOL(FsmRestartTimer);
int __init int __init
FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount)
{ {
......
...@@ -76,6 +76,8 @@ release_io_hfcpci(struct IsdnCardState *cs) ...@@ -76,6 +76,8 @@ release_io_hfcpci(struct IsdnCardState *cs)
{ {
unsigned long flags; unsigned long flags;
printk(KERN_INFO "HiSax: release hfcpci at %p\n",
cs->hw.hfcpci.pci_io);
save_flags(flags); save_flags(flags);
cli(); cli();
cs->hw.hfcpci.int_m2 = 0; /* interrupt output off ! */ cs->hw.hfcpci.int_m2 = 0; /* interrupt output off ! */
...@@ -86,9 +88,7 @@ release_io_hfcpci(struct IsdnCardState *cs) ...@@ -86,9 +88,7 @@ release_io_hfcpci(struct IsdnCardState *cs)
set_current_state(TASK_UNINTERRUPTIBLE); set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout((30 * HZ) / 1000); /* Timeout 30ms */ schedule_timeout((30 * HZ) / 1000); /* Timeout 30ms */
Write_hfc(cs, HFCPCI_CIRM, 0); /* Reset Off */ Write_hfc(cs, HFCPCI_CIRM, 0); /* Reset Off */
#if CONFIG_PCI
pcibios_write_config_word(cs->hw.hfcpci.pci_bus, cs->hw.hfcpci.pci_device_fn, PCI_COMMAND, 0); /* disable memory mapped ports + busmaster */ pcibios_write_config_word(cs->hw.hfcpci.pci_bus, cs->hw.hfcpci.pci_device_fn, PCI_COMMAND, 0); /* disable memory mapped ports + busmaster */
#endif /* CONFIG_PCI */
del_timer(&cs->hw.hfcpci.timer); del_timer(&cs->hw.hfcpci.timer);
iounmap(cs->hw.hfcpci.pci_io); iounmap(cs->hw.hfcpci.pci_io);
pci_free_consistent(cs->hw.hfcpci.pdev, 32768, cs->hw.hfcpci.fifos, cs->hw.hfcpci.fifos_dma); pci_free_consistent(cs->hw.hfcpci.pdev, 32768, cs->hw.hfcpci.fifos, cs->hw.hfcpci.fifos_dma);
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "hfc_sx.h" #include "hfc_sx.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/isapnp.h>
extern const char *CardType[]; extern const char *CardType[];
...@@ -1460,7 +1461,17 @@ hfcsx_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -1460,7 +1461,17 @@ hfcsx_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return (0); return (0);
} }
#ifdef __ISAPNP__
static struct isapnp_device_id hfc_ids[] __initdata = {
{ ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620),
ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2620),
(unsigned long) "Teles 16.3c2" },
{ 0, }
};
static struct isapnp_device_id *hdev = &hfc_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __devinit int __devinit
setup_hfcsx(struct IsdnCard *card) setup_hfcsx(struct IsdnCard *card)
...@@ -1471,6 +1482,45 @@ setup_hfcsx(struct IsdnCard *card) ...@@ -1471,6 +1482,45 @@ setup_hfcsx(struct IsdnCard *card)
strcpy(tmp, hfcsx_revision); strcpy(tmp, hfcsx_revision);
printk(KERN_INFO "HiSax: HFC-SX driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: HFC-SX driver Rev. %s\n", HiSax_getrev(tmp));
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(hdev->card_vendor) {
if ((pb = isapnp_find_card(hdev->card_vendor,
hdev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
hdev->vendor, hdev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)hdev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] = pd->resource[0].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "HFC PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
break;
} else {
printk(KERN_ERR "HFC PnP: PnP error card found, no device\n");
}
}
hdev++;
pnp_c=NULL;
}
if (!hdev->card_vendor) {
printk(KERN_INFO "HFC PnP: no ISAPnP card found\n");
return(0);
}
}
#endif
cs->hw.hfcsx.base = card->para[1] & 0xfffe; cs->hw.hfcsx.base = card->para[1] & 0xfffe;
cs->irq = card->para[0]; cs->irq = card->para[0];
cs->hw.hfcsx.int_s1 = 0; cs->hw.hfcsx.int_s1 = 0;
...@@ -1553,7 +1603,3 @@ setup_hfcsx(struct IsdnCard *card) ...@@ -1553,7 +1603,3 @@ setup_hfcsx(struct IsdnCard *card)
cs->auxcmd = &hfcsx_auxcmd; cs->auxcmd = &hfcsx_auxcmd;
return (1); return (1);
} }
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#define __NO_VERSION__ #define __NO_VERSION__
#include <linux/init.h> #include <linux/init.h>
#include <linux/isapnp.h>
#include "hisax.h" #include "hisax.h"
#include "hfc_2bds0.h" #include "hfc_2bds0.h"
#include "isdnl1.h" #include "isdnl1.h"
...@@ -139,6 +140,36 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -139,6 +140,36 @@ hfcs_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
#ifdef __ISAPNP__
static struct isapnp_device_id hfc_ids[] __initdata = {
{ ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114),
ISAPNP_VENDOR('A', 'N', 'X'), ISAPNP_FUNCTION(0x1114),
(unsigned long) "Acer P10" },
{ ISAPNP_VENDOR('B', 'I', 'L'), ISAPNP_FUNCTION(0x0002),
ISAPNP_VENDOR('B', 'I', 'L'), ISAPNP_FUNCTION(0x0002),
(unsigned long) "Billion 2" },
{ ISAPNP_VENDOR('B', 'I', 'L'), ISAPNP_FUNCTION(0x0001),
ISAPNP_VENDOR('B', 'I', 'L'), ISAPNP_FUNCTION(0x0001),
(unsigned long) "Billion 1" },
{ ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x7410),
ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x7410),
(unsigned long) "IStar PnP" },
{ ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2610),
ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2610),
(unsigned long) "Teles 16.3c" },
{ ISAPNP_VENDOR('S', 'F', 'M'), ISAPNP_FUNCTION(0x0001),
ISAPNP_VENDOR('S', 'F', 'M'), ISAPNP_FUNCTION(0x0001),
(unsigned long) "Tornado Tipa C" },
{ ISAPNP_VENDOR('K', 'Y', 'E'), ISAPNP_FUNCTION(0x0001),
ISAPNP_VENDOR('K', 'Y', 'E'), ISAPNP_FUNCTION(0x0001),
(unsigned long) "Genius Speed Surfer" },
{ 0, }
};
static struct isapnp_device_id *hdev = &hfc_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __init int __init
setup_hfcs(struct IsdnCard *card) setup_hfcs(struct IsdnCard *card)
{ {
...@@ -147,6 +178,46 @@ setup_hfcs(struct IsdnCard *card) ...@@ -147,6 +178,46 @@ setup_hfcs(struct IsdnCard *card)
strcpy(tmp, hfcs_revision); strcpy(tmp, hfcs_revision);
printk(KERN_INFO "HiSax: HFC-S driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: HFC-S driver Rev. %s\n", HiSax_getrev(tmp));
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(hdev->card_vendor) {
if ((pb = isapnp_find_card(hdev->card_vendor,
hdev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
hdev->vendor, hdev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)hdev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] = pd->resource[0].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "HFC PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
break;
} else {
printk(KERN_ERR "HFC PnP: PnP error card found, no device\n");
}
}
hdev++;
pnp_c=NULL;
}
if (!hdev->card_vendor) {
printk(KERN_INFO "HFC PnP: no ISAPnP card found\n");
return(0);
}
}
#endif
cs->hw.hfcD.addr = card->para[1] & 0xfffe; cs->hw.hfcD.addr = card->para[1] & 0xfffe;
cs->irq = card->para[0]; cs->irq = card->para[0];
cs->hw.hfcD.cip = 0; cs->hw.hfcD.cip = 0;
......
...@@ -67,6 +67,9 @@ ...@@ -67,6 +67,9 @@
#define DL_DATA 0x0220 #define DL_DATA 0x0220
#define DL_FLUSH 0x0224 #define DL_FLUSH 0x0224
#define DL_UNIT_DATA 0x0230 #define DL_UNIT_DATA 0x0230
#define MDL_BC_RELEASE 0x0278 // Formula-n enter:now
#define MDL_BC_ASSIGN 0x027C // Formula-n enter:now
#define MDL_ASSIGN 0x0280 #define MDL_ASSIGN 0x0280
#define MDL_REMOVE 0x0284 #define MDL_REMOVE 0x0284
#define MDL_ERROR 0x0288 #define MDL_ERROR 0x0288
...@@ -835,6 +838,17 @@ struct w6692_chip { ...@@ -835,6 +838,17 @@ struct w6692_chip {
int ph_state; int ph_state;
}; };
struct amd7930_chip {
u_char lmr1;
u_char ph_state;
u_char old_state;
u_char flg_t3;
unsigned int tx_xmtlen;
struct timer_list timer3;
void (*ph_command) (struct IsdnCardState *, u_char, char *);
void (*setIrqMask) (struct IsdnCardState *, u_char);
};
struct icc_chip { struct icc_chip {
int ph_state; int ph_state;
u_char *mon_tx; u_char *mon_tx;
...@@ -932,6 +946,7 @@ struct IsdnCardState { ...@@ -932,6 +946,7 @@ struct IsdnCardState {
struct hfcpci_chip hfcpci; struct hfcpci_chip hfcpci;
struct hfcsx_chip hfcsx; struct hfcsx_chip hfcsx;
struct w6692_chip w6692; struct w6692_chip w6692;
struct amd7930_chip amd7930;
struct icc_chip icc; struct icc_chip icc;
} dc; } dc;
u_char *rcvbuf; u_char *rcvbuf;
...@@ -993,7 +1008,8 @@ struct IsdnCardState { ...@@ -993,7 +1008,8 @@ struct IsdnCardState {
#define ISDN_CTYPE_NETJET_U 38 #define ISDN_CTYPE_NETJET_U 38
#define ISDN_CTYPE_HFC_SP_PCMCIA 39 #define ISDN_CTYPE_HFC_SP_PCMCIA 39
#define ISDN_CTYPE_DYNAMIC 40 #define ISDN_CTYPE_DYNAMIC 40
#define ISDN_CTYPE_COUNT 40 #define ISDN_CTYPE_ENTERNOW 41
#define ISDN_CTYPE_COUNT 41
#ifdef ISDN_CHIP_ISAC #ifdef ISDN_CHIP_ISAC
...@@ -1252,6 +1268,10 @@ struct IsdnCardState { ...@@ -1252,6 +1268,10 @@ struct IsdnCardState {
#define CARD_NETJET_U 0 #define CARD_NETJET_U 0
#endif #endif
#ifdef CONFIG_HISAX_ENTERNOW_PCI
#define CARD_FN_ENTERNOW_PCI 1
#endif
#define TEI_PER_CARD 1 #define TEI_PER_CARD 1
/* L1 Debug */ /* L1 Debug */
......
This diff is collapsed.
/*
*
* IPACX specific defines
*
* This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference.
*
*/
/* All Registers original Siemens Spec */
#ifndef INCLUDE_IPACX_H
#define INCLUDE_IPACX_H
/* D-channel registers */
#define IPACX_RFIFOD 0x00 /* RD */
#define IPACX_XFIFOD 0x00 /* WR */
#define IPACX_ISTAD 0x20 /* RD */
#define IPACX_MASKD 0x20 /* WR */
#define IPACX_STARD 0x21 /* RD */
#define IPACX_CMDRD 0x21 /* WR */
#define IPACX_MODED 0x22 /* RD/WR */
#define IPACX_EXMD1 0x23 /* RD/WR */
#define IPACX_TIMR1 0x24 /* RD/WR */
#define IPACX_SAP1 0x25 /* WR */
#define IPACX_SAP2 0x26 /* WR */
#define IPACX_RBCLD 0x26 /* RD */
#define IPACX_RBCHD 0x27 /* RD */
#define IPACX_TEI1 0x27 /* WR */
#define IPACX_TEI2 0x28 /* WR */
#define IPACX_RSTAD 0x28 /* RD */
#define IPACX_TMD 0x29 /* RD/WR */
#define IPACX_CIR0 0x2E /* RD */
#define IPACX_CIX0 0x2E /* WR */
#define IPACX_CIR1 0x2F /* RD */
#define IPACX_CIX1 0x2F /* WR */
/* Transceiver registers */
#define IPACX_TR_CONF0 0x30 /* RD/WR */
#define IPACX_TR_CONF1 0x31 /* RD/WR */
#define IPACX_TR_CONF2 0x32 /* RD/WR */
#define IPACX_TR_STA 0x33 /* RD */
#define IPACX_TR_CMD 0x34 /* RD/WR */
#define IPACX_SQRR1 0x35 /* RD */
#define IPACX_SQXR1 0x35 /* WR */
#define IPACX_SQRR2 0x36 /* RD */
#define IPACX_SQXR2 0x36 /* WR */
#define IPACX_SQRR3 0x37 /* RD */
#define IPACX_SQXR3 0x37 /* WR */
#define IPACX_ISTATR 0x38 /* RD */
#define IPACX_MASKTR 0x39 /* RD/WR */
#define IPACX_TR_MODE 0x3A /* RD/WR */
#define IPACX_ACFG1 0x3C /* RD/WR */
#define IPACX_ACFG2 0x3D /* RD/WR */
#define IPACX_AOE 0x3E /* RD/WR */
#define IPACX_ARX 0x3F /* RD */
#define IPACX_ATX 0x3F /* WR */
/* IOM: Timeslot, DPS, CDA */
#define IPACX_CDA10 0x40 /* RD/WR */
#define IPACX_CDA11 0x41 /* RD/WR */
#define IPACX_CDA20 0x42 /* RD/WR */
#define IPACX_CDA21 0x43 /* RD/WR */
#define IPACX_CDA_TSDP10 0x44 /* RD/WR */
#define IPACX_CDA_TSDP11 0x45 /* RD/WR */
#define IPACX_CDA_TSDP20 0x46 /* RD/WR */
#define IPACX_CDA_TSDP21 0x47 /* RD/WR */
#define IPACX_BCHA_TSDP_BC1 0x48 /* RD/WR */
#define IPACX_BCHA_TSDP_BC2 0x49 /* RD/WR */
#define IPACX_BCHB_TSDP_BC1 0x4A /* RD/WR */
#define IPACX_BCHB_TSDP_BC2 0x4B /* RD/WR */
#define IPACX_TR_TSDP_BC1 0x4C /* RD/WR */
#define IPACX_TR_TSDP_BC2 0x4D /* RD/WR */
#define IPACX_CDA1_CR 0x4E /* RD/WR */
#define IPACX_CDA2_CR 0x4F /* RD/WR */
/* IOM: Contol, Sync transfer, Monitor */
#define IPACX_TR_CR 0x50 /* RD/WR */
#define IPACX_TRC_CR 0x50 /* RD/WR */
#define IPACX_BCHA_CR 0x51 /* RD/WR */
#define IPACX_BCHB_CR 0x52 /* RD/WR */
#define IPACX_DCI_CR 0x53 /* RD/WR */
#define IPACX_DCIC_CR 0x53 /* RD/WR */
#define IPACX_MON_CR 0x54 /* RD/WR */
#define IPACX_SDS1_CR 0x55 /* RD/WR */
#define IPACX_SDS2_CR 0x56 /* RD/WR */
#define IPACX_IOM_CR 0x57 /* RD/WR */
#define IPACX_STI 0x58 /* RD */
#define IPACX_ASTI 0x58 /* WR */
#define IPACX_MSTI 0x59 /* RD/WR */
#define IPACX_SDS_CONF 0x5A /* RD/WR */
#define IPACX_MCDA 0x5B /* RD */
#define IPACX_MOR 0x5C /* RD */
#define IPACX_MOX 0x5C /* WR */
#define IPACX_MOSR 0x5D /* RD */
#define IPACX_MOCR 0x5E /* RD/WR */
#define IPACX_MSTA 0x5F /* RD */
#define IPACX_MCONF 0x5F /* WR */
/* Interrupt and general registers */
#define IPACX_ISTA 0x60 /* RD */
#define IPACX_MASK 0x60 /* WR */
#define IPACX_AUXI 0x61 /* RD */
#define IPACX_AUXM 0x61 /* WR */
#define IPACX_MODE1 0x62 /* RD/WR */
#define IPACX_MODE2 0x63 /* RD/WR */
#define IPACX_ID 0x64 /* RD */
#define IPACX_SRES 0x64 /* WR */
#define IPACX_TIMR2 0x65 /* RD/WR */
/* B-channel registers */
#define IPACX_OFF_B1 0x70
#define IPACX_OFF_B2 0x80
#define IPACX_ISTAB 0x00 /* RD */
#define IPACX_MASKB 0x00 /* WR */
#define IPACX_STARB 0x01 /* RD */
#define IPACX_CMDRB 0x01 /* WR */
#define IPACX_MODEB 0x02 /* RD/WR */
#define IPACX_EXMB 0x03 /* RD/WR */
#define IPACX_RAH1 0x05 /* WR */
#define IPACX_RAH2 0x06 /* WR */
#define IPACX_RBCLB 0x06 /* RD */
#define IPACX_RBCHB 0x07 /* RD */
#define IPACX_RAL1 0x07 /* WR */
#define IPACX_RAL2 0x08 /* WR */
#define IPACX_RSTAB 0x08 /* RD */
#define IPACX_TMB 0x09 /* RD/WR */
#define IPACX_RFIFOB 0x0A /*- RD */
#define IPACX_XFIFOB 0x0A /*- WR */
/* Layer 1 Commands */
#define IPACX_CMD_TIM 0x0
#define IPACX_CMD_RES 0x1
#define IPACX_CMD_SSP 0x2
#define IPACX_CMD_SCP 0x3
#define IPACX_CMD_AR8 0x8
#define IPACX_CMD_AR10 0x9
#define IPACX_CMD_ARL 0xa
#define IPACX_CMD_DI 0xf
/* Layer 1 Indications */
#define IPACX_IND_DR 0x0
#define IPACX_IND_RES 0x1
#define IPACX_IND_TMA 0x2
#define IPACX_IND_SLD 0x3
#define IPACX_IND_RSY 0x4
#define IPACX_IND_DR6 0x5
#define IPACX_IND_PU 0x7
#define IPACX_IND_AR 0x8
#define IPACX_IND_ARL 0xa
#define IPACX_IND_CVR 0xb
#define IPACX_IND_AI8 0xc
#define IPACX_IND_AI10 0xd
#define IPACX_IND_AIL 0xe
#define IPACX_IND_DC 0xf
extern void init_ipacx(struct IsdnCardState *cs, int part);
extern void interrupt_ipacx(struct IsdnCardState *cs);
#endif
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "isac.h" #include "isac.h"
#include "isar.h" #include "isar.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/isapnp.h>
extern const char *CardType[]; extern const char *CardType[];
...@@ -193,6 +194,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) { ...@@ -193,6 +194,10 @@ isurf_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) {
return(isar_auxcmd(cs, ic)); return(isar_auxcmd(cs, ic));
} }
#ifdef __ISAPNP__
static struct pci_bus *pnp_surf __devinitdata = NULL;
#endif
int __init int __init
setup_isurf(struct IsdnCard *card) setup_isurf(struct IsdnCard *card)
{ {
...@@ -210,9 +215,48 @@ setup_isurf(struct IsdnCard *card) ...@@ -210,9 +215,48 @@ setup_isurf(struct IsdnCard *card)
cs->hw.isurf.phymem = card->para[2]; cs->hw.isurf.phymem = card->para[2];
cs->irq = card->para[0]; cs->irq = card->para[0];
} else { } else {
#ifdef __ISAPNP__
struct pci_bus *pb;
struct pci_dev *pd;
if (isapnp_present()) {
cs->subtyp = 0;
if ((pb = isapnp_find_card(
ISAPNP_VENDOR('S', 'I', 'E'),
ISAPNP_FUNCTION(0x0010), pnp_surf))) {
pnp_surf = pb;
pd = NULL;
if (!(pd = isapnp_find_dev(pnp_surf,
ISAPNP_VENDOR('S', 'I', 'E'),
ISAPNP_FUNCTION(0x0010), pd))) {
printk(KERN_ERR "ISurfPnP: PnP error card found, no device\n");
return (0);
}
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
cs->hw.isurf.reset = pd->resource[0].start;
cs->hw.isurf.phymem = pd->resource[1].start;
cs->irq = pd->irq_resource[0].start;
if (!cs->irq || !cs->hw.isurf.reset || !cs->hw.isurf.phymem) {
printk(KERN_ERR "ISurfPnP:some resources are missing %d/%x/%lx\n",
cs->irq, cs->hw.isurf.reset, cs->hw.isurf.phymem);
pd->deactivate(pd);
return(0);
}
} else {
printk(KERN_INFO "ISurfPnP: no ISAPnP card found\n");
return(0);
}
} else {
printk(KERN_INFO "ISurfPnP: no ISAPnP bus found\n");
return(0);
}
#else
printk(KERN_WARNING "HiSax: %s port/mem not set\n", printk(KERN_WARNING "HiSax: %s port/mem not set\n",
CardType[card->typ]); CardType[card->typ]);
return (0); return (0);
#endif
} }
if (check_region(cs->hw.isurf.reset, 1)) { if (check_region(cs->hw.isurf.reset, 1)) {
printk(KERN_WARNING printk(KERN_WARNING
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#define __NO_VERSION__ #define __NO_VERSION__
#include <linux/init.h> #include <linux/init.h>
#include <linux/isapnp.h>
#include "hisax.h" #include "hisax.h"
#include "isac.h" #include "isac.h"
#include "hscx.h" #include "hscx.h"
...@@ -218,6 +219,21 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -218,6 +219,21 @@ ix1_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
#ifdef __ISAPNP__
static struct isapnp_device_id itk_ids[] __initdata = {
{ ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25),
ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x25),
(unsigned long) "ITK micro 2" },
{ ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29),
ISAPNP_VENDOR('I', 'T', 'K'), ISAPNP_FUNCTION(0x29),
(unsigned long) "ITK micro 2." },
{ 0, }
};
static struct isapnp_device_id *idev = &itk_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __init int __init
setup_ix1micro(struct IsdnCard *card) setup_ix1micro(struct IsdnCard *card)
...@@ -230,6 +246,45 @@ setup_ix1micro(struct IsdnCard *card) ...@@ -230,6 +246,45 @@ setup_ix1micro(struct IsdnCard *card)
if (cs->typ != ISDN_CTYPE_IX1MICROR2) if (cs->typ != ISDN_CTYPE_IX1MICROR2)
return (0); return (0);
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(idev->card_vendor) {
if ((pb = isapnp_find_card(idev->card_vendor,
idev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
idev->vendor, idev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)idev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] = pd->resource[0].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "ITK PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
break;
} else {
printk(KERN_ERR "ITK PnP: PnP error card found, no device\n");
}
}
idev++;
pnp_c=NULL;
}
if (!idev->card_vendor) {
printk(KERN_INFO "ITK PnP: no ISAPnP card found\n");
return(0);
}
}
#endif
/* IO-Ports */ /* IO-Ports */
cs->hw.ix1.isac_ale = card->para[1] + ISAC_COMMAND_OFFSET; cs->hw.ix1.isac_ale = card->para[1] + ISAC_COMMAND_OFFSET;
cs->hw.ix1.hscx_ale = card->para[1] + HSCX_COMMAND_OFFSET; cs->hw.ix1.hscx_ale = card->para[1] + HSCX_COMMAND_OFFSET;
......
...@@ -8,7 +8,9 @@ ...@@ -8,7 +8,9 @@
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
* Thanks to Traverse Technologie Australia for documents and information * Thanks to Traverse Technologies Australia for documents and information
*
* 16-Apr-2002 - led code added - Guy Ellis (guy@traverse.com.au)
* *
*/ */
...@@ -133,6 +135,7 @@ void ...@@ -133,6 +135,7 @@ void
mode_tiger(struct BCState *bcs, int mode, int bc) mode_tiger(struct BCState *bcs, int mode, int bc)
{ {
struct IsdnCardState *cs = bcs->cs; struct IsdnCardState *cs = bcs->cs;
u_char led;
if (cs->debug & L1_DEB_HSCX) if (cs->debug & L1_DEB_HSCX)
debugl1(cs, "Tiger mode %d bchan %d/%d", debugl1(cs, "Tiger mode %d bchan %d/%d",
...@@ -154,6 +157,15 @@ mode_tiger(struct BCState *bcs, int mode, int bc) ...@@ -154,6 +157,15 @@ mode_tiger(struct BCState *bcs, int mode, int bc)
cs->hw.njet.dmactrl); cs->hw.njet.dmactrl);
byteout(cs->hw.njet.base + NETJET_IRQMASK0, 0); byteout(cs->hw.njet.base + NETJET_IRQMASK0, 0);
} }
if (cs->typ == ISDN_CTYPE_NETJET_S)
{
// led off
led = bc & 0x01;
led = 0x01 << (6 + led); // convert to mask
led = ~led;
cs->hw.njet.auxd &= led;
byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
}
break; break;
case (L1_MODE_TRANS): case (L1_MODE_TRANS):
break; break;
...@@ -179,6 +191,14 @@ mode_tiger(struct BCState *bcs, int mode, int bc) ...@@ -179,6 +191,14 @@ mode_tiger(struct BCState *bcs, int mode, int bc)
bcs->hw.tiger.sendp = bcs->hw.tiger.send; bcs->hw.tiger.sendp = bcs->hw.tiger.send;
bcs->hw.tiger.free = NETJET_DMA_TXSIZE; bcs->hw.tiger.free = NETJET_DMA_TXSIZE;
test_and_set_bit(BC_FLG_EMPTY, &bcs->Flag); test_and_set_bit(BC_FLG_EMPTY, &bcs->Flag);
if (cs->typ == ISDN_CTYPE_NETJET_S)
{
// led on
led = bc & 0x01;
led = 0x01 << (6 + led); // convert to mask
cs->hw.njet.auxd |= led;
byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
}
break; break;
} }
if (cs->debug & L1_DEB_HSCX) if (cs->debug & L1_DEB_HSCX)
...@@ -858,9 +878,13 @@ tiger_l2l1(struct PStack *st, int pr, void *arg) ...@@ -858,9 +878,13 @@ tiger_l2l1(struct PStack *st, int pr, void *arg)
case (PH_ACTIVATE | REQUEST): case (PH_ACTIVATE | REQUEST):
test_and_set_bit(BC_FLG_ACTIV, &st->l1.bcs->Flag); test_and_set_bit(BC_FLG_ACTIV, &st->l1.bcs->Flag);
mode_tiger(st->l1.bcs, st->l1.mode, st->l1.bc); mode_tiger(st->l1.bcs, st->l1.mode, st->l1.bc);
/* 2001/10/04 Christoph Ersfeld, Formula-n Europe AG */
st->l1.bcs->cs->cardmsg(st->l1.bcs->cs, MDL_BC_ASSIGN, (void *)(&st->l1.bc));
l1_msg_b(st, pr, arg); l1_msg_b(st, pr, arg);
break; break;
case (PH_DEACTIVATE | REQUEST): case (PH_DEACTIVATE | REQUEST):
/* 2001/10/04 Christoph Ersfeld, Formula-n Europe AG */
st->l1.bcs->cs->cardmsg(st->l1.bcs->cs, MDL_BC_RELEASE, (void *)(&st->l1.bc));
l1_msg_b(st, pr, arg); l1_msg_b(st, pr, arg);
break; break;
case (PH_DEACTIVATE | CONFIRM): case (PH_DEACTIVATE | CONFIRM):
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "hscx.h" #include "hscx.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/isapnp.h>
extern const char *CardType[]; extern const char *CardType[];
const char *niccy_revision = "$Revision: 1.15.6.6 $"; const char *niccy_revision = "$Revision: 1.15.6.6 $";
...@@ -238,6 +239,9 @@ niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -238,6 +239,9 @@ niccy_card_msg(struct IsdnCardState *cs, int mt, void *arg)
} }
static struct pci_dev *niccy_dev __initdata = NULL; static struct pci_dev *niccy_dev __initdata = NULL;
#ifdef __ISAPNP__
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __init int __init
setup_niccy(struct IsdnCard *card) setup_niccy(struct IsdnCard *card)
...@@ -249,7 +253,39 @@ setup_niccy(struct IsdnCard *card) ...@@ -249,7 +253,39 @@ setup_niccy(struct IsdnCard *card)
printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp)); printk(KERN_INFO "HiSax: Niccy driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_NICCY) if (cs->typ != ISDN_CTYPE_NICCY)
return (0); return (0);
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
if ((pb = isapnp_find_card(
ISAPNP_VENDOR('S', 'D', 'A'),
ISAPNP_FUNCTION(0x0150), pnp_c))) {
pnp_c = pb;
pd = NULL;
if (!(pd = isapnp_find_dev(pnp_c,
ISAPNP_VENDOR('S', 'D', 'A'),
ISAPNP_FUNCTION(0x0150), pd))) {
printk(KERN_ERR "NiccyPnP: PnP error card found, no device\n");
return (0);
}
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] = pd->resource[0].start;
card->para[2] = pd->resource[1].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1] || !card->para[2]) {
printk(KERN_ERR "NiccyPnP:some resources are missing %ld/%lx/%lx\n",
card->para[0], card->para[1], card->para[2]);
pd->deactivate(pd);
return(0);
}
} else {
printk(KERN_INFO "NiccyPnP: no ISAPnP card found\n");
}
}
#endif
if (card->para[1]) { if (card->para[1]) {
cs->hw.niccy.isac = card->para[1] + ISAC_PNP; cs->hw.niccy.isac = card->para[1] + ISAC_PNP;
cs->hw.niccy.hscx = card->para[1] + HSCX_PNP; cs->hw.niccy.hscx = card->para[1] + HSCX_PNP;
......
...@@ -184,6 +184,14 @@ setup_netjet_s(struct IsdnCard *card) ...@@ -184,6 +184,14 @@ setup_netjet_s(struct IsdnCard *card)
printk(KERN_WARNING "NETjet-S: No IO-Adr for PCI card found\n"); printk(KERN_WARNING "NETjet-S: No IO-Adr for PCI card found\n");
return(0); return(0);
} }
/* 2001/10/04 Christoph Ersfeld, Formula-n Europe AG www.formula-n.com */
if ((dev_netjet->subsystem_vendor == 0x55) &&
(dev_netjet->subsystem_device == 0x02)) {
printk(KERN_WARNING "Netjet: You tried to load this driver with an incompatible TigerJet-card\n");
printk(KERN_WARNING "Use type=41 for Formula-n enter:now ISDN PCI and compatible\n");
return(0);
}
/* end new code */
cs->hw.njet.pdev = dev_netjet; cs->hw.njet.pdev = dev_netjet;
} else { } else {
printk(KERN_WARNING "NETjet-S: No PCI card found\n"); printk(KERN_WARNING "NETjet-S: No PCI card found\n");
......
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "isar.h" #include "isar.h"
#include "isdnl1.h" #include "isdnl1.h"
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/isapnp.h>
extern const char *CardType[]; extern const char *CardType[];
...@@ -530,6 +531,21 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -530,6 +531,21 @@ Sedl_card_msg(struct IsdnCardState *cs, int mt, void *arg)
static struct pci_dev *dev_sedl __devinitdata = NULL; static struct pci_dev *dev_sedl __devinitdata = NULL;
#ifdef __ISAPNP__
static struct isapnp_device_id sedl_ids[] __initdata = {
{ ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01),
ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x01),
(unsigned long) "Speed win" },
{ ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x02),
ISAPNP_VENDOR('S', 'A', 'G'), ISAPNP_FUNCTION(0x02),
(unsigned long) "Speed Fax+" },
{ 0, }
};
static struct isapnp_device_id *pdev = &sedl_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __devinit int __devinit
setup_sedlbauer(struct IsdnCard *card) setup_sedlbauer(struct IsdnCard *card)
{ {
...@@ -565,6 +581,57 @@ setup_sedlbauer(struct IsdnCard *card) ...@@ -565,6 +581,57 @@ setup_sedlbauer(struct IsdnCard *card)
bytecnt = 16; bytecnt = 16;
} }
} else { } else {
#ifdef __ISAPNP__
if (isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(pdev->card_vendor) {
if ((pb = isapnp_find_card(pdev->card_vendor,
pdev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
pdev->vendor, pdev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)pdev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[1] =
pd->resource[0].start;
card->para[0] =
pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1]) {
printk(KERN_ERR "Sedlbauer PnP:some resources are missing %ld/%lx\n",
card->para[0], card->para[1]);
pd->deactivate(pd);
return(0);
}
cs->hw.sedl.cfg_reg = card->para[1];
cs->irq = card->para[0];
if (pdev->function == ISAPNP_FUNCTION(0x2)) {
cs->subtyp = SEDL_SPEED_FAX;
cs->hw.sedl.chip = SEDL_CHIP_ISAC_ISAR;
bytecnt = 16;
} else {
cs->subtyp = SEDL_SPEED_CARD_WIN;
cs->hw.sedl.chip = SEDL_CHIP_TEST;
}
goto ready;
} else {
printk(KERN_ERR "Sedlbauer PnP: PnP error card found, no device\n");
return(0);
}
}
pdev++;
pnp_c=NULL;
}
if (!pdev->card_vendor) {
printk(KERN_INFO "Sedlbauer PnP: no ISAPnP card found\n");
}
}
#endif
/* Probe for Sedlbauer speed pci */ /* Probe for Sedlbauer speed pci */
#if CONFIG_PCI #if CONFIG_PCI
if (!pci_present()) { if (!pci_present()) {
...@@ -630,7 +697,7 @@ setup_sedlbauer(struct IsdnCard *card) ...@@ -630,7 +697,7 @@ setup_sedlbauer(struct IsdnCard *card)
return (0); return (0);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
} }
ready:
/* In case of the sedlbauer pcmcia card, this region is in use, /* In case of the sedlbauer pcmcia card, this region is in use,
* reserved for us by the card manager. So we do not check it * reserved for us by the card manager. So we do not check it
* here, it would fail. * here, it would fail.
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#define __NO_VERSION__ #define __NO_VERSION__
#include <linux/init.h> #include <linux/init.h>
#include <linux/isapnp.h>
#include "hisax.h" #include "hisax.h"
#include "isac.h" #include "isac.h"
#include "hscx.h" #include "hscx.h"
...@@ -254,6 +255,24 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -254,6 +255,24 @@ Teles_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
#ifdef __ISAPNP__
static struct isapnp_device_id teles_ids[] __initdata = {
{ ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
ISAPNP_VENDOR('T', 'A', 'G'), ISAPNP_FUNCTION(0x2110),
(unsigned long) "Teles 16.3 PnP" },
{ ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0),
ISAPNP_VENDOR('C', 'T', 'X'), ISAPNP_FUNCTION(0x0),
(unsigned long) "Creatix 16.3 PnP" },
{ ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002),
ISAPNP_VENDOR('C', 'P', 'Q'), ISAPNP_FUNCTION(0x1002),
(unsigned long) "Compaq ISDN S0" },
{ 0, }
};
static struct isapnp_device_id *tdev = &teles_ids[0];
static struct pci_bus *pnp_c __devinitdata = NULL;
#endif
int __devinit int __devinit
setup_teles3(struct IsdnCard *card) setup_teles3(struct IsdnCard *card)
{ {
...@@ -267,6 +286,47 @@ setup_teles3(struct IsdnCard *card) ...@@ -267,6 +286,47 @@ setup_teles3(struct IsdnCard *card)
&& (cs->typ != ISDN_CTYPE_TELESPCMCIA) && (cs->typ != ISDN_CTYPE_COMPAQ_ISA)) && (cs->typ != ISDN_CTYPE_TELESPCMCIA) && (cs->typ != ISDN_CTYPE_COMPAQ_ISA))
return (0); return (0);
#ifdef __ISAPNP__
if (!card->para[1] && isapnp_present()) {
struct pci_bus *pb;
struct pci_dev *pd;
while(tdev->card_vendor) {
if ((pb = isapnp_find_card(tdev->card_vendor,
tdev->card_device, pnp_c))) {
pnp_c = pb;
pd = NULL;
if ((pd = isapnp_find_dev(pnp_c,
tdev->vendor, tdev->function, pd))) {
printk(KERN_INFO "HiSax: %s detected\n",
(char *)tdev->driver_data);
pd->prepare(pd);
pd->deactivate(pd);
pd->activate(pd);
card->para[3] = pd->resource[2].start;
card->para[2] = pd->resource[1].start;
card->para[1] = pd->resource[0].start;
card->para[0] = pd->irq_resource[0].start;
if (!card->para[0] || !card->para[1] || !card->para[2]) {
printk(KERN_ERR "Teles PnP:some resources are missing %ld/%lx/%lx\n",
card->para[0], card->para[1], card->para[2]);
pd->deactivate(pd);
return(0);
}
break;
} else {
printk(KERN_ERR "Teles PnP: PnP error card found, no device\n");
}
}
tdev++;
pnp_c=NULL;
}
if (!tdev->card_vendor) {
printk(KERN_INFO "Teles PnP: no ISAPnP card found\n");
return(0);
}
}
#endif
if (cs->typ == ISDN_CTYPE_16_3) { if (cs->typ == ISDN_CTYPE_16_3) {
cs->hw.teles3.cfg_reg = card->para[1]; cs->hw.teles3.cfg_reg = card->para[1];
switch (cs->hw.teles3.cfg_reg) { switch (cs->hw.teles3.cfg_reg) {
......
...@@ -29,11 +29,17 @@ typedef struct { ...@@ -29,11 +29,17 @@ typedef struct {
static const PCI_ENTRY id_list[] = static const PCI_ENTRY id_list[] =
{ {
{PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH, "Dynalink/AsusCom", "IS64PH"},
{PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692, "Winbond", "W6692"}, {PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692, "Winbond", "W6692"},
{0, 0, NULL, NULL} {PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH, "Dynalink/AsusCom", "IS64PH"},
{0, 0, "U.S.Robotics", "ISDN PCI Card TA"}
}; };
#define W6692_SV_USR 0x16ec
#define W6692_SD_USR 0x3409
#define W6692_WINBOND 0
#define W6692_DYNALINK 1
#define W6692_USR 2
extern const char *CardType[]; extern const char *CardType[];
const char *w6692_revision = "$Revision: 1.12.6.6 $"; const char *w6692_revision = "$Revision: 1.12.6.6 $";
...@@ -859,6 +865,28 @@ setstack_w6692(struct PStack *st, struct BCState *bcs) ...@@ -859,6 +865,28 @@ setstack_w6692(struct PStack *st, struct BCState *bcs)
return (0); return (0);
} }
void resetW6692(struct IsdnCardState *cs)
{
cs->writeW6692(cs, W_D_CTL, W_D_CTL_SRST);
schedule_timeout((10*HZ)/1000);
cs->writeW6692(cs, W_D_CTL, 0x00);
schedule_timeout((10*HZ)/1000);
cs->writeW6692(cs, W_IMASK, 0xff);
cs->writeW6692(cs, W_D_SAM, 0xff);
cs->writeW6692(cs, W_D_TAM, 0xff);
cs->writeW6692(cs, W_D_EXIM, 0x00);
cs->writeW6692(cs, W_D_MODE, W_D_MODE_RACT);
cs->writeW6692(cs, W_IMASK, 0x18);
if (cs->subtyp == W6692_USR) {
/* seems that USR implemented some power control features
* Pin 79 is connected to the oscilator circuit so we
* have to handle it here
*/
cs->writeW6692(cs, W_PCTL, 0x80);
cs->writeW6692(cs, W_XDATA, 0x00);
}
}
void __init initW6692(struct IsdnCardState *cs, int part) void __init initW6692(struct IsdnCardState *cs, int part)
{ {
if (part & 1) { if (part & 1) {
...@@ -868,15 +896,7 @@ void __init initW6692(struct IsdnCardState *cs, int part) ...@@ -868,15 +896,7 @@ void __init initW6692(struct IsdnCardState *cs, int part)
cs->dbusytimer.function = (void *) dbusy_timer_handler; cs->dbusytimer.function = (void *) dbusy_timer_handler;
cs->dbusytimer.data = (long) cs; cs->dbusytimer.data = (long) cs;
init_timer(&cs->dbusytimer); init_timer(&cs->dbusytimer);
resetW6692(cs);
cs->writeW6692(cs, W_D_CTL, W_D_CTL_SRST);
cs->writeW6692(cs, W_D_CTL, 0x00);
cs->writeW6692(cs, W_IMASK, 0xff);
cs->writeW6692(cs, W_D_SAM, 0xff);
cs->writeW6692(cs, W_D_TAM, 0xff);
cs->writeW6692(cs, W_D_EXIM, 0x00);
cs->writeW6692(cs, W_D_MODE, W_D_MODE_RACT);
cs->writeW6692(cs, W_IMASK, 0x18);
ph_command(cs, W_L1CMD_RST); ph_command(cs, W_L1CMD_RST);
cs->dc.w6692.ph_state = W_L1CMD_RST; cs->dc.w6692.ph_state = W_L1CMD_RST;
W6692_new_ph(cs); W6692_new_ph(cs);
...@@ -943,9 +963,14 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -943,9 +963,14 @@ w6692_card_msg(struct IsdnCardState *cs, int mt, void *arg)
{ {
switch (mt) { switch (mt) {
case CARD_RESET: case CARD_RESET:
resetW6692(cs);
return (0); return (0);
case CARD_RELEASE: case CARD_RELEASE:
cs->writeW6692(cs, W_IMASK, 0xff);
release_region(cs->hw.w6692.iobase, 256); release_region(cs->hw.w6692.iobase, 256);
if (cs->subtyp == W6692_USR) {
cs->writeW6692(cs, W_XDATA, 0x04);
}
return (0); return (0);
case CARD_INIT: case CARD_INIT:
initW6692(cs, 3); initW6692(cs, 3);
...@@ -988,6 +1013,7 @@ setup_w6692(struct IsdnCard *card) ...@@ -988,6 +1013,7 @@ setup_w6692(struct IsdnCard *card)
if (dev_w6692) { if (dev_w6692) {
if (pci_enable_device(dev_w6692)) if (pci_enable_device(dev_w6692))
continue; continue;
cs->subtyp = id_idx;
break; break;
} }
id_idx++; id_idx++;
...@@ -998,6 +1024,13 @@ setup_w6692(struct IsdnCard *card) ...@@ -998,6 +1024,13 @@ setup_w6692(struct IsdnCard *card)
/* I think address 0 is allways the configuration area */ /* I think address 0 is allways the configuration area */
/* and address 1 is the real IO space KKe 03.09.99 */ /* and address 1 is the real IO space KKe 03.09.99 */
pci_ioaddr = pci_resource_start(dev_w6692, 1); pci_ioaddr = pci_resource_start(dev_w6692, 1);
/* USR ISDN PCI card TA need some special handling */
if (cs->subtyp == W6692_WINBOND) {
if ((W6692_SV_USR == dev_w6692->subsystem_vendor) &&
(W6692_SD_USR == dev_w6692->subsystem_device)) {
cs->subtyp = W6692_USR;
}
}
} }
if (!found) { if (!found) {
printk(KERN_WARNING "W6692: No PCI card found\n"); printk(KERN_WARNING "W6692: No PCI card found\n");
...@@ -1014,18 +1047,18 @@ setup_w6692(struct IsdnCard *card) ...@@ -1014,18 +1047,18 @@ setup_w6692(struct IsdnCard *card)
} }
cs->hw.w6692.iobase = pci_ioaddr; cs->hw.w6692.iobase = pci_ioaddr;
printk(KERN_INFO "Found: %s %s, I/O base: 0x%x, irq: %d\n", printk(KERN_INFO "Found: %s %s, I/O base: 0x%x, irq: %d\n",
id_list[id_idx].vendor_name, id_list[id_idx].card_name, id_list[cs->subtyp].vendor_name, id_list[cs->subtyp].card_name,
pci_ioaddr, dev_w6692->irq); pci_ioaddr, pci_irq);
if (check_region((cs->hw.w6692.iobase), 256)) { if (check_region((cs->hw.w6692.iobase), 256)) {
printk(KERN_WARNING printk(KERN_WARNING
"HiSax: %s I/O ports %x-%x already in use\n", "HiSax: %s I/O ports %x-%x already in use\n",
id_list[id_idx].card_name, id_list[cs->subtyp].card_name,
cs->hw.w6692.iobase, cs->hw.w6692.iobase,
cs->hw.w6692.iobase + 255); cs->hw.w6692.iobase + 255);
return (0); return (0);
} else { } else {
request_region(cs->hw.w6692.iobase, 256, request_region(cs->hw.w6692.iobase, 256,
id_list[id_idx].card_name); id_list[cs->subtyp].card_name);
} }
#else #else
printk(KERN_WARNING "HiSax: W6692 and NO_PCI_BIOS\n"); printk(KERN_WARNING "HiSax: W6692 and NO_PCI_BIOS\n");
...@@ -1035,7 +1068,7 @@ setup_w6692(struct IsdnCard *card) ...@@ -1035,7 +1068,7 @@ setup_w6692(struct IsdnCard *card)
printk(KERN_INFO printk(KERN_INFO
"HiSax: %s config irq:%d I/O:%x\n", "HiSax: %s config irq:%d I/O:%x\n",
id_list[id_idx].card_name, cs->irq, id_list[cs->subtyp].card_name, cs->irq,
cs->hw.w6692.iobase); cs->hw.w6692.iobase);
cs->readW6692 = &ReadW6692; cs->readW6692 = &ReadW6692;
......
...@@ -82,10 +82,6 @@ hycapi_remove_ctr(struct capi_ctr *ctrl) ...@@ -82,10 +82,6 @@ hycapi_remove_ctr(struct capi_ctr *ctrl)
#ifdef HYCAPI_PRINTFNAMES #ifdef HYCAPI_PRINTFNAMES
printk(KERN_NOTICE "HYCAPI hycapi_remove_ctr\n"); printk(KERN_NOTICE "HYCAPI hycapi_remove_ctr\n");
#endif #endif
if(!hy_di) {
printk(KERN_ERR "No capi_driver_interface set!");
return;
}
cinfo = (hycapictrl_info *)(ctrl->driverdata); cinfo = (hycapictrl_info *)(ctrl->driverdata);
if(!cinfo) { if(!cinfo) {
printk(KERN_ERR "No hycapictrl_info set!"); printk(KERN_ERR "No hycapictrl_info set!");
...@@ -686,10 +682,6 @@ attach the capi-driver to the kernel-capi. ...@@ -686,10 +682,6 @@ attach the capi-driver to the kernel-capi.
int hycapi_init() int hycapi_init()
{ {
int i; int i;
if(hy_di) {
printk(KERN_NOTICE "HyDI allready set\n");
return 0;
}
for(i=0;i<CAPI_MAXAPPL;i++) { for(i=0;i<CAPI_MAXAPPL;i++) {
memset(&(hycapi_applications[i]), 0, sizeof(hycapi_appl)); memset(&(hycapi_applications[i]), 0, sizeof(hycapi_appl));
} }
......
...@@ -276,7 +276,6 @@ extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from ne ...@@ -276,7 +276,6 @@ extern void hysdn_rx_netpkt(hysdn_card *, uchar *, word); /* rxed packet from ne
#ifdef CONFIG_HYSDN_CAPI #ifdef CONFIG_HYSDN_CAPI
extern unsigned int hycapi_enable; extern unsigned int hycapi_enable;
extern struct capi_driver_interface *hy_di;
extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */ extern int hycapi_capi_create(hysdn_card *); /* create a new capi device */
extern int hycapi_capi_release(hysdn_card *); /* delete the device */ extern int hycapi_capi_release(hysdn_card *); /* delete the device */
extern int hycapi_capi_stop(hysdn_card *card); /* suspend */ extern int hycapi_capi_stop(hysdn_card *card); /* suspend */
......
...@@ -9,6 +9,14 @@ ...@@ -9,6 +9,14 @@
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
* of the GNU General Public License, incorporated herein by reference. * of the GNU General Public License, incorporated herein by reference.
* *
* Data Over Voice (DOV) support added - Guy Ellis 23-Mar-02
* guy@traverse.com.au
* Outgoing calls - looks for a 'V' in first char of dialed number
* Incoming calls - checks first character of eaz as follows:
* Numeric - accept DATA only - original functionality
* 'V' - accept VOICE (DOV) only
* 'B' - accept BOTH DATA and DOV types
*
* Jan 2001: fix CISCO HDLC Bjoern A. Zeeb <i4l@zabbadoz.net> * Jan 2001: fix CISCO HDLC Bjoern A. Zeeb <i4l@zabbadoz.net>
* for info on the protocol, see * for info on the protocol, see
* http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt
...@@ -569,6 +577,7 @@ isdn_net_dial(void) ...@@ -569,6 +577,7 @@ isdn_net_dial(void)
int i; int i;
unsigned long flags; unsigned long flags;
isdn_ctrl cmd; isdn_ctrl cmd;
u_char *phone_number;
while (p) { while (p) {
isdn_net_local *lp = p->local; isdn_net_local *lp = p->local;
...@@ -667,7 +676,20 @@ isdn_net_dial(void) ...@@ -667,7 +676,20 @@ isdn_net_dial(void)
break; break;
} }
sprintf(cmd.parm.setup.phone, "%s", lp->dial->num); cmd.driver = lp->isdn_device;
cmd.command = ISDN_CMD_DIAL;
cmd.parm.setup.si2 = 0;
/* check for DOV */
phone_number = lp->dial->num;
if ((*phone_number == 'v') ||
(*phone_number == 'V')) { /* DOV call */
cmd.parm.setup.si1 = 1;
} else { /* DATA call */
cmd.parm.setup.si1 = 7;
}
strcpy(cmd.parm.setup.phone, phone_number);
/* /*
* Switch to next number or back to start if at end of list. * Switch to next number or back to start if at end of list.
*/ */
...@@ -687,10 +709,6 @@ isdn_net_dial(void) ...@@ -687,10 +709,6 @@ isdn_net_dial(void)
} }
} }
restore_flags(flags); restore_flags(flags);
cmd.driver = lp->isdn_device;
cmd.command = ISDN_CMD_DIAL;
cmd.parm.setup.si1 = 7;
cmd.parm.setup.si2 = 0;
sprintf(cmd.parm.setup.eazmsn, "%s", sprintf(cmd.parm.setup.eazmsn, "%s",
isdn_map_eaz2msn(lp->msn, cmd.driver)); isdn_map_eaz2msn(lp->msn, cmd.driver));
i = isdn_dc2minor(lp->isdn_device, lp->isdn_channel); i = isdn_dc2minor(lp->isdn_device, lp->isdn_channel);
...@@ -699,8 +717,9 @@ isdn_net_dial(void) ...@@ -699,8 +717,9 @@ isdn_net_dial(void)
dev->usage[i] |= ISDN_USAGE_OUTGOING; dev->usage[i] |= ISDN_USAGE_OUTGOING;
isdn_info_update(); isdn_info_update();
} }
printk(KERN_INFO "%s: dialing %d %s...\n", lp->name, printk(KERN_INFO "%s: dialing %d %s... %s\n", lp->name,
lp->dialretry, cmd.parm.setup.phone); lp->dialretry, cmd.parm.setup.phone,
(cmd.parm.setup.si1 == 1) ? "DOV" : "");
lp->dtimer = 0; lp->dtimer = 0;
#ifdef ISDN_DEBUG_NET_DIAL #ifdef ISDN_DEBUG_NET_DIAL
printk(KERN_DEBUG "dial: d=%d c=%d\n", lp->isdn_device, printk(KERN_DEBUG "dial: d=%d c=%d\n", lp->isdn_device,
...@@ -1746,10 +1765,6 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) ...@@ -1746,10 +1765,6 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
} }
switch (type) { switch (type) {
case CISCO_TYPE_INET:
skb->protocol = htons(ETH_P_IP);
netif_rx(skb);
break;
case CISCO_TYPE_SLARP: case CISCO_TYPE_SLARP:
isdn_net_ciscohdlck_slarp_in(lp, skb); isdn_net_ciscohdlck_slarp_in(lp, skb);
goto out_free; goto out_free;
...@@ -1759,11 +1774,11 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) ...@@ -1759,11 +1774,11 @@ isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb)
"\"no cdp enable\" on cisco.\n", lp->name); "\"no cdp enable\" on cisco.\n", lp->name);
goto out_free; goto out_free;
default: default:
printk(KERN_WARNING "%s: Unknown Cisco type 0x%04x\n", /* no special cisco protocol */
lp->name, type); skb->protocol = htons(type);
goto out_free; netif_rx(skb);
return;
} }
return;
out_free: out_free:
kfree_skb(skb); kfree_skb(skb);
...@@ -2144,6 +2159,8 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -2144,6 +2159,8 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
isdn_net_phone *n; isdn_net_phone *n;
ulong flags; ulong flags;
char nr[32]; char nr[32];
char *my_eaz;
/* Search name in netdev-chain */ /* Search name in netdev-chain */
save_flags(flags); save_flags(flags);
cli(); cli();
...@@ -2162,15 +2179,17 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -2162,15 +2179,17 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
eaz = setup->eazmsn; eaz = setup->eazmsn;
if (dev->net_verbose > 1) if (dev->net_verbose > 1)
printk(KERN_INFO "isdn_net: call from %s,%d,%d -> %s\n", nr, si1, si2, eaz); printk(KERN_INFO "isdn_net: call from %s,%d,%d -> %s\n", nr, si1, si2, eaz);
/* Accept only calls with Si1 = 7 (Data-Transmission) */ /* Accept DATA and VOICE calls at this stage
if (si1 != 7) { local eaz is checked later for allowed call types */
restore_flags(flags); if ((si1 != 7) && (si1 != 1)) {
if (dev->net_verbose > 1) restore_flags(flags);
printk(KERN_INFO "isdn_net: Service-Indicator not 7, ignored\n"); if (dev->net_verbose > 1)
return 0; printk(KERN_INFO "isdn_net: Service-Indicator not 1 or 7, ignored\n");
} return 0;
n = (isdn_net_phone *) 0; }
p = dev->netdev;
n = (isdn_net_phone *) 0;
p = dev->netdev;
ematch = wret = swapped = 0; ematch = wret = swapped = 0;
#ifdef ISDN_DEBUG_NET_ICALL #ifdef ISDN_DEBUG_NET_ICALL
printk(KERN_DEBUG "n_fi: di=%d ch=%d idx=%d usg=%d\n", di, ch, idx, printk(KERN_DEBUG "n_fi: di=%d ch=%d idx=%d usg=%d\n", di, ch, idx,
...@@ -2190,8 +2209,25 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -2190,8 +2209,25 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
break; break;
} }
swapped = 0; swapped = 0;
if (!(matchret = isdn_msncmp(eaz, isdn_map_eaz2msn(lp->msn, di)))) /* check acceptable call types for DOV */
ematch = 1; my_eaz = isdn_map_eaz2msn(lp->msn, di);
if (si1 == 1) { /* it's a DOV call, check if we allow it */
if (*my_eaz == 'v' || *my_eaz == 'V' ||
*my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */
else
my_eaz = 0; /* force non match */
} else { /* it's a DATA call, check if we allow it */
if (*my_eaz == 'b' || *my_eaz == 'B')
my_eaz++; /* skip to allow a match */
}
if (my_eaz)
matchret = isdn_msncmp(eaz, my_eaz);
else
matchret = 1;
if (!matchret)
ematch = 1;
/* Remember if more numbers eventually can match */ /* Remember if more numbers eventually can match */
if (matchret > wret) if (matchret > wret)
wret = matchret; wret = matchret;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#define CISCO_ADDR_BROADCAST 0x8f #define CISCO_ADDR_BROADCAST 0x8f
#define CISCO_CTRL 0x00 #define CISCO_CTRL 0x00
#define CISCO_TYPE_CDP 0x2000 #define CISCO_TYPE_CDP 0x2000
#define CISCO_TYPE_INET 0x0800
#define CISCO_TYPE_SLARP 0x8035 #define CISCO_TYPE_SLARP 0x8035
#define CISCO_SLARP_REQUEST 0 #define CISCO_SLARP_REQUEST 0
#define CISCO_SLARP_REPLY 1 #define CISCO_SLARP_REPLY 1
...@@ -129,8 +128,12 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp) ...@@ -129,8 +128,12 @@ static __inline__ void isdn_net_rm_from_bundle(isdn_net_local *lp)
spin_lock_irqsave(&master_lp->netdev->queue_lock, flags); spin_lock_irqsave(&master_lp->netdev->queue_lock, flags);
lp->last->next = lp->next; lp->last->next = lp->next;
lp->next->last = lp->last; lp->next->last = lp->last;
if (master_lp->netdev->queue == lp) if (master_lp->netdev->queue == lp) {
master_lp->netdev->queue = lp->next; master_lp->netdev->queue = lp->next;
if (lp->next == lp) { /* last in queue */
master_lp->netdev->queue = master_lp->netdev->local;
}
}
lp->next = lp->last = lp; /* (re)set own pointers */ lp->next = lp->last = lp; /* (re)set own pointers */
spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags); spin_unlock_irqrestore(&master_lp->netdev->queue_lock, flags);
} }
......
This diff is collapsed.
...@@ -1054,6 +1054,7 @@ ...@@ -1054,6 +1054,7 @@
#define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003 #define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003
#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004 #define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004
#define PCI_DEVICE_ID_EICON_DIVA201 0xe005 #define PCI_DEVICE_ID_EICON_DIVA201 0xe005
#define PCI_DEVICE_ID_EICON_DIVA202 0xe00b
#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010 #define PCI_DEVICE_ID_EICON_MAESTRA 0xe010
#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012 #define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012
#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 #define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment