diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/SubmittingDrivers linux.21p2/Documentation/SubmittingDrivers
--- linux.vanilla/Documentation/SubmittingDrivers	Sat Dec 29 16:57:19 2001
+++ linux.21p2/Documentation/SubmittingDrivers	Sat Dec 29 03:19:40 2001
@@ -2,7 +2,7 @@
 ---------------------------------------
 
 This document is intended to explain how to submit device drivers to the
-Linux 2.2 and 2.4test kernel trees. Note that if you are interested in video
+Linux 2.2, 2.4 and 2.5 kernel trees. Note that if you are interested in video
 card drivers you should probably talk to XFree86 (http://wwww.xfree86.org) 
 instead.
 
@@ -10,9 +10,9 @@
 -------------------------
 
 Major and minor numbers for devices are allocated by the Linux assigned name
-and number authority (currently better known as H Peter Anvin). The
-site is http://www.lanana.org/. This also deals with allocating numbers for
-devices that are not going to be submitted to the mainstream kernel.
+and number authority (currently better known as H Peter Anvin). The site is
+http://www.lanana.org/. This also deals with allocating numbers for devices
+that are not going to be submitted to the mainstream kernel.
 
 If you don't use assigned numbers then when you device is submitted it will
 get given an assigned number even if that is different from values you may
@@ -22,21 +22,28 @@
 ------------------------
 
 Linux 2.0:
-	No new drivers are accepted for this kernel tree
+	No new drivers are accepted for this kernel tree. If you have any
+	security or other fixes then please contact David Weinehall
+	<tao@acc.umu.se>
 
 Linux 2.2:
 	If the code area has a general maintainer then please submit it to
 	the maintainer listed in MAINTAINERS in the kernel file. If the
 	maintainer does not respond or you cannot find the appropriate
-	maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk>
+	maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk>.
 
-Linux 2.4test:
+Linux 2.4:
+	If the code area has a general maintainer then please submit it to
+	the maintainer listed in MAINTAINERS in the kernel file. If the
+	maintainer does not respond or you cannot find the appropriate
+	maintainer then please contact Marcelo Tosatti
+	<marcelo@conectiva.com.br>.
+
+Linux 2.5:
 	This kernel tree is under active development. The same rules apply
-	as 2.2 but you may wish to submit your driver via linux-kernel (see
-	resources) and follow that list to track changes in API's. These
-	should no longer be occurring as we are now in a code freeze.
-	The final contact point for Linux 2.4 submissions is 	
-	<torvalds@transmeta.com>.
+	as 2.4 but you may wish to submit your driver via linux-kernel (see
+	resources) and follow that list to track changes in API's. The final
+	contact point for Linux 2.5 submissions is <torvalds@transmeta.com>.
 
 What Criteria Determine Acceptance
 ----------------------------------
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/INTERFACE linux.21p2/Documentation/isdn/INTERFACE
--- linux.vanilla/Documentation/isdn/INTERFACE	Sat Dec 29 16:57:19 2001
+++ linux.21p2/Documentation/isdn/INTERFACE	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: INTERFACE,v 1.15.8.2 2001/03/13 16:17:07 kai Exp $
+$Id: INTERFACE,v 1.1 2001/05/26 11:47:14 armin Exp $
 
 Description of the Interface between Linklevel and Hardwarelevel
   of isdn4linux:
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/INTERFACE.fax linux.21p2/Documentation/isdn/INTERFACE.fax
--- linux.vanilla/Documentation/isdn/INTERFACE.fax	Sun Mar 25 17:31:58 2001
+++ linux.21p2/Documentation/isdn/INTERFACE.fax	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: INTERFACE.fax,v 1.2 2000/08/06 09:22:50 armin Exp $
+$Id: INTERFACE.fax,v 1.1 2001/05/26 11:47:14 armin Exp $
 
 
 Description of the fax-subinterface between linklevel and hardwarelevel of 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.act2000 linux.21p2/Documentation/isdn/README.act2000
--- linux.vanilla/Documentation/isdn/README.act2000	Sun Mar 25 17:31:58 2001
+++ linux.21p2/Documentation/isdn/README.act2000	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: README.act2000,v 1.3 2000/08/06 09:22:51 armin Exp $
+$Id: README.act2000,v 1.1 2001/05/26 11:47:16 armin Exp $
 
 This document describes the ACT2000 driver for the
 IBM Active 2000 ISDN card.
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.audio linux.21p2/Documentation/isdn/README.audio
--- linux.vanilla/Documentation/isdn/README.audio	Sun Mar 25 17:31:58 2001
+++ linux.21p2/Documentation/isdn/README.audio	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: README.audio,v 1.8 1999/07/11 17:17:29 armin Exp $
+$Id: README.audio,v 1.1 2001/05/26 11:47:17 armin Exp $
 
 ISDN subsystem for Linux.
   Description of audio mode.
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.concap linux.21p2/Documentation/isdn/README.concap
--- linux.vanilla/Documentation/isdn/README.concap	Sun Mar 25 17:31:58 2001
+++ linux.21p2/Documentation/isdn/README.concap	Tue Jan  1 21:18:31 2002
@@ -118,7 +118,7 @@
 	   or when the device driver resets the interface. All services of the
 	   encapsulation protocol may be used after this*/
 	int (*restart)(struct concap_proto *cprot, 
-		       struct net_device *ndev,
+		       struct device *ndev,
 		       struct concap_device_ops *dops);
 
 	/* deactivate an encapsulation protocol instance. The encapsulation
@@ -174,7 +174,7 @@
 
 An encapsulation protocol itself is actually the
 struct concap_proto{
-	struct net_device *net_dev;		/* net device using our service  */
+	struct device *net_dev;		/* net device using our service  */
 	struct concap_device_ops *dops; /* callbacks provided by device */
  	struct concap_proto_ops  *pops; /* callbacks provided by us */
 	int flags;
@@ -199,7 +199,7 @@
 encapsulation services could look like this:
 
 struct concap_device{
-	struct net_device net_dev;
+	struct device net_dev;
 	struct my_priv  /* device->local stuff */
 			/* the my_priv struct might contain a 
 			   struct concap_device_ops *dops;
@@ -225,9 +225,9 @@
 
 
 If general linux network interfaces explicitly supported concap
-protocols (e.g. by a member struct concap_proto* in struct net_device)
+protocols (e.g. by a member struct concap_proto* in struct device)
 then the interface of the service function could be changed
-by passing a pointer of type (struct net_device*) instead of
+by passing a pointer of type (struct device*) instead of
 type (struct concap_proto*). Doing so would make many of the service
 functions compatible to network device support functions.
 
@@ -237,7 +237,7 @@
 
 we could have
 
-  int (*encap_and_xmit)(struct net_device *ndev, struct sk_buff *skb);
+  int (*encap_and_xmit)(struct device *ndev, struct sk_buff *skb);
 
 As this is compatible to the dev->hard_start_xmit() method, the device
 driver could directly register the concap protocol's encap_and_xmit()
@@ -247,7 +247,7 @@
 
 The device's data request function could also be defined as
  
-  int (*data_req)(struct net_device *ndev, struct sk_buff *skb);
+  int (*data_req)(struct device *ndev, struct sk_buff *skb);
 
 This might even allow for some protocol stacking. And the network
 interface might even register the same data_req() function directly
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.eicon linux.21p2/Documentation/isdn/README.eicon
--- linux.vanilla/Documentation/isdn/README.eicon	Sat Dec 29 16:57:19 2001
+++ linux.21p2/Documentation/isdn/README.eicon	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: README.eicon,v 1.10.6.1 2001/02/19 10:04:59 armin Exp $
+$Id: README.eicon,v 1.1 2001/05/26 11:47:18 armin Exp $
 
 (c) 1999,2000 Armin Schindler (mac@melware.de)
 (c) 1999,2000 Cytronics & Melware (info@melware.de)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.hysdn linux.21p2/Documentation/isdn/README.hysdn
--- linux.vanilla/Documentation/isdn/README.hysdn	Sun Mar 25 17:37:29 2001
+++ linux.21p2/Documentation/isdn/README.hysdn	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: README.hysdn,v 1.3.6.1 2001/02/10 14:41:19 kai Exp $
+$Id: README.hysdn,v 1.1 2001/05/26 11:47:18 armin Exp $
 The hysdn driver has been written by
 by Werner Cornelius (werner@isdn4linux.de or werner@titro.de) 
 for Hypercope GmbH Aachen Germany. Hypercope agreed to publish this driver
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.icn linux.21p2/Documentation/isdn/README.icn
--- linux.vanilla/Documentation/isdn/README.icn	Sun Mar 25 17:31:58 2001
+++ linux.21p2/Documentation/isdn/README.icn	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-$Id: README.icn,v 1.7 2000/08/06 09:22:51 armin Exp $
+$Id: README.icn,v 1.1 2001/05/26 11:47:18 armin Exp $
 
 You can get the ICN-ISDN-card from:
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/MAINTAINERS linux.21p2/MAINTAINERS
--- linux.vanilla/MAINTAINERS	Sat Dec 29 16:57:19 2001
+++ linux.21p2/MAINTAINERS	Sat Dec 29 03:12:27 2001
@@ -1000,9 +1000,8 @@
 S:	Maintained
 
 USB SUBSYSTEM
-P:	Johannes Erdfelt
-M	jerdfelt@valinux.com
-M:	johannes@erdfelt.com
+P:	Greg Kroah-Hartman
+M:	greg@kroah.com
 L:	linux-usb-users@lists.sourceforge.net
 L:	linux-usb-devel@lists.sourceforge.net
 W:	http://www.linux-usb.org
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Makefile linux.21p2/Makefile
--- linux.vanilla/Makefile	Sat Dec 29 16:57:19 2001
+++ linux.21p2/Makefile	Tue Jan  1 21:13:12 2002
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
-SUBLEVEL = 20
-EXTRAVERSION =
+SUBLEVEL = 21
+EXTRAVERSION = pre2
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/boot/compressed/misc.c linux.21p2/arch/i386/boot/compressed/misc.c
--- linux.vanilla/arch/i386/boot/compressed/misc.c	Sat Dec 29 16:57:19 2001
+++ linux.21p2/arch/i386/boot/compressed/misc.c	Sat Dec 29 03:08:33 2001
@@ -297,6 +297,7 @@
 	if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory.\n");
 #endif
 	output_data = (char *)0x100000; /* Points to 1M */
+	free_mem_end_ptr = (long)real_mode;
 }
 
 struct moveparams {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/bluesmoke.c linux.21p2/arch/i386/kernel/bluesmoke.c
--- linux.vanilla/arch/i386/kernel/bluesmoke.c	Sat Dec 29 16:57:19 2001
+++ linux.21p2/arch/i386/kernel/bluesmoke.c	Tue Jan  1 21:15:15 2002
@@ -1,17 +1,18 @@
-/*
- *	Machine Check Handler For PII/PIII
- */
 
-#include <linux/config.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <asm/processor.h> 
 #include <asm/msr.h>
 
-static int banks = 0;
+/*
+ *	Machine Check Handler For PII/PIII
+ */
+
+static int banks;
 
-void mcheck_fault(void)
+static void intel_machine_check(struct pt_regs * regs, long error_code)
 {
 	int recover=1;
 	u32 alow, ahigh, high, low;
@@ -37,7 +38,7 @@
 			high&=~(1<<31);
 			if(high&(1<<27))
 			{
-				rdmsr(0x403+i*4, alow, ahigh);
+				rdmsr(0x402+i*4, alow, ahigh);
 				printk("[%08x%08x]", alow, ahigh);
 			}
 			if(high&(1<<26))
@@ -50,7 +51,7 @@
 			/* Clear it */
 			wrmsr(0x401+i*4, 0UL, 0UL);
 			/* Serialize */
-			mb();
+			wmb();
 		}
 	}
 	
@@ -63,31 +64,101 @@
 	wrmsr(0x17a,mcgstl, mcgsth);
 }
 
+/*
+ *	Machine check handler for Pentium class Intel
+ */
+ 
+static void pentium_machine_check(struct pt_regs * regs, long error_code)
+{
+	u32 loaddr, hi, lotype;
+	rdmsr(0x0, loaddr, hi);
+	rdmsr(0x1, lotype, hi);
+	printk(KERN_EMERG "CPU#%d: Machine Check Exception:  0x%8X (type 0x%8X).\n", smp_processor_id(), loaddr, lotype);
+	if(lotype&(1<<5))
+		printk(KERN_EMERG "CPU#%d: Possible thermal failure (CPU on fire ?).\n", smp_processor_id());
+}
 
 /*
- *	This has to be run for each processor
+ *	Machine check handler for WinChip C6
  */
  
-void mcheck_init(void)
+static void winchip_machine_check(struct pt_regs * regs, long error_code)
+{
+	printk(KERN_EMERG "CPU#%d: Machine Check Exception.\n", smp_processor_id());
+}
+
+/*
+ *	Handle unconfigured int18 (should never happen)
+ */
+
+static void unexpected_machine_check(struct pt_regs * regs, long error_code)
+{	
+	printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n", smp_processor_id());
+}
+
+/*
+ *	Call the installed machine check handler for this CPU setup.
+ */ 
+ 
+static void (*machine_check_vector)(struct pt_regs *, long error_code) = unexpected_machine_check;
+
+void do_machine_check(struct pt_regs * regs, long error_code)
+{
+	machine_check_vector(regs, error_code);
+}
+
+/*
+ *	Set up machine check reporting for Intel processors
+ */
+
+void __init intel_mcheck_init(struct cpuinfo_x86 *c)
 {
 	u32 l, h;
 	int i;
-	struct cpuinfo_x86 *c;
-	static int done=0;
+	static int done;
+	
+	/*
+	 *	Check for MCE support
+	 */
 
-	c=cpu_data+smp_processor_id();
+	if(!(c->x86_capability&X86_FEATURE_MCE))
+		return;	
 	
-	if(c->x86_vendor!=X86_VENDOR_INTEL)
-		return;
+	/*
+	 *	Pentium machine check
+	 */
 	
-	if(!(c->x86_capability&X86_FEATURE_MCE))
+	if(c->x86 == 5)
+	{
+		machine_check_vector = pentium_machine_check;
+		wmb();
+		/* Read registers before enabling */
+		rdmsr(0x0, l, h);
+		rdmsr(0x1, l, h);
+		if(done==0)
+			printk(KERN_INFO "Intel old style machine check architecture supported.\n");
+		/* Enable MCE */	
+		__asm__ __volatile__ (
+			"movl %%cr4, %%eax\n\t"
+			"orl $0x40, %%eax\n\t"
+			"movl %%eax, %%cr4\n\t" : : : "eax");
+		printk(KERN_INFO "Intel old style machine check reporting enabled on CPU#%d.\n", smp_processor_id());
 		return;
-		
+	}
+	
+
+	/*
+	 *	Check for PPro style MCA
+	 */
+	 		
 	if(!(c->x86_capability&X86_FEATURE_MCA))
 		return;
 		
 	/* Ok machine check is available */
 	
+	machine_check_vector = intel_machine_check;
+	wmb();
+	
 	if(done==0)
 		printk(KERN_INFO "Intel machine check architecture supported.\n");
 	rdmsr(0x179, l, h);
@@ -102,10 +173,69 @@
 	{
 		wrmsr(0x401+4*i, 0x0, 0x0); 
 	}
+	set_in_cr4(X86_CR4_MCE);
+	printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", smp_processor_id());
+	done=1;
+}
+
+/*
+ *	Set up machine check reporting on the Winchip C6 series
+ */
+ 
+static void __init winchip_mcheck_init(struct cpuinfo_x86 *c)
+{
+	u32 lo, hi;
+	/* Not supported on C3 */
+	if(c->x86 != 5)
+		return;
+	/* Winchip C6 */
+	machine_check_vector = winchip_machine_check;
+	wmb();
+	rdmsr(0x107, lo, hi);
+	lo|= (1<<2);	/* Enable EIERRINT (int 18 MCE) */
+	lo&= ~(1<<4);	/* Enable MCE */
+	wrmsr(0x107, lo, hi);
 	__asm__ __volatile__ (
 		"movl %%cr4, %%eax\n\t"
 		"orl $0x40, %%eax\n\t"
 		"movl %%eax, %%cr4\n\t" : : : "eax");
-	printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", smp_processor_id());
-	done=1;
+	printk(KERN_INFO "Winchip machine check reporting enabled on CPU#%d.\n", smp_processor_id());
+}
+
+
+/*
+ *	This has to be run for each processor
+ */
+
+
+static int mce_disabled = 0;
+
+void __init mcheck_init(struct cpuinfo_x86 *c)
+{
+	if(mce_disabled)
+		return;
+		
+	switch(c->x86_vendor)
+	{
+		case X86_VENDOR_AMD:
+			/*
+			 *	AMD K7 machine check is Intel like
+			 */
+			if(c->x86 == 6)
+				intel_mcheck_init(c);
+			break;
+		case X86_VENDOR_INTEL:
+			intel_mcheck_init(c);
+			break;
+		case X86_VENDOR_CENTAUR:
+			winchip_mcheck_init(c);
+			break;
+	}
+}
+
+static int __init mcheck_disable(char *str, int *unused)
+{
+	mce_disabled = 1;
+	return 0;
 }
+__setup("nomce", mcheck_disable);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/entry.S linux.21p2/arch/i386/kernel/entry.S
--- linux.vanilla/arch/i386/kernel/entry.S	Sat Dec 29 16:57:19 2001
+++ linux.21p2/arch/i386/kernel/entry.S	Tue Jan  1 21:15:18 2002
@@ -366,7 +366,7 @@
 
 ENTRY(machine_check)
 	pushl $0
-	pushl $ SYMBOL_NAME(mcheck_fault)
+	pushl $ SYMBOL_NAME(do_machine_check)
 	jmp error_code
 
 ENTRY(spurious_interrupt_bug)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/setup.c linux.21p2/arch/i386/kernel/setup.c
--- linux.vanilla/arch/i386/kernel/setup.c	Sun Mar 25 17:37:29 2001
+++ linux.21p2/arch/i386/kernel/setup.c	Tue Jan  1 21:15:21 2002
@@ -36,9 +36,13 @@
  *	Added Cyrix III initial detection code
  *	Alan Cox <alan@redhat.com>, Septembr 2000
  *
- *      Improve cache size calculation
- *      Asit Mallick <asit.k.mallick@intel.com>, October 2000
- *      Andrew Ip <aip@turbolinux.com>, October 2000
+ *	Improve cache size calculation
+ *	Asit Mallick <asit.k.mallick@intel.com>, October 2000
+ *	Andrew Ip <aip@turbolinux.com>, October 2000
+ *
+ *	Backport various workarounds from 2.4.16
+ *	Dave Jones <davej@suse.de>, December 2001
+ *
  */
 
 /*
@@ -114,10 +118,13 @@
 extern int rd_image_start;	/* starting block # of image */
 #endif
 
+extern void mcheck_init(struct cpuinfo_x86 *c);
 extern int root_mountflags;
 extern int _etext, _edata, _end;
 extern unsigned long cpu_khz;
 
+static int disable_x86_serial_nr __initdata = 1;
+
 /*
  * This is set up by the setup-routine at boot-time
  */
@@ -386,8 +393,8 @@
 static char command_line[COMMAND_LINE_SIZE] = { 0, };
        char saved_command_line[COMMAND_LINE_SIZE];
 
-__initfunc(void setup_arch(char **cmdline_p,
-	unsigned long * memory_start_p, unsigned long * memory_end_p))
+void __init setup_arch(char **cmdline_p,
+	unsigned long * memory_start_p, unsigned long * memory_end_p)
 {
 	unsigned long memory_start, memory_end = 0;
 	char c = ' ', *to = command_line, *from = COMMAND_LINE;
@@ -572,49 +579,52 @@
 }
 
 
-__initfunc(static int get_model_name(struct cpuinfo_x86 *c))
+static int __init get_model_name(struct cpuinfo_x86 *c)
 {
-	unsigned int n, dummy, *v;
-
-	/* 
-	 * Actually we must have cpuid or we could never have
-	 * figured out that this was AMD/Centaur/Cyrix/Transmeta
-	 * from the vendor info :-).
-	 */
+	unsigned int *v;
+	char *p, *q;
 
-	cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
-	if (n < 0x80000004)
+	if (cpuid_eax(0x80000000) < 0x80000004)
 		return 0;
-	cpuid(0x80000001, &dummy, &dummy, &dummy, &(c->x86_capability));
 	v = (unsigned int *) c->x86_model_id;
 	cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
 	cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
 	cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
 	c->x86_model_id[48] = 0;
-	
+
+	/* Intel chips right-justify this string for some dumb reason;
+	   undo that brain damage */
+	p = q = &c->x86_model_id[0];
+	while ( *p == ' ' )
+		p++;
+	if ( p != q ) {
+		while ( *p )
+			*q++ = *p++;
+		while ( q <= &c->x86_model_id[48] )
+			*q++ = '\0';  /* Zero-pad the rest */
+	}
 	return 1;
 }
 
 
-__initfunc (static void display_cacheinfo(struct cpuinfo_x86 *c))
+static void __init display_cacheinfo(struct cpuinfo_x86 *c)
 {
-	unsigned int n, dummy, ecx, edx;
+	unsigned int n, dummy, ecx, edx, l2size;
 
-	cpuid(0x80000000, &n, &dummy, &dummy, &dummy);
+	n = cpuid_eax(0x80000000);
 
 	if (n >= 0x80000005){
 		cpuid(0x80000005, &dummy, &dummy, &ecx, &edx);
-		printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK\n",
-			ecx>>24, edx>>24);
+		printk("CPU: L1 I Cache: %dK (%d bytes/line), D cache %dK (%d bytes/line)\n",
+			edx>>24, edx&0xFF, ecx>>24, ecx&0xFF);
 		c->x86_cache_size=(ecx>>24)+(edx>>24);
 	}
 
-	/* Yes this can occur - the CyrixIII just has a large L1 */
-	if (n < 0x80000006)
-		return;	/* No function to get L2 info */
+	if (n < 0x80000006)	/* Some chips just has a large L1. */
+		return;
 
-	cpuid(0x80000006, &dummy, &dummy, &ecx, &edx);
-	c->x86_cache_size = ecx>>16;
+	ecx = cpuid_ecx(0x80000006);
+	l2size = ecx >> 16;
 
 	/* AMD errata T13 (order #21922) */
 	if(boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
@@ -622,15 +632,20 @@
 		boot_cpu_data.x86_model== 3 &&
 		boot_cpu_data.x86_mask == 0)
 	{
-		c->x86_cache_size = 64;
+		l2size = 64;
 	}
 
-	printk("CPU: L2 Cache: %dK\n", c->x86_cache_size);
-}
+	if (l2size == 0)
+		return;		/* Again, no L2 cache is possible */
 
+	c->x86_cache_size = l2size;
 
+	printk("CPU: L2 Cache: %dK (%d bytes/line)\n",
+		l2size, ecx & 0xFF);
+}
 
-__initfunc(static int amd_model(struct cpuinfo_x86 *c))
+
+static int __init init_amd(struct cpuinfo_x86 *c)
 {
 	u32 l, h;
 	unsigned long flags;
@@ -645,23 +660,24 @@
 	switch(c->x86)
 	{
 		case 5:
-			if( c->x86_model < 6 )
-			{
-				/* Anyone with a K5 want to fill this in */				
+			if( c->x86_model < 6 ) {
+				/* Based on AMD doc 20734R - June 2000 */
+				if ( c->x86_model == 0 ) {
+					c->x86_capability&=~X86_FEATURE_APIC;
+					c->x86_capability|=X86_FEATURE_PGE;
+				}
 				break;
 			}
 
 			/* K6 with old style WHCR */
-			if( c->x86_model < 8 ||
-				(c->x86_model== 8 && c->x86_mask < 8))
-			{
+			if (c->x86_model < 8 ||
+			   (c->x86_model== 8 && c->x86_mask < 8)) {
 				/* We can only write allocate on the low 508Mb */
 				if(mbytes>508)
 					mbytes=508;
-					
+
 				rdmsr(0xC0000082, l, h);
-				if((l&0x0000FFFF)==0)
-				{		
+				if((l&0x0000FFFF)==0) {		
 					l=(1<<0)|((mbytes/4)<<1);
 					save_flags(flags);
 					__cli();
@@ -670,20 +686,19 @@
 					restore_flags(flags);
 					printk(KERN_INFO "Enabling old style K6 write allocation for %d Mb\n",
 						mbytes);
-
 				}
 				break;
 			}
-			if (c->x86_model == 8 || c->x86_model == 9 || c->x86_model == 13)
-			{
+
+			if ((c->x86_model == 8 && c->x86_mask >7) ||
+			     c->x86_model == 9 || c->x86_model == 13) {
 				/* The more serious chips .. */
-				
+
 				if(mbytes>4092)
 					mbytes=4092;
 
 				rdmsr(0xC0000082, l, h);
-				if((l&0xFFFF0000)==0)
-				{
+				if((l&0xFFFF0000)==0) {
 					l=((mbytes>>2)<<22)|(1<<16);
 					save_flags(flags);
 					__cli();
@@ -695,35 +710,21 @@
 				}
 
 				/*  Set MTRR capability flag if appropriate  */
-				if((boot_cpu_data.x86_model == 13) ||
-				   (boot_cpu_data.x86_model == 9) ||
-				  ((boot_cpu_data.x86_model == 8) && 
-				   (boot_cpu_data.x86_mask >= 8)))
+				if (c->x86_model == 13 || c->x86_model == 9 ||
+				   (c->x86_model == 8 && c->x86_mask >= 8))
 					c->x86_capability |= X86_FEATURE_MTRR;
 				break;
 			}
 			break;
 
 		case 6:	/* An Athlon. We can trust the BIOS probably */
-		{
 			break;
-		}
 	}
 
 	display_cacheinfo(c);
 	return r;
 }
 
-__initfunc(static void intel_model(struct cpuinfo_x86 *c))
-{
-	unsigned int *v = (unsigned int *) c->x86_model_id;
-	cpuid(0x80000002, &v[0], &v[1], &v[2], &v[3]);
-	cpuid(0x80000003, &v[4], &v[5], &v[6], &v[7]);
-	cpuid(0x80000004, &v[8], &v[9], &v[10], &v[11]);
-	c->x86_model_id[48] = 0;
-	printk("CPU: %s\n", c->x86_model_id);
-}
-			
 
 /*
  * Read Cyrix DEVID registers (DIR) to get more detailed info. about the CPU
@@ -784,7 +785,7 @@
 static char cyrix_model_mult1[] __initdata = "12??43";
 static char cyrix_model_mult2[] __initdata = "12233445";
 
-__initfunc(static void cyrix_model(struct cpuinfo_x86 *c))
+static void __init init_cyrix(struct cpuinfo_x86 *c)
 {
 	unsigned char dir0, dir0_msn, dir0_lsn, dir1 = 0;
 	char *buf = c->x86_model_id;
@@ -860,6 +861,8 @@
                 isa_dma_bridge_buggy = 2;
                   	                                                                     	        
 #endif
+		c->x86_cache_size=16;   /* Yep 16K integrated cache thats it */
+
 		/* GXm supports extended cpuid levels 'ala' AMD */
 		if (c->cpuid_level == 2) {
 			get_model_name(c);  /* get CPU marketing name */
@@ -875,8 +878,13 @@
 		break;
 
         case 5: /* 6x86MX/M II */
-		if (dir1 > 7) dir0_msn++;  /* M II */
-		else c->coma_bug = 1;      /* 6x86MX, it has the bug. */
+		if (dir1 > 7) {
+			dir0_msn++;  /* M II */
+			/* Enable MMX extensions (App note 108) */
+			setCx86(CX86_CCR7, getCx86(CX86_CCR7)|1);
+		} else {
+			c->coma_bug = 1;      /* 6x86MX, it has the bug. */
+		}
 		tmp = (!(dir0_lsn & 7) || dir0_lsn & 1) ? 2 : 0;
 		Cx86_cb[tmp] = cyrix_model_mult2[dir0_lsn & 7];
 		p = Cx86_cb+tmp;
@@ -897,8 +905,8 @@
 			dir0_msn = 0;
 			p = Cx486S_name[0];
 			break;
-		break;
 		}
+		break;
 
 	default:  /* unknown (shouldn't happen, we know everyone ;-) */
 		dir0_msn = 7;
@@ -909,7 +917,7 @@
 	return;
 }
 
-__initfunc(static void transmeta_model(struct cpuinfo_x86 *c))
+static void __init init_transmeta(struct cpuinfo_x86 *c)
 {
 	unsigned int cap_mask, uk, max, dummy;
 	unsigned int cms_rev1, cms_rev2;
@@ -974,7 +982,31 @@
 }
 
 
-__initfunc(void get_cpu_vendor(struct cpuinfo_x86 *c))
+static void __init init_rise(struct cpuinfo_x86 *c)
+{
+	printk("CPU: Rise iDragon");
+	if (c->x86_model > 2)
+		printk(" II");
+	printk("\n");
+
+	/* Unhide possibly hidden capability flags
+	 * The mp6 iDragon family don't have MSRs
+	 * We switch on extra features with this cpuid weirdness: */
+	__asm__ (
+		"movl $0x6363452a, %%eax\n\t"
+		"movl $0x3231206c, %%ecx\n\t"
+		"movl $0x2a32313a, %%edx\n\t"
+		"cpuid\n\t"
+		"movl $0x63634523, %%eax\n\t"
+		"movl $0x32315f6c, %%ecx\n\t"
+		"movl $0x2333313a, %%edx\n\t"
+		"cpuid\n\t" : : : "eax", "ebx", "ecx", "edx"
+	);
+	c->x86_capability |= X86_FEATURE_CX8;
+}
+
+
+static void __init get_cpu_vendor(struct cpuinfo_x86 *c)
 {
 	char *v = c->x86_vendor_id;
 
@@ -998,9 +1030,211 @@
 		c->x86_vendor = X86_VENDOR_UNKNOWN;
 }
 
+
+static void __init init_centaur(struct cpuinfo_x86 *c)
+{
+	u32 hv,lv;
+	
+	/* Centaur C6 Series */
+	if(c->x86==5)
+	{
+		rdmsr(0x107, lv, hv);
+		printk("Centaur FSR was 0x%X ",lv);
+		lv|=(1<<1 | 1<<2 | 1<<7);
+		/* lv|=(1<<6);	- may help too if the board can cope */
+		printk("now 0x%X\n", lv);
+		wrmsr(0x107, lv, hv);
+		/* Emulate MTRRs using Centaur's MCR. */
+		c->x86_capability |= X86_FEATURE_MTRR;
+
+		/* Disable TSC on C6 as per errata. */
+		if (c->x86_model ==4) {
+			printk ("Disabling bugged TSC.\n");
+			c->x86_capability &= ~X86_FEATURE_TSC;
+		}
+
+		/* Set 3DNow! on Winchip 2 and above. */
+		if (c->x86_model >=8)
+		    c->x86_capability |= X86_FEATURE_AMD3D;
+
+		c->x86_capability |=X86_FEATURE_CX8;
+	}
+	/* Cyrix III 'Samuel' CPU */
+	if(c->x86 == 6 && c->x86_model == 6)
+	{
+		rdmsr(0x1107, lv, hv);
+		lv|=(1<<1);	/* Report CX8 */
+		lv|=(1<<7);	/* PGE enable */
+		wrmsr(0x1107, lv, hv);
+		/* Cyrix III */
+		c->x86_capability |= X86_FEATURE_CX8;
+		
+		/* Check for 3dnow */
+		cpuid(0x80000001, &lv, &lv, &lv, &hv);
+		if(hv&(1<<31))
+			c->x86_capability |= X86_FEATURE_AMD3D;
+	}	
+}
+
+
+static void __init init_intel(struct cpuinfo_x86 *c)
+{
+	char *p;
+	unsigned int l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */
+
+	if (c->cpuid_level > 1) {
+		/* supports eax=2  call */
+		int i, j, n;
+		int regs[4];
+		unsigned char *dp = (unsigned char *)regs;
+
+		/* Number of times to iterate */
+		n = cpuid_eax(2) & 0xFF;
+
+		for ( i = 0 ; i < n ; i++ ) {
+			cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
+			
+			/* If bit 31 is set, this is an unknown format */
+			for ( j = 0 ; j < 3 ; j++ ) {
+				if ( regs[j] < 0 ) regs[j] = 0;
+			}
+
+			/* Byte 0 is level count, not a descriptor */
+			for ( j = 1 ; j < 16 ; j++ ) {
+				unsigned char des = dp[j];
+				unsigned char dl, dh;
+				unsigned int cs;
+
+				dh = des >> 4;
+				dl = des & 0x0F;
+
+				/* Black magic... */
+
+				switch ( dh )
+				{
+				case 0:
+					switch ( dl ) {
+					case 6:
+						/* L1 I cache */
+						l1i += 8;
+						break;
+					case 8:
+						/* L1 I cache */
+						l1i += 16;
+						break;
+					case 10:
+						/* L1 D cache */
+						l1d += 8;
+						break;
+					case 12:
+						/* L1 D cache */
+						l1d += 16;
+						break;
+					default:;
+						/* TLB, or unknown */
+					}
+					break;
+				case 2:
+					if ( dl ) {
+						/* L3 cache */
+						cs = (dl-1) << 9;
+						l3 += cs;
+					}
+					break;
+				case 4:
+					if ( c->x86 > 6 && dl ) {
+						/* P4 family */
+						/* L3 cache */
+						cs = 128 << (dl-1);
+						l3 += cs;
+						break;
+					}
+					/* else same as 8 - fall through */
+				case 8:
+					if ( dl ) {
+						/* L2 cache */
+						cs = 128 << (dl-1);
+						l2 += cs;
+					}
+					break;
+				case 6:
+					if (dl > 5) {
+						/* L1 D cache */
+						cs = 8<<(dl-6);
+						l1d += cs;
+					}
+					break;
+				case 7:
+					if ( dl >= 8 ) 
+					{
+						/* L2 cache */
+						cs = 64<<(dl-8);
+						l2 += cs;
+					} else {
+						/* L0 I cache, count as L1 */
+						cs = dl ? (16 << (dl-1)) : 12;
+						l1i += cs;
+					}
+					break;
+				default:
+					/* TLB, or something else we don't know about */
+					break;
+				}
+			}
+		}
+		if ( l1i || l1d )
+			printk(KERN_INFO "CPU: L1 I cache: %dK, L1 D cache: %dK\n",
+			       l1i, l1d);
+		if ( l2 )
+			printk(KERN_INFO "CPU: L2 cache: %dK\n", l2);
+		if ( l3 )
+			printk(KERN_INFO "CPU: L3 cache: %dK\n", l3);
+
+		/*
+		 * This assumes the L3 cache is shared; it typically lives in
+		 * the northbridge.  The L1 caches are included by the L2
+		 * cache, and so should not be included for the purpose of
+		 * SMP switching weights.
+		 */
+		c->x86_cache_size = l2 ? l2 : (l1i+l1d);
+	}
+
+	/*
+	 *	Intel finally adopted the AMD/Cyrix extended id naming
+	 *	stuff for the 'Pentium IV'
+	 */
+
+	if (c->x86 == 15) {
+		get_model_name(c);
+		printk("CPU: %s\n", c->x86_model_id);
+		return;
+	}
+
+	/* Names for the Pentium II Celeron processors
+	   detectable only by also checking the cache size */
+    if (c->x86 == 6) { 
+		switch (c->x86_model) {
+			case 5:
+				if (c->x86_cache_size == 0)
+					p = "Celeron (Covington)";
+				if (c->x86_cache_size == 256)
+					p = "Mobile Pentium II (Dixon)";
+				break;
+			case 6:
+				if (c->x86_cache_size == 128)
+					p = "Celeron (Mendocino)";
+				break;
+			case 8:
+				if (c->x86_cache_size == 128)
+					p = "Celeron (Coppermine)";
+				break;
+		}
+	}
+}
+
 struct cpu_model_info {
 	int vendor;
-	int x86;
+	int family;
 	char *model_names[16];
 };
 
@@ -1042,189 +1276,120 @@
 	{ X86_VENDOR_NEXGEN,	5,
 	  { "Nx586", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	    NULL, NULL, NULL, NULL, NULL, NULL, NULL }},
+	{ X86_VENDOR_RISE,  5,
+	  { "iDragon", NULL, "iDragon", NULL, NULL, NULL, NULL,
+	    NULL, "iDragon II", "iDragon II", NULL, NULL, NULL, NULL, NULL, NULL }},
 };
 
-__initfunc(void identify_cpu(struct cpuinfo_x86 *c))
+
+static char __init *table_lookup_model(struct cpuinfo_x86 *c)
 {
+	struct cpu_model_info *info = cpu_models;
 	int i;
-	char *p = NULL;
-	extern void mcheck_init(void);
-	
-	c->loops_per_jiffy = loops_per_jiffy;
-	c->x86_cache_size = -1;
 
-	get_cpu_vendor(c);
+	if ( c->x86_model >= 16 )
+		return NULL;	/* Range check */
+
+	for ( i = 0 ; i < sizeof(cpu_models)/sizeof(struct cpu_model_info) ; i++ ) {
+		if ( info->vendor == c->x86_vendor &&
+			info->family == c->x86 ) {
+			return info->model_names[c->x86_model];
+		}
+		info++;
+	}
+	return NULL;	/* Not found */
+}
 
-	if (c->x86_vendor == X86_VENDOR_UNKNOWN &&
-	    c->cpuid_level < 0)
-		return;
 
-	/* It should be possible for the user to override this. */
-	if(c->cpuid_level > 0 && 
-	   (c->x86_vendor == X86_VENDOR_INTEL || c->x86_vendor == X86_VENDOR_TRANSMETA) &&
-	   c->x86_capability&(1<<18)) {
+static void __init squash_the_stupid_serial_number(struct cpuinfo_x86 *c)
+{
+	if (c->x86_capability&(X86_FEATURE_PN) && disable_x86_serial_nr) {
 		/* Disable processor serial number */
 		unsigned long lo,hi;
 		rdmsr(0x119,lo,hi);
 		lo |= 0x200000;
 		wrmsr(0x119,lo,hi);
-		printk(KERN_INFO "CPU serial number disabled.\n");
-	}
-
-	mcheck_init();
-	
-	if (c->x86_vendor == X86_VENDOR_CYRIX) {
-		cyrix_model(c);
-		return;
-	}
-
-	if (c->x86_vendor == X86_VENDOR_AMD && amd_model(c))
-		return;
-		
-	if (c->x86_vendor == X86_VENDOR_TRANSMETA) {
-		transmeta_model(c);
-		return;
-	}
-	
-	if(c->x86_vendor == X86_VENDOR_CENTAUR && c->x86==6)
-	{
-		/* The Cyrix III supports model naming and cache queries */
-		get_model_name(c);
-		display_cacheinfo(c);
-		return;
+		printk(KERN_NOTICE "CPU serial number disabled.\n");
+		c->x86_capability &= ~X86_FEATURE_PN;
+		c->cpuid_level = cpuid_eax(0);
 	}
+}
+int __init x86_serial_nr_setup(char *s)
+{
+	disable_x86_serial_nr = 0;
+	return 1;
+}
+__setup("serialnumber", x86_serial_nr_setup);
 
-	if (c->cpuid_level > 1) {
-		/* supports eax=2  call */
-		int regs[4];
-		int l1c=0, l1d=0, l2=0, l3=0;	/* Cache sizes */
-
-		cpuid(2, &regs[0], &regs[1], &regs[2], &regs[3]);
-
-		/* Least significant byte of eax says how many times
-		 * to call cpuid with value 2 to get cache and TLB
-		 * info.
-		 */
-		if ((regs[0] & 0xFF) != 1 )
-			printk(KERN_WARNING "Multiple cache reports are not supported yet\n");
-
-		c->x86_cache_size = 0;
-
-		for ( i = 0 ; i < 4 ; i++ ) {
-
-			int j;
-
-			if ( regs[i] < 0 )
-				continue; /* no useful data */
-
-			/* look at all the bytes returned */
-
-			for ( j = ( i == 0 ? 8:0 ) ; j < 25 ; j+=8 ) {
-
-				unsigned char rh = regs[i]>>j;
-				unsigned char rl;
-
-				rl = rh & 0x0F;
-				rh >>=4;
-
-				switch(rh) {
-
-					case 2:
-						if(rl) {
-							printk("%dK L3 cache\n", (rl-1)*512);
-							l3 += (rl-1)*512;
-						}
-						break;
-
-					case 4:
-					case 8:
-						if(rl) {
-							printk("%dK L2 cache (%d way)\n",128<<(rl-1), rh);
-							l2 += 128<<(rl-1);
-						}
-						break;
 
-					/*
-					 *	L1 caches do not count for SMP switching weights,
-					 *	they are shadowed by L2.
-					 */
+__initfunc(void identify_cpu(struct cpuinfo_x86 *c))
+{
+	c->loops_per_jiffy = loops_per_jiffy;
+	c->x86_cache_size = -1;
 
-					case 6:
-						if(rh==6 && rl > 5) {
-							printk("%dK L1 data cache\n", 8<<(rl - 6));
-							l1d+=8<<(rl-6);
-						}
-						break;
+	get_cpu_vendor(c);
 
-					case 7:
-						printk("%dK L1 instruction cache\n",
-						rl?(16<<(rl-1)):12);
-						l1c+=rl?(16<<(rl-1)):12;
-						break;
-				}	              
-			}   			
-		}
+	switch (c->x86_vendor) {
+		case X86_VENDOR_UNKNOWN:
+		default:
+			/* Not much we can do here... */
+			/* Check if at least it has cpuid */
+			if (c->cpuid_level == -1) {
+				/* No cpuid. It must be an ancient CPU */
+				if (c->x86 == 4)
+					strcpy(c->x86_model_id, "486");
+				else if (c->x86 == 3)
+					strcpy(c->x86_model_id, "386");
+			}
+			break;
 
-		if(l1c && l1d)
-			printk("CPU: L1 I Cache: %dK  L1 D Cache: %dK\n", l1c, l1d);
-		if(l2)
-			printk("CPU: L2 Cache: %dK\n", l2);
-		if(l3)
-			printk("CPU: L3 Cache: %dK\n", l3);
+		case X86_VENDOR_CYRIX:
+			init_cyrix(c);
+			return;
 
-		/*
-		 *	Assuming L3 is shared. The L1 cache is shadowed by L2
-		 *	so doesn't need to be included.
-		 */
+		case X86_VENDOR_AMD:
+			init_amd(c);
+			return;
 
-		c->x86_cache_size += l2;
-	}
+		case X86_VENDOR_CENTAUR:
+			init_centaur(c);
+			return;
 
-	/*
-	 *	Intel finally adopted the AMD/Cyrix extended id naming
-	 *	stuff for the 'Pentium IV'
-	 */
+		case X86_VENDOR_TRANSMETA:
+			init_transmeta(c);
+			return;
 
-	if(c->x86_vendor ==X86_VENDOR_INTEL && c->x86 == 15)
-	{
-		intel_model(c);
-		return;
-	}
+		case X86_VENDOR_RISE:
+			init_rise(c);
+			break;
 
-	for (i = 0; i < sizeof(cpu_models)/sizeof(struct cpu_model_info); i++) {
-		if (cpu_models[i].vendor == c->x86_vendor &&
-		    cpu_models[i].x86 == c->x86) {
-			if (c->x86_model <= 16)
-				p = cpu_models[i].model_names[c->x86_model];
-
-			/* Names for the Pentium II Celeron processors
-			   detectable only by also checking the cache size */
-			if ((cpu_models[i].vendor == X86_VENDOR_INTEL)
-			    && (cpu_models[i].x86 == 6)){ 
-				if(c->x86_model == 6 && c->x86_cache_size == 128) {
-					p = "Celeron (Mendocino)"; 
-				} else { 
-					if (c->x86_model == 5 && c->x86_cache_size == 0) {
-						p = "Celeron (Covington)";
-					}
-				}
-			}
-		}
+		case X86_VENDOR_INTEL:
+			init_intel(c);
+			break;
 	}
+	
+	squash_the_stupid_serial_number(c);
 
-	if (p) {
-		strcpy(c->x86_model_id, p);
-		return;
+	mcheck_init(c);
+	
+	/* If the model name is still unset, do table lookup. */
+	if ( !c->x86_model_id[0] ) {
+		char *p;
+		p = table_lookup_model(c);
+		if ( p )
+			strcpy(c->x86_model_id, p);
+		else
+			/* Last resort... */
+			sprintf(c->x86_model_id, "%02x/%02x",
+				c->x86_vendor, c->x86_model);
 	}
-
-	sprintf(c->x86_model_id, "%02x/%02x", c->x86_vendor, c->x86_model);
 }
 
 /*
  *	Perform early boot up checks for a valid TSC. See arch/i386/kernel/time.c
  */
  
-__initfunc(void dodgy_tsc(void))
+void __init dodgy_tsc(void)
 {
 	get_cpu_vendor(&boot_cpu_data);
 	
@@ -1232,61 +1397,15 @@
 	{
 		return;
 	}
-	cyrix_model(&boot_cpu_data);
+	init_cyrix(&boot_cpu_data);
 }
 	
-	
 
 static char *cpu_vendor_names[] __initdata = {
 	"Intel", "Cyrix", "AMD", "UMC", "NexGen", "Centaur", "Rise", "Transmeta" };
 
 
-__initfunc(void setup_centaur(struct cpuinfo_x86 *c))
-{
-	u32 hv,lv;
-	
-	/* Centaur C6 Series */
-	if(c->x86==5)
-	{
-		rdmsr(0x107, lv, hv);
-		printk("Centaur FSR was 0x%X ",lv);
-		lv|=(1<<1 | 1<<2 | 1<<7);
-		/* lv|=(1<<6);	- may help too if the board can cope */
-		printk("now 0x%X\n", lv);
-		wrmsr(0x107, lv, hv);
-		/* Emulate MTRRs using Centaur's MCR. */
-		c->x86_capability |= X86_FEATURE_MTRR;
-
-		/* Disable TSC on C6 as per errata. */
-		if (c->x86_model ==4) {
-			printk ("Disabling bugged TSC.\n");
-			c->x86_capability &= ~X86_FEATURE_TSC;
-		}
-
-		/* Set 3DNow! on Winchip 2 and above. */
-		if (c->x86_model >=8)
-		    c->x86_capability |= X86_FEATURE_AMD3D;
-
-		c->x86_capability |=X86_FEATURE_CX8;
-	}
-	/* Cyrix III 'Samuel' CPU */
-	if(c->x86 == 6 && c->x86_model == 6)
-	{
-		rdmsr(0x1107, lv, hv);
-		lv|=(1<<1);	/* Report CX8 */
-		lv|=(1<<7);	/* PGE enable */
-		wrmsr(0x1107, lv, hv);
-		/* Cyrix III */
-		c->x86_capability |= X86_FEATURE_CX8;
-		
-		/* Check for 3dnow */
-		cpuid(0x80000001, &lv, &lv, &lv, &hv);
-		if(hv&(1<<31))
-			c->x86_capability |= X86_FEATURE_AMD3D;
-	}	
-}
-
-__initfunc(void print_cpu_info(struct cpuinfo_x86 *c))
+void __init print_cpu_info(struct cpuinfo_x86 *c)
 {
 	char *vendor = NULL;
 
@@ -1307,12 +1426,9 @@
 		printk(" stepping %02x\n", c->x86_mask);
 	else
 		printk("\n");
-
-	if(c->x86_vendor == X86_VENDOR_CENTAUR) {
-		setup_centaur(c);
-	}
 }
 
+
 /*
  *	Get CPU information for use by the procfs.
  */
@@ -1322,10 +1438,10 @@
 	char *p = buffer;
 	int sep_bug;
 	static char *x86_cap_flags[] = {
-	        "fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
-	        "cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov",
-	        "16", "pse36", "psn", "19", "20", "21", "22", "mmx",
-	        "24", "xmm", "26", "27", "28", "29", "30", "31"
+		"fpu", "vme", "de", "pse", "tsc", "msr", "pae", "mce",
+		"cx8", "apic", "10", "sep", "mtrr", "pge", "mca", "cmov",
+		"pat", "pse36", "pn", "clflush", "20", "dts", "acpi", "mmx",
+		"fxsr", "sse", "sse2", "ss", "28", "tm", "ia64", "31"
 	};
 	struct cpuinfo_x86 *c = cpu_data;
 	int i, n;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/vm86.c linux.21p2/arch/i386/kernel/vm86.c
--- linux.vanilla/arch/i386/kernel/vm86.c	Sat Dec 29 16:57:19 2001
+++ linux.21p2/arch/i386/kernel/vm86.c	Sat Dec 29 03:24:34 2001
@@ -330,74 +330,176 @@
  * Boy are these ugly, but we need to do the correct 16-bit arithmetic.
  * Gcc makes a mess of it, so we do it inline and use non-obvious calling
  * conventions..
+ * FIXME: is VM86_UNKNOWN really the correct return code?
  */
-#define pushb(base, ptr, val) \
-__asm__ __volatile__( \
-	"decw %w0\n\t" \
-	"movb %2,0(%1,%0)" \
-	: "=r" (ptr) \
-	: "r" (base), "q" (val), "0" (ptr))
-
-#define pushw(base, ptr, val) \
-__asm__ __volatile__( \
-	"decw %w0\n\t" \
-	"movb %h2,0(%1,%0)\n\t" \
-	"decw %w0\n\t" \
-	"movb %b2,0(%1,%0)" \
-	: "=r" (ptr) \
-	: "r" (base), "q" (val), "0" (ptr))
-
-#define pushl(base, ptr, val) \
-__asm__ __volatile__( \
-	"decw %w0\n\t" \
-	"rorl $16,%2\n\t" \
-	"movb %h2,0(%1,%0)\n\t" \
-	"decw %w0\n\t" \
-	"movb %b2,0(%1,%0)\n\t" \
-	"decw %w0\n\t" \
-	"rorl $16,%2\n\t" \
-	"movb %h2,0(%1,%0)\n\t" \
-	"decw %w0\n\t" \
-	"movb %b2,0(%1,%0)" \
-	: "=r" (ptr) \
-	: "r" (base), "q" (val), "0" (ptr))
-
-#define popb(base, ptr) \
-({ unsigned long __res; \
-__asm__ __volatile__( \
-	"movb 0(%1,%0),%b2\n\t" \
-	"incw %w0" \
-	: "=r" (ptr), "=r" (base), "=q" (__res) \
-	: "0" (ptr), "1" (base), "2" (0)); \
-__res; })
-
-#define popw(base, ptr) \
-({ unsigned long __res; \
-__asm__ __volatile__( \
-	"movb 0(%1,%0),%b2\n\t" \
-	"incw %w0\n\t" \
-	"movb 0(%1,%0),%h2\n\t" \
-	"incw %w0" \
-	: "=r" (ptr), "=r" (base), "=q" (__res) \
-	: "0" (ptr), "1" (base), "2" (0)); \
-__res; })
-
-#define popl(base, ptr) \
-({ unsigned long __res; \
-__asm__ __volatile__( \
-	"movb 0(%1,%0),%b2\n\t" \
-	"incw %w0\n\t" \
-	"movb 0(%1,%0),%h2\n\t" \
-	"incw %w0\n\t" \
-	"rorl $16,%2\n\t" \
-	"movb 0(%1,%0),%b2\n\t" \
-	"incw %w0\n\t" \
-	"movb 0(%1,%0),%h2\n\t" \
-	"incw %w0\n\t" \
-	"rorl $16,%2" \
-	: "=r" (ptr), "=r" (base), "=q" (__res) \
-	: "0" (ptr), "1" (base)); \
-__res; })
+#define pushb(base, ptr, val, regs) \
+	do { \
+		int err; \
+		__asm__ __volatile__(				\
+			"decw %w0\n\t"				\
+			"1: movb %3,0(%2,%0)\n\t"		\
+			"xor %1,%1\n\t"				\
+			"2:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"3:	movl $1,%1\n\t"			\
+			"	jmp 2b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,3b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (err)		\
+			: "r" (base), "q" (val), "0" (ptr));	\
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+	} while(0)
+
+#define pushw(base, ptr, val, regs) \
+	do { \
+		int err; \
+		__asm__ __volatile__(				\
+			"decw %w0\n\t"				\
+			"1: movb %h3,0(%2,%0)\n\t"		\
+			"decw %w0\n\t"				\
+			"2: movb %b3,0(%2,%0)\n\t"		\
+			"xor %1,%1\n\t"				\
+			"3:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"4:	movl $1,%1\n\t"			\
+			"	jmp 3b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,4b\n"			\
+			"	.long 2b,4b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (err)		\
+			: "r" (base), "q" (val), "0" (ptr));	\
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+	} while(0)
+
+#define pushl(base, ptr, val, regs) \
+	do { \
+		int err; \
+		__asm__ __volatile__(				\
+			"decw %w0\n\t"				\
+			"rorl $16,%3\n\t"			\
+			"1: movb %h3,0(%2,%0)\n\t"		\
+			"decw %w0\n\t"				\
+			"2: movb %b3,0(%2,%0)\n\t"		\
+			"decw %w0\n\t"				\
+			"rorl $16,%3\n\t"			\
+			"3: movb %h3,0(%2,%0)\n\t"		\
+			"decw %w0\n\t"				\
+			"4: movb %b3,0(%2,%0)\n\t"		\
+			"xor %1,%1\n\t"				\
+			"5:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"6:	movl $1,%1\n\t"			\
+			"	jmp 5b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,6b\n"			\
+			"	.long 2b,6b\n"			\
+			"	.long 3b,6b\n"			\
+			"	.long 4b,6b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (err)		\
+			: "r" (base), "q" (val), "0" (ptr));	\
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+	} while(0)
+
+#define popb(base, ptr, regs) \
+	({ \
+	 	unsigned long __res; \
+	 	unsigned int err; \
+		__asm__ __volatile__( \
+			"1:movb 0(%1,%0),%b2\n\t"		\
+			"incw %w0\n\t"				\
+			"xor %3,%3\n\t"				\
+			"2:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"3:	movl $1,%1\n\t"			\
+			"	jmp 2b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,3b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (base), "=q" (__res), \
+				"=r" (err) \
+			: "0" (ptr), "1" (base), "2" (0)); \
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+		__res; \
+	})
+
+#define popw(base, ptr, regs) \
+	({ \
+	 	unsigned long __res; \
+	 	unsigned int err; \
+		__asm__ __volatile__( \
+			"1:movb 0(%1,%0),%b2\n\t"		\
+			"incw %w0\n\t"				\
+			"2:movb 0(%1,%0),%h2\n\t"		\
+			"incw %w0\n\t"				\
+			"xor %3,%3\n\t"				\
+			"3:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"4:	movl $1,%1\n\t"			\
+			"	jmp 3b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,4b\n"			\
+			"	.long 2b,4b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (base), "=q" (__res), \
+				"=r" (err) \
+			: "0" (ptr), "1" (base), "2" (0)); \
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+		__res; \
+	})
+
+#define popl(base, ptr, regs) \
+	({ \
+	 	unsigned long __res; \
+	 	unsigned int err; \
+		__asm__ __volatile__( \
+			"1:movb 0(%1,%0),%b2\n\t"		\
+			"incw %w0\n\t"				\
+			"2:movb 0(%1,%0),%h2\n\t"		\
+			"incw %w0\n\t"				\
+			"rorl $16,%2\n\t"			\
+			"3:movb 0(%1,%0),%b2\n\t"		\
+			"incw %w0\n\t"				\
+			"4:movb 0(%1,%0),%h2\n\t"		\
+			"incw %w0\n\t"				\
+			"rorl $16,%2\n\t"			\
+			"xor %3,%3\n\t"				\
+			"5:\n"					\
+			".section .fixup,\"ax\"\n\t"		\
+			"6:	movl $1,%1\n\t"			\
+			"	jmp 5b\n\t"			\
+			".previous\n"				\
+			".section __ex_table,\"a\"\n"		\
+			"	.align 4\n"			\
+			"	.long 1b,6b\n"			\
+			"	.long 2b,6b\n"			\
+			"	.long 3b,6b\n"			\
+			"	.long 4b,6b\n"			\
+			".previous"				\
+			: "=r" (ptr), "=r" (base), "=q" (__res), \
+				"=r" (err) \
+			: "0" (ptr), "1" (base), "2" (0)); \
+		if (err) \
+			return_to_32bit(regs, VM86_UNKNOWN); \
+		__res; \
+	})
 
 static void do_int(struct kernel_vm86_regs *regs, int i, unsigned char * ssp, unsigned long sp)
 {
@@ -414,9 +516,9 @@
 		goto cannot_handle;
 	if ((segoffs >> 16) == BIOSSEG)
 		goto cannot_handle;
-	pushw(ssp, sp, get_vflags(regs));
-	pushw(ssp, sp, regs->cs);
-	pushw(ssp, sp, IP(regs));
+	pushw(ssp, sp, get_vflags(regs), regs);
+	pushw(ssp, sp, regs->cs, regs);
+	pushw(ssp, sp, IP(regs), regs);
 	regs->cs = segoffs >> 16;
 	SP(regs) -= 6;
 	IP(regs) = segoffs & 0xffff;
@@ -460,7 +562,7 @@
 
 #define CHECK_IF_IN_TRAP \
 	if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \
-		pushw(ssp,sp,popw(ssp,sp) | TF_MASK);
+		pushw(ssp,sp,popw(ssp,sp, regs) | TF_MASK, regs);
 #define VM86_FAULT_RETURN \
 	if (VMPI.force_return_for_pic  && (VEFLAGS & IF_MASK)) \
 		return_to_32bit(regs, VM86_PICRETURN); \
@@ -471,17 +573,17 @@
 	sp = SP(regs);
 	ip = IP(regs);
 
-	switch (popb(csp, ip)) {
+	switch (popb(csp, ip, regs)) {
 
 	/* operand size override */
 	case 0x66:
-		switch (popb(csp, ip)) {
+		switch (popb(csp, ip, regs)) {
 
 		/* pushfd */
 		case 0x9c:
 			SP(regs) -= 4;
 			IP(regs) += 2;
-			pushl(ssp, sp, get_vflags(regs));
+			pushl(ssp, sp, get_vflags(regs), regs);
 			VM86_FAULT_RETURN;
 
 		/* popfd */
@@ -489,16 +591,16 @@
 			SP(regs) += 4;
 			IP(regs) += 2;
 			CHECK_IF_IN_TRAP
-			set_vflags_long(popl(ssp, sp), regs);
+			set_vflags_long(popl(ssp, sp, regs), regs);
 			VM86_FAULT_RETURN;
 
 		/* iretd */
 		case 0xcf:
 			SP(regs) += 12;
-			IP(regs) = (unsigned short)popl(ssp, sp);
-			regs->cs = (unsigned short)popl(ssp, sp);
+			IP(regs) = (unsigned short)popl(ssp, sp, regs);
+			regs->cs = (unsigned short)popl(ssp, sp, regs);
 			CHECK_IF_IN_TRAP
-			set_vflags_long(popl(ssp, sp), regs);
+			set_vflags_long(popl(ssp, sp, regs), regs);
 			VM86_FAULT_RETURN;
 		/* need this to avoid a fallthrough */
 		default:
@@ -509,7 +611,7 @@
 	case 0x9c:
 		SP(regs) -= 2;
 		IP(regs)++;
-		pushw(ssp, sp, get_vflags(regs));
+		pushw(ssp, sp, get_vflags(regs), regs);
 		VM86_FAULT_RETURN;
 
 	/* popf */
@@ -517,12 +619,12 @@
 		SP(regs) += 2;
 		IP(regs)++;
 		CHECK_IF_IN_TRAP
-		set_vflags_short(popw(ssp, sp), regs);
+		set_vflags_short(popw(ssp, sp, regs), regs);
 		VM86_FAULT_RETURN;
 
 	/* int xx */
 	case 0xcd: {
-	        int intno=popb(csp, ip);
+	        int intno=popb(csp, ip, regs);
 		IP(regs) += 2;
 		if (VMPI.vm86dbg_active) {
 			if ( (1 << (intno &7)) & VMPI.vm86dbg_intxxtab[intno >> 3] )
@@ -535,10 +637,10 @@
 	/* iret */
 	case 0xcf:
 		SP(regs) += 6;
-		IP(regs) = popw(ssp, sp);
-		regs->cs = popw(ssp, sp);
+		IP(regs) = popw(ssp, sp, regs);
+		regs->cs = popw(ssp, sp, regs);
 		CHECK_IF_IN_TRAP
-		set_vflags_short(popw(ssp, sp), regs);
+		set_vflags_short(popw(ssp, sp, regs), regs);
 		VM86_FAULT_RETURN;
 
 	/* cli */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/mm/init.c linux.21p2/arch/i386/mm/init.c
--- linux.vanilla/arch/i386/mm/init.c	Sun Mar 25 17:37:30 2001
+++ linux.21p2/arch/i386/mm/init.c	Tue Jan  1 21:15:24 2002
@@ -185,33 +185,8 @@
 extern char _text, _etext, _edata, __bss_start, _end;
 extern char __init_begin, __init_end;
 
-#define X86_CR4_VME		0x0001		/* enable vm86 extensions */
-#define X86_CR4_PVI		0x0002		/* virtual interrupts flag enable */
-#define X86_CR4_TSD		0x0004		/* disable time stamp at ipl 3 */
-#define X86_CR4_DE		0x0008		/* enable debugging extensions */
-#define X86_CR4_PSE		0x0010		/* enable page size extensions */
-#define X86_CR4_PAE		0x0020		/* enable physical address extensions */
-#define X86_CR4_MCE		0x0040		/* Machine check enable */
-#define X86_CR4_PGE		0x0080		/* enable global pages */
-#define X86_CR4_PCE		0x0100		/* enable performance counters at ipl 3 */
-
-/*
- * Save the cr4 feature set we're using (ie
- * Pentium 4MB enable and PPro Global page
- * enable), so that any CPU's that boot up
- * after us can get the correct flags.
- */
 unsigned long mmu_cr4_features __initdata = 0;
 
-static inline void set_in_cr4(unsigned long mask)
-{
-	mmu_cr4_features |= mask;
-	__asm__("movl %%cr4,%%eax\n\t"
-		"orl %0,%%eax\n\t"
-		"movl %%eax,%%cr4\n"
-		: : "irg" (mask)
-		:"ax");
-}
 
 /*
  * allocate page table(s) for compile-time fixed mappings
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/ppc_ksyms.c linux.21p2/arch/ppc/kernel/ppc_ksyms.c
--- linux.vanilla/arch/ppc/kernel/ppc_ksyms.c	Sun Mar 25 17:37:30 2001
+++ linux.21p2/arch/ppc/kernel/ppc_ksyms.c	Sat Dec 29 03:07:41 2001
@@ -73,7 +73,7 @@
 EXPORT_SYMBOL(isa_mem_base);
 EXPORT_SYMBOL(pci_dram_offset);
 EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
-EXPORT_SYMBOL(DMA_MODE_READ);
+EXPORT_SYMBOL_NOVERS(DMA_MODE_READ);
 EXPORT_SYMBOL(DMA_MODE_WRITE);
 #if defined(CONFIG_PREP) || defined(CONFIG_ALL_PPC)
 EXPORT_SYMBOL(_prep_type);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ll_rw_blk.c linux.21p2/drivers/block/ll_rw_blk.c
--- linux.vanilla/drivers/block/ll_rw_blk.c	Sat Dec 29 16:57:20 2001
+++ linux.21p2/drivers/block/ll_rw_blk.c	Sat Dec 29 03:07:26 2001
@@ -975,7 +975,7 @@
 	isp16_init();
 #endif CONFIG_ISP16_CDI
 #ifdef CONFIG_BLK_DEV_IDE
-#ifdef CONFIG_POWERMAC
+#if defined(CONFIG_BLK_DEV_IDE_PMAC)
 	ide_pmac_init();
 #else
 	ide_init();		/* this MUST precede hd_init */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/bttv.c linux.21p2/drivers/char/bttv.c
--- linux.vanilla/drivers/char/bttv.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/char/bttv.c	Sat Dec 29 03:13:31 2001
@@ -1981,7 +1981,7 @@
 				}
 			} else if (vw.clipcount > 2048) 
 				return -ENOMEM;
-			else {
+			else if (vw.clipcount) {
 				if((vcp=vmalloc(sizeof(struct video_clip)*
 					(vw.clipcount))) == NULL)
 					return -ENOMEM;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/sx.c linux.21p2/drivers/char/sx.c
--- linux.vanilla/drivers/char/sx.c	Sun Mar 25 17:37:31 2001
+++ linux.21p2/drivers/char/sx.c	Wed Jan  2 11:01:09 2002
@@ -1169,7 +1169,8 @@
 				/* DCD went UP */
 				if( (~(port->gs.flags & ASYNC_NORMAL_ACTIVE) || 
 						 ~(port->gs.flags & ASYNC_CALLOUT_ACTIVE)) &&
-						(sx_read_channel_byte(port, hi_hstat) != HS_IDLE_CLOSED)) {
+						(sx_read_channel_byte(port, hi_hstat) != HS_IDLE_CLOSED) &&
+						!(port->gs.tty->termios->c_cflag & CLOCAL) ) {
 					/* Are we blocking in open?*/
 					sx_dprintk (SX_DEBUG_MODEMSIGNALS, "DCD active, unblocking open\n");
 					wake_up_interruptible(&port->gs.open_wait);
@@ -1179,7 +1180,8 @@
 			} else {
 				/* DCD went down! */
 				if (!((port->gs.flags & ASYNC_CALLOUT_ACTIVE) &&
-				      (port->gs.flags & ASYNC_CALLOUT_NOHUP))) {
+				      (port->gs.flags & ASYNC_CALLOUT_NOHUP)) &&
+				    !(port->gs.tty->termios->c_cflag & CLOCAL) ) {
 					sx_dprintk (SX_DEBUG_MODEMSIGNALS, "DCD dropped. hanging up....\n");
 					tty_hangup (port->gs.tty);
 				} else {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/Config.in linux.21p2/drivers/isdn/Config.in
--- linux.vanilla/drivers/isdn/Config.in	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/Config.in	Tue Jan  1 21:18:31 2002
@@ -16,9 +16,7 @@
 if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
    bool '    Support AT-Fax Class 1 and 2 commands' CONFIG_ISDN_TTY_FAX
 fi
-
-#  CONFIG_X25 is defined only when CONFIG_EXPERIMENTAL=y
-if [ "$CONFIG_EXPERIMENTAL" = "y" -a "$CONFIG_X25" != "n" ]; then
+if [ "$CONFIG_X25" != "n" ]; then
    bool '  X.25 PLP on top of ISDN' CONFIG_ISDN_X25
 fi
 
@@ -71,8 +69,8 @@
    bool '  Gazel cards' CONFIG_HISAX_GAZEL
    bool '  HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI
    bool '  Winbond W6692 based cards' CONFIG_HISAX_W6692
-   bool '  HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
    if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
+      bool '  HFC-S+, HFC-SP, HFC-PCMCIA cards' CONFIG_HISAX_HFC_SX
 #      bool '  TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
       if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
 	 bool '  Am7930' CONFIG_HISAX_AMD7930
@@ -130,7 +128,7 @@
    dep_tristate '  AVM B1 PCI support' CONFIG_ISDN_DRV_AVMB1_B1PCI $CONFIG_ISDN_CAPI $CONFIG_PCI
    dep_mbool    '    AVM B1 PCI V4 support' CONFIG_ISDN_DRV_AVMB1_B1PCIV4 $CONFIG_ISDN_DRV_AVMB1_B1PCI
    dep_tristate '  AVM T1/T1-B ISA support' CONFIG_ISDN_DRV_AVMB1_T1ISA $CONFIG_ISDN_CAPI
-   dep_tristate '  AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI $CONFIG_PCMCIA
+   dep_tristate '  AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI
    dep_tristate '  AVM T1/T1-B PCI support' CONFIG_ISDN_DRV_AVMB1_T1PCI $CONFIG_ISDN_CAPI $CONFIG_PCI
    dep_tristate '  AVM C4/C2 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI
 fi
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/act2000.h linux.21p2/drivers/isdn/act2000/act2000.h
--- linux.vanilla/drivers/isdn/act2000/act2000.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/act2000/act2000.h	Tue Jan  1 23:14:36 2002
@@ -1,35 +1,19 @@
-/* $Id: act2000.h,v 1.8.6.2 2001/02/16 16:43:23 kai Exp $
+/* $Id: act2000.h,v 1.1.2.1 2001/12/31 13:26:35 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
 #ifndef act2000_h
 #define act2000_h
-
-#ifdef __KERNEL__
-/* Kernel includes */
-
-#include <linux/module.h>
-#include <linux/version.h>
-#endif
 
 #define ACT2000_IOCTL_SETPORT    1
 #define ACT2000_IOCTL_GETPORT    2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/act2000_isa.c linux.21p2/drivers/isdn/act2000/act2000_isa.c
--- linux.vanilla/drivers/isdn/act2000/act2000_isa.c	Sun Mar 25 17:37:31 2001
+++ linux.21p2/drivers/isdn/act2000/act2000_isa.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,14 @@
-/* $Id: act2000_isa.c,v 1.11 2000/11/12 16:32:06 kai Exp $
+/* $Id: act2000_isa.c,v 1.1.2.1 2001/12/31 13:26:37 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/act2000_isa.h linux.21p2/drivers/isdn/act2000/act2000_isa.h
--- linux.vanilla/drivers/isdn/act2000/act2000_isa.h	Sun Mar 25 17:37:31 2001
+++ linux.21p2/drivers/isdn/act2000/act2000_isa.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,14 @@
-/* $Id: act2000_isa.h,v 1.4 2000/11/12 16:32:06 kai Exp $
+/* $Id: act2000_isa.h,v 1.1.2.1 2001/12/31 13:26:38 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/capi.c linux.21p2/drivers/isdn/act2000/capi.c
--- linux.vanilla/drivers/isdn/act2000/capi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/act2000/capi.c	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,15 @@
-/* $Id: capi.c,v 1.9.6.1 2001/02/16 16:43:23 kai Exp $
+/* $Id: capi.c,v 1.1.2.1 2001/12/31 13:26:38 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
- *        CAPI encoder/decoder
+ * CAPI encoder/decoder
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/capi.h linux.21p2/drivers/isdn/act2000/capi.h
--- linux.vanilla/drivers/isdn/act2000/capi.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/act2000/capi.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,14 @@
-/* $Id: capi.h,v 1.6.6.1 2001/02/16 16:43:23 kai Exp $
+/* $Id: capi.h,v 1.1.2.1 2001/12/31 13:26:38 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/module.c linux.21p2/drivers/isdn/act2000/module.c
--- linux.vanilla/drivers/isdn/act2000/module.c	Sun Mar 25 17:37:31 2001
+++ linux.21p2/drivers/isdn/act2000/module.c	Tue Jan  1 21:22:31 2002
@@ -1,29 +1,21 @@
-/* $Id: module.c,v 1.14.6.2 2000/12/18 22:14:10 kai Exp $
+/* $Id: module.c,v 1.1.2.1 2001/12/31 13:26:38 kai Exp $
  *
  * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
  *
- * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
- * Thanks to Friedemann Baitinger and IBM Germany
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author       Fritz Elfert
+ * Copyright    by Fritz Elfert      <fritz@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * Thanks to Friedemann Baitinger and IBM Germany
  *
  */
 
 #include "act2000.h"
 #include "act2000_isa.h"
 #include "capi.h"
+#include <linux/module.h>
 #include <linux/init.h>
 
 static unsigned short act2000_isa_ports[] =
@@ -41,9 +33,9 @@
 static int   act_irq  = -1;  /* -1 = Autoselect */
 static char *act_id   = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
 
-MODULE_DESCRIPTION(       "Driver for IBM Active 2000 ISDN card");
+MODULE_DESCRIPTION(       "ISDN4Linux: Driver for IBM Active 2000 ISDN card");
 MODULE_AUTHOR(            "Fritz Elfert");
-MODULE_SUPPORTED_DEVICE(  "ISDN subsystem");
+MODULE_LICENSE(           "GPL");
 MODULE_PARM_DESC(act_bus, "BusType of first card, 1=ISA, 2=MCA, 3=PCMCIA, currently only ISA");
 MODULE_PARM_DESC(membase, "Base port address of first card");
 MODULE_PARM_DESC(act_irq, "IRQ of first card (-1 = grab next free IRQ)");
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/Makefile linux.21p2/drivers/isdn/avmb1/Makefile
--- linux.vanilla/drivers/isdn/avmb1/Makefile	Sun Mar 25 17:37:31 2001
+++ linux.21p2/drivers/isdn/avmb1/Makefile	Tue Jan  1 21:18:31 2002
@@ -24,7 +24,6 @@
 obj-$(CONFIG_ISDN_DRV_AVMB1_B1ISA)	+= b1isa.o b1.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_B1PCI)	+= b1pci.o b1.o b1dma.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_B1PCMCIA)	+= b1pcmcia.o b1.o
-obj-$(CONFIG_ISDN_DRV_AVMB1_AVM_CS)	+= avm_cs.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1ISA)	+= t1isa.o b1.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1PCI)	+= t1pci.o b1.o b1dma.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_C4)		+= c4.o b1.o
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/avmcard.h linux.21p2/drivers/isdn/avmb1/avmcard.h
--- linux.vanilla/drivers/isdn/avmb1/avmcard.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/avmcard.h	Tue Jan  1 21:22:31 2002
@@ -1,7 +1,9 @@
-/*
- * $Id: avmcard.h,v 1.8.6.3 2001/05/17 21:15:33 kai Exp $
+/* $Id: avmcard.h,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  *
- * Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1.c linux.21p2/drivers/isdn/avmb1/b1.c
--- linux.vanilla/drivers/isdn/avmb1/b1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/b1.c	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,11 @@
-/*
- * $Id: b1.c,v 1.20.6.6 2001/05/17 21:15:33 kai Exp $
+/* $Id: b1.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Common module for AVM B1 cards.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -26,11 +28,13 @@
 #include "capicmd.h"
 #include "capiutil.h"
 
-static char *revision = "$Revision: 1.20.6.6 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Common support for active AVM cards");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1dma.c linux.21p2/drivers/isdn/avmb1/b1dma.c
--- linux.vanilla/drivers/isdn/avmb1/b1dma.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/b1dma.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: b1dma.c,v 1.11.6.7 2001/07/18 16:02:15 kai Exp $
+/* $Id: b1dma.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Common module for AVM B1 cards that support dma with AMCC
  * 
- * (c) Copyright 2000 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 2000 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/config.h>
@@ -31,11 +33,13 @@
 #error FIXME: driver requires 32-bit platform
 #endif
 
-static char *revision = "$Revision: 1.11.6.7 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: DMA support for active AVM cards");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 static int suppress_pollack = 0;
 MODULE_PARM(suppress_pollack, "0-1i");
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1isa.c linux.21p2/drivers/isdn/avmb1/b1isa.c
--- linux.vanilla/drivers/isdn/avmb1/b1isa.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/b1isa.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: b1isa.c,v 1.10.6.5 2001/05/17 20:41:51 kai Exp $
+/* $Id: b1isa.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Module for AVM B1 ISA-card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/module.h>
@@ -23,11 +25,13 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.10.6.5 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM B1 ISA card");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1pci.c linux.21p2/drivers/isdn/avmb1/b1pci.c
--- linux.vanilla/drivers/isdn/avmb1/b1pci.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/b1pci.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: b1pci.c,v 1.29.6.4 2001/05/17 20:41:51 kai Exp $
+/* $Id: b1pci.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Module for AVM B1 PCI-card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/config.h>
@@ -25,11 +27,13 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.29.6.4 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM B1 PCI card");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1pcmcia.c linux.21p2/drivers/isdn/avmb1/b1pcmcia.c
--- linux.vanilla/drivers/isdn/avmb1/b1pcmcia.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/b1pcmcia.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: b1pcmcia.c,v 1.12.6.4 2001/05/17 20:41:51 kai Exp $
+/* $Id: b1pcmcia.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Module for AVM B1/M1/M2 PCMCIA-card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/module.h>
@@ -23,11 +25,13 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.12.6.4 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM PCMCIA cards");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/c4.c linux.21p2/drivers/isdn/avmb1/c4.c
--- linux.vanilla/drivers/isdn/avmb1/c4.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/c4.c	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,11 @@
-/*
- * $Id: c4.c,v 1.20.6.10 2001/06/09 15:14:15 kai Exp $
+/* $Id: c4.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  * 
  * Module for AVM C4 & C2 card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -28,7 +30,7 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.20.6.10 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 #undef CONFIG_C4_DEBUG
 #undef CONFIG_C4_POLLDEBUG
@@ -37,7 +39,9 @@
 
 static int suppress_pollack;
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM C2/C4 cards");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 MODULE_PARM(suppress_pollack, "0-1i");
 
 /* ------------------------------------------------------------- */
@@ -1362,7 +1366,7 @@
 		MOD_DEC_USE_COUNT;
 		return retval;
 	}
-	retval = search_cards(&c2_driver, 0x1100, 2);
+	retval = search_cards(&c2_driver, PCI_DEVICE_ID_AVM_C2, 2);
 	if (retval && ncards == 0) {
     		detach_capi_driver(&c2_driver);
     		detach_capi_driver(&c4_driver);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capi.c linux.21p2/drivers/isdn/avmb1/capi.c
--- linux.vanilla/drivers/isdn/avmb1/capi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capi.c	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,11 @@
-/*
- * $Id: capi.c,v 1.44.6.12 2001/06/09 15:14:15 kai Exp $
+/* $Id: capi.c,v 1.1.2.1 2001/12/31 13:26:39 kai Exp $
  *
  * CAPI 2.0 Interface for Linux
  *
- * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1996 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -43,9 +45,11 @@
 #include "capifs.h"
 #endif
 
-static char *revision = "$Revision: 1.44.6.12 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
-MODULE_AUTHOR("Carsten Paeth (calle@calle.in-berlin.de)");
+MODULE_DESCRIPTION("CAPI4Linux: Userspace /dev/capi20 interface");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 #undef _DEBUG_REFCOUNT		/* alloc/free and open/close debug */
 #undef _DEBUG_TTYFUNCS		/* call to tty_driver */
@@ -83,10 +87,10 @@
 	struct capincci  *nccip;
 	unsigned int      minor;
 
-	__u16		 applid;
-	__u32		 ncci;
-	__u16		 datahandle;
-	__u16		 msgid;
+	u16  		 applid;
+	u32		 ncci;
+	u16		 datahandle;
+	u16		 msgid;
 
 	struct file      *file;
 	struct tty_struct *tty;
@@ -108,7 +112,7 @@
 	/* transmit path */
 	struct datahandle_queue {
 		    struct datahandle_queue *next;
-		    __u16                    datahandle;
+		    u16                      datahandle;
 	} *ackqueue;
 	int nack;
 
@@ -117,7 +121,7 @@
 
 struct capincci {
 	struct capincci *next;
-	__u32		 ncci;
+	u32		 ncci;
 	struct capidev	*cdev;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 	struct capiminor *minorp;
@@ -127,8 +131,8 @@
 struct capidev {
 	struct capidev *next;
 	struct file    *file;
-	__u16		applid;
-	__u16		errcode;
+	u16		applid;
+	u16		errcode;
 	unsigned int    minor;
 	unsigned        userflags;
 
@@ -156,7 +160,7 @@
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 /* -------- datahandles --------------------------------------------- */
 
-int capincci_add_ack(struct capiminor *mp, __u16 datahandle)
+static int capincci_add_ack(struct capiminor *mp, u16 datahandle)
 {
 	struct datahandle_queue *n, **pp;
 
@@ -174,7 +178,7 @@
 	return 0;
 }
 
-int capiminor_del_ack(struct capiminor *mp, __u16 datahandle)
+static int capiminor_del_ack(struct capiminor *mp, u16 datahandle)
 {
 	struct datahandle_queue **pp, *p;
 
@@ -190,7 +194,7 @@
 	return -1;
 }
 
-void capiminor_del_all_ack(struct capiminor *mp)
+static void capiminor_del_all_ack(struct capiminor *mp)
 {
 	struct datahandle_queue **pp, *p;
 
@@ -206,7 +210,7 @@
 
 /* -------- struct capiminor ---------------------------------------- */
 
-struct capiminor *capiminor_alloc(__u16 applid, __u32 ncci)
+static struct capiminor *capiminor_alloc(u16 applid, u32 ncci)
 {
 	struct capiminor *mp, **pp;
         unsigned int minor = 0;
@@ -247,7 +251,7 @@
 	return mp;
 }
 
-void capiminor_free(struct capiminor *mp)
+static void capiminor_free(struct capiminor *mp)
 {
 	struct capiminor **pp;
 
@@ -273,7 +277,7 @@
 	}
 }
 
-struct capiminor *capiminor_find(unsigned int minor)
+static struct capiminor *capiminor_find(unsigned int minor)
 {
 	struct capiminor *p;
 	for (p = minors; p && p->minor != minor; p = p->next)
@@ -284,7 +288,7 @@
 
 /* -------- struct capincci ----------------------------------------- */
 
-static struct capincci *capincci_alloc(struct capidev *cdev, __u32 ncci)
+static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci)
 {
 	struct capincci *np, **pp;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -321,7 +325,7 @@
         return np;
 }
 
-static void capincci_free(struct capidev *cdev, __u32 ncci)
+static void capincci_free(struct capidev *cdev, u32 ncci)
 {
 	struct capincci *np, **pp;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -365,7 +369,7 @@
 	}
 }
 
-struct capincci *capincci_find(struct capidev *cdev, __u32 ncci)
+static struct capincci *capincci_find(struct capidev *cdev, u32 ncci)
 {
 	struct capincci *p;
 
@@ -416,7 +420,7 @@
 	kfree(cdev);
 }
 
-static struct capidev *capidev_find(__u16 applid)
+static struct capidev *capidev_find(u16 applid)
 {
 	struct capidev *p;
 	for (p=capidev_openlist; p; p = p->next) {
@@ -429,13 +433,13 @@
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 /* -------- handle data queue --------------------------------------- */
 
-struct sk_buff *
+static struct sk_buff *
 gen_data_b3_resp_for(struct capiminor *mp, struct sk_buff *skb)
 {
 	struct sk_buff *nskb;
 	nskb = alloc_skb(CAPI_DATA_B3_RESP_LEN, GFP_ATOMIC);
 	if (nskb) {
-		__u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2);
+		u16 datahandle = CAPIMSG_U16(skb->data,CAPIMSG_BASELEN+4+4+2);
 		unsigned char *s = skb_put(nskb, CAPI_DATA_B3_RESP_LEN);
 		capimsg_setu16(s, 0, CAPI_DATA_B3_RESP_LEN);
 		capimsg_setu16(s, 2, mp->applid);
@@ -448,11 +452,11 @@
 	return nskb;
 }
 
-int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
+static int handle_recv_skb(struct capiminor *mp, struct sk_buff *skb)
 {
 	struct sk_buff *nskb;
 	unsigned int datalen;
-	__u16 errcode, datahandle;
+	u16 errcode, datahandle;
 
 	datalen = skb->len - CAPIMSG_LEN(skb->data);
 	if (mp->tty) {
@@ -528,7 +532,7 @@
 	return -1;
 }
 
-void handle_minor_recv(struct capiminor *mp)
+static void handle_minor_recv(struct capiminor *mp)
 {
 	struct sk_buff *skb;
 	while ((skb = skb_dequeue(&mp->inqueue)) != 0) {
@@ -542,13 +546,13 @@
 	}
 }
 
-int handle_minor_send(struct capiminor *mp)
+static int handle_minor_send(struct capiminor *mp)
 {
 	struct sk_buff *skb;
-	__u16 len;
+	u16 len;
 	int count = 0;
-	__u16 errcode;
-	__u16 datahandle;
+	u16 errcode;
+	u16 datahandle;
 
 	if (mp->tty && mp->ttyoutstop) {
 #if defined(_DEBUG_DATAFLOW) || defined(_DEBUG_TTYFUNCS)
@@ -559,7 +563,7 @@
 
 	while ((skb = skb_dequeue(&mp->outqueue)) != 0) {
 		datahandle = mp->datahandle;
-		len = (__u16)skb->len;
+		len = (u16)skb->len;
 		skb_push(skb, CAPI_DATA_B3_REQ_LEN);
 		memset(skb->data, 0, CAPI_DATA_B3_REQ_LEN);
 		capimsg_setu16(skb->data, 0, CAPI_DATA_B3_REQ_LEN);
@@ -568,7 +572,7 @@
 		capimsg_setu8 (skb->data, 5, CAPI_REQ);
 		capimsg_setu16(skb->data, 6, mp->msgid++);
 		capimsg_setu32(skb->data, 8, mp->ncci);	/* NCCI */
-		capimsg_setu32(skb->data, 12, (__u32) skb->data); /* Data32 */
+		capimsg_setu32(skb->data, 12, (u32) skb->data); /* Data32 */
 		capimsg_setu16(skb->data, 16, len);	/* Data length */
 		capimsg_setu16(skb->data, 18, datahandle);
 		capimsg_setu16(skb->data, 20, 0);	/* Flags */
@@ -610,16 +614,16 @@
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 /* -------- function called by lower level -------------------------- */
 
-static void capi_signal(__u16 applid, void *param)
+static void capi_signal(u16 applid, void *param)
 {
 	struct capidev *cdev = (struct capidev *)param;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
 	struct capiminor *mp;
-	__u16 datahandle;
+	u16 datahandle;
 #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */
 	struct capincci *np;
 	struct sk_buff *skb = 0;
-	__u32 ncci;
+	u32 ncci;
 
 	(void) (*capifuncs->capi_get_message) (applid, &skb);
 	if (!skb) {
@@ -754,7 +758,7 @@
 	struct capidev *cdev = (struct capidev *)file->private_data;
 	struct sk_buff *skb;
 	int retval;
-	__u16 mlen;
+	u16 mlen;
 
         if (ppos != &file->f_pos)
 		return -ESPIPE;
@@ -994,7 +998,7 @@
 						sizeof(ncci));
 			if (retval)
 				return -EFAULT;
-			nccip = capincci_find(cdev, (__u32) ncci);
+			nccip = capincci_find(cdev, (u32) ncci);
 			if (!nccip)
 				return 0;
 #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE
@@ -1019,7 +1023,7 @@
 						sizeof(ncci));
 			if (retval)
 				return -EFAULT;
-			nccip = capincci_find(cdev, (__u32) ncci);
+			nccip = capincci_find(cdev, (u32) ncci);
 			if (!nccip || (mp = nccip->minorp) == 0)
 				return -ESRCH;
 			return mp->minor;
@@ -1272,7 +1276,7 @@
 
 /* -------- tty_operations for capincci ----------------------------- */
 
-int capinc_tty_open(struct tty_struct * tty, struct file * file)
+static int capinc_tty_open(struct tty_struct * tty, struct file * file)
 {
 	struct capiminor *mp;
 
@@ -1300,7 +1304,7 @@
 	return 0;
 }
 
-void capinc_tty_close(struct tty_struct * tty, struct file * file)
+static void capinc_tty_close(struct tty_struct * tty, struct file * file)
 {
 	struct capiminor *mp;
 
@@ -1325,8 +1329,8 @@
 #endif
 }
 
-int capinc_tty_write(struct tty_struct * tty, int from_user,
-		      const unsigned char *buf, int count)
+static int capinc_tty_write(struct tty_struct * tty, int from_user,
+			    const unsigned char *buf, int count)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 	struct sk_buff *skb;
@@ -1377,7 +1381,7 @@
 	return count;
 }
 
-void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
+static void capinc_tty_put_char(struct tty_struct *tty, unsigned char ch)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 	struct sk_buff *skb;
@@ -1414,7 +1418,7 @@
 	}
 }
 
-void capinc_tty_flush_chars(struct tty_struct *tty)
+static void capinc_tty_flush_chars(struct tty_struct *tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 	struct sk_buff *skb;
@@ -1440,7 +1444,7 @@
 	(void)handle_minor_recv(mp);
 }
 
-int capinc_tty_write_room(struct tty_struct *tty)
+static int capinc_tty_write_room(struct tty_struct *tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 	int room;
@@ -1458,7 +1462,7 @@
 	return room;
 }
 
-int capinc_tty_chars_in_buffer(struct tty_struct *tty)
+static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 	if (!mp || !mp->nccip) {
@@ -1476,7 +1480,7 @@
 	return mp->outbytes;
 }
 
-int capinc_tty_ioctl(struct tty_struct *tty, struct file * file,
+static int capinc_tty_ioctl(struct tty_struct *tty, struct file * file,
 		    unsigned int cmd, unsigned long arg)
 {
 	int error = 0;
@@ -1488,14 +1492,14 @@
 	return error;
 }
 
-void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old)
+static void capinc_tty_set_termios(struct tty_struct *tty, struct termios * old)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_set_termios\n");
 #endif
 }
 
-void capinc_tty_throttle(struct tty_struct * tty)
+static void capinc_tty_throttle(struct tty_struct * tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 #ifdef _DEBUG_TTYFUNCS
@@ -1505,7 +1509,7 @@
 		mp->ttyinstop = 1;
 }
 
-void capinc_tty_unthrottle(struct tty_struct * tty)
+static void capinc_tty_unthrottle(struct tty_struct * tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 #ifdef _DEBUG_TTYFUNCS
@@ -1517,7 +1521,7 @@
 	}
 }
 
-void capinc_tty_stop(struct tty_struct *tty)
+static void capinc_tty_stop(struct tty_struct *tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 #ifdef _DEBUG_TTYFUNCS
@@ -1528,7 +1532,7 @@
 	}
 }
 
-void capinc_tty_start(struct tty_struct *tty)
+static void capinc_tty_start(struct tty_struct *tty)
 {
 	struct capiminor *mp = (struct capiminor *)tty->driver_data;
 #ifdef _DEBUG_TTYFUNCS
@@ -1540,49 +1544,43 @@
 	}
 }
 
-void capinc_tty_hangup(struct tty_struct *tty)
+static void capinc_tty_hangup(struct tty_struct *tty)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_hangup\n");
 #endif
 }
 
-void capinc_tty_break_ctl(struct tty_struct *tty, int state)
+static void capinc_tty_break_ctl(struct tty_struct *tty, int state)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_break_ctl(%d)\n", state);
 #endif
 }
 
-void capinc_tty_flush_buffer(struct tty_struct *tty)
+static void capinc_tty_flush_buffer(struct tty_struct *tty)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_flush_buffer\n");
 #endif
 }
 
-void capinc_tty_set_ldisc(struct tty_struct *tty)
+static void capinc_tty_set_ldisc(struct tty_struct *tty)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_set_ldisc\n");
 #endif
 }
 
-void capinc_tty_send_xchar(struct tty_struct *tty, char ch)
+static void capinc_tty_send_xchar(struct tty_struct *tty, char ch)
 {
 #ifdef _DEBUG_TTYFUNCS
 	printk(KERN_DEBUG "capinc_tty_send_xchar(%d)\n", ch);
 #endif
 }
 
-int capinc_tty_read_proc(char *page, char **start, off_t off,
-			  int count, int *eof, void *data)
-{
-	return 0;
-}
-
-int capinc_write_proc(struct file *file, const char *buffer,
-			  unsigned long count, void *data)
+static int capinc_tty_read_proc(char *page, char **start, off_t off,
+				int count, int *eof, void *data)
 {
 	return 0;
 }
@@ -1594,7 +1592,7 @@
 static struct termios *capinc_tty_termios[CAPINC_NR_PORTS];
 static struct termios *capinc_tty_termios_locked[CAPINC_NR_PORTS];
 
-int capinc_tty_init(void)
+static int capinc_tty_init(void)
 {
 	struct tty_driver *drv = &capinc_tty_driver;
 
@@ -1652,7 +1650,7 @@
 	return 0;
 }
 
-void capinc_tty_exit(void)
+static void capinc_tty_exit(void)
 {
 	struct tty_driver *drv = &capinc_tty_driver;
 	int retval;
@@ -1778,7 +1776,7 @@
 /* -------- init function and module interface ---------------------- */
 
 
-static void lower_callback(unsigned int cmd, __u32 contr, void *data)
+static void lower_callback(unsigned int cmd, u32 contr, void *data)
 {
 	struct capi_ncciinfo *np;
 	struct capidev *cdev;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capicmd.h linux.21p2/drivers/isdn/avmb1/capicmd.h
--- linux.vanilla/drivers/isdn/avmb1/capicmd.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capicmd.h	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/*
- * $Id: capicmd.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $
+/* $Id: capicmd.h,v 1.1.2.1 2001/12/31 13:26:41 kai Exp $
  * 
  * CAPI 2.0 Interface for Linux
  * 
- * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1997 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
+
 #ifndef __CAPICMD_H__
 #define __CAPICMD_H__
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidev.h linux.21p2/drivers/isdn/avmb1/capidev.h
--- linux.vanilla/drivers/isdn/avmb1/capidev.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capidev.h	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,11 @@
-/*
- * $Id: capidev.h,v 1.6.6.1 2001/05/17 20:41:51 kai Exp $
+/* $Id: capidev.h,v 1.1.2.1 2001/12/31 13:26:41 kai Exp $
  *
  * CAPI 2.0 Interface for Linux
  *
- * (c) Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1996 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidrv.c linux.21p2/drivers/isdn/avmb1/capidrv.c
--- linux.vanilla/drivers/isdn/avmb1/capidrv.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capidrv.c	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,11 @@
-/*
- * $Id: capidrv.c,v 1.39.6.6 2001/05/17 20:41:51 kai Exp $
+/* $Id: capidrv.c,v 1.1.2.1 2001/12/31 13:26:41 kai Exp $
  *
  * ISDN4Linux Driver, using capi20 interface (kernelcapi)
  *
- * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1997 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -33,10 +35,12 @@
 #include "capicmd.h"
 #include "capidrv.h"
 
-static char *revision = "$Revision: 1.39.6.6 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 static int debugmode = 0;
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Interface to ISDN4Linux");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 MODULE_PARM(debugmode, "i");
 
 /* -------- type definitions ----------------------------------------- */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidrv.h linux.21p2/drivers/isdn/avmb1/capidrv.h
--- linux.vanilla/drivers/isdn/avmb1/capidrv.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capidrv.h	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/*
- * $Id: capidrv.h,v 1.2.8.1 2001/05/17 20:41:51 kai Exp $
+/* $Id: capidrv.h,v 1.1.2.1 2001/12/31 13:26:41 kai Exp $
  *
  * ISDN4Linux Driver, using capi20 interface (kernelcapi)
  *
- * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1997 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #ifndef __CAPIDRV_H__
 #define __CAPIDRV_H__
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capifs.c linux.21p2/drivers/isdn/avmb1/capifs.c
--- linux.vanilla/drivers/isdn/avmb1/capifs.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capifs.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: capifs.c,v 1.14.6.7 2001/05/24 08:29:08 kai Exp $
+/* $Id: capifs.c,v 1.1.2.1 2001/12/31 13:26:41 kai Exp $
  * 
- * (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
+ * Copyright 2000 by Carsten Paeth <calle@calle.de>
  *
  * Heavily based on devpts filesystem from H. Peter Anvin
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/version.h>
@@ -27,9 +29,11 @@
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.de>");
+MODULE_DESCRIPTION("CAPI4Linux: /dev/capi/ filesystem");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
-static char *revision = "$Revision: 1.14.6.7 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 struct capifs_ncci {
 	struct inode *inode;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capifs.h linux.21p2/drivers/isdn/avmb1/capifs.h
--- linux.vanilla/drivers/isdn/avmb1/capifs.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capifs.h	Tue Jan  1 21:22:31 2002
@@ -1,7 +1,9 @@
-/*
- * $Id: capifs.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $
+/* $Id: capifs.h,v 1.1.2.1 2001/12/31 13:26:42 kai Exp $
  * 
- * (c) Copyright 2000 by Carsten Paeth (calle@calle.de)
+ * Copyright 2000 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capilli.h linux.21p2/drivers/isdn/avmb1/capilli.h
--- linux.vanilla/drivers/isdn/avmb1/capilli.h	Sun Mar 25 17:31:37 2001
+++ linux.21p2/drivers/isdn/avmb1/capilli.h	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/*
- * $Id: capilli.h,v 1.4 1999/07/23 08:51:05 calle Exp $
+/* $Id: capilli.h,v 1.1.2.1 2001/12/31 13:26:42 kai Exp $
  * 
  * Kernel CAPI 2.0 Driver Interface for Linux
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
+
 #ifndef __CAPILLI_H__
 #define __CAPILLI_H__
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capiutil.c linux.21p2/drivers/isdn/avmb1/capiutil.c
--- linux.vanilla/drivers/isdn/avmb1/capiutil.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capiutil.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/*
- * $Id: capiutil.c,v 1.13.6.3 2001/05/17 20:41:51 kai Exp $
+/* $Id: capiutil.c,v 1.1.2.1 2001/12/31 13:26:42 kai Exp $
  *
  * CAPI 2.0 convert capi message to capi message struct
  *
  * From CAPI 2.0 Development Kit AVM 1995 (msg.c)
- * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Rewritten for Linux 1996 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
@@ -18,6 +21,10 @@
 #include <linux/config.h>
 #include <linux/isdn_compat.h>
 #include "capiutil.h"
+
+MODULE_DESCRIPTION("CAPI4Linux: CAPI message conversion support");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* from CAPI2.0 DDK AVM Berlin GmbH */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capiutil.h linux.21p2/drivers/isdn/avmb1/capiutil.h
--- linux.vanilla/drivers/isdn/avmb1/capiutil.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/capiutil.h	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/*
- * $Id: capiutil.h,v 1.5.6.1 2001/05/17 20:41:51 kai Exp $
- * 
+/* $Id: capiutil.h,v 1.1.2.1 2001/12/31 13:26:43 kai Exp $
+ *
  * CAPI 2.0 defines & types
- * 
- * From CAPI 2.0 Development Kit AVM 1995 (capi20.h)
- * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
- * 
+ *
+ * From CAPI 2.0 Development Kit AVM 1995 (msg.c)
+ * Rewritten for Linux 1996 by Carsten Paeth <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
+
 #ifndef __CAPIUTIL_H__
 #define __CAPIUTIL_H__
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/kcapi.c linux.21p2/drivers/isdn/avmb1/kcapi.c
--- linux.vanilla/drivers/isdn/avmb1/kcapi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/kcapi.c	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/*
- * $Id: kcapi.c,v 1.21.6.7 2001/06/09 15:14:15 kai Exp $
+/* $Id: kcapi.c,v 1.1.2.1 2001/12/31 13:26:43 kai Exp $
  * 
  * Kernel CAPI 2.0 Module
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
+
 #define CONFIG_AVMB1_COMPAT
 
 #include <linux/config.h>
@@ -31,7 +34,7 @@
 #include <linux/b1lli.h>
 #endif
 
-static char *revision = "$Revision: 1.21.6.7 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
@@ -42,10 +45,12 @@
 
 /* ------------------------------------------------------------- */
 
-int showcapimsgs = 0;
+static int showcapimsgs = 0;
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
-MODULE_PARM(showcapimsgs, "0-4i");
+MODULE_DESCRIPTION("CAPI4Linux: kernel CAPI layer");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
+MODULE_PARM(showcapimsgs, "i");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/t1isa.c linux.21p2/drivers/isdn/avmb1/t1isa.c
--- linux.vanilla/drivers/isdn/avmb1/t1isa.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/t1isa.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: t1isa.c,v 1.16.6.6 2001/05/17 21:15:33 kai Exp $
+/* $Id: t1isa.c,v 1.1.2.1 2001/12/31 13:26:43 kai Exp $
  * 
  * Module for AVM T1 HEMA-card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/module.h>
@@ -24,11 +26,13 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.16.6.6 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM T1 HEMA ISA card");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/t1pci.c linux.21p2/drivers/isdn/avmb1/t1pci.c
--- linux.vanilla/drivers/isdn/avmb1/t1pci.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/avmb1/t1pci.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: t1pci.c,v 1.13.6.5 2001/05/17 20:41:51 kai Exp $
+/* $Id: t1pci.c,v 1.1.2.1 2001/12/31 13:26:43 kai Exp $
  * 
  * Module for AVM T1 PCI-card.
  * 
- * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ * Copyright 1999 by Carsten Paeth <calle@calle.de>
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #include <linux/config.h>
@@ -25,14 +27,16 @@
 #include "capilli.h"
 #include "avmcard.h"
 
-static char *revision = "$Revision: 1.13.6.5 $";
+static char *revision = "$Revision: 1.1.2.1 $";
 
 #undef CONFIG_T1PCI_DEBUG
 #undef CONFIG_T1PCI_POLLDEBUG
 
 /* ------------------------------------------------------------- */
 
-MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
+MODULE_DESCRIPTION("CAPI4Linux: Driver for AVM T1 PCI card");
+MODULE_AUTHOR("Carsten Paeth");
+MODULE_LICENSE("GPL");
 
 /* ------------------------------------------------------------- */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/divert/divert_init.c linux.21p2/drivers/isdn/divert/divert_init.c
--- linux.vanilla/drivers/isdn/divert/divert_init.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/divert/divert_init.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,11 @@
-/* 
- * $Id: divert_init.c,v 1.5.6.2 2001/01/24 22:18:17 kai Exp $
+/* $Id divert_init.c,v 1.5.6.2 2001/01/24 22:18:17 kai Exp $
  *
  * Module init for DSS1 diversion services for i4l.
  *
  * Copyright 1999       by Werner Cornelius (werner@isdn4linux.de)
  * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -26,6 +14,10 @@
 #include <linux/init.h>
 #include "isdn_divert.h"
 
+MODULE_DESCRIPTION("ISDN4Linux: Call diversion support");
+MODULE_AUTHOR("Werner Cornelius");
+MODULE_LICENSE("GPL");
+
 /********************/
 /* needed externals */
 /********************/
@@ -70,7 +62,7 @@
 /* Module deinit code */
 /**********************/
 static void  divert_exit(void)
-{ int flags;
+{ unsigned long flags;
   int i;
 
   save_flags(flags);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/divert/divert_procfs.c linux.21p2/drivers/isdn/divert/divert_procfs.c
--- linux.vanilla/drivers/isdn/divert/divert_procfs.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/divert/divert_procfs.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,11 @@
-/*
- * $Id: divert_procfs.c,v 1.11 2000/11/25 17:01:00 kai Exp $
+/* $Id: divert_procfs.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * Filesystem handling for the diversion supplementary services.
  *
  * Copyright 1998       by Werner Cornelius (werner@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -50,7 +38,7 @@
 put_info_buffer(char *cp)
 {
 	struct divert_info *ib;
-	int flags;
+	unsigned long flags;
 
 	if (if_used <= 0)
 		return;
@@ -145,7 +133,7 @@
 static int
 isdn_divert_open(struct inode *ino, struct file *filep)
 {
-	int flags;
+	unsigned long flags;
 
 	MOD_INC_USE_COUNT;
 	save_flags(flags);
@@ -167,7 +155,7 @@
 isdn_divert_close(struct inode *ino, struct file *filep)
 {
 	struct divert_info *inf;
-	int flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
@@ -196,7 +184,8 @@
 		  uint cmd, ulong arg)
 {
 	divert_ioctl dioctl;
-	int i, flags;
+	int i;
+	unsigned long flags;
 	divert_rule *rulep;
 	char *cp;
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/divert/isdn_divert.c linux.21p2/drivers/isdn/divert/isdn_divert.c
--- linux.vanilla/drivers/isdn/divert/isdn_divert.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/divert/isdn_divert.c	Tue Jan  1 21:22:31 2002
@@ -1,30 +1,14 @@
-/* 
- * $Id: isdn_divert.c,v 1.6.6.2 2001/02/16 16:43:25 kai Exp $
+/* $Id: isdn_divert.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * DSS1 main diversion supplementary handling for i4l.
  *
  * Copyright 1999       by Werner Cornelius (werner@isdn4linux.de)
  * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
-
-#define __NO_VERSION__
-#include <linux/module.h>
 #include <linux/version.h>
 #include <linux/proc_fs.h>
 #include "isdn_divert.h"
@@ -67,7 +51,7 @@
 /* timer callback function */
 /***************************/
 static void deflect_timer_expire(ulong arg)
-{ int flags;
+{ unsigned long flags;
   struct call_struc *cs = (struct call_struc *) arg;
 
   save_flags(flags);
@@ -125,7 +109,8 @@
 int cf_command(int drvid, int mode, 
                u_char proc, char *msn, 
                u_char service, char *fwd_nr, ulong *procid)
-{ int retval,msnlen,flags;
+{ int retval,msnlen;
+  unsigned long flags; 
   int fwd_len;
   char *p,*ielenp,tmp[60];
   struct call_struc *cs;
@@ -220,7 +205,7 @@
 int deflect_extern_action(u_char cmd, ulong callid, char *to_nr)
 { struct call_struc *cs;
   isdn_ctrl ic;
-  int flags;
+  unsigned long flags;
   int i;
 
   if ((cmd & 0x7F) > 2) return(-EINVAL); /* invalid command */
@@ -291,7 +276,7 @@
 /********************************/
 int insertrule(int idx, divert_rule *newrule)
 { struct deflect_struc *ds,*ds1=NULL;
-  int flags;
+  unsigned long flags;
 
   if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc), 
                                               GFP_KERNEL))) 
@@ -337,7 +322,7 @@
 /***********************************/
 int deleterule(int idx)
 { struct deflect_struc *ds,*ds1;
-  int flags;
+  unsigned long flags;
   
   if (idx < 0) 
    { save_flags(flags);
@@ -405,7 +390,7 @@
 /*************************************************/
 int isdn_divert_icall(isdn_ctrl *ic)
 { int retval = 0;
-  int flags;
+  unsigned long flags;
   struct call_struc *cs = NULL; 
   struct deflect_struc *dv;
   char *p,*p1;
@@ -557,7 +542,7 @@
 
 void deleteprocs(void)
 { struct call_struc *cs, *cs1; 
-  int flags;
+  unsigned long flags;
 
   save_flags(flags);
   cli();
@@ -714,7 +699,8 @@
 /*********************************************/
 int prot_stat_callback(isdn_ctrl *ic)
 { struct call_struc *cs, *cs1;
-  int i,flags;
+  int i;
+  unsigned long flags;
 
   cs = divert_head; /* start of list */
   cs1 = NULL;
@@ -805,7 +791,7 @@
 /***************************/
 int isdn_divert_stat_callback(isdn_ctrl *ic)
 { struct call_struc *cs, *cs1;
-  int flags, retval;
+  unsigned long flags, retval;
 
   retval = -1;
   cs = divert_head; /* start of list */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/divert/isdn_divert.h linux.21p2/drivers/isdn/divert/isdn_divert.h
--- linux.vanilla/drivers/isdn/divert/isdn_divert.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/divert/isdn_divert.h	Tue Jan  1 23:14:48 2002
@@ -1,26 +1,13 @@
-/* 
- * $Id: isdn_divert.h,v 1.5 2000/11/13 22:51:47 kai Exp $
+/* $Id: isdn_divert.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * Header for the diversion supplementary ioctl interface.
  *
  * Copyright 1998       by Werner Cornelius (werner@ikt.de)
  * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #include <linux/ioctl.h>
 #include <linux/types.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/Divas_mod.c linux.21p2/drivers/isdn/eicon/Divas_mod.c
--- linux.vanilla/drivers/isdn/eicon/Divas_mod.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/Divas_mod.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,9 @@
-
 /*
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/fs.h>
@@ -36,6 +22,10 @@
 
 #include <linux/isdn_compat.h>
 
+MODULE_DESCRIPTION("ISDN4Linux: Driver for Eicon Diva Server cards");
+MODULE_AUTHOR("Armin Schindler");
+MODULE_LICENSE("GPL");
+
 #ifdef MODULE
 #include "idi.h"
 void DIVA_DIDD_Write(DESCRIPTOR *, int);
@@ -52,7 +42,6 @@
 	printk(KERN_DEBUG "DIVA Server Driver - initialising\n");
 	
 	printk(KERN_DEBUG "DIVA Server Driver - Version 2.0.16\n");
-
 
 #if !defined(CONFIG_PCI)
 	printk(KERN_WARNING "CONFIG_PCI is not defined!\n");
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/adapter.h linux.21p2/drivers/isdn/eicon/adapter.h
--- linux.vanilla/drivers/isdn/eicon/adapter.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/adapter.h	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,14 @@
-
 /*
+ * Main internal include file for Diva Server driver
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.7  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
-/* Main internal include file for Diva Server driver */
 
 #if !defined(ADAPTER_H)
 #define ADAPTER_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/bri.c linux.21p2/drivers/isdn/eicon/bri.c
--- linux.vanilla/drivers/isdn/eicon/bri.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/bri.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,10 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.8  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/common.c linux.21p2/drivers/isdn/eicon/common.c
--- linux.vanilla/drivers/isdn/eicon/common.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/common.c	Tue Jan  1 21:22:31 2002
@@ -1,27 +1,13 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.15  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
 #include "eicon.h"
 #include "sys.h"
 #include "idi.h"
@@ -822,7 +808,9 @@
 	
 	while(i--)
 	{
-		DivaDoCardDpc(card++);
+            if (card->state == DIA_RUNNING)
+		DivaDoCardDpc(card);
+            card++;
 	}
 }
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/constant.h linux.21p2/drivers/isdn/eicon/constant.h
--- linux.vanilla/drivers/isdn/eicon/constant.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/constant.h	Tue Jan  1 21:22:31 2002
@@ -1,27 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
 
 /*------------------------------------------------------------------*/
 /* Q.931 information elements maximum length                        */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/divalog.h linux.21p2/drivers/isdn/eicon/divalog.h
--- linux.vanilla/drivers/isdn/eicon/divalog.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/divalog.h	Tue Jan  1 21:22:31 2002
@@ -1,31 +1,15 @@
-
 /*
+ * Include file for defining the kernel loggger messages
+ * These definitions are shared between the klog driver and the
+ * klogd daemon process
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-
-/*
- * Include file for defining the kernel loggger messages
- * These definitions are shared between the klog driver and the
- * klogd daemon process
  */
 
 #if !defined(_KLOGMSG_H)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/divas.h linux.21p2/drivers/isdn/eicon/divas.h
--- linux.vanilla/drivers/isdn/eicon/divas.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/divas.h	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,14 @@
-
 /*
+ * External Diva Server driver include file
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.5  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
-/* External Diva Server driver include file */
 
 #if !defined(DIVAS_H)
 #define DIVAS_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/dsp_defs.h linux.21p2/drivers/isdn/eicon/dsp_defs.h
--- linux.vanilla/drivers/isdn/eicon/dsp_defs.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/dsp_defs.h	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #ifndef DSP_DEFS_H_
 #define DSP_DEFS_H_
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/dspdids.h linux.21p2/drivers/isdn/eicon/dspdids.h
--- linux.vanilla/drivers/isdn/eicon/dspdids.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/dspdids.h	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #ifndef DSPDIDS_H_
 #define DSPDIDS_H_
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon.h linux.21p2/drivers/isdn/eicon/eicon.h
--- linux.vanilla/drivers/isdn/eicon/eicon.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/eicon.h	Tue Jan  1 23:14:49 2002
@@ -1,27 +1,15 @@
-/* $Id: eicon.h,v 1.23.6.4 2001/06/09 15:14:16 kai Exp $
+/* $Id: eicon.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards.
  *
- * Copyright 1998    by Fritz Elfert (fritz@isdn4linux.de)
+ * Copyright 1998       by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1998-2000  by Armin Schindler (mac@melware.de) 
  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #ifndef eicon_h
 #define eicon_h
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_dsp.h linux.21p2/drivers/isdn/eicon/eicon_dsp.h
--- linux.vanilla/drivers/isdn/eicon/eicon_dsp.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_dsp.h	Tue Jan  1 21:22:31 2002
@@ -1,25 +1,13 @@
-/* $Id: eicon_dsp.h,v 1.7 2000/05/07 08:51:04 armin Exp $
+/* $Id: eicon_dsp.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN lowlevel-module for Eicon active cards.
- *        DSP definitions
+ * DSP definitions
  *
  * Copyright 1999,2000  by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_idi.c linux.21p2/drivers/isdn/eicon/eicon_idi.c
--- linux.vanilla/drivers/isdn/eicon/eicon_idi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_idi.c	Tue Jan  1 21:22:31 2002
@@ -1,7 +1,7 @@
-/* $Id: eicon_idi.c,v 1.41.6.1 2001/02/10 14:44:09 kai Exp $
+/* $Id: eicon_idi.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN lowlevel-module for Eicon active cards.
- *        IDI interface 
+ * IDI interface 
  *
  * Copyright 1998-2000  by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
@@ -11,19 +11,8 @@
  *		capabilities with Diva Server cards.
  *		(dor@deutschemailbox.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -36,7 +25,7 @@
 
 #undef EICON_FULL_SERVICE_OKTETT
 
-char *eicon_idi_revision = "$Revision: 1.41.6.1 $";
+char *eicon_idi_revision = "$Revision: 1.1.2.1 $";
 
 eicon_manifbuf *manbuf;
 
@@ -3130,8 +3119,8 @@
 			return(ret); 
 		}
 
-	        timeout = jiffies + 50;
-        	while (timeout > jiffies) {
+	        timeout = jiffies + HZ / 2;
+        	while (time_before(jiffies, timeout)) {
 	                if (chan->e.B2Id) break;
         	        SLEEP(10);
 	        }
@@ -3192,8 +3181,8 @@
 
         eicon_schedule_tx(card);
 
-        timeout = jiffies + 50;
-        while (timeout > jiffies) {
+        timeout = jiffies + HZ / 2;
+        while (time_before(jiffies, timeout)) {
                 if (chan->fsm_state) break;
                 SLEEP(10);
         }
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_idi.h linux.21p2/drivers/isdn/eicon/eicon_idi.h
--- linux.vanilla/drivers/isdn/eicon/eicon_idi.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_idi.h	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_idi.h,v 1.11 2000/05/07 08:51:04 armin Exp $
+/* $Id: eicon_idi.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN lowlevel-module for the Eicon active cards.
  * IDI-Interface
@@ -6,20 +6,8 @@
  * Copyright 1998-2000  by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_io.c linux.21p2/drivers/isdn/eicon/eicon_io.c
--- linux.vanilla/drivers/isdn/eicon/eicon_io.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_io.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_io.c,v 1.13.6.1 2001/02/16 09:09:50 armin Exp $
+/* $Id: eicon_io.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards.
  * Code for communicating with hardware.
@@ -6,25 +6,13 @@
  * Copyright 1999,2000  by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000  Cytronics & Melware (info@melware.de)
  *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  * Thanks to	Eicon Networks for 
  *		documents, informations and hardware. 
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
  */
-
 
 #include <linux/config.h>
 #include "eicon.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_isa.c linux.21p2/drivers/isdn/eicon/eicon_isa.c
--- linux.vanilla/drivers/isdn/eicon/eicon_isa.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_isa.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_isa.c,v 1.16 2000/06/12 12:44:02 armin Exp $
+/* $Id: eicon_isa.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards.
  * Hardware-specific code for old ISA cards.
@@ -7,19 +7,8 @@
  * Copyright 1998-2000 by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000 Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -31,7 +20,7 @@
 #define release_shmem release_region
 #define request_shmem request_region
 
-char *eicon_isa_revision = "$Revision: 1.16 $";
+char *eicon_isa_revision = "$Revision: 1.1.2.1 $";
 
 #undef EICON_MCA_DEBUG
 
@@ -239,7 +228,7 @@
 	boot = &card->shmem->boot;
 
 	/* Delay 0.2 sec. */
-	SLEEP(20);
+	SLEEP(HZ / 5);
 
 	/* Start CPU */
 	writeb(cbuf.boot_opt, &boot->ctrl);
@@ -252,10 +241,10 @@
 #endif /* CONFIG_MCA */
 
 	/* Delay 0.2 sec. */
-	SLEEP(20);
+	SLEEP(HZ / 5);
 
 	timeout = jiffies + (HZ * 22);
-	while (timeout > jiffies) {
+	while (time_before(jiffies, timeout)) {
 		if (readb(&boot->ctrl) == 0)
 			break;
 		SLEEP(10);
@@ -370,8 +359,8 @@
 	while (tmp--) {
 		memcpy_toio(&boot->b, p, 256);
 		writeb(1, &boot->ctrl);
-		timeout = jiffies + 10;
-		while (timeout > jiffies) {
+		timeout = jiffies + HZ / 10;
+		while (time_before(jiffies, timeout)) {
 			if (readb(&boot->ctrl) == 0)
 				break;
 			SLEEP(2);
@@ -394,7 +383,7 @@
 	/* Start firmware, wait for signature */
 	writeb(2, &boot->ctrl);
 	timeout = jiffies + (5*HZ);
-	while (timeout > jiffies) {
+	while (time_before(jiffies, timeout)) {
 		if (readw(&boot->signature) == 0x4447)
 			break;
 		SLEEP(2);
@@ -418,8 +407,8 @@
 		tmp = readb(&card->shmem->com.ReadyInt);
 		tmp ++;
 		writeb(tmp, &card->shmem->com.ReadyInt);
-		timeout = jiffies + 20;
-		while (timeout > jiffies) {
+		timeout = jiffies + HZ / 5;
+		while (time_before(jiffies, timeout)) {
 			if (card->irqprobe > 1)
 				break;
 			SLEEP(2);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_isa.h linux.21p2/drivers/isdn/eicon/eicon_isa.h
--- linux.vanilla/drivers/isdn/eicon/eicon_isa.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_isa.h	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_isa.h,v 1.10 2000/05/07 08:51:04 armin Exp $
+/* $Id: eicon_isa.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards.
  *
@@ -6,19 +6,8 @@
  * Copyright 1998-2000 by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000 Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_mod.c linux.21p2/drivers/isdn/eicon/eicon_mod.c
--- linux.vanilla/drivers/isdn/eicon/eicon_mod.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_mod.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_mod.c,v 1.37.6.5 2001/07/17 19:42:31 armin Exp $
+/* $Id: eicon_mod.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN lowlevel-module for Eicon active cards.
  * 
@@ -6,6 +6,9 @@
  * Copyright 1998-2000 by Armin Schindler (mac@melware.de) 
  * Copyright 1999,2000 Cytronics & Melware (info@melware.de)
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  * Thanks to    Eicon Networks for
  *              documents, informations and hardware.
  *
@@ -14,20 +17,6 @@
  *		capabilities with Diva Server cards.
  *		(dor@deutschemailbox.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
  */
 
 #define DRIVERNAME "Eicon active ISDN driver"
@@ -55,7 +44,7 @@
 static eicon_card *cards = (eicon_card *) NULL;   /* glob. var , contains
                                                      start of card-list   */
 
-static char *eicon_revision = "$Revision: 1.37.6.5 $";
+static char *eicon_revision = "$Revision: 1.1.2.1 $";
 
 extern char *eicon_pci_revision;
 extern char *eicon_isa_revision;
@@ -84,9 +73,9 @@
 #endif
 static char *id           = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
 
-MODULE_DESCRIPTION(             "Driver for Eicon active ISDN cards");
+MODULE_DESCRIPTION(             "ISDN4Linux: Driver for Eicon active ISDN cards");
 MODULE_AUTHOR(                  "Armin Schindler");
-MODULE_SUPPORTED_DEVICE(        "ISDN subsystem");
+MODULE_LICENSE(                 "GPL");
 MODULE_PARM_DESC(id,   		"ID-String of first card");
 MODULE_PARM(id,           	"s");
 #ifdef CONFIG_ISDN_DRV_EICON_ISA
@@ -1555,7 +1544,7 @@
             	};
 	};
 	/* all adapter flavors checked without match, finito with:            */
-        return ENODEV;
+        return -ENODEV;
 };
 
 
@@ -1602,14 +1591,14 @@
 				membase = cards_membase;
 			} else {
 				if (membase != cards_membase)
-					return ENODEV;
+					return -ENODEV;
 			};
 			cards_irq=irq_array[((adf_pos0 & 0xC)>>2)];
 			if (irq == -1) { 
 				irq = cards_irq;
 			} else {
 				if (irq != cards_irq)
-					return ENODEV;
+					return -ENODEV;
 			};
 			cards_io= 0xC00 + ((adf_pos0>>4)*0x10);
 			type = EICON_CTYPE_ISAPRI; 
@@ -1621,14 +1610,14 @@
 				membase = cards_membase;
 			} else {
 				if (membase != cards_membase)
-					return ENODEV;
+					return -ENODEV;
 			};
 			cards_irq=irq_array[((adf_pos0 & 0xC)>>2)];
 			if (irq == -1) { 
 				irq = cards_irq;
 			} else {
 				if (irq != cards_irq)
-					return ENODEV;
+					return -ENODEV;
 			};
 
 			cards_io= 0xC00 + ((adf_pos0>>4)*0x10);
@@ -1642,12 +1631,12 @@
 				irq = cards_irq;
 			} else {
 				if (irq != cards_irq)
-					return ENODEV;
+					return -ENODEV;
 			};
 			type = 0; 
 			break;
 		default:
-			return  ENODEV;
+			return -ENODEV;
 	};
 	/* matching membase & irq */
 	if ( 1 == eicon_addcard(type, membase, irq, id, 0)) { 
@@ -1666,7 +1655,7 @@
 			cards->mca_slot+1);
 		return  0 ; /* eicon_addcard added a card */
 	} else {
-		return ENODEV;
+		return -ENODEV;
 	};
 };
 #endif /* CONFIG_MCA */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_pci.c linux.21p2/drivers/isdn/eicon/eicon_pci.c
--- linux.vanilla/drivers/isdn/eicon/eicon_pci.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_pci.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: eicon_pci.c,v 1.15.6.2 2001/02/16 09:09:50 armin Exp $
+/* $Id: eicon_pci.c,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards.
  * Hardware-specific code for PCI cards.
@@ -6,23 +6,12 @@
  * Copyright 1998-2000 by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000 Cytronics & Melware (info@melware.de)
  *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  * Thanks to	Eicon Networks for 
  *		documents, informations and hardware. 
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
- *
  */
 
 #include <linux/config.h>
@@ -35,7 +24,7 @@
 #include "adapter.h"
 #include "uxio.h"
 
-char *eicon_pci_revision = "$Revision: 1.15.6.2 $";
+char *eicon_pci_revision = "$Revision: 1.1.2.1 $";
 
 #if CONFIG_PCI	         /* intire stuff is only for PCI */
 #ifdef CONFIG_ISDN_DRV_EICON_PCI
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_pci.h linux.21p2/drivers/isdn/eicon/eicon_pci.h
--- linux.vanilla/drivers/isdn/eicon/eicon_pci.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/eicon_pci.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: eicon_pci.h,v 1.6 2000/05/07 08:51:04 armin Exp $
+/* $Id: eicon_pci.h,v 1.1.2.1 2001/12/31 13:26:44 kai Exp $
  *
  * ISDN low-level module for Eicon active ISDN-Cards (PCI part).
  *
  * Copyright 1998-2000 by Armin Schindler (mac@melware.de)
  * Copyright 1999,2000 Cytronics & Melware (info@melware.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/fourbri.c linux.21p2/drivers/isdn/eicon/fourbri.c
--- linux.vanilla/drivers/isdn/eicon/fourbri.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/fourbri.c	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,15 @@
-
 /*
+ * Diva Server 4BRI specific part of initialisation
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.7  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
-/* Diva Server 4BRI specific part of initialisation */
 #include "sys.h"
 #include "idi.h"
 #include "divas.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/fpga.c linux.21p2/drivers/isdn/eicon/fpga.c
--- linux.vanilla/drivers/isdn/eicon/fpga.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/fpga.c	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.2  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #include "sys.h"
 #include "idi.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/idi.c linux.21p2/drivers/isdn/eicon/idi.c
--- linux.vanilla/drivers/isdn/eicon/idi.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/idi.c	Tue Jan  1 21:22:31 2002
@@ -1,30 +1,14 @@
-
 /*
+ * Core driver for Diva Server cards
+ * Implements the IDI interface
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.8  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-
-/*
- * Core driver for Diva Server cards
- * Implements the IDI interface
  */
 
 #include "idi.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/idi.h linux.21p2/drivers/isdn/eicon/idi.h
--- linux.vanilla/drivers/isdn/eicon/idi.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/idi.h	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,14 @@
-
 /*
+ * External IDI interface
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
-/* External IDI interface */
 
 #if !defined(IDI_H)
 #define IDI_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/kprintf.c linux.21p2/drivers/isdn/eicon/kprintf.c
--- linux.vanilla/drivers/isdn/eicon/kprintf.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/kprintf.c	Tue Jan  1 21:22:31 2002
@@ -1,31 +1,14 @@
-
 /*
+ * Source file for kernel interface to kernel log facility
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.3  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
-/*
- * Source file for kernel interface to kernel log facility
- */
-
 
 #include "eicon.h"
 #include "sys.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/lincfg.c linux.21p2/drivers/isdn/eicon/lincfg.c
--- linux.vanilla/drivers/isdn/eicon/lincfg.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/lincfg.c	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.9  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #include <linux/fs.h>
 #undef N_DATA   /* Because we have our own definition */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/linchr.c linux.21p2/drivers/isdn/eicon/linchr.c
--- linux.vanilla/drivers/isdn/eicon/linchr.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/linchr.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,10 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.12  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/linio.c linux.21p2/drivers/isdn/eicon/linio.c
--- linux.vanilla/drivers/isdn/eicon/linio.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/linio.c	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.16  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #define N_DATA
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/linsys.c linux.21p2/drivers/isdn/eicon/linsys.c
--- linux.vanilla/drivers/isdn/eicon/linsys.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/linsys.c	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.10  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #include <linux/sched.h>
 #undef N_DATA
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/log.c linux.21p2/drivers/isdn/eicon/log.c
--- linux.vanilla/drivers/isdn/eicon/log.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/log.c	Tue Jan  1 21:22:31 2002
@@ -1,29 +1,13 @@
-   
 /*
+ * Source file for diva log facility
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.5  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-
-/*
- * Source file for diva log facility
  */
 
 #include "sys.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/pc.h linux.21p2/drivers/isdn/eicon/pc.h
--- linux.vanilla/drivers/isdn/eicon/pc.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/pc.h	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.2  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #ifndef PC_H_INCLUDED
 #define PC_H_INCLUDED
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/pc_maint.h linux.21p2/drivers/isdn/eicon/pc_maint.h
--- linux.vanilla/drivers/isdn/eicon/pc_maint.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/pc_maint.h	Tue Jan  1 21:22:31 2002
@@ -1,26 +1,12 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
 
 #ifndef PC_MAINT_H
 #define PC_MAINT_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/pr_pc.h linux.21p2/drivers/isdn/eicon/pr_pc.h
--- linux.vanilla/drivers/isdn/eicon/pr_pc.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/pr_pc.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,10 @@
-
 /*
- *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.0  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/pri.c linux.21p2/drivers/isdn/eicon/pri.c
--- linux.vanilla/drivers/isdn/eicon/pri.c	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/pri.c	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,15 @@
-
 /*
+ * Diva Server PRI specific part of initialisation
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.5  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-
-/* Diva Server PRI specific part of initialisation */
 #include "sys.h"
 #include "idi.h"
 #include "divas.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/sys.h linux.21p2/drivers/isdn/eicon/sys.h
--- linux.vanilla/drivers/isdn/eicon/sys.h	Sun Mar 25 17:37:32 2001
+++ linux.21p2/drivers/isdn/eicon/sys.h	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,14 @@
-
 /*
+ * Environment provided by system and miscellaneous definitions
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.2  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
-
-
-/* Environment provided by system and miscellaneous definitions */
 
 #if !defined(SYS_H)
 #define SYS_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/uxio.h linux.21p2/drivers/isdn/eicon/uxio.h
--- linux.vanilla/drivers/isdn/eicon/uxio.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/uxio.h	Tue Jan  1 21:22:31 2002
@@ -1,29 +1,13 @@
-
 /*
+ * Interface to Unix specific code for performing card I/O
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.6  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-
-/*
- * Interface to Unix specific code for performing card I/O
  */
 
 #if !defined(UXIO_H)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/xlog.c linux.21p2/drivers/isdn/eicon/xlog.c
--- linux.vanilla/drivers/isdn/eicon/xlog.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/eicon/xlog.c	Tue Jan  1 21:22:31 2002
@@ -1,30 +1,14 @@
-
 /*
+ * Unix Eicon active card driver
+ * XLOG related functions
  *
  * Copyright (C) Eicon Technology Corporation, 2000.
  *
  * Eicon File Revision :    1.2  
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY OF ANY KIND WHATSOEVER INCLUDING ANY 
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
- * See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-
-/*
- * Unix Eicon active card driver
- * XLOG related functions
  */
 
 #include "sys.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/amd7930.c linux.21p2/drivers/isdn/hisax/amd7930.c
--- linux.vanilla/drivers/isdn/hisax/amd7930.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/amd7930.c	Tue Jan  1 21:22:31 2002
@@ -1,8 +1,12 @@
-/* $Id: amd7930.c,v 1.5.6.3 2001/06/11 22:08:37 kai Exp $
+/* $Id: amd7930.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * HiSax ISDN driver - chip specific routines for AMD 7930
  *
- * Author       Brent Baccala (baccala@FreeSoft.org)
+ * Author       Brent Baccala
+ * Copyright    by Brent Baccala <baccala@FreeSoft.org>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  *    - Existing ISDN HiSax driver provides all the smarts
  *    - it compiles, runs, talks to an isolated phone switch, connects
@@ -94,7 +98,7 @@
 #include "rawhdlc.h"
 #include <linux/interrupt.h>
 
-static const char *amd7930_revision = "$Revision: 1.5.6.3 $";
+static const char *amd7930_revision = "$Revision: 1.1.2.1 $";
 
 #define RCV_BUFSIZE	1024	/* Size of raw receive buffer in bytes */
 #define RCV_BUFBLKS	4	/* Number of blocks to divide buffer into
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/arcofi.c linux.21p2/drivers/isdn/hisax/arcofi.c
--- linux.vanilla/drivers/isdn/hisax/arcofi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/arcofi.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: arcofi.c,v 1.12.6.1 2001/02/16 16:43:25 kai Exp $
+/* $Id: arcofi.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * arcofi.c   Ansteuerung ARCOFI 2165
+ * Ansteuerung ARCOFI 2165
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
  
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/arcofi.h linux.21p2/drivers/isdn/hisax/arcofi.h
--- linux.vanilla/drivers/isdn/hisax/arcofi.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/arcofi.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: arcofi.h,v 1.6.6.1 2001/02/16 16:43:25 kai Exp $
+/* $Id: arcofi.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * arcofi.h   Ansteuerung ARCOFI 2165
+ * Ansteuerung ARCOFI 2165
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
  
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/asuscom.c linux.21p2/drivers/isdn/hisax/asuscom.c
--- linux.vanilla/drivers/isdn/hisax/asuscom.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/asuscom.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,14 @@
-/* $Id: asuscom.c,v 1.11.6.2 2001/07/13 09:20:12 kai Exp $
+/* $Id: asuscom.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * asuscom.c     low level stuff for ASUSCOM NETWORK INC. ISDNLink cards
+ * low level stuff for ASUSCOM NETWORK INC. ISDNLink cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  *
- * Thanks to  ASUSCOM NETWORK INC. Taiwan and  Dynalink NL for informations
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This file is (c) under GNU General Public License
+ * Thanks to  ASUSCOM NETWORK INC. Taiwan and  Dynalink NL for information
  *
  */
 
@@ -20,7 +22,7 @@
 
 extern const char *CardType[];
 
-const char *Asuscom_revision = "$Revision: 1.11.6.2 $";
+const char *Asuscom_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_a1.c linux.21p2/drivers/isdn/hisax/avm_a1.c
--- linux.vanilla/drivers/isdn/hisax/avm_a1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/avm_a1.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/* $Id: avm_a1.c,v 2.13.6.1 2001/02/16 16:43:25 kai Exp $
+/* $Id: avm_a1.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * avm_a1.c     low level stuff for AVM A1 (Fritz) isdn cards
+ * low level stuff for AVM A1 (Fritz) isdn cards
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -15,7 +18,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-static const char *avm_revision = "$Revision: 2.13.6.1 $";
+static const char *avm_revision = "$Revision: 1.1.2.1 $";
 
 #define	 AVM_A1_STAT_ISAC	0x01
 #define	 AVM_A1_STAT_HSCX	0x02
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_a1p.c linux.21p2/drivers/isdn/hisax/avm_a1p.c
--- linux.vanilla/drivers/isdn/hisax/avm_a1p.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/avm_a1p.c	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,18 @@
-/* $Id: avm_a1p.c,v 2.7.6.1 2001/02/16 16:43:25 kai Exp $
+/* $Id: avm_a1p.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * avm_a1p.c    low level stuff for the following AVM cards:
- *              A1 PCMCIA
- *		FRITZ!Card PCMCIA
- *		FRITZ!Card PCMCIA 2.0
+ * low level stuff for the following AVM cards:
+ * A1 PCMCIA
+ * FRITZ!Card PCMCIA
+ * FRITZ!Card PCMCIA 2.0
  *
- * Author       Carsten Paeth (calle@calle.in-berlin.de)
+ * Author       Carsten Paeth
+ * Copyright    by Carsten Paeth     <calle@calle.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  This file is (c) under GNU General Public License
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -53,7 +57,7 @@
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
 
-static const char *avm_revision = "$Revision: 2.7.6.1 $";
+static const char *avm_revision = "$Revision: 1.1.2.1 $";
 
 static inline u_char
 ReadISAC(struct IsdnCardState *cs, u_char offset)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_pci.c linux.21p2/drivers/isdn/hisax/avm_pci.c
--- linux.vanilla/drivers/isdn/hisax/avm_pci.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/avm_pci.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,17 @@
-/* $Id: avm_pci.c,v 1.22.6.5 2001/06/09 15:14:16 kai Exp $
+/* $Id: avm_pci.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * avm_pci.c    low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
- *              Thanks to AVM, Berlin for informations
+ * low level stuff for AVM Fritz!PCI and ISA PnP isdn cards
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * Thanks to AVM, Berlin for information
  *
  */
+
 #define __NO_VERSION__
 #include <linux/config.h>
 #include <linux/init.h>
@@ -19,7 +23,7 @@
 #include <linux/interrupt.h>
 
 extern const char *CardType[];
-static const char *avm_pci_rev = "$Revision: 1.22.6.5 $";
+static const char *avm_pci_rev = "$Revision: 1.1.2.1 $";
 
 #define  AVM_FRITZ_PCI		1
 #define  AVM_FRITZ_PNP		2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_a4t.c linux.21p2/drivers/isdn/hisax/bkm_a4t.c
--- linux.vanilla/drivers/isdn/hisax/bkm_a4t.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/bkm_a4t.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,12 @@
-/* $Id: bkm_a4t.c,v 1.13.6.5 2001/07/18 16:02:15 kai Exp $
- * bkm_a4t.c    low level stuff for T-Berkom A4T
- *              derived from the original file sedlbauer.c
- *              derived from the original file niccy.c
- *              derived from the original file netjet.c
+/* $Id: bkm_a4t.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Roland Klabunde (R.Klabunde@Berkom.de)
+ * low level stuff for T-Berkom A4T
  *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -25,7 +25,7 @@
 
 extern const char *CardType[];
 
-const char *bkm_a4t_revision = "$Revision: 1.13.6.5 $";
+const char *bkm_a4t_revision = "$Revision: 1.1.2.1 $";
 
 
 static inline u_char
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_a8.c linux.21p2/drivers/isdn/hisax/bkm_a8.c
--- linux.vanilla/drivers/isdn/hisax/bkm_a8.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/bkm_a8.c	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,15 @@
-/* $Id: bkm_a8.c,v 1.14.6.6 2001/07/18 16:02:15 kai Exp $
- * bkm_a8.c     low level stuff for Scitel Quadro (4*S0, passive)
- *              derived from the original file sedlbauer.c
- *              derived from the original file niccy.c
- *              derived from the original file netjet.c
+/* $Id: bkm_a8.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Roland Klabunde (R.Klabunde@Berkom.de)
+ * low level stuff for Scitel Quadro (4*S0, passive)
  *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #define __NO_VERSION__
 
 #include <linux/config.h>
@@ -28,7 +29,7 @@
 
 extern const char *CardType[];
 
-const char sct_quadro_revision[] = "$Revision: 1.14.6.6 $";
+const char sct_quadro_revision[] = "$Revision: 1.1.2.1 $";
 
 static const char *sct_quadro_subtypes[] =
 {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_ax.h linux.21p2/drivers/isdn/hisax/bkm_ax.h
--- linux.vanilla/drivers/isdn/hisax/bkm_ax.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/bkm_ax.h	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,12 @@
-/* $Id: bkm_ax.h,v 1.5.6.2 2001/02/16 16:43:25 kai Exp $
- * bkm_ax.h   low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
+/* $Id: bkm_ax.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author     Roland Klabunde (R.Klabunde@Berkom.de)
+ * low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive)
  *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/callc.c linux.21p2/drivers/isdn/hisax/callc.c
--- linux.vanilla/drivers/isdn/hisax/callc.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/callc.c	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,23 @@
-/* $Id: callc.c,v 2.51.6.4 2001/06/09 15:14:17 kai Exp $
+/* $Id: callc.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *              based on the teles driver from Jan den Ouden
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
+ *
+ * based on the teles driver from Jan den Ouden
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *
  */
+
 #define __NO_VERSION__
+#include <linux/module.h>
 #include <linux/init.h>
 #include "hisax.h"
 #include "../avmb1/capicmd.h"  /* this should be moved in a common place */
@@ -20,7 +26,7 @@
 #define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module))
 #endif	/* MODULE */
 
-const char *lli_revision = "$Revision: 2.51.6.4 $";
+const char *lli_revision = "$Revision: 1.1.2.1 $";
 
 extern struct IsdnCard cards[];
 extern int nrcards;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/cert.c linux.21p2/drivers/isdn/hisax/cert.c
--- linux.vanilla/drivers/isdn/hisax/cert.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/cert.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,13 @@
-/* $Id: cert.c,v 2.3.6.2 2001/07/27 09:08:27 kai Exp $
+/* $Id: cert.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  */
  
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/config.c linux.21p2/drivers/isdn/hisax/config.c
--- linux.vanilla/drivers/isdn/hisax/config.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/config.c	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,19 @@
-/* $Id: config.c,v 2.57.6.16 2001/07/13 09:01:00 kai Exp $
+/* $Id: config.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *              based on the teles driver from Jan den Ouden
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ *              by Kai Germaschewski <kai.germaschewski@gmx.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This file is (c) under GNU General Public License
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
+ *
+ * based on the teles driver from Jan den Ouden
  *
  */
+
 #include <linux/types.h>
 #include <linux/stddef.h>
 #include <linux/timer.h>
@@ -364,7 +372,9 @@
 static int mem[8]  = { 0, };
 static char *id  = HiSaxID;
 
+MODULE_DESCRIPTION("ISDN4Linux: Driver for passive ISDN cards");
 MODULE_AUTHOR("Karsten Keil");
+MODULE_LICENSE("GPL");
 MODULE_PARM(type, "1-8i");
 MODULE_PARM(protocol, "1-8i");
 MODULE_PARM(io, "1-8i");
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/diva.c linux.21p2/drivers/isdn/hisax/diva.c
--- linux.vanilla/drivers/isdn/hisax/diva.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/diva.c	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,17 @@
-/* $Id: diva.c,v 1.25.6.4 2001/02/16 16:43:25 kai Exp $
+/* $Id: diva.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * diva.c     low level stuff for Eicon.Diehl Diva Family ISDN cards
+ * low level stuff for Eicon.Diehl Diva Family ISDN cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
- * Thanks to Eicon Technology for documents and informations
+ * Thanks to Eicon Technology for documents and information
  *
  */
 
@@ -25,7 +28,7 @@
 
 extern const char *CardType[];
 
-const char *Diva_revision = "$Revision: 1.25.6.4 $";
+const char *Diva_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/elsa.c linux.21p2/drivers/isdn/hisax/elsa.c
--- linux.vanilla/drivers/isdn/hisax/elsa.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/elsa.c	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,17 @@
-/* $Id: elsa.c,v 2.26.6.5 2001/07/18 16:25:12 kai Exp $
+/* $Id: elsa.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * elsa.c     low level stuff for Elsa isdn cards
+ * low level stuff for Elsa isdn cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
- * Thanks to    Elsa GmbH for documents and informations
+ * Thanks to    Elsa GmbH for documents and information
  *
  *              Klaus Lichtenwalder (Klaus.Lichtenwalder@WebForum.DE)
  *              for ELSA PCMCIA support
@@ -31,7 +34,7 @@
 
 extern const char *CardType[];
 
-const char *Elsa_revision = "$Revision: 2.26.6.5 $";
+const char *Elsa_revision = "$Revision: 1.1.2.1 $";
 const char *Elsa_Types[] =
 {"None", "PC", "PCC-8", "PCC-16", "PCF", "PCF-Pro",
  "PCMCIA", "QS 1000", "QS 3000", "Microlink PCI", "QS 3000 PCI", 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/elsa_ser.c linux.21p2/drivers/isdn/hisax/elsa_ser.c
--- linux.vanilla/drivers/isdn/hisax/elsa_ser.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/elsa_ser.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: elsa_ser.c,v 2.10.6.2 2001/06/09 15:14:17 kai Exp $
+/* $Id: elsa_ser.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * stuff for the serial modem on ELSA cards
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #include <linux/config.h>
 #include <linux/serial.h>
 #include <linux/serial_reg.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/fsm.c linux.21p2/drivers/isdn/hisax/fsm.c
--- linux.vanilla/drivers/isdn/hisax/fsm.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/fsm.c	Tue Jan  1 21:22:31 2002
@@ -1,15 +1,21 @@
-/* $Id: fsm.c,v 1.14.6.2 2001/05/26 15:19:57 kai Exp $
+/* $Id: fsm.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *              based on the teles driver from Jan den Ouden
+ * Finite state machine
+ *
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ *              by Kai Germaschewski <kai.germaschewski@gmx.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *
- * This file is (c) under GNU General Public License
- *
  */
+
 #define __NO_VERSION__
+#include <linux/module.h>
 #include <linux/init.h>
 #include "hisax.h"
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/gazel.c linux.21p2/drivers/isdn/hisax/gazel.c
--- linux.vanilla/drivers/isdn/hisax/gazel.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/gazel.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,16 @@
-/* $Id: gazel.c,v 2.11.6.6 2001/06/08 08:48:46 kai Exp $
+/* $Id: gazel.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * gazel.c     low level stuff for Gazel isdn cards
+ * low level stuff for Gazel isdn cards
  *
  * Author       BeWan Systems
  *              based on source code from Karsten Keil
- *
- * This file is (c) under GNU General Public License
+ * Copyright    by BeWan Systems
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #include <linux/config.h>
 #include <linux/init.h>
 #define __NO_VERSION__
@@ -20,7 +23,7 @@
 #include <linux/isdn_compat.h>
 
 extern const char *CardType[];
-const char *gazel_revision = "$Revision: 2.11.6.6 $";
+const char *gazel_revision = "$Revision: 1.1.2.1 $";
 
 #define R647      1
 #define R685      2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bds0.c linux.21p2/drivers/isdn/hisax/hfc_2bds0.c
--- linux.vanilla/drivers/isdn/hisax/hfc_2bds0.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_2bds0.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/* $Id: hfc_2bds0.c,v 1.15.6.2 2001/06/09 15:14:17 kai Exp $
+/* $Id: hfc_2bds0.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific routines for CCD's HFC 2BDS0
+ * specific routines for CCD's HFC 2BDS0
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bds0.h linux.21p2/drivers/isdn/hisax/hfc_2bds0.h
--- linux.vanilla/drivers/isdn/hisax/hfc_2bds0.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_2bds0.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hfc_2bds0.h,v 1.4.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: hfc_2bds0.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific defines for CCD's HFC 2BDS0
+ * specific defines for CCD's HFC 2BDS0
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bs0.c linux.21p2/drivers/isdn/hisax/hfc_2bs0.c
--- linux.vanilla/drivers/isdn/hisax/hfc_2bs0.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_2bs0.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hfc_2bs0.c,v 1.17.6.2 2001/06/09 15:14:17 kai Exp $
+/* $Id: hfc_2bs0.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific routines for CCD's HFC 2BS0
+ * specific routines for CCD's HFC 2BS0
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bs0.h linux.21p2/drivers/isdn/hisax/hfc_2bs0.h
--- linux.vanilla/drivers/isdn/hisax/hfc_2bs0.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_2bs0.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hfc_2bs0.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: hfc_2bs0.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific defines for CCD's HFC 2BS0
+ * specific defines for CCD's HFC 2BS0
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_pci.c linux.21p2/drivers/isdn/hisax/hfc_pci.c
--- linux.vanilla/drivers/isdn/hisax/hfc_pci.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_pci.c	Tue Jan  1 21:22:31 2002
@@ -1,27 +1,17 @@
-/* $Id: hfc_pci.c,v 1.34.6.7 2001/07/27 09:08:27 kai Exp $
-
- * hfc_pci.c     low level driver for CCD´s hfc-pci based cards
- *
- * Author     Werner Cornelius (werner@isdn4linux.de)
- *            based on existing driver for CCD hfc ISA cards
- *            type approval valid for HFC-S PCI A based card 
- *
- * Copyright 1999  by Werner Cornelius (werner@isdn-development.de)
- * Copyright 1999  by Karsten Keil (keil@isdn4linux.de)
+/* $Id: hfc_pci.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * low level driver for CCD´s hfc-pci based cards
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author       Werner Cornelius
+ *              based on existing driver for CCD hfc ISA cards
+ * Copyright    by Werner Cornelius  <werner@isdn4linux.de>
+ *              by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  */
 
@@ -37,7 +27,7 @@
 
 extern const char *CardType[];
 
-static const char *hfcpci_revision = "$Revision: 1.34.6.7 $";
+static const char *hfcpci_revision = "$Revision: 1.1.2.1 $";
 
 /* table entry in the PCI devices list */
 typedef struct {
@@ -113,7 +103,7 @@
 static void
 reset_hfcpci(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
@@ -481,7 +471,7 @@
 void
 main_rec_hfcpci(struct BCState *bcs)
 {
-	long flags;
+	unsigned long flags;
 	struct IsdnCardState *cs = bcs->cs;
 	int rcnt, real_fifo;
 	int receive, count = 5;
@@ -558,7 +548,7 @@
 static void
 hfcpci_fill_dfifo(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 	int fcnt;
 	int count, new_z1, maxlen;
 	dfifo_type *df;
@@ -873,7 +863,7 @@
 static void
 receive_emsg(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 	int rcnt;
 	int receive, count = 5;
 	bzfifo_type *bz;
@@ -983,7 +973,7 @@
 	u_char exval;
 	struct BCState *bcs;
 	int count = 15;
-	long flags;
+	unsigned long flags;
 	u_char val, stat;
 
 	if (!cs) {
@@ -1439,7 +1429,7 @@
 hfcpci_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
@@ -1652,7 +1642,7 @@
 static int
 hfcpci_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
-	long flags;
+	unsigned long flags;
 
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "HFCPCI: card_msg %x", mt);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_pci.h linux.21p2/drivers/isdn/hisax/hfc_pci.h
--- linux.vanilla/drivers/isdn/hisax/hfc_pci.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_pci.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,12 @@
-/* $Id: hfc_pci.h,v 1.8.6.1 2001/04/08 19:32:26 kai Exp $
+/* $Id: hfc_pci.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific defines for CCD's HFC 2BDS0 PCI chips
+ * specific defines for CCD's HFC 2BDS0 PCI chips
  *
- * Author     Werner Cornelius (werner@isdn4linux.de)      
- *
- * Copyright 1999  by Werner Cornelius (werner@isdn4linux.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Author       Werner Cornelius
+ * Copyright    by Werner Cornelius  <werner@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_sx.c linux.21p2/drivers/isdn/hisax/hfc_sx.c
--- linux.vanilla/drivers/isdn/hisax/hfc_sx.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_sx.c	Tue Jan  1 21:22:31 2002
@@ -1,25 +1,13 @@
-/* $Id: hfc_sx.c,v 1.9.6.2 2001/07/18 16:25:12 kai Exp $
-
- * hfc_sx.c     low level driver for CCD´s hfc-s+/sp based cards
- *
- * Author     Werner Cornelius (werner@isdn4linux.de)
- *            based on existing driver for CCD HFC PCI cards
- *
- * Copyright 1999  by Werner Cornelius (werner@isdn4linux.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+/* $Id: hfc_sx.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * level driver for CCD´s hfc-s+/sp based cards
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Author       Werner Cornelius
+ *              based on existing driver for CCD HFC PCI cards
+ * Copyright    by Werner Cornelius  <werner@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -32,7 +20,7 @@
 
 extern const char *CardType[];
 
-static const char *hfcsx_revision = "$Revision: 1.9.6.2 $";
+static const char *hfcsx_revision = "$Revision: 1.1.2.1 $";
 
 /***************************************/
 /* IRQ-table for CCDs demo board       */
@@ -382,7 +370,7 @@
 static void
 reset_hfcsx(struct IsdnCardState *cs)
 {
-	long flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
@@ -539,7 +527,7 @@
 void
 main_rec_hfcsx(struct BCState *bcs)
 {
-	long flags;
+	unsigned long flags;
 	struct IsdnCardState *cs = bcs->cs;
 	int count = 5;
 	struct sk_buff *skb;
@@ -783,7 +771,7 @@
 	u_char exval;
 	struct BCState *bcs;
 	int count = 15;
-	long flags;
+	unsigned long flags;
 	u_char val, stat;
 
 	if (!cs) {
@@ -1228,7 +1216,7 @@
 hfcsx_l2l1(struct PStack *st, int pr, void *arg)
 {
 	struct sk_buff *skb = arg;
-	long flags;
+	unsigned long flags;
 
 	switch (pr) {
 		case (PH_DATA | REQUEST):
@@ -1441,7 +1429,7 @@
 static int
 hfcsx_card_msg(struct IsdnCardState *cs, int mt, void *arg)
 {
-	long flags;
+	unsigned long flags;
 
 	if (cs->debug & L1_DEB_ISAC)
 		debugl1(cs, "HFCSX: card_msg %x", mt);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_sx.h linux.21p2/drivers/isdn/hisax/hfc_sx.h
--- linux.vanilla/drivers/isdn/hisax/hfc_sx.h	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/hisax/hfc_sx.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/* $Id: hfc_sx.h,v 1.2 2000/06/26 08:59:13 keil Exp $
+/* $Id: hfc_sx.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  specific defines for CCD's HFC 2BDS0 S+,SP chips
+ * specific defines for CCD's HFC 2BDS0 S+,SP chips
  *
- * Author     Werner Cornelius (werner@isdn4linux.de)      
- *
- * Copyright 1999  by Werner Cornelius (werner@isdn4linux.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Author       Werner Cornelius
+ *              based on existing driver for CCD HFC PCI cards
+ * Copyright    by Werner Cornelius  <werner@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfcscard.c linux.21p2/drivers/isdn/hisax/hfcscard.c
--- linux.vanilla/drivers/isdn/hisax/hfcscard.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hfcscard.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hfcscard.c,v 1.8.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: hfcscard.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * hfcscard.c     low level stuff for hfcs based cards (Teles3c, ACER P10)
+ * low level stuff for hfcs based cards (Teles3c, ACER P10)
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -16,7 +18,7 @@
 
 extern const char *CardType[];
 
-static const char *hfcs_revision = "$Revision: 1.8.6.1 $";
+static const char *hfcs_revision = "$Revision: 1.1.2.1 $";
 
 static void
 hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hisax.h linux.21p2/drivers/isdn/hisax/hisax.h
--- linux.vanilla/drivers/isdn/hisax/hisax.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hisax.h	Tue Jan  1 23:14:57 2002
@@ -1,13 +1,12 @@
-/* $Id: hisax.h,v 2.52.6.7 2001/07/18 16:02:15 kai Exp $
+/* $Id: hisax.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *   Basic declarations, defines and prototypes
+ * Basic declarations, defines and prototypes
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 #include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/major.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx.c linux.21p2/drivers/isdn/hisax/hscx.c
--- linux.vanilla/drivers/isdn/hisax/hscx.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hscx.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hscx.c,v 1.21.6.2 2001/06/09 15:14:17 kai Exp $
+/* $Id: hscx.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * hscx.c   HSCX specific routines
+ * HSCX specific routines
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx.h linux.21p2/drivers/isdn/hisax/hscx.h
--- linux.vanilla/drivers/isdn/hisax/hscx.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hscx.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: hscx.h,v 1.6.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: hscx.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * hscx.h   HSCX specific defines
+ * HSCX specific defines
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx_irq.c linux.21p2/drivers/isdn/hisax/hscx_irq.c
--- linux.vanilla/drivers/isdn/hisax/hscx_irq.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/hscx_irq.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,14 @@
-/* $Id: hscx_irq.c,v 1.16.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: hscx_irq.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * hscx_irq.c     low level b-channel stuff for Siemens HSCX
+ * low level b-channel stuff for Siemens HSCX
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * This is an include file for fast inline IRQ stuff
- *
- * This file is (c) under GNU General Public License
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/icc.c linux.21p2/drivers/isdn/hisax/icc.c
--- linux.vanilla/drivers/isdn/hisax/icc.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/icc.c	Tue Jan  1 21:22:31 2002
@@ -1,18 +1,18 @@
-// $Id: icc.c,v 1.5.6.3 2001/06/09 15:14:17 kai Exp $
-//-----------------------------------------------------------------------------
-//
-// ICC specific routines
-//
-// Author       Matt Henderson & Guy Ellis - Traverse Tecnologies Pty Ltd
-//              www.traverse.com.au
-//
-// 1999.6.25 Initial implementation of routines for Siemens ISDN
-// Communication Controller PEB 2070 based on the ISAC routines
-// written by Karsten Keil.
-//
-// This file is (c) under GNU General Public License
-//
-//-----------------------------------------------------------------------------
+/* $Id: icc.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * ICC specific routines
+ *
+ * Author       Matt Henderson & Guy Ellis
+ * Copyright    by Traverse Technologies Pty Ltd, www.travers.com.au
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * 1999.6.25 Initial implementation of routines for Siemens ISDN
+ * Communication Controller PEB 2070 based on the ISAC routines
+ * written by Karsten Keil.
+ *
+ */
 
 #define __NO_VERSION__
 #include <linux/init.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/icc.h linux.21p2/drivers/isdn/hisax/icc.h
--- linux.vanilla/drivers/isdn/hisax/icc.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/icc.h	Tue Jan  1 21:22:31 2002
@@ -1,19 +1,17 @@
-// $Id: icc.h,v 1.2.6.2 2001/03/13 16:17:08 kai Exp $
-//-----------------------------------------------------------------------------
-//
-// ICC specific routines
-//
-// Author       Matt Henderson & Guy Ellis - Traverse Tecnologies Pty Ltd
-//              www.traverse.com.au
-//
-// 1999.7.14 Initial implementation of routines for Siemens ISDN 
-// Communication Controller PEB 2070 based on the ISAC routines 
-// written by Karsten Keil.
-//
-// This file is (c) under GNU General Public License
-//
-//-----------------------------------------------------------------------------
-
+/* $Id: icc.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * ICC specific routines
+ *
+ * Author       Matt Henderson & Guy Ellis
+ * Copyright    by Traverse Technologies Pty Ltd, www.travers.com.au
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * 1999.7.14 Initial implementation of routines for Siemens ISDN 
+ * Communication Controller PEB 2070 based on the ISAC routines 
+ * written by Karsten Keil.
+ */
 
 /* All Registers original Siemens Spec  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/ipac.h linux.21p2/drivers/isdn/hisax/ipac.h
--- linux.vanilla/drivers/isdn/hisax/ipac.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/ipac.h	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,14 @@
-/* $Id: ipac.h,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: ipac.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * ipac.h   IPAC specific defines
+ * IPAC specific defines
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * 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  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isac.c linux.21p2/drivers/isdn/hisax/isac.c
--- linux.vanilla/drivers/isdn/hisax/isac.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isac.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,16 @@
-/* $Id: isac.c,v 1.28.6.2 2001/06/09 15:14:17 kai Exp $
+/* $Id: isac.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * isac.c   ISAC specific routines
+ * ISAC specific routines
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
  */
 
 #define __NO_VERSION__
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isac.h linux.21p2/drivers/isdn/hisax/isac.h
--- linux.vanilla/drivers/isdn/hisax/isac.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isac.h	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,14 @@
-/* $Id: isac.h,v 1.7.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isac.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * isac.h   ISAC specific defines
+ * ISAC specific defines
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * 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  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isar.c linux.21p2/drivers/isdn/hisax/isar.c
--- linux.vanilla/drivers/isdn/hisax/isar.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isar.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,4 @@
-/* $Id: isar.c,v 1.17.6.3 2001/06/09 15:14:17 kai Exp $
+/* $Id: isar.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * isar.c   ISAR (Siemens PSB 7110) specific routines
  *
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isar.h linux.21p2/drivers/isdn/hisax/isar.h
--- linux.vanilla/drivers/isdn/hisax/isar.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isar.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: isar.h,v 1.9.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isar.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * isar.h   ISAR (Siemens PSB 7110) specific defines
+ * ISAR (Siemens PSB 7110) specific defines
  *
- * Author Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
  
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl1.c linux.21p2/drivers/isdn/hisax/isdnl1.c
--- linux.vanilla/drivers/isdn/hisax/isdnl1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl1.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,16 @@
-/* $Id: isdnl1.c,v 2.41.6.3 2001/05/26 15:19:57 kai Exp $
+/* $Id: isdnl1.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * isdnl1.c     common low level stuff for Siemens Chipsetbased isdn cards
- *              based on the teles driver from Jan den Ouden
+ * common low level stuff for Siemens Chipsetbased isdn cards
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
@@ -15,7 +18,7 @@
  *
  */
 
-const char *l1_revision = "$Revision: 2.41.6.3 $";
+const char *l1_revision = "$Revision: 1.1.2.1 $";
 
 #define __NO_VERSION__
 #include <linux/init.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl1.h linux.21p2/drivers/isdn/hisax/isdnl1.h
--- linux.vanilla/drivers/isdn/hisax/isdnl1.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl1.h	Tue Jan  1 21:22:31 2002
@@ -1,8 +1,9 @@
-/* $Id: isdnl1.h,v 2.9.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isdnl1.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * Layer 1 defines
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl2.c linux.21p2/drivers/isdn/hisax/isdnl2.c
--- linux.vanilla/drivers/isdn/hisax/isdnl2.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl2.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,26 @@
-/* $Id: isdnl2.c,v 2.25.6.3 2001/06/09 15:14:17 kai Exp $
+/* $Id: isdnl2.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
  *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
 #include "isdnl2.h"
 
-const char *l2_revision = "$Revision: 2.25.6.3 $";
+const char *l2_revision = "$Revision: 1.1.2.1 $";
 
 static void l2m_debug(struct FsmInst *fi, char *fmt, ...);
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl2.h linux.21p2/drivers/isdn/hisax/isdnl2.h
--- linux.vanilla/drivers/isdn/hisax/isdnl2.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl2.h	Tue Jan  1 21:22:31 2002
@@ -1,8 +1,9 @@
-/* $Id: isdnl2.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isdnl2.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * Layer 2 defines
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl3.c linux.21p2/drivers/isdn/hisax/isdnl3.c
--- linux.vanilla/drivers/isdn/hisax/isdnl3.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl3.c	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/* $Id: isdnl3.c,v 2.17.6.4 2001/06/09 15:14:17 kai Exp $
+/* $Id: isdnl3.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
  *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
@@ -18,7 +21,7 @@
 #include "isdnl3.h"
 #include <linux/config.h>
 
-const char *l3_revision = "$Revision: 2.17.6.4 $";
+const char *l3_revision = "$Revision: 1.1.2.1 $";
 
 static struct Fsm l3fsm;
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl3.h linux.21p2/drivers/isdn/hisax/isdnl3.h
--- linux.vanilla/drivers/isdn/hisax/isdnl3.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isdnl3.h	Tue Jan  1 21:22:31 2002
@@ -1,6 +1,7 @@
-/* $Id: isdnl3.h,v 2.6.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isdnl3.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isurf.c linux.21p2/drivers/isdn/hisax/isurf.c
--- linux.vanilla/drivers/isdn/hisax/isurf.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/isurf.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: isurf.c,v 1.10.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: isurf.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * isurf.c  low level stuff for Siemens I-Surf/I-Talk cards
+ * low level stuff for Siemens I-Surf/I-Talk cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -17,7 +19,7 @@
 
 extern const char *CardType[];
 
-static const char *ISurf_revision = "$Revision: 1.10.6.1 $";
+static const char *ISurf_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/ix1_micro.c linux.21p2/drivers/isdn/hisax/ix1_micro.c
--- linux.vanilla/drivers/isdn/hisax/ix1_micro.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/ix1_micro.c	Tue Jan  1 21:22:31 2002
@@ -1,47 +1,22 @@
-/* $Id: ix1_micro.c,v 2.10.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: ix1_micro.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * ix1_micro.c  low level stuff for ITK ix1-micro Rev.2 isdn cards
- *              derived from the original file teles3.c from Karsten Keil
+ * low level stuff for ITK ix1-micro Rev.2 isdn cards
+ * derived from the original file teles3.c from Karsten Keil
  *
- * Copyright (C) 1997 Klaus-Peter Nischke (ITK AG) (for the modifications to
- *                                                  the original file teles.c)
- *
- * Thanks to    Jan den Ouden
- *              Fritz Elfert
- *              Beat Doebeli
+ * Author       Klaus-Peter Nischke
+ * Copyright    by Klaus-Peter Nischke, ITK AG
+ *                                   <klaus@nischke.do.eunet.de>
+ *              by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
+ * Klaus-Peter Nischke
+ * Deusener Str. 287
+ * 44369 Dortmund
+ * Germany
  */
 
-/*
-   For the modification done by the author the following terms and conditions
-   apply (GNU General Public License)
-
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-
-   You may contact Klaus-Peter Nischke by email: klaus@nischke.do.eunet.de
-   or by conventional mail:
-
-   Klaus-Peter Nischke
-   Deusener Str. 287
-   44369 Dortmund
-   Germany
- */
-
-
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -50,7 +25,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *ix1_revision = "$Revision: 2.10.6.1 $";
+const char *ix1_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade.c linux.21p2/drivers/isdn/hisax/jade.c
--- linux.vanilla/drivers/isdn/hisax/jade.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/jade.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: jade.c,v 1.6.6.2 2001/06/09 15:14:18 kai Exp $
+/* $Id: jade.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * jade.c   JADE stuff (derived from original hscx.c)
+ * JADE stuff (derived from original hscx.c)
  *
- * Author   Roland Klabunde (R.Klabunde@Berkom.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade.h linux.21p2/drivers/isdn/hisax/jade.h
--- linux.vanilla/drivers/isdn/hisax/jade.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/jade.h	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,12 @@
-/* $Id: jade.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $
- * jade.h   JADE specific defines
+/* $Id: jade.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author   Roland Klabunde (R.Klabunde@Berkom.de)
+ * JADE specific defines
  *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade_irq.c linux.21p2/drivers/isdn/hisax/jade_irq.c
--- linux.vanilla/drivers/isdn/hisax/jade_irq.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/jade_irq.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: jade_irq.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: jade_irq.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * jade_irq.c   Low level JADE IRQ stuff (derived from original hscx_irq.c)
+ * Low level JADE IRQ stuff (derived from original hscx_irq.c)
  *
- * Author   Roland Klabunde (R.Klabunde@Berkom.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Roland Klabunde
+ * Copyright    by Roland Klabunde   <R.Klabunde@Berkom.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3_1tr6.c linux.21p2/drivers/isdn/hisax/l3_1tr6.c
--- linux.vanilla/drivers/isdn/hisax/l3_1tr6.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3_1tr6.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/* $Id: l3_1tr6.c,v 2.13.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: l3_1tr6.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  German 1TR6 D-channel protocol
+ * German 1TR6 D-channel protocol
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  */
 
@@ -17,7 +20,7 @@
 #include <linux/ctype.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *l3_1tr6_revision = "$Revision: 2.13.6.1 $";
+const char *l3_1tr6_revision = "$Revision: 1.1.2.1 $";
 
 #define MsgHead(ptr, cref, mty, dis) \
 	*ptr++ = dis; \
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3_1tr6.h linux.21p2/drivers/isdn/hisax/l3_1tr6.h
--- linux.vanilla/drivers/isdn/hisax/l3_1tr6.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3_1tr6.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: l3_1tr6.h,v 2.2.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: l3_1tr6.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  German 1TR6 D-channel protocol defines
+ * German 1TR6 D-channel protocol defines
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #ifndef l3_1tr6
 #define l3_1tr6
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3dss1.c linux.21p2/drivers/isdn/hisax/l3dss1.c
--- linux.vanilla/drivers/isdn/hisax/l3dss1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3dss1.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,18 @@
-/* $Id: l3dss1.c,v 2.30.6.1 2001/02/16 16:43:27 kai Exp $
+/* $Id: l3dss1.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
  * EURO/DSS1 D-channel protocol
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * German 1TR6 D-channel protocol
+ *
+ * Author       Karsten Keil
  *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
@@ -22,7 +27,7 @@
 #include <linux/config.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *dss1_revision = "$Revision: 2.30.6.1 $";
+const char *dss1_revision = "$Revision: 1.1.2.1 $";
 
 #define EXT_BEARER_CAPS 1
 
@@ -44,7 +49,8 @@
 static unsigned char new_invoke_id(struct PStack *p)
 {
 	unsigned char retval;
-	int flags,i;
+	unsigned long flags;
+	int i;
   
 	i = 32; /* maximum search depth */
 
@@ -72,7 +78,7 @@
 /* free a used invoke id */
 /*************************/
 static void free_invoke_id(struct PStack *p, unsigned char id)
-{ int flags;
+{ unsigned long flags;
 
   if (!id) return; /* 0 = invalid value */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3dss1.h linux.21p2/drivers/isdn/hisax/l3dss1.h
--- linux.vanilla/drivers/isdn/hisax/l3dss1.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3dss1.h	Tue Jan  1 21:22:31 2002
@@ -1,8 +1,9 @@
-/* $Id: l3dss1.h,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
+/* $Id: l3dss1.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- *  DSS1 (Euro) D-channel protocol defines
+ * DSS1 (Euro) D-channel protocol defines
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3ni1.c linux.21p2/drivers/isdn/hisax/l3ni1.c
--- linux.vanilla/drivers/isdn/hisax/l3ni1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3ni1.c	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,23 @@
-// $Id: l3ni1.c,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
-//
-//-----------------------------------------------------------------------------
-//
-// NI1 D-channel protocol
-//
-// Authors:
-// Matt Henderson & Guy Ellis - Traverse Tecnologies Pty Ltd
-// www.traverse.com.au
-//
-// 2000.6.6 Initial implementation of routines for US NI1 
-// Layer 3 protocol based on the EURO/DSS1 D-channel protocol 
-// driver written by Karsten Keil et al.  
-// NI-1 Hall of Fame - Thanks to.... 
-// Ragnar Paulson - for some handy code fragments
-// Will Scales - beta tester extraordinaire
-// Brett Whittacre - beta tester and remote devel system in Vegas
-//
-// This file is (c) under GNU General Public License
-//
-//-----------------------------------------------------------------------------
+/* $Id: l3ni1.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * NI1 D-channel protocol
+ *
+ * Author       Matt Henderson & Guy Ellis
+ * Copyright    by Traverse Technologies Pty Ltd, www.travers.com.au
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * 2000.6.6 Initial implementation of routines for US NI1 
+ * Layer 3 protocol based on the EURO/DSS1 D-channel protocol 
+ * driver written by Karsten Keil et al.  
+ * NI-1 Hall of Fame - Thanks to.... 
+ * Ragnar Paulson - for some handy code fragments
+ * Will Scales - beta tester extraordinaire
+ * Brett Whittacre - beta tester and remote devel system in Vegas
+ *
+ */
+
 #define __NO_VERSION__
 #include "hisax.h"
 #include "isdnl3.h"
@@ -26,7 +25,7 @@
 #include <linux/ctype.h>
 
 extern char *HiSax_getrev(const char *revision);
-const char *ni1_revision = "$Revision: 2.5.6.2 $";
+const char *ni1_revision = "$Revision: 1.1.2.1 $";
 
 #define EXT_BEARER_CAPS 1
 
@@ -48,7 +47,8 @@
 static unsigned char new_invoke_id(struct PStack *p)
 {
 	unsigned char retval;
-	int flags,i;
+	unsigned long flags;
+	int i;
   
 	i = 32; /* maximum search depth */
 
@@ -76,7 +76,7 @@
 /* free a used invoke id */
 /*************************/
 static void free_invoke_id(struct PStack *p, unsigned char id)
-{ int flags;
+{ unsigned long flags;
 
   if (!id) return; /* 0 = invalid value */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3ni1.h linux.21p2/drivers/isdn/hisax/l3ni1.h
--- linux.vanilla/drivers/isdn/hisax/l3ni1.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/l3ni1.h	Tue Jan  1 21:22:31 2002
@@ -1,20 +1,19 @@
-// $Id: l3ni1.h,v 2.3.6.1 2001/02/16 16:43:28 kai Exp $
-//-----------------------------------------------------------------------------
-//
-// NI1 D-channel protocol
-//
-// Author       Matt Henderson & Guy Ellis - Traverse Tecnologies Pty Ltd
-//              www.traverse.com.au
-//
-// 2000.6.6 Initial implementation of routines for US NI1 
-// Layer 3 protocol based on the EURO/DSS1 D-channel protocol 
-// driver written by Karsten Keil et al.  Thanks also for the 
-// code provided by Ragnar Paulson.
-//
-//
-// This file is (c) under GNU General Public License
-//
-//-----------------------------------------------------------------------------
+/* $Id: l3ni1.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * NI1 D-channel protocol
+ *
+ * Author       Matt Henderson & Guy Ellis
+ * Copyright    by Traverse Technologies Pty Ltd, www.travers.com.au
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ * 2000.6.6 Initial implementation of routines for US NI1 
+ * Layer 3 protocol based on the EURO/DSS1 D-channel protocol 
+ * driver written by Karsten Keil et al.  Thanks also for the 
+ * code provided by Ragnar Paulson.
+ *
+ */
 
 #ifndef l3ni1_process
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/lmgr.c linux.21p2/drivers/isdn/hisax/lmgr.c
--- linux.vanilla/drivers/isdn/hisax/lmgr.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/lmgr.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: lmgr.c,v 1.7.6.1 2001/02/16 16:43:28 kai Exp $
+/* $Id: lmgr.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Layermanagement module
  *
- *  Layermanagement module
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/mic.c linux.21p2/drivers/isdn/hisax/mic.c
--- linux.vanilla/drivers/isdn/hisax/mic.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/mic.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,12 @@
-/* $Id: mic.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $
+/* $Id: mic.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * mic.c  low level stuff for mic cards
+ * low level stuff for mic cards
  *
- * Copyright (C) 1997 
- *
- * Author  Stephan von Krawczynski <skraw@ithnet.com>
- *
- * This file is (c) under GNU General Public License
+ * Author       Stephan von Krawczynski
+ * Copyright    by Stephan von Krawczynski <skraw@ithnet.com>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -19,7 +19,7 @@
 
 extern const char *CardType[];
 
-const char *mic_revision = "$Revision: 1.10.6.1 $";
+const char *mic_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/netjet.c linux.21p2/drivers/isdn/hisax/netjet.c
--- linux.vanilla/drivers/isdn/hisax/netjet.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/netjet.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,14 @@
-/* $Id: netjet.c,v 1.24.6.5 2001/06/09 15:14:18 kai Exp $
+/* $Id: netjet.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * netjet.c     low level stuff for Traverse Technologie NETJet ISDN cards
+ * low level stuff for Traverse Technologie NETJet ISDN cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * Thanks to Traverse Technologie Australia for documents and informations
- *
- * This file is (c) under GNU General Public License
+ * Thanks to Traverse Technologie Australia for documents and information
  *
  */
 
@@ -22,7 +24,7 @@
 #include <asm/io.h>
 #include "netjet.h"
 
-const char *NETjet_revision = "$Revision: 1.24.6.5 $";
+const char *NETjet_revision = "$Revision: 1.1.2.1 $";
 
 /* Interface functions */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/netjet.h linux.21p2/drivers/isdn/hisax/netjet.h
--- linux.vanilla/drivers/isdn/hisax/netjet.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/netjet.h	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,16 @@
-// $Id: netjet.h,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $
-//-----------------------------------------------------------------------------
-//
-// NETjet common header file
-//
-// Author       Kerstern Keil repackaged by
-//              Matt Henderson - Traverse Technologies P/L www.traverse.com.au
-//
-// This file is (c) under GNU General Public License
-//
-//-----------------------------------------------------------------------------
+/* $Id: netjet.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * NETjet common header file
+ *
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ *              by Matt Henderson,
+ *                 Traverse Technologies P/L www.traverse.com.au
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
 
 extern const char *CardType[];
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/niccy.c linux.21p2/drivers/isdn/hisax/niccy.c
--- linux.vanilla/drivers/isdn/hisax/niccy.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/niccy.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,15 @@
-/* $Id: niccy.c,v 1.15.6.4 2001/02/16 16:43:28 kai Exp $
+/* $Id: niccy.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * niccy.c  low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and
- *          compatible (SAGEM cybermodem)
+ * low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and
+ * compatible (SAGEM cybermodem)
  *
- * Author   Karsten Keil
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
  * 
- * Thanks to Dr. Neuhaus and SAGEM for informations
- *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ * 
+ * Thanks to Dr. Neuhaus and SAGEM for information
  *
  */
 
@@ -23,7 +25,7 @@
 #include <linux/isdn_compat.h>
 
 extern const char *CardType[];
-const char *niccy_revision = "$Revision: 1.15.6.4 $";
+const char *niccy_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/nj_s.c linux.21p2/drivers/isdn/hisax/nj_s.c
--- linux.vanilla/drivers/isdn/hisax/nj_s.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/nj_s.c	Tue Jan  1 21:22:31 2002
@@ -1,7 +1,9 @@
-// $Id: nj_s.c,v 2.7.6.5 2001/07/18 16:25:12 kai Exp $
-//
-// This file is (c) under GNU General Public License
-//
+/* $Id: nj_s.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
 
 #define __NO_VERSION__
 #include <linux/config.h>
@@ -15,7 +17,7 @@
 #include <linux/ppp_defs.h>
 #include "netjet.h"
 
-const char *NETjet_S_revision = "$Revision: 2.7.6.5 $";
+const char *NETjet_S_revision = "$Revision: 1.1.2.1 $";
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/nj_u.c linux.21p2/drivers/isdn/hisax/nj_u.c
--- linux.vanilla/drivers/isdn/hisax/nj_u.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/nj_u.c	Tue Jan  1 21:22:31 2002
@@ -1,6 +1,7 @@
-/* $Id: nj_u.c,v 2.8.6.5 2001/07/18 16:25:12 kai Exp $ 
+/* $Id: nj_u.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $ 
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -16,7 +17,7 @@
 #include <linux/ppp_defs.h>
 #include "netjet.h"
 
-const char *NETjet_U_revision = "$Revision: 2.8.6.5 $";
+const char *NETjet_U_revision = "$Revision: 1.1.2.1 $";
 
 static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off)
 {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/q931.c linux.21p2/drivers/isdn/hisax/q931.c
--- linux.vanilla/drivers/isdn/hisax/q931.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/q931.c	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,17 @@
-/* $Id: q931.c,v 1.10.6.2 2001/03/13 16:17:08 kai Exp $
+/* $Id: q931.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * q931.c       code to decode ITU Q.931 call control messages
+ * code to decode ITU Q.931 call control messages
  *
  * Author       Jan den Ouden
+ * Copyright    by Jan den Ouden
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * Changelog
+ * Changelog:
  *
  * Pauline Middelink    general improvements
- *
  * Beat Doebeli         cause texts, display information element
- *
  * Karsten Keil         cause texts, display information element for 1TR6
  *
  */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/rawhdlc.c linux.21p2/drivers/isdn/hisax/rawhdlc.c
--- linux.vanilla/drivers/isdn/hisax/rawhdlc.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/rawhdlc.c	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,14 @@
-/* $Id: rawhdlc.c,v 1.5.6.1 2001/02/16 16:43:28 kai Exp $
+/* $Id: rawhdlc.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * rawhdlc.c     support routines for cards that don't support HDLC
+ * support routines for cards that don't support HDLC
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
- *            Brent Baccala <baccala@FreeSoft.org>
+ * Author     Brent Baccala
+ * Copyright  by Karsten Keil <keil@isdn4linux.de>
+ *            by Brent Baccala <baccala@FreeSoft.org>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- * This file is (c) under GNU General Public License
  *
  * Some passive ISDN cards, such as the Traverse NETJet and the AMD 7930,
  * don't perform HDLC encapsulation over the B channel.  Drivers for
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/rawhdlc.h linux.21p2/drivers/isdn/hisax/rawhdlc.h
--- linux.vanilla/drivers/isdn/hisax/rawhdlc.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/rawhdlc.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,10 @@
-/* $Id: rawhdlc.h,v 1.3.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: rawhdlc.h,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * rawhdlc.h     support routines for cards that don't support HDLC
+ * Author     Brent Baccala
+ * Copyright  by Brent Baccala <baccala@FreeSoft.org>
  *
- * Author     Brent Baccala <baccala@FreeSoft.org>
- *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/s0box.c linux.21p2/drivers/isdn/hisax/s0box.c
--- linux.vanilla/drivers/isdn/hisax/s0box.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/s0box.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/* $Id: s0box.c,v 2.4.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: s0box.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * s0box.c      low level stuff for Creatix S0BOX
+ * low level stuff for Creatix S0BOX
  *
- * Author       S0BOX specific stuff: Enrik Berkhan (enrik@starfleet.inka.de)
+ * Author       Enrik Berkhan
+ * Copyright    by Enrik Berkhan <enrik@starfleet.inka.de>
  *
- * This file is (c) under GNU General Public License
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -15,7 +18,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *s0box_revision = "$Revision: 2.4.6.1 $";
+const char *s0box_revision = "$Revision: 1.1.2.1 $";
 
 static inline void
 writereg(unsigned int padr, signed int addr, u_char off, u_char val) {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/saphir.c linux.21p2/drivers/isdn/hisax/saphir.c
--- linux.vanilla/drivers/isdn/hisax/saphir.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/saphir.c	Tue Jan  1 21:22:31 2002
@@ -1,16 +1,17 @@
-/* $Id: saphir.c,v 1.8.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: saphir.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * saphir.c low level stuff for HST Saphir 1
+ * low level stuff for HST Saphir 1
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to    HST High Soft Tech GmbH
  *
- * This file is (c) under GNU General Public License
- *
  */
 
-
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -19,7 +20,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-static char *saphir_rev = "$Revision: 1.8.6.1 $";
+static char *saphir_rev = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/sedlbauer.c linux.21p2/drivers/isdn/hisax/sedlbauer.c
--- linux.vanilla/drivers/isdn/hisax/sedlbauer.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/sedlbauer.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,22 @@
-/* $Id: sedlbauer.c,v 1.25.6.5 2001/07/13 09:20:12 kai Exp $
+/* $Id: sedlbauer.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * sedlbauer.c  low level stuff for Sedlbauer cards
- *              includes support for the Sedlbauer speed star (speed star II),
- *              support for the Sedlbauer speed fax+,
- *              support for the Sedlbauer ISDN-Controller PC/104 and
- *              support for the Sedlbauer speed pci
- *              derived from the original file asuscom.c from Karsten Keil
- *
- * Copyright (C) 1997,1998 Marcus Niemann (for the modifications to
- *                                         the original file asuscom.c)
- *
- * Author     Marcus Niemann (niemann@www-bib.fh-bielefeld.de)
+ * low level stuff for Sedlbauer cards
+ * includes support for the Sedlbauer speed star (speed star II),
+ * support for the Sedlbauer speed fax+,
+ * support for the Sedlbauer ISDN-Controller PC/104 and
+ * support for the Sedlbauer speed pci
+ * derived from the original file asuscom.c from Karsten Keil
+ *
+ * Author       Marcus Niemann
+ * Copyright    by Marcus Niemann    <niemann@www-bib.fh-bielefeld.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to  Karsten Keil
  *            Sedlbauer AG for informations
  *            Edgar Toernig
  *
- * This file is (c) under GNU General Public License
- *
  */
 
 /* Supported cards:
@@ -53,7 +52,7 @@
 
 extern const char *CardType[];
 
-const char *Sedlbauer_revision = "$Revision: 1.25.6.5 $";
+const char *Sedlbauer_revision = "$Revision: 1.1.2.1 $";
 
 const char *Sedlbauer_Types[] =
 	{"None", "speed card/win", "speed star", "speed fax+",
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/sportster.c linux.21p2/drivers/isdn/hisax/sportster.c
--- linux.vanilla/drivers/isdn/hisax/sportster.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/sportster.c	Tue Jan  1 21:22:31 2002
@@ -1,12 +1,15 @@
-/* $Id: sportster.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: sportster.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * sportster.c     low level stuff for USR Sportster internal TA
+ * low level stuff for USR Sportster internal TA
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to Christian "naddy" Weisgerber (3Com, US Robotics) for documentation
  *
- * This file is (c) under GNU General Public License
  *
  */
 #define __NO_VERSION__
@@ -17,7 +20,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *sportster_revision = "$Revision: 1.14.6.1 $";
+const char *sportster_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/tei.c linux.21p2/drivers/isdn/hisax/tei.c
--- linux.vanilla/drivers/isdn/hisax/tei.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/tei.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,27 @@
-/* $Id: tei.c,v 2.17.6.2 2001/05/26 15:19:57 kai Exp $
+/* $Id: tei.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
  *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *		This file is (c) under GNU General Public License
- *		For changes and modifications please read
- *		../../../Documentation/isdn/HiSax.cert
+ * For changes and modifications please read
+ * ../../../Documentation/isdn/HiSax.cert
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *
  */
+
 #define __NO_VERSION__
 #include "hisax.h"
 #include "isdnl2.h"
 #include <linux/init.h>
 #include <linux/random.h>
 
-const char *tei_revision = "$Revision: 2.17.6.2 $";
+const char *tei_revision = "$Revision: 1.1.2.1 $";
 
 #define ID_REQUEST	1
 #define ID_ASSIGNED	2
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teleint.c linux.21p2/drivers/isdn/hisax/teleint.c
--- linux.vanilla/drivers/isdn/hisax/teleint.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/teleint.c	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: teleint.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: teleint.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * teleint.c     low level stuff for TeleInt isdn cards
+ * low level stuff for TeleInt isdn cards
  *
- * Author     Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -17,7 +19,7 @@
 
 extern const char *CardType[];
 
-const char *TeleInt_revision = "$Revision: 1.14.6.1 $";
+const char *TeleInt_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teles0.c linux.21p2/drivers/isdn/hisax/teles0.c
--- linux.vanilla/drivers/isdn/hisax/teles0.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/teles0.c	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,20 @@
-/* $Id: teles0.c,v 2.13.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: teles0.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * teles0.c     low level stuff for Teles Memory IO isdn cards
- *              based on the teles driver from Jan den Ouden
+ * low level stuff for Teles Memory IO isdn cards
  *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ *              based on the teles driver from Jan den Ouden
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *              Beat Doebeli
  *
- * This file is (c) under GNU General Public License
- *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include "hisax.h"
@@ -21,7 +24,7 @@
 
 extern const char *CardType[];
 
-const char *teles0_revision = "$Revision: 2.13.6.1 $";
+const char *teles0_revision = "$Revision: 1.1.2.1 $";
 
 #define TELES_IOMEM_SIZE	0x400
 #define byteout(addr,val) outb(val,addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teles3.c linux.21p2/drivers/isdn/hisax/teles3.c
--- linux.vanilla/drivers/isdn/hisax/teles3.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/teles3.c	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,17 @@
-/* $Id: teles3.c,v 2.17.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: teles3.c,v 1.1.2.1 2001/12/31 13:26:45 kai Exp $
  *
- * teles3.c     low level stuff for Teles 16.3 & PNP isdn cards
+ * low level stuff for Teles 16.3 & PNP isdn cards
  *
- *              based on the teles driver from Jan den Ouden
- *
- * Author       Karsten Keil (keil@isdn4linux.de)
+ * Author       Karsten Keil
+ * Copyright    by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * Thanks to    Jan den Ouden
  *              Fritz Elfert
  *              Beat Doebeli
  *
- * This file is (c) under GNU General Public License
- *
  */
 #define __NO_VERSION__
 #include <linux/init.h>
@@ -21,7 +21,7 @@
 #include "isdnl1.h"
 
 extern const char *CardType[];
-const char *teles3_revision = "$Revision: 2.17.6.1 $";
+const char *teles3_revision = "$Revision: 1.1.2.1 $";
 
 #define byteout(addr,val) outb(val,addr)
 #define bytein(addr) inb(addr)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/telespci.c linux.21p2/drivers/isdn/hisax/telespci.c
--- linux.vanilla/drivers/isdn/hisax/telespci.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/telespci.c	Tue Jan  1 21:22:31 2002
@@ -1,13 +1,17 @@
-/* $Id: telespci.c,v 2.16.6.4 2001/02/16 16:43:29 kai Exp $
+/* $Id: telespci.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * telespci.c     low level stuff for Teles PCI isdn cards
+ * low level stuff for Teles PCI isdn cards
  *
- * Author       Ton van Rosmalen 
- *              Karsten Keil (keil@isdn4linux.de)
- *
- * This file is (c) under GNU General Public License
+ * Author       Ton van Rosmalen
+ *              Karsten Keil
+ * Copyright    by Ton van Rosmalen
+ *              by Karsten Keil      <keil@isdn4linux.de>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #define __NO_VERSION__
 #include <linux/init.h>
 #include <linux/config.h>
@@ -19,7 +23,7 @@
 #include <linux/isdn_compat.h>
 
 extern const char *CardType[];
-const char *telespci_revision = "$Revision: 2.16.6.4 $";
+const char *telespci_revision = "$Revision: 1.1.2.1 $";
 
 #define ZORAN_PO_RQ_PEN	0x02000000
 #define ZORAN_PO_WR	0x00800000
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/w6692.c linux.21p2/drivers/isdn/hisax/w6692.c
--- linux.vanilla/drivers/isdn/hisax/w6692.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/w6692.c	Tue Jan  1 21:22:31 2002
@@ -1,11 +1,12 @@
-/* $Id: w6692.c,v 1.12.6.5 2001/06/09 15:14:18 kai Exp $
+/* $Id: w6692.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * w6692.c   Winbond W6692 specific routines
+ * Winbond W6692 specific routines
  *
- * Author       Petr Novak <petr.novak@i.cz>
- *              (based on HiSax driver by Karsten Keil)
- *
- *              This file is (c) under GNU General Public License
+ * Author       Petr Novak
+ * Copyright    by Petr Novak        <petr.novak@i.cz>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -36,7 +37,7 @@
 
 extern const char *CardType[];
 
-const char *w6692_revision = "$Revision: 1.12.6.5 $";
+const char *w6692_revision = "$Revision: 1.1.2.1 $";
 
 #define DBUSY_TIMER_VALUE 80
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/w6692.h linux.21p2/drivers/isdn/hisax/w6692.h
--- linux.vanilla/drivers/isdn/hisax/w6692.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hisax/w6692.h	Tue Jan  1 21:22:31 2002
@@ -1,10 +1,12 @@
-/* $Id: w6692.h,v 1.2.6.1 2001/02/16 16:43:29 kai Exp $
+/* $Id: w6692.h,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * w6692.h   Winbond W6692 specific defines
+ * Winbond W6692 specific defines
  *
- * Author       Petr Novak <petr.novak@i.cz>
- *
- * This file is (c) under GNU General Public License
+ * Author       Petr Novak
+ * Copyright    by Petr Novak        <petr.novak@i.cz>
+ * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/boardergo.c linux.21p2/drivers/isdn/hysdn/boardergo.c
--- linux.vanilla/drivers/isdn/hysdn/boardergo.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/boardergo.c	Tue Jan  1 21:22:31 2002
@@ -1,41 +1,25 @@
-/* $Id: boardergo.c,v 1.5.6.5 2001/07/18 16:02:16 kai Exp $
-
+/* $Id: boardergo.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
+ *
  * Linux driver for HYSDN cards, specific routines for ergo type boards.
  *
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  * As all Linux supported cards Champ2, Ergo and Metro2/4 use the same
  * DPRAM interface and layout with only minor differences all related
  * stuff is done here, not in separate modules.
  *
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
  */
 
-#define __NO_VERSION__
 #include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <asm/io.h>
 #include <linux/signal.h>
 #include <linux/kernel.h>
 #include <linux/ioport.h>
-#include <linux/interrupt.h>
 #include <linux/vmalloc.h>
+#include <asm/io.h>
 
 #include "hysdn_defs.h"
 #include "boardergo.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/boardergo.h linux.21p2/drivers/isdn/hysdn/boardergo.h
--- linux.vanilla/drivers/isdn/hysdn/boardergo.h	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/hysdn/boardergo.h	Tue Jan  1 23:15:30 2002
@@ -1,23 +1,12 @@
-/* $Id: boardergo.h,v 1.2 2000/11/13 22:51:47 kai Exp $
-
- * Linux driver for HYSDN cards, definitions for ergo type boards (buffers..).
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: boardergo.h,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards, definitions for ergo type boards (buffers..).
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hycapi.c linux.21p2/drivers/isdn/hysdn/hycapi.c
--- linux.vanilla/drivers/isdn/hysdn/hycapi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hycapi.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: hycapi.c,v 1.8.6.3 2001/05/26 15:19:58 kai Exp $
+/* $Id: hycapi.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
  * Linux driver for HYSDN cards, CAPI2.0-Interface.
- * written by Ulrich Albrecht (u.albrecht@hypercope.de) for Hypercope GmbH
  *
+ * Author    Ulrich Albrecht <u.albrecht@hypercope.de> for Hypercope GmbH
  * Copyright 2000 by Hypercope GmbH
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -41,7 +30,7 @@
 #include "hysdn_defs.h"
 #include <linux/kernelcapi.h>
 
-static char hycapi_revision[]="$Revision: 1.8.6.3 $";
+static char hycapi_revision[]="$Revision: 1.1.2.1 $";
 
 unsigned int hycapi_enable = 0xffffffff; 
 MODULE_PARM(hycapi_enable, "i");
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_boot.c linux.21p2/drivers/isdn/hysdn/hysdn_boot.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_boot.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_boot.c	Tue Jan  1 21:22:31 2002
@@ -1,30 +1,16 @@
-/* $Id: hysdn_boot.c,v 1.4.6.3 2001/03/13 16:17:09 kai Exp $
-
- * Linux driver for HYSDN cards, specific routines for booting and pof handling.
- *
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: hysdn_boot.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards
+ * specific routines for booting and pof handling
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-#define __NO_VERSION__
-#include <linux/module.h>
-#include <linux/version.h>
 #include <linux/vmalloc.h>
 #include <linux/slab.h>
 #include <asm/uaccess.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_defs.h linux.21p2/drivers/isdn/hysdn/hysdn_defs.h
--- linux.vanilla/drivers/isdn/hysdn/hysdn_defs.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_defs.h	Tue Jan  1 23:15:29 2002
@@ -1,23 +1,13 @@
-/* $Id: hysdn_defs.h,v 1.5.6.2 2001/04/20 02:42:00 keil Exp $
-
- * Linux driver for HYSDN cards, global definitions and exported vars and functions.
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
+/* $Id: hysdn_defs.h,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+ * Linux driver for HYSDN cards
+ * global definitions and exported vars and functions.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_init.c linux.21p2/drivers/isdn/hysdn/hysdn_init.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_init.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_init.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: hysdn_init.c,v 1.6.6.5 2001/02/16 16:43:30 kai Exp $
-
- * Linux driver for HYSDN cards, init functions.
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: hysdn_init.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards, init functions.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -32,7 +21,11 @@
 
 #include "hysdn_defs.h"
 
-static char *hysdn_init_revision = "$Revision: 1.6.6.5 $";
+MODULE_DESCRIPTION("ISDN4Linux: Driver for HYSDN cards");
+MODULE_AUTHOR("Werner Cornelius");
+MODULE_LICENSE("GPL");
+
+static char *hysdn_init_revision = "$Revision: 1.1.2.1 $";
 int cardmax;			/* number of found cards */
 hysdn_card *card_root = NULL;	/* pointer to first card */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_net.c linux.21p2/drivers/isdn/hysdn/hysdn_net.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_net.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_net.c	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,16 @@
-/* $Id: hysdn_net.c,v 1.8.6.3 2001/06/05 19:45:37 kai Exp $
-
+/* $Id: hysdn_net.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
+ *
  * Linux driver for HYSDN cards, net (ethernet type) handling routines.
  *
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * This net module has been inspired by the skeleton driver from
  * Donald Becker (becker@CESDIS.gsfc.nasa.gov)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
  */
 
 #define __NO_VERSION__
@@ -41,7 +29,7 @@
 MODULE_PARM(hynet_enable, "i");
 
 /* store the actual version for log reporting */
-char *hysdn_net_revision = "$Revision: 1.8.6.3 $";
+char *hysdn_net_revision = "$Revision: 1.1.2.1 $";
 
 #define MAX_SKB_BUFFERS 20	/* number of buffers for keeping TX-data */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_pof.h linux.21p2/drivers/isdn/hysdn/hysdn_pof.h
--- linux.vanilla/drivers/isdn/hysdn/hysdn_pof.h	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_pof.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: hysdn_pof.h,v 1.2 2000/11/13 22:51:47 kai Exp $
-
- * Linux driver for HYSDN cards, definitions used for handling pof-files.
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: hysdn_pof.h,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards, definitions used for handling pof-files.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_procconf.c linux.21p2/drivers/isdn/hysdn/hysdn_procconf.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_procconf.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_procconf.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,13 @@
-/* $Id: hysdn_procconf.c,v 1.8.6.3 2001/08/13 07:46:15 kai Exp $
-
+/* $Id: hysdn_procconf.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
+ *
  * Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions.
+ *
  * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
  *
  * Copyright 1999  by Werner Cornelius (werner@titro.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -30,7 +20,7 @@
 
 #include "hysdn_defs.h"
 
-static char *hysdn_procconf_revision = "$Revision: 1.8.6.3 $";
+static char *hysdn_procconf_revision = "$Revision: 1.1.2.1 $";
 
 #define INFO_OUT_LEN 80		/* length of info line including lf */
 
@@ -464,4 +454,4 @@
 	}
 
 	remove_proc_entry(PROC_SUBDIR_NAME, proc_net);
-}				/* hysdn_procfs_release */
+}
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_proclog.c linux.21p2/drivers/isdn/hysdn/hysdn_proclog.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_proclog.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_proclog.c	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: hysdn_proclog.c,v 1.9.6.2 2001/08/13 07:46:15 kai Exp $
-
- * Linux driver for HYSDN cards, /proc/net filesystem log functions.
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: hysdn_proclog.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards, /proc/net filesystem log functions.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_sched.c linux.21p2/drivers/isdn/hysdn/hysdn_sched.c
--- linux.vanilla/drivers/isdn/hysdn/hysdn_sched.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/hysdn/hysdn_sched.c	Tue Jan  1 21:22:31 2002
@@ -1,36 +1,21 @@
-/* $Id: hysdn_sched.c,v 1.5.6.2 2001/04/20 02:42:00 keil Exp $
-
- * Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc.
- *
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
- *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+/* $Id: hysdn_sched.c,v 1.1.2.1 2001/12/31 13:26:46 kai Exp $
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Linux driver for HYSDN cards
+ * scheduler routines for handling exchange card <-> pc.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-#define __NO_VERSION__
 #include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <asm/io.h>
 #include <linux/signal.h>
 #include <linux/kernel.h>
 #include <linux/ioport.h>
-#include <linux/interrupt.h>
+#include <asm/io.h>
 
 #include "hysdn_defs.h"
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/ince1pc.h linux.21p2/drivers/isdn/hysdn/ince1pc.h
--- linux.vanilla/drivers/isdn/hysdn/ince1pc.h	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/hysdn/ince1pc.h	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,19 @@
+/*
+ * Linux driver for HYSDN cards
+ * common definitions for both sides of the bus:
+ * - conventions both spoolers must know
+ * - channel numbers agreed upon
+ *
+ * Author    M. Steinkopf
+ * Copyright 1999 by M. Steinkopf
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
 #ifndef __INCE1PC_H__
 #define __INCE1PC_H__
-
-/****************************************************************************
-
-    FILE:       ince1pc.h
-
-    AUTHOR:     M.Steinkopf
-
-    PURPOSE:    common definitions for both sides of the bus:
-		- conventions both spoolers must know
-		- channel numbers agreed upon
-
-*****************************************************************************/ 
 
 /*  basic scalar definitions have same meanning,
  *  but their declaration location depends on environment
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/icn/icn.c linux.21p2/drivers/isdn/icn/icn.c
--- linux.vanilla/drivers/isdn/icn/icn.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/icn/icn.c	Tue Jan  1 21:22:31 2002
@@ -1,28 +1,35 @@
-/* $Id: icn.c,v 1.65.6.5 2001/06/09 15:14:19 kai Exp $
-
+/* $Id: icn.c,v 1.1.2.1 2001/12/31 13:26:47 kai Exp $
+ *
  * ISDN low-level module for the ICN active ISDN-Card.
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
 #include "icn.h"
+#include <linux/module.h>
 #include <linux/init.h>
 
+static int portbase = ICN_BASEADDR;
+static unsigned long membase = ICN_MEMADDR;
+static char *icn_id = "\0";
+static char *icn_id2 = "\0";
+
+MODULE_DESCRIPTION("ISDN4Linux: Driver for ICN active ISDN card");
+MODULE_AUTHOR("Fritz Elfert");
+MODULE_LICENSE("GPL");
+MODULE_PARM(portbase, "i");
+MODULE_PARM_DESC(portbase, "Port address of first card");
+MODULE_PARM(membase, "l");
+MODULE_PARM_DESC(membase, "Shared memory address of all cards");
+MODULE_PARM(icn_id, "s");
+MODULE_PARM_DESC(icn_id, "ID-String of first card");
+MODULE_PARM(icn_id2, "s");
+MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)");
+
 /*
  * Verbose bootcode- and protocol-downloading.
  */
@@ -34,7 +41,7 @@
 #undef MAP_DEBUG
 
 static char
-*revision = "$Revision: 1.65.6.5 $";
+*revision = "$Revision: 1.1.2.1 $";
 
 static int icn_addcard(int, char *, char *);
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/icn/icn.h linux.21p2/drivers/isdn/icn/icn.h
--- linux.vanilla/drivers/isdn/icn/icn.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/icn/icn.h	Tue Jan  1 23:15:33 2002
@@ -1,22 +1,11 @@
-/* $Id: icn.h,v 1.30.6.3 2001/04/20 02:42:01 keil Exp $
-
+/* $Id: icn.h,v 1.1.2.1 2001/12/31 13:26:47 kai Exp $
+ *
  * ISDN lowlevel-module for the ICN active ISDN-Card.
  *
  * Copyright 1994 by Fritz Elfert (fritz@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -46,7 +35,6 @@
 #ifdef __KERNEL__
 /* Kernel includes */
 
-#include <linux/module.h>
 #include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
@@ -205,27 +193,6 @@
 {0, 4, 8, 12};                  /* for icn_map_channel() */
 
 static icn_dev dev;
-
-/* With modutils >= 1.1.67 Integers can be changed while loading a
- * module. For this reason define the Port-Base an Shmem-Base as
- * integers.
- */
-static int portbase = ICN_BASEADDR;
-static unsigned long membase = ICN_MEMADDR;
-static char *icn_id = "\0";
-static char *icn_id2 = "\0";
-
-#ifdef MODULE
-MODULE_AUTHOR("Fritz Elfert");
-MODULE_PARM(portbase, "i");
-MODULE_PARM_DESC(portbase, "Port address of first card");
-MODULE_PARM(membase, "l");
-MODULE_PARM_DESC(membase, "Shared memory address of all cards");
-MODULE_PARM(icn_id, "s");
-MODULE_PARM_DESC(icn_id, "ID-String of first card");
-MODULE_PARM(icn_id2, "s");
-MODULE_PARM_DESC(icn_id2, "ID-String of first card, second S0 (4B only)");
-#endif
 
 #endif                          /* __KERNEL__ */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_audio.c linux.21p2/drivers/isdn/isdn_audio.c
--- linux.vanilla/drivers/isdn/isdn_audio.c	Sun Mar 25 17:31:37 2001
+++ linux.21p2/drivers/isdn/isdn_audio.c	Tue Jan  1 21:22:31 2002
@@ -1,34 +1,21 @@
-/* $Id: isdn_audio.c,v 1.21 2000/06/20 18:01:55 keil Exp $
-
+/* $Id: isdn_audio.c,v 1.1.2.1 2001/12/31 13:26:34 kai 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)
  * Silence detection (c) 1998 by Armin Schindler (mac@gismo.telekom.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-#define __NO_VERSION__
-#include <linux/module.h>
 #include <linux/isdn.h>
 #include "isdn_audio.h"
 #include "isdn_common.h"
 
-char *isdn_audio_revision = "$Revision: 1.21 $";
+char *isdn_audio_revision = "$Revision: 1.1.2.1 $";
 
 /*
  * Misc. lookup-tables.
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_audio.h linux.21p2/drivers/isdn/isdn_audio.h
--- linux.vanilla/drivers/isdn/isdn_audio.h	Sun Mar 25 17:31:37 2001
+++ linux.21p2/drivers/isdn/isdn_audio.h	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/* $Id: isdn_audio.h,v 1.9 2000/05/11 22:29:20 kai Exp $
-
+/* $Id: isdn_audio.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, audio conversion and compression (linklevel).
  *
  * Copyright 1994-1999 by Fritz Elfert (fritz@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_bsdcomp.c linux.21p2/drivers/isdn/isdn_bsdcomp.c
--- linux.vanilla/drivers/isdn/isdn_bsdcomp.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_bsdcomp.c	Tue Jan  1 21:22:31 2002
@@ -4,8 +4,14 @@
  * Patched version for ISDN syncPPP written 1997/1998 by Michael Hipp
  * The whole module is now SKB based.
  *
- * Compile with:
- *  gcc -O2 -I/usr/src/linux/include -D__KERNEL__ -DMODULE -c isdn_bsdcomp.c
+ */
+
+/*
+ * Update: The Berkeley copyright was changed, and the change 
+ * is retroactive to all "true" BSD software (ie everything
+ * from UCB as opposed to other peoples code that just carried
+ * the same license). The new copyright doesn't clash with the
+ * GPL, so the module-only restriction has been removed..
  */
 
 /*
@@ -82,13 +88,15 @@
 
 #include <linux/isdn.h>
 #include <linux/isdn_ppp.h>
-/* #include <linux/netprotocol.h> */
 #include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/if_arp.h>
 #include <linux/ppp-comp.h>
 
 #include "isdn_ppp.h"
+
+MODULE_DESCRIPTION("ISDN4Linux: BSD Compression for PPP over ISDN");
+MODULE_LICENSE("Dual BSD/GPL");
 
 #define BSD_VERSION(x)	((x) >> 5)
 #define BSD_NBITS(x)	((x) & 0x1F)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_common.c linux.21p2/drivers/isdn/isdn_common.c
--- linux.vanilla/drivers/isdn/isdn_common.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_common.c	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/* $Id: isdn_common.c,v 1.114.6.12 2001/06/09 15:14:15 kai Exp $
-
+/* $Id: isdn_common.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, common used functions (linklevel).
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -48,9 +37,13 @@
 /* Debugflags */
 #undef ISDN_DEBUG_STATCALLB
 
+MODULE_DESCRIPTION("ISDN4Linux: link layer");
+MODULE_AUTHOR("Fritz Elfert");
+MODULE_LICENSE("GPL");
+
 isdn_dev *dev;
 
-static char *isdn_revision = "$Revision: 1.114.6.12 $";
+static char *isdn_revision = "$Revision: 1.1.2.1 $";
 
 extern char *isdn_net_revision;
 extern char *isdn_tty_revision;
@@ -277,7 +270,7 @@
 	}
 	if (tf) 
 	{
-		int flags;
+		unsigned long flags;
 
 		save_flags(flags);
 		cli();
@@ -289,7 +282,8 @@
 void
 isdn_timer_ctrl(int tf, int onoff)
 {
-	int flags, old_tflags;
+	unsigned long flags;
+	int old_tflags;
 
 	save_flags(flags);
 	cli();
@@ -1644,7 +1638,7 @@
 	if (minor == ISDN_MINOR_STATUS) {
 		infostruct *p;
 
-		if ((p = (infostruct *) kmalloc(sizeof(infostruct), GFP_KERNEL))) {
+		if ((p = kmalloc(sizeof(infostruct), GFP_KERNEL))) {
 			p->next = (char *) dev->infochain;
 			p->private = (char *) &(filep->private_data);
 			dev->infochain = p;
@@ -1996,7 +1990,7 @@
 
 	if ((adding) && (d->rcverr))
 		kfree(d->rcverr);
-	if (!(d->rcverr = (int *) kmalloc(sizeof(int) * m, GFP_KERNEL))) {
+	if (!(d->rcverr = kmalloc(sizeof(int) * m, GFP_KERNEL))) {
 		printk(KERN_WARNING "register_isdn: Could not alloc rcverr\n");
 		return -1;
 	}
@@ -2004,7 +1998,7 @@
 
 	if ((adding) && (d->rcvcount))
 		kfree(d->rcvcount);
-	if (!(d->rcvcount = (int *) kmalloc(sizeof(int) * m, GFP_KERNEL))) {
+	if (!(d->rcvcount = kmalloc(sizeof(int) * m, GFP_KERNEL))) {
 		printk(KERN_WARNING "register_isdn: Could not alloc rcvcount\n");
 		if (!adding) kfree(d->rcverr);
 		return -1;
@@ -2016,8 +2010,7 @@
 			skb_queue_purge(&d->rpqueue[j]);
 		kfree(d->rpqueue);
 	}
-	if (!(d->rpqueue =
-	      (struct sk_buff_head *) kmalloc(sizeof(struct sk_buff_head) * m, GFP_KERNEL))) {
+	if (!(d->rpqueue = kmalloc(sizeof(struct sk_buff_head) * m, GFP_KERNEL))) {
 		printk(KERN_WARNING "register_isdn: Could not alloc rpqueue\n");
 		if (!adding) {
 			kfree(d->rcvcount);
@@ -2031,8 +2024,7 @@
 
 	if ((adding) && (d->rcv_waitq))
 		kfree(d->rcv_waitq);
-	d->rcv_waitq = (wait_queue_head_t *)
-		kmalloc(sizeof(wait_queue_head_t) * 2 * m, GFP_KERNEL);
+	d->rcv_waitq = kmalloc(sizeof(wait_queue_head_t) * 2 * m, GFP_KERNEL);
 	if (!d->rcv_waitq) {
 		printk(KERN_WARNING "register_isdn: Could not alloc rcv_waitq\n");
 		if (!adding) {
@@ -2156,7 +2148,7 @@
 		printk(KERN_WARNING "register_isdn: No write routine given.\n");
 		return 0;
 	}
-	if (!(d = (driver *) kmalloc(sizeof(driver), GFP_KERNEL))) {
+	if (!(d = kmalloc(sizeof(driver), GFP_KERNEL))) {
 		printk(KERN_WARNING "register_isdn: Could not alloc driver-struct\n");
 		return 0;
 	}
@@ -2297,7 +2289,7 @@
  */
 static void  isdn_exit(void)
 {
-	int flags;
+	unsigned long flags;
 	int i;
 
 #ifdef CONFIG_ISDN_PPP
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_common.h linux.21p2/drivers/isdn/isdn_common.h
--- linux.vanilla/drivers/isdn/isdn_common.h	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/isdn_common.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,14 @@
-/* $Id: isdn_common.h,v 1.21 2000/11/25 17:00:59 kai Exp $
-
- * header for Linux ISDN subsystem, common used functions and debugging-switches (linklevel).
+/* $Id: isdn_common.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
+ * header for Linux ISDN subsystem
+ * common used functions and debugging-switches (linklevel).
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_concap.c linux.21p2/drivers/isdn/isdn_concap.c
--- linux.vanilla/drivers/isdn/isdn_concap.c	Sun Mar 25 17:37:33 2001
+++ linux.21p2/drivers/isdn/isdn_concap.c	Tue Jan  1 21:22:31 2002
@@ -1,20 +1,9 @@
-/* $Id: isdn_concap.c,v 1.8 2000/05/11 22:29:20 kai Exp $
- 
+/* $Id: isdn_concap.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ * 
  * Linux ISDN subsystem, protocol encapsulation
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_concap.h linux.21p2/drivers/isdn/isdn_concap.h
--- linux.vanilla/drivers/isdn/isdn_concap.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_concap.h	Tue Jan  1 21:22:31 2002
@@ -1,20 +1,9 @@
-/* $Id: isdn_concap.h,v 1.3 2000/05/11 22:29:20 kai Exp $
+/* $Id: isdn_concap.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
  *
  * Linux ISDN subsystem, protocol encapsulation
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_net.c linux.21p2/drivers/isdn/isdn_net.c
--- linux.vanilla/drivers/isdn/isdn_net.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_net.c	Tue Jan  1 21:22:31 2002
@@ -1,35 +1,20 @@
-/* $Id: isdn_net.c,v 1.140.6.8 2001/08/14 14:04:21 kai Exp $
-
+/* $Id: isdn_net.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, network interfaces and related functions (linklevel).
  *
  * Copyright 1994-1998  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- */
-
-/* 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 
  *           http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt
  */
 
 #include <linux/config.h>
-#define __NO_VERSION__
-#include <linux/module.h>
 #include <linux/isdn.h>
 #include <net/arp.h>
 #include <net/dst.h>
@@ -191,7 +176,7 @@
 static void isdn_net_ciscohdlck_connected(isdn_net_local *lp);
 static void isdn_net_ciscohdlck_disconnected(isdn_net_local *lp);
 
-char *isdn_net_revision = "$Revision: 1.140.6.8 $";
+char *isdn_net_revision = "$Revision: 1.1.2.1 $";
 
  /*
   * Code for raw-networking over ISDN
@@ -301,7 +286,7 @@
 static void
 isdn_net_unbind_channel(isdn_net_local * lp)
 {
-	ulong flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
@@ -349,7 +334,7 @@
 	anymore = 0;
 	while (p) {
 		isdn_net_local *l = p->local;
-		if ((jiffies - last_jiffies) == 0)
+		if (jiffies == last_jiffies)
 			l->cps = l->transcount;
 		else
 			l->cps = (l->transcount * HZ) / (jiffies - last_jiffies);
@@ -368,9 +353,9 @@
 			{
 				if (l->hupflags & ISDN_MANCHARGE &&
 				    l->hupflags & ISDN_CHARGEHUP) {
-					while (jiffies - l->chargetime > l->chargeint)
+					while (time_after(jiffies, l->chargetime + l->chargeint))
 						l->chargetime += l->chargeint;
-					if (jiffies - l->chargetime >= l->chargeint - 2 * HZ)
+					if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ))
 						if (l->outgoing || l->hupflags & ISDN_INHUP)
 							isdn_net_hangup(&p->dev);
 				} else if (l->outgoing) {
@@ -379,7 +364,7 @@
 							printk(KERN_DEBUG "isdn_net: Hupflags of %s are %X\n",
 							       l->name, l->hupflags);
 							isdn_net_hangup(&p->dev);
-						} else if (jiffies - l->chargetime > l->chargeint) {
+						} 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);
@@ -584,7 +569,7 @@
 	isdn_net_dev *p = dev->netdev;
 	int anymore = 0;
 	int i;
-	int flags;
+	unsigned long flags;
 	isdn_ctrl cmd;
 
 	while (p) {
@@ -615,7 +600,7 @@
 				anymore = 1;
 
 				if(lp->dialtimeout > 0)
-					if(lp->dialstarted == 0 || jiffies > (lp->dialstarted + lp->dialtimeout + lp->dialwait)) {
+					if(lp->dialstarted == 0 || time_after(jiffies, lp->dialstarted + lp->dialtimeout + lp->dialwait)) {
 						lp->dialstarted = jiffies;
 						lp->dialwait_timer = 0;
 					}
@@ -675,7 +660,7 @@
 					printk(KERN_INFO "%s: Open leased line ...\n", lp->name);
 				} else {
 					if(lp->dialtimeout > 0)
-						if(jiffies > (lp->dialstarted + lp->dialtimeout)) {
+						if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) {
 							restore_flags(flags);
 							lp->dialwait_timer = jiffies + lp->dialwait;
 							lp->dialstarted = 0;
@@ -1117,7 +1102,7 @@
 				lp->sqfull_stamp = jiffies;
 			} else {
 				/* subsequent overload: if slavedelay exceeded, start dialing */
-				if ((jiffies - lp->sqfull_stamp) > lp->slavedelay) {
+				if (time_after(jiffies, lp->sqfull_stamp + lp->slavedelay)) {
 					slp = lp->slave->priv;
 					if (!(slp->flags & ISDN_NET_CONNECTED)) {
 						isdn_net_force_dial_lp((isdn_net_local *) lp->slave->priv);
@@ -1126,7 +1111,7 @@
 			}
 		}
 	} else {
-		if (lp->sqfull && ((jiffies - lp->sqfull_stamp) > (lp->slavedelay + (10 * HZ)))) {
+		if (lp->sqfull && time_after(jiffies, lp->sqfull_stamp + lp->slavedelay + (10 * HZ))) {
 			lp->sqfull = 0;
 		}
 		/* this is a hack to allow auto-hangup for slaves on moderate loads */
@@ -1227,11 +1212,11 @@
 				cli();
 
 				if(lp->dialwait_timer <= 0)
-					if(lp->dialstarted > 0 && lp->dialtimeout > 0 && jiffies < lp->dialstarted + lp->dialtimeout + lp->dialwait)
+					if(lp->dialstarted > 0 && lp->dialtimeout > 0 && time_before(jiffies, lp->dialstarted + lp->dialtimeout + lp->dialwait))
 						lp->dialwait_timer = lp->dialstarted + lp->dialtimeout + lp->dialwait;
 
 				if(lp->dialwait_timer > 0) {
-					if(jiffies < lp->dialwait_timer) {
+					if(time_before(jiffies, lp->dialwait_timer)) {
 						isdn_net_unreachable(ndev, skb, "dial rejected: retry-time not reached");
 						dev_kfree_skb(skb);
 						restore_flags(flags);
@@ -2775,7 +2760,7 @@
 			chidx = lp->pre_channel;
 		}
 		if (cfg->exclusive > 0) {
-			int flags;
+			unsigned long flags;
 
 			/* If binding is exclusive, try to grab the channel */
 			save_flags(flags);
@@ -3031,7 +3016,7 @@
 	int inout = phone->outgoing & 1;
 	isdn_net_phone *n;
 	isdn_net_phone *m;
-	int flags;
+	unsigned long flags;
 
 	if (p) {
 		save_flags(flags);
@@ -3067,7 +3052,7 @@
 {
 	isdn_net_phone *n;
 	isdn_net_phone *m;
-	int flags;
+	unsigned long flags;
 	int i;
 
 	save_flags(flags);
@@ -3116,7 +3101,7 @@
 static int
 isdn_net_realrm(isdn_net_dev * p, isdn_net_dev * q)
 {
-	int flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
@@ -3202,7 +3187,7 @@
 int
 isdn_net_rmall(void)
 {
-	int flags;
+	unsigned long flags;
 	int ret;
 
 	/* Walk through netdev-chain */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_net.h linux.21p2/drivers/isdn/isdn_net.h
--- linux.vanilla/drivers/isdn/isdn_net.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_net.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/* $Id: isdn_net.h,v 1.19.6.2 2001/08/14 14:04:21 kai Exp $
-
+/* $Id: isdn_net.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * header for Linux ISDN subsystem, network related functions (linklevel).
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_ppp.c linux.21p2/drivers/isdn/isdn_ppp.c
--- linux.vanilla/drivers/isdn/isdn_ppp.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_ppp.c	Tue Jan  1 21:22:31 2002
@@ -1,31 +1,17 @@
-/* $Id: isdn_ppp.c,v 1.85.6.6 2001/07/27 09:08:27 kai Exp $
+/* $Id: isdn_ppp.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
  *
  * Linux ISDN subsystem, functions for synchronous PPP (linklevel).
  *
  * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
 #include <linux/config.h>
-#define __NO_VERSION__
-#include <linux/module.h>
-#include <linux/version.h>
-#include <linux/poll.h>
 #include <linux/isdn.h>
+#include <linux/poll.h>
 #include <linux/isdn_compat.h>
 #include <linux/ppp-comp.h>
 
@@ -84,7 +70,7 @@
 static int isdn_ppp_bundle(struct ippp_struct *, int unit);
 #endif	/* CONFIG_ISDN_MPP */
   
-char *isdn_ppp_revision = "$Revision: 1.85.6.6 $";
+char *isdn_ppp_revision = "$Revision: 1.1.2.1 $";
 
 static struct ippp_struct *ippp_table[ISDN_MAX_CHANNELS];
 
@@ -992,7 +978,7 @@
 		printk(KERN_DEBUG "push, skb %d %04x\n", (int) skb->len, proto);
 		isdn_ppp_frame_log("rpush", skb->data, skb->len, 32,is->unit,lp->ppp_slot);
 	}
-	if (is->compflags & SC_DECOMP_ON) {
+	if (mis->compflags & SC_DECOMP_ON) {
 		skb = isdn_ppp_decompress(skb, is, mis, &proto);
 		if (!skb) // decompression error
   			return;
@@ -1008,6 +994,10 @@
 				printk(KERN_DEBUG "isdn_ppp: IP\n");
 			skb->protocol = htons(ETH_P_IP);
 			break;
+		case PPP_COMP:
+		case PPP_COMPFRAG:
+			printk(KERN_INFO "isdn_ppp: unexpected compressed frame dropped\n");
+			goto drop_packet;
 #ifdef CONFIG_ISDN_PPP_VJ
 		case PPP_VJC_UNCOMP:
 			if (is->debug & 0x20)
@@ -1231,8 +1221,15 @@
 	/*
 	 * normal (single link) or bundle compression
 	 */
-	if(ipts->compflags & SC_COMP_ON)
-		skb = isdn_ppp_compress(skb,&proto,ipt,ipts,0);
+	if(ipts->compflags & SC_COMP_ON) {
+		/* We send compressed only if both down- und upstream
+		   compression is negotiated, that means, CCP is up */
+		if(ipts->compflags & SC_DECOMP_ON) {
+			skb = isdn_ppp_compress(skb,&proto,ipt,ipts,0);
+		} else {
+			printk(KERN_DEBUG "isdn_ppp: CCP not yet up - sending as-is\n");
+		}
+	}
 
 	if (ipt->debug & 0x24)
 		printk(KERN_DEBUG "xmit2 skb, len %d, proto %04x\n", (int) skb->len, proto);
@@ -2096,8 +2093,6 @@
 	}
 	if(rs->ta && rs->state == CCPResetSentReq) {
 		/* We are correct here */
-		printk(KERN_DEBUG "ippp_ccp: CCP Reset timed out for id %d\n",
-		       rs->id);
 		if(!rs->expra) {
 			/* Hmm, there is no Ack really expected. We can clean
 			   up the state now, it will be reallocated if the
@@ -2106,6 +2101,8 @@
 			isdn_ppp_ccp_reset_free_state(rs->is, rs->id);
 			return;
 		}
+		printk(KERN_DEBUG "ippp_ccp: CCP Reset timed out for id %d\n",
+		       rs->id);
 		/* Push it again */
 		isdn_ppp_ccp_xmit_reset(rs->is, PPP_CCP, CCP_RESETREQ, rs->id,
 					rs->data, rs->dlen);
@@ -2332,7 +2329,6 @@
 		if (len <= 0) {
 			switch(len) {
 			case DECOMP_ERROR:
-				ri->pppcfg |= SC_DC_ERROR;
 				printk(KERN_INFO "ippp: decomp wants reset %s params\n",
 				       rsparm.valid ? "with" : "without");
 				
@@ -2467,10 +2463,15 @@
 		/* if we RECEIVE an ackowledge we enable the decompressor */
 		if(is->debug & 0x10)
 			printk(KERN_DEBUG "Enable decompression here!\n");
-		if(proto == PPP_CCP)
+		if(proto == PPP_CCP) {
+			if (!mis->decompressor)
+				break;
 			mis->compflags |= SC_DECOMP_ON;
-		else
+		} else {
+			if (!is->decompressor)
+				break;
 			is->compflags |= SC_LINK_DECOMP_ON;
+		}
 		break;
 
 	case CCP_RESETACK:
@@ -2491,7 +2492,6 @@
 					      len, NULL);
 			/* TODO: This is not easy to decide here */
 			mis->compflags &= ~SC_DECOMP_DISCARD;
-			mis->pppcfg &= ~SC_DC_ERROR;
 		}
 		else {
 			isdn_ppp_ccp_reset_ack_rcvd(is, skb->data[1]);
@@ -2504,7 +2504,6 @@
 					      len, NULL);
 			/* TODO: neither here */
 			is->compflags &= ~SC_LINK_DECOMP_DISCARD;
-			is->pppcfg &= ~SC_DC_ERROR;
 		}
 		break;
 
@@ -2579,6 +2578,15 @@
  * that's too big of a change now. --kai
  */
 
+/* Actually, we might turn this into an advantage: deal with the RFC in
+ * the old tradition of beeing generous on what we accept, but beeing
+ * strict on what we send. Thus we should just
+ * - accept compressed frames as soon as decompression is negotiated
+ * - send compressed frames only when decomp *and* comp are negotiated
+ * - drop rx compressed frames if we cannot decomp (instead of pushing them
+ *   up to ipppd)
+ * and I tried to modify this file according to that. --abp
+ */
 
 static void isdn_ppp_send_ccp(isdn_net_dev *net_dev, isdn_net_local *lp, struct sk_buff *skb)
 {
@@ -2634,10 +2642,15 @@
 		/* if we SEND an ackowledge we can/must enable the compressor */
 		if(is->debug & 0x10)
 			printk(KERN_DEBUG "Enable compression here!\n");
-		if(proto == PPP_CCP)
+		if(proto == PPP_CCP) {
+			if (!is->compressor)
+				break;
 			is->compflags |= SC_COMP_ON;
-		else
+		} else {
+			if (!is->compressor)
+				break;
 			is->compflags |= SC_LINK_COMP_ON;
+		}
 		break;
 	case CCP_RESETACK:
 		/* If we send a ACK we should reset our compressor */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_ppp.h linux.21p2/drivers/isdn/isdn_ppp.h
--- linux.vanilla/drivers/isdn/isdn_ppp.h	Sun Mar 25 17:31:37 2001
+++ linux.21p2/drivers/isdn/isdn_ppp.h	Tue Jan  1 23:14:28 2002
@@ -1,27 +1,17 @@
-/* $Id: isdn_ppp.h,v 1.17 2000/08/10 22:52:46 kai Exp $
-
+/* $Id: isdn_ppp.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * header for Linux ISDN subsystem, functions for synchronous PPP (linklevel).
  *
  * Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
 #include <linux/ppp_defs.h>     /* for PPP_PROTOCOL */
 #include <linux/isdn_ppp.h>	/* for isdn_ppp info */
+
 extern int isdn_ppp_read(int, struct file *, char *, int);
 extern int isdn_ppp_write(int, struct file *, const char *, int);
 extern int isdn_ppp_open(int, struct file *);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_syms.c linux.21p2/drivers/isdn/isdn_syms.c
--- linux.vanilla/drivers/isdn/isdn_syms.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_syms.c	Thu Jan  1 01:00:00 1970
@@ -1,114 +0,0 @@
-/* $Id: isdn_syms.c,v 1.3.2.1 1999/04/22 21:09:37 werner Exp $
-
- * Linux ISDN subsystem, exported symbols (linklevel).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Log: isdn_syms.c,v $
- * Revision 1.3.2.1  1999/04/22 21:09:37  werner
- * Added support for dss1 diversion services
- *
- * Revision 1.3  1997/02/16 01:02:47  fritz
- * Added GPL-Header, Id and Log
- *
- */
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-
-#ifndef __GENKSYMS__      /* Don't want genksyms report unneeded structs */
-#include <linux/isdn.h>
-#endif
-#include "isdn_common.h"
-#ifdef CONFIG_ISDN_DIVERSION
-  #include <linux/isdn_divertif.h>
-extern isdn_divert_if *divert_if;
-
-static char *map_drvname(int di)
-{
-  if ((di < 0) || (di >= ISDN_MAX_DRIVERS)) 
-    return(NULL);
-  return(dev->drvid[di]); /* driver name */
-} /* map_drvname */
-
-static int map_namedrv(char *id)
-{  int i;
-
-   for (i = 0; i < ISDN_MAX_DRIVERS; i++)
-    { if (!strcmp(dev->drvid[i],id)) 
-        return(i);
-    }
-   return(-1);
-} /* map_namedrv */
-
-int DIVERT_REG_NAME(isdn_divert_if *i_div)
-{
-  if (i_div->if_magic != DIVERT_IF_MAGIC) 
-    return(DIVERT_VER_ERR);
-  switch (i_div->cmd)
-    {
-      case DIVERT_CMD_REL:
-        if (divert_if != i_div) 
-          return(DIVERT_REL_ERR);
-        divert_if = NULL; /* free interface */
-        MOD_DEC_USE_COUNT;
-        return(DIVERT_NO_ERR);
-
-      case DIVERT_CMD_REG:
-        if (divert_if) 
-          return(DIVERT_REG_ERR);
-        i_div->ll_cmd = isdn_command; /* set command function */
-        i_div->drv_to_name = map_drvname; 
-        i_div->name_to_drv = map_namedrv; 
-        MOD_INC_USE_COUNT;
-        divert_if = i_div; /* remember interface */
-        return(DIVERT_NO_ERR);
-
-      default:
-        return(DIVERT_CMD_ERR);   
-    }
-} /* DIVERT_REG_NAME */
-
-#endif CONFIG_ISDN_DIVERSION
-
-#if (LINUX_VERSION_CODE < 0x020111)
-static int has_exported;
-
-static struct symbol_table isdn_syms = {
-#include <linux/symtab_begin.h>
-        X(register_isdn),
-#ifdef CONFIG_ISDN_DIVERSION
-        X(DIVERT_REG_NAME),
-#endif CONFIG_ISDN_DIVERSION
-#include <linux/symtab_end.h>
-};
-
-void
-isdn_export_syms(void)
-{
-	if (has_exported)
-		return;
-        register_symtab(&isdn_syms);
-        has_exported = 1;
-}
-
-#else
-
-EXPORT_SYMBOL(register_isdn);
-#ifdef CONFIG_ISDN_DIVERSION
-  EXPORT(DIVERT_REG_NAME);
-#endif CONFIG_ISDN_DIVERSION
-
-#endif
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_tty.c linux.21p2/drivers/isdn/isdn_tty.c
--- linux.vanilla/drivers/isdn/isdn_tty.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_tty.c	Tue Jan  1 21:22:31 2002
@@ -1,30 +1,17 @@
-/* $Id: isdn_tty.c,v 1.94.6.5 2001/08/14 14:12:18 kai Exp $
-
+/* $Id: isdn_tty.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel).
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 #undef ISDN_TTY_STAT_DEBUG
 
-#define __NO_VERSION__
 #include <linux/config.h>
-#include <linux/module.h>
 #include <linux/isdn.h>
 #include "isdn_common.h"
 #include "isdn_tty.h"
@@ -66,7 +53,7 @@
 static int si2bit[8] =
 {4, 1, 4, 4, 4, 4, 4, 4};
 
-char *isdn_tty_revision = "$Revision: 1.94.6.5 $";
+char *isdn_tty_revision = "$Revision: 1.1.2.1 $";
 
 
 /* isdn_tty_try_read() is called from within isdn_tty_rcv_skb()
@@ -2598,11 +2585,11 @@
 		if (*(p++) == plus) {
 			if ((*pluscount)++) {
 				/* Time since last '+' > 0.5 sec. ? */
-				if ((jiffies - *lastplus) > PLUSWAIT1)
+				if (time_after(jiffies, *lastplus + PLUSWAIT1))
 					*pluscount = 1;
 			} else {
 				/* Time since last non-'+' < 1.5 sec. ? */
-				if ((jiffies - *lastplus) < PLUSWAIT2)
+				if (time_before(jiffies, *lastplus + PLUSWAIT2))
 					*pluscount = 0;
 			}
 			if ((*pluscount == 3) && (count == 1))
@@ -3976,7 +3963,7 @@
 				if (info->online) {
 					ton = 1;
 					if ((info->emu.pluscount == 3) &&
-					    ((jiffies - info->emu.lastplus) > PLUSWAIT2)) {
+					    time_after(jiffies , info->emu.lastplus + PLUSWAIT2)) {
 						info->emu.pluscount = 0;
 						info->online = 0;
 						isdn_tty_modem_result(RESULT_OK, info);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_tty.h linux.21p2/drivers/isdn/isdn_tty.h
--- linux.vanilla/drivers/isdn/isdn_tty.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_tty.h	Tue Jan  1 21:22:31 2002
@@ -1,23 +1,12 @@
-/* $Id: isdn_tty.h,v 1.22.6.1 2001/08/14 14:12:18 kai Exp $
-
+/* $Id: isdn_tty.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * header for Linux ISDN subsystem, tty related functions (linklevel).
  *
  * Copyright 1994-1999  by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_ttyfax.c linux.21p2/drivers/isdn/isdn_ttyfax.c
--- linux.vanilla/drivers/isdn/isdn_ttyfax.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_ttyfax.c	Tue Jan  1 21:22:31 2002
@@ -1,39 +1,26 @@
-/* $Id: isdn_ttyfax.c,v 1.7.6.1 2001/08/14 14:12:18 kai Exp $
-
+/* $Id: isdn_ttyfax.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, tty_fax AT-command emulator (linklevel).
  *
  * Copyright 1999    by Armin Schindler (mac@melware.de)
  * Copyright 1999    by Ralf Spachmann (mel@melware.de)
  * Copyright 1999    by Cytronics & Melware
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
 #undef ISDN_TTY_FAX_STAT_DEBUG
 #undef ISDN_TTY_FAX_CMD_DEBUG
 
-#define __NO_VERSION__
-#include <linux/module.h>
 #include <linux/isdn.h>
 #include "isdn_common.h"
 #include "isdn_tty.h"
 #include "isdn_ttyfax.h"
 
 
-static char *isdn_tty_fax_revision = "$Revision: 1.7.6.1 $";
+static char *isdn_tty_fax_revision = "$Revision: 1.1.2.1 $";
 
 #define PARSE_ERROR1 { isdn_tty_fax_modem_result(1, info); return 1; }
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_ttyfax.h linux.21p2/drivers/isdn/isdn_ttyfax.h
--- linux.vanilla/drivers/isdn/isdn_ttyfax.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_ttyfax.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/* $Id: isdn_ttyfax.h,v 1.2 2000/05/11 22:29:21 kai Exp $
-
+/* $Id: isdn_ttyfax.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * header for Linux ISDN subsystem, tty_fax related functions (linklevel).
  *
  * Copyright 1999   by Armin Schindler (mac@melware.de)
  * Copyright 1999   by Ralf Spachmann (mel@melware.de)
  * Copyright 1999   by Cytronics & Melware
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_v110.c linux.21p2/drivers/isdn/isdn_v110.c
--- linux.vanilla/drivers/isdn/isdn_v110.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdn_v110.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/* $Id: isdn_v110.c,v 1.5.6.3 2001/02/16 16:43:23 kai Exp $
-
+/* $Id: isdn_v110.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, V.110 related functions (linklevel).
  *
  * Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -30,7 +19,7 @@
 
 #undef ISDN_V110_DEBUG
 
-char *isdn_v110_revision = "$Revision: 1.5.6.3 $";
+char *isdn_v110_revision = "$Revision: 1.1.2.1 $";
 
 #define V110_38400 255
 #define V110_19200  15
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_v110.h linux.21p2/drivers/isdn/isdn_v110.h
--- linux.vanilla/drivers/isdn/isdn_v110.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_v110.h	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,14 @@
-/* $Id: isdn_v110.h,v 1.4 2000/05/11 22:29:21 kai Exp $
-
+/* $Id: isdn_v110.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
+ *
  * Linux ISDN subsystem, V.110 related functions (linklevel).
  *
  * Copyright by Thomas Pfeiffer (pfeiffer@pds.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
+
 #ifndef _isdn_v110_h_
 #define _isdn_v110_h_
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_x25iface.c linux.21p2/drivers/isdn/isdn_x25iface.c
--- linux.vanilla/drivers/isdn/isdn_x25iface.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_x25iface.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,9 @@
-/* $Id: isdn_x25iface.c,v 1.9 2000/05/16 20:52:10 keil Exp $
-
+/* $Id: isdn_x25iface.c,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
  *
  * Linux ISDN subsystem, X.25 related functions
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  * stuff needed to support the Linux X.25 PLP code on top of devices that
  * can provide a lab_b service using the concap_proto mechanism.
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_x25iface.h linux.21p2/drivers/isdn/isdn_x25iface.h
--- linux.vanilla/drivers/isdn/isdn_x25iface.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/isdn_x25iface.h	Tue Jan  1 23:14:34 2002
@@ -1,20 +1,9 @@
-/* $Id: isdn_x25iface.h,v 1.3 2000/05/11 22:29:21 kai Exp $
-
- * header for Linux ISDN subsystem, x.25 related functions
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+/* $Id: isdn_x25iface.h,v 1.1.2.1 2001/12/31 13:26:34 kai Exp $
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * header for Linux ISDN subsystem, x.25 related functions
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdnloop/isdnloop.c linux.21p2/drivers/isdn/isdnloop/isdnloop.c
--- linux.vanilla/drivers/isdn/isdnloop/isdnloop.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/isdnloop/isdnloop.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/* $Id: isdnloop.c,v 1.11.6.3 2001/06/09 15:14:19 kai Exp $
-
+/* $Id: isdnloop.c,v 1.1.2.1 2001/12/31 13:26:47 kai Exp $
+ *
  * ISDN low-level module implementing a dummy loop driver.
  *
  * Copyright 1997 by Fritz Elfert (fritz@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -25,8 +14,14 @@
 #include <linux/init.h>
 #include "isdnloop.h"
 
-static char
-*revision = "$Revision: 1.11.6.3 $";
+static char *revision = "$Revision: 1.1.2.1 $";
+static char *isdnloop_id;
+
+MODULE_DESCRIPTION("ISDN4Linux: Pseudo Driver that simulates an ISDN card");
+MODULE_AUTHOR("Fritz Elfert");
+MODULE_LICENSE("GPL");
+MODULE_PARM(isdnloop_id, "s");
+MODULE_PARM_DESC(isdnloop_id, "ID-String of first card");
 
 static int isdnloop_addcard(char *);
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdnloop/isdnloop.h linux.21p2/drivers/isdn/isdnloop/isdnloop.h
--- linux.vanilla/drivers/isdn/isdnloop/isdnloop.h	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/isdnloop/isdnloop.h	Tue Jan  1 23:15:34 2002
@@ -1,22 +1,11 @@
-/* $Id: isdnloop.h,v 1.5.6.1 2001/02/10 14:41:23 kai Exp $
-
+/* $Id: isdnloop.h,v 1.1.2.1 2001/12/31 13:26:47 kai Exp $
+ *
  * Loopback lowlevel module for testing of linklevel.
  *
  * Copyright 1997 by Fritz Elfert (fritz@isdn4linux.de)
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
@@ -44,7 +33,6 @@
 #ifdef __KERNEL__
 /* Kernel includes */
 
-#include <linux/module.h>
 #include <linux/version.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
@@ -115,14 +103,6 @@
  */
 #ifdef __KERNEL__
 static isdnloop_card *cards = (isdnloop_card *) 0;
-static char *isdnloop_id = "\0";
-
-#ifdef MODULE
-MODULE_AUTHOR("Fritz Elfert");
-MODULE_PARM(isdnloop_id, "s");
-MODULE_PARM_DESC(isdnloop_id, "ID-String of first card");
-#endif
-
 #endif                          /* __KERNEL__ */
 
 /* Utility-Macros */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/callbacks.c linux.21p2/drivers/isdn/pcbit/callbacks.c
--- linux.vanilla/drivers/isdn/pcbit/callbacks.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/callbacks.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,6 @@
 /*
+ * Callbacks for the FSM
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
@@ -7,20 +9,11 @@
  * the GNU General Public License, incorporated herein by reference.
  */
 
-/*        
- *        callbacks for the FSM
- */
-
 /*
  * Fix: 19981230 - Carlos Morgado <chbm@techie.com>
  * Port of Nelson Escravana's <nelson.escravana@usa.net> fix to CalledPN 
  * NULL pointer dereference in cb_in_1 (originally fixed in 2.0)
  */
-
-
-#define __NO_VERSION__
-
-#include <linux/module.h>
 
 #include <linux/sched.h>
 #include <linux/string.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/callbacks.h linux.21p2/drivers/isdn/pcbit/callbacks.h
--- linux.vanilla/drivers/isdn/pcbit/callbacks.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/callbacks.h	Tue Jan  1 21:22:31 2002
@@ -1,15 +1,12 @@
 /*
+ * Callbacks prototypes for FSM
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*
- *        Callbacks prototypes for FSM
- *
  */
 
 #ifndef CALLBACKS_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/capi.c linux.21p2/drivers/isdn/pcbit/capi.c
--- linux.vanilla/drivers/isdn/pcbit/capi.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/capi.c	Tue Jan  1 21:22:31 2002
@@ -1,17 +1,16 @@
 /*
+ * CAPI encoder/decoder for
+ * Portugal Telecom CAPI 2.0
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*        
- *        CAPI encoder/decoder for
- *        Portugal Telecom CAPI 2.0
  *
- *        Not compatible with the AVM Gmbh. CAPI 2.0
+ * Not compatible with the AVM Gmbh. CAPI 2.0
+ *
  */
 
 /*
@@ -27,10 +26,6 @@
  *              for debug purposes mainly
  *              encode our number in CallerPN and ConnectedPN
  */
-
-#define __NO_VERSION__
-
-#include <linux/module.h>
 
 #include <linux/sched.h>
 #include <linux/string.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/capi.h linux.21p2/drivers/isdn/pcbit/capi.h
--- linux.vanilla/drivers/isdn/pcbit/capi.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/capi.h	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,12 @@
 /*
+ * CAPI encode/decode prototypes and defines
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*        
- *        CAPI encode/decode prototypes and defines
  */
 
 #ifndef CAPI_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/drv.c linux.21p2/drivers/isdn/pcbit/drv.c
--- linux.vanilla/drivers/isdn/pcbit/drv.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/drv.c	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,12 @@
 /*
+ * PCBIT-D interface with isdn4linux
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*        
- *        PCBIT-D interface with isdn4linux
  */
 
 /*
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/edss1.c linux.21p2/drivers/isdn/pcbit/edss1.c
--- linux.vanilla/drivers/isdn/pcbit/edss1.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/edss1.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,7 @@
 /*
+ * DSS.1 Finite State Machine
+ * base: ITU-T Rec Q.931
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
@@ -7,19 +10,10 @@
  * the GNU General Public License, incorporated herein by reference.
  */
 
-/*        
- *        DSS.1 Finite State Machine
- *        base: ITU-T Rec Q.931
- */
-
 /*
  *        TODO: complete the FSM
  *              move state/event descriptions to a user space logger
  */
-
-#define __NO_VERSION__
-
-#include <linux/module.h>
 
 #include <linux/sched.h>
 #include <linux/string.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/edss1.h linux.21p2/drivers/isdn/pcbit/edss1.h
--- linux.vanilla/drivers/isdn/pcbit/edss1.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/edss1.h	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,12 @@
 /*
+ * DSS.1 module definitions
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*        
- *        DSS.1 module definitions
  */
 
 #ifndef EDSS1_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/layer2.c linux.21p2/drivers/isdn/pcbit/layer2.c
--- linux.vanilla/drivers/isdn/pcbit/layer2.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/layer2.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,6 @@
 /*
+ * PCBIT-D low-layer interface
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  *
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
@@ -13,10 +15,6 @@
 */
 
 /*
- *        PCBIT-D low-layer interface
- */
-
-/*
  *        Based on documentation provided by Inesc:
  *        - "Interface com bus do PC para o PCBIT e PCBIT-D", Inesc, Jan 93
  */
@@ -25,16 +23,6 @@
  *        TODO: better handling of errors
  *              re-write/remove debug printks
  */
-
-#define __NO_VERSION__
-
-
-#ifdef MODULE
-#define INCLUDE_INLINE_FUNCS
-#endif
-
-
-#include <linux/module.h>
 
 #include <linux/sched.h>
 #include <linux/string.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/layer2.h linux.21p2/drivers/isdn/pcbit/layer2.h
--- linux.vanilla/drivers/isdn/pcbit/layer2.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/layer2.h	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,6 @@
 /*
+ * PCBIT-D low-layer interface definitions
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
@@ -11,10 +13,6 @@
  * 19991203 - Fernando Carvalho - takion@superbofh.org
  * Hacked to compile with egcs and run with current version of isdn modules
 */
-
-/*        
- *        PCBIT-D low-layer interface definitions
- */
 
 #ifndef LAYER2_H
 #define LAYER2_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/module.c linux.21p2/drivers/isdn/pcbit/module.c
--- linux.vanilla/drivers/isdn/pcbit/module.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/module.c	Tue Jan  1 21:22:31 2002
@@ -1,4 +1,6 @@
 /*
+ * PCBIT-D module support
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
@@ -7,10 +9,6 @@
  * the GNU General Public License, incorporated herein by reference.
  */
 
-/*        
- *        PCBIT-D module support
- */
-
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/sched.h>
@@ -22,6 +20,12 @@
 #include <linux/isdnif.h>
 #include "pcbit.h"
 
+MODULE_DESCRIPTION("ISDN4Linux: Driver for PCBIT-T card");
+MODULE_AUTHOR("Pedro Roque Marques");
+MODULE_LICENSE("GPL");
+MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
+MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
+
 static int mem[MAX_PCBIT_CARDS] = {0, };
 static int irq[MAX_PCBIT_CARDS] = {0, };
 
@@ -111,9 +115,6 @@
 	}
 }
 #endif
-
-MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
-MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_PCBIT_CARDS) "i");
 
 module_init(pcbit_init);
 module_exit(pcbit_exit);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/pcbit.h linux.21p2/drivers/isdn/pcbit/pcbit.h
--- linux.vanilla/drivers/isdn/pcbit/pcbit.h	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/pcbit/pcbit.h	Tue Jan  1 21:22:31 2002
@@ -1,14 +1,12 @@
 /*
+ * PCBIT-D device driver definitions
+ *
  * Copyright (C) 1996 Universidade de Lisboa
  * 
  * Written by Pedro Roque Marques (roque@di.fc.ul.pt)
  *
  * This software may be used and distributed according to the terms of 
  * the GNU General Public License, incorporated herein by reference.
- */
-
-/*        
- *        PCBIT-D device driver definitions
  */
 
 #ifndef PCBIT_H
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/card.h linux.21p2/drivers/isdn/sc/card.h
--- linux.vanilla/drivers/isdn/sc/card.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/card.h	Tue Jan  1 23:15:37 2002
@@ -1,24 +1,13 @@
-/*
- *  $Id: card.h,v 1.1 1996/11/07 13:07:40 fritz Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: card.h,v 1.1.2.1 2001/12/31 13:26:48 kai Exp $
  *
- *  card.h - Driver parameters for SpellCaster ISA ISDN adapters
+ * Driver parameters for SpellCaster ISA ISDN adapters
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/command.c linux.21p2/drivers/isdn/sc/command.c
--- linux.vanilla/drivers/isdn/sc/command.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/command.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: command.c,v 1.4 1997/03/30 16:51:34 calle Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: command.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
@@ -27,6 +16,7 @@
  */
 
 #define __NO_VERSION__
+#include <linux/module.h>
 #include "includes.h"		/* This must be first */
 #include "hardware.h"
 #include "message.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/debug.c linux.21p2/drivers/isdn/sc/debug.c
--- linux.vanilla/drivers/isdn/sc/debug.c	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/sc/debug.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: debug.c,v 1.5 2000/11/12 15:29:37 kai Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: debug.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
@@ -25,6 +14,7 @@
  *     +1 (416) 297-8565
  *     +1 (416) 297-6433 Facsimile
  */
+
 #include <linux/kernel.h>
 
 inline char *strcpy(char *, const char *);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/debug.h linux.21p2/drivers/isdn/sc/debug.h
--- linux.vanilla/drivers/isdn/sc/debug.h	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/sc/debug.h	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: debug.h,v 1.2 2000/02/26 01:00:53 keil Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: debug.h,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/event.c linux.21p2/drivers/isdn/sc/event.c
--- linux.vanilla/drivers/isdn/sc/event.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/event.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: event.c,v 1.4 1997/10/09 22:30:58 fritz Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: event.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/hardware.h linux.21p2/drivers/isdn/sc/hardware.h
--- linux.vanilla/drivers/isdn/sc/hardware.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/hardware.h	Tue Jan  1 21:22:31 2002
@@ -1,5 +1,9 @@
 /*
  * Hardware specific macros, defines and structures
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #ifndef HARDWARE_H
@@ -12,15 +16,7 @@
  */
 
 #define MAX_CARDS	4		/* The maximum number of cards to
-					   control or probe for. If you change
-					   this, you must also change the number
-					   of elements in io, irq, and ram to
-					   match. Initialized in init.c */
-/*
-extern unsigned int io[];
-extern unsigned char irq[];
-extern unsigned long ram[];
-*/
+					   control or probe for. */
 
 #define SIGNATURE	0x87654321	/* Board reset signature */
 #define SIG_OFFSET	0x1004		/* Where to find signature in shared RAM */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/includes.h linux.21p2/drivers/isdn/sc/includes.h
--- linux.vanilla/drivers/isdn/sc/includes.h	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/sc/includes.h	Tue Jan  1 23:15:37 2002
@@ -1,4 +1,9 @@
-#include <linux/module.h>
+/*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
 #include <linux/version.h>
 #include <linux/errno.h>
 #include <asm/segment.h>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/init.c linux.21p2/drivers/isdn/sc/init.c
--- linux.vanilla/drivers/isdn/sc/init.c	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/sc/init.c	Tue Jan  1 21:22:31 2002
@@ -1,9 +1,23 @@
+/*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
 #include <linux/module.h>
 #include <linux/init.h>
 #include "includes.h"
 #include "hardware.h"
 #include "card.h"
 
+MODULE_DESCRIPTION("ISDN4Linux: Driver for Spellcaster card");
+MODULE_AUTHOR("Spellcaster Telecommunications Inc.");
+MODULE_LICENSE("GPL");
+MODULE_PARM( io, "1-" __MODULE_STRING(MAX_CARDS) "i");
+MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_CARDS) "i");
+MODULE_PARM(ram, "1-" __MODULE_STRING(MAX_CARDS) "i");
+MODULE_PARM(do_reset, "i");
+
 board *adapter[MAX_CARDS];
 int cinst;
 
@@ -38,11 +52,6 @@
 	}
 	return 0;
 }
-
-MODULE_PARM(io, "1-4i");
-MODULE_PARM(irq, "1-4i");
-MODULE_PARM(ram, "1-4i");
-MODULE_PARM(do_reset, "i");
 
 static int __init sc_init(void)
 {
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/interrupt.c linux.21p2/drivers/isdn/sc/interrupt.c
--- linux.vanilla/drivers/isdn/sc/interrupt.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/sc/interrupt.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: interrupt.c,v 1.4.8.2 2001/04/08 17:51:43 kai Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: interrupt.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/ioctl.c linux.21p2/drivers/isdn/sc/ioctl.c
--- linux.vanilla/drivers/isdn/sc/ioctl.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/ioctl.c	Tue Jan  1 21:22:31 2002
@@ -1,3 +1,11 @@
+/*
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
 #define __NO_VERSION__
 #include "includes.h"
 #include "hardware.h"
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/message.c linux.21p2/drivers/isdn/sc/message.c
--- linux.vanilla/drivers/isdn/sc/message.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/isdn/sc/message.c	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/*
- *  $Id: message.c,v 1.5.8.1 2001/04/08 17:51:43 kai Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: message.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  message.c - functions for sending and receiving control messages
+ * functions for sending and receiving control messages
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/message.h linux.21p2/drivers/isdn/sc/message.h
--- linux.vanilla/drivers/isdn/sc/message.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/message.h	Tue Jan  1 21:22:31 2002
@@ -1,25 +1,14 @@
-/*
- *  $Id: message.h,v 1.1 1996/11/07 13:07:47 fritz Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: message.h,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  message.h - structures, macros and defines useful for sending
- *              messages to the adapter
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * structures, macros and defines useful for sending
+ * messages to the adapter
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/packet.c linux.21p2/drivers/isdn/sc/packet.c
--- linux.vanilla/drivers/isdn/sc/packet.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/packet.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: packet.c,v 1.5 1999/08/31 11:20:41 paul Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: packet.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/scioc.h linux.21p2/drivers/isdn/sc/scioc.h
--- linux.vanilla/drivers/isdn/sc/scioc.h	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/scioc.h	Tue Jan  1 21:22:31 2002
@@ -1,3 +1,7 @@
+/*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
 
 /*
  * IOCTL Command Codes
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/shmem.c linux.21p2/drivers/isdn/sc/shmem.c
--- linux.vanilla/drivers/isdn/sc/shmem.c	Sun Mar 25 17:31:38 2001
+++ linux.21p2/drivers/isdn/sc/shmem.c	Tue Jan  1 21:22:31 2002
@@ -1,24 +1,13 @@
-/*
- *  $Id: shmem.c,v 1.2 1996/11/20 17:49:56 fritz Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: shmem.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  card.c - Card functions implementing ISDN4Linux functionality
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Card functions implementing ISDN4Linux functionality
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/timer.c linux.21p2/drivers/isdn/sc/timer.c
--- linux.vanilla/drivers/isdn/sc/timer.c	Sun Mar 25 17:37:34 2001
+++ linux.21p2/drivers/isdn/sc/timer.c	Tue Jan  1 21:22:31 2002
@@ -1,22 +1,11 @@
-/*
- *  $Id: timer.c,v 1.3 2000/05/06 00:52:39 kai Exp $
- *  Copyright (C) 1996  SpellCaster Telecommunications Inc.
+/* $Id: timer.c,v 1.1.2.1 2001/12/31 13:26:50 kai Exp $
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
+ * Copyright (C) 1996  SpellCaster Telecommunications Inc.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *  For more information, please contact gpl-info@spellcast.com or write:
+ * For more information, please contact gpl-info@spellcast.com or write:
  *
  *     SpellCaster Telecommunications Inc.
  *     5621 Finch Avenue East, Unit #3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/8139too.c linux.21p2/drivers/net/8139too.c
--- linux.vanilla/drivers/net/8139too.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/net/8139too.c	Sat Dec 29 03:20:08 2001
@@ -137,7 +137,7 @@
 */
 
 #define DRV_NAME	"8139too"
-#define DRV_VERSION	"0.9.18-pre4"
+#define DRV_VERSION	"0.9.18-2.2"
 
 
 #include <linux/config.h>
@@ -342,7 +342,7 @@
 #define RX_BUF_PAD 16
 #define RX_BUF_WRAP_PAD 2048 /* spare padding to handle lack of packet wrap */
 #define RX_BUF_TOT_LEN (RX_BUF_LEN + RX_BUF_PAD + RX_BUF_WRAP_PAD)
-#define RX_EARLY_THRESH 2
+#define RX_EARLY_THRESH 14
 
 /* Number of Tx descriptor registers. */
 #define NUM_TX_DESC	4
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/eepro.c linux.21p2/drivers/net/eepro.c
--- linux.vanilla/drivers/net/eepro.c	Sat Dec 29 16:57:21 2001
+++ linux.21p2/drivers/net/eepro.c	Sat Dec 29 03:14:41 2001
@@ -23,6 +23,8 @@
 	This is a compatibility hardware problem.
 
 	Versions:
+	0.13	irq sharing, rewrote probe function, fixed a nasty bug in
+		hardware_send_packet and a major cleanup (aris, 11/08/2001)
 	0.12d	tottaly isolated old code to new code (blue cards).
 		(aris, 12/27/2000)
 	0.12c	fixed other multiple cards bug and other cleanups
@@ -105,7 +107,7 @@
 */
 
 static const char *version =
-	"eepro.c: v0.12d 12/27/2000 aris@conectiva.com.br\n";
+	"eepro.c: v0.13 11/08/2001 aris@cathedrallabs.org\n";
 
 #include <linux/module.h>
 
@@ -192,18 +194,22 @@
 	unsigned tx_end;	/* end of the transmit chain (plus 1) */
 	int eepro;		/* 1 for the EtherExpress Pro/10,
 				 * 2 for the EtherExpress Pro/10+,
-				 * 3 for the blue cards,
+				 * 3 for the EtherExpress 10 (blue cards),
 				 * 0 for other 82595-based lan cards. */
 	int version;		/* a flag to indicate if this is a TX or FX
 				 * version of the 82595 chip. */
 	int stepping;
 	spinlock_t lock;	/* Serializing lock  */ 
-	unsigned rcv_ram;
-	unsigned rcv_start;
-	unsigned xmt_bar;
-	unsigned xmt_lower_limit_reg;
-	unsigned xmt_upper_limit_reg;
-	unsigned eeprom_reg;
+	unsigned rcv_ram;	/* pre-calculated space for rx */
+	unsigned xmt_ram;	/* pre-calculated space for tx */
+	unsigned char xmt_bar;
+	unsigned char xmt_lower_limit_reg;
+	unsigned char xmt_upper_limit_reg;
+	short xmt_lower_limit;
+	short xmt_upper_limit;
+	short rcv_lower_limit;
+	short rcv_upper_limit;
+	unsigned char eeprom_reg;
 };
 
 /* The station (ethernet) address prefix, used for IDing the board. */
@@ -305,7 +311,7 @@
 static struct enet_statistics *eepro_get_stats(struct device *dev);
 static void     set_multicast_list(struct device *dev);
 
-static int read_eeprom(int ioaddr, int location, struct device *dev);
+static int	read_eeprom(int ioaddr, int location, struct device *dev);
 static int 	hardware_send_packet(struct device *dev, void *buf, short length);
 static int	eepro_grab_irq(struct device *dev);
 
@@ -339,35 +345,25 @@
 buffer (transmit-buffer = 32K - receive-buffer).
 
 */
-
-/* now this section could be used by both boards: the oldies and the ee10:
- * ee10 uses tx buffer before of rx buffer and the oldies the inverse.
- * (aris)
- */
 #define	RAM_SIZE	0x8000
 
 #define	RCV_HEADER	8
 #define RCV_DEFAULT_RAM	0x6000
-#define RCV_RAM 	lp->rcv_ram
 
 #define XMT_HEADER	8
-#define XMT_RAM		(RAM_SIZE - RCV_RAM)
-
-#define XMT_START	((lp->rcv_start + RCV_RAM) % RAM_SIZE)
-
-#define RCV_LOWER_LIMIT	(lp->rcv_start >> 8)
-#define RCV_UPPER_LIMIT	(((lp->rcv_start + RCV_RAM) - 2) >> 8)
-#define XMT_LOWER_LIMIT	(XMT_START >> 8)
-#define XMT_UPPER_LIMIT	(((XMT_START + XMT_RAM) - 2) >> 8)
+#define XMT_DEFAULT_RAM	(RAM_SIZE - RCV_DEFAULT_RAM)
 
-#define RCV_START_PRO	0x00
-#define RCV_START_10	XMT_RAM
+#define XMT_START_PRO	RCV_DEFAULT_RAM
+#define XMT_START_10	0x0000
+#define RCV_START_PRO	0x0000
+#define RCV_START_10	XMT_DEFAULT_RAM
 
 #define	RCV_DONE	0x0008
 #define	RX_OK		0x2000
 #define	RX_ERROR	0x0d81
 
 #define	TX_DONE_BIT	0x0080
+#define TX_OK		0x2000
 #define	CHAIN_BIT	0x8000
 #define	XMT_STATUS	0x02
 #define	XMT_CHAIN	0x04
@@ -458,7 +454,7 @@
 #define EEDO 0x08
 
 /* do a full reset */
-#define eepro_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(40);
+#define eepro_reset(ioaddr) outb(RESET_CMD, ioaddr)
 
 /* do a nice reset */
 #define eepro_sel_reset(ioaddr) 	{ \
@@ -515,16 +511,14 @@
 
 /* a complete sel reset */
 #define eepro_complete_selreset(ioaddr) { 	\
-						/* eepro_dis_int(ioaddr); */ \
 						lp->stats.tx_errors++;\
 						eepro_sel_reset(ioaddr);\
 						lp->tx_end = \
-							(XMT_LOWER_LIMIT << 8);\
+							lp->xmt_lower_limit;\
 						lp->tx_start = lp->tx_end;\
 						lp->tx_last = 0;\
 						dev->tbusy=0;\
 						dev->trans_start = jiffies;\
-						/*eepro_en_int(ioaddr); */ \
 						eepro_en_rx(ioaddr);\
 					}
 
@@ -541,7 +535,7 @@
 		return eepro_probe1(dev, base_addr);
 
 	else if (base_addr != 0)	/* Don't probe at all. */
-		return ENXIO;
+		return -ENXIO;
 
 	for (i = 0; eepro_portlist[i]; i++) {
 		int ioaddr = eepro_portlist[i];
@@ -552,7 +546,7 @@
 			return 0;
 	}
 	
-	return ENODEV;
+	return -ENODEV;
 }
 
 static void printEEPROMInfo(short ioaddr, struct device *dev)
@@ -562,7 +556,7 @@
 
 	for (i=0, j=ee_Checksum; i<ee_SIZE; i++)
 		j+=read_eeprom(ioaddr,i,dev);
-	printk("Checksum: %#x\n",j&0xffff);
+	printk(KERN_DEBUG "Checksum: %#x\n",j&0xffff);
 
 	Word=read_eeprom(ioaddr, 0, dev);
 	printk(KERN_DEBUG "Word0:\n");
@@ -588,10 +582,10 @@
 	printk(KERN_DEBUG " BNC: %d\n",GetBit(Word,ee_BNC_TPE));
 	printk(KERN_DEBUG " NumConnectors: %d\n",GetBit(Word,ee_NumConn));
 	printk(KERN_DEBUG " Has ");
-	if (GetBit(Word,ee_PortTPE)) printk("TPE ");
-	if (GetBit(Word,ee_PortBNC)) printk("BNC ");
-	if (GetBit(Word,ee_PortAUI)) printk("AUI ");
-	printk("port(s) \n");
+	if (GetBit(Word,ee_PortTPE)) printk(KERN_DEBUG "TPE ");
+	if (GetBit(Word,ee_PortBNC)) printk(KERN_DEBUG "BNC ");
+	if (GetBit(Word,ee_PortAUI)) printk(KERN_DEBUG "AUI ");
+	printk(KERN_DEBUG "port(s) \n");
 
 	Word=read_eeprom(ioaddr, 6, dev);
 	printk(KERN_DEBUG "Word6:\n");
@@ -602,209 +596,226 @@
 	printk(KERN_DEBUG "Word7:\n");
 	printk(KERN_DEBUG " INT to IRQ:\n");
 
-	printk(KERN_DEBUG);
-
 	for (i=0, j=0; i<15; i++)
-		if (GetBit(Word,i)) printk(" INT%d -> IRQ %d;",j++,i);
+		if (GetBit(Word,i)) printk(KERN_DEBUG " INT%d -> IRQ %d;",j++,i);
 
-	printk("\n");
+	printk(KERN_DEBUG "\n");
 }
 
-/* This is the real probe routine.  Linux has a history of friendly device
-   probes on the ISA bus.  A good device probe avoids doing writes, and
-   verifies that the correct device exists and functions.  */
-
-int eepro_probe1(struct device *dev, short ioaddr)
+/* function to recalculate the limits of buffer based on rcv_ram */
+static void eepro_recalc (struct device *dev)
 {
-	unsigned short station_addr[6], id, counter;
-	int i,j, irqMask;
-	int eepro = 0;
-	struct eepro_local *lp;
-	const char *ifmap[] = {"AUI", "10Base2", "10BaseT"};
-	enum iftype { AUI=0, BNC=1, TPE=2 };
+	struct eepro_local *	lp;
 
-	/* Now, we are going to check for the signature of the
-	   ID_REG (register 2 of bank 0) */
+	lp = dev->priv;
+	lp->xmt_ram = RAM_SIZE - lp->rcv_ram;
 
-	id=inb(ioaddr + ID_REG);
- 
-	if (((id) & ID_REG_MASK) == ID_REG_SIG) {
-
-		/* We seem to have the 82595 signature, let's
-		   play with its counter (last 2 bits of
-		   register 2 of bank 0) to be sure. */
-		counter = (id & R_ROBIN_BITS);	
-		if (((id=inb(ioaddr+ID_REG)) & R_ROBIN_BITS) == 
-			(counter + 0x40)) {
-
-			/* Yes, the 82595 has been found */
-			printk(KERN_DEBUG " id: %#x ",id);
-			printk(" io: %#x ",ioaddr);
-
-			/* Initialize the device structure */
-			dev->priv = kmalloc(sizeof(struct eepro_local), GFP_KERNEL);
-			if (dev->priv == NULL)
-				return -ENOMEM;
-			memset(dev->priv, 0, sizeof(struct eepro_local));
-
-			lp = (struct eepro_local *)dev->priv;
-
-			/* default values */
-			lp->rcv_start = RCV_START_PRO;
-			lp->xmt_bar = XMT_BAR_PRO;
-			lp->xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO;
-			lp->xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO;
-			lp->eeprom_reg = EEPROM_REG_PRO;
-			lp->rcv_ram = RCV_DEFAULT_RAM;
-
-		/* Now, get the ethernet hardware address from
-			   the EEPROM */
-
-			station_addr[0] = read_eeprom(ioaddr, 2, dev);
-
-			/* FIXME - find another way to know that we've found
-			 * a Etherexpress 10
-			 */
-			if (station_addr[0] == 0x0000 ||
-			    station_addr[0] == 0xffff) {
-				eepro = 3;
-				lp->eepro = LAN595FX_10ISA;
-				lp->eeprom_reg = EEPROM_REG_10;
-				lp->rcv_start = RCV_START_10;
-				lp->xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_10;
-				lp->xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_10;
-				lp->xmt_bar = XMT_BAR_10;
+	if (lp->eepro == LAN595FX_10ISA) {
+		lp->xmt_lower_limit = XMT_START_10;
+		lp->xmt_upper_limit = (lp->xmt_ram - 2);
+		lp->rcv_lower_limit = lp->xmt_ram;
+		lp->rcv_upper_limit = (RAM_SIZE - 2);
+	}
+	else {
+		lp->rcv_lower_limit = RCV_START_PRO;
+		lp->rcv_upper_limit = (lp->rcv_ram - 2);
+		lp->xmt_lower_limit = lp->rcv_ram;
+		lp->xmt_upper_limit = (RAM_SIZE - 2);
+	}
+}
 
-				station_addr[0] = read_eeprom(ioaddr, 2, dev);
-			}
+/* prints boot-time info */
+static void eepro_print_info (struct device *dev)
+{
+	struct eepro_local *	lp = dev->priv;
+	int			i;
+	const char *		ifmap[] = {"AUI", "10Base2", "10BaseT"};
+
+	i = inb(dev->base_addr + ID_REG);
+	printk(KERN_DEBUG " id: %#x ",i);
+	printk(KERN_DEBUG " io: %#x ", (unsigned)dev->base_addr);
+
+	switch (lp->eepro) {
+		case LAN595FX_10ISA:
+			printk(KERN_INFO "%s: Intel EtherExpress 10 ISA\n at %#x,",
+					dev->name, (unsigned)dev->base_addr);
+			break;
+		case LAN595FX:
+			printk(KERN_INFO "%s: Intel EtherExpress Pro/10+ ISA\n at %#x,", 
+					dev->name, (unsigned)dev->base_addr);
+			break;
+		case LAN595TX:
+			printk(KERN_INFO "%s: Intel EtherExpress Pro/10 ISA at %#x,",
+					dev->name, (unsigned)dev->base_addr);
+			break;
+		case LAN595:
+			printk(KERN_INFO "%s: Intel 82595-based lan card at %#x,", 
+					dev->name, (unsigned)dev->base_addr);
+	}
 
-			station_addr[1] = read_eeprom(ioaddr, 3, dev);
-			station_addr[2] = read_eeprom(ioaddr, 4, dev);
+	for (i=0; i < 6; i++)
+		printk(KERN_INFO "%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
 
-			if (eepro) {
-				printk("%s: Intel EtherExpress 10 ISA\n at %#x,",
-					dev->name, ioaddr);
-			} else if (read_eeprom(ioaddr,7,dev)== ee_FX_INT2IRQ) {
-						 /* int to IRQ Mask */
-				eepro = 2;
-				printk("%s: Intel EtherExpress Pro/10+ ISA\n at %#x,", 
-					dev->name, ioaddr);
-			} else if (station_addr[2] == SA_ADDR1)  {
-				eepro = 1;
-				printk("%s: Intel EtherExpress Pro/10 ISA at %#x,",
-					dev->name, ioaddr);
-			}
-			else {
-				eepro = 0;
-				printk("%s: Intel 82595-based lan card at %#x,", 
-					dev->name, ioaddr);
-			}
+	if (net_debug > 3)
+		printk(KERN_DEBUG ", %dK RCV buffer",
+				(int)(lp->rcv_ram)/1024);
 
-			/* Fill in the 'dev' fields. */
-			dev->base_addr = ioaddr;
-			
-			for (i=0; i < 6; i++) {
-				dev->dev_addr[i] = ((unsigned char *) station_addr)[5-i];
-				printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
-			}
+	if (dev->irq > 2)
+		printk(KERN_INFO ", IRQ %d, %s.\n", dev->irq, ifmap[dev->if_port]);
+	else 
+		printk(KERN_INFO ", %s.\n", ifmap[dev->if_port]);
 
-			dev->mem_start = (RCV_LOWER_LIMIT << 8);
+	if (net_debug > 3) {
+		i = read_eeprom(dev->base_addr, 5, dev);
+		if (i & 0x2000) /* bit 13 of EEPROM word 5 */
+			printk(KERN_DEBUG "%s: Concurrent Processing is "
+				"enabled but not used!\n", dev->name);
+	}
 
-			/* received mem_end as argument */
-			if ((dev->mem_end & 0x3f) < 3 ||	/* RX buffer must be more than 3K */
-				(dev->mem_end & 0x3f) > 29)	/* and less than 29K */
-				dev->mem_end = (RCV_UPPER_LIMIT << 8);
-			else {
-				dev->mem_end = (dev->mem_end * 1024) +
-							(RCV_LOWER_LIMIT << 8);
-				lp->rcv_ram = dev->mem_end - (RCV_LOWER_LIMIT << 8);
-			}
+	/* Check the station address for the manufacturer's code */
+	if (net_debug>3)
+		printEEPROMInfo(dev->base_addr, dev);
+}
 
-			/* From now on, dev->mem_end - dev->mem_start contains 
-			 * the actual size of rx buffer 
-			 */
-			
-			if (net_debug > 3)
-				printk(", %dK RCV buffer",
-						(int)(dev->mem_end - dev->mem_start)/1024);
-								
-			/* ............... */
-
-			if (GetBit( read_eeprom(ioaddr, 5, dev),ee_BNC_TPE))
-				dev->if_port = BNC;
-			else dev->if_port = TPE;
-
-			/* ............... */
-
-
-			if ((dev->irq < 2) && (eepro!=0)) {
-				i = read_eeprom(ioaddr, 1, dev);
-				irqMask = read_eeprom(ioaddr, 7, dev);
-				i &= 0x07; /* Mask off INT number */
-				
-				for (j=0; ((j<16) && (i>=0)); j++) {
-					if ((irqMask & (1<<j))!=0) {
-						if (i==0) {
-							dev->irq = j;
-							break; /* found bit corresponding to irq */
-						}
-						i--; /* count bits set in irqMask */
-					}
-				}
-				if (dev->irq < 2) {
-					printk(" Duh! illegal interrupt vector stored in EEPROM.\n");
-						return ENODEV;
-				} else 
-				
-				if (dev->irq==2)
-					dev->irq = 9;
-			}
-			
-			if (dev->irq > 2) {
-				printk(", IRQ %d, %s.\n", dev->irq,
-						ifmap[dev->if_port]);
-			}
-			else printk(", %s.\n", ifmap[dev->if_port]);
-			
-			if (net_debug > 3) {
-				i = read_eeprom(ioaddr, 5, dev);
-				if (i & 0x2000) /* bit 13 of EEPROM word 5 */
-					printk(KERN_DEBUG "%s: Concurrent Processing is enabled but not used!\n",
-						dev->name);
-			}
+/* This is the real probe routine.  Linux has a history of friendly device
+   probes on the ISA bus.  A good device probe avoids doing writes, and
+   verifies that the correct device exists and functions.  */
 
-			if (net_debug) 
-				printk(version);
+int eepro_probe1(struct device *dev, short ioaddr)
+{
+	unsigned short 		station_addr[6],
+				id,
+				counter;
+	int 			i,
+				j,
+				irqMask,
+				retval = 0;
+	struct eepro_local *	lp;
+	enum 			iftype { AUI=0, BNC=1, TPE=2 };
 
-			/* Grab the region so we can find another board if autoIRQ fails. */
-			request_region(ioaddr, EEPRO_IO_EXTENT, dev->name);
+	/* Now, we are going to check for the signature of the
+	 * ID_REG (register 2 of bank 0) */
+	id = inb(ioaddr + ID_REG);
+	if (((id) & ID_REG_MASK) != ID_REG_SIG) {
+		if (net_debug > 3)
+			printk (KERN_DEBUG "EtherExpress Pro probed failed!\n");
+		retval = -ENODEV;
+		goto exit;
+	}
+
+	/* We seem to have the 82595 signature, let's
+	   play with its counter (last 2 bits of
+	   register 2 of bank 0) to be sure. */
+	counter = (id & R_ROBIN_BITS);	
+	if (((id = inb(ioaddr+ID_REG)) & R_ROBIN_BITS) != (counter + 0x40)) {
+		retval = -ENODEV;
+		goto exit;
+	}
+
+	/* Initialize the device structure */
+	dev->priv = kmalloc(sizeof(struct eepro_local), GFP_KERNEL);
+	if (dev->priv == NULL) {
+		retval = -ENOMEM;
+		goto exit;
+	}
+	memset(dev->priv, 0, sizeof(struct eepro_local));
+	lp = (struct eepro_local *)dev->priv;
+
+	/* default values */
+	lp->eepro = 0;
+	lp->xmt_bar = XMT_BAR_PRO;
+	lp->xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO;
+	lp->xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO;
+	lp->eeprom_reg = EEPROM_REG_PRO;
+
+	/* Now, get the ethernet hardware address from
+ 	 * the EEPROM */
+	station_addr[0] = read_eeprom(ioaddr, 2, dev);
+
+	/* FIXME - find another way to know that we've found
+	 * a Etherexpress 10 */
+	if (station_addr[0] == 0x0000 || station_addr[0] == 0xffff) {
+		lp->eepro = LAN595FX_10ISA;
+		lp->eeprom_reg = EEPROM_REG_10;
+		lp->xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_10;
+		lp->xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_10;
+		lp->xmt_bar = XMT_BAR_10;
+		station_addr[0] = read_eeprom(ioaddr, 2, dev);
+	}
+	station_addr[1] = read_eeprom(ioaddr, 3, dev);
+	station_addr[2] = read_eeprom(ioaddr, 4, dev);
+
+	if (!lp->eepro) {
+		if (read_eeprom(ioaddr,7,dev)== ee_FX_INT2IRQ)
+			lp->eepro = 2;
+		else if (station_addr[2] == SA_ADDR1)
+			lp->eepro = 1;
+	}
 
-			spin_lock_init(&(((struct eepro_local *)dev->priv)->lock));
-			dev->open               = eepro_open;
-			dev->stop               = eepro_close;
-			dev->hard_start_xmit    = eepro_send_packet;
-			dev->get_stats          = eepro_get_stats;
-			dev->set_multicast_list = &set_multicast_list;
-
-			/* Fill in the fields of the device structure with
-			   ethernet generic values */
-
-			ether_setup(dev);
-
-			/* Check the station address for the manufacturer's code */
-			if (net_debug>3)
-				printEEPROMInfo(ioaddr, dev);
+	/* Fill in the 'dev' fields. */
+	dev->base_addr = ioaddr;
+	for (i=0; i < 6; i++)
+		dev->dev_addr[i] = ((unsigned char *) station_addr)[5-i];
+
+	/* RX buffer must be more than 3K and less than 29K */
+	if (dev->mem_end < 3072 || dev->mem_end > 29696)
+		lp->rcv_ram = RCV_DEFAULT_RAM;
 
-			/* reset 82595 */
-			eepro_reset(ioaddr);
+	/* calculate {xmt,rcv}_{lower,upper}_limit */
+	eepro_recalc(dev);
+	
+	if (GetBit(read_eeprom(ioaddr, 5, dev), ee_BNC_TPE))
+		dev->if_port = BNC;
+	else 
+		dev->if_port = TPE;
 
-			return 0;
+	if ((dev->irq < 2) && (lp->eepro != 0)) {
+		i = read_eeprom(ioaddr, 1, dev);
+		irqMask = read_eeprom(ioaddr, 7, dev);
+		i &= 0x07; /* Mask off INT number */
+		
+		for (j=0; ((j<16) && (i>=0)); j++) {
+			if ((irqMask & (1<<j))!=0) {
+				if (i==0) {
+					dev->irq = j;
+					/* found bit corresponding to irq */
+					break;
+				}
+				i--; /* count bits set in irqMask */
 			}
-		else return ENODEV;
 		}
-	else if (net_debug > 3)
-		printk ("EtherExpress Pro probed failed!\n");
-	return ENODEV;
+		if (dev->irq < 2) {
+			printk(KERN_ERR " Duh! illegal interrupt vector stored in "
+				"EEPROM.\n");
+				retval = -ENODEV;
+				goto freeall;
+		} else 
+			if (dev->irq == 2) dev->irq = 9;
+	}
+	/* Grab the region so we can find another board if autoIRQ fails. */
+	request_region(ioaddr, EEPRO_IO_EXTENT, dev->name);
+	spin_lock_init(&(((struct eepro_local *)dev->priv)->lock));
+	dev->open               = eepro_open;
+	dev->stop               = eepro_close;
+	dev->hard_start_xmit    = eepro_send_packet;
+	dev->get_stats          = eepro_get_stats;
+	dev->set_multicast_list = &set_multicast_list;
+
+	/* Fill in the fields of the device structure with ethernet generic
+	 * values */
+	ether_setup(dev);
+
+	/* print boot time info */
+	eepro_print_info(dev);
+
+	/* reset 82595 */
+	eepro_reset(ioaddr);
+
+exit:
+	return retval;
+freeall:
+	kfree(dev->priv);
+	goto exit;
 }
 
 /* Open/initialize the board.  This is called (in the current kernel)
@@ -842,7 +853,7 @@
 
 		eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */
 
-		if (request_irq (*irqp, NULL, 0, "bogus", dev) != EBUSY) {
+		if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != -EBUSY) {
 			/* Twinkle the interrupt, and check if it's seen */
 			autoirq_setup(0);
 
@@ -877,7 +888,6 @@
 	unsigned short temp_reg, old8, old9;
 	int irqMask;
 	int i, ioaddr = dev->base_addr;
-
 	struct eepro_local *lp = (struct eepro_local *)dev->priv;
 
 	if (net_debug > 3)
@@ -906,12 +916,12 @@
 
 	/* Get the interrupt vector for the 82595 */	
 	if (dev->irq < 2 && eepro_grab_irq(dev) == 0) {
-		printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
+		printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq);
 		return -EAGAIN;
 	}
 		
 	if (request_irq(dev->irq , &eepro_interrupt, 0, dev->name, dev)) {
-		printk("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
+		printk(KERN_ERR "%s: unable to get IRQ %d.\n", dev->name, dev->irq);
 		return -EAGAIN;
 	}
 	
@@ -920,6 +930,7 @@
 		|| (irq2dev_map[dev->irq] = dev) == 0) && 
 		(irq2dev_map[dev->irq]!=dev)) {
 		/* printk("%s: IRQ map wrong\n", dev->name); */
+		free_irq(dev->irq, dev);
 		return -EAGAIN;
 	}
 #endif
@@ -930,7 +941,6 @@
 	temp_reg = inb(ioaddr + lp->eeprom_reg);
 
 	lp->stepping = temp_reg >> 5;	/* Get the stepping number of the 595 */
-	/* Get the stepping number of the 595 */
 
 	if (net_debug > 3)
 		printk(KERN_DEBUG "The stepping of the 82595 is %d\n", lp->stepping);
@@ -955,12 +965,12 @@
 
 	/* Set the interrupt vector */	
 	temp_reg = inb(ioaddr + INT_NO_REG);
-	if (lp->eepro == 2 || lp->eepro == LAN595FX_10ISA)
+	if (lp->eepro == LAN595FX || lp->eepro == LAN595FX_10ISA)
 		outb((temp_reg & 0xf8) | irqrmap2[dev->irq], ioaddr + INT_NO_REG);
 	else outb((temp_reg & 0xf8) | irqrmap[dev->irq], ioaddr + INT_NO_REG); 
 
 	temp_reg = inb(ioaddr + INT_NO_REG);
-	if (lp->eepro == 2 || lp->eepro == LAN595FX_10ISA)
+	if (lp->eepro == LAN595FX || lp->eepro == LAN595FX_10ISA)
 		outb((temp_reg & 0xf0) | irqrmap2[dev->irq] | 0x08,ioaddr+INT_NO_REG);
 	else outb((temp_reg & 0xf8) | irqrmap[dev->irq], ioaddr + INT_NO_REG);
 
@@ -969,10 +979,10 @@
 
 
 	/* Initialize the RCV and XMT upper and lower limits */
-	outb(RCV_LOWER_LIMIT, ioaddr + RCV_LOWER_LIMIT_REG); 
-	outb(RCV_UPPER_LIMIT, ioaddr + RCV_UPPER_LIMIT_REG); 
-	outb(XMT_LOWER_LIMIT, ioaddr + lp->xmt_lower_limit_reg); 
-	outb(XMT_UPPER_LIMIT, ioaddr + lp->xmt_upper_limit_reg); 
+	outb(lp->rcv_lower_limit >> 8, ioaddr + RCV_LOWER_LIMIT_REG); 
+	outb(lp->rcv_upper_limit >> 8, ioaddr + RCV_UPPER_LIMIT_REG); 
+	outb(lp->xmt_lower_limit >> 8, ioaddr + lp->xmt_lower_limit_reg); 
+	outb(lp->xmt_upper_limit >> 8, ioaddr + lp->xmt_upper_limit_reg); 
 
 	/* Enable the interrupt line. */
 	eepro_en_intline(ioaddr);
@@ -986,12 +996,14 @@
 	eepro_clear_int(ioaddr);
 
 	/* Initialize RCV */
-	outw((RCV_LOWER_LIMIT << 8), ioaddr + RCV_BAR); 
-	lp->rx_start = (RCV_LOWER_LIMIT << 8);
-	outw(((RCV_UPPER_LIMIT << 8) | 0xfe), ioaddr + RCV_STOP); 
+	outw(lp->rcv_lower_limit, ioaddr + RCV_BAR); 
+	outw((lp->rcv_upper_limit | 0xfe), ioaddr + RCV_STOP); 
+	lp->rx_start = lp->rcv_lower_limit;
 
 	/* Initialize XMT */
-	outw((XMT_LOWER_LIMIT << 8), ioaddr + lp->xmt_bar); 
+	outw(lp->xmt_lower_limit, ioaddr + lp->xmt_bar); 
+	lp->tx_start = lp->tx_end = lp->xmt_lower_limit;
+	lp->tx_last = 0;
 
 	/* Check for the i82595TX and i82595FX */
 	old8 = inb(ioaddr + 8);
@@ -1034,11 +1046,6 @@
 	}
 	
 	eepro_sel_reset(ioaddr);
-	SLOW_DOWN;
-	SLOW_DOWN;
-
-	lp->tx_start = lp->tx_end = (XMT_LOWER_LIMIT << 8);
-	lp->tx_last = 0;
 	
 	dev->tbusy = 0;
 	dev->interrupt = 0;
@@ -1064,14 +1071,10 @@
 	if (net_debug > 5)
 		printk(KERN_DEBUG  "%s: entering eepro_send_packet routine.\n", dev->name);
 
-	if (dev->tbusy) {
-		/* If we get here, some higher level has decided we are broken.
-		   There should really be a "kick me" function call instead. */
-		int tickssofar = jiffies - dev->trans_start;
+	eepro_dis_int(ioaddr);
+	spin_lock_irqsave(&lp->lock, flags);
 
-		if (tickssofar < 40)
-			return 1;
-		
+	if (dev->tbusy) {
 		/* if (net_debug > 1) */
 		printk(KERN_ERR "%s: transmit timed out, %s?\n", dev->name, 
 			"network cable problem");
@@ -1083,33 +1086,29 @@
 		/* let's do a complete sel reset */
 		eepro_complete_selreset(ioaddr);
 	}
-	spin_lock_irqsave(&lp->lock, flags);
 
 	/* Block a timer-based transmit from overlapping. */
 	if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
 		printk(KERN_WARNING "%s: Transmitter access conflict.\n", dev->name);
-
-		spin_unlock_irqrestore(&lp->lock, flags);
+		lp->stats.tx_aborted_errors++;
 	} else {
 		short length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
-		unsigned char *buf = skb->data;
-
-		lp->stats.tx_bytes+=skb->len;
-		if (hardware_send_packet(dev, buf, length))
-			return 1;
-		
-		dev->trans_start = jiffies;
 
+		if (hardware_send_packet(dev, skb->data, length))
+			/* we won't unset tbusy because we're out of space. */
+			lp->stats.tx_dropped++;
+		else {
+			lp->stats.tx_bytes += skb->len;
+			dev->trans_start = jiffies;
+			dev->tbusy = 0;
+		}
 	}
-
 	dev_kfree_skb(skb);
 
-	/* You might need to clean up and record Tx statistics here. */
-	/* lp->stats.tx_aborted_errors++; */
-
 	if (net_debug > 5)
 		printk(KERN_DEBUG "%s: exiting eepro_send_packet routine.\n", dev->name);
 
+	eepro_en_int(ioaddr);
 	spin_unlock_irqrestore(&lp->lock, flags);
 	
 	return 0;
@@ -1122,17 +1121,20 @@
 static void
 eepro_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 {
-	struct device *dev =  (struct device *)dev_id;
-	                      /* (struct device *)(irq2dev_map[irq]);*/
-	struct eepro_local *lp = (struct eepro_local *)dev->priv;
+	struct device *dev;
+	struct eepro_local *lp;
 	int ioaddr, status, boguscount = 20;
 
-	if (dev == NULL) {
+	if (dev_id == NULL) {
                 printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq);
                 return;
         }
 
-        spin_lock(&lp->lock);
+	dev = (struct device *)dev_id;
+
+	lp = (struct eepro_local *)dev->priv;
+
+	spin_lock(&lp->lock);
 
 	if (dev->interrupt) {
 		printk(KERN_ERR "%s: Re-entering the interrupt handler.\n", dev->name);
@@ -1150,39 +1152,37 @@
 	
 	ioaddr = dev->base_addr;
 
-	while (((status = inb(ioaddr + STATUS_REG)) & 0x06) && (boguscount--)) 
+	eepro_sw2bank0(ioaddr);
+
+	while (((status = inb(ioaddr + STATUS_REG)) & (RX_INT|TX_INT)) && boguscount--) 
 	{
-		switch (status & (RX_INT | TX_INT)) {
-#ifdef ANSWER_TX_AND_RX
-			case (RX_INT | TX_INT):
-				eepro_ack_rxtx(ioaddr);
-				break;
-#endif
-			case RX_INT:
-				eepro_ack_rx(ioaddr);
-				break;
-			case TX_INT:
-				eepro_ack_tx(ioaddr);
-		}
+
 		if (status & RX_INT) {
 			if (net_debug > 4)
 				printk(KERN_DEBUG "%s: packet received interrupt.\n", dev->name);
 
+			eepro_dis_int(ioaddr);
+
 			/* Get the received packets */
+			eepro_ack_rx(ioaddr);
 			eepro_rx(dev);
-#ifndef ANSWER_TX_AND_RX
-			continue;
-#endif
+
+			eepro_en_int(ioaddr);
 		}
 		if (status & TX_INT) {
 			if (net_debug > 4)
  				printk(KERN_DEBUG "%s: packet transmit interrupt.\n", dev->name);
 
+			eepro_dis_int(ioaddr);
+
 			/* Process the status of transmitted packets */
+			eepro_ack_tx(ioaddr);
 			eepro_transmit_interrupt(dev);
+
+			eepro_en_int(ioaddr);
 		}
 	}
-	
+
 	dev->interrupt = 0;
 
 	if (net_debug > 5)
@@ -1212,7 +1212,7 @@
 
 	/* Flush the Tx and disable Rx. */
 	outb(STOP_RCV_CMD, ioaddr); 
-	lp->tx_start = lp->tx_end = (XMT_LOWER_LIMIT << 8);
+	lp->tx_start = lp->tx_end = lp->xmt_lower_limit;
 	lp->tx_last = 0;
 
 	/* Mask all the interrupts. */
@@ -1273,7 +1273,7 @@
 		mode = inb(ioaddr + REG3);
 		outb(mode, ioaddr + REG3); /* writing reg. 3 to complete the update */
 		eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */
-		printk("%s: promiscuous mode enabled.\n", dev->name);
+		printk(KERN_INFO "%s: promiscuous mode enabled.\n", dev->name);
 	}
 	
 	else if (dev->mc_count==0 ) 
@@ -1352,11 +1352,11 @@
 				outb(0x08, ioaddr + STATUS_REG);
 				
 				if (i & 0x20) { /* command ABORTed */
-					printk("%s: multicast setup failed.\n", 
+					printk(KERN_NOTICE "%s: multicast setup failed.\n", 
 						dev->name);
 					break;
 				} else if ((i & 0x0f) == 0x03)	{ /* MC-Done */
-					printk("%s: set Rx mode to %d address%s.\n",
+					printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n",
 						dev->name, dev->mc_count,
 						dev->mc_count > 1 ? "es":"");
 					break;
@@ -1392,14 +1392,10 @@
 	int read_cmd = location | EE_READ_CMD;
 	short ctrl_val = EECS ;
 	
-	/* XXXX - this is not the final version. We must test this on other
-	 *	  boards other than eepro10. I think that it won't let other
-	 *	  boards to fail. (aris)
-	 */
-	if (lp->eepro == LAN595FX_10ISA) {
-		eepro_sw2bank1(ioaddr);
-		outb(0x00, ioaddr + STATUS_REG);
-	}
+	/* XXXX - black magic */
+	eepro_sw2bank1(ioaddr);
+	outb(0x00, ioaddr + STATUS_REG);
+	/* XXXX - black magic */
 		
 	eepro_sw2bank2(ioaddr);
 	outb(ctrl_val, ee_addr);
@@ -1437,133 +1433,95 @@
 {
 	struct eepro_local *lp = (struct eepro_local *)dev->priv;
 	short ioaddr = dev->base_addr;
-
-	unsigned status, tx_available, last, end, boguscount = 100;
+	unsigned status, tx_available, last, end;
 
 	if (net_debug > 5)
 		printk(KERN_DEBUG "%s: entering hardware_send_packet routine.\n", dev->name);
 
+	/* determine how much of the transmit buffer space is
+	 * available */
+	if (lp->tx_end > lp->tx_start)
+		tx_available = lp->xmt_ram - (lp->tx_end - 
+							lp->tx_start);
+	else if (lp->tx_end < lp->tx_start)
+		tx_available = lp->tx_start - lp->tx_end;
+	else tx_available = lp->xmt_ram;
 
-	while (boguscount-- > 0) {
-		/* Disable RX and TX interrupts.  Necessary to avoid
-		corruption of the HOST_ADDRESS_REG by interrupt
-		service routines. */
-		eepro_dis_int(ioaddr);
-
-		if (dev->interrupt == 1) {
-			/* Enable RX and TX interrupts */
-			eepro_en_int(ioaddr);
-			continue;
-		}
-
-		/* determine how much of the transmit buffer space is available */
-		if (lp->tx_end > lp->tx_start)
-			tx_available = XMT_RAM - (lp->tx_end - lp->tx_start);
-		else if (lp->tx_end < lp->tx_start)
-			tx_available = lp->tx_start - lp->tx_end;
-		else tx_available = XMT_RAM;
-
-		if (((((length + 3) >> 1) << 1) + 2*XMT_HEADER) 
-			>= tx_available)   /* No space available ??? */
-			{
-			eepro_transmit_interrupt(dev); /* Clean up the transmiting queue */
-
-			/* Enable RX and TX interrupts */
-			eepro_en_int(ioaddr);
-			continue;
-		}
-
-		last = lp->tx_end;
-		end = last + (((length + 3) >> 1) << 1) + XMT_HEADER;
-
-		if (end >= (XMT_UPPER_LIMIT << 8)) { /* the transmit buffer is wrapped around */
-			if (((XMT_UPPER_LIMIT << 8) - last) <= XMT_HEADER) {
-				/* Arrrr!!!, must keep the xmt header together,
-				several days were lost to chase this one down. */
-				
-				last = (XMT_LOWER_LIMIT << 8);
-				end = last + (((length + 3) >> 1) << 1) + XMT_HEADER;
-			}
-			else end = (XMT_LOWER_LIMIT << 8) + (end - 
-						(XMT_UPPER_LIMIT << 8));
-		}
-
-		outw(last, ioaddr + HOST_ADDRESS_REG);
-		outw(XMT_CMD, ioaddr + IO_PORT);
-		outw(0, ioaddr + IO_PORT);
-		outw(end, ioaddr + IO_PORT);
-		outw(length, ioaddr + IO_PORT);
-
-		if (lp->version == LAN595)
-			outsw(ioaddr + IO_PORT, buf, (length + 3) >> 1);
-		else {	/* LAN595TX or LAN595FX, capable of 32-bit I/O processing */
-			unsigned short temp = inb(ioaddr + INT_MASK_REG);
-			outb(temp | IO_32_BIT, ioaddr + INT_MASK_REG);
-			outsl(ioaddr + IO_PORT_32_BIT, buf, (length + 3) >> 2);
-			outb(temp & ~(IO_32_BIT), ioaddr + INT_MASK_REG);
-		}
+	if (((((length + 3) >> 1) << 1) + 2*XMT_HEADER) >= tx_available) {
+		/* No space available ??? */
+		return 1;
+	}
 
-		/* A dummy read to flush the DRAM write pipeline */
-		status = inw(ioaddr + IO_PORT); 
+	last = lp->tx_end;
+	end = last + (((length + 3) >> 1) << 1) + XMT_HEADER;
 
-		if (lp->tx_start == lp->tx_end) {
-			outw(last, ioaddr + lp->xmt_bar);
-			outb(XMT_CMD, ioaddr);			
-			lp->tx_start = last;   /* I don't like to change tx_start here */
-		}
-		else {
-			/* update the next address and the chain bit in the 
-			last packet */
-			if (lp->tx_end != last) {
-				outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG);
-				outw(last, ioaddr + IO_PORT); 
-			}
+	if (end >= lp->xmt_upper_limit + 2) { 
+	/* the transmit buffer is wrapped around */
+		if ((lp->xmt_upper_limit + 2 - last) <= XMT_HEADER) {
+			/* Arrrr!!!, must keep the xmt header together,
+			several days were lost to chase this one down. */
 			
-			outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG);
-			status = inw(ioaddr + IO_PORT); 
-			outw(status | CHAIN_BIT, ioaddr + IO_PORT);
-			/* Continue the transmit command */
-			outb(RESUME_XMT_CMD, ioaddr);
-		}
-
-		lp->tx_last = last;
-		lp->tx_end = end;
-
-		if (dev->tbusy) {
-			dev->tbusy = 0;
+			last = lp->xmt_lower_limit;
+			end = last + (((length + 3) >> 1) << 1) +
+							XMT_HEADER;
+		}
+		else end = lp->xmt_lower_limit + (end - 
+					lp->xmt_upper_limit + 2);
+	}
+
+	outw(last, ioaddr + HOST_ADDRESS_REG);
+	outw(XMT_CMD, ioaddr + IO_PORT);
+	outw(0, ioaddr + IO_PORT);
+	outw(end, ioaddr + IO_PORT);
+	outw(length, ioaddr + IO_PORT);
+
+	if (lp->version == LAN595)
+		outsw(ioaddr + IO_PORT, buf, (length + 3) >> 1);
+	else {	/* LAN595TX or LAN595FX, capable of 32-bit I/O processing */
+		unsigned short temp = inb(ioaddr + INT_MASK_REG);
+		outb(temp | IO_32_BIT, ioaddr + INT_MASK_REG);
+		outsl(ioaddr + IO_PORT_32_BIT, buf, (length + 3) >> 2);
+		outb(temp & ~(IO_32_BIT), ioaddr + INT_MASK_REG);
+	}
+
+	/* A dummy read to flush the DRAM write pipeline */
+	status = inw(ioaddr + IO_PORT); 
+	if (lp->tx_start == lp->tx_end) {
+		outw(last, ioaddr + lp->xmt_bar);
+		outb(XMT_CMD, ioaddr);
+		lp->tx_start = last;   /* I don't like to change tx_start here */
+	}
+	else {
+		/* update the next address and the chain bit in the 
+		last packet */
+		if (lp->tx_end != last) {
+			outw(lp->tx_last + XMT_CHAIN, ioaddr + HOST_ADDRESS_REG);
+			outw(last, ioaddr + IO_PORT); 
 		}
-		
-		/* now we are serializing tx. tbusy won't come back until
-		 * the tx interrupt
-		 */
-		if (lp->eepro == LAN595FX_10ISA)
-			dev->tbusy = 1;
-		
-		/* Enable RX and TX interrupts */
-		eepro_en_int(ioaddr);
-
-		if (net_debug > 5)
-			printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
 
-		return 0;
+		outw(lp->tx_last + XMT_COUNT, ioaddr + HOST_ADDRESS_REG);
+		status = inw(ioaddr + IO_PORT); 
+		outw(status | CHAIN_BIT, ioaddr + IO_PORT);
+		/* Continue the transmit command */
+		outb(RESUME_XMT_CMD, ioaddr);
 	}
-	if (lp->eepro == LAN595FX_10ISA)
-		dev->tbusy = 1;
+
+	lp->tx_last = last;
+	lp->tx_end = end;
 
 	if (net_debug > 5)
 		printk(KERN_DEBUG "%s: exiting hardware_send_packet routine.\n", dev->name);
 
-	return 1;
+	return 0;
 }
 
 static void
 eepro_rx(struct device *dev)
 {
 	struct eepro_local *lp = (struct eepro_local *)dev->priv;
-	short ioaddr = dev->base_addr;
-		
-	short boguscount = 20;
-	unsigned rcv_car = lp->rx_start;
+	short 	ioaddr = dev->base_addr,
+	 	boguscount = 25,
+		rcv_car = lp->rx_start;
 	unsigned rcv_event, rcv_status, rcv_next_frame, rcv_size;
 
 	if (net_debug > 5)
@@ -1575,7 +1533,6 @@
 	rcv_event = inw(ioaddr + IO_PORT);
 
 	while (rcv_event == RCV_DONE) {
-	
 		rcv_status = inw(ioaddr + IO_PORT); 
 		rcv_next_frame = inw(ioaddr + IO_PORT);
 		rcv_size = inw(ioaddr + IO_PORT); 
@@ -1624,24 +1581,26 @@
 			else if (rcv_status & 0x0800)
 				lp->stats.rx_crc_errors++;
 			
-			printk("%s: event = %#x, status = %#x, next = %#x, size = %#x\n", 
+			printk(KERN_DEBUG "%s: event = %#x, status = %#x, next = %#x, size = %#x\n", 
 				dev->name, rcv_event, rcv_status, rcv_next_frame, rcv_size);
 		}
 
 		if (rcv_status & 0x1000)
 			lp->stats.rx_length_errors++;
 
-		if (--boguscount == 0)
-			break;
 
 		rcv_car = lp->rx_start + RCV_HEADER + rcv_size;
 		lp->rx_start = rcv_next_frame;
+
+		if (--boguscount == 0)
+			break;
+
 		outw(rcv_next_frame, ioaddr + HOST_ADDRESS_REG);
 		rcv_event = inw(ioaddr + IO_PORT);
 
 	} 
 	if (rcv_car == 0)
-		rcv_car = ((RCV_UPPER_LIMIT << 8) | 0xff);
+		rcv_car = lp->rcv_upper_limit | 0xff;
 		
 	outw(rcv_car - 1, ioaddr + RCV_STOP);
 
@@ -1653,59 +1612,25 @@
 eepro_transmit_interrupt(struct device *dev)
 {
 	struct eepro_local *lp = (struct eepro_local *)dev->priv;
-	short ioaddr = dev->base_addr;
-	short boguscount = 20; 
-	unsigned xmt_status;
-
-	/*
-	if (dev->tbusy == 0) {
-		printk("%s: transmit_interrupt called with tbusy = 0 ??\n",
-			dev->name);
-		printk(KERN_DEBUG "%s: transmit_interrupt called with tbusy = 0 ??\n",
-			dev->name);
-	}
-	*/
-	while (lp->tx_start != lp->tx_end && boguscount) {
+	short 	ioaddr = dev->base_addr,
+		boguscount = 25,
+		xmt_status;
 
+	while ((lp->tx_start != lp->tx_end) && boguscount--) {
 		outw(lp->tx_start, ioaddr + HOST_ADDRESS_REG);
 		xmt_status = inw(ioaddr+IO_PORT);
 
-		if ((xmt_status & TX_DONE_BIT) == 0) {
-			if (lp->eepro == LAN595FX_10ISA) {
-				udelay(40);
-				boguscount--;
-				continue;
-			}
-			else
-				break;
-		}
-
-
-		xmt_status = inw(ioaddr+IO_PORT); 
-		lp->tx_start = inw(ioaddr+IO_PORT);
-
-		if (lp->eepro == LAN595FX_10ISA) {
-			lp->tx_start = (XMT_LOWER_LIMIT << 8);
-			lp->tx_end = lp->tx_start;
-	
-			/* yeah, black magic :( */
-			eepro_sw2bank0(ioaddr);
-			eepro_en_int(ioaddr);
+		/* are we trying to get a packet not ready? */
+		if ((xmt_status & TX_DONE_BIT) == 0)
+			break;
 
-			/* disabling rx */
-			eepro_dis_rx(ioaddr);
-			
-			/* enabling rx */
-			eepro_en_rx(ioaddr);
-		}
+		xmt_status = inw(ioaddr+IO_PORT);
+		lp->tx_start = inw(ioaddr + IO_PORT);
 
-		/* here the tbusy comes to 0 for normal and ee10 cards
-		 */
 		dev->tbusy = 0;
-		
 		mark_bh(NET_BH);
-		
-		if (xmt_status & 0x2000) {
+
+		if (xmt_status & TX_OK) {
 			lp->stats.tx_packets++; 
 		}
 		else {
@@ -1714,45 +1639,17 @@
 				lp->stats.tx_carrier_errors++;
 				printk(KERN_DEBUG "%s: carrier error\n",
 					dev->name);
-				printk(KERN_DEBUG "%s: XMT status = %#x\n",
-					dev->name, xmt_status);
 			}
-			else {
-				printk(KERN_DEBUG "%s: XMT status = %#x\n",
-					dev->name, xmt_status);
-				printk(KERN_DEBUG "%s: XMT status = %#x\n",
+			printk(KERN_DEBUG "%s: XMT status = %#x\n",
 					dev->name, xmt_status);
-			}
-
-			if (lp->eepro == LAN595FX_10ISA) {			
-				/* Try to restart the adaptor. */
-				/* We are supposed to wait for 2 us after a SEL_RESET */
-				eepro_sel_reset(ioaddr);
-
-				/* first enable interrupts */
-				eepro_sw2bank0(ioaddr);
-				outb(ALL_MASK & ~(RX_INT | TX_INT), ioaddr + STATUS_REG);
-			
-				/* enabling rx */
-				eepro_en_rx(ioaddr);
-			}
 		}
 		
-		if (xmt_status & 0x000f) {
+		if (xmt_status & 0x000f)
 			lp->stats.collisions += (xmt_status & 0x000f);
-		}
 		
-		if ((xmt_status & 0x0040) == 0x0) {
+		if (!(xmt_status & 0x0040))
 			lp->stats.tx_heartbeat_errors++;
-		}
-		boguscount--;
 	}
-	/* if it reached here then it's probable that the adapter won't
-	 * interrupt again for tx. in other words: tx timeout what will take
-	 * a lot of time to happen, so we'll do a complete selreset.
-	 */
-	if (!boguscount && lp->eepro == LAN595FX_10ISA)
-		eepro_complete_selreset(ioaddr);
 }
 
 #ifdef MODULE
@@ -1781,23 +1678,23 @@
 {
 	int i;
 	if (io[0] == 0 && autodetect == 0) {
-		printk("eepro_init_module: Probe is very dangerous in ISA boards!\n");
-		printk("eepro_init_module: Please add \"autodetect=1\" to force probe\n");
+		printk(KERN_WARNING "eepro_init_module: Probe is very dangerous in ISA boards!\n");
+		printk(KERN_WARNING "eepro_init_module: Please add \"autodetect=1\" to force probe\n");
 		return 1;
 	}
 	else if (autodetect) {
 		/* if autodetect is set then we must force detection */
 		io[0] = 0;
 		
-		printk("eepro_init_module: Auto-detecting boards (May God protect us...)\n");
+		printk(KERN_INFO "eepro_init_module: Auto-detecting boards (May God protect us...)\n");
 	}	
 	
 	for (i = 0; i < MAX_EEPRO; i++) {
 		struct device *d = &dev_eepro[n_eepro];
 		d->name		= devicename[n_eepro]; /* inserted by drivers/net/net_init.c */
-		d->mem_end	= mem[n_eepro];		
-		d->base_addr	= io[0];
-		d->irq		= irq[n_eepro];
+		d->mem_end	= mem[i];		
+		d->base_addr	= io[i];
+		d->irq		= irq[i];
 		d->init		= eepro_probe;
 
 		if (register_netdev(d) == 0)
@@ -1805,7 +1702,10 @@
 		else
 			break;
 	}
-	
+
+	if (n_eepro)
+		printk(KERN_INFO "%s", version);
+
 	return n_eepro ? 0 : -ENODEV;
 }
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/oldproc.c linux.21p2/drivers/pci/oldproc.c
--- linux.vanilla/drivers/pci/oldproc.c	Sat Dec 29 16:57:22 2001
+++ linux.21p2/drivers/pci/oldproc.c	Tue Jan  1 22:40:32 2002
@@ -344,11 +344,11 @@
 	DEVICE( VIA,		VIA_82C585,	"VT 82C585 Apollo VP1/VPX"),
 	DEVICE( VIA,		VIA_82C586_0,	"VT 82C586 Apollo ISA"),
 	DEVICE( VIA,		VIA_82C595,	"VT 82C595 Apollo VP2"),
-	DEVICE( VIA,		VIA_82C596_0,	"VT 82C596 Apollo Pro"),
+	DEVICE( VIA,		VIA_82C596,	"VT 82C596 Apollo Pro"),
 	DEVICE( VIA,		VIA_82C597_0,	"VT 82C597 Apollo VP3"),
 	DEVICE( VIA,		VIA_82C598_0,	"VT 82C598 Apollo MVP3"),
 	DEVICE( VIA,		VIA_82C926,	"VT 82C926 Amazon"),
-	DEVICE( VIA,		VIA_82C416,	"VT 82C416MV"),
+	DEVICE( VIA,		VIA_82C576_1,	"VT 82C416MV"),
 	DEVICE( VIA,		VIA_82C595_97,	"VT 82C595 Apollo VP2/97"),
 	DEVICE( VIA,		VIA_82C586_2,	"VT 82C586 Apollo USB"),
 	DEVICE( VIA,		VIA_82C586_3,	"VT 82C586B Apollo ACPI"),
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/quirks.c linux.21p2/drivers/pci/quirks.c
--- linux.vanilla/drivers/pci/quirks.c	Sun Mar 25 17:31:36 2001
+++ linux.21p2/drivers/pci/quirks.c	Tue Jan  1 22:39:14 2002
@@ -144,6 +144,96 @@
 	}
 }
 
+/*
+ *	VIA Apollo KT133 needs PCI latency patch
+ *	Made according to a windows driver based patch by George E. Breese
+ *	see PCI Latency Adjust on http://www.viahardware.com/download/viatweak.shtm
+ *      Also see http://home.tiscalinet.de/au-ja/review-kt133a-1-en.html for
+ *      the info on which Mr Breese based his work.
+ *
+ *	Updated based on further information from the site and also on
+ *	information provided by VIA 
+ */
+
+__initfunc(static void quirk_vialatency(struct pci_dev *dev, int arg))
+{
+	struct pci_dev *p;
+	u8 rev;
+	u8 busarb;
+	/* Ok we have a potential problem chipset here. Now see if we have
+	   a buggy southbridge */
+	   
+	p=pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, NULL);
+	if(p!=NULL)
+	{
+		pci_read_config_byte(p, PCI_CLASS_REVISION, &rev);
+		/* 0x40 - 0x4f == 686B, 0x10 - 0x2f == 686A; thanks Dan Hollis */
+		/* Check for buggy part revisions */
+		if (rev < 0x40 || rev > 0x42) 
+			return;
+	}
+	else
+	{
+		p = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL);
+		if(p==NULL)	/* No problem parts */
+			return;
+		pci_read_config_byte(p, PCI_CLASS_REVISION, &rev);
+		/* Check for buggy part revisions */
+		if (rev < 0x10 || rev > 0x12) 
+			return;
+	}
+	
+	/*
+	 *	Ok we have the problem. Now set the PCI master grant to 
+	 *	occur every master grant. The apparent bug is that under high
+	 *	PCI load (quite common in Linux of course) you can get data
+	 *	loss when the CPU is held off the bus for 3 bus master requests
+	 *	This happens to include the IDE controllers....
+	 *
+	 *	VIA only apply this fix when an SB Live! is present but under
+	 *	both Linux and Windows this isnt enough, and we have seen
+	 *	corruption without SB Live! but with things like 3 UDMA IDE
+	 *	controllers. So we ignore that bit of the VIA recommendation..
+	 */
+
+	pci_read_config_byte(dev, 0x76, &busarb);
+	/* Set bit 4 and bi 5 of byte 76 to 0x01 
+	   "Master priority rotation on every PCI master grant */
+	busarb &= ~(1<<5);
+	busarb |= (1<<4);
+	pci_write_config_byte(dev, 0x76, busarb);
+	printk(KERN_INFO "Applying VIA southbridge workaround.\n");
+}
+
+/*
+ * Fix some problems with 'movntq' copies on Athlons. We need to ensure the
+ * non functional memory stuff wasn't enabled by the BIOS (and thus fix
+ * crashes when we use 100% memory bandwidth)
+ *
+ * VIA 8363 chipset:
+ * VIA 8363,8622,8361 Northbridges:
+ *  - bits  5, 6, 7 at offset 0x55 need to be turned off
+ * VIA 8367 (KT266x) Northbridges:
+ *  - bits  5, 6, 7 at offset 0x95 need to be turned off
+ */
+
+__initfunc(static void pci_fixup_via_athlon_bug(struct pci_dev *d, int arg))
+{
+ 	u8 v;
+	int where = 0x55;
+
+	if (d->device == PCI_DEVICE_ID_VIA_8367_0) {
+	        where = 0x95; /* the memory write queue timer register is 
+                                different for the kt266x's: 0x95 not 0x55 */
+	}
+	pci_read_config_byte(d, where, &v);
+	if (v & 0xe0) {
+		printk("Trying to stomp on Athlon bug...\n");
+		v &= 0x1f; /* clear bits 5, 6, 7 */
+		pci_write_config_byte(d, where, v);
+	}
+}
+
 
 typedef void (*quirk_handler)(struct pci_dev *, int);
 
@@ -162,6 +252,7 @@
 #endif
 	{ quirk_passive_release,"Passive release enable" },
 	{ quirk_isa_dma_hangs,	"Work around ISA DMA hangs" },
+	{ pci_fixup_via_athlon_bug, "Athlon/VIA fixup" },
 };
 
 
@@ -201,7 +292,14 @@
 	 * This is the 82C586 variants.
 	 */
 	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C586_0,	quirk_isa_dma_hangs,	0x00 },
-	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C596_0,	quirk_isa_dma_hangs,	0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_82C596,	quirk_isa_dma_hangs,	0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	pci_fixup_via_athlon_bug, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8622,	        pci_fixup_via_athlon_bug, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8361,	        pci_fixup_via_athlon_bug, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8367_0,	pci_fixup_via_athlon_bug, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8363_0,	quirk_vialatency, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	PCI_DEVICE_ID_VIA_8371_1,	quirk_vialatency, 0x00 },
+	{ PCI_VENDOR_ID_VIA,	0x3112	/* Not out yet ? */,	quirk_vialatency, 0x00 },
 };
 
 __initfunc(void pci_quirks_init(void))
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/3w-xxxx.c linux.21p2/drivers/scsi/3w-xxxx.c
--- linux.vanilla/drivers/scsi/3w-xxxx.c	Sat Dec 29 16:57:22 2001
+++ linux.21p2/drivers/scsi/3w-xxxx.c	Sat Dec 29 03:11:00 2001
@@ -4,6 +4,7 @@
    Written By: Adam Radford <linux@3ware.com>
    Modifications By: Joel Jacobson <linux@3ware.com>
 		     Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+                     Brad Strand <linux@3ware.com>
 
    Copyright (C) 1999-2001 3ware Inc.
 
@@ -98,6 +99,11 @@
                  Fix possible null pointer dereference in tw_aen_drain_queue()
                  during initialization.
                  Clear pci parity errors during initialization and during io.
+   1.02.00.009 - Remove redundant increment in tw_state_request_start().
+                 Add ioctl support for direct ATA command passthru.
+                 Add entire aen code string list.
+   1.02.00.010 - Cleanup queueing code, fix jbod throughput.
+                 Fix get_param for specific units.
 */
 
 #include <linux/module.h>
@@ -149,7 +155,7 @@
 };
 
 /* Globals */
-char *tw_driver_version="1.02.00.008";
+char *tw_driver_version="1.02.00.010";
 TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT];
 int tw_device_extension_count = 0;
 
@@ -170,21 +176,17 @@
 	dprintk(KERN_NOTICE "3w-xxxx: tw_aen_complete(): Queue'd code 0x%x\n", aen);
 
 	/* Print some useful info when certain aen codes come out */
-	switch (aen & 0x0ff) {
-		case TW_AEN_APORT_TIMEOUT:
-			printk(KERN_WARNING "3w-xxxx: scsi%d: Received drive timeout AEN on port %d, check drive and drive cables.\n", tw_dev->host->host_no, aen >> 8);
-		break;
-		case TW_AEN_DRIVE_ERROR:
-			printk(KERN_WARNING "3w-xxxx: scsi%d: Received drive error AEN on port %d, check/replace cabling, or possible bad drive.\n", tw_dev->host->host_no, aen >> 8);
-			break;
-		case TW_AEN_SMART_FAIL:
-			printk(KERN_WARNING "3w-xxxx: scsi%d: Received S.M.A.R.T. threshold AEN on port %d, check drive/cooling, or possible bad drive.\n", tw_dev->host->host_no, aen >> 8);
-			break;
-		case TW_AEN_SBUF_FAIL:
-			printk(KERN_WARNING "3w-xxxx: scsi%d: Received SBUF integrity check failure AEN, reseat card or bad card.\n", tw_dev->host->host_no);
-			break;
-		default:
-			printk(KERN_WARNING "3w-xxxx: Received AEN 0x%x\n", aen);
+	if (aen == 0x0ff) {
+		printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: AEN queue overflow.\n", tw_dev->host->host_no);
+	} else {
+		if ((aen & 0x0ff) < TW_AEN_STRING_MAX) {
+			if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') {
+				printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: %s%d.\n", tw_dev->host->host_no, tw_aen_string[aen & 0xff], aen >> 8);
+			} else {
+				printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: %s.\n", tw_dev->host->host_no, tw_aen_string[aen & 0xff]);
+			}
+		} else
+			printk(KERN_WARNING "3w-xxxx: scsi%d: Received AEN %d.\n", tw_dev->host->host_no, aen);
 	}
 
 	tw_dev->aen_count++;
@@ -236,7 +238,7 @@
 	response_que_addr = tw_dev->registers.response_que_addr;
 
 	if (tw_poll_status(tw_dev, TW_STATUS_ATTENTION_INTERRUPT, 15)) {
-		printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): No attention interrupt for card %d\n", tw_device_extension_count);
+		dprintk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): No attention interrupt for card %d\n", tw_device_extension_count);
 		return 1;
 	}
 
@@ -292,7 +294,7 @@
 			mdelay(5);
 			status_reg_value = inl(status_reg_addr);
 			if (tw_check_bits(status_reg_value)) {
-				printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Unexpected bits.\n");
+				dprintk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Unexpected bits.\n");
 				tw_decode_bits(tw_dev, status_reg_value);
 				return 1;
 			}
@@ -309,7 +311,8 @@
 				if (command_packet->status != 0) {
 					if (command_packet->flags != TW_AEN_TABLE_UNDEFINED) {
 						/* Bad response */
-						printk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+						dprintk(KERN_WARNING "3w-xxxx: tw_aen_drain_queue(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+						tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 						return 1;
 					} else {
 						/* We know this is a 3w-1x00, and doesn't support aen's */
@@ -429,7 +432,7 @@
 
 	status_reg_value = inl(status_reg_addr);
 	if (tw_check_bits(status_reg_value)) {
-		printk(KERN_WARNING "3w-xxxx: tw_aen_read_queue(): Unexpected bits.\n");
+		dprintk(KERN_WARNING "3w-xxxx: tw_aen_read_queue(): Unexpected bits.\n");
 		tw_decode_bits(tw_dev, status_reg_value);
 		return 1;
 	}
@@ -527,11 +530,11 @@
 int tw_check_bits(u32 status_reg_value)
 {
 	if ((status_reg_value & TW_STATUS_EXPECTED_BITS) != TW_STATUS_EXPECTED_BITS) {  
-		printk(KERN_WARNING "3w-xxxx: tw_check_bits(): No expected bits (0x%x).\n", status_reg_value);
+		dprintk(KERN_WARNING "3w-xxxx: tw_check_bits(): No expected bits (0x%x).\n", status_reg_value);
 		return 1;
 	}
 	if ((status_reg_value & TW_STATUS_UNEXPECTED_BITS) != 0) {
-		printk(KERN_WARNING "3w-xxxx: tw_check_bits(): Found unexpected bits (0x%x).\n", status_reg_value);
+		dprintk(KERN_WARNING "3w-xxxx: tw_check_bits(): Found unexpected bits (0x%x).\n", status_reg_value);
 		return 1;
 	}
 
@@ -635,9 +638,13 @@
                 case 0x51:
                         printk(KERN_WARNING "3w-xxxx: scsi%d: Unrecoverable drive error on unit %d, check/replace cabling, or possible bad drive.\n", tw_dev->host->host_no, unit);
                         break;
-                }
+		default:
+			printk(KERN_WARNING "3w-xxxx: scsi%d: Controller error: status = 0x%x, flags = 0x%x, unit #%d.\n", tw_dev->host->host_no, status, flags, unit);
+		}
                 break;
-        }
+	default:
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Controller error: status = 0x%x, flags = 0x%x, unit #%d.\n", tw_dev->host->host_no, status, flags, unit);
+	}
 } /* End tw_decode_error() */
 
 /* This function will disable interrupts on the controller */  
@@ -662,7 +669,7 @@
 	status_reg_value = inl(status_reg_addr);
 
 	if (tw_check_bits(status_reg_value)) {
-		printk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 1.\n");
+		dprintk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 1.\n");
 		tw_decode_bits(tw_dev, status_reg_value);
 		return 1;
 	}
@@ -671,7 +678,7 @@
 		response_que_value = inl(response_que_addr);
 		status_reg_value = inl(status_reg_addr);
 		if (tw_check_bits(status_reg_value)) {
-			printk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 2.\n");
+			dprintk(KERN_WARNING "3w-xxxx: tw_empty_response_queue(): Unexpected bits 2.\n");
 			tw_decode_bits(tw_dev, status_reg_value);
 			return 1;
 		}
@@ -817,9 +824,20 @@
 				continue;
 			}
 
-			/* Calculate max cmds per lun */
-			if (tw_dev->num_units > 0)
-				tw_host->cmd_per_lun = (TW_Q_LENGTH-2)/tw_dev->num_units;
+			/* Calculate max cmds per lun, and setup queues */
+			if (tw_dev->num_units > 0) {
+				if ((tw_dev->num_raid_five > 0) && (tw_dev->tw_pci_dev->device == TW_DEVICE_ID)) {
+					tw_host->cmd_per_lun = (TW_MAX_BOUNCEBUF-1)/tw_dev->num_units;
+					tw_dev->free_head = TW_Q_START;
+					tw_dev->free_tail = TW_MAX_BOUNCEBUF - 1;
+					tw_dev->free_wrap = TW_MAX_BOUNCEBUF - 1;
+				} else {
+					tw_host->cmd_per_lun = (TW_Q_LENGTH-1)/tw_dev->num_units;
+					tw_dev->free_head = TW_Q_START;
+					tw_dev->free_tail = TW_Q_LENGTH - 1;
+					tw_dev->free_wrap = TW_Q_LENGTH - 1;
+				}
+			}
 			
 			/* Register the card with the kernel SCSI layer */
 			host = scsi_register(tw_host, sizeof(TW_Device_Extension));
@@ -890,18 +908,19 @@
 /* This function will free up device extension resources */
 void tw_free_device_extension(TW_Device_Extension *tw_dev)
 {
-	int i, imax;
-	imax = TW_Q_LENGTH;
+	int i;
 
 	dprintk(KERN_NOTICE "3w-xxxx: tw_free_device_extension()\n");
 	/* Free command packet and generic buffer memory */
-	for (i=0;i<imax;i++) {
+	for (i=0;i<TW_Q_LENGTH;i++) {
 		if (tw_dev->command_packet_virtual_address[i]) 
 			kfree(tw_dev->command_packet_virtual_address[i]);
 
 		if (tw_dev->alignment_virtual_address[i])
 			kfree(tw_dev->alignment_virtual_address[i]);
 
+	}
+	for (i=0;i<TW_MAX_BOUNCEBUF;i++) {
 		if (tw_dev->bounce_buffer[i])
 			kfree(tw_dev->bounce_buffer[i]);
 	}
@@ -913,7 +932,7 @@
 	int i;
 	
 	for (i=0;i<tw_device_extension_count;i++) {
-		printk(KERN_NOTICE "3w-xxxx: Notifying card #%d\n", i);
+		printk(KERN_NOTICE "3w-xxxx: Shutting down card %d.\n", i);
 		tw_shutdown_device(tw_device_extension_list[i]);
 	}
 	unregister_reboot_notifier(&tw_notifier);
@@ -972,7 +991,7 @@
 		mdelay(5);
 		status_reg_value = inl(status_reg_addr);
 		if (tw_check_bits(status_reg_value)) {
-			printk(KERN_WARNING "3w-xxxx: tw_initconnection(): Unexpected bits.\n");
+			dprintk(KERN_WARNING "3w-xxxx: tw_initconnection(): Unexpected bits.\n");
 			tw_decode_bits(tw_dev, status_reg_value);
 			return 1;
 		}
@@ -986,7 +1005,8 @@
 			}
 			if (command_packet->status != 0) {
 				/* bad response */
-				printk(KERN_WARNING "3w-xxxx: tw_initconnection(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				dprintk(KERN_WARNING "3w-xxxx: tw_initconnection(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 				return 1;
 			}
 			break;	/* Response was okay, so we exit */
@@ -1034,8 +1054,6 @@
 	tw_dev->num_units = 0;
 	tw_dev->num_aborts = 0;
 	tw_dev->num_resets = 0;
-	tw_dev->free_head = TW_Q_START;
-	tw_dev->free_tail = TW_Q_LENGTH - 1;
 	tw_dev->posted_request_count = 0;
 	tw_dev->max_posted_request_count = 0;
 	tw_dev->max_sgl_entries = 0;
@@ -1125,7 +1143,7 @@
 		mdelay(5);
 		status_reg_value = inl(status_reg_addr);
 		if (tw_check_bits(status_reg_value)) {
-			printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
+			dprintk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
 			tw_decode_bits(tw_dev, status_reg_value);
 			return 1;
 		}
@@ -1139,7 +1157,8 @@
 			}
 			if (command_packet->status != 0) {
 				/* bad response */
-				printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				dprintk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 				return 1;
 			}
 			found = 1;
@@ -1228,7 +1247,7 @@
 			mdelay(5);
 			status_reg_value = inl(status_reg_addr);
 			if (tw_check_bits(status_reg_value)) {
-				printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
+				dprintk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Unexpected bits.\n");
 				tw_decode_bits(tw_dev, status_reg_value);
 				return 1;
 			}
@@ -1242,7 +1261,8 @@
 				}
 				if (command_packet->status != 0) {
 				/* bad response */
-					printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+					dprintk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+					tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 					return 1;
 				}
 				found = 1;
@@ -1267,13 +1287,13 @@
 
 	/* Now allocate raid5 bounce buffers */
 	if ((num_raid_five != 0) && (tw_dev->tw_pci_dev->device == TW_DEVICE_ID)) {
-		for (i=0;i<TW_Q_LENGTH;i++) {
-			tw_allocate_memory(tw_dev, i, sizeof(TW_Sector)*128, 2);
+		for (i=0;i<TW_MAX_BOUNCEBUF;i++) {
+			tw_allocate_memory(tw_dev, i, sizeof(TW_Sector)*TW_MAX_SECTORS, 2);
 			if (tw_dev->bounce_buffer[i] == NULL) {
 				printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bounce buffer allocation failed.\n");
 				return 1;
 			}
-			memset(tw_dev->bounce_buffer[i], 0, sizeof(TW_Sector)*128);
+			memset(tw_dev->bounce_buffer[i], 0, sizeof(TW_Sector)*TW_MAX_SECTORS);
 		}
 	}
   
@@ -1330,7 +1350,7 @@
 			tw_state_request_start(tw_dev, &request_id);
 			error = tw_aen_read_queue(tw_dev, request_id);
 			if (error) {
-				printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Error reading aen queue.\n");
+				printk(KERN_WARNING "3w-xxxx: scsi%d: Error reading aen queue.\n", tw_dev->host->host_no);
 				tw_dev->state[request_id] = TW_S_COMPLETED;
 				tw_state_request_finish(tw_dev, request_id);
 			}
@@ -1342,7 +1362,7 @@
 			while (tw_dev->pending_request_count > 0) {
 				request_id = tw_dev->pending_queue[tw_dev->pending_head];
 				if (tw_dev->state[request_id] != TW_S_PENDING) {
-					printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Found request id that wasn't pending.\n");
+					printk(KERN_WARNING "3w-xxxx: scsi%d: Found request id that wasn't pending.\n", tw_dev->host->host_no);
 					break;
 				}
 				if (tw_post_command_packet(tw_dev, request_id)==0) {
@@ -1370,12 +1390,12 @@
 				command_packet = (TW_Command *)tw_dev->command_packet_virtual_address[request_id];
 				error = 0;
 				if (command_packet->status != 0) {
-					printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Bad response, status = 0x%x, flags = 0x%x, unit = 0x%x.\n", command_packet->status, command_packet->flags, command_packet->byte3.unit);
+					dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Bad response, status = 0x%x, flags = 0x%x, unit = 0x%x.\n", command_packet->status, command_packet->flags, command_packet->byte3.unit);
 					tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 					error = 1;
 				}
 				if (tw_dev->state[request_id] != TW_S_POSTED) {
-					printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Received a request id (%d) (opcode = 0x%x) that wasn't posted.\n", request_id, command_packet->byte0.opcode);
+					printk(KERN_WARNING "3w-xxxx: scsi%d: Received a request id (%d) (opcode = 0x%x) that wasn't posted.\n", tw_dev->host->host_no, request_id, command_packet->byte0.opcode);
 					error = 1;
 				}
 				if (TW_STATUS_ERRORS(status_reg_value)) {
@@ -1388,24 +1408,22 @@
 					dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Found internally posted command.\n");
 					error = tw_aen_complete(tw_dev, request_id);
 					if (error) {
-						printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Error completing aen.\n");
+						printk(KERN_WARNING "3w-xxxx: scsi%d: Error completing aen.\n", tw_dev->host->host_no);
 					}
 					status_reg_value = inl(status_reg_addr);
 					if (tw_check_bits(status_reg_value)) {
-						printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
+						dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
 						tw_decode_bits(tw_dev, status_reg_value);
 					}
 		} else {
 				switch (tw_dev->srb[request_id]->cmnd[0]) {
 					case READ_10:
-						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_10\n");
 					case READ_6:
-						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_6\n");
+						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught READ_10/READ_6\n");
 						break;
 					case WRITE_10:
-						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught WRITE_10\n");
 					case WRITE_6:
-						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught WRITE_6\n");
+						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught WRITE_10/WRITE_6\n");
 						break;
 					case INQUIRY:
 						dprintk(KERN_NOTICE "3w-xxxx: tw_interrupt(): caught INQUIRY\n");
@@ -1420,7 +1438,7 @@
 						error = tw_ioctl_complete(tw_dev, request_id);
 						break;
 					default:
-						printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unknown scsi opcode: 0x%x.\n", tw_dev->srb[request_id]->cmnd[0]);
+						printk(KERN_WARNING "3w-xxxx: scsi%d: Unknown scsi opcode: 0x%x.\n", tw_dev->host->host_no, tw_dev->srb[request_id]->cmnd[0]);
 						tw_dev->srb[request_id]->result = (DID_BAD_TARGET << 16);
 						tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
 					}
@@ -1438,7 +1456,7 @@
 					tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
 					status_reg_value = inl(status_reg_addr);
 					if (tw_check_bits(status_reg_value)) {
-						printk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
+						dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n");
 						tw_decode_bits(tw_dev, status_reg_value);
 					}
 				}
@@ -1458,6 +1476,7 @@
 	TW_Command *command_packet;
 	u32 param_value;
 	TW_Ioctl *ioctl = NULL;
+	TW_Passthru *passthru = NULL;
 	int tw_aen_code;
 
 	ioctl = (TW_Ioctl *)tw_dev->srb[request_id]->request_buffer;
@@ -1506,6 +1525,7 @@
 		case TW_OP_GET_PARAM:
 			dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl(): caught TW_OP_GET_PARAM.\n");
 			command_packet->byte0.opcode = TW_OP_GET_PARAM;
+			command_packet->byte3.unit = ioctl->unit_index;
 			param->table_id = ioctl->table_id;
 			param->parameter_id = ioctl->parameter_id;
 			param->parameter_size_bytes = ioctl->parameter_size_bytes;
@@ -1549,6 +1569,25 @@
 			tw_dev->srb[request_id]->result = (DID_OK << 16);
 			tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]);
 			return 0;
+		case TW_ATA_PASSTHRU:
+			if (ioctl->data != NULL) {
+				memcpy(command_packet, ioctl->data, sizeof(TW_Command));
+				command_packet->request_id = request_id;
+			} else {
+				printk(KERN_WARNING "3w-xxxx: tw_ioctl(): ioctl->data NULL.\n");
+				return 1;
+			}
+
+			passthru = (TW_Passthru *)tw_dev->command_packet_virtual_address[request_id];
+			passthru->sg_list[0].length = passthru->sector_count*512;
+			if (passthru->sg_list[0].length > TW_MAX_PASSTHRU_BYTES) {
+				printk(KERN_WARNING "3w-xxxx: tw_ioctl(): Passthru size (%ld) too big.\n", passthru->sg_list[0].length);
+				return 1;
+			}
+			passthru->sg_list[0].address = virt_to_bus(tw_dev->alignment_virtual_address[request_id]);
+			tw_post_command_packet(tw_dev, request_id);
+                        return 0;
+
 		case TW_CMD_PACKET:
 			if (ioctl->data != NULL) {
 				memcpy(command_packet, ioctl->data, sizeof(TW_Command));
@@ -1583,7 +1622,6 @@
 	command_packet->byte0.sgl_offset = 2;
 	command_packet->size = 4;
 	command_packet->request_id = request_id;
-	command_packet->byte3.unit = 0;
 	command_packet->byte3.host_id = 0;
 	command_packet->status = 0;
 	command_packet->flags = 0;
@@ -1601,7 +1639,10 @@
 	unsigned char *param_data;
 	unsigned char *buff;
 	TW_Param *param;
+	TW_Ioctl *ioctl = NULL;
+	TW_Passthru *passthru = NULL;
 
+	ioctl = (TW_Ioctl *)tw_dev->srb[request_id]->request_buffer;
 	dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl_complete()\n");
 	buff = tw_dev->srb[request_id]->request_buffer;
 	if (buff == NULL) {
@@ -1609,16 +1650,23 @@
 		return 1;
 	}
 	dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl_complete(): Request_bufflen = %d\n", tw_dev->srb[request_id]->request_bufflen);
-	memset(buff, 0, tw_dev->srb[request_id]->request_bufflen);
-	param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
-	if (param == NULL) {
-		printk(KERN_WARNING "3w-xxxx: tw_scsiop_read_capacity_complete(): Bad alignment virtual address.\n");
-		return 1;
-	}
-	param_data = &(param->data[0]);
-
-	memcpy(buff, param_data, tw_dev->ioctl_size[request_id]);
 
+	ioctl = (TW_Ioctl *)buff;
+	switch (ioctl->opcode) {
+		case TW_ATA_PASSTHRU:
+			passthru = (TW_Passthru *)ioctl->data;
+			memcpy(buff, tw_dev->alignment_virtual_address[request_id], passthru->sector_count * 512);
+			break;
+		default:
+			memset(buff, 0, tw_dev->srb[request_id]->request_bufflen);
+			param = (TW_Param *)tw_dev->alignment_virtual_address[request_id];
+			if (param == NULL) {
+				printk(KERN_WARNING "3w-xxxx: tw_ioctl_complete(): Bad alignment virtual address.\n");
+				return 1;
+			}
+			param_data = &(param->data[0]);
+			memcpy(buff, param_data, tw_dev->ioctl_size[request_id]);
+	}
 	return 0;
 } /* End tw_ioctl_complete() */
 
@@ -1646,7 +1694,7 @@
 		status_reg_value = inl(status_reg_addr);
 		do_gettimeofday(&timeout);
 		if (before.tv_sec + seconds < timeout.tv_sec) { 
-			printk(KERN_WARNING "3w-xxxx: tw_poll_status(): Flag 0x%x not found.\n", flag);
+			dprintk(KERN_WARNING "3w-xxxx: tw_poll_status(): Flag 0x%x not found.\n", flag);
 			return 1;
 		}
 		mdelay(1);
@@ -1667,7 +1715,7 @@
 	status_reg_value = inl(status_reg_addr);
 
 	if (tw_check_bits(status_reg_value)) {
-		printk(KERN_WARNING "3w-xxxx: tw_post_command_packet(): Unexpected bits.\n");
+		dprintk(KERN_WARNING "3w-xxxx: tw_post_command_packet(): Unexpected bits.\n");
 		tw_decode_bits(tw_dev, status_reg_value);
 	}
 
@@ -1711,7 +1759,7 @@
 	imax = TW_Q_LENGTH;
 
 	if (tw_reset_sequence(tw_dev)) {
-		printk(KERN_WARNING "3w-xxxx: tw_reset_device_extension(): Reset sequence failed for card %d.\n", tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no);
 		return 1;
 	}
 
@@ -1758,14 +1806,14 @@
 
 		error = tw_aen_drain_queue(tw_dev);
 		if (error) {
-			printk(KERN_WARNING "3w-xxxx: tw_reset_sequence(): No attention interrupt for card %d.\n", tw_dev->host->host_no);
+			printk(KERN_WARNING "3w-xxxx: scsi%d: Card not responding, retrying.\n", tw_dev->host->host_no);
 			tries++;
 			continue;
 		}
 
 		/* Check for controller errors */
 		if (tw_check_errors(tw_dev)) {
-			printk(KERN_WARNING "3w-xxxx: tw_reset_sequence(): Controller errors found, soft resetting card %d.\n", tw_dev->host->host_no);
+			printk(KERN_WARNING "3w-xxxx: scsi%d: Controller errors found, retrying.\n", tw_dev->host->host_no);
 			tries++;
 			continue;
 		}
@@ -1773,7 +1821,7 @@
 		/* Empty the response queue again */
 		error = tw_empty_response_que(tw_dev);
 		if (error) {
-			printk(KERN_WARNING "3w-xxxx: tw_reset_sequence(): Couldn't empty response queue for card %d.\n", tw_dev->host->host_no);
+			printk(KERN_WARNING "3w-xxxx: scsi%d: Couldn't empty response queue, retrying.\n", tw_dev->host->host_no);
 			tries++;
 			continue;
 		}
@@ -1783,13 +1831,13 @@
 	}
 
 	if (tries >= TW_MAX_RESET_TRIES) {
-		printk(KERN_WARNING "3w-xxxx: tw_reset_sequence(): Controller error or no attention interrupt: giving up for card %d.\n", tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Controller errors, card not responding, check all cabling.\n", tw_dev->host->host_no);
 		return 1;
 	}
 
 	error = tw_initconnection(tw_dev, TW_INIT_MESSAGE_CREDITS);
 	if (error) {
-		printk(KERN_WARNING "3w-xxxx: tw_reset_sequence(): Couldn't initconnection for card %d.\n", tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Connection initialization failed.\n", tw_dev->host->host_no);
 		return 1;
 	}
 
@@ -1879,14 +1927,14 @@
 	for (i=0;i<TW_Q_LENGTH;i++) {
 		if (tw_dev->srb[i] == SCpnt) {
 			if (tw_dev->state[i] == TW_S_STARTED) {
-				printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Abort succeeded for started Scsi_Cmnd 0x%x\n", (u32)tw_dev->srb[i]);
+				printk(KERN_WARNING "3w-xxxx: scsi%d: Command (0x%x) timed out.\n", tw_dev->host->host_no, (u32)SCpnt);
 				tw_dev->state[i] = TW_S_COMPLETED;
 				tw_state_request_finish(tw_dev, i);
 				spin_unlock(&tw_dev->tw_lock);
 				return (SUCCESS);
 			}
 			if (tw_dev->state[i] == TW_S_PENDING) {
-				printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Abort succeeded for pending Scsi_Cmnd 0x%x\n", (u32)tw_dev->srb[i]);
+				printk(KERN_WARNING "3w-xxxx: scsi%d: Command (0x%x) timed out.\n", tw_dev->host->host_no, (u32)SCpnt);
 				if (tw_dev->pending_head == TW_Q_LENGTH-1) {
 					tw_dev->pending_head = TW_Q_START;
 				} else {
@@ -1902,10 +1950,9 @@
 	}
 
 	/* If the command has already been posted, we have to reset the card */
-	printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Abort failed for unknown Scsi_Cmnd 0x%x, resetting card %d.\n", (u32)SCpnt, tw_dev->host->host_no);
-
+	printk(KERN_WARNING "3w-xxxx: scsi%d: Command (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, (u32)SCpnt);
 	if (tw_reset_device_extension(tw_dev)) {
-		printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Reset failed for card %d.\n", tw_dev->host->host_no);
+		dprintk(KERN_WARNING "3w-xxxx: tw_scsi_eh_abort(): Reset failed for card %d.\n", tw_dev->host->host_no);
 		spin_unlock(&tw_dev->tw_lock);
 		return (FAILED);
 	}
@@ -1943,11 +1990,11 @@
 
 	/* Now reset the card and some of the device extension data */
 	if (tw_reset_device_extension(tw_dev)) {
-		printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_reset(): Reset failed for card %d.\n", tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no);
 		spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
 		return (FAILED);
 	}
-	printk(KERN_WARNING "3w-xxxx: tw_scsi_eh_reset(): Reset succeeded for card %d.\n", tw_dev->host->host_no);
+	printk(KERN_WARNING "3w-xxxx: scsi%d: Reset succeeded.\n", tw_dev->host->host_no);
 	spin_unlock_irqrestore(&tw_dev->tw_lock, flags);
 
 	return (SUCCESS);
@@ -2060,13 +2107,10 @@
 
 	switch (*command) {
 		case READ_10:
-			dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): caught READ_10.\n");
 		case READ_6:
-			dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): caught READ_6.\n");
 		case WRITE_10:
-			dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): caught WRITE_10.\n");
 		case WRITE_6:
-			dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): caught WRITE_6.\n");
+			dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): caught READ/WRITE.\n");
 			error = tw_scsiop_read_write(tw_dev, request_id);
 			break;
 		case TEST_UNIT_READY:
@@ -2090,7 +2134,7 @@
 			error = tw_ioctl(tw_dev, request_id);
 			break;
 		default:
-			printk(KERN_NOTICE "3w-xxxx: tw_scsi_queue(): Unknown scsi opcode: 0x%x\n", *command);
+			printk(KERN_NOTICE "3w-xxxx: scsi%d: Unknown scsi opcode: 0x%x\n", tw_dev->host->host_no, *command);
 			tw_dev->state[request_id] = TW_S_COMPLETED;
 			tw_state_request_finish(tw_dev, request_id);
 			SCpnt->result = (DID_BAD_TARGET << 16);
@@ -2558,7 +2602,7 @@
 		mdelay(5);
 		status_reg_value = inl(status_reg_addr);
 		if (tw_check_bits(status_reg_value)) {
-			printk(KERN_WARNING "3w-xxxx: tw_setfeature(): Unexpected bits.\n");
+			dprintk(KERN_WARNING "3w-xxxx: tw_setfeature(): Unexpected bits.\n");
 			tw_decode_bits(tw_dev, status_reg_value);
 			return 1;
 		}
@@ -2572,7 +2616,8 @@
 			}
 			if (command_packet->status != 0) {
 				/* bad response */
-				printk(KERN_WARNING "3w-xxxx: tw_setfeature(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				dprintk(KERN_WARNING "3w-xxxx: tw_setfeature(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags);
+				tw_decode_error(tw_dev, command_packet->status, command_packet->flags, command_packet->byte3.unit);
 				return 1;
 			}
 			break; /* Response was okay, so we exit */
@@ -2592,7 +2637,7 @@
 	error = request_irq(tw_dev->tw_pci_dev->irq, tw_interrupt, SA_SHIRQ, device, tw_dev);
 
 	if (error < 0) {
-		printk(KERN_WARNING "3w-xxxx: tw_setup_irq(): Error requesting IRQ: %d for card %d.\n", tw_dev->tw_pci_dev->irq, tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Error requesting IRQ: %d.\n", tw_dev->host->host_no, tw_dev->tw_pci_dev->irq);
 		return 1;
 	}
 	return 0;
@@ -2610,9 +2655,9 @@
 	/* poke the board */
 	error = tw_initconnection(tw_dev, 1);
 	if (error) {
-		printk(KERN_WARNING "3w-xxxx: tw_shutdown_device(): Couldn't initconnection for card %d.\n", tw_dev->host->host_no);
+		printk(KERN_WARNING "3w-xxxx: scsi%d: Connection shutdown failed.\n", tw_dev->host->host_no);
 	} else {
-		printk(KERN_NOTICE "3w-xxxx shutdown succeeded\n");
+		printk(KERN_NOTICE "3w-xxxx: Shutdown complete.\n");
 	}
 
 	/* Re-enable interrupts */
@@ -2643,7 +2688,7 @@
 	dprintk(KERN_NOTICE "3w-xxxx: tw_state_request_finish()\n");
   
 	do {    
-		if (tw_dev->free_tail == TW_Q_LENGTH-1) {
+		if (tw_dev->free_tail == tw_dev->free_wrap) {
 			tw_dev->free_tail = TW_Q_START;
 		} else {
 			tw_dev->free_tail = tw_dev->free_tail + 1;
@@ -2667,23 +2712,14 @@
 
 	/* Obtain next free request_id */
 	do {
-		if (tw_dev->free_head == TW_Q_LENGTH - 1) {
+		if (tw_dev->free_head == tw_dev->free_wrap) {
 			tw_dev->free_head = TW_Q_START;
 		} else {
 			tw_dev->free_head = tw_dev->free_head + 1;
 		}
-	} while ((tw_dev->state[tw_dev->free_queue[tw_dev->free_head]] == TW_S_STARTED) ||
-		 (tw_dev->state[tw_dev->free_queue[tw_dev->free_head]] == TW_S_POSTED) ||
-		 (tw_dev->state[tw_dev->free_queue[tw_dev->free_head]] == TW_S_PENDING) ||
-		 (tw_dev->state[tw_dev->free_queue[tw_dev->free_head]] == TW_S_COMPLETED));
+	} while (tw_dev->state[tw_dev->free_queue[tw_dev->free_head]] & TW_START_MASK);
 
 	id = tw_dev->free_queue[tw_dev->free_head];
-
-	if (tw_dev->free_head == TW_Q_LENGTH - 1) {
-		tw_dev->free_head = TW_Q_START;
-	} else {
-		tw_dev->free_head = tw_dev->free_head + 1;
-	}
 
 	dprintk(KERN_NOTICE "3w-xxxx: tw_state_request_start(): id = %d.\n", id);
 	*request_id = id;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/3w-xxxx.h linux.21p2/drivers/scsi/3w-xxxx.h
--- linux.vanilla/drivers/scsi/3w-xxxx.h	Sat Dec 29 16:57:22 2001
+++ linux.21p2/drivers/scsi/3w-xxxx.h	Tue Jan  1 22:42:19 2002
@@ -4,6 +4,7 @@
    Written By: Adam Radford <linux@3ware.com>
    Modifications By: Joel Jacobson <linux@3ware.com>
 		     Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+                     Brad Strand <linux@3ware.com>
 
    Copyright (C) 1999-2001 3ware Inc.
 
@@ -57,6 +58,43 @@
 #include <linux/types.h>
 #include <linux/kdev_t.h>
 
+/* AEN strings */
+static char *tw_aen_string[] = {
+	"AEN queue empty",                      // 0x000
+	"Soft reset occurred",                  // 0x001
+	"Mirorr degraded: Unit #",              // 0x002
+	"Controller error",                     // 0x003
+	"Rebuild failed: Unit #",               // 0x004
+	"Rebuild complete: Unit #",             // 0x005
+	"Incomplete unit detected: Unit #",     // 0x006
+	"Initialization complete: Unit #",      // 0x007
+	"Unclean shutdown detected: Unit #",    // 0x008
+	"ATA port timeout: Port #",             // 0x009
+	"Drive error: Port #",                  // 0x00A
+	"Rebuild started: Unit #",              // 0x00B
+	"Initialization started: Unit #",       // 0x00C
+	"Logical unit deleted: Unit #",         // 0x00D
+	NULL,                                   // 0x00E unused
+	"SMART threshold exceeded: Port #",     // 0x00F
+	NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL, NULL, NULL, NULL,
+	NULL, NULL,                             // 0x010-0x020 unused
+	"ATA UDMA downgrade: Port #",           // 0x021
+	"ATA UDMA upgrade: Port #",             // 0x022
+	"Sector repair occurred: Port #",       // 0x023
+	"SBUF integrity check failure",         // 0x024
+	"Lost cached write: Port #",            // 0x025
+	"Drive ECC error detected: Port #",     // 0x026
+	"DCB checksum error: Port #",           // 0x027
+	"DCB unsupported version: Port #",      // 0x028
+	"Verify started: Unit #",               // 0x029
+	"Verify failed: Port #",                // 0x02A
+	"Verify complete: Unit #"               // 0x02B
+};
+
+#define TW_AEN_STRING_MAX                      0x02C
+
 /* Control register bit definitions */
 #define TW_CONTROL_CLEAR_HOST_INTERRUPT	       0x00080000
 #define TW_CONTROL_CLEAR_ATTENTION_INTERRUPT   0x00040000
@@ -114,6 +152,7 @@
 #define TW_OP_SECTOR_INFO     0x1a
 #define TW_OP_AEN_LISTEN      0x1c
 #define TW_CMD_PACKET         0x1d
+#define TW_ATA_PASSTHRU       0x1e
 
 /* Asynchronous Event Notification (AEN) Codes */
 #define TW_AEN_QUEUE_EMPTY       0x0000
@@ -137,7 +176,10 @@
 #define TW_INIT_COMMAND_PACKET_SIZE	      0x3
 #define TW_POLL_MAX_RETRIES        	      20000
 #define TW_MAX_SGL_LENGTH		      62
-#define TW_Q_LENGTH			      16
+#define TW_ATA_PASS_SGL_MAX                   60
+#define TW_MAX_PASSTHRU_BYTES                 4096
+#define TW_Q_LENGTH			      256
+#define TW_MAX_BOUNCEBUF                      16
 #define TW_Q_START			      0
 #define TW_MAX_SLOT			      32
 #define TW_MAX_PCI_BUSES		      255
@@ -149,6 +191,7 @@
 #define TW_MAX_AEN_TRIES                      100
 #define TW_UNIT_ONLINE                        1
 #define TW_IN_INTR                            1
+#define TW_MAX_SECTORS                        128
 #define TW_AEN_WAIT_TIME                      1000
 
 /* Macros */
@@ -222,6 +265,7 @@
 	unsigned short table_id;
 	unsigned char parameter_id;
 	unsigned char parameter_size_bytes;
+	unsigned char unit_index;
 	unsigned char data[1];
 } TW_Ioctl;
 
@@ -258,14 +302,42 @@
 	int position;
 } TW_Info;
 
-typedef enum TAG_TW_Cmd_State {
-	TW_S_INITIAL,		/* Initial state */
-	TW_S_STARTED,		/* Id in use */
-	TW_S_POSTED,		/* Posted to the controller */
-	TW_S_PENDING,		/* Waiting to be posted in isr */
-	TW_S_COMPLETED,		/* Completed by isr */
-	TW_S_FINISHED,		/* I/O completely done */
-} TW_Cmd_State;
+typedef int TW_Cmd_State;
+
+#define TW_S_INITIAL   0x1  /* Initial state */
+#define TW_S_STARTED   0x2  /* Id in use */
+#define TW_S_POSTED    0x4  /* Posted to the controller */
+#define TW_S_PENDING   0x8  /* Waiting to be posted in isr */
+#define TW_S_COMPLETED 0x10 /* Completed by isr */
+#define TW_S_FINISHED  0x20 /* I/O completely done */
+#define TW_START_MASK (TW_S_STARTED | TW_S_POSTED | TW_S_PENDING | TW_S_COMPLETED)
+
+/* Command header for ATA pass-thru */
+typedef struct TAG_TW_Passthru
+{
+	struct {
+		unsigned char opcode:5;
+		unsigned char sgloff:3;
+	} byte0;
+	unsigned char size;
+	unsigned char request_id;
+	struct {
+		unsigned char aport:4;
+		unsigned char host_id:4;
+	} byte3;
+	unsigned char status;
+	unsigned char flags;
+	unsigned short param;
+	unsigned short features;
+	unsigned short sector_count;
+	unsigned short sector_num;
+	unsigned short cylinder_lo;
+	unsigned short cylinder_hi;
+	unsigned char drive_head;
+	unsigned char command;
+	TW_SG_Entry sg_list[TW_ATA_PASS_SGL_MAX];
+	unsigned char padding[12];
+} TW_Passthru;
 
 typedef struct TAG_TW_Device_Extension {
 	TW_Registers		registers;
@@ -283,6 +355,7 @@
 	unsigned char		free_queue[TW_Q_LENGTH];
 	unsigned char		free_head;
 	unsigned char		free_tail;
+	unsigned char           free_wrap;
 	unsigned char		pending_queue[TW_Q_LENGTH];
 	unsigned char		pending_head;
 	unsigned char		pending_tail;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/53c7,8xx.c linux.21p2/drivers/scsi/53c7,8xx.c
--- linux.vanilla/drivers/scsi/53c7,8xx.c	Sun Mar 25 17:31:30 2001
+++ linux.21p2/drivers/scsi/53c7,8xx.c	Sat Dec 29 03:07:50 2001
@@ -239,6 +239,7 @@
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/system.h>
+#include <asm/processor.h>
 #include <linux/delay.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -1463,7 +1464,7 @@
       command |= PCI_COMMAND_MASTER|PCI_COMMAND_IO;
       pci_write_config_word(pdev, PCI_COMMAND, command);
 
-      if (io_port >= 0x10000000 && is_prep ) {
+      if (io_port >= 0x10000000 && (_machine == _MACH_prep)) {
 	      /* Mapping on PowerPC can't handle this! */
 	      unsigned long new_io_port;
 	      new_io_port = (io_port & 0x00FFFFFF) | 0x01000000;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/osst.c linux.21p2/drivers/scsi/osst.c
--- linux.vanilla/drivers/scsi/osst.c	Sat Dec 29 16:57:23 2001
+++ linux.21p2/drivers/scsi/osst.c	Tue Jan  1 21:13:48 2002
@@ -16,14 +16,14 @@
   Copyright 1992 - 2000 Kai Makisara
 		 email Kai.Makisara@metla.fi
 
-  $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $
+  $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.27 2001/11/01 21:03:42 riede Exp $
 
   Last modified: Wed Feb  2 22:04:05 2000 by makisara@kai.makisara.local
   Some small formal changes - aeb, 950809
 */
 
-static const char * cvsid = "$Id: osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $";
-const char * osst_version = "0.8.13";
+static const char * cvsid = "$Id: osst.c,v 1.28.2.27 2001/11/01 21:03:42 riede Exp $";
+const char * osst_version = "0.8.15";
 
 /* The "failure to reconnect" firmware bug */
 #define OSST_FW_NEED_POLL_MIN 10601 /*(107A)*/
@@ -245,11 +245,10 @@
 /* Wakeup from interrupt */
 static void osst_sleep_done (Scsi_Cmnd * SCpnt)
 {
-  unsigned int st_nbr;
+  unsigned int dev = TAPE_NR(SCpnt->request.rq_dev);
   OS_Scsi_Tape * STp;
 
-  if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < osst_template.nr_dev) {
-    STp = os_scsi_tapes[st_nbr];
+  if (os_scsi_tapes && (STp = os_scsi_tapes[dev])) {
     if ((STp->buffer)->writing &&
 	(SCpnt->sense_buffer[0] & 0x70) == 0x70 &&
 	(SCpnt->sense_buffer[2] & 0x40)) {
@@ -271,7 +270,7 @@
   }
 #if DEBUG
   else if (debugging)
-    printk(KERN_ERR "osst?:D: Illegal interrupt device %x\n", st_nbr);
+    printk(KERN_ERR "osst?:D: Illegal interrupt device %x\n", dev);
 #endif
 }
 
@@ -588,8 +587,10 @@
         *aSCpnt = SCpnt;
 	if (!SCpnt) return (-EBUSY);
 
-	while ( SCpnt->sense_buffer[2] == 2 && SCpnt->sense_buffer[12] == 4 &&
-		( SCpnt->sense_buffer[13] == 1 || SCpnt->sense_buffer[13] == 8 ) && 
+	while ((( SCpnt->sense_buffer[2]  == 2 && SCpnt->sense_buffer[12] == 4    &&
+		 (SCpnt->sense_buffer[13] == 1 || SCpnt->sense_buffer[13] == 8)    ) ||
+		( SCpnt->sense_buffer[2]  == 6 && SCpnt->sense_buffer[12] == 0x28 &&
+		  SCpnt->sense_buffer[13] == 0                                     )  ) && 
 		time_before(jiffies, startwait + timeout*HZ) ) {
 #if DEBUG
 	    if (debugging) {
@@ -623,6 +624,65 @@
 	return 0;
 }
 
+/*
+ * Wait for a tape to be inserted in the unit
+ */
+static int osst_wait_for_medium(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, unsigned timeout)
+{
+	unsigned char	cmd[MAX_COMMAND_SIZE];
+	Scsi_Cmnd  * SCpnt;
+	long		startwait = jiffies;
+#if DEBUG
+	int		dbg = debugging;
+	int		dev  = TAPE_NR(STp->devt);
+
+	printk(OSST_DEB_MSG "osst%d:D: Reached onstream wait for medium\n", dev);
+#endif
+
+	memset(cmd, 0, MAX_COMMAND_SIZE);
+	cmd[0] = TEST_UNIT_READY;
+
+	SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, 0, STp->timeout, MAX_READY_RETRIES, TRUE);
+	*aSCpnt = SCpnt;
+	if (!SCpnt) return (-EBUSY);
+
+	while ( SCpnt->sense_buffer[2]  == 2 && SCpnt->sense_buffer[12] == 0x3a &&
+	        SCpnt->sense_buffer[13] == 0 && time_before(jiffies, startwait + timeout*HZ) ) {
+#if DEBUG
+	    if (debugging) {
+		printk(OSST_DEB_MSG "osst%d:D: Sleeping in onstream wait medium\n", dev);
+		printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev);
+		debugging = 0;
+	    }
+#endif
+	    current->state = TASK_INTERRUPTIBLE;
+	    schedule_timeout(HZ / 10);
+
+	    memset(cmd, 0, MAX_COMMAND_SIZE);
+	    cmd[0] = TEST_UNIT_READY;
+
+	    SCpnt = osst_do_scsi(SCpnt, STp, cmd, 0, STp->timeout, MAX_READY_RETRIES, TRUE);
+	}
+	*aSCpnt = SCpnt;
+#if DEBUG
+	debugging = dbg;
+#endif
+	if ( SCpnt->sense_buffer[2]  != 2 &&
+	     SCpnt->sense_buffer[12] != 4 && SCpnt->sense_buffer[13] != 1) {
+#if DEBUG
+	    printk(OSST_DEB_MSG "osst%d:D: Abnormal exit from onstream wait medium\n", dev);
+	    printk(OSST_DEB_MSG "osst%d:D: Result = %d, Sense: 0=%02x, 2=%02x, 12=%02x, 13=%02x\n", dev,
+			SCpnt->result, SCpnt->sense_buffer[0], SCpnt->sense_buffer[2],
+			SCpnt->sense_buffer[12], SCpnt->sense_buffer[13]);
+#endif
+	    return 0;
+	}
+#if DEBUG
+	printk(OSST_DEB_MSG "osst%d:D: Normal exit from onstream wait medium\n", dev);
+#endif
+	return 1;
+}
+
 static int osst_position_tape_and_confirm(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int frame)
 {
 	int           retval;
@@ -661,7 +721,7 @@
 		result = osst_write_error_recovery(STp, aSCpnt, 0);
 
 	result |= osst_wait_ready(STp, aSCpnt, 5 * 60);
-	STp->ps[STp->partition].rw = ST_IDLE;
+	STp->ps[STp->partition].rw = OS_WRITING_COMPLETE;
 	return (result);
 }
 /*
@@ -1583,7 +1643,7 @@
 			       mt_count, last_mark_ppos);
 #endif
 		if (last_mark_ppos > 10 && last_mark_ppos < STp->eod_frame_ppos) {
-			osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);
+			osst_position_tape_and_confirm(STp, aSCpnt, last_mark_ppos);
 			if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
 #if DEBUG
 				printk(OSST_DEB_MSG
@@ -1615,7 +1675,7 @@
 #if DEBUG
 		printk(OSST_DEB_MSG "osst%d:D: Positioning to last mark at %d\n", dev, last_mark_ppos);
 #endif
-		osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0);
+		osst_position_tape_and_confirm(STp, aSCpnt, last_mark_ppos);
 		cnt++;
 		if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
 #if DEBUG
@@ -1740,7 +1800,7 @@
 #endif
 			return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count);
 		} else {
-			osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0);
+			osst_position_tape_and_confirm(STp, aSCpnt, next_mark_ppos);
 			if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
 #if DEBUG
 				printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n",
@@ -1780,7 +1840,7 @@
 #endif
 					return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count);
 				}
-				osst_set_frame_position(STp, aSCpnt, STp->first_mark_ppos, 0);
+				osst_position_tape_and_confirm(STp, aSCpnt, STp->first_mark_ppos);
 				if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
 #if DEBUG
 					printk(OSST_DEB_MSG
@@ -1812,7 +1872,7 @@
 #if DEBUG
 			else printk(OSST_DEB_MSG "osst%d:D: Positioning to next mark at %d\n", dev, next_mark_ppos);
 #endif
-			osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0);
+			osst_position_tape_and_confirm(STp, aSCpnt, next_mark_ppos);
 			cnt++;
 			if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) {
 #if DEBUG
@@ -2450,7 +2510,7 @@
 	}
 
 #if DEBUG
-        printk(KERN_INFO "osst%d:D: Block Size changed to 32.5K\n", dev);
+	printk(KERN_INFO "osst%d:D: Drive Block Size changed to 32.5K\n", dev);
          /*
          * In debug mode, we want to see as many errors as possible
          * to test the error recovery mechanism.
@@ -3356,6 +3416,7 @@
       if (transfer)
 	return transfer;
       STps->rw = ST_IDLE;
+      /* FIXME -- this may leave the tape without EOD and up2date headers */
     }
 
     if ((count % STp->block_size) != 0) {
@@ -3762,6 +3823,10 @@
          ioctl_result = osst_flush_write_buffer(STp, &SCpnt);
        else
 	 ioctl_result = 0;
+#if DEBUG
+       if (debugging) 
+	 printk(OSST_DEB_MSG "osst%d:D: Writing %ld filemark(s).\n", dev, arg);
+#endif
        for (i=0; i<arg; i++)
          ioctl_result |= osst_write_filemark(STp, &SCpnt);
        if (fileno >= 0) fileno += arg;
@@ -3781,14 +3846,9 @@
        cmd[4] = arg;
        timeout = STp->timeout;
 #if DEBUG
-       if (debugging) {
-	 if (cmd_in == MTWEOF)
-	    printk(OSST_DEB_MSG "osst%d:D: Writing %d filemarks.\n", dev,
-		  cmd[2] * 65536 + cmd[3] * 256 + cmd[4]);
-	 else
-	    printk(OSST_DEB_MSG "osst%d:D: Writing %d setmarks.\n", dev,
+       if (debugging) 
+	   printk(OSST_DEB_MSG "osst%d:D: Writing %d setmark(s).\n", dev,
 		  cmd[2] * 65536 + cmd[3] * 256 + cmd[4]);
-       }
 #endif
        if (fileno >= 0)
 	 fileno += arg;
@@ -3800,9 +3860,13 @@
      case MTUNLOAD:
      case MTRETEN:
        cmd[0] = START_STOP;
-	 cmd[1] = 1;		/* Don't wait for completion */
-       if (cmd_in == MTLOAD)
-	 cmd[4] = 1;		/* load */
+       cmd[1] = 1;		/* Don't wait for completion */
+       if (cmd_in == MTLOAD) {
+	  if (STp->ready == ST_NO_TAPE)
+	     cmd[4] = 4;		/* open tray */
+	  else
+	     cmd[4] = 1;		/* load */
+       }
        if (cmd_in == MTRETEN)
 	 cmd[4] = 3;		/* retension then mount */
        if (cmd_in == MTOFFL)
@@ -3940,7 +4004,7 @@
       printk(OSST_DEB_MSG "osst%d:D: IOCTL (%d) Result=%d\n", dev, cmd_in, ioctl_result);
 #endif
 
-   if (!ioctl_result) {
+	if (!ioctl_result) {				/* success */
 
       if (cmd_in == MTFSFM) {
 	 fileno--;
@@ -4017,6 +4081,8 @@
       if (cmd_in == MTLOCK)
 	 STp->door_locked = ST_LOCK_FAILS;
 
+      if (cmd_in == MTLOAD && osst_wait_for_medium(STp, &SCpnt, 60))
+	 ioctl_result = osst_wait_ready(STp, &SCpnt, 5 * 60);
    }
    *aSCpnt = SCpnt;
 
@@ -4171,7 +4237,7 @@
 	STp->nbr_partitions = 1;  /* This guess will be updated later if necessary */
       for (i=0; i < ST_NBR_PARTITIONS; i++) {
 	  STps = &(STp->ps[i]);
-	  STps->rw = ST_IDLE;			/* FIXME - seems to be redundant... */
+	  STps->rw = ST_IDLE;		/* FIXME - seems to be redundant... */
 	  STps->eof = ST_NOEOF;
 	  STps->at_sm = 0;
 	  STps->last_block_valid = FALSE;
@@ -4438,8 +4504,7 @@
       if (result != 0 && result != (-ENOSPC))
 	  goto out;
     }
-
-    if ( STps->rw == ST_WRITING && !(STp->device)->was_reset) {
+    if ( STps->rw >= ST_WRITING && !(STp->device)->was_reset) {
 
 #if DEBUG
       if (debugging) {
@@ -4449,15 +4514,17 @@
 	       dev, STp->nbr_waits, STp->nbr_finished);
       }
 #endif
-
-      result = osst_flush_drive_buffer(STp, &SCpnt);
-      if (result < 0) goto out;
-      result = osst_write_filemark(STp, &SCpnt);
-      if (result < 0) goto out;
-
-      if (STps->drv_file >= 0)
-	STps->drv_file++ ;
-      STps->drv_block = 0;
+      if (STp->write_type != OS_WRITE_NEW_MARK) {
+	/* true unless the user wrote the filemark for us */
+	result = osst_flush_drive_buffer(STp, &SCpnt);
+	if (result < 0) goto out;
+	result = osst_write_filemark(STp, &SCpnt);
+	if (result < 0) goto out;
+
+	if (STps->drv_file >= 0)
+	    STps->drv_file++ ;
+	STps->drv_block = 0;
+      }
 //osst_report_stats();
       result = osst_write_eod(STp, &SCpnt);
       osst_write_header(STp, &SCpnt, !(STp->rew_at_close));
@@ -4588,7 +4655,10 @@
 
    cmd_type = _IOC_TYPE(cmd_in);
    cmd_nr   = _IOC_NR(cmd_in);
-
+#if DEBUG
+   printk(OSST_DEB_MSG "osst%d:D: Ioctl %d,%d in %s mode\n", dev,
+			cmd_type, cmd_nr, STp->raw?"raw":"normal");
+#endif
    if (cmd_type == _IOC_TYPE(MTIOCTOP) && cmd_nr == _IOC_NR(MTIOCTOP)) {
      if (_IOC_SIZE(cmd_in) != sizeof(mtc))
        return (-EINVAL);
@@ -4660,8 +4730,8 @@
        }
      }
 
-     if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
-	 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTWSM &&
+     if (mtc.mt_op != MTNOP && mtc.mt_op != MTWEOF && mtc.mt_op != MTWSM &&
+	 mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTSETBLK &&
 	 mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART)
        STps->rw = ST_IDLE;  /* Prevent automatic WEOF and fsf */
 
@@ -4703,7 +4773,11 @@
        return 0;
      }
      if (mtc.mt_op == MTSEEK) {
-       i = osst_seek_sector(STp, &SCpnt, mtc.mt_count);
+       if (STp->raw) {
+	 i = osst_set_frame_position(STp, &SCpnt, mtc.mt_count, 0);
+	 STp->header_ok = 0;
+       } else
+	 i = osst_seek_sector(STp, &SCpnt, mtc.mt_count);
        if (SCpnt) scsi_release_command(SCpnt);
        if (!STp->can_partitions)
 	   STp->ps[0].rw = ST_IDLE;
@@ -4796,7 +4870,10 @@
    if (cmd_type == _IOC_TYPE(MTIOCPOS) && cmd_nr == _IOC_NR(MTIOCPOS)) {
      if (_IOC_SIZE(cmd_in) != sizeof(struct mtpos))
        return (-EINVAL);
-     blk = osst_get_sector(STp, &SCpnt);
+     if (STp->raw)
+       blk = osst_get_frame_position(STp, &SCpnt);
+     else
+       blk = osst_get_sector(STp, &SCpnt);
      if (SCpnt) scsi_release_command(SCpnt);
      if (blk < 0)
        return blk;
@@ -5289,6 +5366,7 @@
 
    tpnt->current_mode = 0;
    tpnt->modes[0].defined = TRUE;
+   tpnt->modes[2].defined = TRUE;
 
    tpnt->density_changed = tpnt->compression_changed =
      tpnt->blksize_changed = FALSE;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/osst.h linux.21p2/drivers/scsi/osst.h
--- linux.vanilla/drivers/scsi/osst.h	Sat Dec 29 16:57:23 2001
+++ linux.21p2/drivers/scsi/osst.h	Tue Jan  1 21:13:48 2002
@@ -1,5 +1,5 @@
 /*
- *	$Header: /home/cvsroot/Driver/osst.h,v 1.5.2.4 2001/01/26 01:30:56 riede Exp $
+ *	$Header: /home/cvsroot/Driver/osst.h,v 1.5.2.5 2001/10/11 00:28:20 riede Exp $
  */
 
 #include <linux/config.h>
@@ -517,3 +517,5 @@
 #define OS_WRITE_HEADER    4
 #define OS_WRITE_FILLER    5
 
+/* Additional rw state */
+#define OS_WRITING_COMPLETE 3
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sym53c8xx.c linux.21p2/drivers/scsi/sym53c8xx.c
--- linux.vanilla/drivers/scsi/sym53c8xx.c	Sat Dec 29 16:57:23 2001
+++ linux.21p2/drivers/scsi/sym53c8xx.c	Sat Dec 29 03:17:07 2001
@@ -10125,14 +10125,13 @@
 				if (i >= MAX_START*2)
 					i = 0;
 			}
-			assert(k != -1);
-			if (k != 1) {
+			if (k != -1) {
 				np->squeue[k] = np->squeue[i]; /* Idle task */
 				np->squeueput = k; /* Start queue pointer */
-				cp->host_status = HS_ABORTED;
-				cp->scsi_status = S_ILLEGAL;
-				ncr_complete(np, cp);
 			}
+			cp->host_status = HS_ABORTED;
+			cp->scsi_status = S_ILLEGAL;
+			ncr_complete(np, cp);
 		}
 		break;
 	/*
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sound/es1370.c linux.21p2/drivers/sound/es1370.c
--- linux.vanilla/drivers/sound/es1370.c	Sun Mar 25 17:37:37 2001
+++ linux.21p2/drivers/sound/es1370.c	Sun Dec 30 10:52:52 2001
@@ -2436,7 +2436,7 @@
 			if (file->f_flags & O_NONBLOCK) {
 				remove_wait_queue(&s->midi.owait, &wait);
 				set_current_state(TASK_RUNNING);
-				return -EBUSY;
+				break;
 			}
 			tmo = (count * HZ) / 3100;
 			if (!schedule_timeout(tmo ? : 1) && tmo)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sound/es1371.c linux.21p2/drivers/sound/es1371.c
--- linux.vanilla/drivers/sound/es1371.c	Sun Mar 25 17:37:37 2001
+++ linux.21p2/drivers/sound/es1371.c	Sun Dec 30 10:51:17 2001
@@ -3001,7 +3001,7 @@
 			if (file->f_flags & O_NONBLOCK) {
 				remove_wait_queue(&s->midi.owait, &wait);
 				set_current_state(TASK_RUNNING);
-				return -EBUSY;
+				break;
 			}
 			tmo = (count * HZ) / 3100;
 			if (!schedule_timeout(tmo ? : 1) && tmo)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sound/sonicvibes.c linux.21p2/drivers/sound/sonicvibes.c
--- linux.vanilla/drivers/sound/sonicvibes.c	Sun Mar 25 17:37:37 2001
+++ linux.21p2/drivers/sound/sonicvibes.c	Sun Dec 30 10:52:30 2001
@@ -2201,7 +2201,7 @@
 			if (file->f_flags & O_NONBLOCK) {
 				remove_wait_queue(&s->midi.owait, &wait);
 				set_current_state(TASK_RUNNING);
-				return -EBUSY;
+				break;
 			}
 			tmo = (count * HZ) / 3100;
 			if (!schedule_timeout(tmo ? : 1) && tmo)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/video/Makefile linux.21p2/drivers/video/Makefile
--- linux.vanilla/drivers/video/Makefile	Sun Mar 25 17:37:37 2001
+++ linux.21p2/drivers/video/Makefile	Tue Jan  1 21:25:14 2002
@@ -102,6 +102,10 @@
 
 ifeq ($(CONFIG_FB_ATY),y)
 L_OBJS += atyfb.o
+else
+  ifeq ($(CONFIG_FB_ATY),m)
+  M_OBJS += atyfb.o
+  endif
 endif
 
 ifeq ($(CONFIG_FB_ATY128),y)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/nfs/read.c linux.21p2/fs/nfs/read.c
--- linux.vanilla/fs/nfs/read.c	Sun Mar 25 17:37:38 2001
+++ linux.21p2/fs/nfs/read.c	Sat Dec 29 03:10:22 2001
@@ -420,7 +420,7 @@
 {
 	struct nfs_read_data	*data = (struct nfs_read_data *) task->tk_calldata;
 	struct inode		*inode = data->inode;
-	int			count = data->res.count;
+	unsigned int		count = data->res.count;
 
 	dprintk("NFS: %4d nfs_readpage_result, (status %d)\n",
 		task->tk_pid, task->tk_status);
@@ -431,10 +431,15 @@
 		struct page *page = req->wb_page;
 		nfs_list_remove_request(req);
 
-		if (task->tk_status >= 0 && count >= 0) {
+		if (task->tk_status >= 0) {
+			char *p = page_address(page);
+			if (count < PAGE_CACHE_SIZE) {
+				memset(p + count, 0, PAGE_CACHE_SIZE - count);
+				count = 0;
+			} else
+				count -= PAGE_CACHE_SIZE;
 			flush_dcache_page(page_address(page)); /* Is this correct? */
 			set_bit(PG_uptodate, &page->flags);
-			count -= PAGE_CACHE_SIZE;
 		} else
 			set_bit(PG_error, &page->flags);
 		nfs_unlock_page(page);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/proc/root.c linux.21p2/fs/proc/root.c
--- linux.vanilla/fs/proc/root.c	Sun Mar 25 17:30:58 2001
+++ linux.21p2/fs/proc/root.c	Sat Dec 29 03:21:08 2001
@@ -454,7 +454,7 @@
 
 	de = (struct proc_dir_entry *) inode->u.generic_ip;
 	if (!(page = (char*) __get_free_page(GFP_KERNEL)))
-		return NULL;
+		return ERR_PTR(-ENOMEM);
 
 	if (de->readlink_proc)
 		len = de->readlink_proc(de, page);
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-alpha/pci.h linux.21p2/include/asm-alpha/pci.h
--- linux.vanilla/include/asm-alpha/pci.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/asm-alpha/pci.h	Sat Dec 29 03:28:12 2001
@@ -3,7 +3,7 @@
 
 #include <linux/config.h>
 #include <linux/pci.h>
-
+#include <linux/errno.h>
 
 /*
  * The following structure is used to manage multiple PCI busses.
@@ -59,7 +59,7 @@
 	if (bus2hose[pdev->bus->number] == NULL)
 		return -ENXIO;
 
-	return bus2hose[pdev->bus->number]->pci_host_index;
+	return bus2hose[pdev->bus->number]->pci_hose_index;
 }
 
 #endif /* __ALPHA_PCI_H */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-i386/processor.h linux.21p2/include/asm-i386/processor.h
--- linux.vanilla/include/asm-i386/processor.h	Sun Mar 25 17:37:39 2001
+++ linux.21p2/include/asm-i386/processor.h	Tue Jan  1 21:15:26 2002
@@ -74,7 +74,7 @@
 #define X86_FEATURE_CMOV	0x00008000	/* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */
 #define X86_FEATURE_PAT	0x00010000	/* Page Attribute Table */
 #define X86_FEATURE_PSE36	0x00020000	/* 36-bit PSEs */
-#define X86_FEATURE_18		0x00040000
+#define X86_FEATURE_PN		0x00040000	/* Processor serial number */
 #define X86_FEATURE_19		0x00080000
 #define X86_FEATURE_20		0x00100000
 #define X86_FEATURE_21		0x00200000
@@ -106,6 +106,27 @@
 extern void dodgy_tsc(void);
 
 /*
+ * EFLAGS bits
+ */
+#define X86_EFLAGS_CF   0x00000001 /* Carry Flag */
+#define X86_EFLAGS_PF   0x00000004 /* Parity Flag */
+#define X86_EFLAGS_AF   0x00000010 /* Auxillary carry Flag */
+#define X86_EFLAGS_ZF   0x00000040 /* Zero Flag */
+#define X86_EFLAGS_SF   0x00000080 /* Sign Flag */
+#define X86_EFLAGS_TF   0x00000100 /* Trap Flag */
+#define X86_EFLAGS_IF   0x00000200 /* Interrupt Flag */
+#define X86_EFLAGS_DF   0x00000400 /* Direction Flag */
+#define X86_EFLAGS_OF   0x00000800 /* Overflow Flag */
+#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */
+#define X86_EFLAGS_NT   0x00004000 /* Nested Task */
+#define X86_EFLAGS_RF   0x00010000 /* Resume Flag */
+#define X86_EFLAGS_VM   0x00020000 /* Virtual Mode */
+#define X86_EFLAGS_AC   0x00040000 /* Alignment Check */
+#define X86_EFLAGS_VIF  0x00080000 /* Virtual Interrupt Flag */
+#define X86_EFLAGS_VIP  0x00100000 /* Virtual Interrupt Pending */
+#define X86_EFLAGS_ID   0x00200000 /* CPUID detection flag */
+
+/*
  *	Generic CPUID function
  */
 extern inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
@@ -120,6 +141,47 @@
 }
 
 /*
+ *  * CPUID functions returning a single datum
+ *   */
+extern inline unsigned int cpuid_eax(unsigned int op)
+{
+	unsigned int eax, ebx, ecx, edx;
+
+	__asm__("cpuid"
+		: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+		: "a" (op));
+	return eax;
+}
+
+extern inline unsigned int cpuid_ebx(unsigned int op)
+{
+	unsigned int eax, ebx, ecx, edx;
+
+	__asm__("cpuid"
+		: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+		: "a" (op));
+	return ebx;
+}
+extern inline unsigned int cpuid_ecx(unsigned int op)
+{
+	unsigned int eax, ebx, ecx, edx;
+
+	__asm__("cpuid"
+		: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+		: "a" (op));
+	return ecx;
+}
+extern inline unsigned int cpuid_edx(unsigned int op)
+{
+	unsigned int eax, ebx, ecx, edx;
+
+	__asm__("cpuid"
+		: "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+		: "a" (op));
+	return edx;
+}
+
+/*
  *      Cyrix CPU configuration register indexes
  */
 #define CX86_CCR0 0xc0
@@ -129,6 +191,7 @@
 #define CX86_CCR4 0xe8
 #define CX86_CCR5 0xe9
 #define CX86_CCR6 0xea
+#define CX86_CCR7 0xeb
 #define CX86_DIR0 0xfe
 #define CX86_DIR1 0xff
 #define CX86_ARR_BASE 0xc4
@@ -144,6 +207,39 @@
 	outb((reg), 0x22); \
 	outb((data), 0x23); \
 } while (0)
+
+/*
+ *  * Intel CPU features in CR4
+ *   */
+#define X86_CR4_VME     0x0001  /* enable vm86 extensions */
+#define X86_CR4_PVI     0x0002  /* virtual interrupts flag enable */
+#define X86_CR4_TSD     0x0004  /* disable time stamp at ipl 3 */
+#define X86_CR4_DE      0x0008  /* enable debugging extensions */
+#define X86_CR4_PSE     0x0010  /* enable page size extensions */
+#define X86_CR4_PAE     0x0020  /* enable physical address extensions */
+#define X86_CR4_MCE     0x0040  /* Machine check enable */
+#define X86_CR4_PGE     0x0080  /* enable global pages */
+#define X86_CR4_PCE     0x0100  /* enable performance counters at ipl 3 */
+#define X86_CR4_OSFXSR      0x0200  /* enable fast FPU save and restore */
+#define X86_CR4_OSXMMEXCPT  0x0400  /* enable unmasked SSE exceptions */
+
+/*
+ * Save the cr4 feature set we're using (ie
+ * Pentium 4MB enable and PPro Global page
+ * enable), so that any CPU's that boot up
+ * after us can get the correct flags.
+ */
+extern unsigned long mmu_cr4_features;
+
+static inline void set_in_cr4 (unsigned long mask)
+{
+	mmu_cr4_features |= mask;
+	__asm__("movl %%cr4,%%eax\n\t"
+		"orl %0,%%eax\n\t"
+		"movl %%eax,%%cr4\n"
+		: : "irg" (mask)
+		:"ax"); 
+}
 
 /*
  * Bus types (default is ISA, but people can check others with these..)
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/b1lli.h linux.21p2/include/linux/b1lli.h
--- linux.vanilla/include/linux/b1lli.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/b1lli.h	Tue Jan  1 21:22:32 2002
@@ -1,8 +1,9 @@
-/*
- * $Id: b1lli.h,v 1.8.8.2 2001/05/17 20:41:52 kai Exp $
+/* $Id: $
  *
  * ISDN lowlevel-module for AVM B1-card.
  *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
  *
  */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/b1pcmcia.h linux.21p2/include/linux/b1pcmcia.h
--- linux.vanilla/include/linux/b1pcmcia.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/b1pcmcia.h	Tue Jan  1 21:22:32 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: b1pcmcia.h,v 1.1.8.1 2001/05/17 20:41:52 kai Exp $
+/* $Id: $
  *
  * Exported functions of module b1pcmcia to be called by
  * avm_cs card services module.
  *
  * Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/capi.h linux.21p2/include/linux/capi.h
--- linux.vanilla/include/linux/capi.h	Sun Mar 25 17:37:40 2001
+++ linux.21p2/include/linux/capi.h	Tue Jan  1 21:22:32 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: capi.h,v 1.4 2000/06/12 09:20:20 kai Exp $
+/* $Id: capi.h,v 1.1.2.2 2001/12/31 13:41:12 kai Exp $
  * 
  * CAPI 2.0 Interface for Linux
  * 
  * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #ifndef __LINUX_CAPI_H__
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/concap.h linux.21p2/include/linux/concap.h
--- linux.vanilla/include/linux/concap.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/concap.h	Tue Jan  1 23:14:28 2002
@@ -1,5 +1,11 @@
-/* $Id: concap.h,v 1.2 1999/08/23 15:54:21 keil Exp $
-*/
+/* $Id: $
+ *
+ * Copyright 1997 by Henner Eisen <eis@baty.hanse.de>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
 #ifndef _LINUX_CONCAP_H
 #define _LINUX_CONCAP_H
 #ifdef __KERNEL__
@@ -10,15 +16,12 @@
 /* Stuff to support encapsulation protocols genericly. The encapsulation
    protocol is processed at the uppermost layer of the network interface.
 
-   (c) 1997 by Henner Eisen <eis@baty.hanse.de>
-   This software is subject to the GNU General Public License.
-
    Based on a ideas developed in a 'synchronous device' thread in the
    linux-x25 mailing list contributed by Alan Cox, Thomasz Motylewski
    and Jonathan Naylor.
 
    For more documetation on this refer to Documentation/isdn/README.concap
-   */
+*/
 
 struct concap_proto_ops;
 struct concap_device_ops;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/hysdn_if.h linux.21p2/include/linux/hysdn_if.h
--- linux.vanilla/include/linux/hysdn_if.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/hysdn_if.h	Tue Jan  1 21:22:32 2002
@@ -1,23 +1,13 @@
-/* $Id: hysdn_if.h,v 1.1.8.2 2001/05/17 20:41:52 kai Exp $
-
- * Linux driver for HYSDN cards, ioctl definitions shared by hynetmgr and driver.
- * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH
+/* $Id: $
  *
- * Copyright 1999  by Werner Cornelius (werner@titro.de)
+ * Linux driver for HYSDN cards
+ * ioctl definitions shared by hynetmgr and driver.
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Author    Werner Cornelius (werner@titro.de) for Hypercope GmbH
+ * Copyright 1999 by Werner Cornelius (werner@titro.de)
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/isdn.h linux.21p2/include/linux/isdn.h
--- linux.vanilla/include/linux/isdn.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/isdn.h	Tue Jan  1 23:14:28 2002
@@ -1,74 +1,22 @@
-/* $Id: isdn.h,v 1.111.6.3 2001/02/10 14:44:10 kai Exp $
-
+/* $Id: isdn.h,v 1.1.2.1 2001/12/31 13:26:52 kai Exp $
+ *
  * Main header for the Linux ISDN subsystem (linklevel).
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    by Thinking Objects Software GmbH Wuerzburg
  * Copyright 1995,96    by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
  * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-#ifndef isdn_h
-#define isdn_h
+#ifndef __ISDN_H__
+#define __ISDN_H__
 
-#include <linux/config.h>
+#include <linux/isdn_compat.h>
 #include <linux/ioctl.h>
 
-#define ISDN_TTY_MAJOR    43
-#define ISDN_TTYAUX_MAJOR 44
-#define ISDN_MAJOR        45
-
-/* The minor-devicenumbers for Channel 0 and 1 are used as arguments for
- * physical Channel-Mapping, so they MUST NOT be changed without changing
- * the correspondent code in isdn.c
- */
-
-#ifdef CONFIG_COBALT_MICRO_SERVER
-/* Save memory */
-#define ISDN_MAX_DRIVERS    2
-#define ISDN_MAX_CHANNELS   8
-#else
-#define ISDN_MAX_DRIVERS    32
-#define ISDN_MAX_CHANNELS   64
-#endif
-#define ISDN_MINOR_B        0
-#define ISDN_MINOR_BMAX     (ISDN_MAX_CHANNELS-1)
-#define ISDN_MINOR_CTRL     64
-#define ISDN_MINOR_CTRLMAX  (64 + (ISDN_MAX_CHANNELS-1))
-#define ISDN_MINOR_PPP      128
-#define ISDN_MINOR_PPPMAX   (128 + (ISDN_MAX_CHANNELS-1))
-#define ISDN_MINOR_STATUS   255
-
-#undef CONFIG_ISDN_WITH_ABC_CALLB
-#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK
-#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK_HANGUP
-#undef CONFIG_ISDN_WITH_ABC_UDP_CHECK_DIAL
-#undef CONFIG_ISDN_WITH_ABC_OUTGOING_EAZ
-#undef CONFIG_ISDN_WITH_ABC_LCR_SUPPORT
-#undef CONFIG_ISDN_WITH_ABC_IPV4_TCP_KEEPALIVE
-#undef CONFIG_ISDN_WITH_ABC_IPV4_DYNADDR
-#undef CONFIG_ISDN_WITH_ABC_RCV_NO_HUPTIMER
-#undef CONFIG_ISDN_WITH_ABC_ICALL_BIND
-#undef CONFIG_ISDN_WITH_ABC_CH_EXTINUSE
-#undef CONFIG_ISDN_WITH_ABC_CONN_ERROR
-#undef CONFIG_ISDN_WITH_ABC_RAWIPCOMPRESS
-#undef CONFIG_ISDN_WITH_ABC_IPTABLES_NETFILTER
-
-
 /* New ioctl-codes */
 #define IIOCNETAIF  _IO('I',1)
 #define IIOCNETDIF  _IO('I',2)
@@ -120,6 +68,7 @@
 #define ISDN_NET_ENCAP_CISCOHDLCK 6 /* With SLARP and keepalive    */
 #define ISDN_NET_ENCAP_X25IFACE   7 /* Documentation/networking/x25-iface.txt*/
 #define ISDN_NET_ENCAP_MAX_ENCAP  ISDN_NET_ENCAP_X25IFACE
+
 /* Facility which currently uses an ISDN-channel */
 #define ISDN_USAGE_NONE       0
 #define ISDN_USAGE_RAW        1
@@ -148,12 +97,6 @@
 } isdn_ioctl_struct;
 
 typedef struct {
-  unsigned long isdndev;
-  unsigned long atmodem[ISDN_MAX_CHANNELS];
-  unsigned long info[ISDN_MAX_CHANNELS];
-} debugvar_addr;
-
-typedef struct {
   char name[10];
   char phone[ISDN_MSNLEN];
   int  outgoing;
@@ -187,14 +130,15 @@
   int  dialmode;     /* Flag: off / on / auto                 */
 } isdn_net_ioctl_cfg;
 
-#define ISDN_NET_DIALMODE_MASK 0xC0  /* bits for status                   */
-#define  ISDN_NET_DM_OFF	0x00    /* this interface is stopped      */
-#define  ISDN_NET_DM_MANUAL	0x40    /* this interface is on (manual)  */
-#define  ISDN_NET_DM_AUTO	0x80    /* this interface is autodial     */
+#define ISDN_NET_DIALMODE_MASK  0xC0    /* bits for status                */
+#define ISDN_NET_DM_OFF	        0x00    /* this interface is stopped      */
+#define ISDN_NET_DM_MANUAL	0x40    /* this interface is on (manual)  */
+#define ISDN_NET_DM_AUTO	0x80    /* this interface is autodial     */
 #define ISDN_NET_DIALMODE(x) ((&(x))->flags & ISDN_NET_DIALMODE_MASK)
 
 #ifdef __KERNEL__
 
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/major.h>
@@ -218,6 +162,31 @@
 #include <linux/skbuff.h>
 #include <linux/tcp.h>
 
+#define ISDN_TTY_MAJOR    43
+#define ISDN_TTYAUX_MAJOR 44
+#define ISDN_MAJOR        45
+
+/* The minor-devicenumbers for Channel 0 and 1 are used as arguments for
+ * physical Channel-Mapping, so they MUST NOT be changed without changing
+ * the correspondent code in isdn.c
+ */
+
+#ifdef CONFIG_COBALT_MICRO_SERVER
+/* Save memory */
+#define ISDN_MAX_DRIVERS    2
+#define ISDN_MAX_CHANNELS   8
+#else
+#define ISDN_MAX_DRIVERS    32
+#define ISDN_MAX_CHANNELS   64
+#endif
+#define ISDN_MINOR_B        0
+#define ISDN_MINOR_BMAX     (ISDN_MAX_CHANNELS-1)
+#define ISDN_MINOR_CTRL     64
+#define ISDN_MINOR_CTRLMAX  (64 + (ISDN_MAX_CHANNELS-1))
+#define ISDN_MINOR_PPP      128
+#define ISDN_MINOR_PPPMAX   (128 + (ISDN_MAX_CHANNELS-1))
+#define ISDN_MINOR_STATUS   255
+
 #ifdef CONFIG_ISDN_PPP
 
 #ifdef CONFIG_ISDN_PPP_VJ
@@ -427,7 +396,7 @@
   struct device dev;               /* interface to upper levels        */
 #ifdef CONFIG_ISDN_PPP
   ippp_bundle * pb;		/* pointer to the common bundle structure
-   			         * with the the per-bundle data */
+   			         * with the per-bundle data */
 #endif
 #ifdef CONFIG_ISDN_X25
   struct concap_proto  *cprot; /* connection oriented encapsulation protocol */
@@ -668,4 +637,5 @@
 #define MIN(a,b) ((a<b)?a:b)
 #define MAX(a,b) ((a>b)?a:b)
 #endif /* __KERNEL__ */
-#endif /* isdn_h */
+
+#endif /* __ISDN_H__ */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/isdn_divertif.h linux.21p2/include/linux/isdn_divertif.h
--- linux.vanilla/include/linux/isdn_divertif.h	Sun Mar 25 17:31:05 2001
+++ linux.21p2/include/linux/isdn_divertif.h	Tue Jan  1 21:22:32 2002
@@ -1,22 +1,12 @@
-/* $Id: isdn_divertif.h,v 1.4 2000/05/11 22:29:22 kai Exp $
-
- * Header for the diversion supplementary interface for i4l.
+/* $Id: isdn_divertif.h,v 1.1.2.1 2001/12/31 13:26:52 kai Exp $
  *
- * Copyright 1998       by Werner Cornelius (werner@isdn4linux.de)
- * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
+ * Header for the diversion supplementary interface for i4l.
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * Author    Werner Cornelius (werner@titro.de)
+ * Copyright by Werner Cornelius (werner@titro.de)
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/isdn_ppp.h linux.21p2/include/linux/isdn_ppp.h
--- linux.vanilla/include/linux/isdn_ppp.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/isdn_ppp.h	Tue Jan  1 23:14:28 2002
@@ -1,9 +1,14 @@
-/* -*- mode: c; c-basic-offset: 2 -*- */
+/*
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
+ */
+
 
 #ifndef _LINUX_ISDN_PPP_H
 #define _LINUX_ISDN_PPP_H
 
-#include <linux/config.h>
+#include <linux/isdn_compat.h>
 
 #define CALLTYPE_INCOMING 0x1
 #define CALLTYPE_OUTGOING 0x2
@@ -47,13 +52,6 @@
 #define SC_LINK_DECOMP_DISCARD	0x40
 #define SC_LINK_COMP_DISCARD	0x80
 
-#define DECOMP_ERR_NOMEM	(-10)
-
-#define MP_END_FRAG    0x40
-#define MP_BEGIN_FRAG  0x80
-
-#define MP_MAX_QUEUE_LEN	16
-
 #define ISDN_PPP_COMP_MAX_OPTIONS 16
 
 #define IPPP_COMP_FLAG_XMIT 0x1
@@ -67,6 +65,17 @@
 };
 
 #ifdef __KERNEL__
+
+
+#include <linux/config.h>
+
+
+#define DECOMP_ERR_NOMEM	(-10)
+
+#define MP_END_FRAG    0x40
+#define MP_BEGIN_FRAG  0x80
+
+#define MP_MAX_QUEUE_LEN	16
 
 /*
  * We need a way for the decompressor to influence the generation of CCP
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/isdnif.h linux.21p2/include/linux/isdnif.h
--- linux.vanilla/include/linux/isdnif.h	Sun Mar 25 17:37:40 2001
+++ linux.21p2/include/linux/isdnif.h	Tue Jan  1 23:14:28 2002
@@ -1,32 +1,20 @@
-/* $Id: isdnif.h,v 1.37 2000/11/19 17:01:54 kai Exp $
-
- * Linux ISDN subsystem
+/* $Id: isdnif.h,v 1.1.2.1 2001/12/31 13:26:52 kai Exp $
  *
+ * Linux ISDN subsystem
  * Definition of the interface between the subsystem and its low-level drivers.
  *
  * Copyright 1994,95,96 by Fritz Elfert (fritz@isdn4linux.de)
  * Copyright 1995,96    Thinking Objects Software GmbH Wuerzburg
  * 
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
  *
  */
 
-#ifndef isdnif_h
-#define isdnif_h
+#ifndef __ISDNIF_H__
+#define __ISDNIF_H__
 
-#include <linux/config.h>
+#include <linux/isdn_compat.h>
 
 /*
  * Values for general protocol-selection
@@ -67,6 +55,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/config.h>
 #include <linux/skbuff.h>
 
 /***************************************************************************/
@@ -560,4 +549,5 @@
 #include <asm/uaccess.h>
 
 #endif /* __KERNEL__ */
-#endif /* isdnif_h */
+
+#endif /* __ISDNIF_H__ */
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/kernelcapi.h linux.21p2/include/linux/kernelcapi.h
--- linux.vanilla/include/linux/kernelcapi.h	Sun Mar 25 17:37:40 2001
+++ linux.21p2/include/linux/kernelcapi.h	Tue Jan  1 21:22:32 2002
@@ -1,10 +1,12 @@
-/*
- * $Id: kernelcapi.h,v 1.8.6.2 2001/02/07 11:31:31 kai Exp $
+/* $Id: kernelcapi.h,v 1.1.2.2 2001/12/31 13:41:12 kai Exp $
  * 
  * Kernel CAPI 2.0 Interface for Linux
  * 
  * (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
  * 
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ *
  */
 
 #ifndef __KERNELCAPI_H__
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/module.h linux.21p2/include/linux/module.h
--- linux.vanilla/include/linux/module.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/module.h	Tue Jan  1 22:33:45 2002
@@ -181,6 +181,8 @@
 	s	string
 */
 
+#define MODULE_LICENSE(var)
+
 #define MODULE_PARM(var,type)			\
 const char __module_parm_##var[]		\
 __attribute__((section(".modinfo"))) =		\
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/pci.h linux.21p2/include/linux/pci.h
--- linux.vanilla/include/linux/pci.h	Sat Dec 29 16:57:24 2001
+++ linux.21p2/include/linux/pci.h	Tue Jan  1 22:42:06 2002
@@ -830,7 +830,9 @@
 #define PCI_DEVICE_ID_TTI_HPT343	0x0003
 
 #define PCI_VENDOR_ID_VIA		0x1106
-#define PCI_DEVICE_ID_VIA_8371_0        0x0391
+#define PCI_DEVICE_ID_VIA_8363_0	0x0305
+#define PCI_DEVICE_ID_VIA_8371_0	0x0391
+#define PCI_DEVICE_ID_VIA_8501_0	0x0501
 #define PCI_DEVICE_ID_VIA_82C505	0x0505
 #define PCI_DEVICE_ID_VIA_82C561	0x0561
 #define PCI_DEVICE_ID_VIA_82C586_1	0x0571
@@ -838,18 +840,47 @@
 #define PCI_DEVICE_ID_VIA_82C585	0x0585
 #define PCI_DEVICE_ID_VIA_82C586_0	0x0586
 #define PCI_DEVICE_ID_VIA_82C595	0x0595
-#define PCI_DEVICE_ID_VIA_82C596_0	0x0596
+#define PCI_DEVICE_ID_VIA_82C596	0x0596
 #define PCI_DEVICE_ID_VIA_82C597_0	0x0597
-#define PCI_DEVICE_ID_VIA_82C598_0      0x0598
+#define PCI_DEVICE_ID_VIA_82C598_0	0x0598
+#define PCI_DEVICE_ID_VIA_8601_0	0x0601
+#define PCI_DEVICE_ID_VIA_8605_0	0x0605
+#define PCI_DEVICE_ID_VIA_82C680	0x0680
+#define PCI_DEVICE_ID_VIA_82C686	0x0686
+#define PCI_DEVICE_ID_VIA_82C691	0x0691
+#define PCI_DEVICE_ID_VIA_82C693	0x0693
+#define PCI_DEVICE_ID_VIA_82C693_1	0x0698
 #define PCI_DEVICE_ID_VIA_82C926	0x0926
-#define PCI_DEVICE_ID_VIA_82C416	0x1571
+#define PCI_DEVICE_ID_VIA_82C576_1	0x1571
 #define PCI_DEVICE_ID_VIA_82C595_97	0x1595
 #define PCI_DEVICE_ID_VIA_82C586_2	0x3038
 #define PCI_DEVICE_ID_VIA_82C586_3	0x3040
+#define PCI_DEVICE_ID_VIA_6305		0x3044
+#define PCI_DEVICE_ID_VIA_82C596_3	0x3050
+#define PCI_DEVICE_ID_VIA_82C596B_3	0x3051
+#define PCI_DEVICE_ID_VIA_82C686_4	0x3057
 #define PCI_DEVICE_ID_VIA_82C686_5	0x3058
+#define PCI_DEVICE_ID_VIA_8233_5	0x3059
+#define PCI_DEVICE_ID_VIA_8233_7	0x3065
+#define PCI_DEVICE_ID_VIA_82C686_6	0x3068
+#define PCI_DEVICE_ID_VIA_8233_0	0x3074
+#define PCI_DEVICE_ID_VIA_8233C_0	0x3109
+#define PCI_DEVICE_ID_VIA_8633_0	0x3091
+#define PCI_DEVICE_ID_VIA_8367_0	0x3099
+#define PCI_DEVICE_ID_VIA_8622          0x3102
+#define PCI_DEVICE_ID_VIA_8361          0x3112
 #define PCI_DEVICE_ID_VIA_86C100A	0x6100
+#define PCI_DEVICE_ID_VIA_8231		0x8231
+#define PCI_DEVICE_ID_VIA_8231_4	0x8235
+#define PCI_DEVICE_ID_VIA_8365_1	0x8305
+#define PCI_DEVICE_ID_VIA_8371_1	0x8391
+#define PCI_DEVICE_ID_VIA_8501_1	0x8501
 #define PCI_DEVICE_ID_VIA_82C597_1	0x8597
-#define PCI_DEVICE_ID_VIA_82C598_1      0x8598
+#define PCI_DEVICE_ID_VIA_82C598_1	0x8598
+#define PCI_DEVICE_ID_VIA_8601_1	0x8601
+#define PCI_DEVICE_ID_VIA_8505_1	0X8605
+#define PCI_DEVICE_ID_VIA_8633_1	0xB091
+#define PCI_DEVICE_ID_VIA_8367_1	0xB099
 
 #define PCI_VENDOR_ID_SMC2             0x1113
 #define PCI_DEVICE_ID_SMC2_1211TX      0x1211
@@ -1070,6 +1101,7 @@
 #define PCI_DEVICE_ID_AVM_A1		0x0a00
 #define PCI_DEVICE_ID_AVM_B1		0x0700
 #define PCI_DEVICE_ID_AVM_C4		0x0800
+#define PCI_DEVICE_ID_AVM_C2		0x1100
 #define PCI_DEVICE_ID_AVM_T1		0x1200
 
 #define PCI_VENDOR_ID_DIPIX		0x1246
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/sem.h linux.21p2/include/linux/sem.h
--- linux.vanilla/include/linux/sem.h	Sun Mar 25 17:31:03 2001
+++ linux.21p2/include/linux/sem.h	Sat Dec 29 03:49:30 2001
@@ -65,11 +65,11 @@
 #define SEMMNS  (SEMMNI*SEMMSL) /* ? max # of semaphores in system */
 #define SEMOPM  32	        /* ~ 100 max num of ops per semop call */
 #define SEMVMX  32767           /* semaphore maximum value */
+#define SEMAEM  SEMVMX          /* adjust on exit max value */
 
 /* unused */
 #define SEMUME  SEMOPM          /* max num of undo entries per process */
 #define SEMMNU  SEMMNS          /* num of undo structures system wide */
-#define SEMAEM  (SEMVMX >> 1)   /* adjust on exit max value */
 #define SEMMAP  SEMMNS          /* # of entries in semaphore map */
 #define SEMUSZ  20		/* sizeof struct sem_undo */
 
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/ipc/sem.c linux.21p2/ipc/sem.c
--- linux.vanilla/ipc/sem.c	Sun Mar 25 17:31:15 2001
+++ linux.21p2/ipc/sem.c	Sat Dec 29 03:21:48 2001
@@ -229,7 +229,19 @@
 		curr->sempid = (curr->sempid << 16) | pid;
 		curr->semval += sem_op;
 		if (sop->sem_flg & SEM_UNDO)
-			un->semadj[sop->sem_num] -= sem_op;
+		{
+			int undo = un->semadj[sop->sem_num] - sem_op;
+			/*
+			*      Exceeding the undo range is an error.
+			*/
+			if(undo < (-SEMAEM - 1) || undo > SEMAEM)
+			{
+				/* Don't undo the undo */
+				sop->sem_flg &= ~SEM_UNDO;
+				goto out_of_range;
+			}
+			un->semadj[sop->sem_num] = undo;
+		}
 
 		if (curr->semval < 0)
 			goto would_block;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/mm/page_alloc.c linux.21p2/mm/page_alloc.c
--- linux.vanilla/mm/page_alloc.c	Sun Mar 25 17:37:41 2001
+++ linux.21p2/mm/page_alloc.c	Sat Dec 29 03:11:56 2001
@@ -149,7 +149,8 @@
 	 * local since we must deal with fragmentation too and we
 	 * can't rely on the nr_local_pages information.
 	 */
-	if (current->nr_local_pages && !current->allocation_order)
+	if ((current->nr_local_pages && !current->allocation_order) ||
+	    in_interrupt())
 		goto back_local_freelist;
 
 	page = mem_map + map_nr;
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/mm/vmalloc.c linux.21p2/mm/vmalloc.c
--- linux.vanilla/mm/vmalloc.c	Sun Mar 25 17:31:02 2001
+++ linux.21p2/mm/vmalloc.c	Sat Dec 29 03:06:17 2001
@@ -132,7 +132,6 @@
 	unsigned long end = address + size;
 
 	dir = pgd_offset_k(address);
-	flush_cache_all();
 	while (address >= start && address < end) {
 		pmd_t *pmd;
 		pgd_t olddir = *dir;
@@ -147,6 +146,7 @@
 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
 		dir++;
 	}
+	flush_cache_all();
 	flush_tlb_all();
 	return 0;
 }
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/scripts/lxdialog/checklist.c linux.21p2/scripts/lxdialog/checklist.c
--- linux.vanilla/scripts/lxdialog/checklist.c	Sat Dec 29 16:57:25 2001
+++ linux.21p2/scripts/lxdialog/checklist.c	Tue Jan  1 21:23:32 2002
@@ -108,8 +108,8 @@
     print_button (dialog, "Select", y, x, selected == 0);
     print_button (dialog, " Help ", y, x + 14, selected == 1);
 
-    /*    wmove(dialog, y, x+1 + 14*selected);
-    wrefresh (dialog);*/
+    /*    wmove(dialog, y, x+1 + 14*selected);*/
+    wrefresh (dialog);
 }
 
 /*
