summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Grover <agrover@groveronline.com>2002-08-15 21:40:42 -0700
committerAndy Grover <agrover@acpi3.jf.intel.com>2002-08-15 21:40:42 -0700
commit19d4344e7a70a5348cd7094f39e322e9b1fe4c31 (patch)
tree0cc8121e89ccc9ebb39db30cf3460a66f49ff0d9
parent674c07190c8dc79ffc01fffa1171e31586d1b68c (diff)
parentc2480c8594056dc37b56c202433519c544d1519e (diff)
Merge groveronline.com:/root/bk/linux-2.5
into groveronline.com:/root/bk/linux-acpi
-rw-r--r--arch/i386/kernel/process.c10
-rw-r--r--drivers/isdn/Config.in3
-rw-r--r--drivers/isdn/capi/capi.c16
-rw-r--r--drivers/isdn/capi/capifs.c20
-rw-r--r--drivers/isdn/capi/capilib.c2
-rw-r--r--drivers/isdn/capi/kcapi.h2
-rw-r--r--drivers/isdn/capi/kcapi_proc.c64
-rw-r--r--drivers/isdn/divert/divert_procfs.c16
-rw-r--r--drivers/isdn/hardware/Config.in24
-rw-r--r--drivers/isdn/hardware/avm/Config.in2
-rw-r--r--drivers/isdn/hardware/avm/b1pci.c8
-rw-r--r--drivers/isdn/hardware/avm/c4.c8
-rw-r--r--drivers/isdn/hardware/avm/t1pci.c8
-rw-r--r--drivers/isdn/hisax/Config.in2
-rw-r--r--drivers/isdn/hisax/config.c5
-rw-r--r--drivers/isdn/hisax/hisax_debug.h2
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c16
-rw-r--r--drivers/isdn/hisax/hisax_hfcpci.c20
-rw-r--r--drivers/isdn/hisax/ipacx.c29
-rw-r--r--drivers/isdn/hisax/st5481.h6
-rw-r--r--drivers/isdn/hisax/st5481_init.c8
-rw-r--r--drivers/isdn/hysdn/hysdn_procconf.c10
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c12
-rw-r--r--drivers/isdn/i4l/Config.in19
-rw-r--r--drivers/isdn/i4l/isdn_audio.c6
-rw-r--r--drivers/isdn/i4l/isdn_common.c36
-rw-r--r--drivers/isdn/i4l/isdn_net.c150
-rw-r--r--drivers/isdn/i4l/isdn_net.h2
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c16
-rw-r--r--drivers/isdn/tpam/tpam_main.c8
-rw-r--r--include/linux/isdn.h2
-rw-r--r--include/linux/mm.h9
-rw-r--r--include/linux/sched.h6
-rw-r--r--init/main.c7
-rw-r--r--kernel/fork.c6
-rw-r--r--kernel/kmod.c15
-rw-r--r--kernel/sched.c3
-rw-r--r--kernel/sys.c5
-rw-r--r--mm/page_alloc.c3
-rw-r--r--mm/swap.c2
40 files changed, 303 insertions, 285 deletions
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 89fb5395b7c1..ce8e788e240c 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -566,7 +566,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
struct_cpy(childregs, regs);
childregs->eax = 0;
childregs->esp = esp;
- p->user_vm_lock = NULL;
+ p->user_tid = NULL;
p->thread.esp = (unsigned long) childregs;
p->thread.esp0 = (unsigned long) (childregs+1);
@@ -591,7 +591,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
/*
* The common fastpath:
*/
- if (!(clone_flags & (CLONE_SETTLS | CLONE_SETTID | CLONE_RELEASE_VM)))
+ if (!(clone_flags & (CLONE_SETTLS | CLONE_SETTID | CLONE_CLEARTID)))
return 0;
/*
* Set a new TLS for the child thread?
@@ -623,10 +623,10 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
return -EFAULT;
/*
- * Does the userspace VM want any unlock on mm_release()?
+ * Does the userspace VM want the TID cleared on mm_release()?
*/
- if (clone_flags & CLONE_RELEASE_VM)
- p->user_vm_lock = (long *) childregs->edi;
+ if (clone_flags & CLONE_CLEARTID)
+ p->user_tid = (long *) childregs->edx;
return 0;
}
diff --git a/drivers/isdn/Config.in b/drivers/isdn/Config.in
index 4a2418b0ae2c..46f177450d2f 100644
--- a/drivers/isdn/Config.in
+++ b/drivers/isdn/Config.in
@@ -22,8 +22,9 @@ if [ "$CONFIG_NET" != "n" ]; then
tristate 'CAPI2.0 support' CONFIG_ISDN_CAPI
if [ "$CONFIG_ISDN_CAPI" != "n" ]; then
source drivers/isdn/capi/Config.in
- source drivers/isdn/hardware/Config.in
fi
+
+ source drivers/isdn/hardware/Config.in
fi
fi
endmenu
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index c60458528187..e757db81476c 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -957,14 +957,14 @@ capi_release(struct inode *inode, struct file *file)
static struct file_operations capi_fops =
{
- owner: THIS_MODULE,
- llseek: no_llseek,
- read: capi_read,
- write: capi_write,
- poll: capi_poll,
- ioctl: capi_ioctl,
- open: capi_open,
- release: capi_release,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = capi_read,
+ .write = capi_write,
+ .poll = capi_poll,
+ .ioctl = capi_ioctl,
+ .open = capi_open,
+ .release = capi_release,
};
#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c
index baf4b52dfe61..7a9fad647bfc 100644
--- a/drivers/isdn/capi/capifs.c
+++ b/drivers/isdn/capi/capifs.c
@@ -72,16 +72,16 @@ static int capifs_revalidate(struct dentry *, int);
static struct inode *capifs_new_inode(struct super_block *sb);
static struct file_operations capifs_root_operations = {
- read: generic_read_dir,
- readdir: capifs_root_readdir,
+ .read = generic_read_dir,
+ .readdir = capifs_root_readdir,
};
struct inode_operations capifs_root_inode_operations = {
- lookup: capifs_root_lookup,
+ .lookup = capifs_root_lookup,
};
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)
}
static struct super_operations capifs_sops = {
- put_super: capifs_put_super,
- statfs: simple_statfs,
+ .put_super = capifs_put_super,
+ .statfs = simple_statfs,
};
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,
}
static struct file_system_type capifs_fs_type = {
- owner: THIS_MODULE,
- name: "capifs",
- get_sb: capifs_get_sb,
- kill_sb: kill_anon_super,
+ .owner = THIS_MODULE,
+ .name = "capifs",
+ .get_sb = capifs_get_sb,
+ .kill_sb = kill_anon_super,
};
void capifs_new_ncci(char type, unsigned int num, kdev_t device)
diff --git a/drivers/isdn/capi/capilib.c b/drivers/isdn/capi/capilib.c
index 36018c7022ba..f9b33ffb8290 100644
--- a/drivers/isdn/capi/capilib.c
+++ b/drivers/isdn/capi/capilib.c
@@ -4,7 +4,7 @@
#include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \
-printk(KERN_DEBUG __FUNCTION__ ": " format "\n" , ## arg); \
+printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0)
struct capilib_msgidqueue {
diff --git a/drivers/isdn/capi/kcapi.h b/drivers/isdn/capi/kcapi.h
index 810c062af76b..874c7bf9c081 100644
--- a/drivers/isdn/capi/kcapi.h
+++ b/drivers/isdn/capi/kcapi.h
@@ -16,7 +16,7 @@
#include <linux/isdn/capilli.h>
#define DBG(format, arg...) do { \
-printk(KERN_INFO __FUNCTION__ ": " format "\n" , ## arg); \
+printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0)
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/isdn/capi/kcapi_proc.c
index db803f52b49f..0db6642b8052 100644
--- a/drivers/isdn/capi/kcapi_proc.c
+++ b/drivers/isdn/capi/kcapi_proc.c
@@ -90,17 +90,17 @@ static int contrstats_show(struct seq_file *seq, void *v)
}
struct seq_operations seq_controller_ops = {
- start: controller_start,
- next: controller_next,
- stop: controller_stop,
- show: controller_show,
+ .start = controller_start,
+ .next = controller_next,
+ .stop = controller_stop,
+ .show = controller_show,
};
struct seq_operations seq_contrstats_ops = {
- start: controller_start,
- next: controller_next,
- stop: controller_stop,
- show: contrstats_show,
+ .start = controller_start,
+ .next = controller_next,
+ .stop = controller_stop,
+ .show = contrstats_show,
};
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)
}
static struct file_operations proc_controller_ops = {
- open: seq_controller_open,
- read: seq_read,
- llseek: seq_lseek,
- release: seq_release,
+ .open = seq_controller_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
static struct file_operations proc_contrstats_ops = {
- open: seq_contrstats_open,
- read: seq_read,
- llseek: seq_lseek,
- release: seq_release,
+ .open = seq_contrstats_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
// /proc/capi/applications:
@@ -193,17 +193,17 @@ applstats_show(struct seq_file *seq, void *v)
}
struct seq_operations seq_applications_ops = {
- start: applications_start,
- next: applications_next,
- stop: applications_stop,
- show: applications_show,
+ .start = applications_start,
+ .next = applications_next,
+ .stop = applications_stop,
+ .show = applications_show,
};
struct seq_operations seq_applstats_ops = {
- start: applications_start,
- next: applications_next,
- stop: applications_stop,
- show: applstats_show,
+ .start = applications_start,
+ .next = applications_next,
+ .stop = applications_stop,
+ .show = applstats_show,
};
static int
@@ -219,17 +219,17 @@ seq_applstats_open(struct inode *inode, struct file *file)
}
static struct file_operations proc_applications_ops = {
- open: seq_applications_open,
- read: seq_read,
- llseek: seq_lseek,
- release: seq_release,
+ .open = seq_applications_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
static struct file_operations proc_applstats_ops = {
- open: seq_applstats_open,
- read: seq_read,
- llseek: seq_lseek,
- release: seq_release,
+ .open = seq_applstats_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
};
static void
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index a1845162fd4c..a91cbe823e33 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -261,14 +261,14 @@ isdn_divert_ioctl(struct inode *inode, struct file *file,
#ifdef CONFIG_PROC_FS
static struct file_operations isdn_fops =
{
- owner: THIS_MODULE,
- llseek: no_llseek,
- read: isdn_divert_read,
- write: isdn_divert_write,
- poll: isdn_divert_poll,
- ioctl: isdn_divert_ioctl,
- open: isdn_divert_open,
- release: isdn_divert_close,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = isdn_divert_read,
+ .write = isdn_divert_write,
+ .poll = isdn_divert_poll,
+ .ioctl = isdn_divert_ioctl,
+ .open = isdn_divert_open,
+ .release = isdn_divert_close,
};
/****************************/
diff --git a/drivers/isdn/hardware/Config.in b/drivers/isdn/hardware/Config.in
index c19d283e127a..18a6647955f0 100644
--- a/drivers/isdn/hardware/Config.in
+++ b/drivers/isdn/hardware/Config.in
@@ -2,4 +2,26 @@
# 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
+
diff --git a/drivers/isdn/hardware/avm/Config.in b/drivers/isdn/hardware/avm/Config.in
index 96f8f941c644..6c600139a640 100644
--- a/drivers/isdn/hardware/avm/Config.in
+++ b/drivers/isdn/hardware/avm/Config.in
@@ -3,7 +3,7 @@
#
mainmenu_option next_comment
-comment 'Drivers for active AVM cards'
+comment 'Active AVM cards'
bool 'Support AVM cards' CONFIG_CAPI_AVM
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c
index 21304007c819..4495751f4961 100644
--- a/drivers/isdn/hardware/avm/b1pci.c
+++ b/drivers/isdn/hardware/avm/b1pci.c
@@ -352,10 +352,10 @@ static void __devexit b1pci_pci_remove(struct pci_dev *pdev)
}
static struct pci_driver b1pci_pci_driver = {
- name: "b1pci",
- id_table: b1pci_pci_tbl,
- probe: b1pci_pci_probe,
- remove: __devexit_p(b1pci_pci_remove),
+ .name = "b1pci",
+ .id_table = b1pci_pci_tbl,
+ .probe = b1pci_pci_probe,
+ .remove = __devexit_p(b1pci_pci_remove),
};
static int __init b1pci_init(void)
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index 78fd0b0de788..c1919bb2afa5 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -1232,10 +1232,10 @@ static int __devinit c4_probe(struct pci_dev *dev,
}
static struct pci_driver c4_pci_driver = {
- name: "c4",
- id_table: c4_pci_tbl,
- probe: c4_probe,
- remove: c4_remove,
+ .name = "c4",
+ .id_table = c4_pci_tbl,
+ .probe = c4_probe,
+ .remove = c4_remove,
};
static int __init c4_init(void)
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c
index 86a28c39f931..c72cbb9faea9 100644
--- a/drivers/isdn/hardware/avm/t1pci.c
+++ b/drivers/isdn/hardware/avm/t1pci.c
@@ -215,10 +215,10 @@ static int __devinit t1pci_probe(struct pci_dev *dev,
}
static struct pci_driver t1pci_pci_driver = {
- name: "t1pci",
- id_table: t1pci_pci_tbl,
- probe: t1pci_probe,
- remove: t1pci_remove,
+ .name = "t1pci",
+ .id_table = t1pci_pci_tbl,
+ .probe = t1pci_probe,
+ .remove = t1pci_remove,
};
static int __init t1pci_init(void)
diff --git a/drivers/isdn/hisax/Config.in b/drivers/isdn/hisax/Config.in
index 997a2f255f66..61ed4769baac 100644
--- a/drivers/isdn/hisax/Config.in
+++ b/drivers/isdn/hisax/Config.in
@@ -1,5 +1,5 @@
mainmenu_option next_comment
-comment 'Passive ISDN cards'
+comment 'Passive cards'
dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
comment ' D-channel protocol features'
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 6ae78e6fc946..a7323e797d8e 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -1919,6 +1919,8 @@ static void hisax_b_l1l2(struct hisax_if *ifc, int pr, void *arg)
break;
case PH_DEACTIVATE | INDICATION:
L1L2(st, pr, NULL);
+ clear_bit(BC_FLG_BUSY, &bcs->Flag);
+ skb_queue_purge(&bcs->squeue);
bcs->hw.b_if = NULL;
break;
case PH_DATA | INDICATION:
@@ -2006,6 +2008,9 @@ static void hisax_b_l2l1(struct PStack *st, int pr, void *arg)
else
set_bit(FLG_L1_PULL_REQ, &st->l1.Flags);
break;
+ case PH_DEACTIVATE | REQUEST:
+ test_and_clear_bit(BC_FLG_BUSY, &bcs->Flag);
+ skb_queue_purge(&bcs->squeue);
default:
B_L2L1(b_if, pr, arg);
break;
diff --git a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h
index c5b37d18800a..ba518a7a7fb7 100644
--- a/drivers/isdn/hisax/hisax_debug.h
+++ b/drivers/isdn/hisax/hisax_debug.h
@@ -28,7 +28,7 @@
#define DBG(level, format, arg...) do { \
if (level & __debug_variable) \
-printk(KERN_DEBUG __FUNCTION__ ": " format "\n" , ## arg); \
+printk(KERN_DEBUG "%s: " format "\n" , __FUNCTION__ , ## arg); \
} while (0)
#define DBG_PACKET(level,data,count) \
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index 8715de2a11db..17258d9ff6c6 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -944,17 +944,17 @@ static void __devexit fcpnp_remove(struct pci_dev *pdev)
}
static struct pci_driver fcpci_driver = {
- name: "fcpci",
- probe: fcpci_probe,
- remove: __devexit_p(fcpci_remove),
- id_table: fcpci_ids,
+ .name = "fcpci",
+ .probe = fcpci_probe,
+ .remove = __devexit_p(fcpci_remove),
+ .id_table = fcpci_ids,
};
static struct isapnp_driver fcpnp_driver = {
- name: "fcpnp",
- probe: fcpnp_probe,
- remove: __devexit_p(fcpnp_remove),
- id_table: fcpnp_ids,
+ .name = "fcpnp",
+ .probe = fcpnp_probe,
+ .remove = __devexit_p(fcpnp_remove),
+ .id_table = fcpnp_ids,
};
static int __init hisax_fcpcipnp_init(void)
diff --git a/drivers/isdn/hisax/hisax_hfcpci.c b/drivers/isdn/hisax/hisax_hfcpci.c
index 281e3f970c25..75602141710e 100644
--- a/drivers/isdn/hisax/hisax_hfcpci.c
+++ b/drivers/isdn/hisax/hisax_hfcpci.c
@@ -40,12 +40,12 @@ MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Werner Cornelius <we
MODULE_DESCRIPTION("HFC PCI ISDN driver");
#define ID(ven, dev, name) \
- { vendor: PCI_VENDOR_ID_##ven, \
- device: PCI_DEVICE_ID_##dev, \
- subvendor: PCI_ANY_ID, \
- subdevice: PCI_ANY_ID, \
- class: 0, \
- class_mask: 0, \
+ { .vendor = PCI_VENDOR_ID_##ven, \
+ .device = PCI_DEVICE_ID_##dev, \
+ .subvendor = PCI_ANY_ID, \
+ .subdevice = PCI_ANY_ID, \
+ .class = 0, \
+ .class_mask = 0, \
driver_data: (unsigned long) name }
static struct pci_device_id hfcpci_ids[] __devinitdata = {
@@ -1604,10 +1604,10 @@ static void __devexit hfcpci_remove(struct pci_dev *pdev)
}
static struct pci_driver hfcpci_driver = {
- name: "hfcpci",
- probe: hfcpci_probe,
- remove: hfcpci_remove,
- id_table: hfcpci_ids,
+ .name = "hfcpci",
+ .probe = hfcpci_probe,
+ .remove = hfcpci_remove,
+ .id_table = hfcpci_ids,
};
static int __init hisax_hfcpci_init(void)
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 2d4d4a47ffd9..b9fb57269b27 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -66,9 +66,6 @@ ph_command(struct IsdnCardState *cs, unsigned int command)
if (cs->debug &L1_DEB_ISAC)
debugl1(cs, "ph_command (%#x) in (%#x)", command,
cs->dc.isac.ph_state);
-//###################################
-// printk(KERN_INFO "ph_command (%#x)\n", command);
-//###################################
cs->writeisac(cs, IPACX_CIX0, (command << 4) | 0x0E);
}
@@ -82,9 +79,6 @@ cic_int(struct IsdnCardState *cs)
event = cs->readisac(cs, IPACX_CIR0) >> 4;
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;
dch_sched_event(cs, D_L1STATECHANGE);
}
@@ -417,9 +411,6 @@ dch_int(struct IsdnCardState *cs)
int count;
istad = cs->readisac(cs, IPACX_ISTAD);
-//##############################################
-// printk(KERN_WARNING "dch_int(istad=%02x)\n", istad);
-//##############################################
if (istad &0x80) { // RME
rstad = cs->readisac(cs, IPACX_RSTAD);
@@ -714,9 +705,6 @@ bch_int(struct IsdnCardState *cs, u_char hscx)
bcs = cs->bcs + hscx;
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 (istab &0x80) { // RME
@@ -963,15 +951,11 @@ interrupt_ipacx(struct IsdnCardState *cs)
u_char ista;
while ((ista = cs->readisac(cs, IPACX_ISTA))) {
-//#################################################
-// printk(KERN_WARNING "interrupt_ipacx(ista=%02x)\n", ista);
-//#################################################
- if (ista &0x80) bch_int(cs, 0); // B channel interrupts
- if (ista &0x40) bch_int(cs, 1);
-
- if (ista &0x01) dch_int(cs); // D channel
- if (ista &0x10) cic_int(cs); // Layer 1 state
- }
+ if (ista &0x80) bch_int(cs, 0); // B channel interrupts
+ 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
init_ipacx(struct IsdnCardState *cs, int part)
{
if (part &1) { // initialise chip
-//##################################################
-// printk(KERN_INFO "init_ipacx(%x)\n", part);
-//##################################################
clear_pending_ints(cs);
bch_init(cs, 0);
bch_init(cs, 1);
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
index d5b7ea975088..54fb9c72defe 100644
--- a/drivers/isdn/hisax/st5481.h
+++ b/drivers/isdn/hisax/st5481.h
@@ -219,13 +219,13 @@ enum {
#define L1_EVENT_COUNT (EV_TIMER3 + 1)
#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...) \
-printk(KERN_WARNING __FILE__ ": " __FUNCTION__ ": " format "\n" , ## arg)
+printk(KERN_WARNING __FILE__ ": %s: " format "\n" , __FUNCTION__ , ## 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 "fsm.h"
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
index 8aad86d9d37d..4bfe03d0ce7e 100644
--- a/drivers/isdn/hisax/st5481_init.c
+++ b/drivers/isdn/hisax/st5481_init.c
@@ -176,10 +176,10 @@ static struct usb_device_id st5481_ids[] = {
MODULE_DEVICE_TABLE (usb, st5481_ids);
static struct usb_driver st5481_usb_driver = {
- name: "st5481_usb",
- probe: probe_st5481,
- disconnect: __devexit_p(disconnect_st5481),
- id_table: st5481_ids,
+ .name = "st5481_usb",
+ .probe = probe_st5481,
+ .disconnect = __devexit_p(disconnect_st5481),
+ .id_table = st5481_ids,
};
static int __init st5481_usb_init(void)
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
index f86406cb0562..6a9eace7852e 100644
--- a/drivers/isdn/hysdn/hysdn_procconf.c
+++ b/drivers/isdn/hysdn/hysdn_procconf.c
@@ -377,11 +377,11 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
/******************************************************/
static struct file_operations conf_fops =
{
- llseek: no_llseek,
- read: hysdn_conf_read,
- write: hysdn_conf_write,
- open: hysdn_conf_open,
- release: hysdn_conf_close,
+ .llseek = no_llseek,
+ .read = hysdn_conf_read,
+ .write = hysdn_conf_write,
+ .open = hysdn_conf_open,
+ .release = hysdn_conf_close,
};
/*****************************/
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 1f766a5968c0..bcb30eec76f7 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -389,12 +389,12 @@ hysdn_log_poll(struct file *file, poll_table * wait)
/**************************************************/
static struct file_operations log_fops =
{
- llseek: no_llseek,
- read: hysdn_log_read,
- write: hysdn_log_write,
- poll: hysdn_log_poll,
- open: hysdn_log_open,
- release: hysdn_log_close,
+ .llseek = no_llseek,
+ .read = hysdn_log_read,
+ .write = hysdn_log_write,
+ .poll = hysdn_log_poll,
+ .open = hysdn_log_open,
+ .release = hysdn_log_close,
};
diff --git a/drivers/isdn/i4l/Config.in b/drivers/isdn/i4l/Config.in
index 26b99e92d7df..2b19e0eddf6c 100644
--- a/drivers/isdn/i4l/Config.in
+++ b/drivers/isdn/i4l/Config.in
@@ -24,22 +24,3 @@ comment 'ISDN feature submodules'
dep_tristate 'Support isdn diversion services' CONFIG_ISDN_DIVERSION $CONFIG_ISDN
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
-
diff --git a/drivers/isdn/i4l/isdn_audio.c b/drivers/isdn/i4l/isdn_audio.c
index ae9a89aae06d..bdd92d81d13d 100644
--- a/drivers/isdn/i4l/isdn_audio.c
+++ b/drivers/isdn/i4l/isdn_audio.c
@@ -1,9 +1,9 @@
-/* $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).
*
* 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)
*
* This software may be used and distributed according to the terms
@@ -15,7 +15,7 @@
#include "isdn_audio.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.
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 3682f3bcf725..528e9d1bf6c4 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1090,14 +1090,14 @@ isdn_status_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
static struct file_operations isdn_status_fops =
{
- owner: THIS_MODULE,
- llseek: no_llseek,
- read: isdn_status_read,
- write: isdn_status_write,
- poll: isdn_status_poll,
- ioctl: isdn_status_ioctl,
- open: isdn_status_open,
- release: isdn_status_release,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = isdn_status_read,
+ .write = isdn_status_write,
+ .poll = isdn_status_poll,
+ .ioctl = isdn_status_ioctl,
+ .open = isdn_status_open,
+ .release = isdn_status_release,
};
/*
@@ -1609,14 +1609,14 @@ isdn_ctrl_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
static struct file_operations isdn_ctrl_fops =
{
- owner: THIS_MODULE,
- llseek: no_llseek,
- read: isdn_ctrl_read,
- write: isdn_ctrl_write,
- poll: isdn_ctrl_poll,
- ioctl: isdn_ctrl_ioctl,
- open: isdn_ctrl_open,
- release: isdn_ctrl_release,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = isdn_ctrl_read,
+ .write = isdn_ctrl_write,
+ .poll = isdn_ctrl_poll,
+ .ioctl = isdn_ctrl_ioctl,
+ .open = isdn_ctrl_open,
+ .release = isdn_ctrl_release,
};
/*
@@ -1661,8 +1661,8 @@ isdn_open(struct inode * inode, struct file * file)
static struct file_operations isdn_fops =
{
- owner: THIS_MODULE,
- open: isdn_open,
+ .owner = THIS_MODULE,
+ .open = isdn_open,
};
char *
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index aadba4761bb7..eeb585338ca3 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -48,6 +48,12 @@ enum {
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_* */
enum {
EV_NET_DIAL = 0x200,
@@ -349,12 +355,7 @@ isdn_net_unbind_channel(isdn_net_local * lp)
* outgoing packet), if counter exceeds configured limit either do a
* hangup immediately or - if configured - wait until just before the next
* 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
isdn_net_autohup()
@@ -366,59 +367,54 @@ isdn_net_autohup()
list_for_each(l, &isdn_net_devs) {
isdn_net_dev *p = list_entry(l, isdn_net_dev, global_list);
isdn_net_local *l = &p->local;
- if (jiffies == last_jiffies)
- l->cps = l->transcount;
- else
- l->cps = (l->transcount * HZ) / (jiffies - last_jiffies);
- l->transcount = 0;
- if (dev->net_verbose > 3)
- printk(KERN_DEBUG "%s: %d bogocps\n", l->name, l->cps);
- if ((l->flags & ISDN_NET_CONNECTED) && (l->dialstate == ST_ACTIVE)) {
+
+ if (!(l->flags & ISDN_NET_CONNECTED) || l->dialstate != ST_ACTIVE)
+ continue;
+
+ if(dev->global_flags & ISDN_GLOBAL_STOPPED ||
+ ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF) {
+ isdn_net_hangup(&p->dev);
+ 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;
- l->huptimer++;
- printk("huptimer %d, onhtime %d, chargetime %d, chargeint %d\n", l->huptimer, l->onhtime, l->chargetime, l->chargeint);
- /*
- * if there is some dialmode where timeout-hangup
- * should _not_ be done, check for that here
- */
- if ((l->onhtime) &&
- (l->huptimer > l->onhtime))
- {
- 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;
+ continue;
+ }
+ 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) {
isdn_net_hangup(&p->dev);
+ continue;
}
}
-
- if(dev->global_flags & ISDN_GLOBAL_STOPPED || (ISDN_NET_DIALMODE(*l) == ISDN_NET_DM_OFF)) {
- isdn_net_hangup(&p->dev);
- break;
+ } else if (l->outgoing) {
+ if (l->hupflags & ISDN_CHARGEHUP) {
+ if (l->charge_state != ST_CHARGE_HAVE_CINT) {
+ 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);
}
@@ -453,6 +449,10 @@ static void isdn_net_connected(isdn_net_local *lp)
lp->dialstarted = 0;
lp->dialwait_timer = 0;
+ lp->transcount = 0;
+ lp->cps = 0;
+ lp->last_jiffies = jiffies;
+
#ifdef CONFIG_ISDN_PPP
if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP)
isdn_ppp_wakeup_daemon(lp);
@@ -499,7 +499,7 @@ isdn_net_dial_timer(unsigned long data)
isdn_BUG();
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);
}
@@ -608,13 +608,11 @@ do_dialout(isdn_net_local *lp)
}
lp->huptimer = 0;
lp->outgoing = 1;
- if (lp->chargeint) {
- lp->hupflags |= ISDN_HAVECHARGE;
- lp->hupflags &= ~ISDN_WAITCHARGE;
- } else {
- lp->hupflags |= ISDN_WAITCHARGE;
- lp->hupflags &= ~ISDN_HAVECHARGE;
- }
+ if (lp->chargeint)
+ lp->charge_state = ST_CHARGE_HAVE_CINT;
+ else
+ lp->charge_state = ST_CHARGE_NULL;
+
if (lp->cbdelay && (lp->flags & ISDN_NET_CBOUT)) {
lp->dial_timer.expires = jiffies + lp->cbdelay;
lp->dial_event = EV_NET_TIMER_CB;
@@ -701,15 +699,19 @@ isdn_net_handle_event(isdn_net_local *lp, int pr, void *arg)
* usage by isdn_net_autohup()
*/
lp->charge++;
- if (lp->hupflags & ISDN_HAVECHARGE) {
- lp->hupflags &= ~ISDN_WAITCHARGE;
- lp->chargeint = jiffies - lp->chargetime - (2 * HZ);
+ switch (lp->charge_state) {
+ case ST_CHARGE_NULL:
+ 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;
- printk(KERN_DEBUG "isdn_net: Got CINF chargetime of %s now %lu\n",
- lp->name, lp->chargetime);
+ dbg_net_dial("%s: got CINF\n", lp->name);
return 1;
}
break;
@@ -1054,7 +1056,7 @@ isdn_net_xmit(struct net_device *ndev, struct sk_buff *skb)
int retv = 0;
if (((isdn_net_local *) (ndev->priv))->master) {
- printk("isdn BUG at %s:%d!\n", __FILE__, __LINE__);
+ isdn_BUG();
dev_kfree_skb(skb);
return 0;
}
@@ -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
* 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->slave) {
if (!lp->sqfull) {
@@ -2381,8 +2391,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup)
lp->outgoing = 0;
lp->huptimer = 0;
- lp->hupflags |= ISDN_WAITCHARGE;
- lp->hupflags &= ~ISDN_HAVECHARGE;
+ lp->charge_state = ST_CHARGE_NULL;
/* Got incoming Call, setup L2 and L3 protocols,
* then wait for D-Channel-connect
*/
@@ -2837,8 +2846,9 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg)
else
lp->hupflags &= ~ISDN_INHUP;
if (cfg->chargeint > 10) {
- lp->hupflags |= ISDN_HAVECHARGE | ISDN_MANCHARGE;
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 == ISDN_NET_ENCAP_RAWIP) {
diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h
index 2be1270e446d..5ef8185c41c8 100644
--- a/drivers/isdn/i4l/isdn_net.h
+++ b/drivers/isdn/i4l/isdn_net.h
@@ -12,8 +12,6 @@
*/
/* 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_INHUP 8 /* Even if incoming, close after huptimeout */
#define ISDN_MANCHARGE 16 /* Charge Interval manually set */
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index 2151d4c1fe0f..5e073c2f715f 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -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 =
{
- owner: THIS_MODULE,
- llseek: no_llseek,
- read: isdn_ppp_read,
- write: isdn_ppp_write,
- poll: isdn_ppp_poll,
- ioctl: isdn_ppp_ioctl,
- open: isdn_ppp_open,
- release: isdn_ppp_release,
+ .owner = THIS_MODULE,
+ .llseek = no_llseek,
+ .read = isdn_ppp_read,
+ .write = isdn_ppp_write,
+ .poll = isdn_ppp_poll,
+ .ioctl = isdn_ppp_ioctl,
+ .open = isdn_ppp_open,
+ .release = isdn_ppp_release,
};
/*
diff --git a/drivers/isdn/tpam/tpam_main.c b/drivers/isdn/tpam/tpam_main.c
index 4573cad5a0af..172df397b366 100644
--- a/drivers/isdn/tpam/tpam_main.c
+++ b/drivers/isdn/tpam/tpam_main.c
@@ -251,10 +251,10 @@ static struct pci_device_id tpam_pci_tbl[] __devinitdata = {
MODULE_DEVICE_TABLE(pci, tpam_pci_tbl);
static struct pci_driver tpam_driver = {
- name: "tpam",
- id_table: tpam_pci_tbl,
- probe: tpam_probe,
- remove: __devexit_p(tpam_remove),
+ .name = "tpam",
+ .id_table = tpam_pci_tbl,
+ .probe = tpam_probe,
+ .remove = __devexit_p(tpam_remove),
};
static int __init tpam_init(void) {
diff --git a/include/linux/isdn.h b/include/linux/isdn.h
index 9544c782d17d..213d2cbc24f4 100644
--- a/include/linux/isdn.h
+++ b/include/linux/isdn.h
@@ -317,6 +317,7 @@ typedef struct isdn_net_local_s {
/* 0 = Transparent */
int huptimer; /* Timeout-counter for auto-hangup */
int charge; /* Counter for charging units */
+ int charge_state; /* ChargeInfo state machine */
ulong chargetime; /* Timer for Charging info */
int hupflags; /* Flags for charge-unit-hangup: */
/* bit0: chargeint is invalid */
@@ -329,6 +330,7 @@ typedef struct isdn_net_local_s {
int onum; /* Flag: at least 1 outgoing number */
int cps; /* current speed of this interface */
int transcount; /* byte-counter for cps-calculation */
+ int last_jiffies; /* when transcount was reset */
int sqfull; /* Flag: netdev-queue overloaded */
ulong sqfull_stamp; /* Start-Time of overload */
ulong slavedelay; /* Dynamic bundling delaytime */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4d7de397481f..c4395b9fe950 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -199,11 +199,12 @@ struct page {
#define page_count(p) atomic_read(&(p)->count)
#define set_page_count(p,v) atomic_set(&(p)->count, v)
extern void FASTCALL(__page_cache_release(struct page *));
-#define put_page(p) \
- do { \
- if (put_page_testzero(p)) \
- __page_cache_release(p); \
+#define put_page(p) \
+ do { \
+ if (!PageReserved(p) && put_page_testzero(p)) \
+ __page_cache_release(p); \
} while (0)
+void FASTCALL(__free_pages_ok(struct page *page, unsigned int order));
/*
* Multiple processes may "see" the same page. E.g. for untouched
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 767d1b7bd0ec..5713927c300a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -47,8 +47,8 @@ struct exec_domain;
#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */
-#define CLONE_DETACHED 0x00200000 /* parent wants no child-exit signal */
-#define CLONE_RELEASE_VM 0x00400000 /* release the userspace VM */
+#define CLONE_CLEARTID 0x00200000 /* clear the userspace TID */
+#define CLONE_DETACHED 0x00400000 /* parent wants no child-exit signal */
#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)
@@ -307,7 +307,7 @@ struct task_struct {
wait_queue_head_t wait_chldexit; /* for wait4() */
struct completion *vfork_done; /* for vfork() */
- long *user_vm_lock; /* for CLONE_RELEASE_VM */
+ long *user_tid; /* for CLONE_CLEARTID */
unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
diff --git a/init/main.c b/init/main.c
index cd99093e0193..d96c897afd0d 100644
--- a/init/main.c
+++ b/init/main.c
@@ -83,6 +83,12 @@ extern void ipc_init(void);
#endif
/*
+ * Are we up and running (ie do we have all the infrastructure
+ * set up)
+ */
+int system_running = 0;
+
+/*
* Boot command-line arguments
*/
#define MAX_INIT_ARGS 8
@@ -559,6 +565,7 @@ static int init(void * unused)
*/
free_initmem();
unlock_kernel();
+ system_running = 1;
kstat.pgfree = 0;
diff --git a/kernel/fork.c b/kernel/fork.c
index e4944ff2d845..d577f3077e73 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -186,6 +186,8 @@ inside:
next_safe = p->pid;
if(p->pgrp > last_pid && next_safe > p->pgrp)
next_safe = p->pgrp;
+ if(p->tgid > last_pid && next_safe > p->tgid)
+ next_safe = p->tgid;
if(p->session > last_pid && next_safe > p->session)
next_safe = p->session;
}
@@ -368,12 +370,12 @@ void mm_release(void)
tsk->vfork_done = NULL;
complete(vfork_done);
}
- if (tsk->user_vm_lock)
+ if (tsk->user_tid)
/*
* We dont check the error code - if userspace has
* not set up a proper pointer then tough luck.
*/
- put_user(0UL, tsk->user_vm_lock);
+ put_user(0UL, tsk->user_tid);
}
static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 53dd3ca194c3..f41583cce358 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -32,7 +32,7 @@
#include <asm/uaccess.h>
-extern int max_threads;
+extern int max_threads, system_running;
static inline void
use_init_fs_context(void)
@@ -158,6 +158,9 @@ static int exec_modprobe(void * module_name)
char *argv[] = { modprobe_path, "-s", "-k", "--", (char*)module_name, NULL };
int ret;
+ if (!system_running)
+ return -EBUSY;
+
ret = exec_usermodehelper(modprobe_path, argv, envp);
if (ret) {
static unsigned long last;
@@ -197,10 +200,9 @@ int request_module(const char * module_name)
unsigned long saved_policy = current->policy;
current->policy = SCHED_NORMAL;
- /* Don't allow request_module() before the root fs is mounted! */
- if ( ! current->fs->root ) {
- printk(KERN_ERR "request_module[%s]: Root fs not mounted\n",
- module_name);
+ /* Don't allow request_module() when the system isn't set up */
+ if ( ! system_running ) {
+ printk(KERN_ERR "request_module[%s]: not ready\n", module_name);
ret = -EPERM;
goto out;
}
@@ -357,6 +359,9 @@ int call_usermodehelper(char *path, char **argv, char **envp)
.data = &sub_info,
};
+ if (!system_running)
+ return -EBUSY;
+
if (path[0] == '\0')
goto out;
diff --git a/kernel/sched.c b/kernel/sched.c
index 5443a8a91398..0d9e5bdef050 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -214,8 +214,7 @@ static inline runqueue_t *this_rq_lock(void)
static inline void rq_unlock(runqueue_t *rq)
{
- spin_unlock(&rq->lock);
- local_irq_enable();
+ spin_unlock_irq(&rq->lock);
}
/*
diff --git a/kernel/sys.c b/kernel/sys.c
index 8a6d5da46335..94976695e15c 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -67,6 +67,7 @@ int fs_overflowgid = DEFAULT_FS_OVERFLOWUID;
int C_A_D = 1;
int cad_pid = 1;
+extern int system_running;
/*
* Notifier list for kernel code which wants to be called
@@ -323,6 +324,7 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void * arg)
switch (cmd) {
case LINUX_REBOOT_CMD_RESTART:
notifier_call_chain(&reboot_notifier_list, SYS_RESTART, NULL);
+ system_running = 0;
device_shutdown();
printk(KERN_EMERG "Restarting system.\n");
machine_restart(NULL);
@@ -338,6 +340,7 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void * arg)
case LINUX_REBOOT_CMD_HALT:
notifier_call_chain(&reboot_notifier_list, SYS_HALT, NULL);
+ system_running = 0;
device_shutdown();
printk(KERN_EMERG "System halted.\n");
machine_halt();
@@ -346,6 +349,7 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void * arg)
case LINUX_REBOOT_CMD_POWER_OFF:
notifier_call_chain(&reboot_notifier_list, SYS_POWER_OFF, NULL);
+ system_running = 0;
device_shutdown();
printk(KERN_EMERG "Power down.\n");
machine_power_off();
@@ -360,6 +364,7 @@ asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void * arg)
buffer[sizeof(buffer) - 1] = '\0';
notifier_call_chain(&reboot_notifier_list, SYS_RESTART, buffer);
+ system_running = 0;
device_shutdown();
printk(KERN_EMERG "Restarting system with command '%s'.\n", buffer);
machine_restart(buffer);
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c8de0bcaa9f4..4f8179b8f57d 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -80,8 +80,7 @@ static inline int bad_range(zone_t *zone, struct page *page)
* -- wli
*/
-static void FASTCALL(__free_pages_ok (struct page *page, unsigned int order));
-static void __free_pages_ok (struct page *page, unsigned int order)
+void __free_pages_ok (struct page *page, unsigned int order)
{
unsigned long index, page_idx, mask, flags;
free_area_t *area;
diff --git a/mm/swap.c b/mm/swap.c
index f9f7d4adaeec..0e68f056b5ad 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -89,7 +89,7 @@ void __page_cache_release(struct page *page)
del_page_from_inactive_list(page);
spin_unlock_irqrestore(&_pagemap_lru_lock, flags);
}
- __free_page(page);
+ __free_pages_ok(page, 0);
}
/*