diff -u --recursive --new-file v2.1.85/linux/CREDITS linux/CREDITS
--- v2.1.85/linux/CREDITS	Wed Feb  4 11:35:59 1998
+++ linux/CREDITS	Tue Feb 10 12:37:42 1998
@@ -420,11 +420,11 @@
 S: Sweden
 
 N: Paal-Kristian Engstad
-E: engstad@funcom.com
+E: engstad@intermetrics.com
 D: Kernel smbfs (to mount WfW, NT and OS/2 network drives.)
-S: Oscars gt. 35
-S: N-0258 OSLO
-S: Norway
+S: 17101 Springdale Street #225
+S: Huntington Beach, California 92649
+S: USA
 
 N: Doug Evans
 E: dje@cygnus.com
@@ -1594,7 +1594,7 @@
 W: http://www.cs.helsinki.fi/~torvalds/
 P: 1024/A86B35C5 96 54 50 29 EC 11 44 7A  BE 67 3C 24 03 13 62 C8
 D: Original kernel hacker
-S: 3665 Benton Street #36
+S: 1050 Woodduck Avenue
 S: Santa Clara, California 95051
 S: USA
 
diff -u --recursive --new-file v2.1.85/linux/Documentation/filesystems/isofs.txt linux/Documentation/filesystems/isofs.txt
--- v2.1.85/linux/Documentation/filesystems/isofs.txt	Wed Feb  4 11:35:59 1998
+++ linux/Documentation/filesystems/isofs.txt	Mon Feb  9 16:12:54 1998
@@ -1,9 +1,5 @@
 Mount options that are the same as for msdos and vfat partitions.
 
-  conv=binary   Data is returned exactly as is, with CRLF's.  [default]
-  conv=text     (Carriage return, line feed) is replaced with newline.
-  conv=mtext    (Carriage return, line feed) is returned as is (?).
-  conv=auto     Chooses, file by file, conv=binary or conv=text (by guessing)
   gid=nnn	All files in the partition will be in group nnn.
   uid=nnn	All files in the partition will be owned by user id nnn.
   umask=nnn	The permission mask (see umask(1)) for the partition.
diff -u --recursive --new-file v2.1.85/linux/Documentation/stallion.txt linux/Documentation/stallion.txt
--- v2.1.85/linux/Documentation/stallion.txt	Fri Dec 19 12:30:53 1997
+++ linux/Documentation/stallion.txt	Wed Feb  4 14:52:16 1998
@@ -2,10 +2,10 @@
 Stallion Multiport Serial Driver Readme
 ---------------------------------------
 
-Copyright (C) 1994-1997,  Stallion Technologies (support@stallion.com).
+Copyright (C) 1994-1998,  Stallion Technologies (support@stallion.com).
 
-Version:   5.4.1
-Date:      19DEC97
+Version:   5.4.3
+Date:      04FEB98
 
 
 
@@ -20,7 +20,7 @@
 If you are using any of the Stallion intelligent multiport boards (Brumby,
 ONboard, EasyConnection 8/64 (ISA or EISA)) with Linux you will need to
 get the driver utility package. This package is available at most of the
-Linux archive sites (and on CD's that contain these archives). The file
+Linux archive sites (and on CD-ROMs that contain these archives). The file
 will be called stallion-X.X.X.tar.gz where X.X.X will be the version
 number. In particular this package contains the board embedded executable
 images that are required for these boards. It also contains the downloader
@@ -31,12 +31,12 @@
 have the latest version are tsx-11.mit.edu, sunsite.unc.edu and their
 mirrors.
 
-ftp.stallion.com:/drivers/ata5/Linux/stallion-5.4.0.tar.gz
-tsx-11.mit.edu:/pub/linux/BETA/serial/stallion/stallion-5.4.0.tar.gz
-sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-5.4.0.tar.gz
+ftp.stallion.com:/drivers/ata5/Linux/stallion-5.4.2.tar.gz
+tsx-11.mit.edu:/pub/linux/packages/stallion/stallion-5.4.2.tar.gz
+sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-5.4.2.tar.gz
 
 As of the printing of this document the latest version of the driver
-utility package is 5.4.0. If a later version is now available then you
+utility package is 5.4.2. If a later version is now available then you
 should use the latest version.
 
 If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
diff -u --recursive --new-file v2.1.85/linux/Makefile linux/Makefile
--- v2.1.85/linux/Makefile	Wed Feb  4 11:35:59 1998
+++ linux/Makefile	Mon Feb  9 13:31:00 1998
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 1
-SUBLEVEL = 85
+SUBLEVEL = 86
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
 
@@ -12,9 +12,6 @@
 # NOTE! SMP is experimental. See the file Documentation/SMP.txt
 #
 SMP = 1
-#
-# SMP profiling options
-# SMP_PROF = 1
 
 .EXPORT_ALL_VARIABLES:
 
@@ -97,11 +94,6 @@
 ifdef SMP
 CFLAGS += -D__SMP__
 AFLAGS += -D__SMP__
-
-ifdef SMP_PROF
-CFLAGS += -D__SMP_PROF__
-AFLAGS += -D__SMP_PROF__
-endif
 endif
 
 #
diff -u --recursive --new-file v2.1.85/linux/arch/alpha/config.in linux/arch/alpha/config.in
--- v2.1.85/linux/arch/alpha/config.in	Wed Feb  4 11:35:59 1998
+++ linux/arch/alpha/config.in	Fri Feb  6 10:06:55 1998
@@ -227,9 +227,6 @@
 source fs/nls/Config.in
 
 source drivers/char/Config.in
-if [ "$CONFIG_RTC" != "n" ]; then
-  bool '  ARC console time' CONFIG_RTC_ARC y
-fi
 
 mainmenu_option next_comment
 comment 'Sound'
diff -u --recursive --new-file v2.1.85/linux/arch/alpha/kernel/alpha_ksyms.c linux/arch/alpha/kernel/alpha_ksyms.c
--- v2.1.85/linux/arch/alpha/kernel/alpha_ksyms.c	Wed Feb  4 11:35:59 1998
+++ linux/arch/alpha/kernel/alpha_ksyms.c	Fri Feb  6 10:06:55 1998
@@ -56,6 +56,9 @@
 EXPORT_SYMBOL(_writeb);
 EXPORT_SYMBOL(_writew);
 EXPORT_SYMBOL(_writel);
+EXPORT_SYMBOL(_memcpy_fromio);
+EXPORT_SYMBOL(_memcpy_toio);
+EXPORT_SYMBOL(_memset_io);
 EXPORT_SYMBOL(insb);
 EXPORT_SYMBOL(insw);
 EXPORT_SYMBOL(insl);
@@ -101,9 +104,11 @@
 
 /* Networking helper routines. */
 EXPORT_SYMBOL(csum_tcpudp_magic);
-EXPORT_SYMBOL(ip_fast_csum);
 EXPORT_SYMBOL(ip_compute_csum);
+EXPORT_SYMBOL(ip_fast_csum);
 EXPORT_SYMBOL(csum_partial_copy);
+EXPORT_SYMBOL(csum_partial_copy_from_user);
+EXPORT_SYMBOL(csum_ipv6_magic);
 
 /*
  * The following are specially called from the uaccess assembly stubs.
diff -u --recursive --new-file v2.1.85/linux/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S
--- v2.1.85/linux/arch/alpha/kernel/entry.S	Fri Jan 30 11:28:05 1998
+++ linux/arch/alpha/kernel/entry.S	Fri Feb  6 10:06:55 1998
@@ -10,7 +10,7 @@
 #define rti	.long PAL_rti
 #define SIGCHLD	20
 
-#define NR_SYSCALLS 360
+#define NR_SYSCALLS 370
 #define osf_vfork sys_fork
 
 /*
@@ -529,7 +529,7 @@
 	lda	$4,NR_SYSCALLS($31)
 	stq	$16,SP_OFF+24($30)
 	lda	$5,sys_call_table
-	lda	$27,alpha_ni_syscall
+	lda	$27,sys_ni_syscall
 	cmpult	$0,$4,$4
 	ldq	$3,TASK_FLAGS($8)
 	stq	$17,SP_OFF+32($30)
@@ -854,7 +854,7 @@
 	.quad alpha_ni_syscall
 	.quad alpha_ni_syscall			/* 110 */
 	.quad sys_sigsuspend
-	.quad alpha_ni_syscall
+	.quad sys_ni_syscall
 	.quad sys_recvmsg
 	.quad sys_sendmsg
 	.quad alpha_ni_syscall			/* 115 */
@@ -1081,7 +1081,7 @@
 	.quad sys_sched_get_priority_max	/* 335 */
 	.quad sys_sched_get_priority_min
 	.quad sys_sched_rr_get_interval
-	.quad alpha_ni_syscall /* sys_afs_syscall */
+	.quad sys_ni_syscall			/* sys_afs_syscall */
 	.quad sys_newuname
 	.quad sys_nanosleep			/* 340 */
 	.quad sys_mremap
@@ -1101,8 +1101,15 @@
 	.quad sys_rt_sigtimedwait		/* 355 */
 	.quad sys_rt_sigqueueinfo
 	.quad sys_rt_sigsuspend
-	.quad alpha_ni_syscall
-	.quad alpha_ni_syscall
-	.quad alpha_ni_syscall
-	.quad alpha_ni_syscall
-	.quad alpha_ni_syscall			/* 360 */
+	.quad sys_select
+	.quad sys_gettimeofday
+	.quad sys_settimeofday			/* 360 */
+	.quad sys_getitimer
+	.quad sys_setitimer
+	.quad sys_utimes
+	.quad sys_getrusage
+	.quad sys_wait4				/* 365 */
+	.quad sys_ni_syscall
+	.quad sys_ni_syscall
+	.quad sys_ni_syscall
+	.quad sys_ni_syscall			/* 369 */
diff -u --recursive --new-file v2.1.85/linux/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
--- v2.1.85/linux/arch/alpha/kernel/traps.c	Sun Nov 30 10:59:02 1997
+++ linux/arch/alpha/kernel/traps.c	Fri Feb  6 10:06:55 1998
@@ -863,9 +863,9 @@
 				 unsigned long a4, unsigned long a5,
 				 struct pt_regs regs)
 {
-	/* Only report OSF system calls.  */
-	if (regs.r0 != 112 && regs.r0 < 300)
-		printk("<sc %ld(%lx,%lx,%lx)>", regs.r0, a0, a1, a2);
+	/* We only get here for OSF system calls, minus #112;
+	   the rest go to sys_ni_syscall.  */
+	printk("<sc %ld(%lx,%lx,%lx)>", regs.r0, a0, a1, a2);
 	return -ENOSYS;
 }
 
diff -u --recursive --new-file v2.1.85/linux/arch/alpha/lib/Makefile linux/arch/alpha/lib/Makefile
--- v2.1.85/linux/arch/alpha/lib/Makefile	Sun Nov 30 10:59:02 1997
+++ linux/arch/alpha/lib/Makefile	Fri Feb  6 10:06:55 1998
@@ -6,15 +6,8 @@
 	checksum.o csum_partial_copy.o strlen.o \
 	strcat.o strcpy.o strncat.o strncpy.o stxcpy.o stxncpy.o \
 	strchr.o strrchr.o \
-	copy_user.o clear_user.o strncpy_from_user.o strlen_user.o
-
-ifeq ($(CONFIG_IPV6),y)
-  OBJS += csum_ipv6_magic.o
-else
-  ifeq ($(CONFIG_IPV6),m)
-    OBJS += csum_ipv6_magic.o
-  endif
-endif
+	copy_user.o clear_user.o strncpy_from_user.o strlen_user.o \
+	csum_ipv6_magic.o
 
 lib.a: $(OBJS)
 	$(AR) rcs lib.a $(OBJS)
diff -u --recursive --new-file v2.1.85/linux/arch/arm/kernel/irq.c linux/arch/arm/kernel/irq.c
--- v2.1.85/linux/arch/arm/kernel/irq.c	Tue Jan 20 16:39:41 1998
+++ linux/arch/arm/kernel/irq.c	Mon Feb  9 13:31:00 1998
@@ -35,10 +35,6 @@
 #include <asm/irq-no.h>
 #include <asm/arch/irq.h>
 
-#ifdef __SMP_PROF__
-extern volatile unsigned long smp_local_timer_ticks[1+NR_CPUS];
-#endif
-
 unsigned int local_irq_count[NR_CPUS];
 #ifdef __SMP__
 atomic_t __arm_bh_counter;
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/entry.S linux/arch/i386/kernel/entry.S
--- v2.1.85/linux/arch/i386/kernel/entry.S	Fri Jan 23 18:10:31 1998
+++ linux/arch/i386/kernel/entry.S	Mon Feb  9 11:27:08 1998
@@ -366,7 +366,7 @@
 	.long SYMBOL_NAME(sys_time)
 	.long SYMBOL_NAME(sys_mknod)
 	.long SYMBOL_NAME(sys_chmod)		/* 15 */
-	.long SYMBOL_NAME(sys_chown)
+	.long SYMBOL_NAME(sys_lchown)
 	.long SYMBOL_NAME(sys_ni_syscall)				/* old break syscall holder */
 	.long SYMBOL_NAME(sys_stat)
 	.long SYMBOL_NAME(sys_lseek)
@@ -532,7 +532,7 @@
 	.long SYMBOL_NAME(sys_rt_sigsuspend)
 	.long SYMBOL_NAME(sys_pread)		/* 180 */
 	.long SYMBOL_NAME(sys_pwrite)
-	.long SYMBOL_NAME(sys_lchown);
+	.long SYMBOL_NAME(sys_chown)
 	
 	.rept NR_syscalls-182
 		.long SYMBOL_NAME(sys_ni_syscall)
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/head.S linux/arch/i386/kernel/head.S
--- v2.1.85/linux/arch/i386/kernel/head.S	Tue Dec 23 10:45:12 1997
+++ linux/arch/i386/kernel/head.S	Mon Feb  9 17:51:19 1998
@@ -11,7 +11,6 @@
 #include <linux/tasks.h>
 #include <linux/linkage.h>
 #include <asm/segment.h>
-#include <linux/config.h>
 
 #define CL_MAGIC_ADDR	0x90020
 #define CL_MAGIC	0xA33F
@@ -423,11 +422,7 @@
  * of tasks we can have..
  */
 #define IDT_ENTRIES	256
-#ifdef CONFIG_APM
-#define GDT_ENTRIES	(11+2*NR_TASKS)
-#else
-#define GDT_ENTRIES	(8+2*NR_TASKS)
-#endif
+#define GDT_ENTRIES	(12+2*NR_TASKS)
 
 
 .globl SYMBOL_NAME(idt)
@@ -637,9 +632,8 @@
 	.quad 0x00cff2000000ffff	/* 0x2b user   4GB data at 0x00000000 */
 	.quad 0x0000000000000000	/* not used */
 	.quad 0x0000000000000000	/* not used */
+	.quad 0x00c0920000000000	/* 0x40 APM set up for bad BIOS's */
+	.quad 0x00c09a0000000000	/* 0x48 APM CS    code */
+	.quad 0x00809a0000000000	/* 0x50 APM CS 16 code (16 bit) */
+	.quad 0x00c0920000000000	/* 0x58 APM DS    data */
 	.fill 2*NR_TASKS,8,0		/* space for LDT's and TSS's etc */
-#ifdef CONFIG_APM
-	.quad 0x00c09a0000000000	/* APM CS    code */
-	.quad 0x00809a0000000000	/* APM CS 16 code (16 bit) */
-	.quad 0x00c0920000000000	/* APM DS    data */
-#endif
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/io_apic.c linux/arch/i386/kernel/io_apic.c
--- v2.1.85/linux/arch/i386/kernel/io_apic.c	Wed Feb  4 11:36:00 1998
+++ linux/arch/i386/kernel/io_apic.c	Mon Feb  9 14:22:57 1998
@@ -191,10 +191,12 @@
 {
 	int i;
 
-	for (i=mp_irq_entries-1; i>=0; i--) {
-		if (mp_irqs[i].mpc_dstirq == pin)
+	for (i=0; i<mp_irq_entries; i++)
+		if ( (mp_irqs[i].mpc_irqtype == 0x00) &&
+			(mp_irqs[i].mpc_dstirq == pin))
+
 			return i;
-	}
+
 	return -1;
 }
 
@@ -397,11 +399,11 @@
 	for (i=0; i<mp_irq_entries; i++) {
 		int lbus = mp_irqs[i].mpc_srcbus;
 
-		if (IO_APIC_IRQ(i) &&
+		if (IO_APIC_IRQ(mp_irqs[i].mpc_dstirq) &&
 		    (mp_bus_id_to_type[lbus] == MP_BUS_PCI) &&
 		    !mp_irqs[i].mpc_irqtype &&
-		    (bus == mp_irqs[i].mpc_srcbus) &&
-		    (slot == (mp_irqs[i].mpc_srcbusirq >> 2)) &&
+		    (bus == mp_bus_id_to_pci_bus[mp_irqs[i].mpc_srcbus]) &&
+		    (slot == ((mp_irqs[i].mpc_srcbusirq >> 2) & 0x1f)) &&
 		    (pci_pin == (mp_irqs[i].mpc_srcbusirq & 3)))
 
 			return mp_irqs[i].mpc_dstirq;
@@ -409,6 +411,30 @@
 	return -1;
 }
 
+/*
+ * There is a nasty bug in some older SMP boards, their mptable lies
+ * about the timer IRQ. We do the following to work around the situation:
+ *
+ *	- timer IRQ defaults to IO-APIC IRQ
+ *	- if this function detects that timer IRQs are defunct, then we fall
+ *	  back to ISA timer IRQs
+ */
+static int timer_irq_works (void)
+{
+	unsigned int t1=jiffies;
+	unsigned long flags;
+
+	save_flags(flags);
+	sti();
+
+	udelay(100*1000);
+
+	if (jiffies-t1>1)
+		return 1;
+
+	return 0;
+}
+
 void print_IO_APIC (void)
 {
 	int i;
@@ -506,6 +532,8 @@
 struct ioapic_list_entry ioapic_whitelist [] = {
 
 	{ "INTEL   "	, 	"PR440FX     "	},
+	{ "INTEL   "	,	"82440FX     "	},
+	{ "AIR     "	,	"KDI         "	},
 	{ 0		,	0		}
 };
 
@@ -527,7 +555,15 @@
 
 static int ioapic_whitelisted (void)
 {
+/*
+ * Right now, whitelist everything to see whether the new parsing
+ * routines really do work for everybody..
+ */
+#if 1
+	return 1;
+#else
 	return in_ioapic_list(ioapic_whitelist);
+#endif
 }
 
 static int ioapic_blacklisted (void)
@@ -579,7 +615,7 @@
 		pirqs_enabled)
 	{
 		printk("ENABLING IO-APIC IRQs\n");
-		io_apic_irqs = ~((1<<0)|(1<<2)|(1<<13));
+		io_apic_irqs = ~((1<<2)|(1<<13));
 	} else {
 		if (ioapic_blacklisted())
 			printk(" blacklisted board, DISABLING IO-APIC IRQs\n");
@@ -592,6 +628,14 @@
 
 	init_IO_APIC_traps();
 	setup_IO_APIC_irqs ();
+
+	if (!timer_irq_works ()) {
+		make_8259A_irq(0);
+		if (!timer_irq_works ())
+			panic("IO-APIC + timer doesnt work!");
+		printk("..MP-BIOS bug: i8254 timer not connected to IO-APIC\n");
+		printk("..falling back to 8259A-based timer interrupt\n");
+	}
 
 	printk("nr of MP irq sources: %d.\n", mp_irq_entries);
 	printk("nr of IOAPIC registers: %d.\n", nr_ioapic_registers);
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/irq.c linux/arch/i386/kernel/irq.c
--- v2.1.85/linux/arch/i386/kernel/irq.c	Wed Feb  4 11:36:00 1998
+++ linux/arch/i386/kernel/irq.c	Mon Feb  9 11:19:39 1998
@@ -719,6 +719,14 @@
 	irq_handles[irq]->enable(irq);
 }
 
+void make_8259A_irq (unsigned int irq)
+{
+	io_apic_irqs &= ~(1<<irq);
+	irq_handles[irq] = &i8259A_irq_type;
+	disable_irq(irq);
+	enable_irq(irq);
+}
+
 /*
  * Careful! The 8259A is a fragile beast, it pretty
  * much _has_ to be done exactly like this (mask it
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/irq.h linux/arch/i386/kernel/irq.h
--- v2.1.85/linux/arch/i386/kernel/irq.h	Wed Feb  4 11:36:00 1998
+++ linux/arch/i386/kernel/irq.h	Mon Feb  9 11:19:39 1998
@@ -18,6 +18,7 @@
 void setup_IO_APIC (void);
 void init_IO_APIC_traps(void);
 int IO_APIC_get_PCI_irq_vector (int bus, int slot, int fn);
+void make_8259A_irq (unsigned int irq);
 
 #ifdef __SMP__
  extern unsigned int io_apic_irqs;
@@ -34,6 +35,7 @@
 	MP_BUS_PCI
 };
 extern int mp_bus_id_to_type [MAX_MP_BUSSES];
+extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES];
 extern char ioapic_OEM_ID [16];
 extern char ioapic_Product_ID [16];
 
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/signal.c linux/arch/i386/kernel/signal.c
--- v2.1.85/linux/arch/i386/kernel/signal.c	Tue Dec 30 07:58:00 1997
+++ linux/arch/i386/kernel/signal.c	Fri Feb  6 16:29:04 1998
@@ -365,21 +365,33 @@
 	/* non-iBCS2 extensions.. */
 	__put_user(mask, &sc->oldmask);
 	__put_user(current->tss.cr2, &sc->cr2);
-}	
+}
+
+/*
+ * Determine which stack to use..
+ */
+static inline unsigned long sigstack_esp(struct k_sigaction *ka, struct pt_regs * regs)
+{
+	unsigned long esp;
+
+	/* Default to using normal stack */
+	esp = regs->esp;
+
+	/* This is the legacy signal stack switching. */
+	if ((regs->xss & 0xffff) != __USER_DS &&
+	    !(ka->sa.sa_flags & SA_RESTORER) &&
+	    ka->sa.sa_restorer)
+		esp = (unsigned long) ka->sa.sa_restorer;
+
+	return esp;
+}
 
 static void setup_frame(int sig, struct k_sigaction *ka,
 			sigset_t *set, struct pt_regs * regs)
 {
 	struct sigframe *frame;
 
-	frame = (struct sigframe *)((regs->esp - sizeof(*frame)) & -8);
-
-	/* XXX: Check here if we need to switch stacks.. */
-
-	/* This is legacy signal stack switching.  */
-	if ((regs->xss & 0xffff) != __USER_DS
-	    && !(ka->sa.sa_flags & SA_RESTORER) && ka->sa.sa_restorer)
-		frame = (struct sigframe *) ka->sa.sa_restorer;
+	frame = (struct sigframe *)((sigstack_esp(ka, regs) - sizeof(*frame)) & -8);
 
 	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 		goto segv_and_exit;
@@ -441,14 +453,7 @@
 {
 	struct rt_sigframe *frame;
 
-	frame = (struct rt_sigframe *)((regs->esp - sizeof(*frame)) & -8);
-
-	/* XXX: Check here if we need to switch stacks.. */
-
-	/* This is legacy signal stack switching.  */
-	if ((regs->xss & 0xffff) != __USER_DS
-	    && !(ka->sa.sa_flags & SA_RESTORER) && ka->sa.sa_restorer)
-		frame = (struct rt_sigframe *) ka->sa.sa_restorer;
+	frame = (struct rt_sigframe *)((sigstack_esp(ka, regs) - sizeof(*frame)) & -8);
 
 	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 		goto segv_and_exit;
diff -u --recursive --new-file v2.1.85/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- v2.1.85/linux/arch/i386/kernel/smp.c	Wed Feb  4 11:36:00 1998
+++ linux/arch/i386/kernel/smp.c	Fri Feb  6 16:30:04 1998
@@ -52,6 +52,8 @@
 
 #include "irq.h"
 
+spinlock_t semaphore_wake_lock = SPIN_LOCK_UNLOCKED;
+
 extern unsigned long start_kernel, _etext;
 extern void update_one_process( struct task_struct *p,
 				unsigned long ticks, unsigned long user,
@@ -148,6 +150,8 @@
 int mp_bus_id_to_type [MAX_MP_BUSSES] = { -1, };
 extern int mp_irq_entries;
 extern struct mpc_config_intsrc mp_irqs [MAX_IRQ_SOURCES];
+int mp_bus_id_to_pci_bus [MAX_MP_BUSSES] = { -1, };
+int mp_current_pci_id = 0;
 
 /* #define SMP_DEBUG */
 
@@ -336,9 +340,13 @@
 					mp_bus_id_to_type[m->mpc_busid] =
 						MP_BUS_ISA;
 				else
-				if (strncmp(m->mpc_bustype,"PCI",3) == 0)
+				if (strncmp(m->mpc_bustype,"PCI",3) == 0) {
 					mp_bus_id_to_type[m->mpc_busid] =
 						MP_BUS_PCI;
+					mp_bus_id_to_pci_bus[m->mpc_busid] =
+						mp_current_pci_id;
+					mp_current_pci_id++;
+				}
 				mpt+=sizeof(*m);
 				count+=sizeof(*m);
 				break;
diff -u --recursive --new-file v2.1.85/linux/arch/m68k/config.in linux/arch/m68k/config.in
--- v2.1.85/linux/arch/m68k/config.in	Tue Dec  2 11:41:44 1997
+++ linux/arch/m68k/config.in	Mon Feb  9 16:12:54 1998
@@ -129,7 +129,7 @@
 dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
 dep_tristate 'SCSI CD-ROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
 if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-  bool '  Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
+  bool '  Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
 fi
 dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
 
diff -u --recursive --new-file v2.1.85/linux/arch/ppc/kernel/irq.c linux/arch/ppc/kernel/irq.c
--- v2.1.85/linux/arch/ppc/kernel/irq.c	Mon Jan 12 15:18:13 1998
+++ linux/arch/ppc/kernel/irq.c	Mon Feb  9 13:31:00 1998
@@ -224,10 +224,6 @@
 		}
 		len += sprintf(buf+len, "\n");
 	}
-#ifdef __SMP_PROF__
-	len+=sprintf(buf+len, "IPI: %8lu received\n",
-		ipi_count);
-#endif
 	len += sprintf(buf+len, "99: %10u   spurious or short\n",
 		       spurious_interrupts);
 	return len;
diff -u --recursive --new-file v2.1.85/linux/arch/sparc/ap1000/bnet.c linux/arch/sparc/ap1000/bnet.c
--- v2.1.85/linux/arch/sparc/ap1000/bnet.c	Tue May 13 22:41:03 1997
+++ linux/arch/sparc/ap1000/bnet.c	Tue Feb 10 13:07:50 1998
@@ -584,7 +584,7 @@
 		if (q->req.type == REQ_IP) {
 			struct sk_buff *skb = (struct sk_buff *)q->data;
 			write_bif(skb->data,q->data_size,1,1);       
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		} else {
 			write_bif(q->data,q->data_size,1,1);
 			if (!(q->flags & BIF_NOCOPY))
@@ -718,7 +718,7 @@
 	q = (struct bif_queue *)kmalloc(sizeof(*q), GFP_ATOMIC);
 	if (!q) {
 		/* yikes! */
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return(-ENOMEM);
 	}
 	
@@ -1021,7 +1021,7 @@
 	}
 	
 	if (skb_out) {
-		dev_kfree_skb(skb_out, FREE_WRITE);
+		dev_kfree_skb(skb_out);
 		skb_out = NULL;
 	}
 	
diff -u --recursive --new-file v2.1.85/linux/arch/sparc/ap1000/tnet.c linux/arch/sparc/ap1000/tnet.c
--- v2.1.85/linux/arch/sparc/ap1000/tnet.c	Mon Jan 12 15:15:43 1998
+++ linux/arch/sparc/ap1000/tnet.c	Tue Feb 10 13:12:02 1998
@@ -596,11 +596,10 @@
 		int *info = (int *)skb->data; /* re-use the header */
 		info[0] = (int)data;
 		info[1] = size;
-		info[2] = tnet_add_completion(free_skb,(int)skb,(int)FREE_WRITE);
+		info[2] = tnet_add_completion(free_skb, (int)skb, 0);
 		tnet_send(cid,TNET_IP,info,sizeof(int)*3,0,0);
 	} else {
-		flag = tnet_add_completion(free_skb,
-					   (int)skb,(int)FREE_WRITE);
+		flag = tnet_add_completion(free_skb, (int)skb, 0);
 		tnet_send(cid,TNET_IP_SMALL,data,size,0,flag);
 		tnet_stats.small_packets_sent++;
 	}
diff -u --recursive --new-file v2.1.85/linux/arch/sparc/config.in linux/arch/sparc/config.in
--- v2.1.85/linux/arch/sparc/config.in	Mon Jan 12 15:15:43 1998
+++ linux/arch/sparc/config.in	Mon Feb  9 16:12:54 1998
@@ -110,7 +110,7 @@
 	dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
 	dep_tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
 	if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-	  bool '  Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
+	  bool '  Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
 	fi
 	dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
 
diff -u --recursive --new-file v2.1.85/linux/arch/sparc/kernel/irq.c linux/arch/sparc/kernel/irq.c
--- v2.1.85/linux/arch/sparc/kernel/irq.c	Mon Jan 12 15:15:43 1998
+++ linux/arch/sparc/kernel/irq.c	Mon Feb  9 13:31:00 1998
@@ -41,10 +41,6 @@
 #include <asm/hardirq.h>
 #include <asm/softirq.h>
 
-#ifdef __SMP_PROF__
-extern volatile unsigned long smp_local_timer_ticks[1+NR_CPUS];
-#endif
-
 /*
  * Dave Redman (djhr@tadpole.co.uk)
  *
@@ -136,109 +132,6 @@
 	}
 	return len;
 }
-
-#ifdef __SMP_PROF__
-
-static unsigned int int_count[NR_CPUS][NR_IRQS] = {{0},};
-
-extern unsigned int prof_multiplier[NR_CPUS];
-extern unsigned int prof_counter[NR_CPUS];
-
-int get_smp_prof_list(char *buf) {
-	int i,j, len = 0;
-	struct irqaction * action;
-	unsigned long sum_spins = 0;
-	unsigned long sum_spins_syscall = 0;
-	unsigned long sum_spins_sys_idle = 0;
-	unsigned long sum_smp_idle_count = 0;
-	unsigned long sum_local_timer_ticks = 0;
-
-	for (i=0;i<smp_num_cpus;i++) {
-		int cpunum = cpu_logical_map[i];
-		sum_spins+=smp_spins[cpunum];
-		sum_spins_syscall+=smp_spins_syscall[cpunum];
-		sum_spins_sys_idle+=smp_spins_sys_idle[cpunum];
-		sum_smp_idle_count+=smp_idle_count[cpunum];
-		sum_local_timer_ticks+=smp_local_timer_ticks[cpunum];
-	}
-
-	len += sprintf(buf+len,"CPUS: %10i \n", smp_num_cpus);
-	len += sprintf(buf+len,"            SUM ");
-	for (i=0;i<smp_num_cpus;i++)
-		len += sprintf(buf+len,"        P%1d ",cpu_logical_map[i]);
-	len += sprintf(buf+len,"\n");
-	for (i = 0 ; i < NR_IRQS ; i++) {
-		action = *(i + irq_action);
-		if (!action || !action->handler)
-			continue;
-		len += sprintf(buf+len, "%3d: %10d ",
-			i, kstat.interrupts[i]);
-		for (j=0;j<smp_num_cpus;j++)
-			len+=sprintf(buf+len, "%10d ",
-				int_count[cpu_logical_map[j]][i]);
-		len += sprintf(buf+len, "%c %s",
-			(action->flags & SA_INTERRUPT) ? '+' : ' ',
-			action->name);
-		for (action=action->next; action; action = action->next) {
-			len += sprintf(buf+len, ",%s %s",
-				(action->flags & SA_INTERRUPT) ? " +" : "",
-				action->name);
-		}
-		len += sprintf(buf+len, "\n");
-	}
-	len+=sprintf(buf+len, "LCK: %10lu",
-		sum_spins);
-
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10lu",smp_spins[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   spins from int\n");
-
-	len+=sprintf(buf+len, "LCK: %10lu",
-		sum_spins_syscall);
-
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10lu",smp_spins_syscall[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   spins from syscall\n");
-
-	len+=sprintf(buf+len, "LCK: %10lu",
-		sum_spins_sys_idle);
-
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10lu",smp_spins_sys_idle[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   spins from sysidle\n");
-	len+=sprintf(buf+len,"IDLE %10lu",sum_smp_idle_count);
-
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10lu",smp_idle_count[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   idle ticks\n");
-
-	len+=sprintf(buf+len,"TICK %10lu",sum_local_timer_ticks);
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10lu",smp_local_timer_ticks[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   local APIC timer ticks\n");
-
-	len+=sprintf(buf+len,"MULT:          ");
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10u",prof_multiplier[cpu_logical_map[i]]);
-	len +=sprintf(buf+len,"   profiling multiplier\n");
-
-	len+=sprintf(buf+len,"COUNT:         ");
-	for (i=0;i<smp_num_cpus;i++)
-		len+=sprintf(buf+len," %10u",prof_counter[cpu_logical_map[i]]);
-
-	len +=sprintf(buf+len,"   profiling counter\n");
-
-	len+=sprintf(buf+len, "IPI: %10lu   received\n",
-		ipi_count);
-
-	return len;
-}
-#endif 
 
 void free_irq(unsigned int irq, void *dev_id)
 {
diff -u --recursive --new-file v2.1.85/linux/arch/sparc/kernel/smp.c linux/arch/sparc/kernel/smp.c
--- v2.1.85/linux/arch/sparc/kernel/smp.c	Mon Jan 12 15:15:43 1998
+++ linux/arch/sparc/kernel/smp.c	Mon Feb  9 13:31:00 1998
@@ -66,16 +66,6 @@
 struct klock_info klock_info = { KLOCK_CLEAR, 0 };
 
 volatile unsigned long ipi_count;
-#ifdef __SMP_PROF__
-volatile unsigned long smp_spins[NR_CPUS]={0};
-volatile unsigned long smp_spins_syscall[NR_CPUS]={0};
-volatile unsigned long smp_spins_syscall_cur[NR_CPUS]={0};
-volatile unsigned long smp_spins_sys_idle[NR_CPUS]={0};
-volatile unsigned long smp_idle_count[1+NR_CPUS]={0,};
-#endif
-#if defined (__SMP_PROF__)
-volatile unsigned long smp_idle_map=0;
-#endif
 
 volatile int smp_process_available=0;
 
@@ -605,8 +595,6 @@
 
 #endif
 
-volatile unsigned long smp_local_timer_ticks[1+NR_CPUS]={0,};
-
 unsigned int prof_multiplier[NR_CPUS];
 unsigned int prof_counter[NR_CPUS];
 
@@ -645,9 +633,6 @@
 		}
 		prof_counter[cpu] = prof_multiplier[cpu];
 	}
-#ifdef __SMP_PROF__
-	smp_local_timer_ticks[cpu]++;
-#endif
 }
 
 extern unsigned int lvl14_resolution;
diff -u --recursive --new-file v2.1.85/linux/arch/sparc64/config.in linux/arch/sparc64/config.in
--- v2.1.85/linux/arch/sparc64/config.in	Mon Jan 12 15:15:43 1998
+++ linux/arch/sparc64/config.in	Mon Feb  9 16:12:54 1998
@@ -138,7 +138,7 @@
 	dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
 	dep_tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
 	if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-	  bool '  Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
+	  bool '  Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
 	fi
 	dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
 
diff -u --recursive --new-file v2.1.85/linux/drivers/ap1000/bif.c linux/drivers/ap1000/bif.c
--- v2.1.85/linux/drivers/ap1000/bif.c	Fri Feb  7 05:54:54 1997
+++ linux/drivers/ap1000/bif.c	Tue Feb 10 13:07:50 1998
@@ -242,7 +242,7 @@
 
 	if (bif_device == NULL) {
 		printk("bif: bif_device is NULL in bif_rx\n");
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
 	skb->dev = bif_device;
diff -u --recursive --new-file v2.1.85/linux/drivers/ap1000/mac.c linux/drivers/ap1000/mac.c
--- v2.1.85/linux/drivers/ap1000/mac.c	Sun Jan 26 02:07:10 1997
+++ linux/drivers/ap1000/mac.c	Tue Feb 10 13:07:50 1998
@@ -803,7 +803,7 @@
 		    memcpy(msp->cur_mbuf.ptr - 3, el->skb->data, 
 			   ROUND4(el->skb->len));
 		    mac_queue_frame((struct mac_buf *)&msp->cur_mbuf);
-		    dev_kfree_skb(el->skb, FREE_WRITE);
+		    dev_kfree_skb(el->skb);
 		    kfree_s(el, sizeof(*el));
 		    continue;
 		}
@@ -1096,7 +1096,7 @@
 	printk("mac_dma_complete(): Calling mac_queue_frame\n");
 #endif
 	mac_queue_frame((struct mac_buf *)&msp->cur_mbuf);
-	dev_kfree_skb(msp->cur_macq->skb, FREE_WRITE);
+	dev_kfree_skb(msp->cur_macq->skb);
 	kfree_s((struct mac_buf *)msp->cur_macq, sizeof(*(msp->cur_macq)));
 	msp->cur_macq = NULL;
 #if MAC_DEBUG
diff -u --recursive --new-file v2.1.85/linux/drivers/block/genhd.c linux/drivers/block/genhd.c
--- v2.1.85/linux/drivers/block/genhd.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/block/genhd.c	Fri Feb  6 10:29:22 1998
@@ -280,7 +280,7 @@
 	for(i=0; i<SOLARIS_X86_NUMSLICE; i++) {
 		s = &v->v_slice[i];
 
-		if (s->s_tag == 0)
+		if (s->s_size == 0)
 			continue;
 		printk(" [s%d]", i);
 		/* solaris partitions are relative to current MS-DOS
diff -u --recursive --new-file v2.1.85/linux/drivers/block/md.c linux/drivers/block/md.c
--- v2.1.85/linux/drivers/block/md.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/block/md.c	Mon Feb  9 16:12:54 1998
@@ -61,7 +61,7 @@
 #include <asm/atomic.h>
 
 #ifdef CONFIG_MD_BOOT
-extern dev_t name_to_dev_t(char *line) __init;
+extern kdev_t name_to_kdev_t(char *line) __init;
 #endif
 
 static struct hd_struct md_hd_struct[MAX_MD_DEV];
@@ -1196,7 +1196,7 @@
 __initfunc(void do_md_setup(char *str,int *ints))
 {
 	int minor, pers, factor, fault;
-	dev_t dev;
+	kdev_t dev;
 	int i=1;
 
 	if(ints[0] < 4) {
@@ -1254,9 +1254,9 @@
    
 	  pers=pers | factor | (fault << FAULT_SHIFT);   
    
-	  while( str && (dev = name_to_dev_t(str))) {
+	  while( str && (dev = name_to_kdev_t(str))) {
 	    do_md_add (minor, dev);
-	    if(str = strchr (str, ','))
+	    if((str = strchr (str, ',')) != NULL)
 	      str++;
 	  }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/block/paride/pt.c linux/drivers/block/paride/pt.c
--- v2.1.85/linux/drivers/block/paride/pt.c	Fri Jan 30 11:28:06 1998
+++ linux/drivers/block/paride/pt.c	Mon Feb  9 16:12:54 1998
@@ -680,7 +680,7 @@
 	return -1;
 }
 
-#define DEVICE_NR(x)	(x % 128)
+#define DEVICE_NR(dev)	(MINOR(dev) % 128)
 
 static int pt_open (struct inode *inode, struct file *file)
 
@@ -711,7 +711,8 @@
 		return -EROFS;
 		}
 
-	if (!(inode->i_rdev & 128)) PT.flags |= PT_REWIND;
+	if (!(MINOR(inode->i_rdev) & 128))
+		PT.flags |= PT_REWIND;
 
 	PT.bufptr = kmalloc(PT_BUFSIZE,GFP_KERNEL);
 	if (PT.bufptr == NULL) {
@@ -726,18 +727,19 @@
 
 static int pt_ioctl(struct inode *inode,struct file *file,
                     unsigned int cmd, unsigned long arg)
-
-{       int unit;
+{
+	int unit;
 	struct mtop mtop;
 
-
-        if ((!inode) || (!inode->i_rdev)) return -EINVAL;
+        if (!inode || !inode->i_rdev)
+		return -EINVAL;
         unit = DEVICE_NR(inode->i_rdev);
-        if (unit >= PT_UNITS) return -EINVAL;
-        if (!PT.present) return -ENODEV;
+        if (unit >= PT_UNITS)
+		return -EINVAL;
+        if (!PT.present)
+		return -ENODEV;
 
         switch (cmd) {
-
 	    case MTIOCTOP:	
 		if (copy_from_user((char *)&mtop, (char *)arg, 
 			           sizeof(struct mtop))) return -EFAULT;
@@ -763,8 +765,8 @@
 
 
 static int pt_release (struct inode *inode, struct file *file)
-
-{       int	unit = DEVICE_NR(inode->i_rdev);
+{
+        int	unit = DEVICE_NR(inode->i_rdev);
 
         if ((unit >= PT_UNITS) || (PT.access <= 0)) 
                 return -EINVAL;
@@ -786,8 +788,8 @@
 
 static ssize_t pt_read(struct file * filp, char * buf, 
                        size_t count, loff_t *ppos)
-
-{  	struct 	inode *ino = filp->f_dentry->d_inode;
+{
+  	struct 	inode *ino = filp->f_dentry->d_inode;
 	int	unit = DEVICE_NR(ino->i_rdev);
 	char	rd_cmd[12] = {ATAPI_READ_6,1,0,0,0,0,0,0,0,0,0,0};
 	int	k, n, r, p, s, t, b;
@@ -870,8 +872,8 @@
 
 static ssize_t pt_write(struct file * filp, const char * buf, 
                         size_t count, loff_t *ppos)
-
-{       struct inode *ino = filp->f_dentry->d_inode;
+{
+        struct inode *ino = filp->f_dentry->d_inode;
         int unit = DEVICE_NR(ino->i_rdev);
         char    wr_cmd[12] = {ATAPI_WRITE_6,1,0,0,0,0,0,0,0,0,0,0};
         int     k, n, r, p, s, t, b;
diff -u --recursive --new-file v2.1.85/linux/drivers/block/ps2esdi.c linux/drivers/block/ps2esdi.c
--- v2.1.85/linux/drivers/block/ps2esdi.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/block/ps2esdi.c	Mon Feb  9 16:12:54 1998
@@ -95,7 +95,7 @@
 static int ps2esdi_ioctl(struct inode *inode, struct file *file,
 			 u_int cmd, u_long arg);
 
-static int ps2esdi_reread_partitions(int dev);
+static int ps2esdi_reread_partitions(kdev_t dev);
 
 static int ps2esdi_read_status_words(int num_words, int max_words, u_short * buffer);
 
@@ -1060,7 +1060,7 @@
 	int dev = DEVICE_NR(inode->i_rdev);
 
 	if (dev < ps2esdi_drives) {
-		sync_dev(dev);
+		sync_dev(inode->i_rdev);
 		access_count[dev]--;
 	}
 	return 0;
@@ -1126,7 +1126,7 @@
 
 
 
-static int ps2esdi_reread_partitions(int dev)
+static int ps2esdi_reread_partitions(kdev_t dev)
 {
 	int target = DEVICE_NR(dev);
 	int start = target << ps2esdi_gendisk.minor_shift;
diff -u --recursive --new-file v2.1.85/linux/drivers/cdrom/cdu31a.c linux/drivers/cdrom/cdu31a.c
--- v2.1.85/linux/drivers/cdrom/cdu31a.c	Fri Jan 30 11:28:06 1998
+++ linux/drivers/cdrom/cdu31a.c	Mon Feb  9 16:12:54 1998
@@ -3282,7 +3282,7 @@
   &scd_dops,                  /* device operations */
   NULL,                       /* link */
   NULL,                       /* handle */
-  MKDEV(MAJOR_NR,0),          /* dev */
+  0,			      /* dev */
   0,                          /* mask */
   2,                          /* maximum speed */
   1,                          /* number of discs */
@@ -3549,6 +3549,7 @@
       init_timer(&cdu31a_abort_timer);
       cdu31a_abort_timer.function = handle_abort_timeout;
 
+      scd_info.dev = MKDEV(MAJOR_NR,0);
       scd_info.mask = deficiency;
       strncpy(scd_info.name, "cdu31a", sizeof(scd_info.name));
 
diff -u --recursive --new-file v2.1.85/linux/drivers/cdrom/cm206.c linux/drivers/cdrom/cm206.c
--- v2.1.85/linux/drivers/cdrom/cm206.c	Fri Jan 30 11:28:06 1998
+++ linux/drivers/cdrom/cm206.c	Mon Feb  9 16:12:54 1998
@@ -1248,7 +1248,7 @@
   &cm206_dops,                  /* device operations */
   NULL,				/* link */
   NULL,				/* handle (not used by cm206) */
-  MKDEV(MAJOR_NR,0),		/* dev */
+  0,				/* dev */
   0,				/* mask */
   2,				/* maximum speed */
   1,				/* number of discs */
@@ -1386,6 +1386,7 @@
     cleanup(3);
     return -EIO;
   }
+  cm206_info.dev = MKDEV(MAJOR_NR,0);
   if (register_cdrom(&cm206_info) != 0) {
     printk(KERN_INFO "Cannot register for cdrom %d!\n", MAJOR_NR);
     cleanup(3);
diff -u --recursive --new-file v2.1.85/linux/drivers/cdrom/mcd.c linux/drivers/cdrom/mcd.c
--- v2.1.85/linux/drivers/cdrom/mcd.c	Fri Jan 30 11:28:06 1998
+++ linux/drivers/cdrom/mcd.c	Mon Feb  9 16:12:55 1998
@@ -216,7 +216,7 @@
   &mcd_dops,                    /* device operations */
   NULL,                         /* link */
   NULL,                         /* handle */
-  MKDEV(MAJOR_NR,0),            /* dev */
+  0,		                /* dev */
   0,                            /* mask */
   2,                            /* maximum speed */
   1,                            /* number of discs */
@@ -243,15 +243,14 @@
 
 static int mcd_media_changed(struct cdrom_device_info * cdi, int disc_nr)
 {
-   int retval, target;
+   int retval;
 
 
 #if 1	 /* the below is not reliable */
    return 0;
 #endif  
-   target = cdi->dev;
 
-   if (target > 0) {
+   if (cdi->dev) {
       printk("mcd: Mitsumi CD-ROM request error: invalid device.\n");
       return 0;
    }
@@ -1231,17 +1230,20 @@
 
         if (result[1] == 'D') 
 	{
-	sprintf(msg, " mcd: Mitsumi Double Speed CD-ROM at port=0x%x, irq=%d\n", mcd_port, mcd_irq);
-	MCMD_DATA_READ = MCMD_2X_READ;
-	mcd_info.speed = 2;
-        mcdDouble = 1; /* Added flag to drop to 1x speed if too many errors */
-        }
-        else {
-        sprintf(msg, " mcd: Mitsumi Single Speed CD-ROM at port=0x%x, irq=%d\n", mcd_port, mcd_irq);
-	mcd_info.speed = 2;
+		sprintf(msg, " mcd: Mitsumi Double Speed CD-ROM at port=0x%x,"
+			     " irq=%d\n", mcd_port, mcd_irq);
+		MCMD_DATA_READ = MCMD_2X_READ;
+
+		mcd_info.speed = 2;
+		/* Added flag to drop to 1x speed if too many errors */
+		mcdDouble = 1;
+        } else {
+		sprintf(msg, " mcd: Mitsumi Single Speed CD-ROM at port=0x%x,"
+			     " irq=%d\n", mcd_port, mcd_irq);
+		mcd_info.speed = 2;
 	}
 
-	request_region(mcd_port, 4,"mcd");
+	request_region(mcd_port, 4, "mcd");
 
 	outb(MCMD_CONFIG_DRIVE, MCDPORT(0));
 	outb(0x02,MCDPORT(0));
@@ -1255,6 +1257,8 @@
 
 	mcd_invalidate_buffers();
 	mcdPresent = 1;
+
+	mcd_info.dev = MKDEV(MAJOR_NR,0);
 
         if (register_cdrom(&mcd_info) != 0) {
               printk("Cannot register Mitsumi CD-ROM!\n");
diff -u --recursive --new-file v2.1.85/linux/drivers/cdrom/mcdx.c linux/drivers/cdrom/mcdx.c
--- v2.1.85/linux/drivers/cdrom/mcdx.c	Mon Jan  5 00:06:26 1998
+++ linux/drivers/cdrom/mcdx.c	Mon Feb  9 16:12:55 1998
@@ -294,7 +294,7 @@
   &mcdx_dops,                    /* device operations */
   NULL,                         /* link */
   NULL,                         /* handle */
-  MKDEV(MAJOR_NR,0),            /* dev */
+  0,		                /* dev */
   0,                            /* mask */
   2,                            /* maximum speed */
   1,                            /* number of discs */
@@ -1024,174 +1024,186 @@
 
 /* Support functions ************************************************/
 
-__initfunc(int mcdx_init(void))
+__initfunc(int mcdx_init_drive(int drive))
 {
-	int drive;
+	struct s_version version;
+	struct s_drive_stuff* stuffp;
+	int size = sizeof(*stuffp);
 	char msg[80];
-#ifdef MODULE
-	xwarn("Version 2.14(hs) for " UTS_RELEASE "\n");
-#else
-	xwarn("Version 2.14(hs) \n");
-#endif
-
-	xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n");
-
-	/* zero the pointer array */
-	for (drive = 0; drive < MCDX_NDRIVES; drive++)
-		mcdx_stuffp[drive] = NULL;
-
-	/* do the initialisation */
-	for (drive = 0; drive < MCDX_NDRIVES; drive++) {
-		struct s_version version;
-		struct s_drive_stuff* stuffp;
-        int size;
 
-		mcdx_blocksizes[drive] = 0;
+	mcdx_blocksizes[drive] = 0;
 
-        size = sizeof(*stuffp);
+	xtrace(INIT, "init() try drive %d\n", drive);
 
-		xtrace(INIT, "init() try drive %d\n", drive);
+	xtrace(INIT, "kmalloc space for stuffpt's\n");
+	xtrace(MALLOC, "init() malloc %d bytes\n", size);
+	if (!(stuffp = kmalloc(size, GFP_KERNEL))) {
+		xwarn("init() malloc failed\n");
+		return 1;
+	}
 
-        xtrace(INIT, "kmalloc space for stuffpt's\n");
-		xtrace(MALLOC, "init() malloc %d bytes\n", size);
-		if (!(stuffp = kmalloc(size, GFP_KERNEL))) {
-			xwarn("init() malloc failed\n");
-			break;
-		}
+	xtrace(INIT, "init() got %d bytes for drive stuff @ %p\n",
+	       sizeof(*stuffp), stuffp);
 
-		xtrace(INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp);
+	/* set default values */
+	memset(stuffp, 0, sizeof(*stuffp));
 
-		/* set default values */
-		memset(stuffp, 0, sizeof(*stuffp));
+	stuffp->present = 0;	/* this should be 0 already */
+	stuffp->toc = NULL;	/* this should be NULL already */
 
-		stuffp->present = 0;		/* this should be 0 already */
-		stuffp->toc = NULL;			/* this should be NULL already */
+	/* setup our irq and i/o addresses */
+	stuffp->irq = irq(mcdx_drive_map[drive]);
+	stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
+	stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1;
+	stuffp->wreg_hcon = stuffp->wreg_reset + 1;
+	stuffp->wreg_chn = stuffp->wreg_hcon + 1;
+
+	/* check if i/o addresses are available */
+	if (check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) {
+		xwarn("0x%3p,%d: Init failed. "
+		      "I/O ports (0x%3p..0x%3p) already in use.\n",
+		      stuffp->wreg_data, stuffp->irq,
+		      stuffp->wreg_data,
+		      stuffp->wreg_data + MCDX_IO_SIZE - 1);
+		xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp);
+		kfree(stuffp);
+		xtrace(INIT, "init() continue at next drive\n");
+		return 0; /* next drive */
+	}
 
-		/* setup our irq and i/o addresses */
-		stuffp->irq = irq(mcdx_drive_map[drive]);
-		stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]);
-		stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1;
-		stuffp->wreg_hcon = stuffp->wreg_reset + 1;
-		stuffp->wreg_chn = stuffp->wreg_hcon + 1;
-
-		/* check if i/o addresses are available */
-		if (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) {
-            xwarn("0x%3p,%d: "
-                    "Init failed. I/O ports (0x%3p..0x%3p) already in use.\n",
-                    stuffp->wreg_data, stuffp->irq,
-                    stuffp->wreg_data,
-                    stuffp->wreg_data + MCDX_IO_SIZE - 1);
-			xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp);
-            kfree(stuffp);
-			xtrace(INIT, "init() continue at next drive\n");
-			continue; /* next drive */
-		}
-
-		xtrace(INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data);
-
-		xtrace(INIT, "init() hardware reset\n");
-		mcdx_reset(stuffp, HARD, 1);
-
-		xtrace(INIT, "init() get version\n");
-		if (-1 == mcdx_requestversion(stuffp, &version, 4)) {
-			/* failed, next drive */
-            xwarn("%s=0x%3p,%d: Init failed. Can't get version.\n",
-                    MCDX,
-                    stuffp->wreg_data, stuffp->irq);
-			xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp);
-            kfree(stuffp);
-			xtrace(INIT, "init() continue at next drive\n");
-			continue;
-		}
+	xtrace(INIT, "init() i/o port is available at 0x%3p\n",
+	       stuffp->wreg_data);
+	xtrace(INIT, "init() hardware reset\n");
+	mcdx_reset(stuffp, HARD, 1);
+
+	xtrace(INIT, "init() get version\n");
+	if (-1 == mcdx_requestversion(stuffp, &version, 4)) {
+		/* failed, next drive */
+		xwarn("%s=0x%3p,%d: Init failed. Can't get version.\n",
+		      MCDX,
+		      stuffp->wreg_data, stuffp->irq);
+		xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp);
+		kfree(stuffp);
+		xtrace(INIT, "init() continue at next drive\n");
+		return 0;
+	}
 
-		switch (version.code) {
-		case 'D':
+	switch (version.code) {
+	case 'D':
                 stuffp->readcmd = READ2X;
                 stuffp->present = DOUBLE | DOOR | MULTI;
                 break;
-		case 'F':
+	case 'F':
                 stuffp->readcmd = READ1X;
                 stuffp->present = SINGLE | DOOR | MULTI;
                 break;
-		case 'M':
+	case 'M':
                 stuffp->readcmd = READ1X;
                 stuffp->present = SINGLE;
                 break;
-		default:
+	default:
                 stuffp->present = 0; break;
-		}
+	}
 
         stuffp->playcmd = READ1X;
 
+	if (!stuffp->present) {
+		xwarn("%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.\n",
+		      MCDX, stuffp->wreg_data, stuffp->irq);
+		kfree(stuffp);
+		return 0; /* next drive */
+	}
 
-		if (!stuffp->present) {
-            xwarn("%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.\n",
-                    MCDX, stuffp->wreg_data, stuffp->irq);
-			kfree(stuffp);
-			continue; /* next drive */
-		}
-
-		xtrace(INIT, "init() register blkdev\n");
-		if (register_blkdev(MAJOR_NR, "mcdx", &cdrom_fops) != 0) {
-            xwarn("%s=0x%3p,%d: Init failed. Can't get major %d.\n",
-                    MCDX,
-                    stuffp->wreg_data, stuffp->irq, MAJOR_NR);
-			kfree(stuffp);
-			continue; /* next drive */
-		}
-
-		blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
-		read_ahead[MAJOR_NR] = READ_AHEAD;
-
-		blksize_size[MAJOR_NR] = mcdx_blocksizes;
-
-		xtrace(INIT, "init() subscribe irq and i/o\n");
-		mcdx_irq_map[stuffp->irq] = stuffp;
-		if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", NULL)) {
-            xwarn("%s=0x%3p,%d: Init failed. Can't get irq (%d).\n",
-                    MCDX,
-                    stuffp->wreg_data, stuffp->irq, stuffp->irq);
-			stuffp->irq = 0;
-			kfree(stuffp);
-			continue;
-		}
-		request_region((unsigned int) stuffp->wreg_data,
-                MCDX_IO_SIZE,
-                "mcdx");
+	xtrace(INIT, "init() register blkdev\n");
+	if (register_blkdev(MAJOR_NR, "mcdx", &cdrom_fops) != 0) {
+		xwarn("%s=0x%3p,%d: Init failed. Can't get major %d.\n",
+		      MCDX,
+		      stuffp->wreg_data, stuffp->irq, MAJOR_NR);
+		kfree(stuffp);
+		return 1;
+	}
 
-		xtrace(INIT, "init() get garbage\n");
-		{
-			int i;
-			mcdx_delay(stuffp, HZ/2);
-			for (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status);
-		}
+	blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST;
+	read_ahead[MAJOR_NR] = READ_AHEAD;
+	blksize_size[MAJOR_NR] = mcdx_blocksizes;
+
+	xtrace(INIT, "init() subscribe irq and i/o\n");
+	mcdx_irq_map[stuffp->irq] = stuffp;
+	if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", NULL)) {
+		xwarn("%s=0x%3p,%d: Init failed. Can't get irq (%d).\n",
+		      MCDX,
+		      stuffp->wreg_data, stuffp->irq, stuffp->irq);
+		stuffp->irq = 0;
+		kfree(stuffp);
+		return 0;
+	}
+	request_region((unsigned int) stuffp->wreg_data,
+		       MCDX_IO_SIZE,
+		       "mcdx");
+
+	xtrace(INIT, "init() get garbage\n");
+	{
+		int i;
+		mcdx_delay(stuffp, HZ/2);
+		for (i = 100; i; i--)
+			(void) inb((unsigned int) stuffp->rreg_status);
+	}
 
 
 #if WE_KNOW_WHY
-			outb(0x50, (unsigned int) stuffp->wreg_chn);	/* irq 11 -> channel register */
+	/* irq 11 -> channel register */
+	outb(0x50, (unsigned int) stuffp->wreg_chn);
 #endif
 
-		xtrace(INIT, "init() set non dma but irq mode\n");
-		mcdx_config(stuffp, 1);
+	xtrace(INIT, "init() set non dma but irq mode\n");
+	mcdx_config(stuffp, 1);
 
-		stuffp->minor = drive;
+	stuffp->minor = drive;
 
-		sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%3p, irq %d."
-			   " (Firmware version %c %x)\n", 
-			   stuffp->wreg_data, stuffp->irq, version.code,
-               version.ver);
-		mcdx_stuffp[drive] = stuffp;
-		xtrace(INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp);
+	sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%3p, irq %d."
+		" (Firmware version %c %x)\n", 
+		stuffp->wreg_data, stuffp->irq, version.code,
+		version.ver);
+	mcdx_stuffp[drive] = stuffp;
+	xtrace(INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp);
+	mcdx_info.dev = MKDEV(MAJOR_NR,0);
         if (register_cdrom(&mcdx_info) != 0) {
-              printk("Cannot register Mitsumi CD-ROM!\n");
-        	  release_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE);
-        	  free_irq(stuffp->irq, NULL);
-              kfree(stuffp);
-              if (unregister_blkdev(MAJOR_NR, "mcdx") != 0)
+		printk("Cannot register Mitsumi CD-ROM!\n");
+		release_region((unsigned long) stuffp->wreg_data,
+			       MCDX_IO_SIZE);
+		free_irq(stuffp->irq, NULL);
+		kfree(stuffp);
+		if (unregister_blkdev(MAJOR_NR, "mcdx") != 0)
         		xwarn("cleanup() unregister_blkdev() failed\n");
-			  return -EIO;
+		return 2;
         }
         printk(msg);
+	return 0;
+}
+
+__initfunc(int mcdx_init(void))
+{
+	int drive;
+#ifdef MODULE
+	xwarn("Version 2.14(hs) for " UTS_RELEASE "\n");
+#else
+	xwarn("Version 2.14(hs) \n");
+#endif
+
+	xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n");
+
+	/* zero the pointer array */
+	for (drive = 0; drive < MCDX_NDRIVES; drive++)
+		mcdx_stuffp[drive] = NULL;
+
+	/* do the initialisation */
+	for (drive = 0; drive < MCDX_NDRIVES; drive++) {
+		switch(mcdx_init_drive(drive)) {
+		case 2:
+			return -EIO;
+		case 1:
+			break;
+		}
 	}
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/cdrom/sbpcd.c linux/drivers/cdrom/sbpcd.c
--- v2.1.85/linux/drivers/cdrom/sbpcd.c	Fri Jan 30 11:28:06 1998
+++ linux/drivers/cdrom/sbpcd.c	Mon Feb  9 16:12:55 1998
@@ -5417,7 +5417,7 @@
   &sbpcd_dops,                /* device operations */
   NULL,                       /* link */
   NULL,                       /* handle */
-  MKDEV(MAJOR_NR,0),          /* dev */
+  0,		              /* dev */
   0,                          /* mask */
   2,                          /* maximum speed */
   1,                          /* number of discs */
diff -u --recursive --new-file v2.1.85/linux/drivers/char/Config.in linux/drivers/char/Config.in
--- v2.1.85/linux/drivers/char/Config.in	Fri Jan 30 11:28:07 1998
+++ linux/drivers/char/Config.in	Fri Feb  6 10:06:55 1998
@@ -105,6 +105,11 @@
   tristate '   Acquire SBC Watchdog Timer' CONFIG_ACQUIRE_WDT
 fi
 bool 'Enhanced Real Time Clock Support' CONFIG_RTC
+if [ "$CONFIG_RTC" = "y" ]; then
+  if [ "$ARCH" = "alpha" ]; then
+    bool '  ARC console time' CONFIG_RTC_ARC y
+  fi
+fi
 if [ "$CONFIG_ALPHA_BOOK1" = "y" ]; then
   bool 'Tadpole ANA H8 Support'  CONFIG_H8
 fi
diff -u --recursive --new-file v2.1.85/linux/drivers/char/apm_bios.c linux/drivers/char/apm_bios.c
--- v2.1.85/linux/drivers/char/apm_bios.c	Sun Dec 21 17:41:24 1997
+++ linux/drivers/char/apm_bios.c	Mon Feb  9 17:51:19 1998
@@ -26,6 +26,7 @@
  * April 1996, Stephen Rothwell (Stephen.Rothwell@canb.auug.org.au)
  *    Version 1.0 and 1.1
  * May 1996, Version 1.2
+ * Feb 1998, Version 1.3
  *
  * History:
  *    0.6b: first version in official kernel, Linux 1.3.46
@@ -44,6 +45,7 @@
  *	   levels to the printk calls. APM is not defined for SMP machines.
  *         The new replacment for it is, but Linux doesn't yet support this.
  *         Alan Cox Linux 2.1.55
+ *    1.3: Set up a valid data descriptor 0x40 for buggy BIOS's
  *
  * Reference:
  *
@@ -162,8 +164,8 @@
 #define APM_NOINTS
 
 /*
- * Define to make the APM BIOS calls zero all data segment registers (do
- * that if an incorrect BIOS implementation will cause a kernel panic if it
+ * Define to make the APM BIOS calls zero all data segment registers (so
+ * that an incorrect BIOS implementation will cause a kernel panic if it
  * tries to write to arbitrary memory).
  */
 #define APM_ZERO_SEGS
@@ -340,7 +342,7 @@
 
 static struct timer_list	apm_timer;
 
-static char			driver_version[] = "1.2";/* no spaces */
+static char			driver_version[] = "1.3";	/* no spaces */
 
 #ifdef APM_DEBUG
 static char *	apm_event_name[] = {
@@ -1111,6 +1113,16 @@
 		printk(" cseg len %x, dseg len %x",
 		       apm_bios_info.cseg_len, apm_bios_info.dseg_len);
 	printk("\n");
+
+	/*
+	 * Set up a segment that references the real mode segment 0x40
+	 * that extends up to the end of page zero (that we have reserved).
+	 * This is for buggy BIOS's that refer to (real mode) segment 0x40
+	 * even though they are called in protected mode.
+	 */
+	set_base(gdt[APM_40 >> 3],
+		 0xc0000000 + ((unsigned long)0x40 << 4));
+	set_limit(gdt[APM_40 >> 3], 4096 - (0x40 << 4));
 
 	apm_bios_entry.offset = apm_bios_info.offset;
 	apm_bios_entry.segment = APM_CS;
diff -u --recursive --new-file v2.1.85/linux/drivers/char/conmakehash.c linux/drivers/char/conmakehash.c
--- v2.1.85/linux/drivers/char/conmakehash.c	Mon Aug 11 17:28:19 1997
+++ linux/drivers/char/conmakehash.c	Mon Feb  9 16:12:55 1998
@@ -283,7 +283,7 @@
 	}
       printf("0x%04x", unitable[fp0][nent++]);
       if ( i == nuni-1 )
-         printf("\n};");
+         printf("\n};\n");
        else if ( i % 8 == 7 )
          printf(",\n\t");
        else
diff -u --recursive --new-file v2.1.85/linux/drivers/char/console.c linux/drivers/char/console.c
--- v2.1.85/linux/drivers/char/console.c	Wed Dec  3 15:21:57 1997
+++ linux/drivers/char/console.c	Mon Feb  9 16:12:55 1998
@@ -1420,6 +1420,12 @@
                                 /* If we got -4 (not found) then see if we have
                                    defined a replacement character (U+FFFD) */
                                 tc = conv_uni_to_pc(0xfffd);
+
+				/* One reason for the -4 can be that we just
+				   did a clear_unimap();
+				   try at least to show something. */
+				if (tc == -4)
+				     tc = c;
                         } else if ( tc == -3 ) {
                                 /* Bad hash table -- hope for the best */
                                 tc = c;
diff -u --recursive --new-file v2.1.85/linux/drivers/char/istallion.c linux/drivers/char/istallion.c
--- v2.1.85/linux/drivers/char/istallion.c	Fri Dec 19 12:30:54 1997
+++ linux/drivers/char/istallion.c	Mon Feb  9 16:12:55 1998
@@ -3,7 +3,7 @@
 /*
  *	istallion.c  -- stallion intelligent multiport serial driver.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This code is loosely based on the Linux serial driver, written by
@@ -170,7 +170,7 @@
  */
 static char	*stli_drvtitle = "Stallion Intelligent Multiport Serial Driver";
 static char	*stli_drvname = "istallion";
-static char	*stli_drvversion = "5.4.1";
+static char	*stli_drvversion = "5.4.3";
 static char	*stli_serialname = "ttyE";
 static char	*stli_calloutname = "cue";
 
@@ -498,8 +498,8 @@
 /*
  *	Define macros to extract a brd or port number from a minor number.
  */
-#define	MKDEV2BRD(min)		(((min) & 0xc0) >> 6)
-#define	MKDEV2PORT(min)		((min) & 0x3f)
+#define	MINOR2BRD(min)		(((min) & 0xc0) >> 6)
+#define	MINOR2PORT(min)		((min) & 0x3f)
 
 /*
  *	Define a baud rate table that converts termios baud rate selector
@@ -749,12 +749,8 @@
 		}
 
 		iounmap(brdp->membase);
-		if ((brdp->brdtype == BRD_ECP) ||
-		    (brdp->brdtype == BRD_ECPE) ||
-		    (brdp->brdtype == BRD_ECPMC))
-			release_region(brdp->iobase, ECP_IOSIZE);
-		else
-			release_region(brdp->iobase, ONB_IOSIZE);
+		if (brdp->iosize > 0)
+			release_region(brdp->iobase, brdp->iosize);
 		kfree_s(brdp, sizeof(stlibrd_t));
 		stli_brds[i] = (stlibrd_t *) NULL;
 	}
@@ -790,7 +786,7 @@
 #endif
 
 	minordev = MINOR(tty->device);
-	brdnr = MKDEV2BRD(minordev);
+	brdnr = MINOR2BRD(minordev);
 	if (brdnr >= stli_nrbrds)
 		return(-ENODEV);
 	brdp = stli_brds[brdnr];
@@ -798,7 +794,7 @@
 		return(-ENODEV);
 	if ((brdp->state & BST_STARTED) == 0)
 		return(-ENODEV);
-	portnr = MKDEV2PORT(minordev);
+	portnr = MINOR2PORT(minordev);
 	if ((portnr < 0) || (portnr > brdp->nrports))
 		return(-ENODEV);
 
@@ -3688,7 +3684,8 @@
 	if ((brdp->iobase == 0) || (brdp->memaddr == 0))
 		return(-ENODEV);
 
-	if (check_region(brdp->iobase, ECP_IOSIZE))
+	brdp->iosize = ECP_IOSIZE;
+	if (check_region(brdp->iobase, brdp->iosize))
 		printk("STALLION: Warning, unit %d I/O address %x conflicts "
 			"with another device\n", brdp->brdnr, brdp->iobase);
 
@@ -3797,7 +3794,7 @@
 		brdp->nrpanels++;
 	}
 
-	request_region(brdp->iobase, ECP_IOSIZE, name);
+	request_region(brdp->iobase, brdp->iosize, name);
 	brdp->state |= BST_FOUND;
 	return(0);
 }
@@ -3826,7 +3823,8 @@
 	if ((brdp->iobase == 0) || (brdp->memaddr == 0))
 		return(-ENODEV);
 
-	if (check_region(brdp->iobase, ONB_IOSIZE))
+	brdp->iosize = ONB_IOSIZE;
+	if (check_region(brdp->iobase, brdp->iosize))
 		printk("STALLION: Warning, unit %d I/O address %x conflicts "
 			"with another device\n", brdp->brdnr, brdp->iobase);
 
@@ -3954,7 +3952,7 @@
 	}
 	brdp->panels[0] = brdp->nrports;
 
-	request_region(brdp->iobase, ONB_IOSIZE, name);
+	request_region(brdp->iobase, brdp->iosize, name);
 	brdp->state |= BST_FOUND;
 	return(0);
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/char/lp.c linux/drivers/char/lp.c
--- v2.1.85/linux/drivers/char/lp.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/char/lp.c	Mon Feb  9 11:33:10 1998
@@ -305,6 +305,7 @@
 					}
 					current->timeout = jiffies + LP_TIMEOUT_INTERRUPT;
 					interruptible_sleep_on(&lp->dev->wait_q);
+					disable_irq(lp->dev->port->irq);
 					w_ctr(minor, LP_PSELECP | LP_PINITP);
 					sti();
 					if (lp_check_status(minor))
@@ -663,7 +664,7 @@
 	} else if (!strcmp(str, "auto")) {
 		parport[0] = LP_PARPORT_AUTO;
 	} else if (!strcmp(str, "none")) {
-		parport_ptr++;
+		parport[parport_ptr++] = LP_PARPORT_NONE;
 	} else if (!strcmp(str, "reset")) {
 		reset = 1;
 	} else {
@@ -701,6 +702,7 @@
 int lp_init(void)
 {
 	unsigned int count = 0;
+	unsigned int i;
 	struct parport *port;
 
 	switch (parport[0])
@@ -722,15 +724,17 @@
 		}
 		break;
 
+	case LP_PARPORT_NONE:
 	default:
-		for (count = 0; count < LP_NO; count++) {
-			if (parport[count] != LP_PARPORT_UNSPEC) {
+		for (i = 0; i < LP_NO; i++) {
+			if (parport[i] >= 0) {
 				char buffer[16];
-				sprintf(buffer, "parport%d", parport[count]);
+				sprintf(buffer, "parport%d", parport[i]);
 				for (port = parport_enumerate(); port; 
 				     port = port->next) {
 					if (!strcmp(port->name, buffer)) {
-						(void) lp_register(count, port);
+						(void) lp_register(i, port);
+						count++;
 						break;
 					}
 				}
diff -u --recursive --new-file v2.1.85/linux/drivers/char/rocket.c linux/drivers/char/rocket.c
--- v2.1.85/linux/drivers/char/rocket.c	Sun Jan  4 10:55:08 1998
+++ linux/drivers/char/rocket.c	Mon Feb  9 16:12:55 1998
@@ -224,7 +224,7 @@
 static void rp_start(struct tty_struct *tty);
 
 static inline int rocket_paranoia_check(struct r_port *info,
-					dev_t device, const char *routine)
+					kdev_t device, const char *routine)
 {
 #ifdef ROCKET_PARANOIA_CHECK
 	static const char *badmagic =
diff -u --recursive --new-file v2.1.85/linux/drivers/char/stallion.c linux/drivers/char/stallion.c
--- v2.1.85/linux/drivers/char/stallion.c	Fri Dec 19 12:30:54 1997
+++ linux/drivers/char/stallion.c	Mon Feb  9 16:12:55 1998
@@ -3,7 +3,7 @@
 /*
  *	stallion.c  -- stallion multiport serial driver.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This code is loosely based on the Linux serial driver, written by
@@ -143,7 +143,7 @@
  */
 static char	*stl_drvtitle = "Stallion Multiport Serial Driver";
 static char	*stl_drvname = "stallion";
-static char	*stl_drvversion = "5.4.1";
+static char	*stl_drvversion = "5.4.3";
 static char	*stl_serialname = "ttyE";
 static char	*stl_calloutname = "cue";
 
@@ -338,6 +338,8 @@
 
 /*****************************************************************************/
 
+#ifdef CONFIG_PCI
+
 /*
  *	Define the Stallion PCI vendor and device IDs.
  */
@@ -372,13 +374,15 @@
 
 static int	stl_nrpcibrds = sizeof(stl_pcibrds) / sizeof(stlpcibrd_t);
 
+#endif
+
 /*****************************************************************************/
 
 /*
  *	Define macros to extract a brd/port number from a minor number.
  */
-#define	MKDEV2BRD(min)		(((min) & 0xc0) >> 6)
-#define	MKDEV2PORT(min)		((min) & 0x3f)
+#define	MINOR2BRD(min)		(((min) & 0xc0) >> 6)
+#define	MINOR2PORT(min)		((min) & 0x3f)
 
 /*
  *	Define a baud rate table that converts termios baud rate selector
@@ -796,13 +800,13 @@
 #endif
 
 	minordev = MINOR(tty->device);
-	brdnr = MKDEV2BRD(minordev);
+	brdnr = MINOR2BRD(minordev);
 	if (brdnr >= stl_nrbrds)
 		return(-ENODEV);
 	brdp = stl_brds[brdnr];
 	if (brdp == (stlbrd_t *) NULL)
 		return(-ENODEV);
-	minordev = MKDEV2PORT(minordev);
+	minordev = MINOR2PORT(minordev);
 	for (portnr = -1, panelnr = 0; (panelnr < STL_MAXPANELS); panelnr++) {
 		if (brdp->panels[panelnr] == (stlpanel_t *) NULL)
 			break;
diff -u --recursive --new-file v2.1.85/linux/drivers/char/sysrq.c linux/drivers/char/sysrq.c
--- v2.1.85/linux/drivers/char/sysrq.c	Sun Dec 21 17:27:17 1997
+++ linux/drivers/char/sysrq.c	Mon Feb  9 16:12:55 1998
@@ -171,9 +171,9 @@
 
 static void go_sync(kdev_t dev, int remount_flag)
 {
-	printk(KERN_INFO "%sing device %04x ... ",
+	printk(KERN_INFO "%sing device %s ... ",
 	       remount_flag ? "Remount" : "Sync",
-	       dev);
+	       kdevname(dev));
 
 	if (remount_flag) {				    /* Remount R/O */
 		struct super_block *sb = get_super(dev);
diff -u --recursive --new-file v2.1.85/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
--- v2.1.85/linux/drivers/char/vc_screen.c	Mon Dec 29 10:27:23 1997
+++ linux/drivers/char/vc_screen.c	Mon Feb  9 16:12:55 1998
@@ -16,8 +16,7 @@
  * aeb@cwi.nl - efter Friedas begravelse - 950211
  *
  * machek@k332.feld.cvut.cz - modified not to send characters to wrong console
- *	 - fixed some fatal of-by-one bugs (0-- no longer == -1 -> looping and looping and looping...)
- *	 - making it working with multiple monitor patches
+ *	 - fixed some fatal off-by-one bugs (0-- no longer == -1 -> looping and looping and looping...)
  *	 - making it shorter - scr_readw are macros which expand in PRETTY long code
  */
 
@@ -76,24 +75,22 @@
 
 static long long vcs_lseek(struct file *file, long long offset, int orig)
 {
-	int size;
-	size = vcs_size(file->f_dentry->d_inode);
+	int size = vcs_size(file->f_dentry->d_inode);
 
 	switch (orig) {
-		case 0:
-			file->f_pos = offset;
+		default:
+			return -EINVAL;
+		case 2:
+			offset += size;
 			break;
 		case 1:
-			file->f_pos += offset;
-			break;
-		case 2:
-			file->f_pos = size + offset;
+			offset += file->f_pos;
+		case 0:
 			break;
-		default:
-			return -EINVAL;
 	}
-	if (file->f_pos < 0 || file->f_pos > size)
-		{ file->f_pos = 0; return -EINVAL; }
+	if (offset < 0 || offset > size)
+		return -EINVAL;
+	file->f_pos = offset;
 	return file->f_pos;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/avmb1/b1capi.c linux/drivers/isdn/avmb1/b1capi.c
--- v2.1.85/linux/drivers/isdn/avmb1/b1capi.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/isdn/avmb1/b1capi.c	Tue Feb 10 13:07:50 1998
@@ -300,13 +300,13 @@
 		if (!VALID_APPLID(appl)) {
 			printk(KERN_ERR "b1capi: recv_handler: applid %d ? (%s)\n",
 			       appl, capi_message2str(skb->data));
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			continue;
 		}
 		if (APPL(appl)->signal == 0) {
 			printk(KERN_ERR "b1capi: recv_handler: applid %d has no signal function\n",
 			       appl);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			continue;
 		}
 		if (   CAPIMSG_COMMAND(skb->data) == CAPI_DATA_B3
@@ -336,7 +336,7 @@
 	return;
 
       error:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 void avmb1_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
@@ -537,7 +537,7 @@
 	if (!VALID_APPLID(applid) || APPL(applid)->releasing)
 		return CAPI_ILLAPPNR;
 	while ((skb = skb_dequeue(&APPL(applid)->recv_queue)) != 0)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	for (i = 0; i < ncards; i++) {
 		if (cards[i].cardstate != CARD_RUNNING)
 			continue;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/avmb1/b1lli.c linux/drivers/isdn/avmb1/b1lli.c
--- v2.1.85/linux/drivers/isdn/avmb1/b1lli.c	Thu May 29 21:53:05 1997
+++ linux/drivers/isdn/avmb1/b1lli.c	Tue Feb 10 13:07:50 1998
@@ -456,7 +456,7 @@
 		B1_put_slice(port, skb->data, len);
 		restore_flags(flags);
 	}
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 }
 
 /*
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/avmb1/capi.c linux/drivers/isdn/avmb1/capi.c
--- v2.1.85/linux/drivers/isdn/avmb1/capi.c	Mon Dec  8 23:58:04 1997
+++ linux/drivers/isdn/avmb1/capi.c	Tue Feb 10 13:07:50 1998
@@ -144,7 +144,7 @@
 	copied = skb->len;
 
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 
 	return copied;
 }
@@ -169,7 +169,7 @@
 	skb = alloc_skb(count, GFP_USER);
 
 	if ((retval = copy_from_user(skb_put(skb, count), buf, count))) {
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return retval;
 	}
 	cmd = CAPIMSG_COMMAND(skb->data);
@@ -178,11 +178,11 @@
 	if (cmd == CAPI_DATA_B3 && subcmd == CAPI_REQ) {
 		__u16 dlen = CAPIMSG_DATALEN(skb->data);
 		if (mlen + dlen != count) {
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			return -EINVAL;
 		}
 	} else if (mlen != count) {
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return -EINVAL;
 	}
 	CAPIMSG_SETAPPID(skb->data, cdev->applid);
@@ -190,7 +190,7 @@
 	cdev->errcode = (*capifuncs->capi_put_message) (cdev->applid, skb);
 
 	if (cdev->errcode) {
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return -EIO;
 	}
 	return count;
@@ -416,7 +416,7 @@
 		cdev->applid = 0;
 
 		while ((skb = skb_dequeue(&cdev->recv_queue)) != 0)
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 	}
 	cdev->is_open = 0;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/avmb1/capidrv.c linux/drivers/isdn/avmb1/capidrv.c
--- v2.1.85/linux/drivers/isdn/avmb1/capidrv.c	Thu May 29 21:53:05 1997
+++ linux/drivers/isdn/avmb1/capidrv.c	Tue Feb 10 13:07:50 1998
@@ -1169,7 +1169,7 @@
 		printk(KERN_ERR "capidrv: %s: ncci 0x%x not found\n",
 		       capi_cmd2str(cmsg->Command, cmsg->Subcommand),
 		       cmsg->adr.adrNCCI);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 	(void) skb_pull(skb, CAPIMSG_LEN(skb->data));
@@ -1194,7 +1194,7 @@
 			handle_data(&s_cmsg, skb);
 			continue;
 		}
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		if ((s_cmsg.adr.adrController & 0xffffff00) == 0)
 			handle_controller(&s_cmsg);
 		else if ((s_cmsg.adr.adrPLCI & 0xffff0000) == 0)
@@ -1517,10 +1517,10 @@
 		errcode = (*capifuncs->capi_put_message) (global.appid, nskb);
 		switch (errcode) {
 		case CAPI_NOERROR:
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			return len;
 		case CAPI_SENDQUEUEFULL:
-			dev_kfree_skb(nskb, FREE_WRITE);
+			dev_kfree_skb(nskb);
 			return 0;
 		default:
 			return -1;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/avm_a1.c linux/drivers/isdn/hisax/avm_a1.c
--- v2.1.85/linux/drivers/isdn/hisax/avm_a1.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/isdn/hisax/avm_a1.c	Tue Feb 10 13:07:50 1998
@@ -277,7 +277,7 @@
 				return;
 			} else {
 				SET_SKB_FREE(hsp->tx_skb);
-				dev_kfree_skb(hsp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(hsp->tx_skb);
 				hsp->count = 0;
 				if (hsp->st->l4.l1writewakeup)
 					hsp->st->l4.l1writewakeup(hsp->st);
@@ -439,7 +439,7 @@
 				goto afterXPR;
 			} else {
 				SET_SKB_FREE(sp->tx_skb);
-				dev_kfree_skb(sp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(sp->tx_skb);
 				sp->tx_cnt = 0;
 				sp->tx_skb = NULL;
 			}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/callc.c linux/drivers/isdn/hisax/callc.c
--- v2.1.85/linux/drivers/isdn/hisax/callc.c	Mon Jun 16 16:35:55 1997
+++ linux/drivers/isdn/hisax/callc.c	Tue Feb 10 13:07:50 1998
@@ -1600,7 +1600,7 @@
 				chanp->sp->iif.rcvcallb_skb(chanp->sp->myid, chanp->chan, skb);
 			else {
 				SET_SKB_FREE(skb);
-				dev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 			}
 			break;
 		default:
@@ -1622,7 +1622,7 @@
 				chanp->sp->iif.rcvcallb_skb(chanp->sp->myid, chanp->chan, skb);
 			else {
 				SET_SKB_FREE(skb);
-				dev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 			}
 			break;
 		default:
@@ -1966,7 +1966,7 @@
 				csta->hs[chanp->hscx].tx_cnt += len;
 				chanp->ds.l2.l2l1(&chanp->ds, PH_DATA, nskb);
 			}
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		} else
 			len = 0;
 		restore_flags(flags);
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/elsa.c linux/drivers/isdn/hisax/elsa.c
--- v2.1.85/linux/drivers/isdn/hisax/elsa.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/isdn/hisax/elsa.c	Tue Feb 10 13:07:50 1998
@@ -488,7 +488,7 @@
 				return;
 			} else {
 				SET_SKB_FREE(hsp->tx_skb);
-				dev_kfree_skb(hsp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(hsp->tx_skb);
 				hsp->count = 0;
 				if (hsp->st->l4.l1writewakeup)
 					hsp->st->l4.l1writewakeup(hsp->st);
@@ -653,7 +653,7 @@
 				goto afterXPR;
 			} else {
 				SET_SKB_FREE(sp->tx_skb);
-				dev_kfree_skb(sp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(sp->tx_skb);
 				sp->tx_cnt = 0;
 				sp->tx_skb = NULL;
 			}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/isdnl1.c linux/drivers/isdn/hisax/isdnl1.c
--- v2.1.85/linux/drivers/isdn/hisax/isdnl1.c	Mon Nov  3 09:54:38 1997
+++ linux/drivers/isdn/hisax/isdnl1.c	Tue Feb 10 13:07:50 1998
@@ -453,7 +453,7 @@
 				stptr = stptr->next;
 			}
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 		} else {
 			found = 0;
 			while (stptr != NULL)
@@ -478,7 +478,7 @@
 					dlogframe(sp, skb->data + 4, skb->len - 4, tmp);
 				}
 				SET_SKB_FREE(skb);
-				dev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 			}
 		}
 
@@ -714,7 +714,7 @@
 
 	while ((skb = skb_dequeue(&sp->sq))) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 }
 
@@ -798,15 +798,15 @@
 		}
 		while ((skb = skb_dequeue(&hs->rqueue))) {
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 		}
 		while ((skb = skb_dequeue(&hs->squeue))) {
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		}
 		if (hs->tx_skb) {
 			SET_SKB_FREE(hs->tx_skb);
-			dev_kfree_skb(hs->tx_skb, FREE_WRITE);
+			dev_kfree_skb(hs->tx_skb);
 			hs->tx_skb = NULL;
 		}
 	}
@@ -828,15 +828,15 @@
 	}
 	while ((skb = skb_dequeue(&csta->rq))) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 	}
 	while ((skb = skb_dequeue(&csta->sq))) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 	if (csta->tx_skb) {
 		SET_SKB_FREE(csta->tx_skb);
-		dev_kfree_skb(csta->tx_skb, FREE_WRITE);
+		dev_kfree_skb(csta->tx_skb);
 		csta->tx_skb = NULL;
 	}
 	switch (csta->typ) {
@@ -1219,7 +1219,7 @@
 
 	while ((skb = skb_dequeue(&hsp->squeue))) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/isdnl2.c linux/drivers/isdn/hisax/isdnl2.c
--- v2.1.85/linux/drivers/isdn/hisax/isdnl2.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/hisax/isdnl2.c	Tue Feb 10 13:07:50 1998
@@ -148,7 +148,7 @@
 		if (l2->windowar[i]) {
 			cnt++;
 			SET_SKB_FREE(l2->windowar[i]);
-			dev_kfree_skb(l2->windowar[i], FREE_WRITE);
+			dev_kfree_skb(l2->windowar[i]);
 			l2->windowar[i] = NULL;
 		}
 	}
@@ -172,7 +172,7 @@
 
 	while ((skb = skb_dequeue(&st->l2.i_queue))) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 	}
 }
 
@@ -248,7 +248,7 @@
 		while (l2->va != nr) {
 			l2->va = (l2->va + 1) % (l2->extended ? 128 : 8);
 			SET_SKB_FREE(l2->windowar[l2->sow]);
-			dev_kfree_skb(l2->windowar[l2->sow], FREE_WRITE);
+			dev_kfree_skb(l2->windowar[l2->sow]);
 			l2->windowar[l2->sow] = NULL;
 			l2->sow = (l2->sow + 1) % l2->window;
 			if (st->l4.l2writewakeup)
@@ -369,7 +369,7 @@
 	skb_pull(skb, l2addrsize(&(st->l2)));
 	PollFlag = *skb->data & 0x10;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if (ST_L2_4 != state)
 		if (st->l2.vs != st->l2.va) {
@@ -414,7 +414,7 @@
 	skb_pull(skb, l2addrsize(&(st->l2)));
 	PollFlag = *skb->data & 0x10;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	FsmChangeState(fi, ST_L2_4);
 
@@ -440,7 +440,7 @@
 	skb_pull(skb, l2addrsize(&(st->l2)));
 	PollFlag = *skb->data & 0x10;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if (!((chanp->impair == 1) && (st->l2.laptype == LAPB)))
 		send_uframe(st, DM | (PollFlag ? 0x10 : 0x0), RSP);
@@ -457,7 +457,7 @@
 	skb_pull(skb, l2addrsize(&(st->l2)));
 	f = *skb->data & 0x10;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	if (f) {
 		st->l2.vs = 0;
 		st->l2.va = 0;
@@ -484,7 +484,7 @@
 	skb_pull(skb, l2addrsize(&(st->l2)));
 	f = *skb->data & 0x10;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	if (f) {
 		FsmDelTimer(&st->l2.t200_timer, 6);
 		FsmChangeState(fi, ST_L2_4);
@@ -560,7 +560,7 @@
 		seq = (skb->data[0] >> 5) & 0x7;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if (!((chanp->impair == 4) && (st->l2.laptype == LAPB)))
 		if ((!rsp) && PollFlag)
@@ -649,7 +649,7 @@
 		/* n(s)!=v(r) */
 		wasok = 0;
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		if (st->l2.rejexp) {
 			if (p)
 				if (!((chanp->impair == 3) && (st->l2.laptype == LAPB)))
@@ -779,7 +779,7 @@
 		seq = (skb->data[0] >> 5) & 0x7;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if ((!rsp) && PollFlag)
 		enquiry_response(st, RR, PollFlag);
@@ -866,7 +866,7 @@
 		printk(KERN_WARNING "isdnl2 try overwrite ack queue entry %d\n",
 		       p1);
 		SET_SKB_FREE(l2->windowar[p1]);
-		dev_kfree_skb(l2->windowar[p1], FREE_WRITE);
+		dev_kfree_skb(l2->windowar[p1]);
 	}
 	l2->windowar[p1] = skb_clone(skb, GFP_ATOMIC);
 
@@ -944,7 +944,7 @@
 		seq = (skb->data[0] >> 5) & 0x7;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if (rsp && PollFlag) {
 		if (legalnr(st, seq)) {
@@ -1019,7 +1019,7 @@
 		l2m_debug(&st->l2.l2m, tmp);
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 }
 
 static void
@@ -1193,7 +1193,7 @@
 
 			if (ret) {
 				SET_SKB_FREE(skb);
-				dev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 			}
 			break;
 		case (PH_PULL_ACK):
@@ -1209,13 +1209,13 @@
 		case (DL_DATA):
 			if (FsmEvent(&st->l2.l2m, EV_L2_DL_DATA, arg)) {
 				SET_SKB_FREE(((struct sk_buff *) arg));
-				dev_kfree_skb((struct sk_buff *) arg, FREE_READ);
+				dev_kfree_skb((struct sk_buff *) arg);
 			}
 			break;
 		case (DL_UNIT_DATA):
 			if (FsmEvent(&st->l2.l2m, EV_L2_DL_UNIT_DATA, arg)) {
 				SET_SKB_FREE(((struct sk_buff *) arg));
-				dev_kfree_skb((struct sk_buff *) arg, FREE_READ);
+				dev_kfree_skb((struct sk_buff *) arg);
 			}
 			break;
 	}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/isdnl3.c linux/drivers/isdn/hisax/isdnl3.c
--- v2.1.85/linux/drivers/isdn/hisax/isdnl3.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/hisax/isdnl3.c	Tue Feb 10 13:07:50 1998
@@ -135,7 +135,7 @@
 	l3_debug(st, "no protocol");
 	if (skb) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 	}
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/ix1_micro.c linux/drivers/isdn/hisax/ix1_micro.c
--- v2.1.85/linux/drivers/isdn/hisax/ix1_micro.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/isdn/hisax/ix1_micro.c	Tue Feb 10 13:07:50 1998
@@ -363,7 +363,7 @@
 				return;
 			} else {
 				SET_SKB_FREE(hsp->tx_skb);
-				dev_kfree_skb(hsp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(hsp->tx_skb);
 				hsp->count = 0;
 				if (hsp->st->l4.l1writewakeup)
 					hsp->st->l4.l1writewakeup(hsp->st);
@@ -526,7 +526,7 @@
 				goto afterXPR;
 			} else {
 				SET_SKB_FREE(sp->tx_skb);
-				dev_kfree_skb(sp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(sp->tx_skb);
 				sp->tx_cnt = 0;
 				sp->tx_skb = NULL;
 			}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/l3_1tr6.c linux/drivers/isdn/hisax/l3_1tr6.c
--- v2.1.85/linux/drivers/isdn/hisax/l3_1tr6.c	Wed Aug  6 13:02:58 1997
+++ linux/drivers/isdn/hisax/l3_1tr6.c	Tue Feb 10 13:07:50 1998
@@ -209,7 +209,7 @@
 			st->pa->spv = 1;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	/* Signal all services, linklevel takes care of Service-Indicator */
 	if (bcfound) {
@@ -238,7 +238,7 @@
 	} else if (st->l3.debug & L3_DEB_WARN)
 		l3_debug(st, "setup answer without bchannel");
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	L3AddTimer(&st->l3.timer, st->l3.t304, CC_T304);
 	st->l3.l3l4(st, CC_MORE_INFO, NULL);
 }
@@ -256,7 +256,7 @@
 	} else if (st->l3.debug & L3_DEB_WARN)
 		l3_debug(st, "setup answer without bchannel");
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	L3AddTimer(&st->l3.timer, st->l3.t310, CC_T310);
 	newl3state(st, 3);
 	st->l3.l3l4(st, CC_PROCEEDING_IND, NULL);
@@ -268,7 +268,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	L3DelTimer(&st->l3.timer);	/* T304 */
 	newl3state(st, 4);
 	st->l3.l3l4(st, CC_ALERTING_IND, NULL);
@@ -300,7 +300,7 @@
 	} else if (st->l3.debug & L3_DEB_CHARGE)
 		l3_debug(st, "charging info not found");
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 }
 
@@ -310,7 +310,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 }
 
 static void
@@ -321,7 +321,7 @@
 	L3DelTimer(&st->l3.timer);	/* T310 */
 	newl3state(st, 10);
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	st->pa->chargeinfo = 0;
 	st->l3.l3l4(st, CC_SETUP_CNF, NULL);
 }
@@ -347,7 +347,7 @@
 	} else
 		st->pa->cause = -1;
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	StopAllL3Timer(st);
 	newl3state(st, 0);
 	l3_1TR6_message(st, MT_N1_REL_ACK, PROTO_DIS_N1);
@@ -360,7 +360,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	StopAllL3Timer(st);
 	newl3state(st, 0);
 	st->pa->cause = -1;
@@ -413,7 +413,7 @@
 		st->pa->cause = -1;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 12);
 	st->l3.l3l4(st, CC_DISCONNECT_IND, NULL);
 }
@@ -425,7 +425,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 10);
 	st->pa->chargeinfo = 0;
 	L3DelTimer(&st->l3.timer);
@@ -706,13 +706,13 @@
 			l3_debug(st, tmp);
 		}
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 	mt = skb->data[skb->data[1] + 2];
 	if (skb->data[0] == PROTO_DIS_N0) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		if (st->l3.debug & L3_DEB_STATE) {
 			sprintf(tmp, "up1tr6%s N0 state %d mt %x unhandled",
 				(pr == DL_DATA) ? " " : "(broadcast) ",
@@ -726,7 +726,7 @@
 				break;
 		if (i == datastln1_len) {
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 			if (st->l3.debug & L3_DEB_STATE) {
 				sprintf(tmp, "up1tr6%sstate %d mt %x unhandled",
 				  (pr == DL_DATA) ? " " : "(broadcast) ",
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/l3dss1.c linux/drivers/isdn/hisax/l3dss1.c
--- v2.1.85/linux/drivers/isdn/hisax/l3dss1.c	Wed Aug  6 13:02:58 1997
+++ linux/drivers/isdn/hisax/l3dss1.c	Tue Feb 10 13:07:50 1998
@@ -110,7 +110,7 @@
 		cause = *p & 0x7f;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	StopAllL3Timer(st);
 	st->pa->cause = cause;
 	newl3state(st, 0);
@@ -238,7 +238,7 @@
 	} else if (st->l3.debug & L3_DEB_WARN)
 		l3_debug(st, "setup answer without bchannel");
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 3);
 	L3AddTimer(&st->l3.timer, st->l3.t310, CC_T310);
 	st->l3.l3l4(st, CC_PROCEEDING_IND, NULL);
@@ -259,7 +259,7 @@
 	} else if (st->l3.debug & L3_DEB_WARN)
 		l3_debug(st, "setup answer without bchannel");
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 2);
 	L3AddTimer(&st->l3.timer, st->l3.t304, CC_T304);
 	st->l3.l3l4(st, CC_MORE_INFO, NULL);
@@ -282,7 +282,7 @@
 		cause = *p & 0x7f;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 12);
 	st->pa->cause = cause;
 	st->l3.l3l4(st, CC_DISCONNECT_IND, NULL);
@@ -294,7 +294,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	L3DelTimer(&st->l3.timer);	/* T310 */
 	newl3state(st, 10);
 	st->l3.l3l4(st, CC_SETUP_CNF, NULL);
@@ -306,7 +306,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	L3DelTimer(&st->l3.timer);	/* T304 */
 	newl3state(st, 4);
 	st->l3.l3l4(st, CC_ALERTING_IND, NULL);
@@ -394,7 +394,7 @@
 		st->pa->setup.screen = 0;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	if (bcfound) {
 		if ((st->pa->setup.si1 != 7) && (st->l3.debug & L3_DEB_WARN)) {
@@ -431,7 +431,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	newl3state(st, 10);
 	L3DelTimer(&st->l3.timer);
 	st->l3.l3l4(st, CC_SETUP_COMPLETE_IND, NULL);
@@ -510,7 +510,7 @@
 		cause = *p & 0x7f;
 	}
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 	StopAllL3Timer(st);
 	st->pa->cause = cause;
 	newl3state(st, 0);
@@ -535,7 +535,7 @@
 	struct sk_buff *skb = arg;
 
 	SET_SKB_FREE(skb);
-	dev_kfree_skb(skb, FREE_READ);
+	dev_kfree_skb(skb);
 
 	MsgHead(p, st->l3.callref, MT_STATUS);
 
@@ -727,7 +727,7 @@
 			l3_debug(st, tmp);
 		}
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		return;
 	}
 	mt = skb->data[skb->data[1] + 2];
@@ -737,7 +737,7 @@
 			break;
 	if (i == datasllen) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		if (st->l3.debug & L3_DEB_STATE) {
 			sprintf(tmp, "dss1up%sstate %d mt %x unhandled",
 				(pr == DL_DATA) ? " " : "(broadcast) ",
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/tei.c linux/drivers/isdn/hisax/tei.c
--- v2.1.85/linux/drivers/isdn/hisax/tei.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/hisax/tei.c	Tue Feb 10 13:07:50 1998
@@ -233,7 +233,7 @@
 			} else
 				mdl_unit_data_ind(st, (bp[1] << 8) | bp[2], bp[3], bp[4] >> 1);
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, FREE_READ);
+			dev_kfree_skb(skb);
 			break;
 		default:
 			break;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/teles0.c linux/drivers/isdn/hisax/teles0.c
--- v2.1.85/linux/drivers/isdn/hisax/teles0.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/isdn/hisax/teles0.c	Tue Feb 10 13:07:50 1998
@@ -327,7 +327,7 @@
 				return;
 			} else {
 				SET_SKB_FREE(hsp->tx_skb);
-				dev_kfree_skb(hsp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(hsp->tx_skb);
 				hsp->count = 0;
 				if (hsp->st->l4.l1writewakeup)
 					hsp->st->l4.l1writewakeup(hsp->st);
@@ -487,7 +487,7 @@
 				goto afterXPR;
 			} else {
 				SET_SKB_FREE(sp->tx_skb);
-				dev_kfree_skb(sp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(sp->tx_skb);
 				sp->tx_cnt = 0;
 				sp->tx_skb = NULL;
 			}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/hisax/teles3.c linux/drivers/isdn/hisax/teles3.c
--- v2.1.85/linux/drivers/isdn/hisax/teles3.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/isdn/hisax/teles3.c	Tue Feb 10 13:07:50 1998
@@ -303,7 +303,7 @@
 				return;
 			} else {
 				SET_SKB_FREE(hsp->tx_skb);
-				dev_kfree_skb(hsp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(hsp->tx_skb);
 				hsp->count = 0;
 				if (hsp->st->l4.l1writewakeup)
 					hsp->st->l4.l1writewakeup(hsp->st);
@@ -465,7 +465,7 @@
 				goto afterXPR;
 			} else {
 				SET_SKB_FREE(sp->tx_skb);
-				dev_kfree_skb(sp->tx_skb, FREE_WRITE);
+				dev_kfree_skb(sp->tx_skb);
 				sp->tx_cnt = 0;
 				sp->tx_skb = NULL;
 			}
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/icn/icn.c linux/drivers/isdn/icn/icn.c
--- v2.1.85/linux/drivers/isdn/icn/icn.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/icn/icn.c	Tue Feb 10 13:07:50 1998
@@ -207,7 +207,7 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(queue)))
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	card->sndcount[channel] = 0;
 }
 
@@ -471,7 +471,7 @@
 			sbnext; /* switch to next buffer        */
 			icn_maprelease_channel(card, mch & 2);
 			if (!skb->len) {
-				dev_kfree_skb(skb, FREE_WRITE);
+				dev_kfree_skb(skb);
 				cmd.command = ISDN_STAT_BSENT;
 				cmd.driver = card->myid;
 				cmd.arg = channel;
@@ -828,7 +828,7 @@
 		nskb = skb_clone(skb, GFP_ATOMIC);
 		if (nskb) {
 			skb_queue_tail(&card->spqueue[channel], nskb);
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		} else
 			len = 0;
 		card->sndcount[channel] += len;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/isdn_audio.c linux/drivers/isdn/isdn_audio.c
--- v2.1.85/linux/drivers/isdn/isdn_audio.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/isdn_audio.c	Tue Feb 10 13:07:50 1998
@@ -596,7 +596,7 @@
 			if (skb_headroom(skb) < sizeof(isdn_audio_skb)) {
 				printk(KERN_WARNING
 				       "isdn_audio: insufficient skb_headroom, dropping\n");
-				kfree_skb(skb, FREE_READ);
+				kfree_skb(skb);
 				return;
 			}
 			ISDN_AUDIO_SKB_DLECOUNT(skb) = 0;
@@ -613,7 +613,7 @@
 				isdn_timer_ctrl(ISDN_TIMER_MODEMREAD, 1);
 			wake_up_interruptible(&dev->drv[di]->rcv_waitq[ch]);
 		} else
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 		s->last = what;
 	}
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/isdn_common.c linux/drivers/isdn/isdn_common.c
--- v2.1.85/linux/drivers/isdn/isdn_common.c	Mon Dec  8 23:58:04 1997
+++ linux/drivers/isdn/isdn_common.c	Tue Feb 10 13:07:50 1998
@@ -277,7 +277,7 @@
 	cli();
 	if (skb_queue_len(queue))
 		while ((skb = skb_dequeue(queue)))
-			isdn_trash_skb(skb, FREE_READ);
+			isdn_trash_skb(skb);
 	restore_flags(flags);
 }
 
@@ -374,7 +374,7 @@
 	int i;
 
 	if ((i = isdn_dc2minor(di, channel)) == -1) {
-		isdn_trash_skb(skb, FREE_READ);
+		isdn_trash_skb(skb);
 		return;
 	}
 	/* Update statistics */
@@ -389,7 +389,7 @@
 			return;
 		wake_up_interruptible(&dev->drv[di]->rcv_waitq[channel]);
 	} else
-		isdn_trash_skb(skb, FREE_READ);
+		isdn_trash_skb(skb);
 }
 
 void
@@ -752,7 +752,7 @@
 			ISDN_AUDIO_SKB_LOCK(skb) = 0;
 #endif
 			skb = skb_dequeue(&dev->drv[di]->rpqueue[channel]);
-			isdn_trash_skb(skb, FREE_READ);
+			isdn_trash_skb(skb);
 		} else {
 			/* Not yet emptied this buff, so it
 			 * must stay in the queue, for further calls
@@ -1892,7 +1892,7 @@
 		ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx,
 							      chan, skb);
 		if (ret <= 0)
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 	}
 	if (ret > 0)
 		dev->obytes[isdn_dc2minor(drvidx, chan)] += ret;
@@ -1919,7 +1919,7 @@
 	else {
 		if ((ret = dev->drv[drvidx]->interface->
 		  writebuf(drvidx, chan, skb->data, skb->len, 0)) == len)
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 	}
 	if (ret > 0)
 		dev->obytes[isdn_dc2minor(drvidx, chan)] += len;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/isdn_net.c linux/drivers/isdn/isdn_net.c
--- v2.1.85/linux/drivers/isdn/isdn_net.c	Mon Dec 29 10:22:42 1997
+++ linux/drivers/isdn/isdn_net.c	Tue Feb 10 13:07:50 1998
@@ -303,11 +303,11 @@
 	save_flags(flags);
 	cli();
 	if (lp->first_skb) {
-		dev_kfree_skb(lp->first_skb, FREE_WRITE);
+		dev_kfree_skb(lp->first_skb);
 		lp->first_skb = NULL;
 	}
 	if (lp->sav_skb) {
-		dev_kfree_skb(lp->sav_skb, FREE_WRITE);
+		dev_kfree_skb(lp->sav_skb);
 		lp->sav_skb = NULL;
 	}
 #ifdef DEV_NUMBUFFS
@@ -452,11 +452,11 @@
 				if ((!lp->dialstate) && (lp->flags & ISDN_NET_CONNECTED)) {
 					lp->flags &= ~ISDN_NET_CONNECTED;
 					if (lp->first_skb) {
-						dev_kfree_skb(lp->first_skb, FREE_WRITE);
+						dev_kfree_skb(lp->first_skb);
 						lp->first_skb = NULL;
 					}
 					if (lp->sav_skb) {
-						dev_kfree_skb(lp->sav_skb, FREE_WRITE);
+						dev_kfree_skb(lp->sav_skb);
 						lp->sav_skb = NULL;
 					}
 					isdn_free_channel(lp->isdn_device, lp->isdn_channel,
@@ -912,7 +912,7 @@
 	}
 	if (ret < 0) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		lp->stats.tx_errors++;
 		clear_bit(0, (void *) &(ndev->tbusy));
 		return 0;
@@ -1043,7 +1043,7 @@
 #else
 					isdn_net_unreachable(ndev, skb,
 							   "No channel");
-					dev_kfree_skb(skb, FREE_WRITE);
+					dev_kfree_skb(skb);
 					ndev->tbusy = 0;
 					return 0;
 #endif
@@ -1059,7 +1059,7 @@
 				if (lp->p_encap == ISDN_NET_ENCAP_SYNCPPP) {
 					/* no 'first_skb' handling for syncPPP */
 					if (isdn_ppp_bind(lp) < 0) {
-						dev_kfree_skb(skb, FREE_WRITE);
+						dev_kfree_skb(skb);
 						isdn_net_unbind_channel(lp);
 						restore_flags(flags);
 						return 0;	/* STN (skb to nirvana) ;) */
@@ -1074,7 +1074,7 @@
 				 */
 				if (lp->first_skb) {
 					printk(KERN_WARNING "isdn_net_start_xmit: First skb already set!\n");
-					dev_kfree_skb(lp->first_skb, FREE_WRITE);
+					dev_kfree_skb(lp->first_skb);
 					lp->first_skb = NULL;
 				}
 				lp->first_skb = skb;
@@ -1086,7 +1086,7 @@
 			} else {
 				isdn_net_unreachable(ndev, skb,
 						     "No phone number");
-				dev_kfree_skb(skb, FREE_WRITE);
+				dev_kfree_skb(skb);
 				ndev->tbusy = 0;
 				return 0;
 			}
@@ -1272,7 +1272,7 @@
 		default:
 			printk(KERN_WARNING "%s: unknown encapsulation, dropping\n",
 			       lp->name);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return;
 	}
 	netif_rx(skb);
@@ -2610,7 +2610,7 @@
 	for (i = 0; i < DEV_NUMBUFFS; i++) {
 		struct sk_buff *skb;
 		while ((skb = skb_dequeue(&dev->buffs[i])))
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 	}
 
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/isdn_ppp.c linux/drivers/isdn/isdn_ppp.c
--- v2.1.85/linux/drivers/isdn/isdn_ppp.c	Mon Dec  8 23:58:04 1997
+++ linux/drivers/isdn/isdn_ppp.c	Tue Feb 10 13:09:53 1998
@@ -881,7 +881,7 @@
 			}
 			if ((cnt = isdn_writebuf_skb_stub(lp->isdn_device, lp->isdn_channel, skb)) != count) {
 				if (lp->sav_skb) {
-					dev_kfree_skb(lp->sav_skb, FREE_WRITE);
+					dev_kfree_skb(lp->sav_skb);
 					printk(KERN_INFO "isdn_ppp_write: freeing sav_skb (%d,%d)!\n", cnt, count);
 				} else
 					printk(KERN_INFO "isdn_ppp_write: Can't write PPP frame to LL (%d,%d)!\n", cnt, count);
@@ -955,7 +955,7 @@
 		skb_pull(skb, 2);
 	else if (is->pppcfg & SC_REJ_COMP_AC) {
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, 0 /* FREE_READ */ );
+		dev_kfree_skb(skb);
 		return;         /* discard it silently */
 	}
 #ifdef CONFIG_ISDN_MPP
@@ -1065,7 +1065,7 @@
 					net_dev->ib.modify = 0;
 					printk(KERN_WARNING "ippp/MPPP: Bad! Can't alloc sq node!\n");
 					SET_SKB_FREE(skb);
-					dev_kfree_skb(skb, 0 /* FREE_READ */ );
+					dev_kfree_skb(skb);
 					return;	/* discard */
 				}
 				q->skb = skb;
@@ -1144,7 +1144,7 @@
 				printk(KERN_WARNING "isdn_ppp: received illegal VJC_UNCOMP frame!\n");
 				net_dev->local.stats.rx_dropped++;
 				SET_SKB_FREE(skb);
-				dev_kfree_skb(skb, 0 /* FREE_READ */ );
+				dev_kfree_skb(skb);
 				return;
 			}
 #endif
@@ -1169,7 +1169,7 @@
 				if (!skb) {
 					printk(KERN_WARNING "%s: Memory squeeze, dropping packet.\n", dev->name);
 					net_dev->local.stats.rx_dropped++;
-					dev_kfree_skb(skb_old, 0 /* FREE_READ */ );
+					dev_kfree_skb(skb_old);
 					return;
 				}
 				skb->dev = dev;
@@ -1178,10 +1178,10 @@
 				skb->mac.raw = skb->data;
 				pkt_len = slhc_uncompress(ippp_table[net_dev->local.ppp_slot]->slcomp,
 						skb->data, skb_old->len);
-				dev_kfree_skb(skb_old, 0 /* FREE_READ */ );
+				dev_kfree_skb(skb_old);
 				if (pkt_len < 0) {
 					SET_SKB_FREE(skb);
-					dev_kfree_skb(skb, 0 /* FREE_READ */ );
+					dev_kfree_skb(skb);
 					lp->stats.rx_dropped++;
 					return;
 				}
@@ -1192,14 +1192,14 @@
 			printk(KERN_INFO "isdn: Ooopsa .. VJ-Compression support not compiled into isdn driver.\n");
 			lp->stats.rx_dropped++;
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, 0 /* FREE_READ */ );
+			dev_kfree_skb(skb);
 			return;
 #endif
 			break;
 		default:
 			isdn_ppp_fill_rq(skb->data, skb->len, proto, lp->ppp_slot);	/* push data to pppd device */
 			SET_SKB_FREE(skb);
-			dev_kfree_skb(skb, 0 /* FREE_READ */ );
+			dev_kfree_skb(skb);
 			return;
 	}
 
@@ -1273,7 +1273,7 @@
 			proto = PPP_IPX;	/* untested */
 			break;
 		default:
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			printk(KERN_ERR "isdn_ppp: skipped frame with unsupported protocoll: %#x.\n", skb->protocol);
 			return 0;
 	}
@@ -1320,10 +1320,10 @@
 			if (buf != skb->data) {	/* copied to new buffer ??? (btw: WHY must slhc copy it?? *sigh*)  */
 				if (new_skb->data != buf)
 					printk(KERN_ERR "isdn_ppp: FATAL error after slhc_compress!!\n");
-				dev_kfree_skb(skb, FREE_WRITE);
+				dev_kfree_skb(skb);
 				skb = new_skb;
 			} else {
-				dev_kfree_skb(new_skb, 0 /* FREE_WRITE */ );
+				dev_kfree_skb(new_skb);
 			}
 
 			skb_trim(skb, pktlen);
@@ -1389,7 +1389,7 @@
 	if (isdn_net_send_skb(dev, lp, skb)) {
 		if (lp->sav_skb) {	/* whole sav_skb processing with disabled IRQs ?? */
 			printk(KERN_ERR "%s: whoops .. there is another stored skb!\n", dev->name);
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		} else
 			lp->sav_skb = skb;
 	}
@@ -1408,7 +1408,7 @@
 		struct sqqueue *qn = q->next;
 		if (q->skb) {
 			SET_SKB_FREE(q->skb);
-			dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
+			dev_kfree_skb(q->skb);
 		}
 		kfree(q);
 		q = qn;
@@ -1425,7 +1425,7 @@
 	while (q) {
 		struct mpqueue *ql = q->next;
 		SET_SKB_FREE(q->skb);
-		dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
+		dev_kfree_skb(q->skb);
 		kfree(q);
 		q = ql;
 	}
@@ -1600,7 +1600,7 @@
 		while (q) {
 			struct mpqueue *ql = q->next;
 			SET_SKB_FREE(q->skb);
-			dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
+			dev_kfree_skb(q->skb);
 			kfree(q);
 			q = ql;
 		}
@@ -1613,7 +1613,7 @@
 		memcpy((*skb)->data + cnt, q->skb->data, q->skb->len);
 		cnt += q->skb->len;
 		SET_SKB_FREE(q->skb);
-		dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
+		dev_kfree_skb(q->skb);
 		kfree(q);
 		q = ql;
 	}
@@ -1672,7 +1672,7 @@
 				while (q) {
 					ql = q->last;
 					SET_SKB_FREE(q->skb);
-					dev_kfree_skb(q->skb, 0 /* FREE_READ */ );
+					dev_kfree_skb(q->skb);
 					kfree(q);
 #ifdef CONFIG_ISDN_PPP_VJ
 					toss = 1;
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/isdn_tty.c linux/drivers/isdn/isdn_tty.c
--- v2.1.85/linux/drivers/isdn/isdn_tty.c	Mon Dec 29 10:22:42 1997
+++ linux/drivers/isdn/isdn_tty.c	Tue Feb 10 13:07:50 1998
@@ -276,7 +276,7 @@
 						tty->flip.flag_buf_ptr[len - 1] = 0xff;
 					queue_task(&tty->flip.tqueue, &tq_timer);
 					SET_SKB_FREE(skb);
-					kfree_skb(skb, FREE_READ);
+					kfree_skb(skb);
 					return 1;
 				}
 			}
@@ -372,7 +372,7 @@
 		) {
 		/* If Modem not listening, drop data */
 		SET_SKB_FREE(skb);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 1;
 	}
 	if (info->emu.mdmreg[13] & 2)
@@ -384,7 +384,7 @@
 		printk(KERN_WARNING
 		       "isdn_audio: insufficient skb_headroom, dropping\n");
 		SET_SKB_FREE(skb);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 1;
 	}
 	ISDN_AUDIO_SKB_DLECOUNT(skb) = 0;
@@ -456,13 +456,13 @@
 	if (skb_queue_len(&info->xmit_queue))
 		while ((skb = skb_dequeue(&info->xmit_queue))) {
 			SET_SKB_FREE(skb);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		}
 #ifdef CONFIG_ISDN_AUDIO
 	if (skb_queue_len(&info->dtmf_queue))
 		while ((skb = skb_dequeue(&info->dtmf_queue))) {
 			SET_SKB_FREE(skb);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		}
 #endif
 	restore_flags(flags);
@@ -493,7 +493,7 @@
 	if (slen < 0) {
 		/* Error: no channel, already shutdown, or wrong parameter */
 		SET_SKB_FREE(skb);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return;
 	}
 	if (slen)
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/pcbit/drv.c linux/drivers/isdn/pcbit/drv.c
--- v2.1.85/linux/drivers/isdn/pcbit/drv.c	Thu May 29 21:53:06 1997
+++ linux/drivers/isdn/pcbit/drv.c	Tue Feb 10 13:07:50 1998
@@ -733,7 +733,7 @@
 
 	SET_SKB_FREE(skb);
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/pcbit/layer2.c linux/drivers/isdn/pcbit/layer2.c
--- v2.1.85/linux/drivers/isdn/pcbit/layer2.c	Thu Feb 27 10:57:30 1997
+++ linux/drivers/isdn/pcbit/layer2.c	Tue Feb 10 13:07:50 1998
@@ -106,13 +106,13 @@
 	unsigned long flags;
 
 	if (dev->l2_state != L2_RUNNING && dev->l2_state != L2_LOADING) {
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return -1;
 	}
 	if ((frame = (struct frame_buf *) kmalloc(sizeof(struct frame_buf),
 						  GFP_ATOMIC)) == NULL) {
 		printk(KERN_WARNING "pcbit_2_write: kmalloc failed\n");
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return -1;
 	}
 	frame->msg = msg;
@@ -287,7 +287,7 @@
 
 			if (frame->skb != NULL) {
 				/* free frame */
-				dev_kfree_skb(frame->skb, FREE_WRITE);
+				dev_kfree_skb(frame->skb);
 			}
 			kfree(frame);
 		}
@@ -382,7 +382,7 @@
 			/* discard previous queued frame */
 			if (dev->read_frame->skb) {
 				SET_SKB_FREE(dev->read_frame->skb);
-				kfree_skb(dev->read_frame->skb, FREE_READ);
+				kfree_skb(dev->read_frame->skb);
 			}
 			kfree(dev->read_frame);
 			dev->read_frame = NULL;
@@ -650,7 +650,7 @@
 	if (dev->read_frame) {
 		if (dev->read_frame->skb) {
 			SET_SKB_FREE(dev->read_frame->skb);
-			kfree_skb(dev->read_frame->skb, FREE_READ);
+			kfree_skb(dev->read_frame->skb);
 		}
 		kfree(dev->read_frame);
 		dev->read_frame = NULL;
@@ -661,7 +661,7 @@
 		dev->write_queue = dev->write_queue->next;
 
 		if (frame->skb) {
-			dev_kfree_skb(frame->skb, FREE_WRITE);
+			dev_kfree_skb(frame->skb);
 		}
 		kfree(frame);
 #else
diff -u --recursive --new-file v2.1.85/linux/drivers/isdn/sc/packet.c linux/drivers/isdn/sc/packet.c
--- v2.1.85/linux/drivers/isdn/sc/packet.c	Thu Feb 27 10:57:30 1997
+++ linux/drivers/isdn/sc/packet.c	Tue Feb 10 13:07:50 1998
@@ -100,7 +100,7 @@
 			adapter[card]->channel[channel].num_sendbufs ? 0 :
 			adapter[card]->channel[channel].next_sendbuf;
 			pr_debug("%s: Packet sent successfully\n", adapter[card]->devicename);
-		dev_kfree_skb(data, FREE_WRITE);
+		dev_kfree_skb(data);
 		indicate_status(card,ISDN_STAT_BSENT,channel,NULL);
 	}
 	return data->len;
diff -u --recursive --new-file v2.1.85/linux/drivers/misc/parport_pc.c linux/drivers/misc/parport_pc.c
--- v2.1.85/linux/drivers/misc/parport_pc.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/misc/parport_pc.c	Mon Feb  9 11:33:11 1998
@@ -27,7 +27,8 @@
  *
  * All registers are 8 bits wide and read/write.  If your hardware differs
  * only in register addresses (eg because your registers are on 32-bit
- * word boundaries) then you can alter the constants below to accomodate this.
+ * word boundaries) then you can alter the constants in parport_pc.h to
+ * accomodate this.
  */
 
 #include <linux/stddef.h>
diff -u --recursive --new-file v2.1.85/linux/drivers/misc/parport_procfs.c linux/drivers/misc/parport_procfs.c
--- v2.1.85/linux/drivers/misc/parport_procfs.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/misc/parport_procfs.c	Mon Feb  9 11:33:11 1998
@@ -3,6 +3,7 @@
  * Authors: David Campbell <campbell@torque.net>
  *          Tim Waugh <tim@cyberelk.demon.co.uk>
  *          Philip Blundell <philb@gnu.org>
+ *          Andrea Arcangeli <arcangeli@mbox.queen.it>
  *
  * based on work by Grant Guenther <grant@torque.net>
  *              and Philip Blundell
@@ -13,6 +14,7 @@
 #include <asm/ptrace.h>
 #include <asm/io.h>
 #include <asm/dma.h>
+#include <asm/irq.h>
 
 #include <linux/delay.h>
 #include <linux/errno.h>
@@ -30,7 +32,7 @@
 static int irq_write_proc(struct file *file, const char *buffer,
 					  unsigned long count, void *data)
 {
-	int newirq;
+	unsigned int newirq, oldirq;
 	struct parport *pp = (struct parport *)data;
 	
 	if (count > 5 )  /* more than 4 digits + \n for a irq 0x?? 0?? ??  */
@@ -49,32 +51,34 @@
 		}
 	}
 
+	if (newirq >= NR_IRQS)
+		return -EOVERFLOW;
+
 	if (pp->irq != PARPORT_IRQ_NONE && !(pp->flags & PARPORT_FLAG_COMA)) {
-		if (pp->cad->irq_func)
+		if (pp->cad != NULL && pp->cad->irq_func != NULL)
 			free_irq(pp->irq, pp->cad->private);
 		else
 			free_irq(pp->irq, NULL);
 	}
 
+	oldirq = pp->irq;
 	pp->irq = newirq;
 
 	if (pp->irq != PARPORT_IRQ_NONE && !(pp->flags & PARPORT_FLAG_COMA)) { 
-		struct pardevice *pd = pp->cad;
+		struct pardevice *cad = pp->cad;
 
-		if (pd == NULL) {
-			pd = pp->devices;
-			if (pd != NULL) 
-				request_irq(pp->irq, pd->irq_func ? 
-					    pd->irq_func :
-					    parport_null_intr_func,
-					    SA_INTERRUPT, pd->name,
-					    pd->private);
-		} else {
-			request_irq(pp->irq, pd->irq_func ? pd->irq_func :
-				    parport_null_intr_func,
+		if (cad == NULL)
+			request_irq(pp->irq, parport_null_intr_func,
 				    SA_INTERRUPT, pp->name, NULL);
-		}
+		else
+			request_irq(pp->irq, cad->irq_func ? cad->irq_func :
+				    parport_null_intr_func, SA_INTERRUPT,
+				    cad->name, cad->private);
 	}
+
+	if (oldirq != PARPORT_IRQ_NONE && newirq == PARPORT_IRQ_NONE &&
+	    pp->cad != NULL && pp->cad->irq_func != NULL)
+		pp->cad->irq_func(pp->irq, pp->cad->private, NULL);
 
 	return count;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c501.c linux/drivers/net/3c501.c
--- v2.1.85/linux/drivers/net/3c501.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/3c501.c	Tue Feb 10 12:56:43 1998
@@ -470,7 +470,7 @@
 
 	if (el_debug > 2)
 		printk(" queued xmit.\n");
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c505.c linux/drivers/net/3c505.c
--- v2.1.85/linux/drivers/net/3c505.c	Wed Dec 10 09:45:15 1997
+++ linux/drivers/net/3c505.c	Tue Feb 10 12:56:43 1998
@@ -698,7 +698,7 @@
 			outb_control(adapter->hcr_val & ~(DMAE | TCEN | DIR),
 				     dev);
 			if (adapter->current_dma.direction) {
-				dev_kfree_skb(adapter->current_dma.skb, FREE_WRITE);
+				dev_kfree_skb(adapter->current_dma.skb);
 			} else {
 				struct sk_buff *skb = adapter->current_dma.skb;
 				if (skb) {
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c507.c linux/drivers/net/3c507.c
--- v2.1.85/linux/drivers/net/3c507.c	Mon Nov 10 16:17:17 1997
+++ linux/drivers/net/3c507.c	Tue Feb 10 12:56:43 1998
@@ -493,7 +493,7 @@
 		outb(0x84, ioaddr + MISC_CTRL);
 	}
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	/* You might need to clean up and record Tx statistics here. */
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
--- v2.1.85/linux/drivers/net/3c509.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/3c509.c	Tue Feb 10 12:56:43 1998
@@ -548,7 +548,7 @@
 			outw(SetTxThreshold + 1536, ioaddr + EL3_CMD);
 	}
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	/* Clear the Tx status stack. */
 	{
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c523.c linux/drivers/net/3c523.c
--- v2.1.85/linux/drivers/net/3c523.c	Tue May 13 22:41:08 1997
+++ linux/drivers/net/3c523.c	Tue Feb 10 12:56:43 1998
@@ -1154,7 +1154,7 @@
       elmc_attn586();
       dev->trans_start = jiffies;
       if(!i) {
-        dev_kfree_skb(skb,FREE_WRITE);
+        dev_kfree_skb(skb);
 	  }
       WAIT_4_SCB_CMD();
       if( (p->scb->status & CU_ACTIVE)) /* test it, because CU sometimes doesn't start immediately */
@@ -1179,7 +1179,7 @@
     p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0]));
     dev->trans_start = jiffies;
     p->nop_point = next_nop;
-    dev_kfree_skb(skb,FREE_WRITE);
+    dev_kfree_skb(skb);
 #  endif
 #else
     p->xmit_buffs[p->xmit_count]->size = TBD_LAST | len;
@@ -1201,7 +1201,7 @@
       dev->tbusy = 0;
     }
     sti();
-    dev_kfree_skb(skb,FREE_WRITE);
+    dev_kfree_skb(skb);
 #endif
   }
   return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/3c59x.c linux/drivers/net/3c59x.c
--- v2.1.85/linux/drivers/net/3c59x.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/net/3c59x.c	Tue Feb 10 12:56:43 1998
@@ -1279,7 +1279,7 @@
 		if (vp->tx_skbuff[entry]) {
 			if (vortex_debug > 0)
 				printk(" %d\n", entry);
-			dev_kfree_skb(vp->tx_skbuff[entry], FREE_WRITE);
+			dev_kfree_skb(vp->tx_skbuff[entry]);
 			vp->tx_skbuff[entry] = 0;
 			vp->stats.tx_dropped++;
 		}
@@ -1340,7 +1340,7 @@
 	} else {
 		/* ... and the packet rounded to a doubleword. */
 		outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		if (inw(ioaddr + TxFree) > 1536) {
 			dev->tbusy = 0;
 		} else
@@ -1350,7 +1350,7 @@
 #else
 	/* ... and the packet rounded to a doubleword. */
 	outsl(ioaddr + TX_FIFO, skb->data, (skb->len + 3) >> 2);
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 	if (inw(ioaddr + TxFree) > 1536) {
 		dev->tbusy = 0;
 	} else
@@ -1527,7 +1527,7 @@
 					virt_to_bus(&lp->tx_ring[entry]))
 					break;			/* It still hasn't been processed. */
 				if (lp->tx_skbuff[entry]) {
-					dev_kfree_skb(lp->tx_skbuff[entry], FREE_WRITE);
+					dev_kfree_skb(lp->tx_skbuff[entry]);
 					lp->tx_skbuff[entry] = 0;
 				}
 				/* lp->stats.tx_packets++;  Counted below. */
@@ -1545,7 +1545,7 @@
 		if (status & DMADone) {
 			outw(0x1000, ioaddr + Wn7_MasterStatus); /* Ack the event. */
 			dev->tbusy = 0;
-			dev_kfree_skb (lp->tx_skb, FREE_WRITE); /* Release the transfered buffer */
+			dev_kfree_skb (lp->tx_skb); /* Release the transfered buffer */
 			mark_bh(NET_BH);
 		}
 #endif
@@ -1854,7 +1854,7 @@
 #if LINUX_VERSION_CODE < 0x20100
 				vp->rx_skbuff[i]->free = 1;
 #endif
-				dev_kfree_skb (vp->rx_skbuff[i], FREE_WRITE);
+				dev_kfree_skb (vp->rx_skbuff[i]);
 				vp->rx_skbuff[i] = 0;
 			}
 	}
@@ -1862,7 +1862,7 @@
 		outl(0, ioaddr + DownListPtr);
 		for (i = 0; i < TX_RING_SIZE; i++)
 			if (vp->tx_skbuff[i]) {
-				dev_kfree_skb(vp->tx_skbuff[i], FREE_WRITE);
+				dev_kfree_skb(vp->tx_skbuff[i]);
 				vp->tx_skbuff[i] = 0;
 			}
 	}
diff -u --recursive --new-file v2.1.85/linux/drivers/net/8390.c linux/drivers/net/8390.c
--- v2.1.85/linux/drivers/net/8390.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/net/8390.c	Tue Feb 10 12:56:43 1998
@@ -194,7 +194,7 @@
 	outb_p(ENISR_ALL, e8390_base + EN0_IMR);
 	enable_irq(dev->irq);
 	ei_local->stat.tx_errors++;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	return 0;
     }
     ei_local->irqlock = 1;
@@ -279,7 +279,7 @@
     outb_p(ENISR_ALL, e8390_base + EN0_IMR);
     enable_irq(dev->irq);
 
-    dev_kfree_skb (skb, FREE_WRITE);
+    dev_kfree_skb (skb);
     ei_local->stat.tx_bytes += send_length;
     
     return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/a2065.c linux/drivers/net/a2065.c
--- v2.1.85/linux/drivers/net/a2065.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/a2065.c	Tue Feb 10 12:56:43 1998
@@ -630,7 +630,7 @@
 	/* Kick the lance: transmit now */
 	ll->rdp = LE_C0_INEA | LE_C0_TDMD;
 	dev->trans_start = jiffies;
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
     
 	if (TX_BUFFS_AVAIL)
 		dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/apricot.c linux/drivers/net/apricot.c
--- v2.1.85/linux/drivers/net/apricot.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/apricot.c	Tue Feb 10 12:56:43 1998
@@ -407,7 +407,7 @@
 		struct tx_cmd *tx_cmd = (struct tx_cmd *) ptr;
 		struct sk_buff *skb = ((struct sk_buff *)(tx_cmd->tbd->data)) -1;
 
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 
 		lp->stats.tx_errors++;
 		lp->stats.tx_aborted_errors++;
@@ -615,7 +615,7 @@
 	    printk ("%s: i596_xmit Memory squeeze, dropping packet.\n", dev->name);
 	    lp->stats.tx_dropped++;
 
-	    dev_kfree_skb(skb, FREE_WRITE);
+	    dev_kfree_skb(skb);
 	}
 	else
 	{
@@ -790,7 +790,7 @@
 		    struct tx_cmd *tx_cmd = (struct tx_cmd *) ptr;
 		    struct sk_buff *skb = ((struct sk_buff *)(tx_cmd->tbd->data)) -1;
 
-		    dev_kfree_skb(skb, FREE_WRITE);
+		    dev_kfree_skb(skb);
 
 		    if ((ptr->status) & STAT_OK)
 		    {
diff -u --recursive --new-file v2.1.85/linux/drivers/net/arc-rimi.c linux/drivers/net/arc-rimi.c
--- v2.1.85/linux/drivers/net/arc-rimi.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/arc-rimi.c	Tue Feb 10 12:56:44 1998
@@ -479,7 +479,7 @@
 	      if (out->skb)
 		{
 		  lp->stats.tx_bytes += out->skb->len;
-		  dev_kfree_skb(out->skb,FREE_WRITE);
+		  dev_kfree_skb(out->skb);
 		}
 	      out->skb=NULL;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/arcnet.c linux/drivers/net/arcnet.c
--- v2.1.85/linux/drivers/net/arcnet.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/arcnet.c	Tue Feb 10 12:56:44 1998
@@ -636,7 +636,7 @@
 
       if (lp->outgoing.skb)
 	{
-	  dev_kfree_skb(lp->outgoing.skb,FREE_WRITE);
+	  dev_kfree_skb(lp->outgoing.skb);
 	  lp->stats.tx_dropped++;
 	}
       lp->outgoing.skb=NULL;
@@ -748,7 +748,7 @@
 
       /* done right away */
       lp->stats.tx_bytes += out->skb->len;
-      dev_kfree_skb(out->skb,FREE_WRITE);
+      dev_kfree_skb(out->skb);
       out->skb=NULL;
 
       if (arcnet_go_tx(dev,1))
@@ -797,7 +797,7 @@
 	  if (out->skb)
 	    {
 	      lp->stats.tx_bytes += skb->len;
-	      dev_kfree_skb(out->skb,FREE_WRITE);
+	      dev_kfree_skb(out->skb);
 	    }
 	  out->skb=NULL;
 	}
@@ -1101,7 +1101,7 @@
 		 in->sequence,arcsoft->split_flag,
 		 arcsoft->sequence);
 	  lp->aborted_seq=arcsoft->sequence;
-	  kfree_skb(in->skb,FREE_WRITE);
+	  kfree_skb(in->skb);
 	  lp->stats.rx_errors++;
 	  lp->stats.rx_missed_errors++;
 	  in->skb=NULL;
@@ -1198,7 +1198,7 @@
 	  BUGMSG(D_EXTRA,"wrong seq number (saddr=%d, expected=%d, seq=%d, splitflag=%d)\n",
 		 saddr,in->sequence,arcsoft->sequence,
 		 arcsoft->split_flag);
-	  kfree_skb(in->skb,FREE_WRITE);
+	  kfree_skb(in->skb);
 	  in->skb=NULL;
 	  lp->stats.rx_errors++;
 	  lp->stats.rx_missed_errors++;
@@ -1216,7 +1216,7 @@
 		     arcsoft->sequence);
 	      lp->stats.rx_errors++;
 	      lp->stats.rx_missed_errors++;
-	      kfree_skb(in->skb,FREE_WRITE);
+	      kfree_skb(in->skb);
 	    }
 
 	  in->sequence=arcsoft->sequence;
@@ -1288,7 +1288,7 @@
 		     in->sequence,arcsoft->split_flag,
 		     arcsoft->sequence);
 	      lp->aborted_seq=arcsoft->sequence;
-	      kfree_skb(in->skb,FREE_WRITE);
+	      kfree_skb(in->skb);
 	      in->skb=NULL;
 	      lp->stats.rx_errors++;
 	      lp->stats.rx_missed_errors++;
@@ -1434,7 +1434,9 @@
   struct ClientData *head = (struct ClientData *)skb->data;
   struct device *dev=skb->dev;
   struct arcnet_local *lp=(struct arcnet_local *)(dev->priv);
+#ifdef CONFIG_INET
   int status;
+#endif
 
   /*
    * Only ARP and IP are currently supported
@@ -1583,7 +1585,7 @@
 	     length);
       BUGMSG(D_NORMAL,"transmit aborted.\n");
 
-      dev_kfree_skb(skb,FREE_WRITE);
+      dev_kfree_skb(skb);
       lp->intx--;
       return 0;
     }
@@ -1613,7 +1615,7 @@
   (*lp->prepare_tx)(dev, &proto, 1, skb->data, length-1, daddr, 0,
 			   offset);
 
-  dev_kfree_skb(skb,FREE_WRITE);
+  dev_kfree_skb(skb);
 
   if (arcnet_go_tx(dev,1))
     {
@@ -1740,7 +1742,7 @@
 			hdr->daddr,0,0);
 
       /* done right away */
-      dev_kfree_skb(skb,FREE_WRITE);
+      dev_kfree_skb(skb);
 
       if (arcnet_go_tx(dev,1))
 	{
@@ -1752,7 +1754,7 @@
     {
       BUGMSG(D_NORMAL,"packet too long (length=%d)\n",
 	     length);
-      dev_kfree_skb(skb,FREE_WRITE);
+      dev_kfree_skb(skb);
       lp->stats.tx_dropped++;
       arcnet_tx_done(lp->adev, lp);
     }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ariadne.c linux/drivers/net/ariadne.c
--- v2.1.85/linux/drivers/net/ariadne.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ariadne.c	Tue Feb 10 12:56:44 1998
@@ -655,7 +655,7 @@
 
     priv->tx_ring[entry]->TMD1 = (priv->tx_ring[entry]->TMD1&0xff00)|TF_OWN|TF_STP|TF_ENP;
 
-    dev_kfree_skb(skb, FREE_WRITE);
+    dev_kfree_skb(skb);
 
     priv->cur_tx++;
     if ((priv->cur_tx >= TX_RING_SIZE) && (priv->dirty_tx >= TX_RING_SIZE)) {
diff -u --recursive --new-file v2.1.85/linux/drivers/net/at1700.c linux/drivers/net/at1700.c
--- v2.1.85/linux/drivers/net/at1700.c	Sun Nov 30 12:21:45 1997
+++ linux/drivers/net/at1700.c	Tue Feb 10 12:56:44 1998
@@ -424,7 +424,7 @@
 		/* Turn on Tx interrupts back on. */
 		outb(0x82, ioaddr + TX_INTR);
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/atari_bionet.c linux/drivers/net/atari_bionet.c
--- v2.1.85/linux/drivers/net/atari_bionet.c	Wed Apr 23 19:01:18 1997
+++ linux/drivers/net/atari_bionet.c	Tue Feb 10 12:56:44 1998
@@ -465,7 +465,7 @@
 		lp->stats.tx_packets++;
 		lp->stats.tx_bytes+=length;
 	}
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/atari_pamsnet.c linux/drivers/net/atari_pamsnet.c
--- v2.1.85/linux/drivers/net/atari_pamsnet.c	Wed Apr 23 19:01:18 1997
+++ linux/drivers/net/atari_pamsnet.c	Tue Feb 10 12:56:44 1998
@@ -730,7 +730,7 @@
 		lp->stats.tx_packets++;
 		lp->stats.tx_bytes+=length;
 	}
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/atarilance.c linux/drivers/net/atarilance.c
--- v2.1.85/linux/drivers/net/atarilance.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/atarilance.c	Tue Feb 10 12:56:44 1998
@@ -817,7 +817,7 @@
 	head->misc = 0;
 	lp->memcpy_f( PKTBUF_ADDR(head), (void *)skb->data, skb->len );
 	head->flag = TMD1_OWN_CHIP | TMD1_ENP | TMD1_STP;
-	dev_kfree_skb( skb, FREE_WRITE );
+	dev_kfree_skb( skb );
 	lp->cur_tx++;
 	while( lp->cur_tx >= TX_RING_SIZE && lp->dirty_tx >= TX_RING_SIZE ) {
 		lp->cur_tx -= TX_RING_SIZE;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/atp.c linux/drivers/net/atp.c
--- v2.1.85/linux/drivers/net/atp.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/atp.c	Tue Feb 10 12:56:44 1998
@@ -467,7 +467,7 @@
 		write_reg_high(ioaddr, IMR, ISRh_RxErr);
 	}
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/com20020.c linux/drivers/net/com20020.c
--- v2.1.85/linux/drivers/net/com20020.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/com20020.c	Tue Feb 10 12:56:44 1998
@@ -720,7 +720,7 @@
 	      if (out->skb)
 		{
 		  lp->stats.tx_bytes += out->skb->len;
-		  dev_kfree_skb(out->skb,FREE_WRITE);
+		  dev_kfree_skb(out->skb);
 		}
 	      out->skb=NULL;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/com90io.c linux/drivers/net/com90io.c
--- v2.1.85/linux/drivers/net/com90io.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/com90io.c	Tue Feb 10 12:56:44 1998
@@ -611,7 +611,7 @@
 	      if (out->skb)
 		{
 		  lp->stats.tx_bytes += out->skb->len;
-		  dev_kfree_skb(out->skb,FREE_WRITE);
+		  dev_kfree_skb(out->skb);
 		}
 	      out->skb=NULL;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/com90xx.c linux/drivers/net/com90xx.c
--- v2.1.85/linux/drivers/net/com90xx.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/com90xx.c	Tue Feb 10 12:56:44 1998
@@ -886,7 +886,7 @@
 	      if (out->skb)
 		{
 		  lp->stats.tx_bytes += out->skb->len;
-		  dev_kfree_skb(out->skb,FREE_WRITE);
+		  dev_kfree_skb(out->skb);
 		}
 	      out->skb=NULL;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/cops.c linux/drivers/net/cops.c
--- v2.1.85/linux/drivers/net/cops.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/cops.c	Tue Feb 10 12:56:44 1998
@@ -747,7 +747,7 @@
         {
                 printk(KERN_NOTICE "%s: Bad packet length of %d bytes.\n", dev->name, pkt_len);
                 lp->stats.tx_errors++;
-                kfree_skb(skb, FREE_READ);
+                kfree_skb(skb);
                 return;
         }
 
@@ -755,7 +755,7 @@
         if(rsp_type == LAP_INIT_RSP)
         {
                 lp->node_acquire = skb->data[0];        /* Nodeid taken from received packet. */
-                kfree_skb(skb, FREE_READ);
+                kfree_skb(skb);
                 return;
         }
 
@@ -764,7 +764,7 @@
         {
                 printk("%s: Bad packet type %d.\n", dev->name, rsp_type);
                 lp->stats.tx_errors++;
-                kfree_skb(skb, FREE_READ);
+                kfree_skb(skb);
                 return;
         }
 
@@ -856,7 +856,7 @@
 		dev->trans_start = jiffies;
 	}
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 	dev->tbusy = 0;
 
         return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/cs89x0.c linux/drivers/net/cs89x0.c
--- v2.1.85/linux/drivers/net/cs89x0.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/cs89x0.c	Tue Feb 10 12:56:44 1998
@@ -782,7 +782,7 @@
 		restore_flags(flags);
 		dev->trans_start = jiffies;
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/de4x5.c linux/drivers/net/de4x5.c
--- v2.1.85/linux/drivers/net/de4x5.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/net/de4x5.c	Tue Feb 10 12:56:44 1998
@@ -1721,7 +1721,7 @@
 
 	    /* Free the buffer. */
 	    if (lp->tx_skb[entry] != NULL) {
-		dev_kfree_skb(lp->tx_skb[entry], FREE_WRITE);
+		dev_kfree_skb(lp->tx_skb[entry]);
 		lp->tx_skb[entry] = NULL;
 	    }
 	}
@@ -3594,7 +3594,7 @@
 
     for (i=0; i<lp->rxRingSize; i++) {
 	if ((u_long) lp->rx_skb[i] > 1) {
-	    dev_kfree_skb(lp->rx_skb[i], FREE_WRITE);
+	    dev_kfree_skb(lp->rx_skb[i]);
 	}
 	lp->rx_ring[i].status = 0;
 	lp->rx_skb[i] = (struct sk_buff *)1;    /* Dummy entry */
@@ -3611,7 +3611,7 @@
 
     for (i=0; i<lp->txRingSize; i++) {
 	if (lp->tx_skb[i]) {
-	    dev_kfree_skb(lp->tx_skb[i], FREE_WRITE);
+	    dev_kfree_skb(lp->tx_skb[i]);
 	    lp->tx_skb[i] = NULL;
 	}
 	lp->tx_ring[i].status = 0;
@@ -3619,7 +3619,7 @@
 
     /* Unload the locally queued packets */
     while (lp->cache.skb) {
-	dev_kfree_skb(de4x5_get_cache(dev), FREE_WRITE);
+	dev_kfree_skb(de4x5_get_cache(dev));
     }
 
     return;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/de600.c linux/drivers/net/de600.c
--- v2.1.85/linux/drivers/net/de600.c	Sun Nov 30 12:21:45 1997
+++ linux/drivers/net/de600.c	Tue Feb 10 12:56:44 1998
@@ -471,7 +471,7 @@
 		skb->sk->prot->rspace = de600_rspace; /* Ugh! */
 #endif
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/de620.c linux/drivers/net/de620.c
--- v2.1.85/linux/drivers/net/de620.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/de620.c	Tue Feb 10 12:56:44 1998
@@ -580,7 +580,7 @@
 
 	restore_flags(flags); /* interrupts maybe back on */
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/defxx.c linux/drivers/net/defxx.c
--- v2.1.85/linux/drivers/net/defxx.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/defxx.c	Tue Feb 10 12:56:44 1998
@@ -3209,7 +3209,7 @@
 			dev->name, skb->len);
 		bp->xmt_length_errors++;		/* bump error counter */
 		mark_bh(NET_BH);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return(0);				/* return "success" */
 	}
 	/*
@@ -3231,7 +3231,7 @@
 		else
 			{
 			bp->xmt_discards++;					/* bump error counter */
-			dev_kfree_skb(skb, FREE_WRITE);		/* free sk_buff now */
+			dev_kfree_skb(skb);		/* free sk_buff now */
 			return(0);							/* return "success" */
 			}
 		}
@@ -3381,7 +3381,7 @@
 
 		/* Return skb to operating system */
 
-		dev_kfree_skb(p_xmt_drv_descr->p_skb, FREE_WRITE);
+		dev_kfree_skb(p_xmt_drv_descr->p_skb);
 
 		/* Increment transmit counters */
 
@@ -3458,7 +3458,7 @@
 
 		/* Return skb to operating system */
 
-		dev_kfree_skb(p_xmt_drv_descr->p_skb, FREE_WRITE);
+		dev_kfree_skb(p_xmt_drv_descr->p_skb);
 
 		/* Increment transmit error counter */
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/depca.c linux/drivers/net/depca.c
--- v2.1.85/linux/drivers/net/depca.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/depca.c	Tue Feb 10 12:56:44 1998
@@ -818,7 +818,7 @@
 					outw(INEA | TDMD, DEPCA_DATA);
 
 					dev->trans_start = jiffies;
-					dev_kfree_skb(skb, FREE_WRITE);
+					dev_kfree_skb(skb);
 				}
 				if (TX_BUFFS_AVAIL) {
 					dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/dgrs.c linux/drivers/net/dgrs.c
--- v2.1.85/linux/drivers/net/dgrs.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/net/dgrs.c	Tue Feb 10 12:56:44 1998
@@ -776,7 +776,7 @@
 
 	++privN->stats.tx_packets;
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 	return (0);
 
 no_resources:
diff -u --recursive --new-file v2.1.85/linux/drivers/net/dlci.c linux/drivers/net/dlci.c
--- v2.1.85/linux/drivers/net/dlci.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/dlci.c	Tue Feb 10 12:56:44 1998
@@ -230,7 +230,7 @@
 		dlp->stats.rx_packets++;
 	}
 	else
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 }
 
 static int dlci_transmit(struct sk_buff *skb, struct device *dev)
@@ -275,7 +275,7 @@
 		/* experience suggest a slightly more conservative approach */
 
 		if (!ret)
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 
 		dev->tbusy = 0;
 	}
diff -u --recursive --new-file v2.1.85/linux/drivers/net/dummy.c linux/drivers/net/dummy.c
--- v2.1.85/linux/drivers/net/dummy.c	Mon Jan 12 15:28:18 1998
+++ linux/drivers/net/dummy.c	Tue Feb 10 12:56:44 1998
@@ -110,7 +110,7 @@
 static int dummy_xmit(struct sk_buff *skb, struct device *dev)
 {
 	struct net_device_stats *stats;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	stats = (struct net_device_stats *)dev->priv;
 	stats->tx_packets++;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/eepro.c linux/drivers/net/eepro.c
--- v2.1.85/linux/drivers/net/eepro.c	Sun Nov 30 12:21:45 1997
+++ linux/drivers/net/eepro.c	Tue Feb 10 12:56:44 1998
@@ -720,7 +720,7 @@
 		dev->trans_start = jiffies;
 	}
 
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	/* You might need to clean up and record Tx statistics here. */
 	/* lp->stats.tx_aborted_errors++; */
diff -u --recursive --new-file v2.1.85/linux/drivers/net/eepro100.c linux/drivers/net/eepro100.c
--- v2.1.85/linux/drivers/net/eepro100.c	Tue Dec 30 14:19:39 1997
+++ linux/drivers/net/eepro100.c	Tue Feb 10 12:56:44 1998
@@ -1186,7 +1186,7 @@
 				/* Free the original skb. */
 				if (sp->tx_skbuff[entry]) {
 					sp->stats.tx_packets++;	/* Count only user packets. */
-					dev_kfree_skb(sp->tx_skbuff[entry], FREE_WRITE);
+					dev_kfree_skb(sp->tx_skbuff[entry]);
 					sp->tx_skbuff[entry] = 0;
 				}
 				dirty_tx++;
@@ -1426,7 +1426,7 @@
 		sp->rx_skbuff[i] = 0;
 		/* Clear the Rx descriptors. */
 		if (skb)
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 	}
 
 	for (i = 0; i < TX_RING_SIZE; i++) {
@@ -1434,7 +1434,7 @@
 		sp->tx_skbuff[i] = 0;
 		/* Clear the Tx descriptors. */
 		if (skb)
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 	}
 	if (sp->mc_setup_frm) {
 		kfree(sp->mc_setup_frm);
diff -u --recursive --new-file v2.1.85/linux/drivers/net/eexpress.c linux/drivers/net/eexpress.c
--- v2.1.85/linux/drivers/net/eexpress.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/eexpress.c	Tue Feb 10 12:56:44 1998
@@ -537,7 +537,7 @@
 
 	        eexp_hw_tx_pio(dev,data,length);
 	}
-	dev_kfree_skb(buf, FREE_WRITE);
+	dev_kfree_skb(buf);
 	outb(SIRQ_en|irqrmap[dev->irq],dev->base_addr+SET_IRQ);
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/eql.c linux/drivers/net/eql.c
--- v2.1.85/linux/drivers/net/eql.c	Tue Dec  9 09:49:58 1997
+++ linux/drivers/net/eql.c	Tue Feb 10 12:56:44 1998
@@ -387,7 +387,7 @@
 		 */
 
 		eql->stats->tx_dropped++;
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}	  
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/eth16i.c linux/drivers/net/eth16i.c
--- v2.1.85/linux/drivers/net/eth16i.c	Sun Jan  4 10:55:08 1998
+++ linux/drivers/net/eth16i.c	Tue Feb 10 12:56:44 1998
@@ -977,7 +977,7 @@
 		/* Turn TX interrupts back on */
 		/* outb(TX_INTR_DONE | TX_INTR_16_COL, ioaddr + TX_INTR_REG); */
 	}
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ethertap.c linux/drivers/net/ethertap.c
--- v2.1.85/linux/drivers/net/ethertap.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ethertap.c	Tue Feb 10 12:56:44 1998
@@ -136,11 +136,11 @@
 	if(tmp)
 	{
 		if(netlink_post(dev->base_addr, tmp)<0)
-			kfree_skb(tmp, FREE_WRITE);
+			kfree_skb(tmp);
 		lp->stats.tx_bytes+=skb->len;
 		lp->stats.tx_packets++;
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 	return 0;
 }
 
@@ -160,7 +160,7 @@
 	if(dev==NULL)
 	{
 		printk("ethertap: bad unit!\n");
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENXIO;
 	}
 	lp = (struct net_local *)dev->priv;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ewrk3.c linux/drivers/net/ewrk3.c
--- v2.1.85/linux/drivers/net/ewrk3.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ewrk3.c	Tue Feb 10 12:56:44 1998
@@ -847,7 +847,7 @@
 					}
 
 					dev->trans_start = jiffies;
-					dev_kfree_skb(skb, FREE_WRITE);
+					dev_kfree_skb(skb);
 
 				} else {	/* return unused page to the free memory queue */
 					outb(page, EWRK3_FMQ);
diff -u --recursive --new-file v2.1.85/linux/drivers/net/fmv18x.c linux/drivers/net/fmv18x.c
--- v2.1.85/linux/drivers/net/fmv18x.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/fmv18x.c	Tue Feb 10 12:56:44 1998
@@ -388,7 +388,7 @@
 		/* Re-enable interrupts */
 		outw(0x8182, ioaddr + TX_INTR);
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/bpqether.c linux/drivers/net/hamradio/bpqether.c
--- v2.1.85/linux/drivers/net/hamradio/bpqether.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/net/hamradio/bpqether.c	Tue Feb 10 13:07:49 1998
@@ -223,7 +223,7 @@
 	dev = bpq_get_ax25_dev(dev);
 
 	if (dev == NULL || dev->start == 0) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -236,7 +236,7 @@
 
 	if (!(bpq->acpt_addr[0] & 0x01) && memcmp(eth->h_source, bpq->acpt_addr, ETH_ALEN)) {
 		printk(KERN_DEBUG "bpqether: wrong dest %s\n", bpq_print_ethaddr(eth->h_source));
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -277,7 +277,7 @@
 	 */
 	if (!dev->start) {
 		bpq_check_devices(dev);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENODEV;
 	}
 
@@ -291,14 +291,14 @@
 	if (skb_headroom(skb) < AX25_BPQ_HEADER_LEN) {	/* Ough! */
 		if ((newskb = skb_realloc_headroom(skb, AX25_BPQ_HEADER_LEN)) == NULL) {
 			printk(KERN_WARNING "bpqether: out of memory\n");
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -ENOMEM;
 		}
 
 		if (skb->sk != NULL)
 			skb_set_owner_w(newskb, skb->sk);
 
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		skb = newskb;
 	}
 
@@ -313,7 +313,7 @@
 
 	if ((dev = bpq_get_ether_dev(dev)) == NULL) {
 		bpq->stats.tx_dropped++;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENODEV;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/dmascc.c linux/drivers/net/hamradio/dmascc.c
--- v2.1.85/linux/drivers/net/hamradio/dmascc.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/hamradio/dmascc.c	Tue Feb 10 13:07:50 1998
@@ -800,7 +800,7 @@
   /* Block a timer-based transmit from overlapping */
   if (test_and_set_bit(0, (void *) &priv->tx_sem) != 0) {
     atomic_inc((void *) &priv->stats.tx_dropped);
-    dev_kfree_skb(skb, FREE_WRITE);
+    dev_kfree_skb(skb);
     return 0;
   }
 
@@ -836,7 +836,7 @@
 
   restore_flags(flags);
 
-  dev_kfree_skb(skb, FREE_WRITE);
+  dev_kfree_skb(skb);
 
   priv->tx_sem = 0;
   return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/hdlcdrv.c linux/drivers/net/hamradio/hdlcdrv.c
--- v2.1.85/linux/drivers/net/hamradio/hdlcdrv.c	Sun Nov 30 10:30:19 1997
+++ linux/drivers/net/hamradio/hdlcdrv.c	Tue Feb 10 13:07:49 1998
@@ -446,18 +446,18 @@
 			}
 			if (skb->data[0] != 0) {
 				do_kiss_params(s, skb->data, skb->len);
-				dev_kfree_skb(skb, FREE_WRITE);
+				dev_kfree_skb(skb);
 				break;
 			}
 			pkt_len = skb->len-1; /* strip KISS byte */
 			if (pkt_len >= HDLCDRV_MAXFLEN || pkt_len < 2) {
 				s->hdlctx.tx_state = 0;
 				s->hdlctx.numflags = 1;
-				dev_kfree_skb(skb, FREE_WRITE);
+				dev_kfree_skb(skb);
 				break;
 			}
 			memcpy(s->hdlctx.buffer, skb->data+1, pkt_len);
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			s->hdlctx.bp = s->hdlctx.buffer;
 			append_crc_ccitt(s->hdlctx.buffer, pkt_len);
 			s->hdlctx.len = pkt_len+2; /* the appended CRC */
@@ -681,7 +681,7 @@
 		i = s->ops->close(dev);
         /* Free any buffers left in the hardware transmit queue */
         while ((skb = skb_dequeue(&s->send_queue)))
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 	return i;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/mkiss.c linux/drivers/net/hamradio/mkiss.c
--- v2.1.85/linux/drivers/net/hamradio/mkiss.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/hamradio/mkiss.c	Tue Feb 10 13:07:50 1998
@@ -420,7 +420,7 @@
 		if (tmp_ax != NULL)
 			ax_lock(tmp_ax);
 		ax_encaps(ax, skb->data, skb->len);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 
 	return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/pi2.c linux/drivers/net/hamradio/pi2.c
--- v2.1.85/linux/drivers/net/hamradio/pi2.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/hamradio/pi2.c	Tue Feb 10 13:07:50 1998
@@ -408,7 +408,7 @@
     }
     switch (lp->tstate) {
     case ACTIVE:
-	kfree_skb(lp->sndbuf, FREE_WRITE);
+	kfree_skb(lp->sndbuf);
 	lp->sndbuf = NULL;
 	lp->tstate = FLAGOUT;
 	tdelay(lp, lp->squeldelay);
@@ -726,7 +726,7 @@
 	    /* stuffing a char satisfies Interrupt condition */
 	} else {
 	    /* No more to send */
-	    kfree_skb(lp->sndbuf, FREE_WRITE);
+	    kfree_skb(lp->sndbuf);
 	    lp->sndbuf = NULL;
 	    if ((rdscc(lp->cardbase, cmd, R0) & 0x40)) {
 		/* Did we underrun? */
@@ -778,7 +778,7 @@
 
     switch (lp->tstate) {
     case ACTIVE:		/* Unexpected underrun */
-	kfree_skb(lp->sndbuf, FREE_WRITE);
+	kfree_skb(lp->sndbuf);
 	lp->sndbuf = NULL;
 	wrtscc(lp->cardbase, cmd, R0, SEND_ABORT);
 	lp->tstate = FLAGOUT;
@@ -1553,7 +1553,7 @@
 
     /* Free any buffers left in the hardware transmit queue */
     while ((ptr = skb_dequeue(&lp->sndq)) != NULL)
-	kfree_skb(ptr, FREE_WRITE);
+	kfree_skb(ptr);
 
     restore_flags(flags);
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/pt.c linux/drivers/net/hamradio/pt.c
--- v2.1.85/linux/drivers/net/hamradio/pt.c	Sat Nov 29 10:33:20 1997
+++ linux/drivers/net/hamradio/pt.c	Tue Feb 10 13:07:50 1998
@@ -967,7 +967,7 @@
 
 	/* Free any buffers left in the hardware transmit queue */
 	while ((ptr = skb_dequeue(&lp->sndq)) != NULL)
-		kfree_skb(ptr, FREE_WRITE);
+		kfree_skb(ptr);
 
 	restore_flags(flags);
 
@@ -1185,7 +1185,7 @@
 	        /* stuffing a char satisfies interrupt condition */
 	    } else {
 	        /* No more to send */
-	        kfree_skb(lp->sndbuf, FREE_WRITE);
+	        kfree_skb(lp->sndbuf);
 	        lp->sndbuf = NULL;
 	        if ((rdscc(lp->cardbase, cmd, R0) & TxEOM))
 	        {
@@ -1540,7 +1540,7 @@
 #ifdef PT_DEBUG
 	printk(KERN_DEBUG "PT: exisr(): unexpected underrun detected.\n");
 #endif
-        kfree_skb(lp->sndbuf, FREE_WRITE);
+        kfree_skb(lp->sndbuf);
         lp->sndbuf = NULL;
         if (!lp->dmachan)
         {
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hamradio/scc.c linux/drivers/net/hamradio/scc.c
--- v2.1.85/linux/drivers/net/hamradio/scc.c	Wed Feb  4 11:36:00 1998
+++ linux/drivers/net/hamradio/scc.c	Tue Feb 10 13:07:50 1998
@@ -324,12 +324,12 @@
 	
 	if (scc->tx_buff != NULL)
 	{
-		dev_kfree_skb(scc->tx_buff, FREE_WRITE);
+		dev_kfree_skb(scc->tx_buff);
 		scc->tx_buff = NULL;
 	}
 	
 	while (skb_queue_len(&scc->tx_queue))
-		dev_kfree_skb(skb_dequeue(&scc->tx_queue), FREE_WRITE);
+		dev_kfree_skb(skb_dequeue(&scc->tx_queue));
 
 	restore_flags(flags);
 }
@@ -372,7 +372,7 @@
 	if(scc->rx_buff != NULL)		/* did we receive something? */
 	{
 		scc->stat.rxerrs++;  /* then count it as an error */
-		kfree_skb(scc->rx_buff, FREE_READ);
+		kfree_skb(scc->rx_buff);
 		scc->rx_buff = NULL;
 	}
 }
@@ -406,7 +406,7 @@
 		
 		if (skb->len == 0)		/* Paranoia... */
 		{
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			scc->tx_buff = NULL;
 			scc_tx_done(scc);
 			Outb(scc->ctrl, RES_Tx_P);
@@ -432,7 +432,7 @@
 	{
 		Outb(scc->ctrl, RES_Tx_P);	/* reset pending int */
 		cl(scc, R10, ABUNDER);		/* send CRC */
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		scc->tx_buff = NULL;
 		scc->stat.tx_state = TXS_NEWFRAME; /* next frame... */
 		return;
@@ -513,7 +513,7 @@
 
 		if (scc->tx_buff != NULL)
 		{
-			dev_kfree_skb(scc->tx_buff, FREE_WRITE);
+			dev_kfree_skb(scc->tx_buff);
 			scc->tx_buff = NULL;
 		}
 		
@@ -563,7 +563,7 @@
 #ifdef notdef
 		printk(KERN_DEBUG "z8530drv: oops, scc_rxint() received huge frame...\n");
 #endif
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		scc->rx_buff = NULL;
 		Inb(scc->data);
 		or(scc, R3, ENT_HM);
@@ -593,7 +593,7 @@
 		or(scc,R3,ENT_HM);               /* enter hunt mode for next flag */
 		
 		if (skb != NULL) 
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 		scc->rx_buff = NULL;
 	}
 
@@ -609,7 +609,7 @@
 			scc->rx_buff = NULL;
 			scc->stat.rxframes++;
 		} else {				/* a bad frame */
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			scc->rx_buff = NULL;
 			scc->stat.rxerrs++;
 		}
@@ -1671,7 +1671,7 @@
 {
 	if (skb->len == 0)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 		
@@ -1695,14 +1695,14 @@
 	
 	if (scc == NULL || scc->magic != SCC_MAGIC || dev->tbusy)
 	{
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
 
 	if (skb->len > scc->stat.bufsize || skb->len < 2)
 	{
 		scc->dev_stat.tx_dropped++;	/* bogus frame */
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
 	
@@ -1715,7 +1715,7 @@
 	if (kisscmd)
 	{
 		scc_set_param(scc, kisscmd, *skb->data);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
 
@@ -1726,7 +1726,7 @@
 	{
 		struct sk_buff *skb_del;
 		skb_del = __skb_dequeue(&scc->tx_queue);
-		dev_kfree_skb(skb_del, FREE_WRITE);
+		dev_kfree_skb(skb_del);
 	}
 	__skb_queue_tail(&scc->tx_queue, skb);
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hp100.c linux/drivers/net/hp100.c
--- v2.1.85/linux/drivers/net/hp100.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/hp100.c	Tue Feb 10 12:56:44 1998
@@ -1474,7 +1474,7 @@
 		       hp100_inb(TX_PDL),
 		       donecount);
 #endif
-		dev_kfree_skb(lp->txrhead->skb, FREE_WRITE);
+		dev_kfree_skb(lp->txrhead->skb);
 		lp->txrhead->skb = (void *) NULL;
 		lp->txrhead = lp->txrhead->next;
 		lp->txrcommit--;
@@ -1599,7 +1599,7 @@
 	dev->trans_start = jiffies;
 	hp100_ints_on();
 
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 #ifdef HP100_DEBUG_TX
 	printk("hp100_start_xmit: end\n");
@@ -1815,7 +1815,7 @@
 			printk("hp100: rx_bm: Received bad packet (length=%d)\n", pkt_len);
 #endif
 			if (ptr->skb != NULL)
-				dev_kfree_skb(ptr->skb, FREE_READ);
+				dev_kfree_skb(ptr->skb);
 			lp->stats.rx_errors++;
 		}
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/hydra.c linux/drivers/net/hydra.c
--- v2.1.85/linux/drivers/net/hydra.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/hydra.c	Tue Feb 10 12:56:44 1998
@@ -500,7 +500,7 @@
 	/* clear the unused space */
 	for(; len1<len; len1++)
 		(u16)*(priv->hydra_base + (priv->tx_page_start<<8) + len1) = 0;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	priv->stats.tx_packets++;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ibmtr.c linux/drivers/net/ibmtr.c
--- v2.1.85/linux/drivers/net/ibmtr.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ibmtr.c	Tue Feb 10 12:56:44 1998
@@ -790,7 +790,7 @@
 						      DPRINTK("error on xmit_dir_frame request: %02X\n",
 							      xmit_ret_code);
 						      if (ti->current_skb) {
-							      dev_kfree_skb(ti->current_skb, FREE_WRITE);
+							      dev_kfree_skb(ti->current_skb);
 							      ti->current_skb=NULL;
 						      }
 						      dev->tbusy=0;
@@ -807,7 +807,7 @@
 						      DPRINTK("error on xmit_ui_frame request: %02X\n",
 							      xmit_ret_code);
 						      if (ti->current_skb) {
-							      dev_kfree_skb(ti->current_skb, FREE_WRITE);
+							      dev_kfree_skb(ti->current_skb);
 							      ti->current_skb=NULL;
 						      }
 						      dev->tbusy=0;
@@ -1305,7 +1305,7 @@
 
 	writeb(RESP_IN_ASB, ti->mmio + ACA_OFFSET + ACA_SET + ISRA_ODD);
 	dev->tbusy=0;
-	dev_kfree_skb(ti->current_skb,FREE_WRITE);
+	dev_kfree_skb(ti->current_skb);
 	ti->current_skb=NULL;
 	mark_bh(NET_BH);
 	if (ti->readlog_pending) ibmtr_readlog(dev);
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ipddp.c linux/drivers/net/ipddp.c
--- v2.1.85/linux/drivers/net/ipddp.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/ipddp.c	Tue Feb 10 12:56:44 1998
@@ -170,7 +170,7 @@
         ((struct net_device_stats *) dev->priv)->tx_bytes+=skb->len;
 
         if(aarp_send_ddp(skb->dev, skb, at, NULL) < 0)
-                dev_kfree_skb(skb,FREE_WRITE);
+                dev_kfree_skb(skb);
 
         return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/lance.c linux/drivers/net/lance.c
--- v2.1.85/linux/drivers/net/lance.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/net/lance.c	Tue Feb 10 12:56:44 1998
@@ -730,7 +730,7 @@
 
 	for (i = 0; i < TX_RING_SIZE; i++) {
 		if (lp->tx_skbuff[i]) {
-			dev_kfree_skb(lp->tx_skbuff[i],FREE_WRITE);
+			dev_kfree_skb(lp->tx_skbuff[i]);
 			lp->tx_skbuff[i] = NULL;
 		}
 	}
@@ -870,7 +870,7 @@
 		memcpy(&lp->tx_bounce_buffs[entry], skb->data, skb->len);
 		lp->tx_ring[entry].base =
 			((u32)virt_to_bus((lp->tx_bounce_buffs + entry)) & 0xffffff) | 0x83000000;
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 	} else {
 		lp->tx_skbuff[entry] = skb;
 		lp->tx_ring[entry].base = ((u32)virt_to_bus(skb->data) & 0xffffff) | 0x83000000;
@@ -969,7 +969,7 @@
 				/* We must free the original skb if it's not a data-only copy
 				   in the bounce buffer. */
 				if (lp->tx_skbuff[entry]) {
-					dev_kfree_skb(lp->tx_skbuff[entry],FREE_WRITE);
+					dev_kfree_skb(lp->tx_skbuff[entry]);
 					lp->tx_skbuff[entry] = 0;
 				}
 				dirty_tx++;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/lapbether.c linux/drivers/net/lapbether.c
--- v2.1.85/linux/drivers/net/lapbether.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/lapbether.c	Tue Feb 10 12:56:44 1998
@@ -165,7 +165,7 @@
 	dev = lapbeth_get_x25_dev(dev);
 
 	if (dev == NULL || dev->start == 0) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -179,7 +179,7 @@
 	skb_trim(skb, len);	/* Set the length of the data */
 
 	if ((err = lapb_data_received(lapbeth, skb)) != LAPB_OK) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		printk(KERN_DEBUG "lapbether: lapb_data_received err - %d\n", err);
 	}
 
@@ -218,7 +218,7 @@
 	 */
 	if (!dev->start) {
 		lapbeth_check_devices(dev);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENODEV;
 	}
 
@@ -228,15 +228,15 @@
 		case 0x01:
 			if ((err = lapb_connect_request(lapbeth)) != LAPB_OK)
 				printk(KERN_ERR "lapbeth: lapb_connect_request error - %d\n", err);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 		case 0x02:
 			if ((err = lapb_disconnect_request(lapbeth)) != LAPB_OK)
 				printk(KERN_ERR "lapbeth: lapb_disconnect_request err - %d\n", err);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 		default:
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 	}
 
@@ -244,7 +244,7 @@
 
 	if ((err = lapb_data_request(lapbeth, skb)) != LAPB_OK) {
 		printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENOMEM;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/loopback.c linux/drivers/net/loopback.c
--- v2.1.85/linux/drivers/net/loopback.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/loopback.c	Tue Feb 10 12:56:44 1998
@@ -79,10 +79,10 @@
 	  	struct sk_buff *skb2=skb;
 	  	skb=skb_clone(skb, GFP_ATOMIC);		/* Clone the buffer */
 	  	if(skb==NULL) {
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return 0;
 		}
-	  	kfree_skb(skb2, FREE_WRITE);
+	  	kfree_skb(skb2);
 	}
 	else
 		skb_orphan(skb);
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ltpc.c linux/drivers/net/ltpc.c
--- v2.1.85/linux/drivers/net/ltpc.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ltpc.c	Tue Feb 10 12:56:44 1998
@@ -951,7 +951,7 @@
 	stats->tx_packets++;
 	stats->tx_bytes+=skb->len;
 
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/mace.c linux/drivers/net/mace.c
--- v2.1.85/linux/drivers/net/mace.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/mace.c	Tue Feb 10 12:56:45 1998
@@ -333,12 +333,12 @@
     /* free some skb's */
     for (i = 0; i < N_RX_RING; ++i) {
 	if (mp->rx_bufs[i] != 0) {
-	    dev_kfree_skb(mp->rx_bufs[i], FREE_READ);
+	    dev_kfree_skb(mp->rx_bufs[i]);
 	    mp->rx_bufs[i] = 0;
 	}
     }
     for (i = mp->tx_empty; i != mp->tx_fill; ) {
-	dev_kfree_skb(mp->tx_bufs[i], FREE_WRITE);
+	dev_kfree_skb(mp->tx_bufs[i]);
 	if (++i >= N_TX_RING)
 	    i = 0;
     }
@@ -601,7 +601,7 @@
 		++mp->stats.tx_aborted_errors;
 	} else
 	    ++mp->stats.tx_packets;
-	dev_kfree_skb(mp->tx_bufs[i], FREE_WRITE);
+	dev_kfree_skb(mp->tx_bufs[i]);
 	--mp->tx_active;
 	if (++i >= N_TX_RING)
 	    i = 0;
@@ -680,7 +680,7 @@
     if (mp->tx_bad_runt) {
 	mp->tx_bad_runt = 0;
     } else if (i != mp->tx_fill) {
-	dev_kfree_skb(mp->tx_bufs[i], FREE_WRITE);
+	dev_kfree_skb(mp->tx_bufs[i]);
 	if (++i >= N_TX_RING)
 	    i = 0;
 	mp->tx_empty = i;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/myri_sbus.c linux/drivers/net/myri_sbus.c
--- v2.1.85/linux/drivers/net/myri_sbus.c	Mon Jan 12 15:28:18 1998
+++ linux/drivers/net/myri_sbus.c	Tue Feb 10 12:56:45 1998
@@ -244,7 +244,7 @@
 	rq->tail = rq->head = 0;
 	for(i = 0; i < (RX_RING_SIZE+1); i++) {
 		if(mp->rx_skbs[i] != NULL) {
-			dev_kfree_skb(mp->rx_skbs[i], FREE_READ);
+			dev_kfree_skb(mp->rx_skbs[i]);
 			mp->rx_skbs[i] = NULL;
 		}
 	}
@@ -252,7 +252,7 @@
 	mp->tx_old = sq->tail = sq->head = 0;
 	for(i = 0; i < TX_RING_SIZE; i++) {
 		if(mp->tx_skbs[i] != NULL) {
-			dev_kfree_skb(mp->tx_skbs[i], FREE_WRITE);
+			dev_kfree_skb(mp->tx_skbs[i]);
 			mp->tx_skbs[i] = NULL;
 		}
 	}
@@ -337,7 +337,7 @@
 		struct sk_buff *skb = mp->tx_skbs[entry];
 
 		DTX(("SKB[%d] ", entry));
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		mp->tx_skbs[entry] = NULL;
 		mp->enet_stats.tx_packets++;
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ni5010.c linux/drivers/net/ni5010.c
--- v2.1.85/linux/drivers/net/ni5010.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/ni5010.c	Tue Feb 10 12:56:45 1998
@@ -460,7 +460,7 @@
 		hardware_send_packet(dev, (unsigned char *)skb->data, length);
 		dev->trans_start = jiffies;
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ni52.c linux/drivers/net/ni52.c
--- v2.1.85/linux/drivers/net/ni52.c	Mon Jan 19 13:43:36 1998
+++ linux/drivers/net/ni52.c	Tue Feb 10 12:56:45 1998
@@ -1203,7 +1203,7 @@
 			ni_attn586();
 			dev->trans_start = jiffies;
 			if(!i)
-				dev_kfree_skb(skb,FREE_WRITE);
+				dev_kfree_skb(skb);
 			WAIT_4_SCB_CMD();
 			if( (p->scb->cus & CU_ACTIVE)) /* test it, because CU sometimes doesn't start immediately */
 				break;
@@ -1223,7 +1223,7 @@
 		p->nop_cmds[p->nop_point]->cmd_link = make16((p->xmit_cmds[0]));
 		dev->trans_start = jiffies;
 		p->nop_point = next_nop;
-		dev_kfree_skb(skb,FREE_WRITE);
+		dev_kfree_skb(skb);
 #	endif
 #else
 		p->xmit_buffs[p->xmit_count]->size = TBD_LAST | len;
@@ -1248,7 +1248,7 @@
 			p->lock = 0;
 			restore_flags(flags);
 		}
-		dev_kfree_skb(skb,FREE_WRITE);
+		dev_kfree_skb(skb);
 #endif
 	}
 	return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ni65.c linux/drivers/net/ni65.c
--- v2.1.85/linux/drivers/net/ni65.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/ni65.c	Tue Feb 10 12:56:45 1998
@@ -306,7 +306,7 @@
 		for(i=0;i<TMDNUM;i++)
 		{
 			if(p->tmd_skb[i]) {
-				dev_kfree_skb(p->tmd_skb[i],FREE_WRITE);
+				dev_kfree_skb(p->tmd_skb[i]);
 				p->tmd_skb[i] = NULL;
 			}
 		}
@@ -548,7 +548,7 @@
 	if( (u32) virt_to_bus(ptr+size) > 0x1000000) {
 		printk("%s: unable to allocate %s memory in lower 16MB!\n",dev->name,what);
 		if(type)
-			kfree_skb(skb,FREE_WRITE);
+			kfree_skb(skb);
 		else
 			kfree(ptr);
 		return NULL;
@@ -623,7 +623,7 @@
 			kfree(p->tmdbounce[i]);
 #ifdef XMT_VIA_SKB
 		if(p->tmd_skb[i])
-			dev_kfree_skb(p->tmd_skb[i],FREE_WRITE);
+			dev_kfree_skb(p->tmd_skb[i]);
 #endif
 	}
 
@@ -631,7 +631,7 @@
 	{
 #ifdef RCV_VIA_SKB
 		if(p->recv_skb[i])
-			dev_kfree_skb(p->recv_skb[i],FREE_WRITE);
+			dev_kfree_skb(p->recv_skb[i]);
 #else
 		if(p->recvbounce[i])
 			kfree(p->recvbounce[i]);
@@ -741,7 +741,7 @@
 		 struct tmd *tmdp = p->tmdhead + i;
 #ifdef XMT_VIA_SKB
 		 if(p->tmd_skb[i]) {
-			 dev_kfree_skb(p->tmd_skb[i],FREE_WRITE);
+			 dev_kfree_skb(p->tmd_skb[i]);
 			 p->tmd_skb[i] = NULL;
 		 }
 #endif
@@ -955,7 +955,7 @@
 
 #ifdef XMT_VIA_SKB
 		if(p->tmd_skb[p->tmdlast]) {
-			 dev_kfree_skb(p->tmd_skb[p->tmdlast],FREE_WRITE);
+			 dev_kfree_skb(p->tmd_skb[p->tmdlast]);
 			 p->tmd_skb[p->tmdlast] = NULL;
 		}
 #endif
@@ -1104,7 +1104,7 @@
 
 			memcpy((char *) p->tmdbounce[p->tmdbouncenum] ,(char *)skb->data,
 							 (skb->len > T_BUF_SIZE) ? T_BUF_SIZE : skb->len);
-			dev_kfree_skb (skb, FREE_WRITE);
+			dev_kfree_skb (skb);
 
 			save_flags(flags);
 			cli();
diff -u --recursive --new-file v2.1.85/linux/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- v2.1.85/linux/drivers/net/pcnet32.c	Sat Nov 29 10:33:19 1997
+++ linux/drivers/net/pcnet32.c	Tue Feb 10 12:56:45 1998
@@ -477,7 +477,7 @@
 
 	for (i = 0; i < TX_RING_SIZE; i++) {
 		if (lp->tx_skbuff[i]) {
-			dev_kfree_skb(lp->tx_skbuff[i],FREE_WRITE);
+			dev_kfree_skb(lp->tx_skbuff[i]);
 			lp->tx_skbuff[i] = NULL;
 		}
 	}
@@ -707,7 +707,7 @@
 
 				/* We must free the original skb */
 				if (lp->tx_skbuff[entry]) {
-					dev_kfree_skb(lp->tx_skbuff[entry],FREE_WRITE);
+					dev_kfree_skb(lp->tx_skbuff[entry]);
 					lp->tx_skbuff[entry] = 0;
 				}
 				dirty_tx++;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/plip.c linux/drivers/net/plip.c
--- v2.1.85/linux/drivers/net/plip.c	Sun Jan  4 10:24:27 1998
+++ linux/drivers/net/plip.c	Tue Feb 10 12:56:45 1998
@@ -408,12 +408,12 @@
 	}
 	rcv->state = PLIP_PK_DONE;
 	if (rcv->skb) {
-		kfree_skb(rcv->skb, FREE_READ);
+		kfree_skb(rcv->skb);
 		rcv->skb = NULL;
 	}
 	snd->state = PLIP_PK_DONE;
 	if (snd->skb) {
-		dev_kfree_skb(snd->skb, FREE_WRITE);
+		dev_kfree_skb(snd->skb);
 		snd->skb = NULL;
 	}
 	spin_unlock_irq(&nl->lock);
@@ -742,7 +742,7 @@
 			      &snd->nibble, snd->checksum))
 			return TIMEOUT;
 
-		dev_kfree_skb(snd->skb, FREE_WRITE);
+		dev_kfree_skb(snd->skb);
 		nl->enet_stats.tx_packets++;
 		snd->state = PLIP_PK_DONE;
 
@@ -1011,12 +1011,12 @@
 
 	snd->state = PLIP_PK_DONE;
 	if (snd->skb) {
-		dev_kfree_skb(snd->skb, FREE_WRITE);
+		dev_kfree_skb(snd->skb);
 		snd->skb = NULL;
 	}
 	rcv->state = PLIP_PK_DONE;
 	if (rcv->skb) {
-		kfree_skb(rcv->skb, FREE_READ);
+		kfree_skb(rcv->skb);
 		rcv->skb = NULL;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/ppp.c linux/drivers/net/ppp.c
--- v2.1.85/linux/drivers/net/ppp.c	Fri Jan 30 11:28:07 1998
+++ linux/drivers/net/ppp.c	Tue Feb 10 12:56:45 1998
@@ -2892,7 +2892,7 @@
  * Avoid timing problem should tty hangup while data is queued to be sent
  */
 	if (!ppp->inuse) {
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		return 0;
 	}
 /*
@@ -2903,7 +2903,7 @@
 			printk (KERN_ERR
 				"ppp_dev_xmit: %s not connected to a TTY!\n",
 				dev->name);
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		return 0;
 	}
 /*
@@ -2916,7 +2916,7 @@
 		if (ppp->flags & SC_DEBUG)
 			printk (KERN_CRIT "ppp_dev_xmit: %s Null skb data\n",
 				dev->name);
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		return 0;
 	}
 /*
@@ -2957,7 +2957,7 @@
 		break;
 
 	default: /* All others have no support at this time. */
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		return 0;
 	}
 /*
@@ -2965,12 +2965,12 @@
  */
 	if (answer == 0) {
 		/* packet queued OK */
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 	} else {
 		ppp->wbuf->locked = 0;
 		if (answer < 0) {
 			/* packet should be dropped */
-			dev_kfree_skb (skb, FREE_WRITE);
+			dev_kfree_skb (skb);
 			answer = 0;
 		} else {
 			/* packet should be queued for later */
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sdla_fr.c linux/drivers/net/sdla_fr.c
--- v2.1.85/linux/drivers/net/sdla_fr.c	Fri Jan 23 18:10:31 1998
+++ linux/drivers/net/sdla_fr.c	Tue Feb 10 12:56:45 1998
@@ -965,7 +965,7 @@
 		printk(KERN_INFO "%s: if_send() hit critical section!\n",
 		       card->devname);
 #endif
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
     	disable_irq(card->hw.irq);
@@ -1020,7 +1020,7 @@
 
 		++chan->if_send_critical_non_ISR;
 		++chan->ifstats.tx_dropped;
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		save_flags(host_cpu_flags);
 		cli();
                 if ((!(--card->irq_dis_if_send_count)) &&
@@ -1112,7 +1112,7 @@
 	}
 
 	if (!retry)
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 
 	card->wandev.critical = 0;
 	save_flags(host_cpu_flags);
@@ -1447,7 +1447,7 @@
 	buf = skb_pull(skb, 1);	/* remove hardware header */
 	if (!wan_type_trans(skb, dev)) {
 		/* can't decapsulate packet */
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		++chan->ifstats.rx_errors;
 		++card->wandev.stats.rx_errors;
 	} else {
@@ -1564,7 +1564,7 @@
 					if (!wan_type_trans(skb, dev)) 
 					{
 						/* can't decapsulate packet */
-						dev_kfree_skb(skb, FREE_READ);
+						dev_kfree_skb(skb);
 						++chan->rx_intr_bfr_not_passed_to_stack;
  						++chan->ifstats.rx_errors;
 		                        	++card->wandev.stats.rx_errors;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sdla_ppp.c linux/drivers/net/sdla_ppp.c
--- v2.1.85/linux/drivers/net/sdla_ppp.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/sdla_ppp.c	Tue Feb 10 12:56:45 1998
@@ -697,7 +697,7 @@
 #ifdef CONFIG_SANGOMA_MANAGER
 	if(sangoma_ppp_manager(skb,card))
 	{
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		return 0;
 	}
 #endif
@@ -732,7 +732,7 @@
 
 		}
 
-    		dev_kfree_skb(skb, FREE_WRITE);
+    		dev_kfree_skb(skb);
 		++ppp_priv_area->if_send_critical_non_ISR;
 		
 		save_flags(host_cpu_flags);
@@ -786,7 +786,7 @@
 	
 tx_done:	
 	if (!retry){
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 
 	card->wandev.critical = 0;
@@ -1280,21 +1280,21 @@
 				process_udp_driver_call(
 					UDP_PKT_FRM_NETWORK, card, skb,
 					dev, ppp_priv_area);
-                                 dev_kfree_skb(skb, FREE_READ);
+                                 dev_kfree_skb(skb);
 
 			} else if (udp_type == UDP_PTPIPE_TYPE){
 				++ppp_priv_area->rx_intr_PTPIPE_request;
 				err = process_udp_mgmt_pkt(
 					UDP_PKT_FRM_NETWORK, card, 
 					skb, dev, ppp_priv_area);
-				dev_kfree_skb(skb, FREE_READ);
+				dev_kfree_skb(skb);
 			} else
 #endif
 				if (handle_IPXWAN(skb->data,card->devname, card->wandev.enable_IPX, card->wandev.network_number, skb->protocol)) {
 				
 				if( card->wandev.enable_IPX) {
 					ppp_send(card, skb->data, skb->len, ETH_P_IPX);
-                        		dev_kfree_skb(skb, FREE_READ);
+                        		dev_kfree_skb(skb);
 
 				} else {
 					++card->wandev.stats.rx_dropped;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sdla_x25.c linux/drivers/net/sdla_x25.c
--- v2.1.85/linux/drivers/net/sdla_x25.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/sdla_x25.c	Tue Feb 10 12:56:45 1998
@@ -759,7 +759,7 @@
 			
 			return dev->tbusy;
 		}
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		
 		save_flags(host_cpu_flags);
                 cli();
@@ -832,7 +832,7 @@
 tx_done:
 	if (!dev->tbusy)
 	{
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 	card->wandev.critical = 0;
 	save_flags(host_cpu_flags);
@@ -1000,7 +1000,7 @@
 	if (skb_tailroom(skb) < len)
 	{
 		/* No room for the packet. Call off the whole thing! */
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		chan->rx_skb = NULL;
 		if (qdm & 0x01) chan->drop_sequence = 1;
 
@@ -1023,7 +1023,7 @@
 	if (!skb->protocol && !wan_type_trans(skb, dev))
 	{
 		/* can't decapsulate packet */
-		dev_kfree_skb(skb, FREE_READ);
+		dev_kfree_skb(skb);
 		++chan->ifstats.rx_errors;
 	}
 	else
@@ -1038,7 +1038,7 @@
 				}
 				else
 				{
-					dev_kfree_skb(skb, FREE_WRITE);
+					dev_kfree_skb(skb);
 				}
 			}
 			else
@@ -1211,7 +1211,7 @@
 		{
 			chan->tx_skb = NULL;
 			dev->tbusy = 0;
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		}
 
 		/* If SVC has been idle long enough, close virtual circuit */
diff -u --recursive --new-file v2.1.85/linux/drivers/net/seeq8005.c linux/drivers/net/seeq8005.c
--- v2.1.85/linux/drivers/net/seeq8005.c	Mon Nov  3 09:29:30 1997
+++ linux/drivers/net/seeq8005.c	Tue Feb 10 12:56:45 1998
@@ -400,7 +400,7 @@
 		hardware_send_packet(dev, buf, length); 
 		dev->trans_start = jiffies;
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	/* You might need to clean up and record Tx statistics here. */
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sgiseeq.c linux/drivers/net/sgiseeq.c
--- v2.1.85/linux/drivers/net/sgiseeq.c	Sat Nov 29 10:33:20 1997
+++ linux/drivers/net/sgiseeq.c	Tue Feb 10 12:56:45 1998
@@ -570,7 +570,7 @@
 		hregs->tx_ctrl = HPC3_ETXCTRL_ACTIVE;
 	}
 	dev->trans_start = jiffies;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	if(TX_BUFFS_AVAIL(sp))
 		dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/shaper.c linux/drivers/net/shaper.c
--- v2.1.85/linux/drivers/net/shaper.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/shaper.c	Tue Feb 10 12:56:45 1998
@@ -190,7 +190,7 @@
  			if(ptr->shapelatency > SHAPER_LATENCY)
  			{
  				skb_unlink(ptr);
- 				dev_kfree_skb(ptr, FREE_WRITE);
+ 				dev_kfree_skb(ptr);
  			}
  			ptr=tmp;
  		}
@@ -225,7 +225,7 @@
 		 *	Queue over time. Spill packet.
 		 */
 		if(skb->shapeclock-jiffies > SHAPER_LATENCY)
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		else
 			skb_queue_tail(&shaper->sendq, skb);
 	}
@@ -235,7 +235,7 @@
  	if(skb_queue_len(&shaper->sendq)>SHAPER_QLEN)
  	{
  		ptr=skb_dequeue(&shaper->sendq);
- 		dev_kfree_skb(ptr, FREE_WRITE);
+ 		dev_kfree_skb(ptr);
  	}
  	shaper_unlock(shaper);
  	shaper_kick(shaper);
@@ -261,7 +261,7 @@
 		dev_queue_xmit(newskb);
 		if(sh_debug)
 			printk("Kicked new frame out.\n");
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 }
 
@@ -368,7 +368,7 @@
 {
 	struct sk_buff *skb;
 	while((skb=skb_dequeue(&shaper->sendq))!=NULL)
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 }
 
 /*
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sk_g16.c linux/drivers/net/sk_g16.c
--- v2.1.85/linux/drivers/net/sk_g16.c	Mon Nov  3 09:29:31 1997
+++ linux/drivers/net/sk_g16.c	Tue Feb 10 12:56:45 1998
@@ -1251,7 +1251,7 @@
 	   dev->tbusy = 0;
 	}
     }
-    dev_kfree_skb(skb, FREE_WRITE);
+    dev_kfree_skb(skb);
     return 0;  
 } /* End of SK_send_packet */
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/skeleton.c linux/drivers/net/skeleton.c
--- v2.1.85/linux/drivers/net/skeleton.c	Mon Nov  3 09:29:31 1997
+++ linux/drivers/net/skeleton.c	Tue Feb 10 12:56:45 1998
@@ -374,7 +374,7 @@
 		hardware_send_packet(ioaddr, buf, length);
 		dev->trans_start = jiffies;
 	}
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	/* You might need to clean up and record Tx statistics here. */
 	if (inw(ioaddr) == /*RU*/81)
diff -u --recursive --new-file v2.1.85/linux/drivers/net/slip.c linux/drivers/net/slip.c
--- v2.1.85/linux/drivers/net/slip.c	Sun Nov 30 14:00:38 1997
+++ linux/drivers/net/slip.c	Tue Feb 10 12:56:45 1998
@@ -518,7 +518,7 @@
 		sl_lock(sl);
 		sl->tx_bytes+=skb->len;
 		sl_encaps(sl, skb->data, skb->len);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/drivers/net/smc9194.c linux/drivers/net/smc9194.c
--- v2.1.85/linux/drivers/net/smc9194.c	Mon Nov  3 09:29:31 1997
+++ linux/drivers/net/smc9194.c	Tue Feb 10 12:56:45 1998
@@ -573,7 +573,7 @@
 		printk(CARDNAME": Far too big packet error. \n");
 		/* freeing the packet is a good thing here... but should
 		 . any packets of this size get down here?   */
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 		lp->saved_skb = NULL;
 		/* this IS an error, but, i don't want the skb saved */
 		return 0;
@@ -725,7 +725,7 @@
 	PRINTK2((CARDNAME": Sent packet of length %d \n",length));
 
 	lp->saved_skb = NULL;
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
 
 	dev->trans_start = jiffies;
 
@@ -1246,7 +1246,7 @@
 	   done with atomic_swap(1, dev->tbusy), but set_bit() works as well. */
 	if (test_and_set_bit(0, (void*)&dev->tbusy) != 0) {
 		printk(KERN_WARNING CARDNAME": Transmitter access conflict.\n");
-		dev_kfree_skb (skb, FREE_WRITE);
+		dev_kfree_skb (skb);
 	} else {
 		/* Well, I want to send the packet.. but I don't know
 		   if I can send it right now...  */
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sonic.c linux/drivers/net/sonic.c
--- v2.1.85/linux/drivers/net/sonic.c	Sat Nov 29 10:33:20 1997
+++ linux/drivers/net/sonic.c	Tue Feb 10 12:56:45 1998
@@ -404,7 +404,7 @@
      */
     if ((laddr = vdma_alloc(PHYSADDR(skb->data),skb->len)) == ~0UL) {
 	printk("%s: no VDMA entry for transmit available.\n",dev->name);
-	dev_kfree_skb(skb,FREE_WRITE);
+	dev_kfree_skb(skb);
 	dev->tbusy = 0;
 	return 1;
     }
@@ -506,7 +506,7 @@
 
 	    /* We must free the original skb */
 	    if (lp->tx_skb[entry]) {
-		dev_kfree_skb(lp->tx_skb[entry],FREE_WRITE);
+		dev_kfree_skb(lp->tx_skb[entry]);
 		lp->tx_skb[entry] = 0;
 	    }
 	    /* and the VDMA address */
diff -u --recursive --new-file v2.1.85/linux/drivers/net/strip.c linux/drivers/net/strip.c
--- v2.1.85/linux/drivers/net/strip.c	Thu Jan 15 14:33:06 1998
+++ linux/drivers/net/strip.c	Tue Feb 10 12:56:45 1998
@@ -1574,7 +1574,7 @@
 
     strip_send(strip_info, skb);
 
-    if (skb) dev_kfree_skb(skb, FREE_WRITE);
+    if (skb) dev_kfree_skb(skb);
     return(0);
 }
 
@@ -1630,11 +1630,9 @@
 
 static int strip_rebuild_header(struct sk_buff *skb)
 {
+#ifdef CONFIG_INET
     STRIP_Header *header = (STRIP_Header *)skb->data;
 
-    /*printk(KERN_INFO "%s: strip_rebuild_header\n", skb->dev->name);*/
-
-#ifdef CONFIG_INET
     /* Arp find returns zero if if knows the address, */
     /* or if it doesn't know the address it sends an ARP packet and returns non-zero */
     return arp_find(header->dst_addr.c, skb)? 1 : 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sunhme.c linux/drivers/net/sunhme.c
--- v2.1.85/linux/drivers/net/sunhme.c	Sat Nov 29 10:33:20 1997
+++ linux/drivers/net/sunhme.c	Tue Feb 10 12:56:45 1998
@@ -931,14 +931,14 @@
 
 	for(i = 0; i < RX_RING_SIZE; i++) {
 		if(hp->rx_skbs[i] != NULL) {
-			dev_kfree_skb(hp->rx_skbs[i], FREE_READ);
+			dev_kfree_skb(hp->rx_skbs[i]);
 			hp->rx_skbs[i] = NULL;
 		}
 	}
 
 	for(i = 0; i < TX_RING_SIZE; i++) {
 		if(hp->tx_skbs[i] != NULL) {
-			dev_kfree_skb(hp->tx_skbs[i], FREE_WRITE);
+			dev_kfree_skb(hp->tx_skbs[i]);
 			hp->tx_skbs[i] = NULL;
 		}
 	}
@@ -1612,7 +1612,7 @@
 			mmu_sync_dma(kva_to_hva(hp, skb->data),
 				     skb->len, hp->happy_sbus_dev->my_bus);
 #endif
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 
 		hp->net_stats.tx_packets++;
 		elem = NEXT_TX(elem);
@@ -1644,7 +1644,7 @@
 		hp->tx_skbs[elem] = NULL;
 		hp->net_stats.tx_bytes+=skb->len;
 		
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 
 		hp->net_stats.tx_packets++;
 		elem = NEXT_TX(elem);
@@ -2330,7 +2330,7 @@
 	dev->trans_start = jiffies;
 	hp->etxregs->tx_pnding = ETX_TP_DMAWAKEUP;
 
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	if(TX_BUFFS_AVAIL(hp))
 		dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sunlance.c linux/drivers/net/sunlance.c
--- v2.1.85/linux/drivers/net/sunlance.c	Mon Jan 12 15:28:18 1998
+++ linux/drivers/net/sunlance.c	Tue Feb 10 12:56:45 1998
@@ -870,7 +870,7 @@
 	/* Kick the lance: transmit now */
 	ll->rdp = LE_C0_INEA | LE_C0_TDMD;
 	dev->trans_start = jiffies;
-	dev_kfree_skb (skb, FREE_WRITE);
+	dev_kfree_skb (skb);
     
 	if (TX_BUFFS_AVAIL)
 		dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/sunqe.c linux/drivers/net/sunqe.c
--- v2.1.85/linux/drivers/net/sunqe.c	Thu Sep  4 13:25:28 1997
+++ linux/drivers/net/sunqe.c	Tue Feb 10 12:56:45 1998
@@ -116,14 +116,14 @@
 
 	for(i = 0; i < RX_RING_SIZE; i++) {
 		if(qep->rx_skbs[i] != NULL) {
-			dev_kfree_skb(qep->rx_skbs[i], FREE_READ);
+			dev_kfree_skb(qep->rx_skbs[i]);
 			qep->rx_skbs[i] = NULL;
 		}
 	}
 
 	for(i = 0; i < TX_RING_SIZE; i++) {
 		if(qep->tx_skbs[i] != NULL) {
-			dev_kfree_skb(qep->tx_skbs[i], FREE_WRITE);
+			dev_kfree_skb(qep->tx_skbs[i]);
 			qep->tx_skbs[i] = NULL;
 		}
 	}
@@ -451,7 +451,7 @@
 		mmu_sync_dma(((u32)((unsigned long)skb->data)),
 			     skb->len, qep->qe_sbusdev->my_bus);
 #endif
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 
 		qep->net_stats.tx_packets++;
 		elem = NEXT_TX(elem);
@@ -804,7 +804,7 @@
 
 	qep->net_stats.tx_bytes+=skb->len;
 	
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 
 	if(SUN4C_TX_BUFFS_AVAIL(qep))
 		dev->tbusy = 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/tlan.c linux/drivers/net/tlan.c
--- v2.1.85/linux/drivers/net/tlan.c	Sun Jan  4 10:55:09 1998
+++ linux/drivers/net/tlan.c	Tue Feb 10 12:56:45 1998
@@ -663,7 +663,7 @@
 
 	if ( ! priv->phyOnline ) {
 		TLAN_DBG( TLAN_DEBUG_TX, "TLAN TRANSMIT:  %s PHY is not ready\n", dev->name );
-		dev_kfree_skb( skb, FREE_WRITE );
+		dev_kfree_skb( skb );
 		return 0;
 	}
 
@@ -710,7 +710,7 @@
 	if ( priv->txTail >= TLAN_NUM_TX_LISTS )
 		priv->txTail = 0;
 
-	dev_kfree_skb( skb, FREE_WRITE );
+	dev_kfree_skb( skb );
 		
 	dev->trans_start = jiffies;
 	return 0;
diff -u --recursive --new-file v2.1.85/linux/drivers/net/tulip.c linux/drivers/net/tulip.c
--- v2.1.85/linux/drivers/net/tulip.c	Fri Jan 30 11:28:08 1998
+++ linux/drivers/net/tulip.c	Tue Feb 10 12:56:45 1998
@@ -1895,7 +1895,7 @@
 				}
 
 				/* Free the original skb. */
-				dev_kfree_skb(lp->tx_skbuff[entry], FREE_WRITE);
+				dev_kfree_skb(lp->tx_skbuff[entry]);
 				lp->tx_skbuff[entry] = 0;
 			}
 
@@ -2309,12 +2309,12 @@
 #if LINUX_VERSION_CODE < 0x20100
 			skb->free = 1;
 #endif
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 		}
 	}
 	for (i = 0; i < TX_RING_SIZE; i++) {
 		if (tp->tx_skbuff[i])
-			dev_kfree_skb(tp->tx_skbuff[i], FREE_WRITE);
+			dev_kfree_skb(tp->tx_skbuff[i]);
 		tp->tx_skbuff[i] = 0;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/wavelan.c linux/drivers/net/wavelan.c
--- v2.1.85/linux/drivers/net/wavelan.c	Mon Nov  3 09:29:31 1997
+++ linux/drivers/net/wavelan.c	Tue Feb 10 12:56:45 1998
@@ -2821,7 +2821,7 @@
       wv_packet_write(dev, skb->data, skb->len);
     }
 
-  dev_kfree_skb(skb, FREE_WRITE);
+  dev_kfree_skb(skb);
 
 #ifdef DEBUG_TX_TRACE
   printk(KERN_DEBUG "%s: <-wavelan_packet_xmit()\n", dev->name);
diff -u --recursive --new-file v2.1.85/linux/drivers/net/x25_asy.c linux/drivers/net/x25_asy.c
--- v2.1.85/linux/drivers/net/x25_asy.c	Sat Nov 29 10:33:20 1997
+++ linux/drivers/net/x25_asy.c	Tue Feb 10 12:56:45 1998
@@ -244,7 +244,7 @@
 	skb->protocol=htons(ETH_P_X25);
 	if((err=lapb_data_received(sl,skb))!=LAPB_OK)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		printk(KERN_DEBUG "x25_asy: data received err - %d\n",err);
 	}
 	else
@@ -342,13 +342,13 @@
 		case 0x01: /* Connection request .. do nothing */
 			if((err=lapb_connect_request(sl))!=LAPB_OK)
 				printk(KERN_ERR "x25_asy: lapb_connect_request error - %d\n", err);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 		case 0x02: /* Disconnect request .. do nothing - hang up ?? */
 			if((err=lapb_disconnect_request(sl))!=LAPB_OK)
 				printk(KERN_ERR "x25_asy: lapb_disconnect_request error - %d\n", err);
 		default:
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return  0;
 	}
 	skb_pull(skb,1);	/* Remove control byte */
@@ -385,7 +385,7 @@
 	if((err=lapb_data_request(sl,skb))!=LAPB_OK)
 	{
 		printk(KERN_ERR "lapbeth: lapb_data_request error - %d\n", err);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 0;
 	}
 	return 0;
@@ -418,7 +418,7 @@
 	if(sl->dev->tbusy)
 	{
 		printk(KERN_ERR "x25_asy: tbusy drop\n");
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 	/* We were not busy, so we are now... :-) */
@@ -427,7 +427,7 @@
 		x25_asy_lock(sl);
 		sl->tx_bytes+=skb->len;
 		x25_asy_encaps(sl, skb->data, skb->len);
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 	}
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/net/znet.c linux/drivers/net/znet.c
--- v2.1.85/linux/drivers/net/znet.c	Mon Nov  3 09:29:31 1997
+++ linux/drivers/net/znet.c	Tue Feb 10 12:56:45 1998
@@ -395,7 +395,7 @@
 		if (znet_debug > 4)
 		  printk(KERN_DEBUG "%s: Transmitter queued, length %d.\n", dev->name, length);
 	}
-	dev_kfree_skb(skb, FREE_WRITE); 
+	dev_kfree_skb(skb); 
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/scsi/Config.in linux/drivers/scsi/Config.in
--- v2.1.85/linux/drivers/scsi/Config.in	Wed Feb  4 11:36:00 1998
+++ linux/drivers/scsi/Config.in	Mon Feb  9 16:12:55 1998
@@ -4,7 +4,7 @@
 dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI
 dep_tristate 'SCSI CD-ROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI
 if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then
-  bool '  Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
+  bool '  Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR
 fi
 dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI
 
@@ -84,8 +84,8 @@
   fi
 fi
 if [ "$CONFIG_MCA" = "y" ]; then
-  bool 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA
-  if [ "$CONFIG_SCSI_IBMMCA" = "y" ]; then
+  dep_tristate 'IBMMCA SCSI support' CONFIG_SCSI_IBMMCA $CONFIG_SCSI
+  if [ "$CONFIG_SCSI_IBMMCA" != "n" ]; then
      bool '  Standard SCSI-order' CONFIG_IBMMCA_SCSI_ORDER_STANDARD
      bool '  Reset SCSI-devices at boottime' CONFIG_IBMMCA_SCSI_DEV_RESET
   fi
diff -u --recursive --new-file v2.1.85/linux/drivers/scsi/advansys.c linux/drivers/scsi/advansys.c
--- v2.1.85/linux/drivers/scsi/advansys.c	Fri Jan 23 18:10:32 1998
+++ linux/drivers/scsi/advansys.c	Thu Feb  5 11:21:54 1998
@@ -673,6 +673,8 @@
 #include "sd.h"
 #include "advansys.h"
 
+#include <linux/bios32.h>
+
 /*
  * If Linux eventually defines a DID_UNDERRUN, the constant here can be
  * removed. The current value of zero for DID_UNDERRUN results in underrun
@@ -7612,74 +7614,8 @@
 )
 {
     uchar tmp;
-    ulong address;
-    ulong lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func;
-    uchar t2CFA, t2CF8;
-    ulong t1CF8, t1CFC;
-
-    ASC_DBG1(4, "asc_get_cfg_byte: type: %d\n", pciData->type);
-
-    /*
-     * Check type of configuration mechanism.
-     */
-    if (pciData->type == 2) {
-        /*
-         * Save registers to be restored later.
-         */
-        t2CFA = inp(0xCFA);    /* save PCI bus register */
-        t2CF8 = inp(0xCF8);    /* save config space enable register */
-
-        /*
-         * Write the bus and enable registers.
-         */
-        /* set for type 1 cycle, if needed */
-        outp(0xCFA, pciData->bus);
-        /* set the function number */
-        outp(0xCF8, 0x10 | (pciData->func << 1));
-
-        /*
-         * Read configuration space type 2 locations.
-         */
-        tmp = inp(0xC000 | ((pciData->slot << 8) + pciData->offset));
-
-        /*
-         * Restore registers.
-         */
-        outp(0xCF8, t2CF8);    /* restore the enable register */
-        outp(0xCFA, t2CFA);    /* restore PCI bus register */
-    } else {
-        /*
-         * Type 1 or 3 configuration mechanism.
-         *
-         * Save CONFIG_ADDRESS and CONFIG_DATA register values.
-         */
-        t1CF8 = inpl(0xCF8);
-        t1CFC = inpl(0xCFC);
-
-        /*
-         * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>,
-         * reg = <7:2>
-         */
-        address = (ulong) ((lbus << 16) | (lslot << 11) |
-            (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L);
-
-        /*
-         * Write out address to CONFIG_ADDRESS.
-         */
-        outpl(0xCF8, address);
-
-        /*
-         * Read in word from CONFIG_DATA.
-         */
-        tmp = (uchar) ((inpl(0xCFC) >> ((pciData->offset & 3) * 8)) & 0xFF);
 
-        /*
-         * Restore registers.
-         */
-        outpl(0xCF8, t1CF8);
-        outpl(0xCFC, t1CFC);
-    }
-    ASC_DBG1(4, "asc_get_cfg_byte: config data: %x\n", tmp);
+    pcibios_read_config_byte(pciData->bus, pciData->slot * 8 + pciData->func, pciData->offset, &tmp);
     return tmp;
 }
 
diff -u --recursive --new-file v2.1.85/linux/drivers/scsi/sr_ioctl.c linux/drivers/scsi/sr_ioctl.c
--- v2.1.85/linux/drivers/scsi/sr_ioctl.c	Thu Jan  8 20:35:43 1998
+++ linux/drivers/scsi/sr_ioctl.c	Mon Feb  9 16:12:55 1998
@@ -803,6 +803,15 @@
 
     RO_IOCTLS(cdi->dev,arg);
 
+    case BLKFLSBUF:
+	if(!suser())
+		return -EACCES;
+	if(!(cdi->dev))
+		return -EINVAL;
+	fsync_dev(cdi->dev);
+	invalidate_buffers(cdi->dev);
+	return 0;
+
     default:
 	return scsi_ioctl(scsi_CDs[target].device,cmd,(void *) arg);
     }
diff -u --recursive --new-file v2.1.85/linux/drivers/scsi/sr_vendor.c linux/drivers/scsi/sr_vendor.c
--- v2.1.85/linux/drivers/scsi/sr_vendor.c	Thu Jan  8 20:35:43 1998
+++ linux/drivers/scsi/sr_vendor.c	Mon Feb  9 16:12:55 1998
@@ -3,7 +3,7 @@
  * vendor-specific code for SCSI CD-ROM's goes here.
  *
  * This is needed becauce most of the new features (multisession and
- * the like) are to new to be included into the SCSI-II standard (to
+ * the like) are too new to be included into the SCSI-II standard (to
  * be exact: there is'nt anything in my draft copy).
  *
  * Aug 1997: Ha! Got a SCSI-3 cdrom spec across my fingers. SCSI-3 does
@@ -83,7 +83,13 @@
 		if (!strncmp (model,"CD-ROM DRIVE:25", 15)  ||
 		    !strncmp (model,"CD-ROM DRIVE:36", 15)  ||
 		    !strncmp (model,"CD-ROM DRIVE:83", 15)  ||
-		    !strncmp (model,"CD-ROM DRIVE:84 ",16))
+		    !strncmp (model,"CD-ROM DRIVE:84 ",16)
+#if 0
+		        /* my NEC 3x returns the read-raw data if a read-raw
+		           is followed by a read for the same sector - aeb */
+		    || !strncmp (model,"CD-ROM DRIVE:500",16)
+#endif
+		   )
 			/* these can't handle multisession, may hang */
 			scsi_CDs[minor].cdi.mask |= CDC_MULTI_SESSION;
 
@@ -145,10 +151,10 @@
 
 int sr_cd_check(struct cdrom_device_info *cdi)
 {
-	unsigned long   sector,min,sec,frame;
+	unsigned long   sector;
 	unsigned char   *buffer;     /* the buffer for the ioctl */
 	unsigned char   cmd[12];     /* the scsi-command */
-	int             rc,is_xa,no_multi,minor;
+	int             rc,no_multi,minor;
 
 	minor = MINOR(cdi->dev);
 	if (scsi_CDs[minor].cdi.mask & CDC_MULTI_SESSION)
@@ -158,7 +164,6 @@
 	if(!buffer) return -ENOMEM;
 	
 	sector   = 0;         /* the multisession sector offset goes here  */
-	is_xa    = 0;         /* flag: the CD uses XA-Sectors              */
 	no_multi = 0;         /* flag: the drive can't handle multisession */
 	rc       = 0;
     
@@ -188,7 +193,8 @@
 		break;
 		
 #ifdef CONFIG_BLK_DEV_SR_VENDOR
-	case VENDOR_NEC:
+	case VENDOR_NEC: {
+		unsigned long min,sec,frame;
 		memset(cmd,0,12);
 		cmd[0] = 0xde;
 		cmd[1] = (scsi_CDs[minor].device->lun << 5) | 0x03;
@@ -207,8 +213,11 @@
 		frame  = BCD_TO_BIN(buffer[17]);
 		sector = min*CD_SECS*CD_FRAMES + sec*CD_FRAMES + frame;
 		break;
+	}
+
+	case VENDOR_TOSHIBA: {
+		unsigned long min,sec,frame;
 
-	case VENDOR_TOSHIBA:
 		/* we request some disc information (is it a XA-CD ?,
 		 * where starts the last session ?) */
 		memset(cmd,0,12);
@@ -230,6 +239,7 @@
 		if (sector)
 			sector -= CD_MSF_OFFSET;
 		break;
+	}
 
 	case VENDOR_WRITER:
 		memset(cmd,0,12);
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/Config.in linux/drivers/sound/Config.in
--- v2.1.85/linux/drivers/sound/Config.in	Mon Jan 12 14:46:21 1998
+++ linux/drivers/sound/Config.in	Mon Feb  9 11:19:39 1998
@@ -138,6 +138,7 @@
 dep_tristate 'FM synthesizer (YM3812/OPL-3) support' CONFIG_YM3812 $CONFIG_SOUND
 dep_tristate 'Loopback MIDI device support' CONFIG_VMIDI $CONFIG_SOUND
 
+dep_tristate '6850 UART support' CONFIG_UART6850 $CONFIG_SOUND
 if [ "$CONFIG_UART6850" = "y" ]; then
     hex 'I/O base for UART 6850 MIDI port (Unknown)' U6850_BASE 0
     int 'UART6850 IRQ (Unknown)' U6850_IRQ -1
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/sequencer.c linux/drivers/sound/sequencer.c
--- v2.1.85/linux/drivers/sound/sequencer.c	Sun Jan  4 10:40:16 1998
+++ linux/drivers/sound/sequencer.c	Mon Feb  9 11:21:11 1998
@@ -52,16 +52,23 @@
 static int      seq_mode = SEQ_1;
 
 static struct wait_queue *seq_sleeper = NULL;
-static volatile struct snd_wait seq_sleep_flag =
-{0};
-static struct wait_queue *midi_sleeper = NULL;
-static volatile struct snd_wait midi_sleep_flag =
-{0};
 
-static int      midi_opened[MAX_MIDI_DEV] =
-{0};
-static int      midi_written[MAX_MIDI_DEV] =
-{0};
+static volatile struct snd_wait seq_sleep_flag = {
+	0
+};
+
+static struct wait_queue *midi_sleeper = NULL;
+static volatile struct snd_wait midi_sleep_flag = {
+	0
+};
+
+static int      midi_opened[MAX_MIDI_DEV] = {
+	0
+};
+
+static int      midi_written[MAX_MIDI_DEV] = {
+	0
+};
 
 static unsigned long prev_input_time = 0;
 static int      prev_event_time;
@@ -70,6 +77,7 @@
 
 #define EV_SZ	8
 #define IEV_SZ	8
+
 static unsigned char *queue = NULL;
 static unsigned char *iqueue = NULL;
 
@@ -102,29 +110,27 @@
 
 	save_flags(flags);
 	cli();
+
 	if (!iqlen)
 	{
+		unsigned long   tlimit;
 		if ((file->flags & (O_NONBLOCK) ? 1 : 0))
 		{
 			restore_flags(flags);
 			return -EAGAIN;
 		}
+		if (pre_event_timeout)
+			current->timeout = tlimit = jiffies + (pre_event_timeout);
+		else
+			tlimit = (unsigned long) -1;
+		midi_sleep_flag.opts = WK_SLEEP;
+		interruptible_sleep_on(&midi_sleeper);
+		if (!(midi_sleep_flag.opts & WK_WAKEUP))
 		{
-			unsigned long   tlimit;
-
-			if (pre_event_timeout)
-				current->timeout = tlimit = jiffies + (pre_event_timeout);
-			else
-				tlimit = (unsigned long) -1;
-			midi_sleep_flag.opts = WK_SLEEP;
-			interruptible_sleep_on(&midi_sleeper);
-			if (!(midi_sleep_flag.opts & WK_WAKEUP))
-			{
-				if (jiffies >= tlimit)
-					midi_sleep_flag.opts |= WK_TIMEOUT;
-			}
-			midi_sleep_flag.opts &= ~WK_SLEEP;
-		};
+			if (jiffies >= tlimit)
+				midi_sleep_flag.opts |= WK_TIMEOUT;
+		}
+		midi_sleep_flag.opts &= ~WK_SLEEP;
 
 		if (!iqlen)
 		{
@@ -134,10 +140,8 @@
 	}
 	while (iqlen && c >= ev_len)
 	{
-		{
-			char *fixit = (char *) &iqueue[iqhead * IEV_SZ];
-			copy_to_user(&(buf)[p], fixit, ev_len);
-		};
+		char *fixit = (char *) &iqueue[iqhead * IEV_SZ];
+		copy_to_user(&(buf)[p], fixit, ev_len);
 		p += ev_len;
 		c -= ev_len;
 
@@ -145,7 +149,6 @@
 		iqlen--;
 	}
 	restore_flags(flags);
-
 	return count - c;
 }
 
@@ -158,7 +161,7 @@
 
 void seq_copy_to_input(unsigned char *event_rec, int len)
 {
-	unsigned long   flags;
+	unsigned long flags;
 
 	/*
 	 * Verify that the len is valid for the current mode.
@@ -202,7 +205,6 @@
 	if (tstamp != prev_input_time)
 	{
 		tstamp = (tstamp << 8) | SEQ_WAIT;
-
 		seq_copy_to_input((unsigned char *) &tstamp, 4);
 		prev_input_time = tstamp;
 	}
@@ -396,7 +398,7 @@
 
 static int extended_event(unsigned char *q)
 {
-	int             dev = q[2];
+	int dev = q[2];
 
 	if (dev < 0 || dev >= max_synthdev)
 		return -ENXIO;
@@ -451,22 +453,20 @@
 
 static int find_voice(int dev, int chn, int note)
 {
-	unsigned short  key;
-	int             i;
+	unsigned short key;
+	int i;
 
 	key = (chn << 8) | (note + 1);
-
 	for (i = 0; i < synth_devs[dev]->alloc.max_voice; i++)
 		if (synth_devs[dev]->alloc.map[i] == key)
 			return i;
-
 	return -1;
 }
 
 static int alloc_voice(int dev, int chn, int note)
 {
 	unsigned short  key;
-	int             voice;
+	int voice;
 
 	key = (chn << 8) | (note + 1);
 
@@ -474,7 +474,7 @@
 					     &synth_devs[dev]->alloc);
 	synth_devs[dev]->alloc.map[voice] = key;
 	synth_devs[dev]->alloc.alloc_times[voice] =
-	    synth_devs[dev]->alloc.timestamp++;
+			synth_devs[dev]->alloc.timestamp++;
 	return voice;
 }
 
@@ -562,13 +562,13 @@
 
 static void seq_chn_common_event(unsigned char *event_rec)
 {
-	unsigned char   dev = event_rec[1];
-	unsigned char   cmd = event_rec[2];
-	unsigned char   chn = event_rec[3];
-	unsigned char   p1 = event_rec[4];
+	unsigned char dev = event_rec[1];
+	unsigned char cmd = event_rec[2];
+	unsigned char chn = event_rec[3];
+	unsigned char p1 = event_rec[4];
 
-	/* unsigned char   p2 = event_rec[5]; */
-	unsigned short  w14 = *(short *) &event_rec[6];
+	/* unsigned char p2 = event_rec[5]; */
+	unsigned short w14 = *(short *) &event_rec[6];
 
 	if ((int) dev > max_synthdev || synth_devs[dev] == NULL)
 		return;
@@ -659,8 +659,8 @@
 
 static int seq_timing_event(unsigned char *event_rec)
 {
-	unsigned char   cmd = event_rec[1];
-	unsigned int    parm = *(int *) &event_rec[4];
+	unsigned char cmd = event_rec[1];
+	unsigned int parm = *(int *) &event_rec[4];
 
 	if (seq_mode == SEQ_2)
 	{
@@ -671,7 +671,6 @@
 			if ((SEQ_MAX_QUEUE - qlen) >= output_threshold)
 			{
 				unsigned long   flags;
-
 				save_flags(flags);
 				cli();
 				if ((seq_sleep_flag.opts & WK_SLEEP))
@@ -781,8 +780,8 @@
 
 static void seq_sysex_message(unsigned char *event_rec)
 {
-	int             dev = event_rec[1];
-	int             i, l = 0;
+	int dev = event_rec[1];
+	int i, l = 0;
 	unsigned char  *buf = &event_rec[2];
 
 	if ((int) dev > max_synthdev)
@@ -957,9 +956,8 @@
 			seq_sysex_message(q);
 			break;
 
-		default:;
+		default:
 	}
-
 	return 0;
 }
 
@@ -1009,12 +1007,9 @@
 	}
 }
 
-static void
-reset_controllers(int dev, unsigned char *controller, int update_dev)
+static void reset_controllers(int dev, unsigned char *controller, int update_dev)
 {
-
 	int i;
-
 	for (i = 0; i < 128; i++)
 		controller[i] = ctrl_def_values[i];
 }
@@ -1049,16 +1044,15 @@
 			synth_devs[dev]->chn_info[chn].bender_range = 200;
 		}
 	}
-
 	max_mididev = 0;
 	seq_mode = SEQ_2;
 }
 
 int sequencer_open(int dev, struct fileinfo *file)
 {
-	int             retval, mode, i;
-	int             level, tmp;
-	unsigned long   flags;
+	int retval, mode, i;
+	int level, tmp;
+	unsigned long flags;
 
 	if (!sequencer_ok)
 		sequencer_init();
@@ -1076,9 +1070,8 @@
 		return -ENXIO;
 	}
 	if (dev)		/* Patch manager device (obsolete) */
-	{
 		  return -ENXIO;
-	}
+
 	if (mode == OPEN_READ)
 	{
 		if (!num_midis)
@@ -1192,9 +1185,8 @@
 			}
 	}
 	if (seq_mode == SEQ_2)
-	{
 		tmr->open(tmr_no, seq_mode);
-	}
+
 	seq_sleep_flag.opts = WK_NONE;
 	midi_sleep_flag.opts = WK_NONE;
 	output_threshold = SEQ_MAX_QUEUE / 2;
@@ -1204,7 +1196,7 @@
 
 void seq_drain_midi_queues(void)
 {
-	int             i, n;
+	int i, n;
 
 	/*
 	 * Give the Midi drivers time to drain their output queues
@@ -1228,30 +1220,25 @@
 		
 		if (n)
 		{
-			{
-				unsigned long   tlimit;
+			unsigned long   tlimit;
 
-				if (HZ / 10)
-					current->timeout = tlimit = jiffies + (HZ / 10);
-				else
-					tlimit = (unsigned long) -1;
-				seq_sleep_flag.opts = WK_SLEEP;
-				interruptible_sleep_on(&seq_sleeper);
-				if (!(seq_sleep_flag.opts & WK_WAKEUP))
-				{
-					if (jiffies >= tlimit)
-						seq_sleep_flag.opts |= WK_TIMEOUT;
-				}
-				seq_sleep_flag.opts &= ~WK_SLEEP;
-			};
+			current->timeout = tlimit = jiffies + (HZ / 10);
+			seq_sleep_flag.opts = WK_SLEEP;
+			interruptible_sleep_on(&seq_sleeper);
+			if (!(seq_sleep_flag.opts & WK_WAKEUP))
+			{
+				if (jiffies >= tlimit)
+					seq_sleep_flag.opts |= WK_TIMEOUT;
+			}
+			seq_sleep_flag.opts &= ~WK_SLEEP;
 		}
 	}
 }
 
 void sequencer_release(int dev, struct fileinfo *file)
 {
-	int             i;
-	int             mode = file->mode & O_ACCMODE;
+	int i;
+	int mode = file->mode & O_ACCMODE;
 
 	dev = dev >> 4;
 
@@ -1261,29 +1248,21 @@
 	 * Wait until the queue is empty (if we don't have nonblock)
 	 */
 
-	if (mode != OPEN_READ && !(file->flags & (O_NONBLOCK) ?
-				   1 : 0))
+	if (mode != OPEN_READ && !(file->flags & (O_NONBLOCK) ? 1 : 0))
 	{
 		while (!signal_pending(current) && qlen > 0)
 		{
+			unsigned long   tlimit;
 			seq_sync();
-
+			current->timeout = tlimit = jiffies + (3 * HZ);
+			seq_sleep_flag.opts = WK_SLEEP;
+			interruptible_sleep_on(&seq_sleeper);
+			if (!(seq_sleep_flag.opts & WK_WAKEUP))
 			{
-				unsigned long   tlimit;
-
-				if (3 * HZ)
-					current->timeout = tlimit = jiffies + (3 * HZ);
-				else
-					tlimit = (unsigned long) -1;
-				seq_sleep_flag.opts = WK_SLEEP;
-				interruptible_sleep_on(&seq_sleeper);
-				if (!(seq_sleep_flag.opts & WK_WAKEUP))
-				{
-					if (jiffies >= tlimit)
-						seq_sleep_flag.opts |= WK_TIMEOUT;
-				}
-				seq_sleep_flag.opts &= ~WK_SLEEP;
-			};	/* Extra delay */
+				if (jiffies >= tlimit)
+					seq_sleep_flag.opts |= WK_TIMEOUT;
+			}
+			seq_sleep_flag.opts &= ~WK_SLEEP;
 		}
 	}
 		  
@@ -1327,7 +1306,7 @@
 
 static int seq_sync(void)
 {
-	unsigned long   flags;
+	unsigned long flags;
 
 	if (qlen && !seq_playing && !signal_pending(current))
 		seq_startplay();
@@ -1336,25 +1315,20 @@
 	cli();
 	if (qlen > 0)
 	{
-		{
-			unsigned long   tlimit;
+		unsigned long   tlimit;
 
-			if (HZ)
-				current->timeout = tlimit = jiffies + (HZ);
-			else
-				tlimit = (unsigned long) -1;
-			seq_sleep_flag.opts = WK_SLEEP;
-			interruptible_sleep_on(&seq_sleeper);
-			if (!(seq_sleep_flag.opts & WK_WAKEUP))
-			{
-				if (jiffies >= tlimit)
-					seq_sleep_flag.opts |= WK_TIMEOUT;
-			}
-			seq_sleep_flag.opts &= ~WK_SLEEP;
-		};
+		if (HZ)
+			current->timeout = tlimit = jiffies + (HZ);
+		seq_sleep_flag.opts = WK_SLEEP;
+		interruptible_sleep_on(&seq_sleeper);
+		if (!(seq_sleep_flag.opts & WK_WAKEUP))
+		{
+			if (jiffies >= tlimit)
+				seq_sleep_flag.opts |= WK_TIMEOUT;
+		}
+		seq_sleep_flag.opts &= ~WK_SLEEP;
 	}
 	restore_flags(flags);
-
 	return qlen;
 }
 
@@ -1364,8 +1338,8 @@
 	 * NOTE! Calls sleep(). Don't call this from interrupt.
 	 */
 
-	int             n;
-	unsigned long   flags;
+	int n;
+	unsigned long flags;
 
 	/*
 	 * This routine sends one byte to the Midi channel.
@@ -1379,22 +1353,17 @@
 	cli();
 	while (n && !midi_devs[dev]->outputc(dev, data))
 	{
-		{
-			unsigned long   tlimit;
+		unsigned long   tlimit;
 
-			if (4)
-				current->timeout = tlimit = jiffies + (4);
-			else
-				tlimit = (unsigned long) -1;
-			seq_sleep_flag.opts = WK_SLEEP;
-			interruptible_sleep_on(&seq_sleeper);
-			if (!(seq_sleep_flag.opts & WK_WAKEUP))
-			{
-				if (jiffies >= tlimit)
-					seq_sleep_flag.opts |= WK_TIMEOUT;
-			}
-			seq_sleep_flag.opts &= ~WK_SLEEP;
-		};
+		current->timeout = tlimit = jiffies + (4);
+		seq_sleep_flag.opts = WK_SLEEP;
+		interruptible_sleep_on(&seq_sleeper);
+		if (!(seq_sleep_flag.opts & WK_WAKEUP))
+		{
+			if (jiffies >= tlimit)
+				seq_sleep_flag.opts |= WK_TIMEOUT;
+		}
+		seq_sleep_flag.opts &= ~WK_SLEEP;
 		n--;
 	}
 	restore_flags(flags);
@@ -1406,9 +1375,9 @@
 	 * NOTE! Calls sleep(). Don't call this from interrupt.
 	 */
 
-	int             i;
-	int             chn;
-	unsigned long   flags;
+	int i;
+	int chn;
+	unsigned long flags;
 
 	if (softsynthp != NULL)
 		softsynthp(SSYN_STOP, 0, 0, 0);
@@ -1515,197 +1484,204 @@
 
 	orig_dev = dev = dev >> 4;
 
-	switch (cmd) {
-	case SNDCTL_TMR_TIMEBASE:
-	case SNDCTL_TMR_TEMPO:
-	case SNDCTL_TMR_START:
-	case SNDCTL_TMR_STOP:
-	case SNDCTL_TMR_CONTINUE:
-	case SNDCTL_TMR_METRONOME:
-	case SNDCTL_TMR_SOURCE:
-		if (seq_mode != SEQ_2)
-			return -EINVAL;
-		return tmr->ioctl(tmr_no, cmd, arg);
+	switch (cmd) 
+	{
+		case SNDCTL_TMR_TIMEBASE:
+		case SNDCTL_TMR_TEMPO:
+		case SNDCTL_TMR_START:
+		case SNDCTL_TMR_STOP:
+		case SNDCTL_TMR_CONTINUE:
+		case SNDCTL_TMR_METRONOME:
+		case SNDCTL_TMR_SOURCE:
+			if (seq_mode != SEQ_2)
+				return -EINVAL;
+			return tmr->ioctl(tmr_no, cmd, arg);
 		
-	case SNDCTL_TMR_SELECT:
-		if (seq_mode != SEQ_2)
-			return -EINVAL;
-		if (__get_user(pending_timer, (int *)arg))
-			return -EFAULT;
-		if (pending_timer < 0 || pending_timer >= num_sound_timers || sound_timer_devs[pending_timer] == NULL) {
-			pending_timer = -1;
-			return -EINVAL;
-		}
-		return __put_user(pending_timer, (int *)arg);
+		case SNDCTL_TMR_SELECT:
+			if (seq_mode != SEQ_2)
+				return -EINVAL;
+			if (get_user(pending_timer, (int *)arg))
+				return -EFAULT;
+			if (pending_timer < 0 || pending_timer >= num_sound_timers || sound_timer_devs[pending_timer] == NULL) 
+			{
+				pending_timer = -1;
+				return -EINVAL;
+			}
+			val = pending_timer;
+			break;
 
-	case SNDCTL_SEQ_PANIC:
-		seq_panic();
-		break;
+		case SNDCTL_SEQ_PANIC:
+			seq_panic();
+			return -EINVAL;
 		
-	case SNDCTL_SEQ_SYNC:
-		if (mode == OPEN_READ)
-			return 0;
-		while (qlen > 0 && !signal_pending(current))
-			seq_sync();
-		return qlen ? -EINTR : 0;
+		case SNDCTL_SEQ_SYNC:
+			if (mode == OPEN_READ)
+				return 0;
+			while (qlen > 0 && !signal_pending(current))
+				seq_sync();
+			return qlen ? -EINTR : 0;
 		
-	case SNDCTL_SEQ_RESET:
-		seq_reset();
-		return 0;
-
-	case SNDCTL_SEQ_TESTMIDI:
-		if (__get_user(midi_dev, (int *)arg))
-			return -EFAULT;
-		if (midi_dev < 0 || midi_dev >= max_mididev)
-			return -ENXIO;
+		case SNDCTL_SEQ_RESET:
+			seq_reset();
+			return 0;
+
+		case SNDCTL_SEQ_TESTMIDI:
+			if (__get_user(midi_dev, (int *)arg))
+				return -EFAULT;
+			if (midi_dev < 0 || midi_dev >= max_mididev)
+				return -ENXIO;
 		
-		if (!midi_opened[midi_dev] && 
-		    (err = midi_devs[midi_dev]->open(midi_dev, mode, sequencer_midi_input,
+			if (!midi_opened[midi_dev] && 
+				(err = midi_devs[midi_dev]->open(midi_dev, mode, sequencer_midi_input,
 						     sequencer_midi_output)) < 0)
-			return err;
-		midi_opened[midi_dev] = 1;
-		return 0;
-
-	case SNDCTL_SEQ_GETINCOUNT:
-		if (mode == OPEN_WRITE)
+				return err;
+			midi_opened[midi_dev] = 1;
 			return 0;
-		return __put_user(iqlen,  (int *)arg);
+
+		case SNDCTL_SEQ_GETINCOUNT:
+			if (mode == OPEN_WRITE)
+				return 0;
+			val = iqlen;
+			break;
 		
-	case SNDCTL_SEQ_GETOUTCOUNT:
-		if (mode == OPEN_READ)
-			  return 0;
-		val = SEQ_MAX_QUEUE - qlen;
-		return __put_user(val, (int *)arg);
+		case SNDCTL_SEQ_GETOUTCOUNT:
+			if (mode == OPEN_READ)
+				return 0;
+			val = SEQ_MAX_QUEUE - qlen;
+			break;
 		
-	case SNDCTL_SEQ_GETTIME:
-		if (seq_mode == SEQ_2)
-			return tmr->ioctl(tmr_no, cmd, arg);
-		if (softsynthp != NULL)
-			val = softsynthp(SSYN_GETTIME, 0, 0, 0);
-		else
-			val = jiffies - seq_time;
-		return __put_user(val, (int *)arg);
+		case SNDCTL_SEQ_GETTIME:
+			if (seq_mode == SEQ_2)
+				return tmr->ioctl(tmr_no, cmd, arg);
+			if (softsynthp != NULL)
+				val = softsynthp(SSYN_GETTIME, 0, 0, 0);
+			else
+				val = jiffies - seq_time;
+			break;
 		
-	case SNDCTL_SEQ_CTRLRATE:
-		/*
-		 * If *arg == 0, just return the current rate
-		 */
-		if (seq_mode == SEQ_2)
-			return tmr->ioctl(tmr_no, cmd, arg);
+		case SNDCTL_SEQ_CTRLRATE:
+			/*
+			 * If *arg == 0, just return the current rate
+			 */
+			if (seq_mode == SEQ_2)
+				return tmr->ioctl(tmr_no, cmd, arg);
 		
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val != 0)
-			return -EINVAL;
-		return __put_user(HZ, (int *)arg);
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val != 0)
+				return -EINVAL;
+			val = HZ;
+			break;
 
-	case SNDCTL_SEQ_RESETSAMPLES:
-	case SNDCTL_SYNTH_REMOVESAMPLE:
-	case SNDCTL_SYNTH_CONTROL:
-		if (__get_user(dev, (int *)arg))
-			return -EFAULT;
-		if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << dev)) && !orig_dev)
-			return -EBUSY;
-		return synth_devs[dev]->ioctl(dev, cmd, arg);
-
-	case SNDCTL_SEQ_NRSYNTHS:
-		return __put_user(max_synthdev, (int *)arg);
-
-	case SNDCTL_SEQ_NRMIDIS:
-		return __put_user(max_mididev, (int *)arg);
-
-	case SNDCTL_SYNTH_MEMAVL:
-		if (__get_user(dev, (int *)arg))
-			return -EFAULT;
-		if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << dev)) && !orig_dev)
-			return -EBUSY;
-		val = synth_devs[dev]->ioctl(dev, cmd, arg);
-		return __put_user(val, (int *)arg);
-
-	case SNDCTL_FM_4OP_ENABLE:
-		if (__get_user(dev, (int *)arg))
-			return -EFAULT;
-		if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << dev)))
-			return -ENXIO;
-		synth_devs[dev]->ioctl(dev, cmd, arg);
-		return 0;
+		case SNDCTL_SEQ_RESETSAMPLES:
+		case SNDCTL_SYNTH_REMOVESAMPLE:
+		case SNDCTL_SYNTH_CONTROL:
+			if (get_user(dev, (int *)arg))
+				return -EFAULT;
+			if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+				return -EBUSY;
+			return synth_devs[dev]->ioctl(dev, cmd, arg);
 
-	case SNDCTL_SYNTH_INFO:
-		if (__get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
-			return -EFAULT;
-		if (dev < 0 || dev >= max_synthdev)
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << dev)) && !orig_dev)
-			return -EBUSY;
-		return synth_devs[dev]->ioctl(dev, cmd, arg);
+		case SNDCTL_SEQ_NRSYNTHS:
+			val = max_synthdev;
+			break;
+
+		case SNDCTL_SEQ_NRMIDIS:
+			val = max_mididev;
+			break;
+
+		case SNDCTL_SYNTH_MEMAVL:
+			if (get_user(dev, (int *)arg))
+				return -EFAULT;
+			if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+				return -EBUSY;
+			val = synth_devs[dev]->ioctl(dev, cmd, arg);
+			break;
+
+		case SNDCTL_FM_4OP_ENABLE:
+			if (get_user(dev, (int *)arg))
+				return -EFAULT;
+			if (dev < 0 || dev >= num_synths || synth_devs[dev] == NULL)
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << dev)))
+				return -ENXIO;
+			synth_devs[dev]->ioctl(dev, cmd, arg);
+			return 0;
+
+		case SNDCTL_SYNTH_INFO:
+			if (get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
+				return -EFAULT;
+			if (dev < 0 || dev >= max_synthdev)
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+				return -EBUSY;
+			return synth_devs[dev]->ioctl(dev, cmd, arg);
 		
 		/* Like SYNTH_INFO but returns ID in the name field */
-	case SNDCTL_SYNTH_ID:
-		if (__get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
-			return -EFAULT;
-		if (dev < 0 || dev >= max_synthdev)
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << dev)) && !orig_dev)
-			return -EBUSY;
-		memcpy(&inf, synth_devs[dev]->info, sizeof(inf));
-		strncpy(inf.name, synth_devs[dev]->id, sizeof(inf.name));
-		inf.device = dev;
-		return __copy_to_user(arg, &inf, sizeof(inf));
+		case SNDCTL_SYNTH_ID:
+			if (get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
+				return -EFAULT;
+			if (dev < 0 || dev >= max_synthdev)
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << dev)) && !orig_dev)
+				return -EBUSY;
+			memcpy(&inf, synth_devs[dev]->info, sizeof(inf));
+			strncpy(inf.name, synth_devs[dev]->id, sizeof(inf.name));
+			inf.device = dev;
+			return copy_to_user(arg, &inf, sizeof(inf))?-EFAULT:0;
 		
-	case SNDCTL_SEQ_OUTOFBAND:
-		if (__copy_from_user(&event_rec, arg, sizeof(event_rec)))
-			return -EFAULT;
-		save_flags(flags);
-		cli();
-		play_event(event_rec.arr);
-		restore_flags(flags);
-		return 0;
+		case SNDCTL_SEQ_OUTOFBAND:
+			if (copy_from_user(&event_rec, arg, sizeof(event_rec)))
+				return -EFAULT;
+			save_flags(flags);
+			cli();
+			play_event(event_rec.arr);
+			restore_flags(flags);
+			return 0;
 		  
-	case SNDCTL_MIDI_INFO:
-		if (__get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
-			return -EFAULT;
-		if (dev < 0 || dev >= max_mididev)
-			return -ENXIO;
-		midi_devs[dev]->info.device = dev;
-		return __copy_to_user(arg, &midi_devs[dev]->info, sizeof(struct synth_info));
+		case SNDCTL_MIDI_INFO:
+			if (get_user(dev, (int *)(&(((struct synth_info *)arg)->device))))
+				return -EFAULT;
+			if (dev < 0 || dev >= max_mididev)
+				return -ENXIO;
+			midi_devs[dev]->info.device = dev;
+			return copy_to_user(arg, &midi_devs[dev]->info, sizeof(struct synth_info))?-EFAULT:0;
 		
-	case SNDCTL_SEQ_THRESHOLD:
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val < 1)
-			val = 1;
-		if (val >= SEQ_MAX_QUEUE)
-			val = SEQ_MAX_QUEUE - 1;
-		output_threshold = val;
-		return 0;
+		case SNDCTL_SEQ_THRESHOLD:
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val < 1)
+				val = 1;
+			if (val >= SEQ_MAX_QUEUE)
+				val = SEQ_MAX_QUEUE - 1;
+			output_threshold = val;
+			return 0;
 		
-	case SNDCTL_MIDI_PRETIME:
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val < 0)
-			val = 0;
-		val = (HZ * val) / 10;
-		pre_event_timeout = val;
-		return __put_user(val, (int *)arg);
-
-	default:
-		if (mode == OPEN_READ)
-			return -EIO;
-		if (!synth_devs[0])
-			return -ENXIO;
-		if (!(synth_open_mask & (1 << 0)))
-			return -ENXIO;
-		if (!synth_devs[0]->ioctl)
-			return -EINVAL;
-		return synth_devs[0]->ioctl(0, cmd, arg);
+		case SNDCTL_MIDI_PRETIME:
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val < 0)
+				val = 0;
+			val = (HZ * val) / 10;
+			pre_event_timeout = val;
+			break;
+
+		default:
+			if (mode == OPEN_READ)
+				return -EIO;
+			if (!synth_devs[0])
+				return -ENXIO;
+			if (!(synth_open_mask & (1 << 0)))
+				return -ENXIO;
+			if (!synth_devs[0]->ioctl)
+				return -EINVAL;
+			return synth_devs[0]->ioctl(0, cmd, arg);
 	}
-	return -EINVAL;
+	return put_user(val, (int *)arg);
 }
 
 int sequencer_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait)
@@ -1845,31 +1821,37 @@
 {
 	if (sequencer_ok)
 		return;
-
 #ifdef CONFIG_MIDI
 	MIDIbuf_init();
 #endif
-
-
-	queue = (unsigned char *) (sound_mem_blocks[sound_nblocks] = vmalloc(SEQ_MAX_QUEUE * EV_SZ));
-	sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * EV_SZ;
-	if (sound_nblocks < 1024)
-		sound_nblocks++;;
+	queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ);
 	if (queue == NULL)
 	{
 		  printk(KERN_ERR "sequencer: Can't allocate memory for sequencer output queue\n");
 		  return;
 	}
-	iqueue = (unsigned char *) (sound_mem_blocks[sound_nblocks] = vmalloc(SEQ_MAX_QUEUE * IEV_SZ));
-	sound_mem_sizes[sound_nblocks] = SEQ_MAX_QUEUE * IEV_SZ;
-	if (sound_nblocks < 1024)
-		sound_nblocks++;
+	iqueue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * IEV_SZ);
 	if (iqueue == NULL)
 	{
 		printk(KERN_ERR "sequencer: Can't allocate memory for sequencer input queue\n");
+		vfree(queue);
 		return;
 	}
 	sequencer_ok = 1;
+}
+
+void sequencer_unload(void)
+{
+	if(queue)
+	{
+		vfree(queue);
+		queue=NULL;
+	}
+	if(iqueue)
+	{
+		vfree(iqueue);
+		iqueue=NULL;
+	}
 }
 
 #endif
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/sound_calls.h linux/drivers/sound/sound_calls.h
--- v2.1.85/linux/drivers/sound/sound_calls.h	Tue Dec 30 11:02:39 1997
+++ linux/drivers/sound/sound_calls.h	Mon Feb  9 11:21:11 1998
@@ -56,6 +56,7 @@
 int sequencer_select(int dev, struct fileinfo *file, int sel_type, poll_table * wait);
 
 void sequencer_init (void);
+void sequencer_unload (void);
 void sequencer_timer(unsigned long dummy);
 int note_to_freq(int note_num);
 unsigned long compute_finetune(unsigned long base_freq, int bend, int range,
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/sound_timer.c linux/drivers/sound/sound_timer.c
--- v2.1.85/linux/drivers/sound/sound_timer.c	Sun Jan  4 10:46:19 1998
+++ linux/drivers/sound/sound_timer.c	Mon Feb  9 11:24:22 1998
@@ -29,20 +29,17 @@
 
 static struct sound_lowlev_timer *tmr = NULL;
 
-static unsigned long
-tmr2ticks(int tmr_value)
+static unsigned long tmr2ticks(int tmr_value)
 {
 	/*
 	 *    Convert timer ticks to MIDI ticks
 	 */
 
-	unsigned long   tmp;
-	unsigned long   scale;
+	unsigned long tmp;
+	unsigned long scale;
 
 	tmp = tmr_value * usecs_per_tmr;	/* Convert to usecs */
-
 	scale = (60 * 1000000) / (curr_tempo * curr_timebase);	/* usecs per MIDI tick */
-
 	return (tmp + (scale / 2)) / scale;
 }
 
@@ -53,7 +50,7 @@
 	usecs_per_tick = (60 * 1000000) / (curr_tempo * curr_timebase);
 
 	/*
-	   * Don't kill the system by setting too high timer rate
+	 * Don't kill the system by setting too high timer rate
 	 */
 	if (usecs_per_tick < 2000)
 		usecs_per_tick = 2000;
@@ -61,22 +58,19 @@
 	usecs_per_tmr = tmr->tmr_start(tmr->dev, usecs_per_tick);
 }
 
-void
-sound_timer_syncinterval(unsigned int new_usecs)
+void sound_timer_syncinterval(unsigned int new_usecs)
 {
-/*
- *    This routine is called by the hardware level if
- *      the clock frequency has changed for some reason.
- */
+	/*
+	 *    This routine is called by the hardware level if
+	 *      the clock frequency has changed for some reason.
+	 */
 	tmr_offs = tmr_ctr;
 	ticks_offs += tmr2ticks(tmr_ctr);
 	tmr_ctr = 0;
-
 	usecs_per_tmr = new_usecs;
 }
 
-static void
-tmr_reset(void)
+static void tmr_reset(void)
 {
 	unsigned long   flags;
 
@@ -91,99 +85,89 @@
 	restore_flags(flags);
 }
 
-static int
-timer_open(int dev, int mode)
+static int timer_open(int dev, int mode)
 {
 	if (opened)
 		return -EBUSY;
-
 	tmr_reset();
 	curr_tempo = 60;
 	curr_timebase = 100;
 	opened = 1;
 	reprogram_timer();
-
 	return 0;
 }
 
-static void
-timer_close(int dev)
+static void timer_close(int dev)
 {
 	opened = tmr_running = 0;
 	tmr->tmr_disable(tmr->dev);
 }
 
-static int
-timer_event(int dev, unsigned char *event)
+static int timer_event(int dev, unsigned char *event)
 {
-	unsigned char   cmd = event[1];
-	unsigned long   parm = *(int *) &event[4];
+	unsigned char cmd = event[1];
+	unsigned long parm = *(int *) &event[4];
 
 	switch (cmd)
-	  {
-	  case TMR_WAIT_REL:
-		  parm += prev_event_time;
-	  case TMR_WAIT_ABS:
-		  if (parm > 0)
-		    {
-			    long            time;
-
-			    if (parm <= curr_ticks)	/* It's the time */
-				    return TIMER_NOT_ARMED;
-
-			    time = parm;
-			    next_event_time = prev_event_time = time;
-
-			    return TIMER_ARMED;
-		    }
-		  break;
-
-	  case TMR_START:
-		  tmr_reset();
-		  tmr_running = 1;
-		  reprogram_timer();
-		  break;
-
-	  case TMR_STOP:
-		  tmr_running = 0;
-		  break;
-
-	  case TMR_CONTINUE:
-		  tmr_running = 1;
-		  reprogram_timer();
-		  break;
-
-	  case TMR_TEMPO:
-		  if (parm)
-		    {
-			    if (parm < 8)
-				    parm = 8;
-			    if (parm > 250)
-				    parm = 250;
-			    tmr_offs = tmr_ctr;
-			    ticks_offs += tmr2ticks(tmr_ctr);
-			    tmr_ctr = 0;
-			    curr_tempo = parm;
-			    reprogram_timer();
-		    }
-		  break;
-
-	  case TMR_ECHO:
-		  seq_copy_to_input(event, 8);
-		  break;
+	{
+		case TMR_WAIT_REL:
+			parm += prev_event_time;
+		case TMR_WAIT_ABS:
+			if (parm > 0)
+			{
+				long time;
+
+				if (parm <= curr_ticks)	/* It's the time */
+					return TIMER_NOT_ARMED;
+				time = parm;
+				next_event_time = prev_event_time = time;
+				return TIMER_ARMED;
+			}
+			break;
+
+		case TMR_START:
+			tmr_reset();
+			tmr_running = 1;
+			reprogram_timer();
+			break;
+
+		case TMR_STOP:
+			tmr_running = 0;
+			break;
+
+		case TMR_CONTINUE:
+			tmr_running = 1;
+			reprogram_timer();
+			break;
 
-	  default:;
-	  }
+		case TMR_TEMPO:
+			if (parm)
+			{
+				if (parm < 8)
+					parm = 8;
+				if (parm > 250)
+					parm = 250;
+				tmr_offs = tmr_ctr;
+				ticks_offs += tmr2ticks(tmr_ctr);
+				tmr_ctr = 0;
+				curr_tempo = parm;
+				reprogram_timer();
+			}
+			break;
+
+		case TMR_ECHO:
+			seq_copy_to_input(event, 8);
+			break;
 
+		default:
+	}
 	return TIMER_NOT_ARMED;
 }
 
-static unsigned long
-timer_get_time(int dev)
+static unsigned long timer_get_time(int dev)
 {
 	if (!opened)
 		return 0;
-
 	return curr_ticks;
 }
 
@@ -191,73 +175,80 @@
 {
 	int val;
 
-	switch (cmd) {
-	case SNDCTL_TMR_SOURCE:
-		return __put_user(TMR_INTERNAL, (int *)arg);
-
-	case SNDCTL_TMR_START:
-		tmr_reset();
-		tmr_running = 1;
-		return 0;
+	switch (cmd) 
+	{
+		case SNDCTL_TMR_SOURCE:
+			val = TMR_INTERNAL;
+			break;
+
+		case SNDCTL_TMR_START:
+			tmr_reset();
+			tmr_running = 1;
+			return 0;
 		
-	case SNDCTL_TMR_STOP:
-		tmr_running = 0;
-		return 0;
-
-	case SNDCTL_TMR_CONTINUE:
-		tmr_running = 1;
-		return 0;
-
-	case SNDCTL_TMR_TIMEBASE:
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val) {
-			if (val < 1)
-				val = 1;
-			if (val > 1000)
-				val = 1000;
-			curr_timebase = val;
-		}
-		return __put_user(curr_timebase, (int *)arg);
-
-	case SNDCTL_TMR_TEMPO:
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val) {
-			if (val < 8)
-				val = 8;
-			if (val > 250)
-				val = 250;
-			tmr_offs = tmr_ctr;
-			ticks_offs += tmr2ticks(tmr_ctr);
-			tmr_ctr = 0;
-			curr_tempo = val;
-			reprogram_timer();
-		}
-		return __put_user(curr_tempo, (int *)arg);
-
-	case SNDCTL_SEQ_CTRLRATE:
-		if (__get_user(val, (int *)arg))
-			return -EFAULT;
-		if (val != 0)	/* Can't change */
-			return -EINVAL;
-		val = ((curr_tempo * curr_timebase) + 30) / 60;
-		return __put_user(val, (int *)arg);
+		case SNDCTL_TMR_STOP:
+			tmr_running = 0;
+			return 0;
+
+		case SNDCTL_TMR_CONTINUE:
+			tmr_running = 1;
+			return 0;
+
+		case SNDCTL_TMR_TIMEBASE:
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val) 
+			{
+				if (val < 1)
+					val = 1;
+				if (val > 1000)
+					val = 1000;
+				curr_timebase = val;
+			}
+			val = curr_timebase;
+			break;
+
+		case SNDCTL_TMR_TEMPO:
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val) 
+			{
+				if (val < 8)
+					val = 8;
+				if (val > 250)
+					val = 250;
+				tmr_offs = tmr_ctr;
+				ticks_offs += tmr2ticks(tmr_ctr);
+				tmr_ctr = 0;
+				curr_tempo = val;
+				reprogram_timer();
+			}
+			val = curr_tempo;
+			break;
+
+		case SNDCTL_SEQ_CTRLRATE:
+			if (get_user(val, (int *)arg))
+				return -EFAULT;
+			if (val != 0)	/* Can't change */
+				return -EINVAL;
+			val = ((curr_tempo * curr_timebase) + 30) / 60;
+			break;
 		
-	case SNDCTL_SEQ_GETTIME:
-		return __put_user(curr_ticks, (int *)arg);
+		case SNDCTL_SEQ_GETTIME:
+			val = curr_ticks;
+			break;
 		
-	case SNDCTL_TMR_METRONOME:
-		/* NOP */
-		break;
+		case SNDCTL_TMR_METRONOME:
+			/* NOP */
+			break;
 		
-	default:;
+		default:
+			return -EINVAL;
 	}
-	return -EINVAL;
+	return put_user(val, (int *)arg);
 }
 
-static void
-timer_arm(int dev, long time)
+static void timer_arm(int dev, long time)
 {
 	if (time < 0)
 		time = curr_ticks + 1;
@@ -265,7 +256,6 @@
 		return;
 
 	next_event_time = prev_event_time = time;
-
 	return;
 }
 
@@ -282,8 +272,7 @@
 	timer_arm
 };
 
-void
-sound_timer_interrupt(void)
+void sound_timer_interrupt(void)
 {
 	if (!opened)
 		return;
@@ -297,26 +286,24 @@
 	curr_ticks = ticks_offs + tmr2ticks(tmr_ctr);
 
 	if (curr_ticks >= next_event_time)
-	  {
-		  next_event_time = (unsigned long) -1;
-		  sequencer_timer(0);
-	  }
+	{
+		next_event_time = (unsigned long) -1;
+		sequencer_timer(0);
+	}
 }
 
-void 
-sound_timer_init(struct sound_lowlev_timer *t, char *name)
+void  sound_timer_init(struct sound_lowlev_timer *t, char *name)
 {
-	int             n;
+	int n;
 
 	if (initialized)
-	  {
-		  if (t->priority <= tmr->priority)
-			  return;	/* There is already a similar or better timer */
-		  tmr = t;
-		  return;
-	  }
+	{
+		if (t->priority <= tmr->priority)
+			return;	/* There is already a similar or better timer */
+		tmr = t;
+		return;
+	}
 	initialized = 1;
-
 	tmr = t;
 
 	n = sound_alloc_timerdev();
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/soundcard.c linux/drivers/sound/soundcard.c
--- v2.1.85/linux/drivers/sound/soundcard.c	Fri Jan 23 18:10:32 1998
+++ linux/drivers/sound/soundcard.c	Mon Feb  9 11:21:11 1998
@@ -899,8 +899,8 @@
 	}
 #endif
 	sound_unload_drivers();
-
 	free_all_irqs();	/* If something was left allocated by accident */
+	sequencer_unload();
 
 	for (i = 0; i < 8; i++)
 	{
@@ -1057,11 +1057,10 @@
 
 static int dma_buffsize = DSP_BUFFSIZE;
 
-int
-sound_alloc_dmap(int dev, struct dma_buffparms *dmap, int chan)
+int sound_alloc_dmap(int dev, struct dma_buffparms *dmap, int chan)
 {
-	char           *start_addr, *end_addr;
-	int             i, dma_pagesize;
+	char *start_addr, *end_addr;
+	int i, dma_pagesize;
 
 	dmap->mapping_flags &= ~DMA_MAP_MAPPED;
 
@@ -1141,8 +1140,8 @@
 
 void sound_free_dmap(int dev, struct dma_buffparms *dmap, int chan)
 {
-	int             sz, size, i;
-	unsigned long   start_addr, end_addr;
+	int sz, size, i;
+	unsigned long start_addr, end_addr;
 
 	if (dmap->raw_buf == NULL)
 		return;
@@ -1150,9 +1149,7 @@
 	if (dmap->mapping_flags & DMA_MAP_MAPPED)
 		return;		/* Don't free mmapped buffer. Will use it next time */
 
-	for (sz = 0, size = PAGE_SIZE;
-	     size < dmap->buffsize;
-	     sz++, size <<= 1);
+	for (sz = 0, size = PAGE_SIZE; size < dmap->buffsize; sz++, size <<= 1);
 
 	start_addr = (unsigned long) dmap->raw_buf;
 	end_addr = start_addr + dmap->buffsize;
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/sscape.c linux/drivers/sound/sscape.c
--- v2.1.85/linux/drivers/sound/sscape.c	Tue Dec 30 10:59:17 1997
+++ linux/drivers/sound/sscape.c	Mon Feb  9 11:14:15 1998
@@ -3,6 +3,7 @@
  *
  * Low level driver for Ensoniq SoundScape
  */
+
 /*
  * Copyright (C) by Hannu Savolainen 1993-1997
  *
@@ -10,9 +11,11 @@
  * Version 2 (June 1991). See the "COPYING" file distributed with this software
  * for more info.
  */
+
 /*
  * Thomas Sailer   : ioctl code reworked (vmalloc/vfree removed)
  */
+
 #include <linux/config.h>
 #include <linux/module.h>
 
@@ -26,66 +29,69 @@
 /*
  *    I/O ports
  */
-#define MIDI_DATA        0
-#define MIDI_CTRL        1
-#define HOST_CTRL        2
-#define TX_READY		0x02
-#define RX_READY		0x01
-#define HOST_DATA        3
-#define ODIE_ADDR        4
-#define ODIE_DATA        5
+#define MIDI_DATA       0
+#define MIDI_CTRL       1
+#define HOST_CTRL       2
+#define TX_READY	0x02
+#define RX_READY	0x01
+#define HOST_DATA       3
+#define ODIE_ADDR       4
+#define ODIE_DATA       5
 
 /*
  *    Indirect registers
  */
-#define GA_INTSTAT_REG   0
-#define GA_INTENA_REG    1
-#define GA_DMAA_REG      2
-#define GA_DMAB_REG      3
-#define GA_INTCFG_REG    4
-#define GA_DMACFG_REG    5
-#define GA_CDCFG_REG     6
-#define GA_SMCFGA_REG    7
-#define GA_SMCFGB_REG    8
-#define GA_HMCTL_REG     9
+
+#define GA_INTSTAT_REG	0
+#define GA_INTENA_REG	1
+#define GA_DMAA_REG	2
+#define GA_DMAB_REG	3
+#define GA_INTCFG_REG	4
+#define GA_DMACFG_REG	5
+#define GA_CDCFG_REG	6
+#define GA_SMCFGA_REG	7
+#define GA_SMCFGB_REG	8
+#define GA_HMCTL_REG	9
 
 /*
  * DMA channel identifiers (A and B)
  */
-#define SSCAPE_DMA_A 		0
-#define SSCAPE_DMA_B		1
+
+#define SSCAPE_DMA_A	0
+#define SSCAPE_DMA_B	1
 
 #define PORT(name)	(devc->base+name)
 
 /*
  * Host commands recognized by the OBP microcode
  */
-#define CMD_GEN_HOST_ACK        0x80
-#define CMD_GEN_MPU_ACK         0x81
-#define CMD_GET_BOARD_TYPE      0x82
-#define CMD_SET_CONTROL         0x88	/* Old firmware only */
-#define CMD_GET_CONTROL         0x89	/* Old firmware only */
-#define 	CTL_MASTER_VOL          0
-#define 	CTL_MIC_MODE            2
-#define 	CTL_SYNTH_VOL           4
-#define 	CTL_WAVE_VOL            7
+ 
+#define CMD_GEN_HOST_ACK	0x80
+#define CMD_GEN_MPU_ACK		0x81
+#define CMD_GET_BOARD_TYPE	0x82
+#define CMD_SET_CONTROL		0x88	/* Old firmware only */
+#define CMD_GET_CONTROL		0x89	/* Old firmware only */
+#define 	CTL_MASTER_VOL		0
+#define 	CTL_MIC_MODE		2
+#define 	CTL_SYNTH_VOL		4
+#define 	CTL_WAVE_VOL		7
 #define CMD_SET_EXTMIDI		0x8a
 #define CMD_GET_EXTMIDI		0x8b
-#define CMD_SET_MT32            0x8c
-#define CMD_GET_MT32            0x8d
+#define CMD_SET_MT32		0x8c
+#define CMD_GET_MT32		0x8d
 
 #define CMD_ACK			0x80
 
 typedef struct sscape_info
 {
-	  int   base, irq, dma;
-	  int   ok;	/* Properly detected */
-	  int   failed;
-	  int   dma_allocated;
-	  int   codec_audiodev;
-	  int   opened;
-	  int   *osp;
-	  int	my_audiodev;
+	int	base, irq, dma;
+	int	ok;	/* Properly detected */
+	int	failed;
+	int	dma_allocated;
+	int	codec_audiodev;
+	int	opened;
+	int	*osp;
+	int	my_audiodev;
 } sscape_info;
 
 static struct sscape_info adev_info = {
@@ -93,7 +99,7 @@
 };
 
 static struct sscape_info *devc = &adev_info;
-static int      sscape_mididev = -1;
+static int sscape_mididev = -1;
 
 static struct wait_queue *sscape_sleeper = NULL;
 static volatile struct snd_wait sscape_sleep_flag = {
@@ -101,104 +107,100 @@
 };
 
 /* Some older cards have assigned interrupt bits differently than new ones */
-static char     valid_interrupts_old[] =
-{9, 7, 5, 15};
+static char valid_interrupts_old[] = {
+	9, 7, 5, 15
+};
 
-static char     valid_interrupts_new[] =
-{9, 5, 7, 10};
+static char valid_interrupts_new[] = {
+	9, 5, 7, 10
+};
 
-static char    *valid_interrupts = valid_interrupts_new;
+static char *valid_interrupts = valid_interrupts_new;
 
+/*
+ *	See the bottom of the driver. This can be set by spea =0/1.
+ */
+ 
 #ifdef REVEAL_SPEA
-static char     old_hardware = 1;
-
+static char old_hardware = 1;
 #else
-static char     old_hardware = 0;
-
+static char old_hardware = 0;
 #endif
 
 static unsigned char sscape_read(struct sscape_info *devc, int reg)
 {
-	unsigned long   flags;
-	unsigned char   val;
+	unsigned long flags;
+	unsigned char val;
 
 	save_flags(flags);
 	cli();
-	outb((reg), PORT(ODIE_ADDR));
+	outb(reg, PORT(ODIE_ADDR));
 	val = inb(PORT(ODIE_DATA));
 	restore_flags(flags);
 	return val;
 }
 
-static void
-sscape_write(struct sscape_info *devc, int reg, int data)
+static void sscape_write(struct sscape_info *devc, int reg, int data)
 {
-	unsigned long   flags;
+	unsigned long flags;
 
 	save_flags(flags);
 	cli();
-	outb((reg), PORT(ODIE_ADDR));
-	outb((data), PORT(ODIE_DATA));
+	outb(reg, PORT(ODIE_ADDR));
+	outb(data, PORT(ODIE_DATA));
 	restore_flags(flags);
 }
 
-static void
-host_open(struct sscape_info *devc)
+static void host_open(struct sscape_info *devc)
 {
 	outb((0x00), PORT(HOST_CTRL));	/* Put the board to the host mode */
 }
 
-static void
-host_close(struct sscape_info *devc)
+static void host_close(struct sscape_info *devc)
 {
 	outb((0x03), PORT(HOST_CTRL));	/* Put the board to the MIDI mode */
 }
 
-static int
-host_write(struct sscape_info *devc, unsigned char *data, int count)
+static int host_write(struct sscape_info *devc, unsigned char *data, int count)
 {
-	unsigned long   flags;
-	int             i, timeout_val;
+	unsigned long flags;
+	int i, timeout_val;
 
 	save_flags(flags);
 	cli();
 
 	/*
-	   * Send the command and data bytes
+	 * Send the command and data bytes
 	 */
 
 	for (i = 0; i < count; i++)
-	  {
-		  for (timeout_val = 10000; timeout_val > 0; timeout_val--)
-			  if (inb(PORT(HOST_CTRL)) & TX_READY)
-				  break;
+	{
+		for (timeout_val = 10000; timeout_val > 0; timeout_val--)
+			if (inb(PORT(HOST_CTRL)) & TX_READY)
+				break;
 
-		  if (timeout_val <= 0)
-		    {
+		if (timeout_val <= 0)
+		{
 			    restore_flags(flags);
 			    return 0;
-		    }
-		  outb((data[i]), PORT(HOST_DATA));
-	  }
-
-
+		}
+		outb(data[i], PORT(HOST_DATA));
+	}
 	restore_flags(flags);
-
 	return 1;
 }
 
-static int
-host_read(struct sscape_info *devc)
+static int host_read(struct sscape_info *devc)
 {
-	unsigned long   flags;
-	int             timeout_val;
-	unsigned char   data;
+	unsigned long flags;
+	int timeout_val;
+	unsigned char data;
 
 	save_flags(flags);
 	cli();
 
 	/*
-	   * Read a byte
+	 * Read a byte
 	 */
 
 	for (timeout_val = 10000; timeout_val > 0; timeout_val--)
@@ -206,22 +208,19 @@
 			break;
 
 	if (timeout_val <= 0)
-	  {
-		  restore_flags(flags);
-		  return -1;
-	  }
+	{
+		restore_flags(flags);
+		return -1;
+	}
 	data = inb(PORT(HOST_DATA));
-
 	restore_flags(flags);
-
 	return data;
 }
 
 
-static int
-host_command2(struct sscape_info *devc, int cmd, int parm1)
+static int host_command2(struct sscape_info *devc, int cmd, int parm1)
 {
-	unsigned char   buf[10];
+	unsigned char buf[10];
 
 	buf[0] = (unsigned char) (cmd & 0xff);
 	buf[1] = (unsigned char) (parm1 & 0xff);
@@ -229,61 +228,49 @@
 	return host_write(devc, buf, 2);
 }
 
-static int
-host_command3(struct sscape_info *devc, int cmd, int parm1, int parm2)
+static int host_command3(struct sscape_info *devc, int cmd, int parm1, int parm2)
 {
-	unsigned char   buf[10];
+	unsigned char buf[10];
 
 	buf[0] = (unsigned char) (cmd & 0xff);
 	buf[1] = (unsigned char) (parm1 & 0xff);
 	buf[2] = (unsigned char) (parm2 & 0xff);
-
 	return host_write(devc, buf, 3);
 }
 
-static void
-set_mt32(struct sscape_info *devc, int value)
+static void set_mt32(struct sscape_info *devc, int value)
 {
 	host_open(devc);
-	host_command2(devc, CMD_SET_MT32,
-		      value ? 1 : 0);
+	host_command2(devc, CMD_SET_MT32, value ? 1 : 0);
 	if (host_read(devc) != CMD_ACK)
-	  {
-		  /* printk( "SNDSCAPE: Setting MT32 mode failed\n"); */
-	  }
+	{
+		/* printk( "SNDSCAPE: Setting MT32 mode failed\n"); */
+	}
 	host_close(devc);
 }
 
-static void
-set_control(struct sscape_info *devc, int ctrl, int value)
+static void set_control(struct sscape_info *devc, int ctrl, int value)
 {
 	host_open(devc);
 	host_command3(devc, CMD_SET_CONTROL, ctrl, value);
 	if (host_read(devc) != CMD_ACK)
-	  {
-		  /* printk( "SNDSCAPE: Setting control (%d) failed\n",  ctrl); */
-	  }
+	{
+		/* printk( "SNDSCAPE: Setting control (%d) failed\n",  ctrl); */
+	}
 	host_close(devc);
 }
 
-
-
-
-
-static void
-do_dma(struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode)
+static void do_dma(struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode)
 {
-	unsigned char   temp;
+	unsigned char temp;
 
 	if (dma_chan != SSCAPE_DMA_A)
-	  {
-		  printk("SSCAPE: Tried to use DMA channel  != A. Why?\n");
-		  return;
-	  }
+	{
+		printk(KERN_WARNING "soundscape: Tried to use DMA channel  != A. Why?\n");
+		return;
+	}
 	audio_devs[devc->codec_audiodev]->flags &= ~DMA_AUTOMODE;
-	DMAbuf_start_dma(devc->codec_audiodev,
-			 buf,
-			 blk_size, mode);
+	DMAbuf_start_dma(devc->codec_audiodev, buf, blk_size, mode);
 	audio_devs[devc->codec_audiodev]->flags |= DMA_AUTOMODE;
 
 	temp = devc->dma << 4;	/* Setup DMA channel select bits */
@@ -296,49 +283,45 @@
 	sscape_write(devc, GA_DMAA_REG, temp);
 }
 
-static int
-verify_mpu(struct sscape_info *devc)
+static int verify_mpu(struct sscape_info *devc)
 {
 	/*
-	   * The SoundScape board could be in three modes (MPU, 8250 and host).
-	   * If the card is not in the MPU mode, enabling the MPU driver will
-	   * cause infinite loop (the driver believes that there is always some
-	   * received data in the buffer.
-	   *
-	   * Detect this by looking if there are more than 10 received MIDI bytes
-	   * (0x00) in the buffer.
+	 * The SoundScape board could be in three modes (MPU, 8250 and host).
+	 * If the card is not in the MPU mode, enabling the MPU driver will
+	 * cause infinite loop (the driver believes that there is always some
+	 * received data in the buffer.
+	 *
+	 * Detect this by looking if there are more than 10 received MIDI bytes
+	 * (0x00) in the buffer.
 	 */
 
-	int             i;
+	int i;
 
 	for (i = 0; i < 10; i++)
-	  {
-		  if (inb(devc->base + HOST_CTRL) & 0x80)
-			  return 1;
-
-		  if (inb(devc->base) != 0x00)
-			  return 1;
-	  }
+	{
+		if (inb(devc->base + HOST_CTRL) & 0x80)
+			return 1;
 
-	printk("SoundScape: The device is not in the MPU-401 mode\n");
+		if (inb(devc->base) != 0x00)
+			return 1;
+	}
+	printk(KERN_WARNING "SoundScape: The device is not in the MPU-401 mode\n");
 	return 0;
 }
 
-static int
-sscape_coproc_open(void *dev_info, int sub_device)
+static int sscape_coproc_open(void *dev_info, int sub_device)
 {
 	if (sub_device == COPR_MIDI)
-	  {
-		  set_mt32(devc, 0);
-		  if (!verify_mpu(devc))
-			  return -EIO;
-	  }
+	{
+		set_mt32(devc, 0);
+		if (!verify_mpu(devc))
+			return -EIO;
+	}
 	sscape_sleep_flag.opts = WK_NONE;
 	return 0;
 }
 
-static void
-sscape_coproc_close(void *dev_info, int sub_device)
+static void sscape_coproc_close(void *dev_info, int sub_device)
 {
 	struct sscape_info *devc = dev_info;
 	unsigned long   flags;
@@ -346,69 +329,67 @@
 	save_flags(flags);
 	cli();
 	if (devc->dma_allocated)
-	  {
-		  sscape_write(devc, GA_DMAA_REG, 0x20);	/* DMA channel disabled */
-		  devc->dma_allocated = 0;
-	  }
+	{
+		sscape_write(devc, GA_DMAA_REG, 0x20);	/* DMA channel disabled */
+		devc->dma_allocated = 0;
+	}
 	sscape_sleep_flag.opts = WK_NONE;
 	restore_flags(flags);
-
 	return;
 }
 
-static void
-sscape_coproc_reset(void *dev_info)
+static void sscape_coproc_reset(void *dev_info)
 {
 }
 
-static int
-sscape_download_boot(struct sscape_info *devc, unsigned char *block, int size, int flag)
+static int sscape_download_boot(struct sscape_info *devc, unsigned char *block, int size, int flag)
 {
-	unsigned long   flags;
-	unsigned char   temp;
-	volatile int    done, timeout_val;
+	unsigned long flags;
+	unsigned char temp;
+	volatile int done, timeout_val;
 	static unsigned char codec_dma_bits = 0;
 
 	if (flag & CPF_FIRST)
-	  {
-		  /*
-		     * First block. Have to allocate DMA and to reset the board
-		     * before continuing.
-		   */
-
-		  save_flags(flags);
-		  cli();
-		  codec_dma_bits = sscape_read(devc, GA_CDCFG_REG);
-
-		  if (devc->dma_allocated == 0)
-		    {
-			    devc->dma_allocated = 1;
-		    }
-		  restore_flags(flags);
+	{
+		/*
+		 * First block. Have to allocate DMA and to reset the board
+		 * before continuing.
+		 */
+
+		save_flags(flags);
+		cli();
+		codec_dma_bits = sscape_read(devc, GA_CDCFG_REG);
+
+		if (devc->dma_allocated == 0)
+			devc->dma_allocated = 1;
 
-		  sscape_write(devc, GA_HMCTL_REG,
+		restore_flags(flags);
+
+		sscape_write(devc, GA_HMCTL_REG, 
 			(temp = sscape_read(devc, GA_HMCTL_REG)) & 0x3f);	/*Reset */
 
-		  for (timeout_val = 10000; timeout_val > 0; timeout_val--)
-			  sscape_read(devc, GA_HMCTL_REG);	/* Delay */
+		for (timeout_val = 10000; timeout_val > 0; timeout_val--)
+			sscape_read(devc, GA_HMCTL_REG);	/* Delay */
 
-		  /* Take board out of reset */
-		  sscape_write(devc, GA_HMCTL_REG,
+		/* Take board out of reset */
+		sscape_write(devc, GA_HMCTL_REG,
 			(temp = sscape_read(devc, GA_HMCTL_REG)) | 0x80);
-	  }
+	}
 	/*
 	 * Transfer one code block using DMA
 	 */
 	if (audio_devs[devc->codec_audiodev]->dmap_out->raw_buf == NULL)
-	  {
-		  printk("SSCAPE: Error: DMA buffer not available\n");
-		  return 0;
-	  }
+	{
+		printk(KERN_WARNING "soundscape: DMA buffer not available\n");
+		return 0;
+	}
 	memcpy(audio_devs[devc->codec_audiodev]->dmap_out->raw_buf, block, size);
 
 	save_flags(flags);
 	cli();
-/******** INTERRUPTS DISABLED NOW ********/
+	
+	/******** INTERRUPTS DISABLED NOW ********/
+	
 	do_dma(devc, SSCAPE_DMA_A,
 	       audio_devs[devc->codec_audiodev]->dmap_out->raw_buf_phys,
 	       size, DMA_MODE_WRITE);
@@ -416,160 +397,140 @@
 	/*
 	 * Wait until transfer completes.
 	 */
+	
 	sscape_sleep_flag.opts = WK_NONE;
 	done = 0;
 	timeout_val = 30;
 	while (!done && timeout_val-- > 0)
-	  {
-		  int             resid;
-
-		  {
-			  unsigned long   tlimit;
-
-			  if (HZ / 50)
-				  current->timeout = tlimit = jiffies + (HZ / 50);
-			  else
-				  tlimit = (unsigned long) -1;
-			  sscape_sleep_flag.opts = WK_SLEEP;
-			  interruptible_sleep_on(&sscape_sleeper);
-			  if (!(sscape_sleep_flag.opts & WK_WAKEUP))
-			    {
-				    if (jiffies >= tlimit)
-					    sscape_sleep_flag.opts |= WK_TIMEOUT;
-			    }
-			  sscape_sleep_flag.opts &= ~WK_SLEEP;
-		  };
-		  clear_dma_ff(devc->dma);
-		  if ((resid = get_dma_residue(devc->dma)) == 0)
-		    {
-			    done = 1;
-		    }
-	  }
+	{
+		int resid;
+		unsigned long   tlimit;
+		current->timeout = tlimit = jiffies + (HZ / 50);
+		sscape_sleep_flag.opts = WK_SLEEP;
+		interruptible_sleep_on(&sscape_sleeper);
+		if (!(sscape_sleep_flag.opts & WK_WAKEUP))
+		{
+			if (jiffies >= tlimit)
+				sscape_sleep_flag.opts |= WK_TIMEOUT;
+		}
+		sscape_sleep_flag.opts &= ~WK_SLEEP;
+		clear_dma_ff(devc->dma);
+		if ((resid = get_dma_residue(devc->dma)) == 0)
+		{
+			done = 1;
+		}
+	}
 
 	restore_flags(flags);
 	if (!done)
 		return 0;
 
 	if (flag & CPF_LAST)
-	  {
-		  /*
-		     * Take the board out of reset
-		   */
-		  outb((0x00), PORT(HOST_CTRL));
-		  outb((0x00), PORT(MIDI_CTRL));
-
-		  temp = sscape_read(devc, GA_HMCTL_REG);
-		  temp |= 0x40;
-		  sscape_write(devc, GA_HMCTL_REG, temp);	/* Kickstart the board */
-
-		  /*
-		     * Wait until the ODB wakes up
-		   */
-
-		  save_flags(flags);
-		  cli();
-		  done = 0;
-		  timeout_val = 5 * HZ;
-		  while (!done && timeout_val-- > 0)
-		    {
-			    unsigned char   x;
-
-
-			    {
-				    unsigned long   tlimit;
-
-				    if (1)
-					    current->timeout = tlimit = jiffies + (1);
-				    else
-					    tlimit = (unsigned long) -1;
-				    sscape_sleep_flag.opts = WK_SLEEP;
-				    interruptible_sleep_on(&sscape_sleeper);
-				    if (!(sscape_sleep_flag.opts & WK_WAKEUP))
-				      {
-					      if (jiffies >= tlimit)
-						      sscape_sleep_flag.opts |= WK_TIMEOUT;
-				      }
-				    sscape_sleep_flag.opts &= ~WK_SLEEP;
-			    };
-			    x = inb(PORT(HOST_DATA));
-			    if (x == 0xff || x == 0xfe)		/* OBP startup acknowledge */
-			      {
-				      DDB(printk("Soundscape: Acknowledge = %x\n", x));
-				      done = 1;
-			      }
-		    }
-		  sscape_write(devc, GA_CDCFG_REG, codec_dma_bits);
-
-		  restore_flags(flags);
-		  if (!done)
-		    {
-			    printk("SoundScape: The OBP didn't respond after code download\n");
-			    return 0;
-		    }
-		  save_flags(flags);
-		  cli();
-		  done = 0;
-		  timeout_val = 5 * HZ;
-		  while (!done && timeout_val-- > 0)
-		    {
-
-			    {
-				    unsigned long   tlimit;
-
-				    if (1)
-					    current->timeout = tlimit = jiffies + (1);
-				    else
-					    tlimit = (unsigned long) -1;
-				    sscape_sleep_flag.opts = WK_SLEEP;
-				    interruptible_sleep_on(&sscape_sleeper);
-				    if (!(sscape_sleep_flag.opts & WK_WAKEUP))
-				      {
-					      if (jiffies >= tlimit)
-						      sscape_sleep_flag.opts |= WK_TIMEOUT;
-				      }
-				    sscape_sleep_flag.opts &= ~WK_SLEEP;
-			    };
-			    if (inb(PORT(HOST_DATA)) == 0xfe)	/* Host startup acknowledge */
-				    done = 1;
-		    }
-		  restore_flags(flags);
-		  if (!done)
-		    {
-			    printk("SoundScape: OBP Initialization failed.\n");
-			    return 0;
-		    }
-		  printk("SoundScape board initialized OK\n");
-		  set_control(devc, CTL_MASTER_VOL, 100);
-		  set_control(devc, CTL_SYNTH_VOL, 100);
+	{
+		/*
+		 * Take the board out of reset
+		 */
+		outb((0x00), PORT(HOST_CTRL));
+		outb((0x00), PORT(MIDI_CTRL));
+
+		temp = sscape_read(devc, GA_HMCTL_REG);
+		temp |= 0x40;
+		sscape_write(devc, GA_HMCTL_REG, temp);	/* Kickstart the board */
+
+		/*
+		 * Wait until the ODB wakes up
+		 */
+
+		save_flags(flags);
+		cli();
+		done = 0;
+		timeout_val = 5 * HZ;
+		while (!done && timeout_val-- > 0)
+		{
+			unsigned char x;
+			unsigned long tlimit;
+
+			current->timeout = tlimit = jiffies + 1;
+			sscape_sleep_flag.opts = WK_SLEEP;
+			interruptible_sleep_on(&sscape_sleeper);
+			if (!(sscape_sleep_flag.opts & WK_WAKEUP))
+			{
+				if (jiffies >= tlimit)
+					sscape_sleep_flag.opts |= WK_TIMEOUT;
+			}
+			sscape_sleep_flag.opts &= ~WK_SLEEP;
+			
+			x = inb(PORT(HOST_DATA));
+			if (x == 0xff || x == 0xfe)		/* OBP startup acknowledge */
+			{
+				DDB(printk("Soundscape: Acknowledge = %x\n", x));
+				done = 1;
+			}
+		}
+		sscape_write(devc, GA_CDCFG_REG, codec_dma_bits);
+
+		restore_flags(flags);
+		if (!done)
+		{
+			printk(KERN_ERR "soundscape: The OBP didn't respond after code download\n");
+			return 0;
+		}
+		save_flags(flags);
+		cli();
+		done = 0;
+		timeout_val = 5 * HZ;
+		while (!done && timeout_val-- > 0)
+		{
+			unsigned long   tlimit;
+			current->timeout = tlimit = jiffies + (1);
+			sscape_sleep_flag.opts = WK_SLEEP;
+			interruptible_sleep_on(&sscape_sleeper);
+			if (!(sscape_sleep_flag.opts & WK_WAKEUP))
+			{
+				if (jiffies >= tlimit)
+					sscape_sleep_flag.opts |= WK_TIMEOUT;
+			}
+			sscape_sleep_flag.opts &= ~WK_SLEEP;
+			if (inb(PORT(HOST_DATA)) == 0xfe)	/* Host startup acknowledge */
+				done = 1;
+		}
+		restore_flags(flags);
+		if (!done)
+		{
+			printk(KERN_ERR "soundscape: OBP Initialization failed.\n");
+			return 0;
+		}
+		printk(KERN_INFO "SoundScape board initialized OK\n");
+		set_control(devc, CTL_MASTER_VOL, 100);
+		set_control(devc, CTL_SYNTH_VOL, 100);
 
 #ifdef SSCAPE_DEBUG3
-		  /*
-		     * Temporary debugging aid. Print contents of the registers after
-		     * downloading the code.
-		   */
-		  {
-			  int             i;
-
-			  for (i = 0; i < 13; i++)
-				  printk("I%d = %02x (new value)\n", i, sscape_read(devc, i));
-		  }
+		/*
+		 * Temporary debugging aid. Print contents of the registers after
+		 * downloading the code.
+		 */
+		{
+			int i;
+
+			for (i = 0; i < 13; i++)
+				printk("I%d = %02x (new value)\n", i, sscape_read(devc, i));
+		}
 #endif
 
-	  }
+	}
 	return 1;
 }
 
-static int
-download_boot_block(void *dev_info, copr_buffer * buf)
+static int download_boot_block(void *dev_info, copr_buffer * buf)
 {
 	if (buf->len <= 0 || buf->len > sizeof(buf->data))
 		return -EINVAL;
 
 	if (!sscape_download_boot(devc, buf->data, buf->len, buf->flags))
-	  {
-		  printk("SSCAPE: Unable to load microcode block to the OBP.\n");
-		  return -EIO;
-	  }
+	{
+		printk(KERN_ERR "soundscape: Unable to load microcode block to the OBP.\n");
+		return -EIO;
+	}
 	return 0;
 }
 
@@ -578,25 +539,27 @@
 	copr_buffer *buf;
 	int err;
 
-	switch (cmd) {
-	case SNDCTL_COPR_RESET:
-		sscape_coproc_reset(dev_info);
-		return 0;
-
-	case SNDCTL_COPR_LOAD:
-		buf = (copr_buffer *) vmalloc(sizeof(copr_buffer));
-		if (buf == NULL)
-			return -ENOSPC;
-		if (__copy_from_user(buf, arg, sizeof(copr_buffer))) {
+	switch (cmd) 
+	{
+		case SNDCTL_COPR_RESET:
+			sscape_coproc_reset(dev_info);
+			return 0;
+
+		case SNDCTL_COPR_LOAD:
+			buf = (copr_buffer *) vmalloc(sizeof(copr_buffer));
+			if (buf == NULL)
+				return -ENOSPC;
+			if (copy_from_user(buf, arg, sizeof(copr_buffer))) 
+			{
+				vfree(buf);
+				return -EFAULT;
+			}
+			err = download_boot_block(dev_info, buf);
 			vfree(buf);
-			return -EFAULT;
-		}
-		err = download_boot_block(dev_info, buf);
-		vfree(buf);
-		return err;
+			return err;
 		
-	default:
-		return -EINVAL;
+		default:
+			return -EINVAL;
 	}
 }
 
@@ -610,25 +573,23 @@
 	&adev_info
 };
 
-static int      sscape_detected = 0;
+static int sscape_detected = 0;
 
-void
-attach_sscape(struct address_info *hw_config)
+void attach_sscape(struct address_info *hw_config)
 {
-
 #ifndef SSCAPE_REGS
 	/*
-	   * Config register values for Spea/V7 Media FX and Ensoniq S-2000.
-	   * These values are card
-	   * dependent. If you have another SoundScape based card, you have to
-	   * find the correct values. Do the following:
-	   *  - Compile this driver with SSCAPE_DEBUG1 defined.
-	   *  - Shut down and power off your machine.
-	   *  - Boot with DOS so that the SSINIT.EXE program is run.
-	   *  - Warm boot to {Linux|SYSV|BSD} and write down the lines displayed
-	   *    when detecting the SoundScape.
-	   *  - Modify the following list to use the values printed during boot.
-	   *    Undefine the SSCAPE_DEBUG1
+	 * Config register values for Spea/V7 Media FX and Ensoniq S-2000.
+	 * These values are card
+	 * dependent. If you have another SoundScape based card, you have to
+	 * find the correct values. Do the following:
+	 *  - Compile this driver with SSCAPE_DEBUG1 defined.
+	 *  - Shut down and power off your machine.
+	 *  - Boot with DOS so that the SSINIT.EXE program is run.
+	 *  - Warm boot to {Linux|SYSV|BSD} and write down the lines displayed
+	 *    when detecting the SoundScape.
+	 *  - Modify the following list to use the values printed during boot.
+	 *    Undefine the SSCAPE_DEBUG1
 	 */
 #define SSCAPE_REGS { \
 /* I0 */	0x00, \
@@ -647,76 +608,78 @@
 	unsigned long   flags;
 	static unsigned char regs[10] = SSCAPE_REGS;
 
-	int             i, irq_bits = 0xff;
+	int i, irq_bits = 0xff;
 
 	if (sscape_detected != hw_config->io_base)
 		return;
 
 	request_region(devc->base + 2, 6, "SoundScape");
 	if (old_hardware)
-	  {
-		  valid_interrupts = valid_interrupts_old;
-		  conf_printf("Ensoniq SoundScape (old)", hw_config);
-	} else
+	{
+		valid_interrupts = valid_interrupts_old;
+		conf_printf("Ensoniq SoundScape (old)", hw_config);
+	}
+	else
 		conf_printf("Ensoniq SoundScape", hw_config);
 
 	for (i = 0; i < sizeof(valid_interrupts); i++)
+	{
 		if (hw_config->irq == valid_interrupts[i])
-		  {
-			  irq_bits = i;
-			  break;
-		  }
+		{
+			irq_bits = i;
+			break;
+		}
+	}
 	if (hw_config->irq > 15 || (regs[4] = irq_bits == 0xff))
-	  {
-		  printk("Invalid IRQ%d\n", hw_config->irq);
-		  return;
-	  }
+	{
+		printk(KERN_ERR "Invalid IRQ%d\n", hw_config->irq);
+		return;
+	}
 	save_flags(flags);
 	cli();
 
 	for (i = 1; i < 10; i++)
+	{
 		switch (i)
-		  {
-		  case 1:	/* Host interrupt enable */
-			  sscape_write(devc, i, 0xf0);	/* All interrupts enabled */
-			  break;
-
-		  case 2:	/* DMA A status/trigger register */
-		  case 3:	/* DMA B status/trigger register */
-			  sscape_write(devc, i, 0x20);	/* DMA channel disabled */
-			  break;
-
-		  case 4:	/* Host interrupt config reg */
-			  sscape_write(devc, i, 0xf0 | (irq_bits << 2) | irq_bits);
-			  break;
-
-		  case 5:	/* Don't destroy CD-ROM DMA config bits (0xc0) */
-			  sscape_write(devc, i, (regs[i] & 0x3f) |
-				       (sscape_read(devc, i) & 0xc0));
-			  break;
-
-		  case 6:	/* CD-ROM config (WSS codec actually) */
-			  sscape_write(devc, i, regs[i]);
-			  break;
-
-		  case 9:	/* Master control reg. Don't modify CR-ROM bits. Disable SB emul */
-			  sscape_write(devc, i,
-				   (sscape_read(devc, i) & 0xf0) | 0x08);
-			  break;
-
-		  default:
-			  sscape_write(devc, i, regs[i]);
-		  }
+		{
+			case 1:	/* Host interrupt enable */
+				sscape_write(devc, i, 0xf0);	/* All interrupts enabled */
+				break;
+
+			case 2:	/* DMA A status/trigger register */
+			case 3:	/* DMA B status/trigger register */
+				sscape_write(devc, i, 0x20);	/* DMA channel disabled */
+				break;
+
+			case 4:	/* Host interrupt config reg */
+				sscape_write(devc, i, 0xf0 | (irq_bits << 2) | irq_bits);
+				break;
+
+			case 5:	/* Don't destroy CD-ROM DMA config bits (0xc0) */
+				sscape_write(devc, i, (regs[i] & 0x3f) | (sscape_read(devc, i) & 0xc0));
+				break;
+
+			case 6:	/* CD-ROM config (WSS codec actually) */
+				sscape_write(devc, i, regs[i]);
+				break;
+
+			case 9:	/* Master control reg. Don't modify CR-ROM bits. Disable SB emul */
+				sscape_write(devc, i, (sscape_read(devc, i) & 0xf0) | 0x08);
+				break;
 
+			default:
+				sscape_write(devc, i, regs[i]);
+		}
+	}
 	restore_flags(flags);
 
 #ifdef SSCAPE_DEBUG2
 	/*
-	   * Temporary debugging aid. Print contents of the registers after
-	   * changing them.
+	 * Temporary debugging aid. Print contents of the registers after
+	 * changing them.
 	 */
 	{
-		int             i;
+		int i;
 
 		for (i = 0; i < 13; i++)
 			printk("I%d = %02x (new value)\n", i, sscape_read(devc, i));
@@ -726,31 +689,26 @@
 #if defined(CONFIG_MIDI) && defined(CONFIG_MPU_EMU)
 	if (probe_mpu401(hw_config))
 		hw_config->always_detect = 1;
-	{
-		hw_config->name = "SoundScape";
+	hw_config->name = "SoundScape";
 
-		hw_config->irq *= -1;	/* Negative value signals IRQ sharing */
-		attach_mpu401(hw_config);
-		hw_config->irq *= -1;	/* Restore it */
-
-		if (hw_config->slots[1] != -1)	/* The MPU driver installed itself */
-		  {
-			  sscape_mididev = hw_config->slots[1];
-			  midi_devs[hw_config->slots[1]]->coproc = &sscape_coproc_operations;
-		  }
+	hw_config->irq *= -1;	/* Negative value signals IRQ sharing */
+	attach_mpu401(hw_config);
+	hw_config->irq *= -1;	/* Restore it */
+
+	if (hw_config->slots[1] != -1)	/* The MPU driver installed itself */
+	{
+		sscape_mididev = hw_config->slots[1];
+		midi_devs[hw_config->slots[1]]->coproc = &sscape_coproc_operations;
 	}
 #endif
-
 	sscape_write(devc, GA_INTENA_REG, 0x80);	/* Master IRQ enable */
 	devc->ok = 1;
 	devc->failed = 0;
-
 }
 
-static int
-detect_ga(sscape_info * devc)
+static int detect_ga(sscape_info * devc)
 {
-	unsigned char   save;
+	unsigned char save;
 
 	DDB(printk("Entered Soundscape detect_ga(%x)\n", devc->base));
 
@@ -758,54 +716,54 @@
 		return 0;
 
 	/*
-	   * First check that the address register of "ODIE" is
-	   * there and that it has exactly 4 writable bits.
-	   * First 4 bits
+	 * First check that the address register of "ODIE" is
+	 * there and that it has exactly 4 writable bits.
+	 * First 4 bits
 	 */
+	
 	if ((save = inb(PORT(ODIE_ADDR))) & 0xf0)
-	  {
-		  DDB(printk("soundscape: Detect error A\n"));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error A\n"));
+		return 0;
+	}
 	outb((0x00), PORT(ODIE_ADDR));
 	if (inb(PORT(ODIE_ADDR)) != 0x00)
-	  {
-		  DDB(printk("soundscape: Detect error B\n"));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error B\n"));
+		return 0;
+	}
 	outb((0xff), PORT(ODIE_ADDR));
 	if (inb(PORT(ODIE_ADDR)) != 0x0f)
-	  {
-		  DDB(printk("soundscape: Detect error C\n"));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error C\n"));
+		return 0;
+	}
 	outb((save), PORT(ODIE_ADDR));
 
 	/*
-	   * Now verify that some indirect registers return zero on some bits.
-	   * This may break the driver with some future revisions of "ODIE" but...
+	 * Now verify that some indirect registers return zero on some bits.
+	 * This may break the driver with some future revisions of "ODIE" but...
 	 */
 
 	if (sscape_read(devc, 0) & 0x0c)
-	  {
-		  DDB(printk("soundscape: Detect error D (%x)\n", sscape_read(devc, 0)));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error D (%x)\n", sscape_read(devc, 0)));
+		return 0;
+	}
 	if (sscape_read(devc, 1) & 0x0f)
-	  {
-		  DDB(printk("soundscape: Detect error E\n"));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error E\n"));
+		return 0;
+	}
 	if (sscape_read(devc, 5) & 0x0f)
-	  {
-		  DDB(printk("soundscape: Detect error F\n"));
-		  return 0;
-	  }
+	{
+		DDB(printk("soundscape: Detect error F\n"));
+		return 0;
+	}
 	return 1;
 }
 
-int
-probe_sscape(struct address_info *hw_config)
+int probe_sscape(struct address_info *hw_config)
 {
 
 	if (sscape_detected != 0 && sscape_detected != hw_config->io_base)
@@ -818,110 +776,110 @@
 
 #ifdef SSCAPE_DEBUG1
 	/*
-	   * Temporary debugging aid. Print contents of the registers before
-	   * changing them.
+	 * Temporary debugging aid. Print contents of the registers before
+	 * changing them.
 	 */
 	{
-		int             i;
+		int i;
 
 		for (i = 0; i < 13; i++)
 			printk("I%d = %02x (old value)\n", i, sscape_read(devc, i));
 	}
 #endif
-
-
 	devc->failed = 1;
 
 	if (!detect_ga(devc))
 		return 0;
 
 	if (old_hardware)	/* Check that it's really an old Spea/Reveal card. */
-	  {
-		  unsigned char   tmp;
-		  int             cc;
-
-		  if (!((tmp = sscape_read(devc, GA_HMCTL_REG)) & 0xc0))
-		    {
-			    sscape_write(devc, GA_HMCTL_REG, tmp | 0x80);
-			    for (cc = 0; cc < 200000; ++cc)
-				    inb(devc->base + ODIE_ADDR);
-		    }
-	  }
-	sscape_detected = hw_config->io_base;
+	{
+		unsigned char   tmp;
+		int             cc;
 
+		if (!((tmp = sscape_read(devc, GA_HMCTL_REG)) & 0xc0))
+		{
+			sscape_write(devc, GA_HMCTL_REG, tmp | 0x80);
+			for (cc = 0; cc < 200000; ++cc)
+				inb(devc->base + ODIE_ADDR);
+		}
+	}
+	sscape_detected = hw_config->io_base;
 	return 1;
 }
 
-int
-probe_ss_ms_sound(struct address_info *hw_config)
+int probe_ss_ms_sound(struct address_info *hw_config)
 {
-	int             i, irq_bits = 0xff;
-	int             ad_flags = 0;
+	int i, irq_bits = 0xff;
+	int ad_flags = 0;
 
 	if (devc->failed)
-	  {
-		  printk("Soundscape: Card not detected\n");
+	{
+		  printk(KERN_ERR "soundscape: Card not detected\n");
 		  return 0;
-	  }
+	}
 	if (devc->ok == 0)
-	  {
-		  printk("SoundScape: Invalid initialization order.\n");
-		  return 0;
-	  }
+	{
+		printk(KERN_ERR "soundscape: Invalid initialization order.\n");
+		return 0;
+	}
 	for (i = 0; i < sizeof(valid_interrupts); i++)
+	{
 		if (hw_config->irq == valid_interrupts[i])
-		  {
-			  irq_bits = i;
-			  break;
-		  }
+		{
+			irq_bits = i;
+			break;
+		}
+	}
 	if (hw_config->irq > 15 || irq_bits == 0xff)
-	  {
-		  printk("SoundScape: Invalid MSS IRQ%d\n", hw_config->irq);
-		  return 0;
-	  }
+	{
+		printk(KERN_ERR "soundscape: Invalid MSS IRQ%d\n", hw_config->irq);
+		return 0;
+	}
 	if (old_hardware)
 		ad_flags = 0x12345677;	/* Tell that we may have a CS4248 chip (Spea-V7 Media FX) */
 	return ad1848_detect(hw_config->io_base, &ad_flags, hw_config->osp);
 }
 
-void
-attach_ss_ms_sound(struct address_info *hw_config)
+void attach_ss_ms_sound(struct address_info *hw_config)
 {
 	/*
-	   * This routine configures the SoundScape card for use with the
-	   * Win Sound System driver. The AD1848 codec interface uses the CD-ROM
-	   * config registers of the "ODIE".
+	 * This routine configures the SoundScape card for use with the
+	 * Win Sound System driver. The AD1848 codec interface uses the CD-ROM
+	 * config registers of the "ODIE".
 	 */
 
-	int             i, irq_bits = 0xff;
+	int i, irq_bits = 0xff;
 
 	hw_config->dma = devc->dma;	/* Share the DMA with the ODIE/OPUS chip */
 
 	/*
 	 * Setup the DMA polarity.
 	 */
+
 	sscape_write(devc, GA_DMACFG_REG, 0x50);
 
 	/*
-	   * Take the gate-array off of the DMA channel.
+	 * Take the gate-array off of the DMA channel.
 	 */
+	
 	sscape_write(devc, GA_DMAB_REG, 0x20);
 
 	/*
-	   * Init the AD1848 (CD-ROM) config reg.
+	 * Init the AD1848 (CD-ROM) config reg.
 	 */
 
 	for (i = 0; i < sizeof(valid_interrupts); i++)
+	{
 		if (hw_config->irq == valid_interrupts[i])
-		  {
-			  irq_bits = i;
-			  break;
-		  }
-	sscape_write(devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) |
-		     (irq_bits << 1));
+		{
+			irq_bits = i;
+			break;
+		}
+	}
+	sscape_write(devc, GA_CDCFG_REG, 0x89 | (hw_config->dma << 4) | (irq_bits << 1));
 
 	if (hw_config->irq == devc->irq)
-		printk("SoundScape: Warning! The WSS mode can't share IRQ with MIDI\n");
+		printk(KERN_WARNING "soundscape: Warning! The WSS mode can't share IRQ with MIDI\n");
 
 	hw_config->slots[0] = ad1848_init("SoundScape", hw_config->io_base,
 					  hw_config->irq,
@@ -931,21 +889,21 @@
 					  devc->osp);
 
 	if (hw_config->slots[0] != -1)	/* The AD1848 driver installed itself */
-	  {
-		  audio_devs[hw_config->slots[0]]->coproc = &sscape_coproc_operations;
-		  devc->codec_audiodev = hw_config->slots[0];
-		  devc->my_audiodev = hw_config->slots[0];
-
-		  /* Set proper routings here (what are they) */
-		  AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_LINE);
-	  }
+	{
+		audio_devs[hw_config->slots[0]]->coproc = &sscape_coproc_operations;
+		devc->codec_audiodev = hw_config->slots[0];
+		devc->my_audiodev = hw_config->slots[0];
+
+		/* Set proper routings here (what are they) */
+		AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_LINE);
+	}
 #ifdef SSCAPE_DEBUG5
 	/*
-	   * Temporary debugging aid. Print contents of the registers
-	   * after the AD1848 device has been initialized.
+	 * Temporary debugging aid. Print contents of the registers
+	 * after the AD1848 device has been initialized.
 	 */
 	{
-		int             i;
+		int i;
 
 		for (i = 0; i < 13; i++)
 			printk("I%d = %02x\n", i, sscape_read(devc, i));
@@ -954,8 +912,7 @@
 
 }
 
-void
-unload_sscape(struct address_info *hw_config)
+void unload_sscape(struct address_info *hw_config)
 {
 	release_region(devc->base + 2, 6);
 #if defined(CONFIG_MPU_EMU) && defined(CONFIG_MIDI)
@@ -963,8 +920,7 @@
 #endif
 }
 
-void
-unload_ss_ms_sound(struct address_info *hw_config)
+void unload_ss_ms_sound(struct address_info *hw_config)
 {
 	ad1848_unload(hw_config->io_base,
 		      hw_config->irq,
@@ -983,11 +939,14 @@
 int             mpu_irq = -1;
 int             mpu_io = -1;
 
+int		spea = -1;
+
 static int      mss = 0;
 
 MODULE_PARM(dma, "i");
 MODULE_PARM(irq, "i");
 MODULE_PARM(io, "i");
+MODULE_PARM(spea, "i");		/* spea=0/1 set the old_hardware */
 MODULE_PARM(mpu_irq, "i");
 MODULE_PARM(mpu_io, "i");
 MODULE_PARM(mss, "i");
@@ -995,18 +954,17 @@
 struct address_info config;
 struct address_info mpu_config;
 
-int 
-init_module(void)
+int init_module(void)
 {
-	printk("Soundscape driver Copyright (C) by Hannu Savolainen 1993-1996\n");
+	printk(KERN_INFO "Soundscape driver Copyright (C) by Hannu Savolainen 1993-1996\n");
 	if (dma == -1 || irq == -1 || io == -1)
 	{
-		  printk("DMA, IRQ, and IO port must be specified.\n");
-		  return -EINVAL;
+		printk(KERN_ERR "DMA, IRQ, and IO port must be specified.\n");
+		return -EINVAL;
 	}
 	if (mpu_irq == -1 && mpu_io != -1)
 	{
-		  printk("MPU_IRQ must be specified if MPU_IO is set.\n");
+		  printk(KERN_ERR "MPU_IRQ must be specified if MPU_IO is set.\n");
 		  return -EINVAL;
 	}
 	config.irq = irq;
@@ -1016,6 +974,12 @@
 	mpu_config.irq = mpu_irq;
 	mpu_config.io_base = mpu_io;
 
+	if(spea != -1)
+	{
+		old_hardware = spea;
+		printk(KERN_INFO "Forcing %s hardware support.\n",
+			spea?"new":"old");
+	}	
 	if (probe_sscape(&mpu_config) == 0)
 		return -ENODEV;
 
@@ -1029,8 +993,7 @@
 	return 0;
 }
 
-void 
-cleanup_module(void)
+void cleanup_module(void)
 {
 	if (mss)
 		unload_ss_ms_sound(&config);
@@ -1039,5 +1002,4 @@
 }
 
 #endif
-
 #endif
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/uart6850.c linux/drivers/sound/uart6850.c
--- v2.1.85/linux/drivers/sound/uart6850.c	Tue Dec 30 10:59:17 1997
+++ linux/drivers/sound/uart6850.c	Mon Feb  9 11:19:31 1998
@@ -22,35 +22,35 @@
 #include "soundmodule.h"
 #if defined(CONFIG_UART6850) && defined(CONFIG_MIDI) || defined(MODULE)
 
-static int      uart6850_base = 0x330;
+static int uart6850_base = 0x330;
 
-static int     *uart6850_osp;
+static int *uart6850_osp;
 
 #define	DATAPORT   (uart6850_base)
 #define	COMDPORT   (uart6850_base+1)
 #define	STATPORT   (uart6850_base+1)
 
-static int
-uart6850_status(void)
+static int uart6850_status(void)
 {
 	return inb(STATPORT);
 }
+
 #define input_avail()		(uart6850_status()&INPUT_AVAIL)
 #define output_ready()		(uart6850_status()&OUTPUT_READY)
-static void
-uart6850_cmd(unsigned char cmd)
+
+static void uart6850_cmd(unsigned char cmd)
 {
-	outb((cmd), COMDPORT);
+	outb(cmd, COMDPORT);
 }
-static int
-uart6850_read(void)
+
+static int uart6850_read(void)
 {
 	return inb(DATAPORT);
 }
-static void
-uart6850_write(unsigned char byte)
+
+static void uart6850_write(unsigned char byte)
 {
-	outb((byte), DATAPORT);
+	outb(byte, DATAPORT);
 }
 
 #define	OUTPUT_READY	0x02	/* Mask for data ready Bit */
@@ -59,58 +59,58 @@
 #define	UART_RESET	0x95
 #define	UART_MODE_ON	0x03
 
-static int      uart6850_opened = 0;
-static int      uart6850_irq;
-static int      uart6850_detected = 0;
-static int      my_dev;
-
-static int      reset_uart6850(void);
-static void     (*midi_input_intr) (int dev, unsigned char data);
-static void     poll_uart6850(unsigned long dummy);
+static int uart6850_opened = 0;
+static int uart6850_irq;
+static int uart6850_detected = 0;
+static int my_dev;
+
+static int reset_uart6850(void);
+static void (*midi_input_intr) (int dev, unsigned char data);
+static void poll_uart6850(unsigned long dummy);
 
 
-static struct timer_list uart6850_timer =
-{NULL, NULL, 0, 0, poll_uart6850};
+static struct timer_list uart6850_timer = {
+	NULL, NULL, 0, 0, poll_uart6850
+};
 
-static void
-uart6850_input_loop(void)
+static void uart6850_input_loop(void)
 {
-	int             count;
-
-	count = 10;
+	int count = 10;
 
-	while (count)		/*
-				 * Not timed out
-				 */
+	while (count)
+	{
+		/*
+		 * Not timed out
+		 */
 		if (input_avail())
-		  {
-			  unsigned char   c = uart6850_read();
-
-			  count = 100;
-
-			  if (uart6850_opened & OPEN_READ)
-				  midi_input_intr(my_dev, c);
-		} else
+		{
+			unsigned char c = uart6850_read();
+			count = 100;
+			if (uart6850_opened & OPEN_READ)
+				midi_input_intr(my_dev, c);
+		}
+		else
+		{
 			while (!input_avail() && count)
 				count--;
+		}
+	}
 }
 
-void
-m6850intr(int irq, void *dev_id, struct pt_regs *dummy)
+void m6850intr(int irq, void *dev_id, struct pt_regs *dummy)
 {
 	if (input_avail())
 		uart6850_input_loop();
 }
 
 /*
- * It looks like there is no input interrupts in the UART mode. Let's try
- * polling.
+ *	It looks like there is no input interrupts in the UART mode. Let's try
+ *	polling.
  */
 
-static void
-poll_uart6850(unsigned long dummy)
+static void poll_uart6850(unsigned long dummy)
 {
-	unsigned long   flags;
+	unsigned long flags;
 
 	if (!(uart6850_opened & OPEN_READ))
 		return;		/* Device has been closed */
@@ -121,34 +121,30 @@
 	if (input_avail())
 		uart6850_input_loop();
 
-
-	{
-		uart6850_timer.expires = (1) + jiffies;
-		add_timer(&uart6850_timer);
-	};			/*
-				   * Come back later
-				 */
+	uart6850_timer.expires = 1 + jiffies;
+	add_timer(&uart6850_timer);
+	
+	/*
+	 *	Come back later
+	 */
 
 	restore_flags(flags);
 }
 
-static int
-uart6850_open(int dev, int mode,
+static int uart6850_open(int dev, int mode,
 	      void            (*input) (int dev, unsigned char data),
 	      void            (*output) (int dev)
 )
 {
 	if (uart6850_opened)
-	  {
-		  printk("Midi6850: Midi busy\n");
+	{
+/*		  printk("Midi6850: Midi busy\n");*/
 		  return -EBUSY;
-	  };
+	};
 
 	MOD_INC_USE_COUNT;
 	uart6850_cmd(UART_RESET);
-
 	uart6850_input_loop();
-
 	midi_input_intr = input;
 	uart6850_opened = mode;
 	poll_uart6850(0);	/*
@@ -158,22 +154,18 @@
 	return 0;
 }
 
-static void
-uart6850_close(int dev)
+static void uart6850_close(int dev)
 {
 	uart6850_cmd(UART_MODE_ON);
-
-	del_timer(&uart6850_timer);;
+	del_timer(&uart6850_timer);
 	uart6850_opened = 0;
-
 	MOD_DEC_USE_COUNT;
 }
 
-static int
-uart6850_out(int dev, unsigned char midi_byte)
+static int uart6850_out(int dev, unsigned char midi_byte)
 {
-	int             timeout;
-	unsigned long   flags;
+	int timeout;
+	unsigned long flags;
 
 	/*
 	 * Test for input since pending input seems to block the output.
@@ -195,41 +187,35 @@
 	for (timeout = 30000; timeout > 0 && !output_ready(); timeout--);	/*
 										 * Wait
 										 */
-
 	if (!output_ready())
-	  {
-		  printk("Midi6850: Timeout\n");
-		  return 0;
-	  }
+	{
+		printk(KERN_WARNING "Midi6850: Timeout\n");
+		return 0;
+	}
 	uart6850_write(midi_byte);
 	return 1;
 }
 
-static int
-uart6850_command(int dev, unsigned char *midi_byte)
+static int uart6850_command(int dev, unsigned char *midi_byte)
 {
 	return 1;
 }
 
-static int
-uart6850_start_read(int dev)
+static int uart6850_start_read(int dev)
 {
 	return 0;
 }
 
-static int
-uart6850_end_read(int dev)
+static int uart6850_end_read(int dev)
 {
 	return 0;
 }
 
-static void
-uart6850_kick(int dev)
+static void uart6850_kick(int dev)
 {
 }
 
-static int
-uart6850_buffer_status(int dev)
+static int uart6850_buffer_status(int dev)
 {
 	return 0;		/*
 				 * No data in buffers
@@ -257,26 +243,25 @@
 };
 
 
-void
-attach_uart6850(struct address_info *hw_config)
+void attach_uart6850(struct address_info *hw_config)
 {
-	int             ok, timeout;
+	int ok, timeout;
 	unsigned long   flags;
 
 	if ((my_dev = sound_alloc_mididev()) == -1)
-	  {
-		  printk(KERN_INFO "uart6850: Too many midi devices detected\n");
-		  return;
-	  }
+	{
+		printk(KERN_INFO "uart6850: Too many midi devices detected\n");
+		return;
+	}
 	uart6850_base = hw_config->io_base;
 	uart6850_osp = hw_config->osp;
 	uart6850_irq = hw_config->irq;
 
 	if (!uart6850_detected)
-	  {
-		  sound_unload_mididev(my_dev);
-		  return;
-	  }
+	{
+		sound_unload_mididev(my_dev);
+		return;
+	}
 	save_flags(flags);
 	cli();
 
@@ -284,9 +269,7 @@
 										 * Wait
 										 */
 	uart6850_cmd(UART_MODE_ON);
-
 	ok = 1;
-
 	restore_flags(flags);
 
 	conf_printf("6850 Midi Interface", hw_config);
@@ -297,8 +280,7 @@
 	sequencer_init();
 }
 
-static int
-reset_uart6850(void)
+static int reset_uart6850(void)
 {
 	uart6850_read();
 	return 1;		/*
@@ -307,10 +289,9 @@
 }
 
 
-int
-probe_uart6850(struct address_info *hw_config)
+int probe_uart6850(struct address_info *hw_config)
 {
-	int             ok = 0;
+	int ok = 0;
 
 	uart6850_osp = hw_config->osp;
 	uart6850_base = hw_config->io_base;
@@ -320,13 +301,11 @@
 		return 0;
 
 	ok = reset_uart6850();
-
 	uart6850_detected = ok;
 	return ok;
 }
 
-void
-unload_uart6850(struct address_info *hw_config)
+void unload_uart6850(struct address_info *hw_config)
 {
 	snd_release_irq(hw_config->irq);
 	sound_unload_mididev(hw_config->slots[4]);
@@ -335,19 +314,21 @@
 
 #ifdef MODULE
 
-int             io = -1;
-int             irq = -1;
+int io = -1;
+int irq = -1;
+
+MODULE_PARM(io,"i");
+MODULE_PARM(irq,"i");
 
 struct address_info cfg;
 
-int 
-init_module(void)
+int init_module(void)
 {
 	if (io == -1 || irq == -1)
-	  {
-		  printk("uart6850: irq and io must be set.\n");
-		  return -EINVAL;
-	  }
+	{
+		printk(KERN_INFO "uart6850: irq and io must be set.\n");
+		return -EINVAL;
+	}
 	cfg.io_base = io;
 	cfg.irq = irq;
 
@@ -358,8 +339,7 @@
 	return 0;
 }
 
-void 
-cleanup_module(void)
+void cleanup_module(void)
 {
 	unload_uart6850(&cfg);
 	SOUND_LOCK_END;
diff -u --recursive --new-file v2.1.85/linux/drivers/sound/v_midi.c linux/drivers/sound/v_midi.c
--- v2.1.85/linux/drivers/sound/v_midi.c	Tue Dec 30 10:59:17 1997
+++ linux/drivers/sound/v_midi.c	Mon Feb  9 11:14:15 1998
@@ -24,14 +24,14 @@
 #include "v_midi.h"
 
 static vmidi_devc *v_devc[2] = { NULL, NULL};
-static int			midi1,midi2;
+static int midi1,midi2;
+static void *midi_mem = NULL;
 
 #ifdef MODULE
 
 static struct address_info config;	/* dummy */
 
-int
-init_module(void)
+int init_module(void)
 {
 	printk("MIDI Loopback device driver\n");
 	if (!probe_v_midi(&config))
@@ -41,8 +41,7 @@
 	return 0;
 }
 
-void
-cleanup_module(void)
+void cleanup_module(void)
 {
 	unload_v_midi(&config);
 	SOUND_LOCK_END;
@@ -61,93 +60,87 @@
 
 void            (*midi_input_intr) (int dev, unsigned char data);
 
-static int
-v_midi_open (int dev, int mode,
+static int v_midi_open (int dev, int mode,
 	      void            (*input) (int dev, unsigned char data),
 	      void            (*output) (int dev)
 )
 {
-  vmidi_devc      *devc = midi_devs[dev]->devc;
-  unsigned long   flags;
+	vmidi_devc *devc = midi_devs[dev]->devc;
+	unsigned long flags;
 
-  if (devc == NULL)
-    return -(ENXIO);
+	if (devc == NULL)
+		return -(ENXIO);
 
-  save_flags (flags);
-  cli ();
-  if (devc->opened)
-    {
-      restore_flags (flags);
-      return -(EBUSY);
-    }
-  devc->opened = 1;
-  restore_flags (flags);
-
-  devc->intr_active = 1;
-
-  if (mode & OPEN_READ)
-    {
-      devc->input_opened = 1;
-      devc->midi_input_intr = input;
-    }
+	save_flags (flags);
+	cli();
+	if (devc->opened)
+	{
+		restore_flags (flags);
+		return -(EBUSY);
+	}
+	devc->opened = 1;
+	restore_flags (flags);
+
+	devc->intr_active = 1;
+
+	if (mode & OPEN_READ)
+	{
+		devc->input_opened = 1;
+		devc->midi_input_intr = input;
+	}
 
-  return 0;
+	return 0;
 }
 
-static void
-v_midi_close (int dev)
+static void v_midi_close (int dev)
 {
-  vmidi_devc        *devc = midi_devs[dev]->devc;
-  unsigned long   flags;
+	vmidi_devc *devc = midi_devs[dev]->devc;
+	unsigned long flags;
 
-  if (devc == NULL)
-    return;
+	if (devc == NULL)
+		return;
 
-  save_flags (flags);
-  cli ();
-  devc->intr_active = 0;
-  devc->input_opened = 0;
-  devc->opened = 0;
-  restore_flags (flags);
+	save_flags (flags);
+	cli ();
+	devc->intr_active = 0;
+	devc->input_opened = 0;
+	devc->opened = 0;
+	restore_flags (flags);
 }
 
-static int
-v_midi_out (int dev, unsigned char midi_byte)
+static int v_midi_out (int dev, unsigned char midi_byte)
 {
-  vmidi_devc        *devc = midi_devs[dev]->devc;
-  vmidi_devc        *pdevc = midi_devs[devc->pair_mididev]->devc;
-
-  if (devc == NULL)
-    return -(ENXIO);
+	vmidi_devc *devc = midi_devs[dev]->devc;
+	vmidi_devc *pdevc = midi_devs[devc->pair_mididev]->devc;
 
-  if (pdevc->input_opened > 0){
-	  if (MIDIbuf_avail(pdevc->my_mididev) > 500)
-		return 0;
-    pdevc->midi_input_intr (pdevc->my_mididev, midi_byte);
-  }
+	if (devc == NULL)
+		return -(ENXIO);
 
-  return 1;
+	if (pdevc->input_opened > 0){
+		if (MIDIbuf_avail(pdevc->my_mididev) > 500)
+			return 0;
+		pdevc->midi_input_intr (pdevc->my_mididev, midi_byte);
+	}
+	return 1;
 }
 
-static int
-v_midi_start_read (int dev)
+static int v_midi_start_read (int dev)
 {
-  return 0;
+	return 0;
 }
 
-static int
-v_midi_end_read (int dev)
+static int v_midi_end_read (int dev)
 {
-  vmidi_devc        *devc = midi_devs[dev]->devc;
-
-  if (devc == NULL)
-    return -(ENXIO);
+	vmidi_devc *devc = midi_devs[dev]->devc;
+	if (devc == NULL)
+		return -ENXIO;
 
-  devc->intr_active = 0;
-  return 0;
+	devc->intr_active = 0;
+	return 0;
 }
 
 /* why -EPERM and not -EINVAL?? */
+
 static int v_midi_ioctl (int dev, unsigned cmd, caddr_t arg)
 {
 	return -EPERM;
@@ -161,199 +154,143 @@
 
 static struct midi_operations v_midi_operations =
 {
-  {"Loopback MIDI Port 1", 0, 0, SNDCARD_VMIDI},
-  &std_midi_synth,
-  {0},
-  v_midi_open,
-  v_midi_close,
-  v_midi_ioctl,
-  v_midi_out,
-  v_midi_start_read,
-  v_midi_end_read,
-  NULL,
-  NULL,
-  NULL,
-  NULL
+	{"Loopback MIDI Port 1", 0, 0, SNDCARD_VMIDI},
+	&std_midi_synth,
+	{0},
+	v_midi_open,
+	v_midi_close,
+	v_midi_ioctl,
+	v_midi_out,
+	v_midi_start_read,
+	v_midi_end_read,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
 static struct midi_operations v_midi_operations2 =
 {
-  {"Loopback MIDI Port 2", 0, 0, SNDCARD_VMIDI},
-  &std_midi_synth,
-  {0},
-  v_midi_open,
-  v_midi_close,
-  v_midi_ioctl,
-  v_midi_out,
-  v_midi_start_read,
-  v_midi_end_read,
-  NULL,
-  NULL,
-  NULL,
-  NULL
+	{"Loopback MIDI Port 2", 0, 0, SNDCARD_VMIDI},
+	&std_midi_synth,
+	{0},
+	v_midi_open,
+	v_midi_close,
+	v_midi_ioctl,
+	v_midi_out,
+	v_midi_start_read,
+	v_midi_end_read,
+	NULL,
+	NULL,
+	NULL,
+	NULL
 };
 
-void
-attach_v_midi (struct address_info *hw_config)
+/*
+ *	We kmalloc just one of these - it makes life simpler and the code
+ *	cleaner and the memory handling far more efficient
+ */
+ 
+struct vmidi_memory
 {
+	/* Must be first */
+	struct midi_operations m_ops[2];
+	struct synth_operations s_ops[2];
+	struct vmidi_devc v_ops[2];
+};
 
-  /* printk("Attaching v_midi device.....\n"); */
-  if (sound_nblocks >= (1024 - 6)){
-     printk("Sound: Loop Back MIDI: not enough sound driver memory block table\n");
-     return;
-  } 
-
-  midi1 = sound_alloc_mididev();
-  if (midi1 == -1)
-    {
-      printk ("Sound: Too many midi devices detected\n");
-      return;
-    }
-  midi_devs[midi1] = (struct midi_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct midi_operations)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct midi_operations);
-	
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-  if (midi_devs[midi1] == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      return;
-    }
-
-  midi2 = sound_alloc_mididev();
-  if (midi2 == -1)
-    {
-      printk ("Sound: Too many midi devices detected\n");
-      sound_unload_mididev(midi1);
-      return;
-    }
-
-  midi_devs[midi2] = (struct midi_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct midi_operations)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct midi_operations);
-
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-  if (midi_devs[midi2] == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-      return;
-    }
-
-  /* printk("VMIDI1: %d   VMIDI2: %d\n",midi1,midi2); */
-
-  /* for MIDI-1 */
-  v_devc[0] = (struct vmidi_devc *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct vmidi_devc)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct vmidi_devc);
-
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-  if (v_devc[0] == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-      return;
-    }
-
-  memcpy ((char *) midi_devs[midi1], (char *) &v_midi_operations,
-	  sizeof (struct midi_operations));
-
-  v_devc[0]->my_mididev = midi1;
-  v_devc[0]->pair_mididev = midi2;
-  v_devc[0]->opened = v_devc[0]->input_opened = 0;
-  v_devc[0]->intr_active = 0;
-  v_devc[0]->midi_input_intr = NULL;
-
-  midi_devs[midi1]->devc = v_devc[0];
-
-  midi_devs[midi1]->converter = (struct synth_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct synth_operations)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct synth_operations);
-
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-
-  if (midi_devs[midi1]->converter == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-      return;
-    }
-
-  std_midi_synth.midi_dev = midi1;
-  memcpy ((char *) midi_devs[midi1]->converter, (char *) &std_midi_synth,
-	  sizeof (struct synth_operations));
-
-  midi_devs[midi1]->converter->id = "V_MIDI 1";
-
-  /* for MIDI-2 */
-  v_devc[1] = (struct vmidi_devc *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct vmidi_devc)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct vmidi_devc);
-
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-  if (v_devc[1] == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-      return;
-    }
-
-
-  memcpy ((char *) midi_devs[midi2], (char *) &v_midi_operations2,
-	  sizeof (struct midi_operations));
-
-  v_devc[1]->my_mididev = midi2;
-  v_devc[1]->pair_mididev = midi1;
-  v_devc[1]->opened = v_devc[1]->input_opened = 0;
-  v_devc[1]->intr_active = 0;
-  v_devc[1]->midi_input_intr = NULL;
-
-  midi_devs[midi2]->devc = v_devc[1];
-
-
-  midi_devs[midi2]->converter = (struct synth_operations *) (sound_mem_blocks[sound_nblocks] = vmalloc (sizeof (struct synth_operations)));
-  sound_mem_sizes[sound_nblocks] = sizeof (struct synth_operations);
-
-  if (sound_nblocks < 1024)
-    sound_nblocks++;;
-
-  if (midi_devs[midi2]->converter == NULL)
-    {
-      printk (KERN_WARNING "Loop Back MIDI: Failed to allocate memory\n");
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-      return;
-    }
-
-  std_midi_synth.midi_dev = midi2;
-  memcpy ((char *) midi_devs[midi2]->converter, (char *) &std_midi_synth,
-	  sizeof (struct synth_operations));
+void attach_v_midi (struct address_info *hw_config)
+{
+	struct vmidi_memory *m;
+	/* printk("Attaching v_midi device.....\n"); */
 
-  midi_devs[midi2]->converter->id = "V_MIDI 2";
+	midi1 = sound_alloc_mididev();
+	if (midi1 == -1)
+	{
+		printk(KERN_ERR "v_midi: Too many midi devices detected\n");
+		return;
+	}
+	
+	m=(struct vmidi_memory *)kmalloc(sizeof(struct vmidi_memory), GFP_KERNEL);
+	if (m == NULL)
+	{
+		printk(KERN_WARNING "Loopback MIDI: Failed to allocate memory\n");
+		sound_unload_mididev(midi1);
+		return;
+	}
+	
+	midi_mem = m;
+	
+	midi_devs[midi1] = &m->m_ops[0];
+	
 
-  sequencer_init();
-  /* printk("Attached v_midi device\n"); */
+	midi2 = sound_alloc_mididev();
+	if (midi2 == -1)
+	{
+		printk (KERN_ERR "v_midi: Too many midi devices detected\n");
+		kfree(m);
+		sound_unload_mididev(midi1);
+		return;
+	}
+
+	midi_devs[midi2] = &m->m_ops[1];
+
+	/* printk("VMIDI1: %d   VMIDI2: %d\n",midi1,midi2); */
+
+	/* for MIDI-1 */
+	v_devc[0] = &m->v_ops[0];
+	memcpy ((char *) midi_devs[midi1], (char *) &v_midi_operations,
+		sizeof (struct midi_operations));
+
+	v_devc[0]->my_mididev = midi1;
+	v_devc[0]->pair_mididev = midi2;
+	v_devc[0]->opened = v_devc[0]->input_opened = 0;
+	v_devc[0]->intr_active = 0;
+	v_devc[0]->midi_input_intr = NULL;
+
+	midi_devs[midi1]->devc = v_devc[0];
+
+	midi_devs[midi1]->converter = &m->s_ops[0];
+	std_midi_synth.midi_dev = midi1;
+	memcpy ((char *) midi_devs[midi1]->converter, (char *) &std_midi_synth,
+		sizeof (struct synth_operations));
+	midi_devs[midi1]->converter->id = "V_MIDI 1";
+
+	/* for MIDI-2 */
+	v_devc[1] = &m->v_ops[1];
+
+	memcpy ((char *) midi_devs[midi2], (char *) &v_midi_operations2,
+		sizeof (struct midi_operations));
+
+	v_devc[1]->my_mididev = midi2;
+	v_devc[1]->pair_mididev = midi1;
+	v_devc[1]->opened = v_devc[1]->input_opened = 0;
+	v_devc[1]->intr_active = 0;
+	v_devc[1]->midi_input_intr = NULL;
+
+	midi_devs[midi2]->devc = v_devc[1];
+	midi_devs[midi2]->converter = &m->s_ops[1];
+
+	std_midi_synth.midi_dev = midi2;
+	memcpy ((char *) midi_devs[midi2]->converter, (char *) &std_midi_synth,
+		sizeof (struct synth_operations));
+	midi_devs[midi2]->converter->id = "V_MIDI 2";
 
+	sequencer_init();
+	/* printk("Attached v_midi device\n"); */
 }
 
-int
-probe_v_midi(struct address_info *hw_config)
+int probe_v_midi(struct address_info *hw_config)
 {
 	return(1);	/* always OK */
 }
 
 
-void
-unload_v_midi(struct address_info *hw_config)
+void unload_v_midi(struct address_info *hw_config)
 {
-      sound_unload_mididev(midi1);
-      sound_unload_mididev(midi2);
-;
+	sound_unload_mididev(midi1);
+	sound_unload_mididev(midi2);
+	kfree(midi_mem);
 }
 
 #endif
diff -u --recursive --new-file v2.1.85/linux/fs/affs/namei.c linux/fs/affs/namei.c
--- v2.1.85/linux/fs/affs/namei.c	Tue Jan  6 13:33:29 1998
+++ linux/fs/affs/namei.c	Wed Feb  4 11:08:53 1998
@@ -583,28 +583,6 @@
 	return error;
 }
 
-/* This is copied from the ext2 fs. No need to reinvent the wheel. */
-
-static int
-subdir(struct dentry * new_dentry, struct dentry * old_dentry)
-{
-	int result;
-
-	result = 0;
-	for (;;) {
-		if (new_dentry != old_dentry) {
-			struct dentry * parent = new_dentry->d_parent;
-			if (parent == new_dentry)
-				break;
-			new_dentry = parent;
-			continue;
-		}
-		result = 1;
-		break;
-	}
-	return result;
-}
-
 int
 affs_rename(struct inode *old_dir, struct dentry *old_dentry,
 	    struct inode *new_dir, struct dentry *new_dentry)
@@ -652,7 +630,7 @@
 		if (!S_ISDIR(old_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry,old_dentry))
+		if (is_subdir(new_dentry,old_dentry))
 			goto end_rename;
 		retval = -ENOTEMPTY;
 		if (!empty_dir(new_bh,AFFS_I2HSIZE(new_inode)))
@@ -666,7 +644,7 @@
 		if (new_inode && !S_ISDIR(new_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry,old_dentry))
+		if (is_subdir(new_dentry,old_dentry))
 			goto end_rename;
 		if (affs_parent_ino(old_inode) != old_dir->i_ino)
 			goto end_rename;
diff -u --recursive --new-file v2.1.85/linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- v2.1.85/linux/fs/binfmt_elf.c	Mon Jan 12 14:52:46 1998
+++ linux/fs/binfmt_elf.c	Fri Feb  6 10:06:55 1998
@@ -432,7 +432,6 @@
 	unsigned long elf_entry, interp_load_addr = 0;
 	int status;
 	unsigned long start_code, end_code, end_data;
-	unsigned long elf_stack;
 	char passed_fileno[6];
 
 	ibcs2_interpreter = 0;
@@ -484,7 +483,6 @@
 
 	file = current->files->fd[elf_exec_fileno];
 
-	elf_stack = ~0UL;
 	elf_interpreter = NULL;
 	start_code = ~0UL;
 	end_code = 0;
@@ -620,12 +618,13 @@
 	current->mm->mmap = NULL;
 	elf_entry = (unsigned long) elf_ex.e_entry;
 
+	/* Do this immediately, since STACK_TOP as used in setup_arg_pages
+	   may depend on the personality.  */
+	SET_PERSONALITY(elf_ex, ibcs2_interpreter);
+
 	/* Do this so that we can load the interpreter, if need be.  We will
 	   change some of these later */
 	current->mm->rss = 0;
-#ifdef ELF_FLAGS_INIT
-	ELF_FLAGS_INIT;
-#endif
 	bprm->p = setup_arg_pages(bprm->p, bprm);
 	current->mm->start_stack = bprm->p;
 
@@ -666,11 +665,6 @@
 					(elf_ppnt->p_offset -
 					 ELF_PAGEOFFSET(elf_ppnt->p_vaddr)));
 
-#ifdef LOW_ELF_STACK
-			if (error < elf_stack)
-				elf_stack = error-1;
-#endif
-
 			if (!load_addr_set) {
 				load_addr_set = 1;
 				load_addr = (elf_ppnt->p_vaddr -
@@ -722,8 +716,8 @@
 
 	kfree(elf_phdata);
 
-	if (interpreter_type != INTERPRETER_AOUT) sys_close(elf_exec_fileno);
-	SET_PERSONALITY(ibcs2_interpreter);
+	if (interpreter_type != INTERPRETER_AOUT)
+		sys_close(elf_exec_fileno);
 
 	if (current->exec_domain && current->exec_domain->module)
 		__MOD_DEC_USE_COUNT(current->exec_domain->module);
@@ -738,9 +732,6 @@
 
 #ifndef VM_STACK_FLAGS
 	current->executable = dget(bprm->dentry);
-#endif
-#ifdef LOW_ELF_STACK
-	current->start_stack = bprm->p = elf_stack;
 #endif
 	current->suid = current->euid = current->fsuid = bprm->e_uid;
 	current->sgid = current->egid = current->fsgid = bprm->e_gid;
diff -u --recursive --new-file v2.1.85/linux/fs/coda/file.c linux/fs/coda/file.c
--- v2.1.85/linux/fs/coda/file.c	Tue Jan  6 10:00:21 1998
+++ linux/fs/coda/file.c	Mon Feb  9 16:12:56 1998
@@ -264,7 +264,7 @@
 {
         struct super_block *sbptr;
 
-        sbptr = get_super(dev);
+        sbptr = get_super(to_kdev_t(dev));
 
         if ( !sbptr ) {
                 printk("coda_inode_grab: coda_find_super returns NULL.\n");
diff -u --recursive --new-file v2.1.85/linux/fs/coda/pioctl.c linux/fs/coda/pioctl.c
--- v2.1.85/linux/fs/coda/pioctl.c	Sun Dec 21 14:45:14 1997
+++ linux/fs/coda/pioctl.c	Mon Feb  9 16:12:56 1998
@@ -129,8 +129,8 @@
 	        target_inode = target_de->d_inode;
 	}
 	
-	CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: 0x%d\n",
-	       target_inode->i_ino, target_inode->i_dev);
+	CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: %s\n",
+	       target_inode->i_ino, kdevname(target_inode->i_dev));
 
 	/* return if it is not a Coda inode */
 	if ( target_inode->i_sb != inode->i_sb ) {
diff -u --recursive --new-file v2.1.85/linux/fs/coda/super.c linux/fs/coda/super.c
--- v2.1.85/linux/fs/coda/super.c	Tue Jan  6 10:00:21 1998
+++ linux/fs/coda/super.c	Mon Feb  9 16:12:56 1998
@@ -131,8 +131,8 @@
 	    goto error;
 	} 
 
-	printk("coda_read_super: rootinode is %ld dev %d\n", 
-	       root->i_ino, root->i_dev);
+	printk("coda_read_super: rootinode is %ld dev %s\n", 
+	       root->i_ino, kdevname(root->i_dev));
 	sbi->sbi_root = root;
 	sb->s_root = d_alloc_root(root, NULL);
 	unlock_super(sb);
@@ -351,7 +351,7 @@
 
         if (MINOR(psdev->i_rdev) >= MAX_CODADEVS) { 
 		printk("minor %d not an allocated Coda PSDEV\n", 
-		       psdev->i_rdev);
+		       MINOR(psdev->i_rdev));
 		return 1;
         }
 
diff -u --recursive --new-file v2.1.85/linux/fs/coda/symlink.c linux/fs/coda/symlink.c
--- v2.1.85/linux/fs/coda/symlink.c	Tue Jan  6 10:00:21 1998
+++ linux/fs/coda/symlink.c	Mon Feb  9 16:12:56 1998
@@ -94,7 +94,7 @@
 	char mem[CFS_MAXPATHLEN];
 	char *path;
 ENTRY;
-	CDEBUG(D_INODE, "(%x/%ld)\n", inode->i_dev, inode->i_ino);
+	CDEBUG(D_INODE, "(%s/%ld)\n", kdevname(inode->i_dev), inode->i_ino);
 	
 	cnp = ITOC(inode);
 	CHECK_CNODE(cnp);
diff -u --recursive --new-file v2.1.85/linux/fs/ext2/inode.c linux/fs/ext2/inode.c
--- v2.1.85/linux/fs/ext2/inode.c	Mon Jan 12 14:22:54 1998
+++ linux/fs/ext2/inode.c	Mon Feb  9 16:12:56 1998
@@ -629,17 +629,11 @@
 
 void ext2_write_inode (struct inode * inode)
 {
-#if 0
-	printk("ext2_write(%04x:%06d)...", inode->i_dev, inode->i_ino);
-#endif
 	ext2_update_inode (inode, 0);
 }
 
 int ext2_sync_inode (struct inode *inode)
 {
-#if 0
-	printk("ext2_sync(%04x:%06d)...", inode->i_dev, inode->i_ino);
-#endif
 	return ext2_update_inode (inode, 1);
 }
 
diff -u --recursive --new-file v2.1.85/linux/fs/ext2/namei.c linux/fs/ext2/namei.c
--- v2.1.85/linux/fs/ext2/namei.c	Sun Jan  4 00:53:41 1998
+++ linux/fs/ext2/namei.c	Wed Feb  4 11:08:53 1998
@@ -830,28 +830,6 @@
 	return 0;
 }
 
-/*
- * Trivially implemented using the dcache structure
- */
-static int subdir (struct dentry * new_dentry, struct dentry * old_dentry)
-{
-	int result;
-
-	result = 0;
-	for (;;) {
-		if (new_dentry != old_dentry) {
-			struct dentry * parent = new_dentry->d_parent;
-			if (parent == new_dentry)
-				break;
-			new_dentry = parent;
-			continue;
-		}
-		result = 1;
-		break;
-	}
-	return result;
-}
-
 #define PARENT_INO(buffer) \
 	((struct ext2_dir_entry *) ((char *) buffer + \
 	le16_to_cpu(((struct ext2_dir_entry *) buffer)->rec_len)))->inode
@@ -915,7 +893,7 @@
 		if (!S_ISDIR(old_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		retval = -ENOTEMPTY;
 		if (!empty_dir (new_inode))
@@ -938,7 +916,7 @@
 		if (new_inode && !S_ISDIR(new_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		dir_bh = ext2_bread (old_inode, 0, 0, &retval);
 		if (!dir_bh)
diff -u --recursive --new-file v2.1.85/linux/fs/inode.c linux/fs/inode.c
--- v2.1.85/linux/fs/inode.c	Tue Feb  3 18:26:29 1998
+++ linux/fs/inode.c	Mon Feb  9 11:34:17 1998
@@ -225,6 +225,8 @@
 	wait_on_inode(inode);
 	if (IS_WRITABLE(inode) && inode->i_sb && inode->i_sb->dq_op)
 		inode->i_sb->dq_op->drop(inode);
+	if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->clear_inode)
+		inode->i_sb->s_op->clear_inode(inode);
 
 	inode->i_state = 0;
 }
diff -u --recursive --new-file v2.1.85/linux/fs/isofs/inode.c linux/fs/isofs/inode.c
--- v2.1.85/linux/fs/isofs/inode.c	Thu Dec 18 16:37:02 1997
+++ linux/fs/isofs/inode.c	Mon Feb  9 16:12:56 1998
@@ -79,7 +79,6 @@
   char cruft;
   char unhide;
   unsigned char check;
-  unsigned char conversion;
   unsigned int blocksize;
   mode_t mode;
   gid_t gid;
@@ -98,7 +97,6 @@
 	popt->cruft = 'n';
 	popt->unhide = 'n';
 	popt->check = 's';		/* default: strict */
-	popt->conversion = 'b';		/* default: no conversion */
 	popt->blocksize = 1024;
 	popt->mode = S_IRUGO | S_IXUGO; /* r-x for all.  The disc could
 					   be shared with DOS machines so
@@ -166,12 +164,14 @@
 			else return 0;
 		}
 		else if (!strcmp(this_char,"conv") && value) {
-			if (value[0] && !value[1] && strchr("btma",*value))
-				popt->conversion = *value;
-			else if (!strcmp(value,"binary")) popt->conversion = 'b';
-			else if (!strcmp(value,"text")) popt->conversion = 't';
-			else if (!strcmp(value,"mtext")) popt->conversion = 'm';
-			else if (!strcmp(value,"auto")) popt->conversion = 'a';
+			/* no conversion is done anymore;
+			   we still accept the same mount options,
+			   but ignore them */
+			if (value[0] && !value[1] && strchr("btma",*value)) ;
+			else if (!strcmp(value,"binary")) ;
+			else if (!strcmp(value,"text")) ;
+			else if (!strcmp(value,"mtext")) ;
+			else if (!strcmp(value,"auto")) ;
 			else return 0;
 		}
 		else if (value &&
@@ -254,17 +254,17 @@
 	  printk("isofs.inode: XA disk: %s\n", ms_info.xa_flag ? "yes":"no");
 	  printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba);
 	}
-#endif 0
+#endif
       if (i==0)
 #if WE_OBEY_THE_WRITTEN_STANDARDS
         if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */
-#endif WE_OBEY_THE_WRITTEN_STANDARDS
+#endif
           vol_desc_start=ms_info.addr.lba;
     }
   return vol_desc_start;
 }
 
-struct super_block *isofs_read_super(struct super_block *s,void *data,
+struct super_block *isofs_read_super(struct super_block *s, void *data,
 				     int silent)
 {
 	struct buffer_head	      * bh = NULL;
@@ -301,7 +301,6 @@
 	printk("check = %c\n", opt.check);
 	printk("cruft = %c\n", opt.cruft);
 	printk("unhide = %c\n", opt.unhide);
-	printk("conversion = %c\n", opt.conversion);
 	printk("blocksize = %d\n", opt.blocksize);
 	printk("gid = %d\n", opt.gid);
 	printk("uid = %d\n", opt.uid);
@@ -571,7 +570,6 @@
 	s->u.isofs_sb.s_mapping = opt.map;
 	s->u.isofs_sb.s_rock = (opt.rock == 'y' ? 2 : 0);
 	s->u.isofs_sb.s_name_check = opt.check;
-	s->u.isofs_sb.s_conversion = opt.conversion;
 	s->u.isofs_sb.s_cruft = opt.cruft;
 	s->u.isofs_sb.s_unhide = opt.unhide;
 	s->u.isofs_sb.s_uid = opt.uid;
@@ -798,21 +796,6 @@
 	inode->u.isofs_i.i_first_extent = (isonum_733 (raw_inode->extent) +
 					   isonum_711 (raw_inode->ext_attr_length))
 	  << inode -> i_sb -> u.isofs_sb.s_log_zone_size;
-
-	switch (inode->i_sb->u.isofs_sb.s_conversion){
-	case 'a':
-	  inode->u.isofs_i.i_file_format = ISOFS_FILE_UNKNOWN; /* File type */
-	  break;
-	case 'b':
-	  inode->u.isofs_i.i_file_format = ISOFS_FILE_BINARY; /* File type */
-	  break;
-	case 't':
-	  inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT; /* File type */
-	  break;
-	case 'm':
-	  inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT_M; /* File type */
-	  break;
-	}
 
 /* Now test for possible Rock Ridge extensions which will override some of
    these numbers in the inode structure. */
diff -u --recursive --new-file v2.1.85/linux/fs/minix/namei.c linux/fs/minix/namei.c
--- v2.1.85/linux/fs/minix/namei.c	Tue Jan  6 12:26:59 1998
+++ linux/fs/minix/namei.c	Wed Feb  4 11:08:53 1998
@@ -599,24 +599,6 @@
 	return 0;
 }
 
-static int subdir(struct dentry * new_dentry, struct dentry * old_dentry)
-{
-	int result = 0;
-
-	for (;;) {
-		if (new_dentry != old_dentry) {
-			struct dentry * parent = new_dentry->d_parent;
-			if (parent == new_dentry)
-				break;
-			new_dentry = parent;
-			continue;
-		}
-		result = 1;
-		break;
-	}
-	return result;
-}
-
 #define PARENT_INO(buffer) \
 (((struct minix_dir_entry *) ((buffer)+info->s_dirsize))->inode)
 
@@ -679,7 +661,7 @@
 		if (!S_ISDIR(old_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		retval = -ENOTEMPTY;
 		if (!empty_dir(new_inode))
@@ -698,7 +680,7 @@
 		if (new_inode && !S_ISDIR(new_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		retval = -EIO;
 		dir_bh = minix_bread(old_inode,0,0);
diff -u --recursive --new-file v2.1.85/linux/fs/nfsd/export.c linux/fs/nfsd/export.c
--- v2.1.85/linux/fs/nfsd/export.c	Fri Jan 23 18:10:32 1998
+++ linux/fs/nfsd/export.c	Mon Feb  9 10:54:23 1998
@@ -616,26 +616,28 @@
 	svc_client	**clpp, *clp;
 	int		err;
 
+	err = -EINVAL;
 	if (!exp_verify_string(ncp->cl_ident, NFSCLNT_IDMAX))
-		return -EINVAL;
+		goto out;
 
 	/* Lock the hashtable */
 	if ((err = exp_writelock()) < 0)
-		return err;
+		goto out;
 
+	err = -EINVAL;
 	for (clpp = &clients; (clp = *clpp); clpp = &(clp->cl_next))
 		if (!strcmp(ncp->cl_ident, clp->cl_ident))
 			break;
 
-	if (!clp) {
-		exp_unlock();
-		return -EINVAL;
+	if (clp) {
+		*clpp = clp->cl_next;
+		exp_freeclient(clp);
+		err = 0;
 	}
-	*clpp = clp->cl_next;
-	exp_freeclient(clp);
 
 	exp_unlock();
-	return 0;
+out:
+	return err;
 }
 
 /*
@@ -750,6 +752,8 @@
 		while (clnt_hash[i])
 			exp_freeclient(clnt_hash[i]->h_client);
 	}
+	clients = NULL; /* we may be restarted before the module unloads */
+	
 	exp_unlock();
 	dprintk("nfsd: export shutdown complete.\n");
 }
diff -u --recursive --new-file v2.1.85/linux/fs/sysv/CHANGES linux/fs/sysv/CHANGES
--- v2.1.85/linux/fs/sysv/CHANGES	Wed Feb  4 11:36:01 1998
+++ linux/fs/sysv/CHANGES	Wed Feb  4 11:08:53 1998
@@ -10,7 +10,11 @@
 
 Tue Jan 27 1998   Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
         *    inode.c: added 2048-byte block support to SystemV FS.
-		      Merged detected_bs[512,1024,2048] into one function:
+		      Merged detected_bs[512,1024,2048]() into one function:
 		      void detected_bs (u_char type, struct super_block *sb).
 		      Thanks to Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
 		      for the patch.
+
+Wed Feb  4 1998   Krzysztof G. Baranowski <kgb@manjak.knm.org.pl>
+	*    namei.c: removed static subdir(); is_subdir() from dcache.c
+		      is used instead. Cosmetic changes.
diff -u --recursive --new-file v2.1.85/linux/fs/sysv/namei.c linux/fs/sysv/namei.c
--- v2.1.85/linux/fs/sysv/namei.c	Wed Feb  4 11:36:01 1998
+++ linux/fs/sysv/namei.c	Wed Feb  4 11:08:53 1998
@@ -47,7 +47,7 @@
 	/* "" means "." ---> so paths like "/usr/lib//libc.a" work */
 	if (!len && (de->name[0]=='.') && (de->name[1]=='\0'))
 		return 1;
-	return namecompare(len,SYSV_NAMELEN,name,de->name);
+	return namecompare(len, SYSV_NAMELEN, name, de->name);
 }
 
 /*
@@ -78,7 +78,7 @@
 	pos = block = offset = 0;
 	while (pos < dir->i_size) {
 		if (!bh) {
-			bh = sysv_file_bread(dir,block,0);
+			bh = sysv_file_bread(dir, block, 0);
 			if (!bh) {
 				/* offset = 0; */ block++;
 				pos += sb->sv_block_size;
@@ -117,7 +117,7 @@
 	if (bh) {
 		int ino = de->inode;
 		brelse(bh);
-		inode = iget(dir->i_sb,ino);
+		inode = iget(dir->i_sb, ino);
 	
 		if (!inode) 
 			return -EACCES;
@@ -163,7 +163,7 @@
 	pos = block = offset = 0;
 	while (1) {
 		if (!bh) {
-			bh = sysv_file_bread(dir,block,1);
+			bh = sysv_file_bread(dir, block, 1);
 			if (!bh)
 				return -ENOSPC;
 		}
@@ -214,7 +214,7 @@
 	inode->i_op = &sysv_file_inode_operations;
 	inode->i_mode = mode;
 	mark_inode_dirty(inode);
-	error = sysv_add_entry(dir,dentry->d_name.name,
+	error = sysv_add_entry(dir, dentry->d_name.name,
 			       dentry->d_name.len, &bh, &de);
 	if (error) {
 		inode->i_nlink--;
@@ -238,8 +238,8 @@
 
 	if (!dir)
 		return -ENOENT;
-	bh = sysv_find_entry(dir,dentry->d_name.name,
-			     dentry->d_name.len,&de);
+	bh = sysv_find_entry(dir, dentry->d_name.name,
+			     dentry->d_name.len, &de);
 	if (bh) {
 		brelse(bh);
 		return -EEXIST;
@@ -268,7 +268,8 @@
 	if (S_ISBLK(mode) || S_ISCHR(mode))
 		inode->i_rdev = to_kdev_t(rdev);
 	mark_inode_dirty(inode);
-	error = sysv_add_entry(dir, dentry->d_name.name, dentry->d_name.len, &bh, &de);
+	error = sysv_add_entry(dir, dentry->d_name.name, 
+			       dentry->d_name.len, &bh, &de);
 	if (error) {
 		inode->i_nlink--;
 		mark_inode_dirty(inode);
@@ -359,7 +360,7 @@
 		goto bad_dir;
 	if (inode->i_size < pos)
 		goto bad_dir;
-	bh = sysv_file_bread(inode,0,0);
+	bh = sysv_file_bread(inode, 0, 0);
 	if (!bh)
 		goto bad_dir;
 	de = (struct sysv_dir_entry *) (bh->b_data + 0*SYSV_DIRSIZE);
@@ -371,7 +372,7 @@
 	sb = inode->i_sb;
 	while (pos < inode->i_size) {
 		if (!bh) {
-			bh = sysv_file_bread(inode,block,0);
+			bh = sysv_file_bread(inode, block, 0);
 			if (!bh) {
 				/* offset = 0; */ block++;
 				pos += sb->sv_block_size;
@@ -441,7 +442,7 @@
 		goto end_rmdir;
 	}
 	if (inode->i_nlink != 2)
-		printk("empty directory has nlink!=2 (%d)\n",inode->i_nlink);
+		printk("empty directory has nlink!=2 (%d)\n", inode->i_nlink);
 	de->inode = 0;
 	mark_buffer_dirty(bh, 1);
 	inode->i_nlink=0;
@@ -491,8 +492,7 @@
 	}
 	if (!inode->i_nlink) {
 		printk("Deleting nonexistent file (%s:%lu), %d\n",
-		        kdevname(inode->i_dev),
-		       inode->i_ino, inode->i_nlink);
+		        kdevname(inode->i_dev), inode->i_ino, inode->i_nlink);
 		inode->i_nlink=1;
 	}
 	de->inode = 0;
@@ -526,7 +526,7 @@
 
 	inode->i_mode = S_IFLNK | 0777;
 	inode->i_op = &sysv_symlink_inode_operations;
-	name_block = sysv_file_bread(inode,0,1);
+	name_block = sysv_file_bread(inode, 0, 1);
 	if (!name_block) {
 		inode->i_nlink--;
 		mark_inode_dirty(inode);
@@ -603,25 +603,6 @@
 	return 0;
 }
 
-/* return 1 if `new' is a subdir of `old' on the same device */
-static int subdir(struct dentry * new_dentry, struct dentry * old_dentry)
-{
-	int result = 0;
-	
-        for (;;) {
-                if (new_dentry != old_dentry) {
-                        struct dentry * parent = new_dentry->d_parent;
-                        if (parent == new_dentry)
-                                break;
-                        new_dentry = parent;
-                        continue;
-                }
-                result = 1;
-                break;
-        }
-        return result;
-}
-
 #define PARENT_INO(buffer) \
 (((struct sysv_dir_entry *) ((buffer) + 1*SYSV_DIRSIZE))->inode)
 
@@ -653,20 +634,20 @@
 start_up:
 	old_inode = new_inode = NULL;
 	old_bh = new_bh = dir_bh = NULL;
-	old_bh = sysv_find_entry(old_dir,old_dentry->d_name.name,
-				old_dentry->d_name.len,&old_de);
+	old_bh = sysv_find_entry(old_dir, old_dentry->d_name.name,
+				old_dentry->d_name.len, &old_de);
 	retval = -ENOENT;
 	if (!old_bh)
 		goto end_rename;
-	old_inode = old_dentry->d_inode;/* don't cross mnt-points */
+	old_inode = old_dentry->d_inode;	/* don't cross mnt-points */
 	retval = -EPERM;
 	if ((old_dir->i_mode & S_ISVTX) && 
 	    current->fsuid != old_inode->i_uid &&
 	    current->fsuid != old_dir->i_uid && !fsuser())
 		goto end_rename;
 	new_inode = new_dentry->d_inode;
-	new_bh = sysv_find_entry(new_dir,new_dentry->d_name.name,
-				new_dentry->d_name.len,&new_de);
+	new_bh = sysv_find_entry(new_dir, new_dentry->d_name.name,
+				new_dentry->d_name.len, &new_de);
 	if (new_bh) {
 		if (!new_inode) {
 			brelse(new_bh);
@@ -682,7 +663,7 @@
 		if (!S_ISDIR(old_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		retval = -ENOTEMPTY;
 		if (!empty_dir(new_inode))
@@ -701,10 +682,10 @@
 		if (new_inode && !S_ISDIR(new_inode->i_mode))
 			goto end_rename;
 		retval = -EINVAL;
-		if (subdir(new_dentry, old_dentry))
+		if (is_subdir(new_dentry, old_dentry))
 			goto end_rename;
 		retval = -EIO;
-		dir_bh = sysv_file_bread(old_inode,0,0);
+		dir_bh = sysv_file_bread(old_inode, 0, 0);
 		if (!dir_bh)
 			goto end_rename;
 		if (PARENT_INO(dir_bh->b_data) != old_dir->i_ino)
@@ -714,8 +695,8 @@
 			goto end_rename;
 	}
 	if (!new_bh) {
-		retval = sysv_add_entry(new_dir,new_dentry->d_name.name,
-					new_dentry->d_name.len,&new_bh,&new_de);
+		retval = sysv_add_entry(new_dir, new_dentry->d_name.name,
+					new_dentry->d_name.len, &new_bh, &new_de);
 		if (retval)
 			goto end_rename;
 	}
diff -u --recursive --new-file v2.1.85/linux/include/asm-alpha/a.out.h linux/include/asm-alpha/a.out.h
--- v2.1.85/linux/include/asm-alpha/a.out.h	Thu Nov  9 00:04:33 1995
+++ linux/include/asm-alpha/a.out.h	Fri Feb  6 10:06:55 1998
@@ -90,7 +90,8 @@
 
 #ifdef __KERNEL__
 
-#define STACK_TOP (0x00120000000UL)
+#define STACK_TOP \
+  ((current->personality==PER_LINUX_32BIT) ? (0x80000000) : (0x00120000000UL))
 
 #endif
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-alpha/elf.h linux/include/asm-alpha/elf.h
--- v2.1.85/linux/include/asm-alpha/elf.h	Mon Jan 12 14:52:46 1998
+++ linux/include/asm-alpha/elf.h	Fri Feb  6 10:06:55 1998
@@ -1,5 +1,5 @@
-#ifndef __ASMaxp_ELF_H
-#define __ASMaxp_ELF_H
+#ifndef __ASM_ALPHA_ELF_H
+#define __ASM_ALPHA_ELF_H
 
 /*
  * ELF register definitions..
@@ -39,7 +39,7 @@
    the loader.  We need to make sure that it is out of the way of the program
    that it will "exec", and that there is sufficient room for the brk.  */
 
-#define ELF_ET_DYN_BASE		(2 * TASK_SIZE / 3)
+#define ELF_ET_DYN_BASE		(TASK_UNMAPPED_BASE + 0x1000000)
 
 /* $0 is set by ld.so to a pointer to a function which might be 
    registered using atexit.  This provides a mean for the dynamic
@@ -126,8 +126,10 @@
 })
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2) \
-	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
+#define SET_PERSONALITY(EX, IBCS2)				\
+	current->personality =					\
+	  ((EX).e_flags & EF_ALPHA_32BIT			\
+	   ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
 #endif
 
 #endif
diff -u --recursive --new-file v2.1.85/linux/include/asm-alpha/processor.h linux/include/asm-alpha/processor.h
--- v2.1.85/linux/include/asm-alpha/processor.h	Thu Jan 15 20:48:33 1998
+++ linux/include/asm-alpha/processor.h	Fri Feb  6 10:06:55 1998
@@ -15,7 +15,8 @@
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
  */
-#define TASK_UNMAPPED_BASE	(TASK_SIZE / 3)
+#define TASK_UNMAPPED_BASE \
+  ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2)
 
 /*
  * Bus types
diff -u --recursive --new-file v2.1.85/linux/include/asm-alpha/signal.h linux/include/asm-alpha/signal.h
--- v2.1.85/linux/include/asm-alpha/signal.h	Tue Dec  9 09:31:19 1997
+++ linux/include/asm-alpha/signal.h	Fri Feb  6 10:06:55 1998
@@ -145,10 +145,17 @@
 /* Here we must cater to libcs that poke about in kernel headers.  */
 
 struct sigaction {
-	__sighandler_t	sa_handler;
+	union {
+	  __sighandler_t	_sa_handler;
+	  void (*_sa_sigaction)(int, struct siginfo *, void *);
+	} _u;
 	sigset_t	sa_mask;
 	int		sa_flags;
 };
+
+#define sa_handler	_u._sa_handler
+#define sa_sigaction	_u._sa_sigaction
+
 #endif /* __KERNEL__ */
 
 typedef struct sigaltstack {
diff -u --recursive --new-file v2.1.85/linux/include/asm-alpha/unistd.h linux/include/asm-alpha/unistd.h
--- v2.1.85/linux/include/asm-alpha/unistd.h	Fri Jan 30 11:28:09 1998
+++ linux/include/asm-alpha/unistd.h	Fri Feb  6 10:06:55 1998
@@ -8,7 +8,7 @@
 #define __NR_write		  4
 #define __NR_osf_old_open	  5	/* not implemented */
 #define __NR_close		  6
-#define __NR_wait4		  7
+#define __NR_osf_wait4		  7
 #define __NR_osf_old_creat	  8	/* not implemented */
 #define __NR_link		  9
 #define __NR_unlink		 10
@@ -84,17 +84,17 @@
 #define __NR_setgroups		 80
 #define __NR_osf_old_getpgrp	 81	/* not implemented */
 #define __NR_setpgrp		 82	/* BSD alias for setpgid */
-#define __NR_setitimer		 83
+#define __NR_osf_setitimer	 83
 #define __NR_osf_old_wait	 84	/* not implemented */
 #define __NR_osf_table		 85	/* not implemented */
-#define __NR_getitimer		 86
+#define __NR_osf_getitimer	 86
 #define __NR_gethostname	 87
 #define __NR_sethostname	 88
 #define __NR_getdtablesize	 89
 #define __NR_dup2		 90
 #define __NR_fstat		 91
 #define __NR_fcntl		 92
-#define __NR_select		 93
+#define __NR_osf_select		 93
 #define __NR_poll		 94
 #define __NR_fsync		 95
 #define __NR_setpriority	 96
@@ -117,13 +117,13 @@
 #define __NR_recvmsg		113
 #define __NR_sendmsg		114
 #define __NR_osf_old_vtrace	115	/* not implemented */
-#define __NR_gettimeofday	116
-#define __NR_getrusage		117
+#define __NR_osf_gettimeofday	116
+#define __NR_osf_getrusage	117
 #define __NR_getsockopt		118
 
 #define __NR_readv		120
 #define __NR_writev		121
-#define __NR_settimeofday	122
+#define __NR_osf_settimeofday	122
 #define __NR_fchown		123
 #define __NR_fchmod		124
 #define __NR_recvfrom		125
@@ -139,7 +139,7 @@
 #define __NR_socketpair		135
 #define __NR_mkdir		136
 #define __NR_rmdir		137
-#define __NR_utimes		138
+#define __NR_osf_utimes		138
 #define __NR_osf_old_sigreturn	139	/* not implemented */
 #define __NR_osf_adjtime	140	/* not implemented */
 #define __NR_getpeername	141
@@ -295,6 +295,15 @@
 #define __NR_rt_sigtimedwait		355
 #define __NR_rt_sigqueueinfo		356
 #define __NR_rt_sigsuspend		357
+#define __NR_select			358
+#define __NR_gettimeofday		359
+#define __NR_settimeofday		360
+#define __NR_getitimer			361
+#define __NR_setitimer			362
+#define __NR_utimes			363
+#define __NR_getrusage			364
+#define __NR_wait4			365
+
 
 
 #if defined(__LIBRARY__) && defined(__GNUC__)
diff -u --recursive --new-file v2.1.85/linux/include/asm-i386/elf.h linux/include/asm-i386/elf.h
--- v2.1.85/linux/include/asm-i386/elf.h	Mon Jan 12 14:52:46 1998
+++ linux/include/asm-i386/elf.h	Fri Feb  6 10:06:55 1998
@@ -86,7 +86,7 @@
 #define ELF_PLATFORM  ("i386\0i486\0i586\0i686"+((boot_cpu_data.x86-3)*5))
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2) \
+#define SET_PERSONALITY(ex, ibcs2) \
 	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
 #endif
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-i386/semaphore.h linux/include/asm-i386/semaphore.h
--- v2.1.85/linux/include/asm-i386/semaphore.h	Tue Jan 20 16:51:56 1998
+++ linux/include/asm-i386/semaphore.h	Tue Feb 10 12:47:26 1998
@@ -21,6 +21,7 @@
 
 #include <asm/system.h>
 #include <asm/atomic.h>
+#include <asm/spinlock.h>
 
 struct semaphore {
 	atomic_t count;
@@ -38,6 +39,8 @@
 extern void __down(struct semaphore * sem);
 extern void __up(struct semaphore * sem);
 
+extern spinlock_t semaphore_wake_lock;
+
 #define sema_init(sem, val)	atomic_set(&((sem)->count), (val))
 
 /*
@@ -55,10 +58,9 @@
 {
 	unsigned long flags;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&semaphore_wake_lock, flags);
 	sem->waking++;
-	restore_flags(flags);
+	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
 }
 
 static inline int waking_non_zero(struct semaphore *sem)
@@ -66,13 +68,12 @@
 	unsigned long flags;
 	int ret = 0;
 
-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&semaphore_wake_lock, flags);
 	if (sem->waking > 0) {
 		sem->waking--;
 		ret = 1;
 	}
-	restore_flags(flags);
+	spin_unlock_irqrestore(&semaphore_wake_lock, flags);
 	return ret;
 }
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-i386/signal.h linux/include/asm-i386/signal.h
--- v2.1.85/linux/include/asm-i386/signal.h	Fri Feb  6 15:32:54 1998
+++ linux/include/asm-i386/signal.h	Fri Feb  6 10:06:56 1998
@@ -144,11 +144,18 @@
 /* Here we must cater to libcs that poke about in kernel headers.  */
 
 struct sigaction {
-	__sighandler_t sa_handler;
+	union {
+	  __sighandler_t _sa_handler;
+	  void (*_sa_sigaction)(int, struct siginfo *, void *);
+	} _u;
 	sigset_t sa_mask;
 	unsigned long sa_flags;
 	void (*sa_restorer)(void);
 };
+
+#define sa_handler	_u._sa_handler
+#define sa_sigaction	_u._sa_sigaction
+
 #endif /* __KERNEL__ */
 
 typedef struct sigaltstack {
diff -u --recursive --new-file v2.1.85/linux/include/asm-i386/system.h linux/include/asm-i386/system.h
--- v2.1.85/linux/include/asm-i386/system.h	Mon Dec 15 18:37:15 1997
+++ linux/include/asm-i386/system.h	Mon Feb  9 17:51:19 1998
@@ -11,13 +11,18 @@
  *   3 - kernel data segment
  *   4 - user code segment
  *   5 - user data segment
- * ...
- *   8 - TSS #0
- *   9 - LDT #0
- *  10 - TSS #1
- *  11 - LDT #1
+ *   6 - not used
+ *   7 - not used
+ *   8 - APM BIOS support
+ *   9 - APM BIOS support
+ *  10 - APM BIOS support
+ *  11 - APM BIOS support
+ *  12 - TSS #0
+ *  13 - LDT #0
+ *  14 - TSS #1
+ *  15 - LDT #1
  */
-#define FIRST_TSS_ENTRY 8
+#define FIRST_TSS_ENTRY 12
 #define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1)
 #define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3))
 #define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3))
diff -u --recursive --new-file v2.1.85/linux/include/asm-i386/unistd.h linux/include/asm-i386/unistd.h
--- v2.1.85/linux/include/asm-i386/unistd.h	Fri Jan 23 18:10:32 1998
+++ linux/include/asm-i386/unistd.h	Mon Feb  9 11:27:27 1998
@@ -21,7 +21,7 @@
 #define __NR_time		 13
 #define __NR_mknod		 14
 #define __NR_chmod		 15
-#define __NR_chown		 16
+#define __NR_lchown		 16
 #define __NR_break		 17
 #define __NR_oldstat		 18
 #define __NR_lseek		 19
@@ -187,7 +187,7 @@
 #define __NR_rt_sigsuspend	179
 #define __NR_pread		180
 #define __NR_pwrite		181
-#define __NR_lchown		182
+#define __NR_chown		182
 
 /* user-visible error numbers are in the range -1 - -122: see <asm-i386/errno.h> */
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-m68k/elf.h linux/include/asm-m68k/elf.h
--- v2.1.85/linux/include/asm-m68k/elf.h	Mon Jan 12 14:52:46 1998
+++ linux/include/asm-m68k/elf.h	Fri Feb  6 10:06:56 1998
@@ -80,7 +80,7 @@
 #define ELF_PLATFORM  (NULL)
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2) \
+#define SET_PERSONALITY(ex, ibcs2) \
 	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
 #endif
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-ppc/elf.h linux/include/asm-ppc/elf.h
--- v2.1.85/linux/include/asm-ppc/elf.h	Mon Jan 12 15:18:13 1998
+++ linux/include/asm-ppc/elf.h	Fri Feb  6 10:06:56 1998
@@ -75,7 +75,7 @@
 #define ELF_PLATFORM	(NULL)
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2) \
+#define SET_PERSONALITY(ex, ibcs2) \
 	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
 #endif
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-sparc/elf.h linux/include/asm-sparc/elf.h
--- v2.1.85/linux/include/asm-sparc/elf.h	Mon Jan 12 14:52:46 1998
+++ linux/include/asm-sparc/elf.h	Fri Feb  6 10:06:56 1998
@@ -60,7 +60,7 @@
 #define ELF_PLATFORM	(NULL)
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2) \
+#define SET_PERSONALITY(ex, ibcs2) \
 	current->personality = (ibcs2 ? PER_SVR4 : PER_LINUX)
 #endif
 
diff -u --recursive --new-file v2.1.85/linux/include/asm-sparc64/elf.h linux/include/asm-sparc64/elf.h
--- v2.1.85/linux/include/asm-sparc64/elf.h	Mon Jan 12 14:52:46 1998
+++ linux/include/asm-sparc64/elf.h	Fri Feb  6 10:06:56 1998
@@ -25,10 +25,6 @@
 #define ELF_DATA		ELFDATA2MSB
 #endif
 
-#ifndef ELF_FLAGS_INIT
-#define ELF_FLAGS_INIT current->tss.flags &= ~SPARC_FLAG_32BIT
-#endif
-
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
@@ -63,8 +59,13 @@
 #define ELF_PLATFORM	(NULL)
 
 #ifdef __KERNEL__
-#define SET_PERSONALITY(ibcs2)					\
+#define SET_PERSONALITY(ex, ibcs2)				\
 do {								\
+	if ((ex).e_ident[EI_CLASS] == ELFCLASS32)		\
+		current->tss.flags |= SPARC_FLAG_32BIT;		\
+	else							\
+		current->tss.flags &= ~SPARC_FLAG_32BIT;	\
+								\
 	if (ibcs2)						\
 		current->personality = PER_SVR4;		\
 	else if (current->personality != PER_LINUX32)		\
diff -u --recursive --new-file v2.1.85/linux/include/linux/apm_bios.h linux/include/linux/apm_bios.h
--- v2.1.85/linux/include/linux/apm_bios.h	Fri Feb  6 15:33:19 1998
+++ linux/include/linux/apm_bios.h	Mon Feb  9 17:51:19 1998
@@ -22,10 +22,8 @@
 
 #ifdef __KERNEL__
 
-#include <linux/tasks.h>	/* for NR_TASKS */
-#include <linux/sched.h>	/* for _TSS */
-
-#define APM_CS		_TSS(NR_TASKS)
+#define APM_40		0x40
+#define APM_CS		(APM_40 + 8)
 #define APM_CS_16	(APM_CS + 8)
 #define APM_DS		(APM_CS_16 + 8)
 
diff -u --recursive --new-file v2.1.85/linux/include/linux/cd1400.h linux/include/linux/cd1400.h
--- v2.1.85/linux/include/linux/cd1400.h	Mon Mar 17 14:54:34 1997
+++ linux/include/linux/cd1400.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	cd1400.h  -- cd1400 UART hardware info.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.1.85/linux/include/linux/cdk.h linux/include/linux/cdk.h
--- v2.1.85/linux/include/linux/cdk.h	Fri Dec 19 12:30:54 1997
+++ linux/include/linux/cdk.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	cdk.h  -- CDK interface definitions.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.1.85/linux/include/linux/comstats.h linux/include/linux/comstats.h
--- v2.1.85/linux/include/linux/comstats.h	Mon Mar 17 14:54:34 1997
+++ linux/include/linux/comstats.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	comstats.h  -- Serial Port Stats.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.1.85/linux/include/linux/ctype.h linux/include/linux/ctype.h
--- v2.1.85/linux/include/linux/ctype.h	Sat Nov 23 02:29:04 1996
+++ linux/include/linux/ctype.h	Mon Feb  9 16:12:56 1998
@@ -2,7 +2,7 @@
 #define _LINUX_CTYPE_H
 
 /*
- * NOTE! This ctype does not handle EOF like the standarc C
+ * NOTE! This ctype does not handle EOF like the standard C
  * library is required to.
  */
 
diff -u --recursive --new-file v2.1.85/linux/include/linux/elf.h linux/include/linux/elf.h
--- v2.1.85/linux/include/linux/elf.h	Fri Feb  6 15:34:51 1998
+++ linux/include/linux/elf.h	Fri Feb  6 10:06:56 1998
@@ -239,6 +239,43 @@
 #define R_68K_JMP_SLOT	21
 #define R_68K_RELATIVE	22
 
+/*
+ * Alpha ELF relocation types
+ */
+#define R_ALPHA_NONE            0       /* No reloc */
+#define R_ALPHA_REFLONG         1       /* Direct 32 bit */
+#define R_ALPHA_REFQUAD         2       /* Direct 64 bit */
+#define R_ALPHA_GPREL32         3       /* GP relative 32 bit */
+#define R_ALPHA_LITERAL         4       /* GP relative 16 bit w/optimization */
+#define R_ALPHA_LITUSE          5       /* Optimization hint for LITERAL */
+#define R_ALPHA_GPDISP          6       /* Add displacement to GP */
+#define R_ALPHA_BRADDR          7       /* PC+4 relative 23 bit shifted */
+#define R_ALPHA_HINT            8       /* PC+4 relative 16 bit shifted */
+#define R_ALPHA_SREL16          9       /* PC relative 16 bit */
+#define R_ALPHA_SREL32          10      /* PC relative 32 bit */
+#define R_ALPHA_SREL64          11      /* PC relative 64 bit */
+#define R_ALPHA_OP_PUSH         12      /* OP stack push */
+#define R_ALPHA_OP_STORE        13      /* OP stack pop and store */
+#define R_ALPHA_OP_PSUB         14      /* OP stack subtract */
+#define R_ALPHA_OP_PRSHIFT      15      /* OP stack right shift */
+#define R_ALPHA_GPVALUE         16
+#define R_ALPHA_GPRELHIGH       17
+#define R_ALPHA_GPRELLOW        18
+#define R_ALPHA_IMMED_GP_16     19
+#define R_ALPHA_IMMED_GP_HI32   20
+#define R_ALPHA_IMMED_SCN_HI32  21
+#define R_ALPHA_IMMED_BR_HI32   22
+#define R_ALPHA_IMMED_LO32      23
+#define R_ALPHA_COPY            24      /* Copy symbol at runtime */
+#define R_ALPHA_GLOB_DAT        25      /* Create GOT entry */
+#define R_ALPHA_JMP_SLOT        26      /* Create PLT entry */
+#define R_ALPHA_RELATIVE        27      /* Adjust by program base */
+
+/* Legal values for e_flags field of Elf64_Ehdr.  */
+
+#define EF_ALPHA_32BIT		1	/* All addresses are below 2GB */
+
+
 typedef struct elf32_rel {
   Elf32_Addr	r_offset;
   Elf32_Word	r_info;
diff -u --recursive --new-file v2.1.85/linux/include/linux/fs.h linux/include/linux/fs.h
--- v2.1.85/linux/include/linux/fs.h	Fri Feb  6 15:32:54 1998
+++ linux/include/linux/fs.h	Tue Feb 10 13:32:24 1998
@@ -125,9 +125,6 @@
 #define IS_NOATIME(inode) ((inode)->i_flags & MS_NOATIME)
 #define IS_NODIRATIME(inode) ((inode)->i_flags & MS_NODIRATIME)
 
-extern void update_atime (struct inode *inode);
-#define UPDATE_ATIME(inode) update_atime (inode)
-
 /* the read-only stuff doesn't really belong here, but any other place is
    probably as bad and I don't want to create yet another include file. */
 
@@ -153,6 +150,9 @@
 #include <asm/byteorder.h>
 #include <asm/bitops.h>
 
+extern void update_atime (struct inode *inode);
+#define UPDATE_ATIME(inode) update_atime (inode)
+
 extern void buffer_init(void);
 extern void inode_init(void);
 extern void file_table_init(void);
@@ -612,6 +612,7 @@
 	void (*write_super) (struct super_block *);
 	int (*statfs) (struct super_block *, struct statfs *, int);
 	int (*remount_fs) (struct super_block *, int *, char *);
+	void (*clear_inode) (struct inode *);
 };
 
 struct dquot_operations {
diff -u --recursive --new-file v2.1.85/linux/include/linux/iso_fs.h linux/include/linux/iso_fs.h
--- v2.1.85/linux/include/linux/iso_fs.h	Fri Feb  6 15:34:15 1998
+++ linux/include/linux/iso_fs.h	Mon Feb  9 16:12:56 1998
@@ -163,10 +163,6 @@
 #define ISOFS_ZONE_BITS(INODE)   ((INODE)->i_sb->u.isofs_sb.s_log_zone_size)
 
 #define ISOFS_SUPER_MAGIC 0x9660
-#define ISOFS_FILE_UNKNOWN 0
-#define ISOFS_FILE_TEXT 1
-#define ISOFS_FILE_BINARY 2
-#define ISOFS_FILE_TEXT_M 3
 
 #ifdef __KERNEL__
 extern int isonum_711(char *);
diff -u --recursive --new-file v2.1.85/linux/include/linux/iso_fs_i.h linux/include/linux/iso_fs_i.h
--- v2.1.85/linux/include/linux/iso_fs_i.h	Wed Jul 16 10:26:21 1997
+++ linux/include/linux/iso_fs_i.h	Mon Feb  9 16:12:56 1998
@@ -6,7 +6,6 @@
  */
 struct iso_inode_info {
 	unsigned int i_first_extent;
-	unsigned char i_file_format;
 };
 
 #endif
diff -u --recursive --new-file v2.1.85/linux/include/linux/iso_fs_sb.h linux/include/linux/iso_fs_sb.h
--- v2.1.85/linux/include/linux/iso_fs_sb.h	Thu Oct 23 14:00:15 1997
+++ linux/include/linux/iso_fs_sb.h	Mon Feb  9 16:12:56 1998
@@ -13,7 +13,6 @@
 	
 	unsigned char s_high_sierra; /* A simple flag */
 	unsigned char s_mapping;
-	unsigned char s_conversion;
 	unsigned char s_rock;
 	unsigned char s_joliet_level;
 	unsigned char s_utf8;
diff -u --recursive --new-file v2.1.85/linux/include/linux/istallion.h linux/include/linux/istallion.h
--- v2.1.85/linux/include/linux/istallion.h	Mon Mar 17 14:54:34 1997
+++ linux/include/linux/istallion.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	istallion.h  -- stallion intelligent multiport serial driver.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This program is free software; you can redistribute it and/or modify
@@ -102,6 +102,7 @@
 	int		nrports;
 	int		nrdevs;
 	unsigned int	iobase;
+	int		iosize;
 	unsigned long	memaddr;
 	void		*membase;
 	int		memsize;
diff -u --recursive --new-file v2.1.85/linux/include/linux/lp.h linux/include/linux/lp.h
--- v2.1.85/linux/include/linux/lp.h	Fri Jan 30 11:28:10 1998
+++ linux/include/linux/lp.h	Mon Feb  9 11:33:11 1998
@@ -8,9 +8,10 @@
  */
 
 /* Magic numbers for defining port-device mappings */
+#define LP_PARPORT_UNSPEC -4
 #define LP_PARPORT_AUTO -3
 #define LP_PARPORT_OFF -2
-#define LP_PARPORT_UNSPEC -1
+#define LP_PARPORT_NONE -1
 
 /*
  * Per POSIX guidelines, this module reserves the LP and lp prefixes
diff -u --recursive --new-file v2.1.85/linux/include/linux/module.h linux/include/linux/module.h
--- v2.1.85/linux/include/linux/module.h	Fri Feb  6 15:32:54 1998
+++ linux/include/linux/module.h	Tue Feb 10 13:32:25 1998
@@ -94,6 +94,7 @@
 #define MOD_AUTOCLEAN		4
 #define MOD_VISITED  		8
 #define MOD_USED_ONCE		16
+#define MOD_JUST_FREED		32
 
 /* Values for query_module's which.  */
 
diff -u --recursive --new-file v2.1.85/linux/include/linux/personality.h linux/include/linux/personality.h
--- v2.1.85/linux/include/linux/personality.h	Tue Jan 20 16:51:56 1998
+++ linux/include/linux/personality.h	Fri Feb  6 10:06:56 1998
@@ -8,12 +8,14 @@
 /* Flags for bug emulation. These occupy the top three bytes. */
 #define STICKY_TIMEOUTS		0x4000000
 #define WHOLE_SECONDS		0x2000000
+#define ADDR_LIMIT_32BIT	0x0800000
 
 /* Personality types. These go in the low byte. Avoid using the top bit,
  * it will conflict with error returns.
  */
 #define PER_MASK		(0x00ff)
 #define PER_LINUX		(0x0000)
+#define PER_LINUX_32BIT		(0x0000 | ADDR_LIMIT_32BIT)
 #define PER_SVR4		(0x0001 | STICKY_TIMEOUTS)
 #define PER_SVR3		(0x0002 | STICKY_TIMEOUTS)
 #define PER_SCOSVR3		(0x0003 | STICKY_TIMEOUTS | WHOLE_SECONDS)
diff -u --recursive --new-file v2.1.85/linux/include/linux/sc26198.h linux/include/linux/sc26198.h
--- v2.1.85/linux/include/linux/sc26198.h	Fri Dec 19 12:30:54 1997
+++ linux/include/linux/sc26198.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	sc26198.h  -- SC26198 UART hardware info.
  *
- *	Copyright (C) 1995-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1995-1998  Stallion Technologies (support@stallion.oz.au).
  *
  *	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
diff -u --recursive --new-file v2.1.85/linux/include/linux/sched.h linux/include/linux/sched.h
--- v2.1.85/linux/include/linux/sched.h	Fri Feb  6 15:32:54 1998
+++ linux/include/linux/sched.h	Tue Feb 10 13:32:24 1998
@@ -75,9 +75,9 @@
 #define TASK_RUNNING		0
 #define TASK_INTERRUPTIBLE	1
 #define TASK_UNINTERRUPTIBLE	2
-#define TASK_ZOMBIE		3
-#define TASK_STOPPED		4
-#define TASK_SWAPPING		5
+#define TASK_ZOMBIE		4
+#define TASK_STOPPED		8
+#define TASK_SWAPPING		16
 
 /*
  * Scheduling policies
@@ -448,11 +448,13 @@
 
 #define CURRENT_TIME (xtime.tv_sec)
 
+extern void FASTCALL(__wake_up(struct wait_queue ** p, unsigned int mode));
 extern void FASTCALL(sleep_on(struct wait_queue ** p));
 extern void FASTCALL(interruptible_sleep_on(struct wait_queue ** p));
-extern void FASTCALL(wake_up(struct wait_queue ** p));
-extern void FASTCALL(wake_up_interruptible(struct wait_queue ** p));
 extern void FASTCALL(wake_up_process(struct task_struct * tsk));
+
+#define wake_up(x)			__wake_up((x),TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
+#define wake_up_interruptible(x)	__wake_up((x),TASK_INTERRUPTIBLE)
 
 extern int in_group_p(gid_t grp);
 
diff -u --recursive --new-file v2.1.85/linux/include/linux/skbuff.h linux/include/linux/skbuff.h
--- v2.1.85/linux/include/linux/skbuff.h	Fri Feb  6 15:32:55 1998
+++ linux/include/linux/skbuff.h	Tue Feb 10 13:32:25 1998
@@ -23,9 +23,6 @@
 #define HAVE_ALLOC_SKB		/* For the drivers to know */
 #define HAVE_ALIGNABLE_SKB	/* Ditto 8)		   */
 
-#define FREE_READ	1
-#define FREE_WRITE	0
-
 #define CHECKSUM_NONE 0
 #define CHECKSUM_HW 1
 #define CHECKSUM_UNNECESSARY 2
@@ -141,9 +138,6 @@
 
 #include <asm/system.h>
 
-#if 0
-extern void			print_skb(struct sk_buff *);
-#endif
 extern void			__kfree_skb(struct sk_buff *skb);
 extern void			skb_queue_head_init(struct sk_buff_head *list);
 extern void			skb_queue_head(struct sk_buff_head *list,struct sk_buff *buf);
@@ -160,7 +154,7 @@
 extern struct sk_buff *		skb_clone(struct sk_buff *skb, int priority);
 extern struct sk_buff *		skb_copy(struct sk_buff *skb, int priority);
 extern struct sk_buff *		skb_realloc_headroom(struct sk_buff *skb, int newheadroom);
-#define dev_kfree_skb(a, b)	kfree_skb((a), (b))
+#define dev_kfree_skb(a)	kfree_skb(a)
 extern unsigned char *		skb_put(struct sk_buff *skb, unsigned int len);
 extern unsigned char *		skb_push(struct sk_buff *skb, unsigned int len);
 extern unsigned char *		skb_pull(struct sk_buff *skb, unsigned int len);
@@ -174,7 +168,7 @@
 	return (list->next == (struct sk_buff *) list);
 }
 
-extern __inline__ void kfree_skb(struct sk_buff *skb, int rw)
+extern __inline__ void kfree_skb(struct sk_buff *skb)
 {
 	if (atomic_dec_and_test(&skb->users))
 		__kfree_skb(skb);
@@ -197,13 +191,13 @@
  *	a packet thats being forwarded.
  */
  
-extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri, int dir)
+extern __inline__ struct sk_buff *skb_unshare(struct sk_buff *skb, int pri)
 {
 	struct sk_buff *nskb;
 	if(!skb_cloned(skb))
 		return skb;
 	nskb=skb_copy(skb, pri);
-	kfree_skb(skb, dir);	/* Free our shared copy */
+	kfree_skb(skb);		/* Free our shared copy */
 	return nskb;
 }
 
@@ -530,7 +524,7 @@
 {
 	struct sk_buff *skb;
 	while ((skb=skb_dequeue(list))!=NULL)
-		kfree_skb(skb,0);
+		kfree_skb(skb);
 }
 
 extern __inline__ struct sk_buff *dev_alloc_skb(unsigned int length)
diff -u --recursive --new-file v2.1.85/linux/include/linux/stallion.h linux/include/linux/stallion.h
--- v2.1.85/linux/include/linux/stallion.h	Fri Dec 19 12:30:54 1997
+++ linux/include/linux/stallion.h	Wed Feb  4 14:52:16 1998
@@ -3,7 +3,7 @@
 /*
  *	stallion.h  -- stallion multiport serial driver.
  *
- *	Copyright (C) 1996-1997  Stallion Technologies (support@stallion.oz.au).
+ *	Copyright (C) 1996-1998  Stallion Technologies (support@stallion.oz.au).
  *	Copyright (C) 1994-1996  Greg Ungerer (gerg@stallion.oz.au).
  *
  *	This program is free software; you can redistribute it and/or modify
diff -u --recursive --new-file v2.1.85/linux/include/net/ip.h linux/include/net/ip.h
--- v2.1.85/linux/include/net/ip.h	Fri Feb  6 15:34:58 1998
+++ linux/include/net/ip.h	Tue Feb 10 13:34:27 1998
@@ -166,7 +166,7 @@
 		return dst->neighbour->output(skb);
 
 	printk(KERN_DEBUG "khm\n");
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -EINVAL;
 }
 
diff -u --recursive --new-file v2.1.85/linux/init/main.c linux/init/main.c
--- v2.1.85/linux/init/main.c	Wed Feb  4 11:36:01 1998
+++ linux/init/main.c	Mon Feb  9 16:12:56 1998
@@ -426,7 +426,7 @@
 	{ NULL, 0 }
 };
 
-__initfunc(dev_t name_to_dev_t(char *line))
+__initfunc(kdev_t name_to_kdev_t(char *line))
 {
 	int base = 0;
 	if (strncmp(line,"/dev/",5) == 0) {
@@ -447,7 +447,7 @@
 
 __initfunc(static void root_dev_setup(char *line, int *num))
 {
-	ROOT_DEV = name_to_dev_t(line);
+	ROOT_DEV = name_to_kdev_t(line);
 }
 
 /*
@@ -1002,10 +1002,10 @@
 	memory_start = paging_init(memory_start,memory_end);
 	trap_init();
 	init_IRQ();
-	memory_start = console_init(memory_start,memory_end);
 	sched_init();
 	time_init();
 	parse_options(command_line);
+	memory_start = console_init(memory_start,memory_end);
 #ifdef CONFIG_MODULES
 	init_modules();
 #endif
@@ -1165,14 +1165,16 @@
 
 #ifdef CONFIG_BLK_DEV_INITRD
 	root_mountflags = real_root_mountflags;
-	if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) {
+	if (mount_initrd && ROOT_DEV != real_root_dev
+	    && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) {
 		int error;
 		int i, pid;
 
 		pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
 		if (pid>0)
 			while (pid != wait(&i));
-		if (real_root_dev != MKDEV(RAMDISK_MAJOR, 0)) {
+		if (MAJOR(real_root_dev) != RAMDISK_MAJOR
+		     || MINOR(real_root_dev) != 0) {
 			error = change_root(real_root_dev,"/initrd");
 			if (error)
 				printk(KERN_ERR "Change root to /initrd: "
diff -u --recursive --new-file v2.1.85/linux/kernel/acct.c linux/kernel/acct.c
--- v2.1.85/linux/kernel/acct.c	Fri Jan 23 18:10:32 1998
+++ linux/kernel/acct.c	Fri Feb  6 10:14:52 1998
@@ -304,7 +304,7 @@
 	}
 	vsize = vsize / 1024;
 	ac.ac_mem = encode_comp_t(vsize);
-	ac.ac_io = encode_comp_t(current->io_usage);	/* %% */
+	ac.ac_io = encode_comp_t(0 /* current->io_usage */);	/* %% */
 	ac.ac_rw = encode_comp_t(ac.ac_io / 1024);
 	ac.ac_minflt = encode_comp_t(current->min_flt);
 	ac.ac_majflt = encode_comp_t(current->maj_flt);
diff -u --recursive --new-file v2.1.85/linux/kernel/ksyms.c linux/kernel/ksyms.c
--- v2.1.85/linux/kernel/ksyms.c	Wed Feb  4 11:36:01 1998
+++ linux/kernel/ksyms.c	Thu Feb  5 12:21:15 1998
@@ -324,8 +324,7 @@
 EXPORT_SYMBOL(release_region);
 
 /* process management */
-EXPORT_SYMBOL(wake_up);
-EXPORT_SYMBOL(wake_up_interruptible);
+EXPORT_SYMBOL(__wake_up);
 EXPORT_SYMBOL(sleep_on);
 EXPORT_SYMBOL(interruptible_sleep_on);
 EXPORT_SYMBOL(schedule);
diff -u --recursive --new-file v2.1.85/linux/kernel/module.c linux/kernel/module.c
--- v2.1.85/linux/kernel/module.c	Sun Jan  4 10:40:17 1998
+++ linux/kernel/module.c	Fri Feb  6 10:10:54 1998
@@ -54,7 +54,7 @@
 static long get_mod_name(const char *user_name, char **buf);
 static void put_mod_name(char *buf);
 static struct module *find_module(const char *name);
-static void free_module(struct module *);
+static void free_module(struct module *, int tag_freed);
 
 
 /*
@@ -363,6 +363,7 @@
 	struct module *mod, *next;
 	char *name;
 	long error = -EPERM;
+	int something_changed;
 
 	lock_kernel();
 	if (!suser())
@@ -386,25 +387,35 @@
  		if (mod->refs != NULL || __MOD_IN_USE(mod))
 			goto out;
 
-		free_module(mod);
+		free_module(mod, 0);
 		error = 0;
 		goto out;
 	}
 
 	/* Do automatic reaping */
+restart:
+	something_changed = 0;
 	for (mod = module_list; mod != &kernel_module; mod = next) {
 		next = mod->next;
-		if (mod->refs == NULL &&
-		    ((mod->flags
-		      & (MOD_AUTOCLEAN|MOD_RUNNING|MOD_DELETED|MOD_USED_ONCE))
-		     == (MOD_AUTOCLEAN|MOD_RUNNING|MOD_USED_ONCE)) &&
-		    !__MOD_IN_USE(mod)) {
-			if (mod->flags & MOD_VISITED)
+		if (mod->refs == NULL
+		    && (mod->flags & MOD_AUTOCLEAN)
+		    && (mod->flags & MOD_RUNNING)
+		    && !(mod->flags & MOD_DELETED)
+		    && (mod->flags & MOD_USED_ONCE)
+		    && !__MOD_IN_USE(mod)) {
+			if ((mod->flags & MOD_VISITED)
+			    && !(mod->flags & MOD_JUST_FREED)) {
 				mod->flags &= ~MOD_VISITED;
-			else
-				free_module(mod);
+			} else {
+				free_module(mod, 1);
+				something_changed = 1;
+			}
 		}
 	}
+	if (something_changed)
+		goto restart;
+	for (mod = module_list; mod != &kernel_module; mod = mod->next)
+		mod->flags &= ~MOD_JUST_FREED;
 	error = 0;
 out:
 	unlock_kernel();
@@ -764,7 +775,7 @@
  */
 
 static void
-free_module(struct module *mod)
+free_module(struct module *mod, int tag_freed)
 {
 	struct module_ref *dep;
 	unsigned i;
@@ -786,6 +797,8 @@
 		for (pp = &dep->dep->refs; *pp != dep; pp = &(*pp)->next_ref)
 			continue;
 		*pp = dep->next_ref;
+		if (tag_freed && dep->dep->refs == NULL)
+			dep->dep->flags |= MOD_JUST_FREED;
 	}
 
 	/* And from the main module list.  */
diff -u --recursive --new-file v2.1.85/linux/kernel/printk.c linux/kernel/printk.c
--- v2.1.85/linux/kernel/printk.c	Fri Jan 23 18:10:32 1998
+++ linux/kernel/printk.c	Mon Feb  9 13:36:28 1998
@@ -61,36 +61,49 @@
  */
 __initfunc(void console_setup(char *str, int *ints))
 {
-	char *s;
-	int i;
 	struct console_cmdline *c;
+	char name[sizeof(c->name)];
+	char *s, *options;
+	int i, idx;
 
-	for(i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0]; i++)
-		;
-	if (i == MAX_CMDLINECONSOLES)
-		return;
-	c = &console_cmdline[i];
-	selected_console = 1;
-
+	/*
+	 *	Decode str into name, index, options.
+	 */
 	if (str[0] >= '0' && str[0] <= '9') {
-		strcpy(c->name, "ttyS");
-		strncpy(c->name + 4, str, sizeof(c->name) - 5);
+		strcpy(name, "ttyS");
+		strncpy(name + 4, str, sizeof(name) - 5);
 	} else
-		strncpy(c->name, str, sizeof(c->name) - 1);
-	if ((c->options = strchr(str, ',')) != NULL)
-		*(c->options++) = 0;
+		strncpy(name, str, sizeof(name) - 1);
+	name[sizeof(name) - 1] = 0;
+	if ((options = strchr(str, ',')) != NULL)
+		*(options++) = 0;
 #ifdef __sparc__
 	if (!strcmp(str, "ttya"))
-		strcpy(c->name, "ttyS0");
+		strcpy(name, "ttyS0");
 	if (!strcmp(str, "ttyb"))
-		strcpy(c->name, "ttyS1");
+		strcpy(name, "ttyS1");
 #endif
-
-	for(s = c->name; *s; s++)
+	for(s = name; *s; s++)
 		if (*s >= '0' && *s <= '9')
 			break;
-	c->index = simple_strtoul(s, NULL, 10);
+	idx = simple_strtoul(s, NULL, 10);
 	*s = 0;
+
+	/*
+	 *	See if this tty is not yet registered, and
+	 *	if we have a slot free.
+	 */
+	for(i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0]; i++)
+		if (strcmp(console_cmdline[i].name, name) == 0 &&
+			  console_cmdline[i].index == idx)
+				return;
+	if (i == MAX_CMDLINECONSOLES)
+		return;
+	selected_console = 1;
+	c = &console_cmdline[i];
+	memcpy(c->name, name, sizeof(c->name));
+	c->options = options;
+	c->index = idx;
 }
 
 
diff -u --recursive --new-file v2.1.85/linux/kernel/sched.c linux/kernel/sched.c
--- v2.1.85/linux/kernel/sched.c	Fri Jan 30 15:50:57 1998
+++ linux/kernel/sched.c	Thu Feb  5 11:15:35 1998
@@ -144,7 +144,6 @@
 	prev->next_run = p;
 }
 
-#ifdef __SMP__
 /*
  * The tasklist_lock protects the linked list of processes.
  *
@@ -158,8 +157,7 @@
  */
 rwlock_t tasklist_lock = RW_LOCK_UNLOCKED;
 spinlock_t scheduler_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t runqueue_lock = SPIN_LOCK_UNLOCKED;
-#endif
+spinlock_t runqueue_lock = SPIN_LOCK_UNLOCKED;
 
 /*
  * Wake up a process. Put it on the run-queue if it's not
@@ -315,7 +313,7 @@
 	}
 }
 
-static spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
+spinlock_t timerlist_lock = SPIN_LOCK_UNLOCKED;
 
 void add_timer(struct timer_list *timer)
 {
@@ -509,27 +507,7 @@
  * have to protect against interrupts), as the actual removal from the
  * queue is handled by the process itself.
  */
-void wake_up(struct wait_queue **q)
-{
-	struct wait_queue *next;
-
-	read_lock(&waitqueue_lock);
-	if (q && (next = *q)) {
-		struct wait_queue *head;
-
-		head = WAIT_QUEUE_HEAD(q);
-		while (next != head) {
-			struct task_struct *p = next->task;
-			next = next->next;
-			if ((p->state == TASK_UNINTERRUPTIBLE) ||
-			    (p->state == TASK_INTERRUPTIBLE))
-				wake_up_process(p);
-		}
-	}
-	read_unlock(&waitqueue_lock);
-}
-
-void wake_up_interruptible(struct wait_queue **q)
+void __wake_up(struct wait_queue **q, unsigned int mode)
 {
 	struct wait_queue *next;
 
@@ -541,7 +519,7 @@
 		while (next != head) {
 			struct task_struct *p = next->task;
 			next = next->next;
-			if (p->state == TASK_INTERRUPTIBLE)
+			if (p->state & mode)
 				wake_up_process(p);
 		}
 	}
diff -u --recursive --new-file v2.1.85/linux/net/802/llc_macinit.c linux/net/802/llc_macinit.c
--- v2.1.85/linux/net/802/llc_macinit.c	Sat Nov 29 10:41:10 1997
+++ linux/net/802/llc_macinit.c	Tue Feb 10 13:07:49 1998
@@ -136,7 +136,7 @@
 		 *	No auto free for I pdus
 		 */
 		skb->sk = NULL;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	if(lp->llc_callbacks)
diff -u --recursive --new-file v2.1.85/linux/net/802/llc_sendpdu.c linux/net/802/llc_sendpdu.c
--- v2.1.85/linux/net/802/llc_sendpdu.c	Mon Jan 12 15:28:19 1998
+++ linux/net/802/llc_sendpdu.c	Tue Feb 10 13:07:49 1998
@@ -344,7 +344,7 @@
 		fr = (frameptr) (pp->data + lp->dev->hard_header_len);
 		ns_save = fr->i_hdr.ns;
 
-		kfree_skb(pp, FREE_WRITE);
+		kfree_skb(pp);
 		ack_count++;
 
 		if (ns_save == ack) 
diff -u --recursive --new-file v2.1.85/linux/net/802/p8022.c linux/net/802/p8022.c
--- v2.1.85/linux/net/802/p8022.c	Tue May 13 22:41:20 1997
+++ linux/net/802/p8022.c	Tue Feb 10 13:07:49 1998
@@ -62,7 +62,7 @@
 	}
 
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/802/p8022tr.c linux/net/802/p8022tr.c
--- v2.1.85/linux/net/802/p8022tr.c	Tue May 13 22:41:20 1997
+++ linux/net/802/p8022tr.c	Tue Feb 10 13:07:49 1998
@@ -57,7 +57,7 @@
 	}
 
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/802/psnap.c linux/net/802/psnap.c
--- v2.1.85/linux/net/802/psnap.c	Tue May 13 22:41:20 1997
+++ linux/net/802/psnap.c	Tue Feb 10 13:07:49 1998
@@ -67,7 +67,7 @@
 		return proto->rcvfunc(skb, dev, &psnap_packet_type);
 	}
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/appletalk/aarp.c linux/net/appletalk/aarp.c
--- v2.1.85/linux/net/appletalk/aarp.c	Mon Jan 12 15:28:19 1998
+++ linux/net/appletalk/aarp.c	Tue Feb 10 13:07:49 1998
@@ -96,7 +96,7 @@
 	struct sk_buff *skb;
 	
 	while((skb=skb_dequeue(&a->packet_queue))!=NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	kfree_s(a,sizeof(*a));
 }
 
@@ -663,7 +663,7 @@
 	 
 	if(dev->type!=ARPHRD_ETHER)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	
@@ -673,7 +673,7 @@
 	 
 	if(!skb_pull(skb,sizeof(*ea)))
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -686,7 +686,7 @@
 	if(ea->function<AARP_REQUEST || ea->function > AARP_PROBE || ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN ||
 		ea->pa_src_zero != 0 || ea->pa_dst_zero != 0)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	
@@ -717,7 +717,7 @@
 	if(ifa==NULL)
 	{
 		restore_flags(flags);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 1;		
 	}
 	if(ifa->status&ATIF_PROBE)
@@ -730,7 +730,7 @@
 			 
 			ifa->status|=ATIF_PROBE_FAIL;
 			restore_flags(flags);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 1;		
 		}
 	}				 
@@ -789,7 +789,7 @@
 			break;
 	}
 	restore_flags(flags);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 1;		
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
--- v2.1.85/linux/net/appletalk/ddp.c	Mon Jan 12 15:28:19 1998
+++ linux/net/appletalk/ddp.c	Tue Feb 10 13:07:49 1998
@@ -1258,7 +1258,7 @@
 	/* Size check */
 	if(skb->len < sizeof(*ddp))
 	{
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 		return (0);
 	}
 
@@ -1289,7 +1289,7 @@
 	 */
 	if(skb->len < sizeof(*ddp))
 	{
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 		return (0);
 	}
 
@@ -1300,13 +1300,13 @@
 	if(ddp->deh_sum && atalk_checksum(ddp, ddp->deh_len) != ddp->deh_sum)
 	{
 		/* Not a valid appletalk frame - dustbin time */
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return (0);
 	}
 
 	if(call_in_firewall(AF_APPLETALK, skb->dev, ddp, NULL,&skb)!=FW_ACCEPT)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return (0);
 	}
 
@@ -1331,7 +1331,7 @@
 		 */
 		if (skb->pkt_type != PACKET_HOST || ddp->deh_dnet == 0)
 		{
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return (0);
 		}
 
@@ -1340,7 +1340,7 @@
 		 */
 		if(call_fw_firewall(AF_APPLETALK, skb->dev, ddp, NULL, &skb) != FW_ACCEPT)
 		{
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return (0);
 		}
 
@@ -1351,7 +1351,7 @@
 		rt = atrtr_find(&ta);
 		if(rt == NULL || ddp->deh_hops == DDP_MAXHOPS)
 		{
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return (0);
 		}
 		ddp->deh_hops++;
@@ -1389,7 +1389,7 @@
 			/* 22 bytes - 12 ether, 2 len, 3 802.2 5 snap */
 			skb = skb_realloc_headroom(skb, 32);
 		else
-			skb = skb_unshare(skb, GFP_ATOMIC, FREE_READ);
+			skb = skb_unshare(skb, GFP_ATOMIC);
 		
 		/*
 		 * If the buffer didn't vanish into the lack of
@@ -1398,7 +1398,7 @@
 		if(skb)
 		{
 			if(aarp_send_ddp(rt->dev, skb, &ta, NULL) == -1)
-				kfree_skb(skb, FREE_READ);
+				kfree_skb(skb);
 		}
 
 		return (0);
@@ -1416,7 +1416,7 @@
 	
 	if(sock == NULL)	/* But not one of our sockets */
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return (0);
 	}
 
@@ -1461,7 +1461,7 @@
 	if(sock_queue_rcv_skb(sock, skb) < 0)
 	{
 		skb->sk = NULL;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 
 	return (0);
@@ -1489,7 +1489,7 @@
 		ap = atalk_find_dev_addr(dev);
 		if(ap == NULL || skb->len < sizeof(struct ddpshdr))
 		{
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return (0);
 		}
 
@@ -1650,7 +1650,7 @@
 	err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
 	if(err)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return (-EFAULT);
 	}
 
@@ -1661,7 +1661,7 @@
 
 	if(call_out_firewall(AF_APPLETALK, skb->dev, ddp, NULL, &skb) != FW_ACCEPT)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return (-EPERM);
 	}
 
@@ -1679,7 +1679,7 @@
 				loopback = 1;
 				SOCK_DEBUG(sk, "SK %p: send out(copy).\n", sk);
 				if(aarp_send_ddp(dev, skb2, &usat->sat_addr, NULL) == -1)
-					kfree_skb(skb2, FREE_WRITE);
+					kfree_skb(skb2);
 				/* else queued/sent above in the aarp queue */
 			}
 		}
@@ -1707,7 +1707,7 @@
 		}
 
 		if(aarp_send_ddp(dev, skb, &usat->sat_addr, NULL) == -1)
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		/* else queued/sent above in the aarp queue */
 	}
 	SOCK_DEBUG(sk, "SK %p: Done write (%d).\n", sk, len);
diff -u --recursive --new-file v2.1.85/linux/net/ax25/af_ax25.c linux/net/ax25/af_ax25.c
--- v2.1.85/linux/net/ax25/af_ax25.c	Wed Dec  3 15:16:39 1997
+++ linux/net/ax25/af_ax25.c	Tue Feb 10 13:07:49 1998
@@ -368,7 +368,7 @@
 				return;
 
 			if (sock_queue_rcv_skb(sk, copy) != 0)
-				kfree_skb(copy, FREE_READ);
+				kfree_skb(copy);
 		}
 
 		sk = sk->next;
@@ -418,7 +418,7 @@
 				skb->sk->protinfo.ax25->state = AX25_STATE_0;
 			}
 
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 		}
 	}
 
@@ -1241,7 +1241,7 @@
 
 	/* Now attach up the new socket */
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	sk->ack_backlog--;
 	newsock->sk = newsk;
 
@@ -1385,7 +1385,7 @@
 	if (sk->type == SOCK_SEQPACKET) {
 		/* Connected mode sockets go via the LAPB machine */
 		if (sk->state != TCP_ESTABLISHED) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -ENOTCONN;
 		}
 
diff -u --recursive --new-file v2.1.85/linux/net/ax25/ax25_in.c linux/net/ax25/ax25_in.c
--- v2.1.85/linux/net/ax25/ax25_in.c	Mon Jul  7 08:19:59 1997
+++ linux/net/ax25/ax25_in.c	Tue Feb 10 13:07:49 1998
@@ -85,7 +85,7 @@
 				if (ax25->fragno == 0) {
 					if ((skbn = alloc_skb(AX25_MAX_HEADER_LEN + ax25->fraglen, GFP_ATOMIC)) == NULL) {
 						while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL)
-							kfree_skb(skbo, FREE_READ);
+							kfree_skb(skbo);
 						return 1;
 					}
 
@@ -97,13 +97,13 @@
 					/* Copy data from the fragments */
 					while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) {
 						memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
-						kfree_skb(skbo, FREE_READ);
+						kfree_skb(skbo);
 					}
 
 					ax25->fraglen = 0;
 
 					if (ax25_rx_iframe(ax25, skbn) == 0)
-						kfree_skb(skbn, FREE_READ);
+						kfree_skb(skbn);
 				}
 
 				return 1;
@@ -113,7 +113,7 @@
 		/* First fragment received */
 		if (*skb->data & AX25_SEG_FIRST) {
 			while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL)
-				kfree_skb(skbo, FREE_READ);
+				kfree_skb(skbo);
 			ax25->fragno = *skb->data & AX25_SEG_REM;
 			skb_pull(skb, 1);		/* skip fragno */
 			ax25->fraglen = skb->len;
@@ -149,7 +149,7 @@
 		 */
 		struct sk_buff *skbn = skb_copy(skb, GFP_ATOMIC);
 		if (skbn != NULL) {
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			skb = skbn;
 		}
 
@@ -234,12 +234,12 @@
 	skb->h.raw = skb->data;
 
 	if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
 	if (call_in_firewall(PF_AX25, skb->dev, skb->h.raw, NULL, &skb) != FW_ACCEPT) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -248,7 +248,7 @@
 	 */
 
 	if (ax25_addr_parse(skb->data, skb->len, &src, &dest, &dp, &type, &dama) == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -279,7 +279,7 @@
 			ax25_send_to_raw(raw, skb, skb->data[1]);
 
 		if (!mine && ax25cmp(&dest, (ax25_address *)dev->broadcast) != 0) {
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 
@@ -308,22 +308,22 @@
 				/* Now find a suitable dgram socket */
 				if ((sk = ax25_find_socket(&dest, &src, SOCK_DGRAM)) != NULL) {
 					if (atomic_read(&sk->rmem_alloc) >= sk->rcvbuf) {
-						kfree_skb(skb, FREE_READ);
+						kfree_skb(skb);
 					} else {
 						/*
 						 *	Remove the control and PID.
 						 */
 						skb_pull(skb, 2);
 						if (sock_queue_rcv_skb(sk, skb) != 0)
-							kfree_skb(skb, FREE_READ);
+							kfree_skb(skb);
 					}
 				} else {
-					kfree_skb(skb, FREE_READ);
+					kfree_skb(skb);
 				}
 				break;
 
 			default:
-				kfree_skb(skb, FREE_READ);	/* Will scan SOCK_AX25 RAW sockets */
+				kfree_skb(skb);	/* Will scan SOCK_AX25 RAW sockets */
 				break;
 		}
 
@@ -336,7 +336,7 @@
 	 *	silently ignore them. For now we stay quiet.
 	 */
 	if (ax25_dev->values[AX25_VALUES_CONMODE] == 0) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -353,7 +353,7 @@
 		 *	do no further work
 		 */
 		if (ax25_process_rx_frame(ax25, skb, type, dama) == 0)
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 
 		return 0;
 	}
@@ -370,7 +370,7 @@
 		if ((*skb->data & ~AX25_PF) != AX25_DM && mine)
 			ax25_return_dm(dev, &src, &dest, &dp);
 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -384,7 +384,7 @@
 	if (sk != NULL) {
 		if (sk->ack_backlog == sk->max_ack_backlog || (make = ax25_make_new(sk, ax25_dev)) == NULL) {
 			if (mine) ax25_return_dm(dev, &src, &dest, &dp);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 
@@ -399,13 +399,13 @@
 		sk->ack_backlog++;
 	} else {
 		if (!mine) {
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 
 		if ((ax25 = ax25_create_cb()) == NULL) {
 			ax25_return_dm(dev, &src, &dest, &dp);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 
@@ -419,7 +419,7 @@
 	 *	Sort out any digipeated paths.
 	 */
 	if (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		ax25_destroy_socket(ax25);
 		return 0;
 	}
@@ -461,7 +461,7 @@
 		if (!sk->dead)
 			sk->data_ready(sk, skb->len);
 	} else {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	return 0;
@@ -475,7 +475,7 @@
 	skb->sk = NULL;		/* Initially we don't know who it's for */
 
 	if ((*skb->data & 0x0F) != 0) {
-		kfree_skb(skb, FREE_READ);	/* Not a KISS data frame */
+		kfree_skb(skb);	/* Not a KISS data frame */
 		return 0;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ax25/ax25_ip.c linux/net/ax25/ax25_ip.c
--- v2.1.85/linux/net/ax25/ax25_ip.c	Sun Nov 30 14:00:39 1997
+++ linux/net/ax25/ax25_ip.c	Tue Feb 10 13:07:49 1998
@@ -140,14 +140,14 @@
 			 *	gets fixed.
 			 */
 			if ((ourskb = skb_copy(skb, GFP_ATOMIC)) == NULL) {
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 				return 1;
 			}
 
 			if (skb->sk != NULL)
 				skb_set_owner_w(ourskb, skb->sk);
 
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 
 			skb_pull(ourskb, AX25_HEADER_LEN - 1);	/* Keep PID */
 
@@ -169,7 +169,7 @@
 
 	if (route->digipeat != NULL) {
 		if ((ourskb = ax25_rt_build_path(skb, src, dst, route->digipeat)) == NULL) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 1;
 		}
 
diff -u --recursive --new-file v2.1.85/linux/net/ax25/ax25_out.c linux/net/ax25/ax25_out.c
--- v2.1.85/linux/net/ax25/ax25_out.c	Mon Jan 12 15:28:19 1998
+++ linux/net/ax25/ax25_out.c	Tue Feb 10 13:07:49 1998
@@ -194,7 +194,7 @@
 			skb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */
 		}
 
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	} else {
 		skb_queue_tail(&ax25->write_queue, skb);	  /* Throw it on the queue */
 	}
@@ -347,14 +347,14 @@
 	if (skb_headroom(skb) < headroom) {
 		if ((skbn = skb_realloc_headroom(skb, headroom)) == NULL) {
 			printk(KERN_CRIT "AX.25: ax25_transmit_buffer - out of memory\n");
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return;
 		}
 
 		if (skb->sk != NULL)
 			skb_set_owner_w(skbn, skb->sk);
 
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		skb = skbn;
 	}
 
@@ -376,7 +376,7 @@
 	unsigned char *ptr;
 
 	if (call_out_firewall(PF_AX25, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ax25/ax25_route.c linux/net/ax25/ax25_route.c
--- v2.1.85/linux/net/ax25/ax25_route.c	Thu Jul 31 13:09:18 1997
+++ linux/net/ax25/ax25_route.c	Tue Feb 10 13:07:49 1998
@@ -421,7 +421,7 @@
 		if (skb->sk != NULL)
 			skb_set_owner_w(skbn, skb->sk);
 
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 		skb = skbn;
 	}
diff -u --recursive --new-file v2.1.85/linux/net/ax25/ax25_subr.c linux/net/ax25/ax25_subr.c
--- v2.1.85/linux/net/ax25/ax25_subr.c	Sun Nov 30 14:00:39 1997
+++ linux/net/ax25/ax25_subr.c	Tue Feb 10 13:07:49 1998
@@ -64,16 +64,16 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&ax25->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&ax25->frag_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 /*
@@ -91,7 +91,7 @@
 	if (ax25->va != nr) {
 		while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
 		        skb = skb_dequeue(&ax25->ack_queue);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			ax25->va = (ax25->va + 1) % ax25->modulus;
 		}
 	}
diff -u --recursive --new-file v2.1.85/linux/net/core/datagram.c linux/net/core/datagram.c
--- v2.1.85/linux/net/core/datagram.c	Sat Sep 20 14:51:55 1997
+++ linux/net/core/datagram.c	Tue Feb 10 12:29:54 1998
@@ -153,7 +153,7 @@
 
 void skb_free_datagram(struct sock * sk, struct sk_buff *skb)
 {
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	release_sock(sk);
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/core/dev.c linux/net/core/dev.c
--- v2.1.85/linux/net/core/dev.c	Wed Feb  4 11:36:02 1998
+++ linux/net/core/dev.c	Tue Feb 10 12:29:39 1998
@@ -332,7 +332,7 @@
 default_rebuild_header(struct sk_buff *skb)
 {
 	printk(KERN_DEBUG "%s: default_rebuild_header called -- BUG!\n", skb->dev ? skb->dev->name : "NULL!!!");
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 1;
 }
 
@@ -595,7 +595,7 @@
 	}
 	end_bh_atomic();
 
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 #ifdef CONFIG_NET_PROFILE
 	NET_PROFILE_LEAVE(dev_queue_xmit);
@@ -706,7 +706,7 @@
 				return;
 			}
 			atomic_inc(&netdev_rx_dropped);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return;
 		}
 #ifdef CONFIG_NET_HW_FLOWCONTROL
@@ -721,7 +721,7 @@
 	}
 	netdev_dropping = 1;
 	atomic_inc(&netdev_rx_dropped);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 #ifdef CONFIG_BRIDGE
@@ -818,9 +818,9 @@
 
 #ifdef CONFIG_CPU_IS_SLOW
 		if (ave_busy > 128*16) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			while ((skb = skb_dequeue(&backlog)) != NULL)
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 			break;
 		}
 #endif
@@ -864,7 +864,7 @@
 
 		if (skb->mac.raw < skb->head || skb->mac.raw > skb->data) {
 			printk(KERN_CRIT "%s: wrong mac.raw ptr, proto=%04x\n", skb->dev->name, skb->protocol);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			continue;
 		}
 
@@ -926,7 +926,7 @@
 		 */
 	 
 		else {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		}
   	}	/* End of queue loop */
   	
diff -u --recursive --new-file v2.1.85/linux/net/core/dst.c linux/net/core/dst.c
--- v2.1.85/linux/net/core/dst.c	Mon Jan 12 15:28:19 1998
+++ linux/net/core/dst.c	Tue Feb 10 12:30:09 1998
@@ -66,13 +66,13 @@
 
 static int dst_discard(struct sk_buff *skb)
 {
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
 static int dst_blackhole(struct sk_buff *skb)
 {
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/core/neighbour.c linux/net/core/neighbour.c
--- v2.1.85/linux/net/core/neighbour.c	Thu Jan 15 14:33:07 1998
+++ linux/net/core/neighbour.c	Tue Feb 10 12:30:21 1998
@@ -51,7 +51,7 @@
 
 static int neigh_blackhole(struct sk_buff *skb)
 {
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -ENETDOWN;
 }
 
@@ -526,7 +526,7 @@
 			if (neigh->tbl == NULL) {
 				NEIGH_PRINTK2("neigh %p used after death.\n", neigh);
 				if (skb)
-					kfree_skb(skb, FREE_WRITE);
+					kfree_skb(skb);
 				end_bh_atomic();
 				return 1;
 			}
@@ -540,7 +540,7 @@
 			} else {
 				neigh->nud_state = NUD_FAILED;
 				if (skb)
-					kfree_skb(skb, FREE_WRITE);
+					kfree_skb(skb);
 				end_bh_atomic();
 				return 1;
 			}
@@ -551,7 +551,7 @@
 					struct sk_buff *buff;
 					buff = neigh->arp_queue.prev;
 					__skb_unlink(buff, &neigh->arp_queue);
-					kfree_skb(buff, FREE_WRITE);
+					kfree_skb(buff);
 				}
 				__skb_queue_head(&neigh->arp_queue, skb);
 			}
@@ -759,14 +759,14 @@
 		}
 		if (dev->hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, NULL, skb->len) >= 0)
 			return neigh->ops->queue_xmit(skb);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -EINVAL;
 	}
 	return 0;
 
 discard:
 	NEIGH_PRINTK1("neigh_resolve_output: dst=%p neigh=%p\n", dst, dst ? dst->neighbour : NULL);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -EINVAL;
 }
 
@@ -782,7 +782,7 @@
 
 	if (dev->hard_header(skb, dev, ntohs(skb->protocol), neigh->ha, NULL, skb->len) >= 0)
 		return neigh->ops->queue_xmit(skb);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -EINVAL;
 }
 
@@ -803,7 +803,7 @@
 			if (tbl->proxy_redo)
 				tbl->proxy_redo(back);
 			else
-				kfree_skb(back, FREE_WRITE);
+				kfree_skb(back);
 		} else if (!sched_next || tdif < sched_next)
 			sched_next = tdif;
 	}
@@ -821,7 +821,7 @@
 	long sched_next = net_random()%p->proxy_delay;
 
 	if (tbl->proxy_queue.qlen > p->proxy_qlen) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 	skb->stamp.tv_sec = 0;
diff -u --recursive --new-file v2.1.85/linux/net/core/profile.c linux/net/core/profile.c
--- v2.1.85/linux/net/core/profile.c	Mon Jan 12 15:28:25 1998
+++ linux/net/core/profile.c	Tue Feb 10 12:30:31 1998
@@ -146,7 +146,7 @@
 static int whitehole_xmit(struct sk_buff *skb, struct device *dev)
 {
 	struct net_device_stats *stats;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	stats = (struct net_device_stats *)dev->priv;
 	stats->tx_packets++;
 	stats->tx_bytes+=skb->len;
diff -u --recursive --new-file v2.1.85/linux/net/core/rtnetlink.c linux/net/core/rtnetlink.c
--- v2.1.85/linux/net/core/rtnetlink.c	Mon Jan 12 15:28:25 1998
+++ linux/net/core/rtnetlink.c	Tue Feb 10 12:30:44 1998
@@ -254,7 +254,7 @@
 		return;
 
 	if (rtnetlink_fill_ifinfo(skb, dev, type, 0, 0) < 0) {
-		kfree_skb(skb, 0);
+		kfree_skb(skb);
 		return;
 	}
 	NETLINK_CB(skb).dst_groups = RTMGRP_LINK;
@@ -454,10 +454,10 @@
 			if (skb->len)
 				skb_queue_head(&sk->receive_queue, skb);
 			else
-				kfree_skb(skb, FREE_READ);
+				kfree_skb(skb);
 			break;
 		}
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	rtnl_shunlock();
diff -u --recursive --new-file v2.1.85/linux/net/core/skbuff.c linux/net/core/skbuff.c
--- v2.1.85/linux/net/core/skbuff.c	Thu Jan 15 21:12:27 1998
+++ linux/net/core/skbuff.c	Fri Feb  6 14:00:57 1998
@@ -64,7 +64,6 @@
 static atomic_t net_allocs = ATOMIC_INIT(0);
 static atomic_t net_fails  = ATOMIC_INIT(0);
 
-
 extern atomic_t ip_frag_mem;
 
 /*
diff -u --recursive --new-file v2.1.85/linux/net/core/sock.c linux/net/core/sock.c
--- v2.1.85/linux/net/core/sock.c	Thu Jan 15 14:33:07 1998
+++ linux/net/core/sock.c	Tue Feb 10 12:30:54 1998
@@ -842,7 +842,7 @@
 
 	while((skb=skb_dequeue(&sk->receive_queue))!=NULL)
 	{
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 	}
 
 	if(atomic_read(&sk->wmem_alloc) == 0 &&
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
--- v2.1.85/linux/net/ipv4/af_inet.c	Mon Jan 12 14:46:27 1998
+++ linux/net/ipv4/af_inet.c	Tue Feb 10 12:28:16 1998
@@ -150,16 +150,16 @@
 		 */
 		if (skb->sk != NULL && skb->sk != sk)
 			skb->sk->prot->close(skb->sk, 0);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	/* Next, the error queue. */
 	while((skb = skb_dequeue(&sk->error_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
   	/* Now the backlog. */
   	while((skb=skb_dequeue(&sk->back_log)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 static __inline__ void kill_sk_now(struct sock *sk)
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/arp.c linux/net/ipv4/arp.c
--- v2.1.85/linux/net/ipv4/arp.c	Fri Jan 23 18:10:32 1998
+++ linux/net/ipv4/arp.c	Tue Feb 10 12:28:35 1998
@@ -295,7 +295,7 @@
 static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb)
 {
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 }
 
 static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
@@ -363,7 +363,7 @@
 
 	if (!skb->dst) {
 		printk(KERN_DEBUG "arp_find is called with dst==NULL\n");
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 1;
 	}
 
@@ -384,7 +384,7 @@
 			return 0;
 		}
 	} else
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	neigh_release(n);
 	end_bh_atomic();
 	return 1;
@@ -673,7 +673,7 @@
 	}
 
 out:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/icmp.c linux/net/ipv4/icmp.c
--- v2.1.85/linux/net/ipv4/icmp.c	Wed Dec 10 09:45:16 1997
+++ linux/net/ipv4/icmp.c	Tue Feb 10 12:21:15 1998
@@ -1007,7 +1007,7 @@
 	(icmp_pointers[icmph->type].handler)(icmph, skb, len);
 
 drop:
-	kfree_skb(skb, FREE_READ); 
+	kfree_skb(skb);
 	return 0;
 error:
 	icmp_statistics.IcmpInErrors++;
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/igmp.c linux/net/ipv4/igmp.c
--- v2.1.85/linux/net/ipv4/igmp.c	Mon Jan 12 15:28:27 1998
+++ linux/net/ipv4/igmp.c	Tue Feb 10 12:28:51 1998
@@ -300,7 +300,7 @@
 
 	if (len < sizeof(struct igmphdr) || ip_compute_csum((void *)ih, len)
 	    || in_dev==NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	
@@ -328,7 +328,7 @@
 	default:
 		NETDEBUG(printk(KERN_DEBUG "New IGMP type=%d, why we do not know about it?\n", ih->type));
 	}
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_forward.c linux/net/ipv4/ip_forward.c
--- v2.1.85/linux/net/ipv4/ip_forward.c	Thu Jan 15 14:33:07 1998
+++ linux/net/ipv4/ip_forward.c	Tue Feb 10 12:29:08 1998
@@ -149,13 +149,13 @@
 		if (skb_headroom(skb) < dev2->hard_header_len || skb_cloned(skb)) {
 			struct sk_buff *skb2;
 			skb2 = skb_realloc_headroom(skb, (dev2->hard_header_len + 15)&~15);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			if (skb2 == NULL)
 				return -1;
 			skb = skb2;
 		}
 		if (ip_do_nat(skb)) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -1;
 		}
 	}
@@ -180,7 +180,7 @@
 				maddr = inet_select_addr(dev2, rt->rt_gateway, RT_SCOPE_UNIVERSE);
 				fw_res = ip_fw_masq_icmp(&skb, maddr);
 			        if (fw_res < 0) {
-					kfree_skb(skb, FREE_READ);
+					kfree_skb(skb);
 					return -1;
 				}
 
@@ -205,7 +205,7 @@
 			icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
 			/* fall thru */
 		default:
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return -1;
 		}
 #endif
@@ -230,7 +230,7 @@
 			maddr = inet_select_addr(dev2, rt->rt_gateway, RT_SCOPE_UNIVERSE);
 
 			if (ip_fw_masquerade(&skb, maddr) < 0) {
-				kfree_skb(skb, FREE_READ);
+				kfree_skb(skb);
 				return -1;
 			} else {
 				/*
@@ -245,7 +245,7 @@
 	if (skb_headroom(skb) < dev2->hard_header_len || skb_cloned(skb)) {
 		struct sk_buff *skb2;
 		skb2 = skb_realloc_headroom(skb, (dev2->hard_header_len + 15)&~15);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 		if (skb2 == NULL) {
 			NETDEBUG(printk(KERN_ERR "\nIP: No memory available for IP forward\n"));
@@ -261,7 +261,7 @@
 		   masquerading is only supported via forward rules */
 		if (fw_res == FW_REJECT)
 			icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 		return -1;
 	}
 #endif
@@ -305,6 +305,6 @@
         /* Tell the sender its packet died... */
         icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0);
 drop:
-	kfree_skb(skb,FREE_WRITE);
+	kfree_skb(skb);
 	return -1;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_fragment.c linux/net/ipv4/ip_fragment.c
--- v2.1.85/linux/net/ipv4/ip_fragment.c	Mon Jan 12 15:28:27 1998
+++ linux/net/ipv4/ip_fragment.c	Tue Feb 10 12:27:38 1998
@@ -15,6 +15,7 @@
  *		David S. Miller :	Begin massive cleanup...
  *		Andi Kleen	:	Add sysctls.
  *		xxxx		:	Overlapfrag bug.
+ *		Ultima          :       ip_expire() kernel panic.
  */
 
 #include <linux/types.h>
@@ -78,10 +79,10 @@
 char *in_ntoa(__u32 in);
 
 /* Memory Tracking Functions. */
-extern __inline__ void frag_kfree_skb(struct sk_buff *skb, int type)
+extern __inline__ void frag_kfree_skb(struct sk_buff *skb)
 {
 	atomic_sub(skb->truesize, &ip_frag_mem);
-	kfree_skb(skb,type);
+	kfree_skb(skb);
 }
 
 extern __inline__ void frag_kfree_s(void *ptr, int len)
@@ -175,7 +176,7 @@
 	while (fp) {
 		struct ipfrag *xp = fp->next;
 
-		frag_kfree_skb(fp->skb,FREE_READ);
+		frag_kfree_skb(fp->skb);
 		frag_kfree_s(fp, sizeof(struct ipfrag));
 		fp = xp;
 	}
@@ -192,6 +193,15 @@
 {
 	struct ipq *qp = (struct ipq *) arg;
 
+  	if(!qp->fragments)
+        {	
+#ifdef IP_EXPIRE_DEBUG
+	  	printk("warning: possible ip-expire attack\n");
+#endif
+		ip_free(qp);
+		return;
+  	}
+  
 	/* Send an ICMP "Fragment Reassembly Timeout" message. */
 	ip_statistics.IpReasmTimeout++;
 	ip_statistics.IpReasmFails++;   
@@ -344,7 +354,7 @@
 			NETDEBUG(printk(KERN_ERR "Invalid fragment list: "
 					"Fragment over size.\n"));
 			ip_free(qp);
-			kfree_skb(skb,FREE_WRITE);
+			kfree_skb(skb);
 			ip_statistics.IpReasmFails++;
 			return NULL;
 		}
@@ -427,7 +437,7 @@
 	} else {
 		/* If we failed to create it, then discard the frame. */
 		if ((qp = ip_create(skb, iph)) == NULL) {
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			ip_statistics.IpReasmFails++;
 			return NULL;
 		}
@@ -437,7 +447,7 @@
 	if(ntohs(iph->tot_len)+(int)offset>65535) {
 		if (net_ratelimit())
 			printk(KERN_INFO "Oversized packet received from %d.%d.%d.%d\n", NIPQUAD(iph->saddr));
-		frag_kfree_skb(skb, FREE_READ);
+		frag_kfree_skb(skb);
 		ip_statistics.IpReasmFails++;
 		return NULL;
 	}	
@@ -501,7 +511,7 @@
 			/* We have killed the original next frame. */
 			next = tfp;
 
-			frag_kfree_skb(tmp->skb,FREE_READ);
+			frag_kfree_skb(tmp->skb);
 			frag_kfree_s(tmp, sizeof(struct ipfrag));
 		}
 	}
@@ -512,7 +522,7 @@
 
 	/* No memory to save the fragment - so throw the lot. */
 	if (!tfp) {
-		frag_kfree_skb(skb, FREE_READ);
+		frag_kfree_skb(skb);
 		return NULL;
 	}
 	tfp->prev = prev;
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_fw.c linux/net/ipv4/ip_fw.c
--- v2.1.85/linux/net/ipv4/ip_fw.c	Mon Jan 12 15:28:27 1998
+++ linux/net/ipv4/ip_fw.c	Tue Feb 10 12:27:50 1998
@@ -581,7 +581,7 @@
 				skb_put(skb,len);
 				memcpy(skb->data,ip,len);
 				if(netlink_post(NETLINK_FIREWALL, skb))
-					kfree_skb(skb, FREE_WRITE);
+					kfree_skb(skb);
 			}
 		}
 #endif		
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_gre.c linux/net/ipv4/ip_gre.c
--- v2.1.85/linux/net/ipv4/ip_gre.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/ip_gre.c	Tue Feb 10 12:26:49 1998
@@ -452,7 +452,7 @@
 
 	/* Try to guess incoming interface */
 	if (ip_route_output(&rt, eiph->saddr, 0, RT_TOS(eiph->tos), 0)) {
-		kfree_skb(skb2, FREE_WRITE);
+		kfree_skb(skb2);
 		return;
 	}
 	skb2->dev = rt->u.dst.dev;
@@ -464,14 +464,14 @@
 		if (ip_route_output(&rt, eiph->daddr, eiph->saddr, eiph->tos, 0) ||
 		    rt->u.dst.dev->type != ARPHRD_IPGRE) {
 			ip_rt_put(rt);
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 	} else {
 		ip_rt_put(rt);
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
 		    skb2->dst->dev->type != ARPHRD_IPGRE) {
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 	}
@@ -479,7 +479,7 @@
 	/* change mtu on this route */
 	if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
 		if (rel_info > skb2->dst->pmtu) {
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 		skb2->dst->pmtu = rel_info;
@@ -493,7 +493,7 @@
 	}
 
 	icmp_send(skb2, rel_type, rel_code, rel_info);
-	kfree_skb(skb2, FREE_WRITE);
+	kfree_skb(skb2);
 #endif
 }
 
@@ -572,7 +572,7 @@
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
 
 drop:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return(0);
 }
 
@@ -723,11 +723,11 @@
 		if (!new_skb) {
 			ip_rt_put(rt);
   			stats->tx_dropped++;
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			tunnel->recursion--;
 			return 0;
 		}
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		skb = new_skb;
 	}
 
@@ -801,7 +801,7 @@
 
 tx_error:
 	stats->tx_errors++;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	tunnel->recursion--;
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
--- v2.1.85/linux/net/ipv4/ip_input.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/ip_input.c	Tue Feb 10 12:25:56 1998
@@ -257,7 +257,7 @@
         {
 		int ret = ip_fw_demasquerade(&skb);
 		if (ret < 0) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 		}
 
@@ -267,7 +267,7 @@
 			dst_release(skb->dst);
 			skb->dst = NULL;
 			if (ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, skb->dev)) {
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 				return 0;
 			}
 			return skb->dst->input(skb);
@@ -312,7 +312,7 @@
 						if(ipsec_sk_policy(raw_sk,skb1))	
 							raw_rcv(raw_sk, skb1);
 						else
-							kfree_skb(skb1, FREE_WRITE);
+							kfree_skb(skb1);
 					}
 				}
 				raw_sk = sknext;
@@ -375,12 +375,12 @@
 		if(ipsec_sk_policy(raw_sk, skb))
 			raw_rcv(raw_sk, skb);
 		else
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 	}
 	else if (!flag)		/* Free and report errors */
 	{
 		icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);	
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 
 	return(0);
@@ -503,7 +503,7 @@
 inhdr_error:
 	ip_statistics.IpInHdrErrors++;
 drop:
-        kfree_skb(skb, FREE_WRITE);
+        kfree_skb(skb);
         return(0);
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_masq_app.c linux/net/ipv4/ip_masq_app.c
--- v2.1.85/linux/net/ipv4/ip_masq_app.c	Wed Dec 10 09:45:16 1997
+++ linux/net/ipv4/ip_masq_app.c	Tue Feb 10 12:26:30 1998
@@ -569,7 +569,7 @@
                  * preferably inplace
                  */
 
-                kfree_skb(skb, FREE_WRITE);
+                kfree_skb(skb);
         }
         return n_skb;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_options.c linux/net/ipv4/ip_options.c
--- v2.1.85/linux/net/ipv4/ip_options.c	Sun Nov 30 14:00:39 1997
+++ linux/net/ipv4/ip_options.c	Tue Feb 10 12:26:16 1998
@@ -452,7 +452,7 @@
 error:
 	if (skb) {
 		icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 	return -EINVAL;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_output.c linux/net/ipv4/ip_output.c
--- v2.1.85/linux/net/ipv4/ip_output.c	Sun Jan 18 12:28:34 1998
+++ linux/net/ipv4/ip_output.c	Tue Feb 10 12:25:39 1998
@@ -270,7 +270,7 @@
 		/* Multicasts with ttl 0 must not go beyond the host */
 
 		if (skb->nh.iph->ttl == 0) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return 0;
 		}
 	}
@@ -390,7 +390,7 @@
 		 * and if (uh...) TCP had segments queued on this route...
 		 */
 		skb2 = skb_realloc_headroom(skb, (dev->hard_header_len+15)&~15);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		if (skb2 == NULL)
 			return;
 		skb = skb2;
@@ -432,7 +432,7 @@
 	return;
 
 drop:
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 }
 
 /*
@@ -539,7 +539,7 @@
 #ifdef CONFIG_NET_SECURITY
 		if ((fw_res=call_out_firewall(PF_SECURITY, NULL, NULL, (void *) 5, &skb))<FW_ACCEPT)
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			if (fw_res != FW_QUEUE)
 				return -EPERM;
 			else
@@ -549,7 +549,7 @@
 
 		if (err)
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return err;
 		}
 
@@ -716,7 +716,7 @@
 #endif		
 		if (err)
  		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			dev_unlock_list();
 			return err;
  		}
@@ -789,7 +789,7 @@
 
 	if (mtu<8) {
 		ip_statistics.IpFragFails++;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -830,7 +830,7 @@
 		if ((skb2 = alloc_skb(len+hlen+dev->hard_header_len+15,GFP_ATOMIC)) == NULL) {
 			NETDEBUG(printk(KERN_INFO "IP: frag: no memory for new fragment!\n"));
 			ip_statistics.IpFragFails++;
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return;
 		}
 
@@ -903,7 +903,7 @@
 
 		output(skb2);
 	}
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	ip_statistics.IpFragOKs++;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ip_sockglue.c linux/net/ipv4/ip_sockglue.c
--- v2.1.85/linux/net/ipv4/ip_sockglue.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/ip_sockglue.c	Tue Feb 10 12:26:07 1998
@@ -351,7 +351,7 @@
 				struct sk_buff *skb;
 				/* Drain queued errors */
 				while((skb=skb_dequeue(&sk->error_queue))!=NULL)
-					kfree_skb(skb, FREE_READ);
+					kfree_skb(skb);
 			}
 			sk->ip_recverr = val?1:0;
 			release_sock(sk);
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ipconfig.c linux/net/ipv4/ipconfig.c
--- v2.1.85/linux/net/ipv4/ipconfig.c	Wed Feb  4 11:36:02 1998
+++ linux/net/ipv4/ipconfig.c	Tue Feb 10 12:25:20 1998
@@ -350,7 +350,7 @@
 
 	/* And throw the packet out... */
 drop:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ipip.c linux/net/ipv4/ipip.c
--- v2.1.85/linux/net/ipv4/ipip.c	Sun Nov 30 14:00:39 1997
+++ linux/net/ipv4/ipip.c	Tue Feb 10 12:25:00 1998
@@ -384,7 +384,7 @@
 
 	/* Try to guess incoming interface */
 	if (ip_route_output(&rt, eiph->saddr, 0, RT_TOS(eiph->tos), 0)) {
-		kfree_skb(skb2, FREE_WRITE);
+		kfree_skb(skb2);
 		return;
 	}
 	skb2->dev = rt->u.dst.dev;
@@ -396,14 +396,14 @@
 		if (ip_route_output(&rt, eiph->daddr, eiph->saddr, eiph->tos, 0) ||
 		    rt->u.dst.dev->type != ARPHRD_IPGRE) {
 			ip_rt_put(rt);
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 	} else {
 		ip_rt_put(rt);
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
 		    skb2->dst->dev->type != ARPHRD_IPGRE) {
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 	}
@@ -411,7 +411,7 @@
 	/* change mtu on this route */
 	if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
 		if (rel_info > skb2->dst->pmtu) {
-			kfree_skb(skb2, FREE_WRITE);
+			kfree_skb(skb2);
 			return;
 		}
 		skb2->dst->pmtu = rel_info;
@@ -425,7 +425,7 @@
 	}
 
 	icmp_send(skb2, rel_type, rel_code, rel_info);
-	kfree_skb(skb2, FREE_WRITE);
+	kfree_skb(skb2);
 	return;
 #endif
 }
@@ -454,7 +454,7 @@
 	}
 
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -548,11 +548,11 @@
 		if (!new_skb) {
 			ip_rt_put(rt);
   			stats->tx_dropped++;
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			tunnel->recursion--;
 			return 0;
 		}
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		skb = new_skb;
 	}
 
@@ -591,7 +591,7 @@
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_HOST_UNREACH, 0);
 tx_error:
 	stats->tx_errors++;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	tunnel->recursion--;
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
--- v2.1.85/linux/net/ipv4/ipmr.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/ipmr.c	Tue Feb 10 12:24:34 1998
@@ -135,7 +135,7 @@
 static int reg_vif_xmit(struct sk_buff *skb, struct device *dev)
 {
 	ipmr_cache_report(skb, reg_vif_num, IGMPMSG_WHOLEPKT);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -320,7 +320,7 @@
 				netlink_unicast(rtnl, skb, NETLINK_CB(skb).pid, MSG_DONTWAIT);
 			} else
 #endif
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		}
 	}
 	kfree_s(cache,sizeof(cache));
@@ -504,7 +504,7 @@
 	if ((ret=sock_queue_rcv_skb(mroute_socket,skb))<0) {
 		if (net_ratelimit())
 			printk(KERN_WARNING "mroute: pending queue full, dropping entries.\n");
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	return ret;
@@ -523,7 +523,7 @@
 		 */
 		if(cache_resolve_queue_len>=10 || (cache=ipmr_cache_alloc(GFP_ATOMIC))==NULL)
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -ENOBUFS;
 		}
 		/*
@@ -556,7 +556,7 @@
 			 */
 			if (ipmr_cache_report(skb, vifi, IGMPMSG_NOCACHE)<0) {
 				ipmr_cache_delete(cache);
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 				return -ENOBUFS;
 			}
 		}
@@ -566,7 +566,7 @@
 	 */
 	if(cache->mfc_queuelen>3)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENOBUFS;
 	}
 	cache->mfc_queuelen++;
@@ -1176,7 +1176,7 @@
 
 dont_forward:
 	if (!local)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	return 0;
 }
 
@@ -1234,7 +1234,7 @@
 			ipmr_cache_unresolved(cache, vif, skb);
 			return -EAGAIN;
 		}
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -1247,7 +1247,7 @@
 dont_forward:
 	if (local)
 		return ip_local_deliver(skb);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -1265,7 +1265,7 @@
 	    len < sizeof(*pim) + sizeof(*encap) ||
 	    pim->group != PIM_V1_VERSION || pim->code != PIM_V1_REGISTER ||
 	    reg_dev == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
                 return -EINVAL;
         }
 
@@ -1279,7 +1279,7 @@
 	if (!MULTICAST(encap->daddr) ||
 	    ntohs(encap->tot_len) == 0 ||
 	    ntohs(encap->tot_len) + sizeof(*pim) > len) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -EINVAL;
 	}
 	skb->mac.raw = skb->nh.raw;
@@ -1310,7 +1310,7 @@
 	    (pim->flags&PIM_NULL_REGISTER) ||
 	    reg_dev == NULL ||
 	    ip_compute_csum((void *)pim, len)) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
                 return -EINVAL;
         }
 
@@ -1319,7 +1319,7 @@
 	if (!MULTICAST(encap->daddr) ||
 	    ntohs(encap->tot_len) == 0 ||
 	    ntohs(encap->tot_len) + sizeof(*pim) > len) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -EINVAL;
 	}
 	skb->mac.raw = skb->nh.raw;
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/rarp.c linux/net/ipv4/rarp.c
--- v2.1.85/linux/net/ipv4/rarp.c	Thu Jan 15 14:33:07 1998
+++ linux/net/ipv4/rarp.c	Tue Feb 10 12:24:01 1998
@@ -228,7 +228,7 @@
 	if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd) 
 		|| dev->flags&IFF_NOARP || !in_dev || !in_dev->ifa_list)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -237,7 +237,7 @@
  */
 	if (rarp->ar_op != htons(ARPOP_RREQUEST))
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -255,7 +255,7 @@
 		/*
 		 *	This packet is not for us. Remove it. 
 		 */
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
   
@@ -287,7 +287,7 @@
 			dev->dev_addr, sha);
 	}
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/raw.c linux/net/ipv4/raw.c
--- v2.1.85/linux/net/ipv4/raw.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/raw.c	Tue Feb 10 12:21:39 1998
@@ -155,7 +155,7 @@
 	if (sk->ip_recverr && !sk->sock_readers) {
 		struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
 		if (skb2 && sock_queue_err_skb(sk, skb2))
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 	}
 
 	if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
@@ -173,7 +173,7 @@
 	if (__sock_queue_rcv_skb(sk,skb)<0)
 	{
 		ip_statistics.IpInDiscards++;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -1;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/route.c linux/net/ipv4/route.c
--- v2.1.85/linux/net/ipv4/route.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/route.c	Tue Feb 10 12:23:35 1998
@@ -500,6 +500,8 @@
 
 				if (!arp_bind_neighbour(&rt->u.dst) ||
 				    !(rt->u.dst.neighbour->nud_state&NUD_VALID)) {
+					if (rt->u.dst.neighbour)
+						neigh_event_send(rt->u.dst.neighbour, NULL);
 					ip_rt_put(rt);
 					rt_free(rt);
 					break;
@@ -599,7 +601,7 @@
 	switch (rt->u.dst.error) {
 	case EINVAL:
 	default:
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	case EHOSTUNREACH:
 		code = ICMP_HOST_UNREACH;
@@ -615,7 +617,7 @@
 		icmp_send(skb, ICMP_DEST_UNREACH, code, 0);
 		rt->last_error = jiffies;
 	}
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 } 
 
@@ -701,7 +703,7 @@
 {
 	printk(KERN_DEBUG "ip_rt_bug: %08x -> %08x, %s\n", skb->nh.iph->saddr,
 	       skb->nh.iph->daddr, skb->dev ? skb->dev->name : "?");
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -1415,7 +1417,7 @@
 				      rta->rta_oif ? *rta->rta_oif : 0);
 	}
 	if (err) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return err;
 	}
 
@@ -1478,7 +1480,7 @@
 
 nlmsg_failure:
 rtattr_failure:
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -EMSGSIZE;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
--- v2.1.85/linux/net/ipv4/tcp.c	Fri Jan 23 18:10:32 1998
+++ linux/net/ipv4/tcp.c	Tue Feb 10 12:21:58 1998
@@ -492,6 +492,8 @@
 
 /*
  *	Walk down the receive queue counting readable data.
+ *
+ *	Must be called with the socket lock held.
  */
 
 static int tcp_readable(struct sock *sk)
@@ -500,14 +502,11 @@
 	unsigned long amount;
 	struct sk_buff *skb;
 	int sum;
-	unsigned long flags;
 
 	SOCK_DEBUG(sk, "tcp_readable: %p - ",sk);
 
-	save_flags(flags);
-	cli();
-	if (sk == NULL || (skb = skb_peek(&sk->receive_queue)) == NULL) {
-		restore_flags(flags);
+	skb = skb_peek(&sk->receive_queue);
+	if (skb == NULL) {
 		SOCK_DEBUG(sk, "empty\n");
 	  	return(0);
 	}
@@ -560,7 +559,6 @@
 		skb = skb->next;
 	} while(skb != (struct sk_buff *)&sk->receive_queue);
 
-	restore_flags(flags);
 	SOCK_DEBUG(sk, "got %lu bytes.\n",amount);
 	return(amount);
 }
@@ -672,12 +670,18 @@
  */
 static void wait_for_tcp_connect(struct sock * sk)
 {
+	struct task_struct *tsk = current;
+	struct wait_queue wait = { tsk, NULL };
+
+	tsk->state = TASK_INTERRUPTIBLE;
+	add_wait_queue(sk->sleep, &wait);
 	release_sock(sk);
-	cli();
-	if (((1 << sk->state) & ~(TCPF_ESTABLISHED|TCPF_CLOSE_WAIT)) &&
-	    sk->err == 0)
-		interruptible_sleep_on(sk->sleep);
-	sti();
+
+	if (((1 << sk->state) & ~(TCPF_ESTABLISHED|TCPF_CLOSE_WAIT)) && sk->err == 0)
+		schedule();
+
+	tsk->state = TASK_RUNNING;
+	remove_wait_queue(sk->sleep, &wait);
 	lock_sock(sk);
 }
 
@@ -904,7 +908,7 @@
 			 */
 			tmp = tp->af_specific->build_net_header(sk, skb);
 			if (tmp < 0) {
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 				if (copied)
 					return(copied);
 				return(tmp);
@@ -1042,7 +1046,7 @@
 	sk->tp_pinfo.af_tcp.delayed_acks++;
 
 	__skb_unlink(skb, &sk->receive_queue);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 
@@ -1431,7 +1435,7 @@
 	 *  reader process may not have drained the data yet!
 	 */
 	while((skb=skb_dequeue(&sk->receive_queue))!=NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	/*  Timeout is not the same thing - however the code likes
 	 *  to send both the same way (sigh).
@@ -1440,17 +1444,25 @@
 		tcp_send_fin(sk);
 
 	if (timeout) {
-		cli();
+		struct task_struct *tsk = current;
+		struct wait_queue wait = { tsk, NULL };
+
+		tsk->state = TASK_INTERRUPTIBLE;
+		tsk->timeout = timeout;
+		add_wait_queue(sk->sleep, &wait);
 		release_sock(sk);
-		current->timeout = timeout;
-		while(closing(sk) && current->timeout) {
-			interruptible_sleep_on(sk->sleep);
-			if (signal_pending(current))
+
+		while (closing(sk)) {
+			schedule();
+			if (signal_pending(tsk) || !tsk->timeout)
 				break;
 		}
-		current->timeout=0;
+
+		tsk->timeout=0;
+		tsk->state = TASK_RUNNING;
+		remove_wait_queue(sk->sleep, &wait);
+		
 		lock_sock(sk);
-		sti();
 	}
 
 	/* Now that the socket is dead, if we are in the FIN_WAIT2 state
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/tcp_input.c linux/net/ipv4/tcp_input.c
--- v2.1.85/linux/net/ipv4/tcp_input.c	Sun Jan 18 12:28:34 1998
+++ linux/net/ipv4/tcp_input.c	Tue Feb 10 12:22:15 1998
@@ -763,7 +763,7 @@
 
 		skb_unlink(skb);
 		
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 
 	if (acked) {
@@ -1067,7 +1067,7 @@
 		if (!after(skb->end_seq, tp->rcv_nxt)) {
 			SOCK_DEBUG(sk, "ofo packet was already received \n");
 			skb_unlink(skb);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			continue;
 		}
 		SOCK_DEBUG(sk, "ofo requeuing : rcv_next %X seq %X - %X\n",
@@ -1106,7 +1106,7 @@
 		SOCK_DEBUG(sk, "retransmit received: seq %X\n", skb->seq);
 
 		tp->delayed_acks = MAX_DELAY_ACK;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -1135,7 +1135,7 @@
 			if (skb->seq == skb1->seq && skb->len >= skb1->len) {
  				skb_append(skb1, skb);
  				skb_unlink(skb1);
- 				kfree_skb(skb1, FREE_READ);
+ 				kfree_skb(skb1);
 				break;
 			}
 			
@@ -1345,7 +1345,7 @@
 	 * useful packets (crossing fingers).
 	 */
 	while ((skb = skb_dequeue_tail(&sk->out_of_order_queue))) { 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		if (atomic_read(&sk->rmem_alloc) <= sk->rcvbuf)
 			return;
 	}
@@ -1362,7 +1362,7 @@
 		}
 		skb_unlink(skb);
 		tp->rcv_nxt = skb->seq;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		if (atomic_read(&sk->rmem_alloc) <= sk->rcvbuf) 
 			break;
 	}
@@ -1420,7 +1420,7 @@
 			/* Bulk data transfer: sender */
 			if (len == th->doff*4) {
 				tcp_ack(sk, th, skb->seq, skb->ack_seq, len); 
-				kfree_skb(skb, FREE_READ); 
+				kfree_skb(skb); 
 				tcp_data_snd_check(sk);
 				return 0;
 			} else { /* Header too small */
@@ -1504,7 +1504,7 @@
 
 	if (!queued) {
 	discard:
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	return 0;
@@ -1929,7 +1929,7 @@
 
 	if (!queued) { 
 discard:
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/tcp_ipv4.c linux/net/ipv4/tcp_ipv4.c
--- v2.1.85/linux/net/ipv4/tcp_ipv4.c	Sun Jan 18 12:28:35 1998
+++ linux/net/ipv4/tcp_ipv4.c	Tue Feb 10 12:22:32 1998
@@ -629,7 +629,7 @@
 		 */
 		sk->daddr = 0;
 		sk->saddr = sk->rcv_saddr = 0;
-		kfree_skb(buff, FREE_WRITE);
+		kfree_skb(buff);
 		release_sock(sk);
 		return(-ENETUNREACH);
 	}
@@ -1057,7 +1057,7 @@
 
 	if(ip_build_pkt(skb, sk, req->af.v4_req.loc_addr,
 			req->af.v4_req.rmt_addr, req->af.v4_req.opt) < 0) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 	
@@ -1538,7 +1538,7 @@
 reset:
 	tcp_v4_send_reset(skb);
 discard:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	/* Be careful here. If this function gets more complicated and
 	 * gcc suffers from register pressure on the x86, sk (in %ebx) 
 	 * might be destroyed here. This current version compiles correctly,
@@ -1615,7 +1615,7 @@
 
 discard_it:
 	/* Discard frame. */
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
   	return 0;
 }
 
@@ -1814,11 +1814,11 @@
 
 	/* Cleanup up the write buffer. */
   	while((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	/* Cleans up our, hopefuly empty, out_of_order_queue. */
   	while((skb = skb_dequeue(&sk->out_of_order_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/tcp_output.c linux/net/ipv4/tcp_output.c
--- v2.1.85/linux/net/ipv4/tcp_output.c	Sun Jan 18 12:28:34 1998
+++ linux/net/ipv4/tcp_output.c	Tue Feb 10 12:23:12 1998
@@ -106,7 +106,7 @@
 		printk(KERN_DEBUG "tcp_send_skb: bad skb "
 		       "(skb = %p, data = %p, th = %p, len = %u)\n",
 		       skb, skb->data, th, skb->len);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -118,7 +118,7 @@
 		/* If it's got a syn or fin discard. */
 		if(!th->syn && !th->fin) {
 			printk(KERN_DEBUG "tcp_send_skb: attempt to queue a bogon.\n");
-			kfree_skb(skb,FREE_WRITE);
+			kfree_skb(skb);
 			return;
 		}
 	}
@@ -205,7 +205,7 @@
 	/* Put headers on the new packet. */
 	tmp = tp->af_specific->build_net_header(sk, buff);
 	if (tmp < 0) {
-		kfree_skb(buff, FREE_WRITE);
+		kfree_skb(buff);
 		return -1;
 	}
 		
@@ -263,7 +263,7 @@
 	update_send_head(sk);
 
 	skb_unlink(skb);	
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 	if (!sk->dead)
 		sk->write_space(sk);
@@ -597,7 +597,7 @@
 		th1->fin = 1;
 
 	/* ... and off you go. */
-	kfree_skb(buff, FREE_WRITE);
+	kfree_skb(buff);
 	tp->packets_out--;
 
 	/* Header checksum will be set by the retransmit procedure
@@ -759,7 +759,7 @@
   		/* FIXME: We must not throw this out. Eventually we must
                  * put a FIN into the queue, otherwise it never gets queued.
   		 */
-		kfree_skb(buff, FREE_WRITE);
+		kfree_skb(buff);
 		sk->write_seq++;
 		t = del_timer(&sk->timer);
 		if (t)
@@ -829,7 +829,7 @@
 
 	tmp = tp->af_specific->build_net_header(sk, skb);
 	if (tmp < 0) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return tmp;
 	}
 
@@ -950,7 +950,7 @@
 	/* Put in the IP header and routing stuff. */
 	tmp = tp->af_specific->build_net_header(sk, buff);
 	if (tmp < 0) {
-		kfree_skb(buff, FREE_WRITE);
+		kfree_skb(buff);
 		return;
 	}
 
@@ -1043,7 +1043,7 @@
 		/* Put in the IP header and routing stuff. */
 		tmp = tp->af_specific->build_net_header(sk, buff);
 		if (tmp < 0) {
-			kfree_skb(buff, FREE_WRITE);
+			kfree_skb(buff);
 			return;
 		}
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv4/udp.c linux/net/ipv4/udp.c
--- v2.1.85/linux/net/ipv4/udp.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv4/udp.c	Tue Feb 10 12:22:58 1998
@@ -492,7 +492,7 @@
 	if (sk->ip_recverr && !sk->sock_readers) {
 		struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
 		if (skb2 && sock_queue_err_skb(sk, skb2))
-			kfree_skb(skb2, FREE_READ);
+			kfree_skb(skb2);
 	}
   	
 	switch (type) {
@@ -971,7 +971,7 @@
 	 
 	if(!ipsec_sk_policy(sk,skb))
 	{	
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return(0);
 	}
 	 
@@ -983,7 +983,7 @@
 		udp_statistics.UdpInErrors++;
 		ip_statistics.IpInDiscards++;
 		ip_statistics.IpInDelivers--;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -1;
 	}
 	udp_statistics.UdpInDatagrams++;
@@ -1031,7 +1031,7 @@
 	}
 	SOCKHASH_UNLOCK();
 	if(!given)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	return 0;
 }
 
@@ -1094,7 +1094,7 @@
 	if (ulen > len || len < sizeof(*uh) || ulen < sizeof(*uh)) {
 		NETDEBUG(printk(KERN_DEBUG "UDP: short packet: %d/%d\n", ulen, len));
 		udp_statistics.UdpInErrors++;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return(0);
 	}
 
@@ -1113,7 +1113,7 @@
 		       ntohl(daddr),ntohs(uh->dest),
 		       ulen));
 		udp_statistics.UdpInErrors++;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return(0);
 	}
 
@@ -1149,7 +1149,7 @@
 		 * Hmm.  We got an UDP broadcast to a port to which we
 		 * don't wanna listen.  Ignore it.
 		 */
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return(0);
   	}
 	udp_deliver(sk, skb);
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/exthdrs.c linux/net/ipv6/exthdrs.c
--- v2.1.85/linux/net/ipv6/exthdrs.c	Thu Mar 27 14:40:16 1997
+++ linux/net/ipv6/exthdrs.c	Tue Feb 10 13:07:49 1998
@@ -77,7 +77,7 @@
 			pos += 1;
 
 		icmpv6_send(skb, ICMPV6_PARAMETER_PROB, 0, pos, dev);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;	
 	}
 
@@ -94,7 +94,7 @@
 		pos += 3;
 
 		icmpv6_send(skb, ICMPV6_PARAMETER_PROB, 0, pos, dev);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -107,7 +107,7 @@
 	addr_type = ipv6_addr_type(addr);
 
 	if (addr_type == IPV6_ADDR_MULTICAST) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/icmp.c linux/net/ipv6/icmp.c
--- v2.1.85/linux/net/ipv6/icmp.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/icmp.c	Tue Feb 10 13:07:49 1998
@@ -499,7 +499,7 @@
 	};
 
 discard_it:
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/ip6_fw.c linux/net/ipv6/ip6_fw.c
--- v2.1.85/linux/net/ipv6/ip6_fw.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/ip6_fw.c	Tue Feb 10 13:07:49 1998
@@ -266,14 +266,14 @@
 	 *	send it via netlink, as (rule, skb)
 	 */
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
 int ip6_fw_discard(struct sk_buff *skb)
 {
 	printk(KERN_DEBUG "ip6_fw: BUG fw_reject called\n");
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/ip6_input.c linux/net/ipv6/ip6_input.c
--- v2.1.85/linux/net/ipv6/ip6_input.c	Sun Nov 30 14:00:39 1997
+++ linux/net/ipv6/ip6_input.c	Tue Feb 10 13:07:49 1998
@@ -121,7 +121,7 @@
 				    ICMPV6_UNK_OPTION, pos, skb->dev);
 	};
 	
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -183,7 +183,7 @@
 	int pkt_len;
 
 	if (skb->pkt_type == PACKET_OTHERHOST) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -204,7 +204,7 @@
 	return 0;
 err:
 	ipv6_statistics.Ip6InHdrErrors++;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -358,7 +358,7 @@
 		offset = nhptr - (u8*) hdr;
 		icmpv6_send(skb, ICMPV6_PARAMPROB, ICMPV6_UNK_NEXTHDR,
 			    offset, skb->dev);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	return 0;
@@ -407,7 +407,7 @@
 	}
 
 	if (discard)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/ip6_output.c linux/net/ipv6/ip6_output.c
--- v2.1.85/linux/net/ipv6/ip6_output.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/ip6_output.c	Tue Feb 10 13:07:49 1998
@@ -60,7 +60,7 @@
 		return dst->neighbour->output(skb);
 
 	printk(KERN_DEBUG "khm\n");
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return -EINVAL;
 }
 
@@ -341,7 +341,7 @@
 				      nfrags * frag_len, frag_len);
 
 			if (err) {
-				kfree_skb(skb, FREE_WRITE);
+				kfree_skb(skb);
 				break;
 			}
 
@@ -351,7 +351,7 @@
 	}
 
 	if (err) {
-		kfree_skb(last_skb, FREE_WRITE);
+		kfree_skb(last_skb);
 		return -EFAULT;
 	}
 
@@ -490,7 +490,7 @@
 			dst->output(skb);
 		} else {
 			err = -EFAULT;
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		}
 	} else {
 		if (sk->ip_hdrincl)
@@ -529,7 +529,7 @@
 	int size;
 	
 	if (ipv6_config.forwarding == 0) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -EINVAL;
 	}
 
@@ -548,7 +548,7 @@
 		icmpv6_send(skb, ICMPV6_TIME_EXCEED, ICMPV6_EXC_HOPLIMIT,
 			    0, skb->dev);
 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -ETIMEDOUT;
 	}
 
@@ -577,14 +577,14 @@
 
 	if (size > dst->pmtu) {
 		icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, dst->pmtu, skb->dev);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return -EMSGSIZE;
 	}
 
 	if (skb_headroom(skb) < dst->dev->hard_header_len || skb_cloned(skb)) {
 		struct sk_buff *skb2;
 		skb2 = skb_realloc_headroom(skb, (dst->dev->hard_header_len + 15)&~15);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		skb = skb2;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/ndisc.c linux/net/ipv6/ndisc.c
--- v2.1.85/linux/net/ipv6/ndisc.c	Thu Jan 15 14:33:07 1998
+++ linux/net/ipv6/ndisc.c	Tue Feb 10 13:07:49 1998
@@ -320,7 +320,7 @@
 	}
 
 	if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -384,7 +384,7 @@
 	}
 
 	if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -434,7 +434,7 @@
 	}
 
 	if (ndisc_build_ll_hdr(skb, dev, daddr, NULL, len) == 0) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -489,7 +489,7 @@
 	 *	 destination unreachable"
 	 */
 	icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, skb->dev);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 }
 
 static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb)
@@ -831,7 +831,7 @@
 	hlen = 0;
 
 	if (ndisc_build_ll_hdr(buff, dev, &skb->nh.ipv6h->saddr, NULL, len) == 0) {
-		kfree_skb(buff, FREE_WRITE);
+		kfree_skb(buff);
 		return;
 	}
 	
@@ -909,7 +909,7 @@
 {
 	ndisc_rcv(skb, skb->dev, &skb->nh.ipv6h->saddr, &skb->nh.ipv6h->daddr,
 		  NULL, skb->len);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 }
 
 int ndisc_rcv(struct sk_buff *skb, struct device *dev,
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/raw.c linux/net/ipv6/raw.c
--- v2.1.85/linux/net/ipv6/raw.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/raw.c	Tue Feb 10 13:07:49 1998
@@ -194,7 +194,7 @@
 	/* Charge it to the socket. */
 	if (sock_queue_rcv_skb(sk,skb)<0) {
 		/* ip_statistics.IpInDiscards++; */
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/reassembly.c linux/net/ipv6/reassembly.c
--- v2.1.85/linux/net/ipv6/reassembly.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/reassembly.c	Tue Feb 10 13:07:49 1998
@@ -112,7 +112,7 @@
 	struct ipv6_frag *fp, *back;
 
 	for(fp = fq->fragments; fp; ) {
-		kfree_skb(fp->skb, FREE_READ);		
+		kfree_skb(fp->skb);		
 		back = fp;
 		fp=fp->next;
 		kfree(back);
@@ -159,7 +159,7 @@
 					   GFP_ATOMIC);
 
 	if (fq == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -201,7 +201,7 @@
 					   GFP_ATOMIC);
 
 	if (nfp == NULL) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -230,7 +230,7 @@
 		}
 
 		/* duplicate. discard it. */
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		kfree(nfp);
 		return;
 	}
@@ -308,7 +308,7 @@
 		struct ipv6_frag *back;
 
 		memcpy(skb_put(skb, fp->len), (__u8*)(fp->fhdr + 1), fp->len);
-		kfree_skb(fp->skb, FREE_READ);
+		kfree_skb(fp->skb);
 		back = fp;
 		fp=fp->next;
 		kfree(back);
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/route.c linux/net/ipv6/route.c
--- v2.1.85/linux/net/ipv6/route.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/route.c	Tue Feb 10 13:07:49 1998
@@ -910,7 +910,7 @@
 
 out:
 	rtnl_unlock();
-	kfree_skb(skb, FREE_READ);	
+	kfree_skb(skb);	
 	return count;
 }
 
@@ -926,7 +926,7 @@
 	       sizeof(struct in6_rtmsg));
 	
 	if (netlink_post(NETLINK_ROUTE6, skb))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 void rt6_sndmsg(int type, struct in6_addr *dst, struct in6_addr *src,
@@ -966,7 +966,7 @@
 	msg->rtmsg_flags = flags;
 
 	if (netlink_post(NETLINK_ROUTE6, skb))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 #endif /* CONFIG_IPV6_NETLINK */
 
@@ -1336,7 +1336,7 @@
 int ip6_pkt_discard(struct sk_buff *skb)
 {	
 	ipv6_statistics.Ip6OutNoRoutes++;
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/sit.c linux/net/ipv6/sit.c
--- v2.1.85/linux/net/ipv6/sit.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/sit.c	Tue Feb 10 13:07:49 1998
@@ -330,7 +330,7 @@
 			icmpv6_send(skb2, rel_type, rel_code, rel_info, skb2->dev);
 		}
 	}
-	kfree_skb(skb2, FREE_WRITE);
+	kfree_skb(skb2);
 	return;
 #endif
 }
@@ -359,7 +359,7 @@
 	}
 
 	icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -472,11 +472,11 @@
 		if (!new_skb) {
 			ip_rt_put(rt);
   			stats->tx_dropped++;
-			dev_kfree_skb(skb, FREE_WRITE);
+			dev_kfree_skb(skb);
 			tunnel->recursion--;
 			return 0;
 		}
-		dev_kfree_skb(skb, FREE_WRITE);
+		dev_kfree_skb(skb);
 		skb = new_skb;
 	}
 
@@ -520,7 +520,7 @@
 	icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_ADDR_UNREACH, 0, dev);
 tx_error:
 	stats->tx_errors++;
-	dev_kfree_skb(skb, FREE_WRITE);
+	dev_kfree_skb(skb);
 	tunnel->recursion--;
 	return 0;
 }
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/tcp_ipv6.c linux/net/ipv6/tcp_ipv6.c
--- v2.1.85/linux/net/ipv6/tcp_ipv6.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/tcp_ipv6.c	Tue Feb 10 13:07:49 1998
@@ -685,7 +685,7 @@
 
 	dst = ip6_route_output(sk, &fl);
 	if (dst->error) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		dst_release(dst);
 		return;
 	}
@@ -1247,7 +1247,7 @@
 	 *	Discard frame
 	 */
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -1454,14 +1454,14 @@
 	 */
 
   	while((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	/*
 	 *  Cleans up our, hopefuly empty, out_of_order_queue
 	 */
 
   	while((skb = skb_dequeue(&sk->out_of_order_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	/*
 	 *	Release destination entry
diff -u --recursive --new-file v2.1.85/linux/net/ipv6/udp.c linux/net/ipv6/udp.c
--- v2.1.85/linux/net/ipv6/udp.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipv6/udp.c	Tue Feb 10 13:07:49 1998
@@ -402,7 +402,7 @@
 		ipv6_statistics.Ip6InDiscards++;
 		ipv6_statistics.Ip6InDelivers--;
 		skb->sk = NULL;
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 0;
 	}
 	udp_stats_in6.UdpInDatagrams++;
@@ -467,13 +467,13 @@
 			struct sk_buff *buff = skb_clone(skb, GFP_ATOMIC);
 			if(sock_queue_rcv_skb(sk, buff) < 0) {
 				buff->sk = NULL;
-				kfree_skb(buff, FREE_READ);
+				kfree_skb(buff);
 			}
 		}
 	}
 	if(!sk || sock_queue_rcv_skb(sk, skb) < 0) {
 		skb->sk = NULL;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 }
 
@@ -500,7 +500,7 @@
 	if (ulen > len || len < sizeof(*uh)) {
 		printk(KERN_DEBUG "UDP: short packet: %d/%d\n", ulen, len);
 		udp_stats_in6.UdpInErrors++;
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return(0);
 	}
 
@@ -543,7 +543,7 @@
 
 		icmpv6_send(skb, ICMPV6_DEST_UNREACH, ICMPV6_PORT_UNREACH, 0, dev);
 		
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return(0);
 	}
 
@@ -558,7 +558,7 @@
 
 discard:
 	udp_stats_in6.UdpInErrors++;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return(0);	
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
--- v2.1.85/linux/net/ipx/af_ipx.c	Mon Jan 12 15:28:28 1998
+++ linux/net/ipx/af_ipx.c	Tue Feb 10 13:09:00 1998
@@ -210,7 +210,7 @@
 
 	ipx_remove_socket(sk);
 	while((skb=skb_dequeue(&sk->receive_queue))!=NULL) {
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 	}
 
 	sk_free(sk);
@@ -378,11 +378,7 @@
 
 	if((retval = sock_queue_rcv_skb(sock, skb))<0)
 	{
-		/*
-		 * skb->sk is NULL here, so FREE_WRITE does not hurt
-		 * the sending socket.
-	 	 */
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 	}
 	return retval;
 }
@@ -439,10 +435,9 @@
 	if (copy == 0)
 	{
 		/* skb was solely for us, and we did not make a copy,
-		 * so free it. FREE_WRITE does not hurt, because
-		 * skb->sk is NULL here.
+		 * so free it.
 		 */
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 	return 0;
 }
@@ -494,7 +489,7 @@
 	if (sock1 == NULL && sock2 == NULL)
 	{
 		if (!copy)
-			kfree_skb(skb,FREE_WRITE);
+			kfree_skb(skb);
 		return 0;
 	}
 
@@ -563,7 +558,7 @@
 		skb2->h.raw=skb_put(skb2,skb->len);
 		memcpy(skb2->h.raw, skb->h.raw, skb->len);
 	}
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return NULL;
 }
 
@@ -636,15 +631,7 @@
 
 	if (!send_to_wire)
 	{
-		/*
-		 *	We do a FREE_WRITE here because this indicates how
-		 *	to treat the socket with which the packet is
-	 	 *	associated.  If this packet is associated with a
-		 *	socket at all, it must be the originator of the
-		 *	packet.   Routed packets will have no socket associated
-		 *	with them.
-		 */
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -708,7 +695,7 @@
 
 	if (call_in_firewall(PF_IPX, skb->dev, ipx, NULL, &skb)!=FW_ACCEPT)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -801,20 +788,20 @@
 		 */
 		if (call_fw_firewall(PF_IPX, skb->dev, ipx, NULL, &skb)!=FW_ACCEPT)
 		{
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 
 		/* We only route point-to-point packets. */
 		if (skb->pkt_type == PACKET_HOST)
 		{
-			skb=skb_unshare(skb, GFP_ATOMIC, FREE_READ);
+			skb=skb_unshare(skb, GFP_ATOMIC);
 			if(skb)
 				return ipxrtr_route_skb(skb);
 			else
 				return 0;
 		}
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -826,7 +813,7 @@
 	}
 
 	/* we couldn't pawn it off so unload it */
-	kfree_skb(skb,FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -1381,7 +1368,7 @@
 	err = memcpy_fromiovec(skb_put(skb,len),iov,len);
 	if (err) 
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -EFAULT; 
 	}	
 
@@ -1396,7 +1383,7 @@
 
 	if(call_out_firewall(PF_IPX, skb->dev, ipx, NULL, &skb)!=FW_ACCEPT)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -EPERM;
 	}
 	
@@ -1414,7 +1401,7 @@
 	if (r == NULL)
 	{
 		/* no known route */
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	i = r->ir_intrfc;
@@ -2039,7 +2026,7 @@
 	
 	/* Too small? */
 	if(ntohs(ipx->ipx_pktsize)<sizeof(struct ipxhdr)) {
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	
@@ -2047,7 +2034,7 @@
 	{
 		if(ipx_set_checksum(ipx, ntohs(ipx->ipx_pktsize))!=ipx->ipx_checksum)
 		{
-			kfree_skb(skb,FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 	}
@@ -2064,7 +2051,7 @@
 
 		if (intrfc == NULL) {
 			/* Not one of ours */
-			kfree_skb(skb,FREE_READ);
+			kfree_skb(skb);
 			return 0;
 		}
 	}
diff -u --recursive --new-file v2.1.85/linux/net/lapb/lapb_in.c linux/net/lapb/lapb_in.c
--- v2.1.85/linux/net/lapb/lapb_in.c	Mon Jul  7 08:19:59 1997
+++ linux/net/lapb/lapb_in.c	Tue Feb 10 13:07:49 1998
@@ -114,7 +114,7 @@
 			break;
 	}
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 /*
@@ -206,7 +206,7 @@
 			break;
 	}
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 /*
@@ -278,7 +278,7 @@
 			break;
 	}
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 /*
@@ -523,7 +523,7 @@
 	}
 
 	if (!queued)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 /*
@@ -595,7 +595,7 @@
 			break;
 	}
 
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 /*
diff -u --recursive --new-file v2.1.85/linux/net/lapb/lapb_out.c linux/net/lapb/lapb_out.c
--- v2.1.85/linux/net/lapb/lapb_out.c	Mon Jul  7 08:19:59 1997
+++ linux/net/lapb/lapb_out.c	Tue Feb 10 13:07:49 1998
@@ -158,7 +158,7 @@
 #endif
 
 	if (!lapb_data_transmit(lapb, skb))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 void lapb_establish_data_link(lapb_cb *lapb)
diff -u --recursive --new-file v2.1.85/linux/net/lapb/lapb_subr.c linux/net/lapb/lapb_subr.c
--- v2.1.85/linux/net/lapb/lapb_subr.c	Mon Jul  7 08:19:59 1997
+++ linux/net/lapb/lapb_subr.c	Tue Feb 10 13:07:49 1998
@@ -43,10 +43,10 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&lapb->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&lapb->ack_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 /*
@@ -67,7 +67,7 @@
 	if (lapb->va != nr) {
 		while (skb_peek(&lapb->ack_queue) != NULL && lapb->va != nr) {
 		        skb = skb_dequeue(&lapb->ack_queue);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			lapb->va = (lapb->va + 1) % modulus;
 		}
 	}
diff -u --recursive --new-file v2.1.85/linux/net/netbeui/af_netbeui.c linux/net/netbeui/af_netbeui.c
--- v2.1.85/linux/net/netbeui/af_netbeui.c	Tue May 13 22:41:24 1997
+++ linux/net/netbeui/af_netbeui.c	Tue Feb 10 13:07:49 1998
@@ -414,7 +414,7 @@
 	err = memcpy_fromiovec(skb_put(skb,len),msg->msg_iov,len);
 	if (err)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -EFAULT;
 	}
 
@@ -422,14 +422,14 @@
 
 	if(call_out_firewall(AF_NETBEUI, skb->dev, nbp, NULL)!=FW_ACCEPT)
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -EPERM;
 	}
 
 #endif
 
 	if(nb_send_low(dev,skb,&usat->sat_addr, NULL)==-1)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	SOCK_DEBUG(sk, "SK %p: Done write (%d).\n", sk, len);
 	return len;
 }
diff -u --recursive --new-file v2.1.85/linux/net/netbeui/netbeui_llc.c linux/net/netbeui/netbeui_llc.c
--- v2.1.85/linux/net/netbeui/netbeui_llc.c	Thu Feb 27 10:57:32 1997
+++ linux/net/netbeui/netbeui_llc.c	Tue Feb 10 13:07:49 1998
@@ -163,7 +163,7 @@
 	/* We ignore TST, XID, FRMR stuff */
 	/* FIXME: We need to free frames here once I fix the callback! */
 	if(llc->inc_skb)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 /*
diff -u --recursive --new-file v2.1.85/linux/net/netbeui/netbeui_name.c linux/net/netbeui/netbeui_name.c
--- v2.1.85/linux/net/netbeui/netbeui_name.c	Mon Jan 12 15:28:28 1998
+++ linux/net/netbeui/netbeui_name.c	Tue Feb 10 13:07:49 1998
@@ -85,7 +85,7 @@
 			nb_complete(nb,skb);
 		}
 	}
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -139,7 +139,7 @@
 			}		
 		}
 	}
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
 void netbeui_name_query(struct dev *dev, struct sk_buff *skb)
@@ -158,6 +158,6 @@
 			dev_queue_xmit(nskb);
 		}
 	}
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 }
 
diff -u --recursive --new-file v2.1.85/linux/net/netrom/af_netrom.c linux/net/netrom/af_netrom.c
--- v2.1.85/linux/net/netrom/af_netrom.c	Sat Sep 20 14:51:55 1997
+++ linux/net/netrom/af_netrom.c	Tue Feb 10 13:07:49 1998
@@ -300,7 +300,7 @@
 			skb->sk->protinfo.nr->state = NR_STATE_0;
 		}
 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	if (atomic_read(&sk->wmem_alloc) != 0 || atomic_read(&sk->rmem_alloc) != 0) {
@@ -763,7 +763,7 @@
 
 	/* Now attach up the new socket */
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	sk->ack_backlog--;
 	newsock->sk = newsk;
 
@@ -999,7 +999,7 @@
 	SOCK_DEBUG(sk, "NET/ROM: Transmitting buffer\n");
 
 	if (sk->state != TCP_ESTABLISHED) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENOTCONN;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/netrom/nr_dev.c linux/net/netrom/nr_dev.c
--- v2.1.85/linux/net/netrom/nr_dev.c	Mon Jan 12 15:28:28 1998
+++ linux/net/netrom/nr_dev.c	Tue Feb 10 13:07:49 1998
@@ -123,7 +123,7 @@
 	if (arp_find(bp + 7, skb)) {
 #if 0
 		/* BUGGGG! If arp_find returned 1, skb does not exist. --ANK*/
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 #endif
 		return 1;
 	}
@@ -138,17 +138,17 @@
 	bp[6] |= AX25_SSSID_SPARE;
 
 	if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 1;
 	}
 
 	if (skb->sk != NULL)
 		skb_set_owner_w(skbn, skb->sk);
 
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 	if (!nr_route_frame(skbn, NULL)) {
-		kfree_skb(skbn, FREE_WRITE);
+		kfree_skb(skbn);
 		stats->tx_errors++;
 	}
 
@@ -219,7 +219,7 @@
 
 	sti();
 
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 	stats->tx_errors++;
 
diff -u --recursive --new-file v2.1.85/linux/net/netrom/nr_in.c linux/net/netrom/nr_in.c
--- v2.1.85/linux/net/netrom/nr_in.c	Mon Jul  7 08:19:59 1997
+++ linux/net/netrom/nr_in.c	Tue Feb 10 13:07:49 1998
@@ -74,7 +74,7 @@
 
 		while ((skbo = skb_dequeue(&sk->protinfo.nr->frag_queue)) != NULL) {
 			memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
-			kfree_skb(skbo, FREE_READ);
+			kfree_skb(skbo);
 		}
 
 		sk->protinfo.nr->fraglen = 0;		
@@ -246,7 +246,7 @@
 					} else if (nr_in_rx_window(sk, ns)) {
 						skb_queue_tail(&temp_queue, skbn);
 					} else {
-						kfree_skb(skbn, FREE_READ);
+						kfree_skb(skbn);
 					}
 				}
 				while ((skbn = skb_dequeue(&temp_queue)) != NULL) {
diff -u --recursive --new-file v2.1.85/linux/net/netrom/nr_out.c linux/net/netrom/nr_out.c
--- v2.1.85/linux/net/netrom/nr_out.c	Mon Jul  7 08:20:00 1997
+++ linux/net/netrom/nr_out.c	Tue Feb 10 13:07:49 1998
@@ -79,7 +79,7 @@
 			skb_queue_tail(&sk->write_queue, skbn); /* Throw it on the queue */
 		}
 
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	} else {
 		skb_queue_tail(&sk->write_queue, skb);		/* Throw it on the queue */
 	}
@@ -216,7 +216,7 @@
 	*dptr++ = sysctl_netrom_network_ttl_initialiser;
 
 	if (!nr_route_frame(skb, NULL)) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		nr_disconnect(sk, ENETUNREACH);
 	}
 }
diff -u --recursive --new-file v2.1.85/linux/net/netrom/nr_subr.c linux/net/netrom/nr_subr.c
--- v2.1.85/linux/net/netrom/nr_subr.c	Mon Jul  7 08:20:00 1997
+++ linux/net/netrom/nr_subr.c	Tue Feb 10 13:07:49 1998
@@ -47,16 +47,16 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.nr->ack_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.nr->reseq_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.nr->frag_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 /*
@@ -74,7 +74,7 @@
 	if (sk->protinfo.nr->va != nr) {
 		while (skb_peek(&sk->protinfo.nr->ack_queue) != NULL && sk->protinfo.nr->va != nr) {
 		        skb = skb_dequeue(&sk->protinfo.nr->ack_queue);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			sk->protinfo.nr->va = (sk->protinfo.nr->va + 1) % NR_MODULUS;
 		}
 	}
@@ -266,7 +266,7 @@
 	*dptr++ = 0;
 
 	if (!nr_route_frame(skbn, NULL))
-		kfree_skb(skbn, FREE_WRITE);
+		kfree_skb(skbn);
 }
 
 void nr_disconnect(struct sock *sk, int reason)
diff -u --recursive --new-file v2.1.85/linux/net/packet/af_packet.c linux/net/packet/af_packet.c
--- v2.1.85/linux/net/packet/af_packet.c	Fri Jan 30 11:28:10 1998
+++ linux/net/packet/af_packet.c	Tue Feb 10 12:45:04 1998
@@ -220,7 +220,7 @@
 	 */
 
 	if (skb->pkt_type == PACKET_LOOPBACK) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -241,7 +241,7 @@
 
 	if (sock_queue_rcv_skb(sk,skb)<0)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -362,7 +362,7 @@
 
 	if (err) 
 	{
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return err;
 	}
 
@@ -384,7 +384,7 @@
 	sk = (struct sock *) pt->data;
 
 	if (skb->pkt_type == PACKET_LOOPBACK) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -423,7 +423,7 @@
 
 	if (sock_queue_rcv_skb(sk,skb)<0)
 	{
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 	return(0);
@@ -488,7 +488,7 @@
 				     saddr ? saddr->sll_addr : NULL,
 				     NULL, len) < 0
 		    && sock->type == SOCK_DGRAM) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			dev_unlock_list();
 			return -EINVAL;
 		}
@@ -516,7 +516,7 @@
 	}
 
 	if (err) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return err;
 	}
 
@@ -585,7 +585,7 @@
 	/* Purge queues */
 
 	while ((skb=skb_dequeue(&sk->receive_queue))!=NULL)
-		kfree_skb(skb,FREE_READ);
+		kfree_skb(skb);
 
 	if (atomic_read(&sk->rmem_alloc) || atomic_read(&sk->wmem_alloc)) {
 		sk->timer.data=(unsigned long)sk;
diff -u --recursive --new-file v2.1.85/linux/net/rose/af_rose.c linux/net/rose/af_rose.c
--- v2.1.85/linux/net/rose/af_rose.c	Sun Nov 30 14:00:40 1997
+++ linux/net/rose/af_rose.c	Tue Feb 10 13:07:49 1998
@@ -378,7 +378,7 @@
 			skb->sk->protinfo.rose->state = ROSE_STATE_0;
 		}
 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	if (atomic_read(&sk->wmem_alloc) != 0 || atomic_read(&sk->rmem_alloc) != 0) {
@@ -851,7 +851,7 @@
 
 	/* Now attach up the new socket */
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	sk->ack_backlog--;
 	newsock->sk = newsk;
 
@@ -1064,7 +1064,7 @@
 	SOCK_DEBUG(sk, "ROSE: Transmitting buffer\n");
 	
 	if (sk->state != TCP_ESTABLISHED) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENOTCONN;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/rose/rose_dev.c linux/net/rose/rose_dev.c
--- v2.1.85/linux/net/rose/rose_dev.c	Mon Jan 12 15:28:28 1998
+++ linux/net/rose/rose_dev.c	Tue Feb 10 13:07:49 1998
@@ -104,23 +104,23 @@
 	if (arp_find(bp + 7, skb)) {
 #if 0
 		/* BUGGGG! If arp_find returned 1, skb does not exist. --ANK*/
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 #endif
 		return 1;
 	}
 
 	if ((skbn = skb_clone(skb, GFP_ATOMIC)) == NULL) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 1;
 	}
 
 	if (skb->sk != NULL)
 		skb_set_owner_w(skbn, skb->sk);
 
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 	if (!rose_route_frame(skbn, NULL)) {
-		kfree_skb(skbn, FREE_WRITE);
+		kfree_skb(skbn);
 		stats->tx_errors++;
 	}
 
@@ -191,7 +191,7 @@
 
 	sti();
 
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 
 	stats->tx_errors++;
 
diff -u --recursive --new-file v2.1.85/linux/net/rose/rose_link.c linux/net/rose/rose_link.c
--- v2.1.85/linux/net/rose/rose_link.c	Sun Nov 30 14:00:40 1997
+++ linux/net/rose/rose_link.c	Tue Feb 10 13:07:49 1998
@@ -169,7 +169,7 @@
 	if (neigh->restarted) {
 		while ((skbn = skb_dequeue(&neigh->queue)) != NULL)
 			if (!rose_send_frame(skbn, neigh))
-				kfree_skb(skbn, FREE_WRITE);
+				kfree_skb(skbn);
 	}
 }
 
@@ -199,7 +199,7 @@
 	*dptr++ = 0;
 
 	if (!rose_send_frame(skb, neigh))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 /*
@@ -226,7 +226,7 @@
 	*dptr++ = ROSE_RESTART_CONFIRMATION;
 
 	if (!rose_send_frame(skb, neigh))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 /*
@@ -254,7 +254,7 @@
 	*dptr++ = diag;
 
 	if (!rose_send_frame(skb, neigh))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 /*
@@ -284,7 +284,7 @@
 	*dptr++ = diagnostic;
 
 	if (!rose_send_frame(skb, neigh))
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 void rose_transmit_link(struct sk_buff *skb, struct rose_neigh *neigh)
@@ -292,7 +292,7 @@
 	unsigned char *dptr;
 
 	if (call_fw_firewall(PF_ROSE, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -304,7 +304,7 @@
 
 	if (neigh->restarted) {
 		if (!rose_send_frame(skb, neigh))
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 	} else {
 		skb_queue_tail(&neigh->queue, skb);
 
diff -u --recursive --new-file v2.1.85/linux/net/rose/rose_route.c linux/net/rose/rose_route.c
--- v2.1.85/linux/net/rose/rose_route.c	Sun Nov 30 14:00:40 1997
+++ linux/net/rose/rose_route.c	Tue Feb 10 13:07:49 1998
@@ -184,7 +184,7 @@
 	rose_stop_t0timer(rose_neigh);
 
 	while ((skb = skb_dequeue(&rose_neigh->queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	save_flags(flags); cli();
 
@@ -534,7 +534,7 @@
 	rose_start_ftimer(rose_neigh);
 
 	while ((skb = skb_dequeue(&rose_neigh->queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	rose_route = rose_route_list;
 
diff -u --recursive --new-file v2.1.85/linux/net/rose/rose_subr.c linux/net/rose/rose_subr.c
--- v2.1.85/linux/net/rose/rose_subr.c	Sun Nov 30 14:00:40 1997
+++ linux/net/rose/rose_subr.c	Tue Feb 10 13:07:49 1998
@@ -47,10 +47,10 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.rose->ack_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 /*
@@ -68,7 +68,7 @@
 	if (sk->protinfo.rose->va != nr) {
 		while (skb_peek(&sk->protinfo.rose->ack_queue) != NULL && sk->protinfo.rose->va != nr) {
 			skb = skb_dequeue(&sk->protinfo.rose->ack_queue);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			sk->protinfo.rose->va = (sk->protinfo.rose->va + 1) % ROSE_MODULUS;
 		}
 	}
@@ -206,7 +206,7 @@
 
 		default:
 			printk(KERN_ERR "ROSE: rose_write_internal - invalid frametype %02X\n", frametype);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_csz.c linux/net/sched/sch_csz.c
--- v2.1.85/linux/net/sched/sch_csz.c	Sun Nov 30 14:00:40 1997
+++ linux/net/sched/sch_csz.c	Tue Feb 10 12:38:12 1998
@@ -459,7 +459,7 @@
 
 	this = &q->flow[flow_id];
 	if (this->q.qlen >= this->max_bytes || this->L_tab == NULL) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -711,12 +711,12 @@
 
 	for (i=0; i<4; i++)
 		while ((skb=skb_dequeue(&q->other[i])) != NULL)
-			kfree_skb(skb, 0);
+			kfree_skb(skb);
 
 	for (i=0; i<CSZ_MAX_GUARANTEED; i++) {
 		struct csz_flow *this = q->flow + i;
 		while ((skb = skb_dequeue(&this->q)) != NULL)
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 		this->snext = this->sprev =
 		this->fnext = this->fprev = (struct csz_head*)this;
 		this->start = this->finish = 0;
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_fifo.c linux/net/sched/sch_fifo.c
--- v2.1.85/linux/net/sched/sch_fifo.c	Sun Nov 30 14:00:40 1997
+++ linux/net/sched/sch_fifo.c	Tue Feb 10 12:40:46 1998
@@ -47,7 +47,7 @@
 		q->qbytes += skb->len;
 		return 0;
 	}
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 1;
 }
 
@@ -71,7 +71,7 @@
 
 	while((skb=skb_dequeue(&sch->q)) != NULL) {
 		q->qbytes -= skb->len;
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 	}
 	if (q->qbytes) {
 		printk("fifo_reset: qbytes=%d\n", q->qbytes);
@@ -88,7 +88,7 @@
 		skb_queue_tail(&sch->q, skb);
 		return 0;
 	}
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 1;
 }
 
@@ -104,7 +104,7 @@
 	struct sk_buff *skb;
 
 	while((skb=skb_dequeue(&sch->q))!=NULL)
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 }
 
 
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_generic.c linux/net/sched/sch_generic.c
--- v2.1.85/linux/net/sched/sch_generic.c	Mon Jan 12 15:28:28 1998
+++ linux/net/sched/sch_generic.c	Tue Feb 10 12:41:04 1998
@@ -98,7 +98,7 @@
 static int
 noop_enqueue(struct sk_buff *skb, struct Qdisc * qdisc)
 {
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -139,7 +139,7 @@
 		return 1;
 	}
 	qdisc->dropped++;
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -213,7 +213,7 @@
 {
 	if (net_ratelimit())
 		printk(KERN_DEBUG "%s deferred output. It is buggy.\n", skb->dev->name);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -414,7 +414,7 @@
 		}
 
 		printk(KERN_DEBUG "%s: it is impossible!!!\n", dev->name);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	}
 	return q->q.qlen;
 }
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_red.c linux/net/sched/sch_red.c
--- v2.1.85/linux/net/sched/sch_red.c	Sun Nov 30 14:00:40 1997
+++ linux/net/sched/sch_red.c	Tue Feb 10 12:41:16 1998
@@ -189,7 +189,7 @@
 			return 1;
 		}
 drop:
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return 0;
 	}
 	if (q->qave >= q->qth_max) {
@@ -231,7 +231,7 @@
 
 	while((skb=skb_dequeue(&sch->q))!=NULL) {
 		q->qbytes -= skb->len;
-		kfree_skb(skb,FREE_WRITE);
+		kfree_skb(skb);
 	}
 	if (q->qbytes) {
 		printk("red_reset: qbytes=%lu\n", q->qbytes);
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_sfq.c linux/net/sched/sch_sfq.c
--- v2.1.85/linux/net/sched/sch_sfq.c	Sun Nov 30 14:00:40 1997
+++ linux/net/sched/sch_sfq.c	Tue Feb 10 12:41:31 1998
@@ -174,7 +174,7 @@
 		sfq_index x = q->dep[d].next;
 		skb = q->qs[x].prev;
 		__skb_unlink(skb, &q->qs[x]);
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		sfq_dec(q, x);
 /*
 		sch->q.qlen--;
@@ -189,7 +189,7 @@
 	q->allot[q->next[d]] += q->quantum;
 	skb = q->qs[d].prev;
 	__skb_unlink(skb, &q->qs[d]);
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	sfq_dec(q, d);
 /*
 	sch->q.qlen--;
@@ -271,7 +271,7 @@
 	struct sk_buff *skb;
 
 	while ((skb = sfq_dequeue(sch)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 }
 
 
diff -u --recursive --new-file v2.1.85/linux/net/sched/sch_tbf.c linux/net/sched/sch_tbf.c
--- v2.1.85/linux/net/sched/sch_tbf.c	Sun Nov 30 14:00:40 1997
+++ linux/net/sched/sch_tbf.c	Tue Feb 10 12:41:44 1998
@@ -118,7 +118,7 @@
 
 	__skb_unlink(skb, &sch->q);
 	q->bytes -= skb->len;
-	kfree_skb(skb, FREE_WRITE);
+	kfree_skb(skb);
 	return 0;
 }
 
@@ -187,7 +187,7 @@
 	struct sk_buff *skb;
 
 	while ((skb = __skb_dequeue(&sch->q)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	q->bytes = 0;
 	PSCHED_GET_TIME(q->t_c);
 	q->tokens = q->depth;
diff -u --recursive --new-file v2.1.85/linux/net/unix/af_unix.c linux/net/unix/af_unix.c
--- v2.1.85/linux/net/unix/af_unix.c	Wed Dec  3 10:34:16 1997
+++ linux/net/unix/af_unix.c	Tue Feb 10 12:20:39 1998
@@ -286,14 +286,14 @@
 		{
 			unix_socket *osk=skb->sk;
 			osk->state=TCP_CLOSE;
-			kfree_skb(skb, FREE_WRITE);	/* Now surplus - free the skb first before the socket */
+			kfree_skb(skb);			/* Now surplus - free the skb first before the socket */
 			osk->state_change(osk);		/* So the connect wakes and cleans up (if any) */
 			/* osk will be destroyed when it gets to close or the timer fires */			
 		}
 		else
 		{
 			/* passed fds are erased in the kfree_skb hook */
-			kfree_skb(skb,FREE_WRITE);
+			kfree_skb(skb);
 		}
 	}
 	
@@ -695,7 +695,7 @@
 		other=unix_find_other(sunaddr, addr_len, sk->type, hash, &err);
 		if(other==NULL)
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return err;
 		}
 		other->ack_backlog++;
@@ -819,7 +819,7 @@
 		{
 			tsk=skb->sk;
 			tsk->state_change(tsk);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			continue;
 		}
 		break;
@@ -838,7 +838,7 @@
 	unix_lock(newsk);		/* Swap lock over */
 	unix_unlock(sk);		/* Locked to child socket not master */
 	unix_lock(tsk);			/* Back lock */
-	kfree_skb(skb, FREE_WRITE);	/* The buffer is just used as a tag */
+	kfree_skb(skb);			/* The buffer is just used as a tag */
 	tsk->state_change(tsk);		/* Wake up any sleeping connect */
 	sock_wake_async(tsk->socket, 0);
 	return 0;
@@ -958,7 +958,7 @@
 		unix_peer(sk)=NULL;
 		other = NULL;
 		if (sunaddr == NULL) {
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -ECONNRESET;
 		}
 	}
@@ -968,13 +968,13 @@
 		
 		if (other==NULL)
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return err;
 		}
 		if (!unix_may_send(sk, other))
 		{
 			unix_unlock(other);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return -EINVAL;
 		}
 	}
@@ -1080,7 +1080,7 @@
 
 		if (other->dead || (sk->shutdown & SEND_SHUTDOWN))
 		{
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			if(sent)
 				return sent;
 			send_sig(SIGPIPE,current,0);
@@ -1280,7 +1280,7 @@
 				break;
 			}
 
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 
 			if (scm->fp)
 				break;
diff -u --recursive --new-file v2.1.85/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
--- v2.1.85/linux/net/x25/af_x25.c	Sun Nov 30 14:00:40 1997
+++ linux/net/x25/af_x25.c	Tue Feb 10 13:07:49 1998
@@ -323,7 +323,7 @@
 			skb->sk->protinfo.x25->state = X25_STATE_0;
 		}
 
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 	}
 
 	if (atomic_read(&sk->wmem_alloc) != 0 || atomic_read(&sk->rmem_alloc) != 0) {
@@ -718,7 +718,7 @@
 
 	/* Now attach up the new socket */
 	skb->sk = NULL;
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 	sk->ack_backlog--;
 	newsock->sk = newsk;
 
@@ -952,7 +952,7 @@
 	SOCK_DEBUG(sk, "x25_sendmsg: Transmitting buffer\n");
 
 	if (sk->state != TCP_ESTABLISHED) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return -ENOTCONN;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/x25/x25_dev.c linux/net/x25/x25_dev.c
--- v2.1.85/linux/net/x25/x25_dev.c	Mon Jan 12 15:28:28 1998
+++ linux/net/x25/x25_dev.c	Tue Feb 10 13:07:49 1998
@@ -54,7 +54,7 @@
 	unsigned int lci;
 
 	if (call_in_firewall(PF_X25, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT) {
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -90,7 +90,7 @@
 /*
 	x25_transmit_clear_request(neigh, lci, 0x0D);
 */
-	kfree_skb(skb, FREE_READ);
+	kfree_skb(skb);
 
 	return 0;
 }
@@ -106,7 +106,7 @@
 	 */
 	if ((neigh = x25_get_neigh(dev)) == NULL) {
 		printk(KERN_DEBUG "X.25: unknown neighbour - %s\n", dev->name);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -117,20 +117,20 @@
 
 		case 0x01:
 			x25_link_established(neigh);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 
 		case 0x02:
 			x25_link_terminated(neigh);
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 
 		case 0x03:
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 
 		default:
-			kfree_skb(skb, FREE_READ);
+			kfree_skb(skb);
 			return 0;
 	}
 }
@@ -146,7 +146,7 @@
 	 */
 	if ((neigh = x25_get_neigh(dev)) == NULL) {
 		printk(KERN_DEBUG "X.25: unknown_neighbour - %s\n", dev->name);
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 		return 0;
 	}
 
@@ -223,11 +223,11 @@
 
 #if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE)
 		case ARPHRD_ETHER:
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return;
 #endif
 		default:
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			return;
 	}
 
diff -u --recursive --new-file v2.1.85/linux/net/x25/x25_in.c linux/net/x25/x25_in.c
--- v2.1.85/linux/net/x25/x25_in.c	Sun Nov 30 14:00:40 1997
+++ linux/net/x25/x25_in.c	Tue Feb 10 13:07:49 1998
@@ -64,12 +64,12 @@
 
 		skbo = skb_dequeue(&sk->protinfo.x25->fragment_queue);
 		memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
-		kfree_skb(skbo, FREE_READ);
+		kfree_skb(skbo);
 
 		while ((skbo = skb_dequeue(&sk->protinfo.x25->fragment_queue)) != NULL) {
 			skb_pull(skbo, (sk->protinfo.x25->neighbour->extended) ? X25_EXT_MIN_LEN : X25_STD_MIN_LEN);
 			memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
-			kfree_skb(skbo, FREE_READ);
+			kfree_skb(skbo);
 		}
 
 		sk->protinfo.x25->fraglen = 0;		
diff -u --recursive --new-file v2.1.85/linux/net/x25/x25_link.c linux/net/x25/x25_link.c
--- v2.1.85/linux/net/x25/x25_link.c	Mon Jul  7 08:20:00 1997
+++ linux/net/x25/x25_link.c	Tue Feb 10 13:07:49 1998
@@ -225,7 +225,7 @@
 void x25_transmit_link(struct sk_buff *skb, struct x25_neigh *neigh)
 {
 	if (call_fw_firewall(PF_X25, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT) {
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 		return;
 	}
 
@@ -304,7 +304,7 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&x25_neigh->queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	x25_stop_t20timer(x25_neigh);
 
diff -u --recursive --new-file v2.1.85/linux/net/x25/x25_out.c linux/net/x25/x25_out.c
--- v2.1.85/linux/net/x25/x25_out.c	Sun Nov 30 14:00:40 1997
+++ linux/net/x25/x25_out.c	Tue Feb 10 13:07:49 1998
@@ -98,7 +98,7 @@
 			skb_queue_tail(&sk->write_queue, skbn);
 		}
 		
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 	} else {
 		skb_queue_tail(&sk->write_queue, skb);
 	}
diff -u --recursive --new-file v2.1.85/linux/net/x25/x25_subr.c linux/net/x25/x25_subr.c
--- v2.1.85/linux/net/x25/x25_subr.c	Sun Nov 30 14:00:40 1997
+++ linux/net/x25/x25_subr.c	Tue Feb 10 13:07:49 1998
@@ -48,19 +48,19 @@
 	struct sk_buff *skb;
 
 	while ((skb = skb_dequeue(&sk->write_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.x25->ack_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.x25->interrupt_in_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.x25->interrupt_out_queue)) != NULL)
-		kfree_skb(skb, FREE_WRITE);
+		kfree_skb(skb);
 
 	while ((skb = skb_dequeue(&sk->protinfo.x25->fragment_queue)) != NULL)
-		kfree_skb(skb, FREE_READ);
+		kfree_skb(skb);
 }
 
 
@@ -82,7 +82,7 @@
 	if (sk->protinfo.x25->va != nr) {
 		while (skb_peek(&sk->protinfo.x25->ack_queue) != NULL && sk->protinfo.x25->va != nr) {
 			skb = skb_dequeue(&sk->protinfo.x25->ack_queue);
-			kfree_skb(skb, FREE_WRITE);
+			kfree_skb(skb);
 			sk->protinfo.x25->va = (sk->protinfo.x25->va + 1) % modulus;
 		}
 	}
diff -u --recursive --new-file v2.1.85/linux/scripts/header.tk linux/scripts/header.tk
--- v2.1.85/linux/scripts/header.tk	Mon Jan  5 01:41:01 1998
+++ linux/scripts/header.tk	Mon Feb  9 16:12:56 1998
@@ -237,7 +237,7 @@
 		then { puts $file1 "$varname=y"; \
 		       puts $file2 "#define $varname 1" } \
 	else { \
-	    error "Attempting to write value for variable that is not configured ($varname)." \
+	    puts stdout "ERROR - Attempting to write value for unconfigured variable ($varname)." \
 	}
 }
 
@@ -281,7 +281,21 @@
 	pack $w.x$line.l -side right -fill both -expand on
 }
 
-proc toggle_switch {w mnum line text variable} {
+proc toggle_switch2 {w mnum line text variable} {
+	frame $w.x$line -relief sunken
+	radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
+		-relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+	radiobutton $w.x$line.m -text "-"  -variable $variable -value 2 \
+		-relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+	radiobutton $w.x$line.n -text "n"  -variable $variable -value 0 \
+		-relief groove -width 2 -command "update_menu$mnum .menu$mnum"
+		
+	option_name $w $mnum $line $text $variable
+		
+	pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y
+}
+
+proc toggle_switch3 {w mnum line text variable} {
 	frame $w.x$line -relief sunken
 	radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \
 		-relief groove -width 2 -command "update_menu$mnum .menu$mnum"
@@ -296,13 +310,13 @@
 }
 
 proc bool {w mnum line text variable} {
-	toggle_switch $w $mnum $line $text $variable
+	toggle_switch2 $w $mnum $line $text $variable
 	$w.x$line.m configure -state disabled
 	pack $w.x$line -anchor w -fill both -expand on
 }
 
 proc tristate {w mnum line text variable } {
-	toggle_switch $w $mnum $line $text $variable
+	toggle_switch3 $w $mnum $line $text $variable
 	pack $w.x$line -anchor w -fill both -expand on
 }
 
@@ -336,7 +350,7 @@
 	frame $w.x$line
 	menubutton $w.x$line.x -textvariable $variable -menu \
 		$w.x$line.x.menu -relief raised \
-		-width 15 -anchor w
+		-anchor w
 	option_name $w $mnum $line $text $helpidx
 	pack $w.x$line.x -anchor w -side right -fill y
 	pack $w.x$line -anchor w -fill both -expand on
diff -u --recursive --new-file v2.1.85/linux/scripts/tkgen.c linux/scripts/tkgen.c
--- v2.1.85/linux/scripts/tkgen.c	Mon Jan  5 01:41:02 1998
+++ linux/scripts/tkgen.c	Mon Feb  9 16:12:56 1998
@@ -685,7 +685,7 @@
   int menu_maxlines = 0;
   struct kconfig * cfg;
   struct kconfig * cfg1 = NULL;
-  char * menulabel;
+  char * menulabel = "tkgen error";
 
   /*
    * Start by assigning menu numbers, and submenu numbers.
diff -u --recursive --new-file v2.1.85/linux/scripts/tkparse.c linux/scripts/tkparse.c
--- v2.1.85/linux/scripts/tkparse.c	Tue Dec 23 13:52:02 1997
+++ linux/scripts/tkparse.c	Mon Feb  9 16:12:56 1998
@@ -578,7 +578,7 @@
   char buffer[1024];
   int  offset;
   int old_lineno;
-  char * old_file;
+  char * old_file = 0;		/* superfluous, just for gcc */
   char * pnt;
   FILE * infile;
 
