Commit 41421468 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 496084cb 0ccca8d5
...@@ -22,8 +22,9 @@ if [ "$CONFIG_NET" != "n" ]; then ...@@ -22,8 +22,9 @@ if [ "$CONFIG_NET" != "n" ]; then
tristate 'CAPI2.0 support' CONFIG_ISDN_CAPI tristate 'CAPI2.0 support' CONFIG_ISDN_CAPI
if [ "$CONFIG_ISDN_CAPI" != "n" ]; then if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
source drivers/isdn/capi/Config.in source drivers/isdn/capi/Config.in
source drivers/isdn/hardware/Config.in
fi fi
source drivers/isdn/hardware/Config.in
fi fi
fi fi
endmenu endmenu
......
...@@ -957,14 +957,14 @@ capi_release(struct inode *inode, struct file *file) ...@@ -957,14 +957,14 @@ capi_release(struct inode *inode, struct file *file)
static struct file_operations capi_fops = static struct file_operations capi_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
llseek: no_llseek, .llseek = no_llseek,
read: capi_read, .read = capi_read,
write: capi_write, .write = capi_write,
poll: capi_poll, .poll = capi_poll,
ioctl: capi_ioctl, .ioctl = capi_ioctl,
open: capi_open, .open = capi_open,
release: capi_release, .release = capi_release,
}; };
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
......
...@@ -72,16 +72,16 @@ static int capifs_revalidate(struct dentry *, int); ...@@ -72,16 +72,16 @@ static int capifs_revalidate(struct dentry *, int);
static struct inode *capifs_new_inode(struct super_block *sb); static struct inode *capifs_new_inode(struct super_block *sb);
static struct file_operations capifs_root_operations = { static struct file_operations capifs_root_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: capifs_root_readdir, .readdir = capifs_root_readdir,
}; };
struct inode_operations capifs_root_inode_operations = { struct inode_operations capifs_root_inode_operations = {
lookup: capifs_root_lookup, .lookup = capifs_root_lookup,
}; };
static struct dentry_operations capifs_dentry_operations = { static struct dentry_operations capifs_dentry_operations = {
d_revalidate: capifs_revalidate, .d_revalidate = capifs_revalidate,
}; };
/* /*
...@@ -222,8 +222,8 @@ static void capifs_put_super(struct super_block *sb) ...@@ -222,8 +222,8 @@ static void capifs_put_super(struct super_block *sb)
} }
static struct super_operations capifs_sops = { static struct super_operations capifs_sops = {
put_super: capifs_put_super, .put_super = capifs_put_super,
statfs: simple_statfs, .statfs = simple_statfs,
}; };
static int capifs_parse_options(char *options, struct capifs_sb_info *sbi) static int capifs_parse_options(char *options, struct capifs_sb_info *sbi)
...@@ -371,10 +371,10 @@ static struct super_block *capifs_get_sb(struct file_system_type *fs_type, ...@@ -371,10 +371,10 @@ static struct super_block *capifs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type capifs_fs_type = { static struct file_system_type capifs_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "capifs", .name = "capifs",
get_sb: capifs_get_sb, .get_sb = capifs_get_sb,
kill_sb: kill_anon_super, .kill_sb = kill_anon_super,
}; };
void capifs_new_ncci(char type, unsigned int num, kdev_t device) void capifs_new_ncci(char type, unsigned int num, kdev_t device)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <linux/isdn/capilli.h> #include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \ #define DBG(format, arg...) do { \
printk(KERN_DEBUG __FUNCTION__ ": " format "\n" , ## arg); \ printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0) } while (0)
struct capilib_msgidqueue { struct capilib_msgidqueue {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/isdn/capilli.h> #include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \ #define DBG(format, arg...) do { \
printk(KERN_INFO __FUNCTION__ ": " format "\n" , ## arg); \ printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0) } while (0)
......
...@@ -90,17 +90,17 @@ static int contrstats_show(struct seq_file *seq, void *v) ...@@ -90,17 +90,17 @@ static int contrstats_show(struct seq_file *seq, void *v)
} }
struct seq_operations seq_controller_ops = { struct seq_operations seq_controller_ops = {
start: controller_start, .start = controller_start,
next: controller_next, .next = controller_next,
stop: controller_stop, .stop = controller_stop,
show: controller_show, .show = controller_show,
}; };
struct seq_operations seq_contrstats_ops = { struct seq_operations seq_contrstats_ops = {
start: controller_start, .start = controller_start,
next: controller_next, .next = controller_next,
stop: controller_stop, .stop = controller_stop,
show: contrstats_show, .show = contrstats_show,
}; };
static int seq_controller_open(struct inode *inode, struct file *file) static int seq_controller_open(struct inode *inode, struct file *file)
...@@ -114,17 +114,17 @@ static int seq_contrstats_open(struct inode *inode, struct file *file) ...@@ -114,17 +114,17 @@ static int seq_contrstats_open(struct inode *inode, struct file *file)
} }
static struct file_operations proc_controller_ops = { static struct file_operations proc_controller_ops = {
open: seq_controller_open, .open = seq_controller_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
static struct file_operations proc_contrstats_ops = { static struct file_operations proc_contrstats_ops = {
open: seq_contrstats_open, .open = seq_contrstats_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
// /proc/capi/applications: // /proc/capi/applications:
...@@ -193,17 +193,17 @@ applstats_show(struct seq_file *seq, void *v) ...@@ -193,17 +193,17 @@ applstats_show(struct seq_file *seq, void *v)
} }
struct seq_operations seq_applications_ops = { struct seq_operations seq_applications_ops = {
start: applications_start, .start = applications_start,
next: applications_next, .next = applications_next,
stop: applications_stop, .stop = applications_stop,
show: applications_show, .show = applications_show,
}; };
struct seq_operations seq_applstats_ops = { struct seq_operations seq_applstats_ops = {
start: applications_start, .start = applications_start,
next: applications_next, .next = applications_next,
stop: applications_stop, .stop = applications_stop,
show: applstats_show, .show = applstats_show,
}; };
static int static int
...@@ -219,17 +219,17 @@ seq_applstats_open(struct inode *inode, struct file *file) ...@@ -219,17 +219,17 @@ seq_applstats_open(struct inode *inode, struct file *file)
} }
static struct file_operations proc_applications_ops = { static struct file_operations proc_applications_ops = {
open: seq_applications_open, .open = seq_applications_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
static struct file_operations proc_applstats_ops = { static struct file_operations proc_applstats_ops = {
open: seq_applstats_open, .open = seq_applstats_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
static void static void
......
...@@ -261,14 +261,14 @@ isdn_divert_ioctl(struct inode *inode, struct file *file, ...@@ -261,14 +261,14 @@ isdn_divert_ioctl(struct inode *inode, struct file *file,
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
static struct file_operations isdn_fops = static struct file_operations isdn_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
llseek: no_llseek, .llseek = no_llseek,
read: isdn_divert_read, .read = isdn_divert_read,
write: isdn_divert_write, .write = isdn_divert_write,
poll: isdn_divert_poll, .poll = isdn_divert_poll,
ioctl: isdn_divert_ioctl, .ioctl = isdn_divert_ioctl,
open: isdn_divert_open, .open = isdn_divert_open,
release: isdn_divert_close, .release = isdn_divert_close,
}; };
/****************************/ /****************************/
......
...@@ -2,4 +2,26 @@ ...@@ -2,4 +2,26 @@
# ISDN hardware drivers # ISDN hardware drivers
# #
source drivers/isdn/hardware/avm/Config.in if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
comment 'CAPI hardware drivers'
source drivers/isdn/hardware/avm/Config.in
fi
if [ "$CONFIG_ISDN" != "n" ]; then
comment 'ISDN4Linux hardware drivers'
source drivers/isdn/hisax/Config.in
mainmenu_option next_comment
comment 'Active cards'
source drivers/isdn/icn/Config.in
source drivers/isdn/pcbit/Config.in
source drivers/isdn/sc/Config.in
source drivers/isdn/act2000/Config.in
source drivers/isdn/eicon/Config.in
source drivers/isdn/tpam/Config.in
source drivers/isdn/hysdn/Config.in
endmenu
fi
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
mainmenu_option next_comment mainmenu_option next_comment
comment 'Drivers for active AVM cards' comment 'Active AVM cards'
bool 'Support AVM cards' CONFIG_CAPI_AVM bool 'Support AVM cards' CONFIG_CAPI_AVM
......
...@@ -352,10 +352,10 @@ static void __devexit b1pci_pci_remove(struct pci_dev *pdev) ...@@ -352,10 +352,10 @@ static void __devexit b1pci_pci_remove(struct pci_dev *pdev)
} }
static struct pci_driver b1pci_pci_driver = { static struct pci_driver b1pci_pci_driver = {
name: "b1pci", .name = "b1pci",
id_table: b1pci_pci_tbl, .id_table = b1pci_pci_tbl,
probe: b1pci_pci_probe, .probe = b1pci_pci_probe,
remove: __devexit_p(b1pci_pci_remove), .remove = __devexit_p(b1pci_pci_remove),
}; };
static int __init b1pci_init(void) static int __init b1pci_init(void)
......
...@@ -1232,10 +1232,10 @@ static int __devinit c4_probe(struct pci_dev *dev, ...@@ -1232,10 +1232,10 @@ static int __devinit c4_probe(struct pci_dev *dev,
} }
static struct pci_driver c4_pci_driver = { static struct pci_driver c4_pci_driver = {
name: "c4", .name = "c4",
id_table: c4_pci_tbl, .id_table = c4_pci_tbl,
probe: c4_probe, .probe = c4_probe,
remove: c4_remove, .remove = c4_remove,
}; };
static int __init c4_init(void) static int __init c4_init(void)
......
...@@ -215,10 +215,10 @@ static int __devinit t1pci_probe(struct pci_dev *dev, ...@@ -215,10 +215,10 @@ static int __devinit t1pci_probe(struct pci_dev *dev,
} }
static struct pci_driver t1pci_pci_driver = { static struct pci_driver t1pci_pci_driver = {
name: "t1pci", .name = "t1pci",
id_table: t1pci_pci_tbl, .id_table = t1pci_pci_tbl,
probe: t1pci_probe, .probe = t1pci_probe,
remove: t1pci_remove, .remove = t1pci_remove,
}; };
static int __init t1pci_init(void) static int __init t1pci_init(void)
......
mainmenu_option next_comment mainmenu_option next_comment
comment 'Passive ISDN cards' comment 'Passive cards'
dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
comment ' D-channel protocol features' comment ' D-channel protocol features'
......
...@@ -1919,6 +1919,8 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg) ...@@ -1919,6 +1919,8 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg)
break; break;
case PH_DEACTIVATE | INDICATION: case PH_DEACTIVATE | INDICATION:
L1L2(st, pr, NULL); L1L2(st, pr, NULL);
clear_bit(BC_FLG_BUSY, &bcs->Flag);
skb_queue_purge(&bcs->squeue);
bcs->hw.b_if = NULL; bcs->hw.b_if = NULL;
break; break;
case PH_DATA | INDICATION: case PH_DATA | INDICATION:
...@@ -2006,6 +2008,9 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg) ...@@ -2006,6 +2008,9 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
else else
set_bit(FLG_L1_PULL_REQ, &st->l1.Flags); set_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
break; break;
case PH_DEACTIVATE | REQUEST:
test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
skb_queue_purge(&bcs->squeue);
default: default:
B_L2L1(b_if, pr, arg); B_L2L1(b_if, pr, arg);
break; break;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define DBG(level, format, arg...) do { \ #define DBG(level, format, arg...) do { \
if (level & __debug_variable) \ if (level & __debug_variable) \
printk(KERN_DEBUG __FUNCTION__ ": " format "\n" , ## arg); \ printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0) } while (0)
#define DBG_PACKET(level,data,count) \ #define DBG_PACKET(level,data,count) \
......
...@@ -944,17 +944,17 @@ static void __devexit fcpnp_remove(struct pci_dev *pdev) ...@@ -944,17 +944,17 @@ static void __devexit fcpnp_remove(struct pci_dev *pdev)
} }
static struct pci_driver fcpci_driver = { static struct pci_driver fcpci_driver = {
name: "fcpci", .name = "fcpci",
probe: fcpci_probe, .probe = fcpci_probe,
remove: __devexit_p(fcpci_remove), .remove = __devexit_p(fcpci_remove),
id_table: fcpci_ids, .id_table = fcpci_ids,
}; };
static struct isapnp_driver fcpnp_driver = { static struct isapnp_driver fcpnp_driver = {
name: "fcpnp", .name = "fcpnp",
probe: fcpnp_probe, .probe = fcpnp_probe,
remove: __devexit_p(fcpnp_remove), .remove = __devexit_p(fcpnp_remove),
id_table: fcpnp_ids, .id_table = fcpnp_ids,
}; };
static int __init hisax_fcpcipnp_init(void) static int __init hisax_fcpcipnp_init(void)
......
...@@ -40,12 +40,12 @@ MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Werner Cornelius <we ...@@ -40,12 +40,12 @@ MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Werner Cornelius <we
MODULE_DESCRIPTION("HFC PCI ISDN driver"); MODULE_DESCRIPTION("HFC PCI ISDN driver");
#define ID(ven, dev, name) \ #define ID(ven, dev, name) \
{ vendor: PCI_VENDOR_ID_##ven, \ { .vendor = PCI_VENDOR_ID_##ven, \
device: PCI_DEVICE_ID_##dev, \ .device = PCI_DEVICE_ID_##dev, \
subvendor: PCI_ANY_ID, \ .subvendor = PCI_ANY_ID, \
subdevice: PCI_ANY_ID, \ .subdevice = PCI_ANY_ID, \
class: 0, \ .class = 0, \
class_mask: 0, \ .class_mask = 0, \
driver_data: (unsigned long) name } driver_data: (unsigned long) name }
static struct pci_device_id hfcpci_ids[] __devinitdata = { static struct pci_device_id hfcpci_ids[] __devinitdata = {
...@@ -1604,10 +1604,10 @@ static void __devexit hfcpci_remove(struct pci_dev *pdev) ...@@ -1604,10 +1604,10 @@ static void __devexit hfcpci_remove(struct pci_dev *pdev)
} }
static struct pci_driver hfcpci_driver = { static struct pci_driver hfcpci_driver = {
name: "hfcpci", .name = "hfcpci",
probe: hfcpci_probe, .probe = hfcpci_probe,
remove: hfcpci_remove, .remove = hfcpci_remove,
id_table: hfcpci_ids, .id_table = hfcpci_ids,
}; };
static int __init hisax_hfcpci_init(void) static int __init hisax_hfcpci_init(void)
......
...@@ -66,9 +66,6 @@ ph_command(struct IsdnCardState *cs, unsigned int command) ...@@ -66,9 +66,6 @@ ph_command(struct IsdnCardState *cs, unsigned int command)
if (cs->debug &L1_DEB_ISAC) if (cs->debug &L1_DEB_ISAC)
debugl1(cs, "ph_command (%#x) in (%#x)", command, debugl1(cs, "ph_command (%#x) in (%#x)", command,
cs->dc.isac.ph_state); cs->dc.isac.ph_state);
//###################################
// printk(KERN_INFO "ph_command (%#x)\n", command);
//###################################
cs->writeisac(cs, IPACX_CIX0, (command << 4) | 0x0E); cs->writeisac(cs, IPACX_CIX0, (command << 4) | 0x0E);
} }
...@@ -82,9 +79,6 @@ cic_int(struct IsdnCardState *cs) ...@@ -82,9 +79,6 @@ cic_int(struct IsdnCardState *cs)
event = cs->readisac(cs, IPACX_CIR0) >> 4; event = cs->readisac(cs, IPACX_CIR0) >> 4;
if (cs->debug &L1_DEB_ISAC) debugl1(cs, "cic_int(event=%#x)", event); if (cs->debug &L1_DEB_ISAC) debugl1(cs, "cic_int(event=%#x)", event);
//#########################################
// printk(KERN_INFO "cic_int(%x)\n", event);
//#########################################
cs->dc.isac.ph_state = event; cs->dc.isac.ph_state = event;
dch_sched_event(cs, D_L1STATECHANGE); dch_sched_event(cs, D_L1STATECHANGE);
} }
...@@ -417,9 +411,6 @@ dch_int(struct IsdnCardState *cs) ...@@ -417,9 +411,6 @@ dch_int(struct IsdnCardState *cs)
int count; int count;
istad = cs->readisac(cs, IPACX_ISTAD); istad = cs->readisac(cs, IPACX_ISTAD);
//##############################################
// printk(KERN_WARNING "dch_int(istad=%02x)\n", istad);
//##############################################
if (istad &0x80) { // RME if (istad &0x80) { // RME
rstad = cs->readisac(cs, IPACX_RSTAD); rstad = cs->readisac(cs, IPACX_RSTAD);
...@@ -714,9 +705,6 @@ bch_int(struct IsdnCardState *cs, u_char hscx) ...@@ -714,9 +705,6 @@ bch_int(struct IsdnCardState *cs, u_char hscx)
bcs = cs->bcs + hscx; bcs = cs->bcs + hscx;
istab = cs->BC_Read_Reg(cs, hscx, IPACX_ISTAB); istab = cs->BC_Read_Reg(cs, hscx, IPACX_ISTAB);
//##############################################
// printk(KERN_WARNING "bch_int(istab=%02x)\n", istab);
//##############################################
if (!test_bit(BC_FLG_INIT, &bcs->Flag)) return; if (!test_bit(BC_FLG_INIT, &bcs->Flag)) return;
if (istab &0x80) { // RME if (istab &0x80) { // RME
...@@ -963,15 +951,11 @@ interrupt_ipacx(struct IsdnCardState *cs) ...@@ -963,15 +951,11 @@ interrupt_ipacx(struct IsdnCardState *cs)
u_char ista; u_char ista;
while ((ista = cs->readisac(cs, IPACX_ISTA))) { while ((ista = cs->readisac(cs, IPACX_ISTA))) {
//################################################# if (ista &0x80) bch_int(cs, 0); // B channel interrupts
// printk(KERN_WARNING "interrupt_ipacx(ista=%02x)\n", ista); if (ista &0x40) bch_int(cs, 1);
//################################################# if (ista &0x01) dch_int(cs); // D channel
if (ista &0x80) bch_int(cs, 0); // B channel interrupts if (ista &0x10) cic_int(cs); // Layer 1 state
if (ista &0x40) bch_int(cs, 1); }
if (ista &0x01) dch_int(cs); // D channel
if (ista &0x10) cic_int(cs); // Layer 1 state
}
} }
//---------------------------------------------------------- //----------------------------------------------------------
...@@ -1003,9 +987,6 @@ void __init ...@@ -1003,9 +987,6 @@ void __init
init_ipacx(struct IsdnCardState *cs, int part) init_ipacx(struct IsdnCardState *cs, int part)
{ {
if (part &1) { // initialise chip if (part &1) { // initialise chip
//##################################################
// printk(KERN_INFO "init_ipacx(%x)\n", part);
//##################################################
clear_pending_ints(cs); clear_pending_ints(cs);
bch_init(cs, 0); bch_init(cs, 0);
bch_init(cs, 1); bch_init(cs, 1);
......
...@@ -219,13 +219,13 @@ enum { ...@@ -219,13 +219,13 @@ enum {
#define L1_EVENT_COUNT (EV_TIMER3 + 1) #define L1_EVENT_COUNT (EV_TIMER3 + 1)
#define ERR(format, arg...) \ #define ERR(format, arg...) \
printk(KERN_ERR __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg) printk(KERN_ERR __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
#define WARN(format, arg...) \ #define WARN(format, arg...) \
printk(KERN_WARNING __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg) printk(KERN_WARNING __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
#define INFO(format, arg...) \ #define INFO(format, arg...) \
printk(KERN_INFO __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg) printk(KERN_INFO __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## arg)
#include "st5481_hdlc.h" #include "st5481_hdlc.h"
#include "fsm.h" #include "fsm.h"
......
...@@ -176,10 +176,10 @@ static struct usb_device_id st5481_ids[] = { ...@@ -176,10 +176,10 @@ static struct usb_device_id st5481_ids[] = {
MODULE_DEVICE_TABLE (usb, st5481_ids); MODULE_DEVICE_TABLE (usb, st5481_ids);
static struct usb_driver st5481_usb_driver = { static struct usb_driver st5481_usb_driver = {
name: "st5481_usb", .name = "st5481_usb",
probe: probe_st5481, .probe = probe_st5481,
disconnect: __devexit_p(disconnect_st5481), .disconnect = __devexit_p(disconnect_st5481),
id_table: st5481_ids, .id_table = st5481_ids,
}; };
static int __init st5481_usb_init(void) static int __init st5481_usb_init(void)
......
...@@ -377,11 +377,11 @@ hysdn_conf_close(struct inode *ino, struct file *filep) ...@@ -377,11 +377,11 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
/******************************************************/ /******************************************************/
static struct file_operations conf_fops = static struct file_operations conf_fops =
{ {
llseek: no_llseek, .llseek = no_llseek,
read: hysdn_conf_read, .read = hysdn_conf_read,
write: hysdn_conf_write, .write = hysdn_conf_write,
open: hysdn_conf_open, .open = hysdn_conf_open,
release: hysdn_conf_close, .release = hysdn_conf_close,
}; };
/*****************************/ /*****************************/
......
...@@ -389,12 +389,12 @@ hysdn_log_poll(struct file *file, poll_table * wait) ...@@ -389,12 +389,12 @@ hysdn_log_poll(struct file *file, poll_table * wait)
/**************************************************/ /**************************************************/
static struct file_operations log_fops = static struct file_operations log_fops =
{ {
llseek: no_llseek, .llseek = no_llseek,
read: hysdn_log_read, .read = hysdn_log_read,
write: hysdn_log_write, .write = hysdn_log_write,
poll: hysdn_log_poll, .poll = hysdn_log_poll,
open: hysdn_log_open, .open = hysdn_log_open,
release: hysdn_log_close, .release = hysdn_log_close,
}; };
......
...@@ -24,22 +24,3 @@ comment 'ISDN feature submodules' ...@@ -24,22 +24,3 @@ comment 'ISDN feature submodules'
dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN
endmenu endmenu
comment 'low-level hardware drivers'
source drivers/isdn/hisax/Config.in
### Active ISDN cards
mainmenu_option next_comment
comment 'Active ISDN cards'
source drivers/isdn/icn/Config.in
source drivers/isdn/pcbit/Config.in
source drivers/isdn/sc/Config.in
source drivers/isdn/act2000/Config.in
source drivers/isdn/eicon/Config.in
source drivers/isdn/tpam/Config.in
source drivers/isdn/hysdn/Config.in
endmenu
/* $Id: isdn_audio.c,v 1.21.6.2 2001/09/23 22:24:31 kai Exp $ /* $Id: isdn_audio.c,v 1.21.6.3 2002/08/13 09:45:33 keil Exp $
* *
* Linux ISDN subsystem, audio conversion and compression (linklevel). * Linux ISDN subsystem, audio conversion and compression (linklevel).
* *
* Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de) * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
* DTMF code (c) 1996 by Christian Mock (cm@kukuruz.ping.at) * DTMF code (c) 1996 by Christian Mock (cm@tahina.priv.at)
* Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de) * Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de)
* *
* This software may be used and distributed according to the terms * This software may be used and distributed according to the terms
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "isdn_audio.h" #include "isdn_audio.h"
#include "isdn_common.h" #include "isdn_common.h"
char *isdn_audio_revision = "$Revision: 1.21.6.2 $"; char *isdn_audio_revision = "$Revision: 1.21.6.3 $";
/* /*
* Misc. lookup-tables. * Misc. lookup-tables.
......
...@@ -1090,14 +1090,14 @@ isdn_status_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) ...@@ -1090,14 +1090,14 @@ isdn_status_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
static struct file_operations isdn_status_fops = static struct file_operations isdn_status_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
llseek: no_llseek, .llseek = no_llseek,
read: isdn_status_read, .read = isdn_status_read,
write: isdn_status_write, .write = isdn_status_write,
poll: isdn_status_poll, .poll = isdn_status_poll,
ioctl: isdn_status_ioctl, .ioctl = isdn_status_ioctl,
open: isdn_status_open, .open = isdn_status_open,
release: isdn_status_release, .release = isdn_status_release,
}; };
/* /*
...@@ -1609,14 +1609,14 @@ isdn_ctrl_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg) ...@@ -1609,14 +1609,14 @@ isdn_ctrl_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
static struct file_operations isdn_ctrl_fops = static struct file_operations isdn_ctrl_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
llseek: no_llseek, .llseek = no_llseek,
read: isdn_ctrl_read, .read = isdn_ctrl_read,
write: isdn_ctrl_write, .write = isdn_ctrl_write,
poll: isdn_ctrl_poll, .poll = isdn_ctrl_poll,
ioctl: isdn_ctrl_ioctl, .ioctl = isdn_ctrl_ioctl,
open: isdn_ctrl_open, .open = isdn_ctrl_open,
release: isdn_ctrl_release, .release = isdn_ctrl_release,
}; };
/* /*
...@@ -1661,8 +1661,8 @@ isdn_open(struct inode * inode, struct file * file) ...@@ -1661,8 +1661,8 @@ isdn_open(struct inode * inode, struct file * file)
static struct file_operations isdn_fops = static struct file_operations isdn_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
open: isdn_open, .open = isdn_open,
}; };
char * char *
......
...@@ -48,6 +48,12 @@ enum { ...@@ -48,6 +48,12 @@ enum {
ST_WAIT_BEFORE_CB, ST_WAIT_BEFORE_CB,
}; };
enum {
ST_CHARGE_NULL,
ST_CHARGE_GOT_CINF, /* got a first charge info */
ST_CHARGE_HAVE_CINT, /* got a second chare info and thus the timing */
};
/* keep clear of ISDN_CMD_* and ISDN_STAT_* */ /* keep clear of ISDN_CMD_* and ISDN_STAT_* */
enum { enum {
EV_NET_DIAL = 0x200, EV_NET_DIAL = 0x200,
...@@ -349,12 +355,7 @@ isdn_net_unbind_channel(isdn_net_local * lp) ...@@ -349,12 +355,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
* outgoing packet), if counter exceeds configured limit either do a * outgoing packet), if counter exceeds configured limit either do a
* hangup immediately or - if configured - wait until just before the next * hangup immediately or - if configured - wait until just before the next
* charge-info. * charge-info.
*
* cps-calculation (needed for dynamic channel-bundling):
* Since this function is called every second, simply reset the
* byte-counter of the interface after copying it to the cps-variable.
*/ */
unsigned long last_jiffies = -HZ;
void void
isdn_net_autohup() isdn_net_autohup()
...@@ -366,59 +367,54 @@ isdn_net_autohup() ...@@ -366,59 +367,54 @@ isdn_net_autohup()
list_for_each(l, &isdn_net_devs) { list_for_each(l, &isdn_net_devs) {
isdn_net_dev *p = list_entry(l, isdn_net_dev, global_list); isdn_net_dev *p = list_entry(l, isdn_net_dev, global_list);
isdn_net_local *l = &p->local; isdn_net_local *l = &p->local;
if (jiffies == last_jiffies)
l->cps = l->transcount; if (!(l->flags & ISDN_NET_CONNECTED) || l->dialstate != ST_ACTIVE)
else continue;
l->cps = (l->transcount * HZ) / (jiffies - last_jiffies);
l->transcount = 0; if(dev->global_flags & ISDN_GLOBAL_STOPPED ||
if (dev->net_verbose > 3) ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF) {
printk(KERN_DEBUG "%s: %d bogocps\n", l->name, l->cps); isdn_net_hangup(&p->dev);
if ((l->flags & ISDN_NET_CONNECTED) && (l->dialstate == ST_ACTIVE)) { continue;
}
dbg_net_dial("%s: huptimer %d, onhtime %d, chargetime %ld, chargeint %d\n",
l->name, l->huptimer, l->onhtime, l->chargetime, l->chargeint);
if (!(l->onhtime))
continue;
if (l->huptimer++ <= l->onhtime) {
anymore = 1; anymore = 1;
l->huptimer++; continue;
printk("huptimer %d, onhtime %d, chargetime %d, chargeint %d\n", l->huptimer, l->onhtime, l->chargetime, l->chargeint); }
/* if (l->hupflags & ISDN_MANCHARGE && l->hupflags & ISDN_CHARGEHUP) {
* if there is some dialmode where timeout-hangup while (time_after(jiffies, l->chargetime + l->chargeint))
* should _not_ be done, check for that here l->chargetime += l->chargeint;
*/
if ((l->onhtime) && if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ)) {
(l->huptimer > l->onhtime)) if (l->outgoing || l->hupflags & ISDN_INHUP) {
{
if (l->hupflags & ISDN_MANCHARGE &&
l->hupflags & ISDN_CHARGEHUP) {
while (time_after(jiffies, l->chargetime + l->chargeint))
l->chargetime += l->chargeint;
if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ))
if (l->outgoing || l->hupflags & ISDN_INHUP) {
HERE;
isdn_net_hangup(&p->dev);
}
} else if (l->outgoing) {
if (l->hupflags & ISDN_CHARGEHUP) {
if (l->hupflags & ISDN_WAITCHARGE) {
printk(KERN_DEBUG "isdn_net: Hupflags of %s are %X\n",
l->name, l->hupflags);
isdn_net_hangup(&p->dev);
} else if (time_after(jiffies, l->chargetime + l->chargeint)) {
printk(KERN_DEBUG
"isdn_net: %s: chtime = %lu, chint = %d\n",
l->name, l->chargetime, l->chargeint);
isdn_net_hangup(&p->dev);
}
}
} else if (l->hupflags & ISDN_INHUP) {
HERE;
isdn_net_hangup(&p->dev); isdn_net_hangup(&p->dev);
continue;
} }
} }
} else if (l->outgoing) {
if(dev->global_flags & ISDN_GLOBAL_STOPPED || (ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF)) { if (l->hupflags & ISDN_CHARGEHUP) {
isdn_net_hangup(&p->dev); if (l->charge_state != ST_CHARGE_HAVE_CINT) {
break; dbg_net_dial("%s: did not get CINT\n", l->name);
isdn_net_hangup(&p->dev);
continue;
} else if (time_after(jiffies, l->chargetime + l->chargeint)) {
dbg_net_dial("%s: chtime = %lu, chint = %d\n",
l->name, l->chargetime, l->chargeint);
isdn_net_hangup(&p->dev);
continue;
}
} }
} else if (l->hupflags & ISDN_INHUP) {
isdn_net_hangup(&p->dev);
continue;
} }
anymore = 1;
} }
last_jiffies = jiffies;
isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, anymore); isdn_timer_ctrl(ISDN_TIMER_NETHANGUP, anymore);
} }
...@@ -453,6 +449,10 @@ static void isdn_net_connected(isdn_net_local *lp) ...@@ -453,6 +449,10 @@ static void isdn_net_connected(isdn_net_local *lp)
lp->dialstarted = 0; lp->dialstarted = 0;
lp->dialwait_timer = 0; lp->dialwait_timer = 0;
lp->transcount = 0;
lp->cps = 0;
lp->last_jiffies = jiffies;
#ifdef CONFIG_ISDN_PPP #ifdef CONFIG_ISDN_PPP
if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP)
isdn_ppp_wakeup_daemon(lp); isdn_ppp_wakeup_daemon(lp);
...@@ -499,7 +499,7 @@ isdn_net_dial_timer(unsigned long data) ...@@ -499,7 +499,7 @@ isdn_net_dial_timer(unsigned long data)
isdn_BUG(); isdn_BUG();
return; return;
} }
printk("%s: %s %#x\n", __FUNCTION__, lp->name, lp->dial_event); printk("%s: %s %#x\n", __FUNCTION__ , lp->name, lp->dial_event);
isdn_net_handle_event(lp, lp->dial_event, NULL); isdn_net_handle_event(lp, lp->dial_event, NULL);
} }
...@@ -608,13 +608,11 @@ do_dialout(isdn_net_local *lp) ...@@ -608,13 +608,11 @@ do_dialout(isdn_net_local *lp)
} }
lp->huptimer = 0; lp->huptimer = 0;
lp->outgoing = 1; lp->outgoing = 1;
if (lp->chargeint) { if (lp->chargeint)
lp->hupflags |= ISDN_HAVECHARGE; lp->charge_state = ST_CHARGE_HAVE_CINT;
lp->hupflags &= ~ISDN_WAITCHARGE; else
} else { lp->charge_state = ST_CHARGE_NULL;
lp->hupflags |= ISDN_WAITCHARGE;
lp->hupflags &= ~ISDN_HAVECHARGE;
}
if (lp->cbdelay && (lp->flags & ISDN_NET_CBOUT)) { if (lp->cbdelay && (lp->flags & ISDN_NET_CBOUT)) {
lp->dial_timer.expires = jiffies + lp->cbdelay; lp->dial_timer.expires = jiffies + lp->cbdelay;
lp->dial_event = EV_NET_TIMER_CB; lp->dial_event = EV_NET_TIMER_CB;
...@@ -701,15 +699,19 @@ isdn_net_handle_event(isdn_net_local *lp, int pr, void *arg) ...@@ -701,15 +699,19 @@ isdn_net_handle_event(isdn_net_local *lp, int pr, void *arg)
* usage by isdn_net_autohup() * usage by isdn_net_autohup()
*/ */
lp->charge++; lp->charge++;
if (lp->hupflags & ISDN_HAVECHARGE) { switch (lp->charge_state) {
lp->hupflags &= ~ISDN_WAITCHARGE; case ST_CHARGE_NULL:
lp->chargeint = jiffies - lp->chargetime - (2 * HZ); lp->charge_state = ST_CHARGE_GOT_CINF;
break;
case ST_CHARGE_GOT_CINF:
lp->charge_state = ST_CHARGE_HAVE_CINT;
/* fall through */
case ST_CHARGE_HAVE_CINT:
lp->chargeint = jiffies - lp->chargetime - 2 * HZ;
break;
} }
if (lp->hupflags & ISDN_WAITCHARGE)
lp->hupflags |= ISDN_HAVECHARGE;
lp->chargetime = jiffies; lp->chargetime = jiffies;
printk(KERN_DEBUG "isdn_net: Got CINF chargetime of %s now %lu\n", dbg_net_dial("%s: got CINF\n", lp->name);
lp->name, lp->chargetime);
return 1; return 1;
} }
break; break;
...@@ -1054,7 +1056,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb) ...@@ -1054,7 +1056,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
int retv = 0; int retv = 0;
if (((isdn_net_local *) (ndev->priv))->master) { if (((isdn_net_local *) (ndev->priv))->master) {
printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__); isdn_BUG();
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return 0;
} }
...@@ -1083,6 +1085,14 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb) ...@@ -1083,6 +1085,14 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
* should move to userspace and get based on an overall cps * should move to userspace and get based on an overall cps
* calculation * calculation
*/ */
if (jiffies != lp->last_jiffies) {
lp->cps = lp->transcount * HZ / (jiffies - lp->last_jiffies);
lp->last_jiffies = jiffies;
lp->transcount = 0;
}
if (dev->net_verbose > 3)
printk(KERN_DEBUG "%s: %d bogocps\n", lp->name, lp->cps);
if (lp->cps > lp->triggercps) { if (lp->cps > lp->triggercps) {
if (lp->slave) { if (lp->slave) {
if (!lp->sqfull) { if (!lp->sqfull) {
...@@ -2381,8 +2391,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) ...@@ -2381,8 +2391,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
lp->outgoing = 0; lp->outgoing = 0;
lp->huptimer = 0; lp->huptimer = 0;
lp->hupflags |= ISDN_WAITCHARGE; lp->charge_state = ST_CHARGE_NULL;
lp->hupflags &= ~ISDN_HAVECHARGE;
/* Got incoming Call, setup L2 and L3 protocols, /* Got incoming Call, setup L2 and L3 protocols,
* then wait for D-Channel-connect * then wait for D-Channel-connect
*/ */
...@@ -2837,8 +2846,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) ...@@ -2837,8 +2846,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
else else
lp->hupflags &= ~ISDN_INHUP; lp->hupflags &= ~ISDN_INHUP;
if (cfg->chargeint > 10) { if (cfg->chargeint > 10) {
lp->hupflags |= ISDN_HAVECHARGE | ISDN_MANCHARGE;
lp->chargeint = cfg->chargeint * HZ; lp->chargeint = cfg->chargeint * HZ;
lp->charge_state = ST_CHARGE_HAVE_CINT;
lp->hupflags |= ISDN_MANCHARGE;
} }
if (cfg->p_encap != lp->p_encap) { if (cfg->p_encap != lp->p_encap) {
if (cfg->p_encap == ISDN_NET_ENCAP_RAWIP) { if (cfg->p_encap == ISDN_NET_ENCAP_RAWIP) {
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
*/ */
/* Definitions for hupflags: */ /* Definitions for hupflags: */
#define ISDN_WAITCHARGE 1 /* did not get a charge info yet */
#define ISDN_HAVECHARGE 2 /* We know a charge info */
#define ISDN_CHARGEHUP 4 /* We want to use the charge mechanism */ #define ISDN_CHARGEHUP 4 /* We want to use the charge mechanism */
#define ISDN_INHUP 8 /* Even if incoming, close after huptimeout */ #define ISDN_INHUP 8 /* Even if incoming, close after huptimeout */
#define ISDN_MANCHARGE 16 /* Charge Interval manually set */ #define ISDN_MANCHARGE 16 /* Charge Interval manually set */
......
...@@ -852,14 +852,14 @@ isdn_ppp_write(struct file *file, const char *buf, size_t count, loff_t *off) ...@@ -852,14 +852,14 @@ isdn_ppp_write(struct file *file, const char *buf, size_t count, loff_t *off)
struct file_operations isdn_ppp_fops = struct file_operations isdn_ppp_fops =
{ {
owner: THIS_MODULE, .owner = THIS_MODULE,
llseek: no_llseek, .llseek = no_llseek,
read: isdn_ppp_read, .read = isdn_ppp_read,
write: isdn_ppp_write, .write = isdn_ppp_write,
poll: isdn_ppp_poll, .poll = isdn_ppp_poll,
ioctl: isdn_ppp_ioctl, .ioctl = isdn_ppp_ioctl,
open: isdn_ppp_open, .open = isdn_ppp_open,
release: isdn_ppp_release, .release = isdn_ppp_release,
}; };
/* /*
......
...@@ -251,10 +251,10 @@ static struct pci_device_id tpam_pci_tbl[] __devinitdata = { ...@@ -251,10 +251,10 @@ static struct pci_device_id tpam_pci_tbl[] __devinitdata = {
MODULE_DEVICE_TABLE(pci, tpam_pci_tbl); MODULE_DEVICE_TABLE(pci, tpam_pci_tbl);
static struct pci_driver tpam_driver = { static struct pci_driver tpam_driver = {
name: "tpam", .name = "tpam",
id_table: tpam_pci_tbl, .id_table = tpam_pci_tbl,
probe: tpam_probe, .probe = tpam_probe,
remove: __devexit_p(tpam_remove), .remove = __devexit_p(tpam_remove),
}; };
static int __init tpam_init(void) { static int __init tpam_init(void) {
......
...@@ -317,6 +317,7 @@ typedef struct isdn_net_local_s { ...@@ -317,6 +317,7 @@ typedef struct isdn_net_local_s {
/* 0 = Transparent */ /* 0 = Transparent */
int huptimer; /* Timeout-counter for auto-hangup */ int huptimer; /* Timeout-counter for auto-hangup */
int charge; /* Counter for charging units */ int charge; /* Counter for charging units */
int charge_state; /* ChargeInfo state machine */
ulong chargetime; /* Timer for Charging info */ ulong chargetime; /* Timer for Charging info */
int hupflags; /* Flags for charge-unit-hangup: */ int hupflags; /* Flags for charge-unit-hangup: */
/* bit0: chargeint is invalid */ /* bit0: chargeint is invalid */
...@@ -329,6 +330,7 @@ typedef struct isdn_net_local_s { ...@@ -329,6 +330,7 @@ typedef struct isdn_net_local_s {
int onum; /* Flag: at least 1 outgoing number */ int onum; /* Flag: at least 1 outgoing number */
int cps; /* current speed of this interface */ int cps; /* current speed of this interface */
int transcount; /* byte-counter for cps-calculation */ int transcount; /* byte-counter for cps-calculation */
int last_jiffies; /* when transcount was reset */
int sqfull; /* Flag: netdev-queue overloaded */ int sqfull; /* Flag: netdev-queue overloaded */
ulong sqfull_stamp; /* Start-Time of overload */ ulong sqfull_stamp; /* Start-Time of overload */
ulong slavedelay; /* Dynamic bundling delaytime */ ulong slavedelay; /* Dynamic bundling delaytime */
......
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