## Automatically generated incremental diff
## From:   linux-2.2.18-pre14
## To:     linux-2.2.18-pre15
## Robot:  $Id: make-incremental-diff,v 1.5 2001/12/01 08:32:36 hpa Exp $

diff -urN linux-2.2.18-pre14/Documentation/cdrom/cdrom-standard.tex linux/Documentation/cdrom/cdrom-standard.tex
--- linux-2.2.18-pre14/Documentation/cdrom/cdrom-standard.tex	Sun Mar 21 18:37:56 1999
+++ linux/Documentation/cdrom/cdrom-standard.tex	Mon Dec  3 20:33:01 2001
@@ -24,7 +24,7 @@
 \title{A \linux\ \cdrom\ standard}
 \author{David van Leeuwen\\{\normalsize\tt david@ElseWare.cistron.nl}
 \\{\footnotesize updated by Erik Andersen {\tt(andersee@debian.org)}}
-\\{\footnotesize updated by Jens Axboe {\tt(axboe@image.dk)}}}
+\\{\footnotesize updated by Jens Axboe {\tt(axboe@suse.de)}}}
 \date{12 March 1999}
 
 \maketitle
diff -urN linux-2.2.18-pre14/Documentation/cdrom/ide-cd linux/Documentation/cdrom/ide-cd
--- linux-2.2.18-pre14/Documentation/cdrom/ide-cd	Mon Jan 18 12:47:33 1999
+++ linux/Documentation/cdrom/ide-cd	Mon Dec  3 20:33:01 2001
@@ -1,7 +1,7 @@
 IDE-CD driver documentation
 Originally by scott snyder  <snyder@fnald0.fnal.gov> (19 May 1996)
 Carrying on the torch is: Erik Andersen <andersee@debian.org>
-New maintainers (19 Oct 1998): Jens Axboe <axboe@image.dk>
+New maintainer (19 Oct 1998): Jens Axboe <axboe@suse.de>
 
 1. Introduction
 ---------------
diff -urN linux-2.2.18-pre14/MAINTAINERS linux/MAINTAINERS
--- linux-2.2.18-pre14/MAINTAINERS	Mon Dec  3 20:32:30 2001
+++ linux/MAINTAINERS	Mon Dec  3 20:33:02 2001
@@ -468,7 +468,7 @@
 
 IDE/ATAPI CDROM DRIVER 
 P:	Jens Axboe
-M:	axboe@image.dk
+M:	axboe@suse.de
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
@@ -943,7 +943,7 @@
 
 UNIFORM CDROM DRIVER 
 P:	Jens Axboe
-M:	axboe@image.dk
+M:	axboe@suse.de
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
diff -urN linux-2.2.18-pre14/Makefile linux/Makefile
--- linux-2.2.18-pre14/Makefile	Mon Dec  3 20:32:30 2001
+++ linux/Makefile	Mon Dec  3 20:33:02 2001
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
 SUBLEVEL = 18
-EXTRAVERSION = pre14
+EXTRAVERSION = pre15
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
@@ -29,7 +29,7 @@
 #	otherwise 'cc'
 #
 CC	=$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)gcc; else \
-	scripts/kwhich gcc272 2>/dev/null || scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \
+	$(CONFIG_SHELL) scripts/kwhich gcc272 2>/dev/null || $(CONFIG_SHELL) scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \
 	-D__KERNEL__ -I$(HPATH)
 CPP	=$(CC) -E
 AR	=$(CROSS_COMPILE)ar
diff -urN linux-2.2.18-pre14/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c
--- linux-2.2.18-pre14/arch/alpha/kernel/setup.c	Mon Sep  4 10:39:16 2000
+++ linux/arch/alpha/kernel/setup.c	Mon Dec  3 20:33:02 2001
@@ -841,7 +841,7 @@
 		       hwrpb->pagesize,
 		       hwrpb->pa_bits,
 		       hwrpb->max_asn,
-		       loops_per_sec / 500000, (loops_per_sec / 5000) % 100,
+		       loops_per_jiffy * HZ / 500000, (loops_per_jiffy * HZ / 5000) % 100,
 		       unaligned[0].count, unaligned[0].pc, unaligned[0].va,
 		       unaligned[1].count, unaligned[1].pc, unaligned[1].va,
 		       platform_string(), nr_processors);
diff -urN linux-2.2.18-pre14/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
--- linux-2.2.18-pre14/arch/alpha/kernel/smp.c	Wed Jun  7 14:26:42 2000
+++ linux/arch/alpha/kernel/smp.c	Mon Dec  3 20:33:02 2001
@@ -94,7 +94,7 @@
 static inline void __init
 smp_store_cpu_info(int cpuid)
 {
-	cpu_data[cpuid].loops_per_sec = loops_per_sec;
+	cpu_data[cpuid].loops_per_jiffy = loops_per_jiffy;
 	cpu_data[cpuid].last_asn
 	  = (cpuid << WIDTH_HARDWARE_ASN) + ASN_FIRST_VERSION;
 
diff -urN linux-2.2.18-pre14/arch/alpha/math-emu/Makefile linux/arch/alpha/math-emu/Makefile
--- linux-2.2.18-pre14/arch/alpha/math-emu/Makefile	Tue Jan  4 10:12:11 2000
+++ linux/arch/alpha/math-emu/Makefile	Mon Dec  3 20:33:02 2001
@@ -8,7 +8,7 @@
 # Note 2! The CFLAGS definition is now in the main makefile...
 
 O_TARGET := math-emu.o
-O_OBJS   := math.o
+O_OBJS   := math.o qrnnd.o
 CFLAGS += -I. -I$(TOPDIR)/include/math-emu -w
 
 ifeq ($(CONFIG_MATHEMU),m)
diff -urN linux-2.2.18-pre14/arch/alpha/math-emu/math.c linux/arch/alpha/math-emu/math.c
--- linux-2.2.18-pre14/arch/alpha/math-emu/math.c	Wed May  3 17:16:30 2000
+++ linux/arch/alpha/math-emu/math.c	Mon Dec  3 20:33:02 2001
@@ -84,66 +84,6 @@
 
 #endif /* MODULE */
 
-/* For 128-bit division.  */
-
-void
-udiv128(unsigned long divisor_f0, unsigned long divisor_f1,
-	unsigned long dividend_f0, unsigned long dividend_f1,
-	unsigned long *quot, unsigned long *remd)
-{
-	_FP_FRAC_DECL_2(quo);
-	_FP_FRAC_DECL_2(rem);
-	_FP_FRAC_DECL_2(tmp);
-	unsigned long i, num_bits, bit;
-
-	_FP_FRAC_SET_2(rem, _FP_ZEROFRAC_2);
-	_FP_FRAC_SET_2(quo, _FP_ZEROFRAC_2);
-
-	if (_FP_FRAC_ZEROP_2(divisor))
-		goto out;
-
-	if (_FP_FRAC_GT_2(divisor, dividend)) {
-		_FP_FRAC_COPY_2(rem, dividend);
-		goto out;
-	}
-
-	if (_FP_FRAC_EQ_2(divisor, dividend)) {
-		__FP_FRAC_SET_2(quo, 0, 1);
-		goto out;
-	}
-
-	num_bits = 128;
-	while (1) {
-		bit = _FP_FRAC_NEGP_2(dividend);
-		_FP_FRAC_COPY_2(tmp, rem);
-		_FP_FRAC_SLL_2(tmp, 1);
-		_FP_FRAC_LOW_2(tmp) |= bit;
-		if (! _FP_FRAC_GE_2(tmp, divisor))
-			break;
-		_FP_FRAC_COPY_2(rem, tmp);
-		_FP_FRAC_SLL_2(dividend, 1);
-		num_bits--;
-	}
-
-	for (i = 0; i < num_bits; i++) {
-		bit = _FP_FRAC_NEGP_2(dividend);
-		_FP_FRAC_SLL_2(rem, 1);
-		_FP_FRAC_LOW_2(rem) |= bit;
-		_FP_FRAC_SUB_2(tmp, rem, divisor);
-		bit = _FP_FRAC_NEGP_2(tmp);
-		_FP_FRAC_SLL_2(dividend, 1);
-		_FP_FRAC_SLL_2(quo, 1);
-		if (!bit) {
-			_FP_FRAC_LOW_2(quo) |= 1;
-			_FP_FRAC_COPY_2(rem, tmp);
-		}
-	}
-
-out:
-	*quot = quo_f1;
-	*remd = rem_f1;
-	return;
-}
 
 /*
  * Emulate the floating point instruction at address PC.  Returns 0 if
diff -urN linux-2.2.18-pre14/arch/alpha/math-emu/qrnnd.S linux/arch/alpha/math-emu/qrnnd.S
--- linux-2.2.18-pre14/arch/alpha/math-emu/qrnnd.S	Wed Dec 31 16:00:00 1969
+++ linux/arch/alpha/math-emu/qrnnd.S	Mon Dec  3 20:33:02 2001
@@ -0,0 +1,163 @@
+ # Alpha 21064 __udiv_qrnnd
+ # Copyright (C) 1992, 1994, 1995, 2000 Free Software Foundation, Inc.
+
+ # This file is part of GCC.
+
+ # The GNU MP Library is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+ # the Free Software Foundation; either version 2 of the License, or (at your
+ # option) any later version.
+
+ # In addition to the permissions in the GNU General Public License, the
+ # Free Software Foundation gives you unlimited permission to link the
+ # compiled version of this file with other programs, and to distribute
+ # those programs without any restriction coming from the use of this
+ # file.  (The General Public License restrictions do apply in other
+ # respects; for example, they cover modification of the file, and
+ # distribution when not linked into another program.)
+
+ # This file is distributed in the hope that it will be useful, but
+ # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+ # License for more details.
+
+ # You should have received a copy of the GNU General Public License
+ # along with GCC; see the file COPYING.  If not, write to the 
+ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ # MA 02111-1307, USA.
+
+        .set noreorder
+        .set noat
+
+	.text
+
+	.globl __udiv_qrnnd
+	.ent __udiv_qrnnd
+__udiv_qrnnd:
+	.frame $30,0,$26,0
+	.prologue 0
+
+#define cnt	$2
+#define tmp	$3
+#define rem_ptr	$16
+#define n1	$17
+#define n0	$18
+#define d	$19
+#define qb	$20
+#define AT	$at
+
+	ldiq	cnt,16
+	blt	d,$largedivisor
+
+$loop1:	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	d,n1,qb
+	subq	n1,d,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	d,n1,qb
+	subq	n1,d,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	d,n1,qb
+	subq	n1,d,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	d,n1,qb
+	subq	n1,d,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	subq	cnt,1,cnt
+	bgt	cnt,$loop1
+	stq	n1,0(rem_ptr)
+	bis	$31,n0,$0
+	ret	$31,($26),1
+
+$largedivisor:
+	and	n0,1,$4
+
+	srl	n0,1,n0
+	sll	n1,63,tmp
+	or	tmp,n0,n0
+	srl	n1,1,n1
+
+	and	d,1,$6
+	srl	d,1,$5
+	addq	$5,$6,$5
+
+$loop2:	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	$5,n1,qb
+	subq	n1,$5,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	$5,n1,qb
+	subq	n1,$5,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	$5,n1,qb
+	subq	n1,$5,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	cmplt	n0,0,tmp
+	addq	n1,n1,n1
+	bis	n1,tmp,n1
+	addq	n0,n0,n0
+	cmpule	$5,n1,qb
+	subq	n1,$5,tmp
+	cmovne	qb,tmp,n1
+	bis	n0,qb,n0
+	subq	cnt,1,cnt
+	bgt	cnt,$loop2
+
+	addq	n1,n1,n1
+	addq	$4,n1,n1
+	bne	$6,$Odd
+	stq	n1,0(rem_ptr)
+	bis	$31,n0,$0
+	ret	$31,($26),1
+
+$Odd:
+	/* q' in n0. r' in n1 */
+	addq	n1,n0,n1
+
+	cmpult	n1,n0,tmp	# tmp := carry from addq
+	subq	n1,d,AT
+	addq	n0,tmp,n0
+	cmovne	tmp,AT,n1
+
+	cmpult	n1,d,tmp
+	addq	n0,1,AT
+	cmoveq	tmp,AT,n0
+	subq	n1,d,AT
+	cmoveq	tmp,AT,n1
+
+	stq	n1,0(rem_ptr)
+	bis	$31,n0,$0
+	ret	$31,($26),1
+
+	.end	__udiv_qrnnd
diff -urN linux-2.2.18-pre14/arch/alpha/math-emu/sfp-util.h linux/arch/alpha/math-emu/sfp-util.h
--- linux-2.2.18-pre14/arch/alpha/math-emu/sfp-util.h	Tue Jan  4 10:12:11 2000
+++ linux/arch/alpha/math-emu/sfp-util.h	Mon Dec  3 20:33:02 2001
@@ -17,18 +17,13 @@
 	   : "r" ((UDItype)(u)),		\
 	     "r" ((UDItype)(v)))
 
-extern void udiv128(unsigned long, unsigned long,
-		    unsigned long, unsigned long,
-		    unsigned long *,
-		    unsigned long *);
-
-#define udiv_qrnnd(q, r, n1, n0, d)		\
-  do {						\
-    unsigned long xr, xi;			\
-    udiv128((n0), (n1), 0, (d), &xr, &xi);	\
-    (q) = xr; 					\
-    (r) = xi;					\
+#define udiv_qrnnd(q, r, n1, n0, d)				\
+  do { unsigned long __r;					\
+    (q) = __udiv_qrnnd (&__r, (n1), (n0), (d));			\
+    (r) = __r;							\
   } while (0)
+extern unsigned long __udiv_qrnnd (unsigned long *, unsigned long,
+				   unsigned long , unsigned long);
 
 #define UDIV_NEEDS_NORMALIZATION 1  
 
diff -urN linux-2.2.18-pre14/arch/arm/boot/Makefile linux/arch/arm/boot/Makefile
--- linux-2.2.18-pre14/arch/arm/boot/Makefile	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/boot/Makefile	Mon Dec  3 20:33:02 2001
@@ -20,10 +20,10 @@
 	@$(MAKE) -C compressed vmlinux
 
 install: $(CONFIGURE) Image
-	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
+	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
 
 zinstall: $(CONFIGURE) zImage
-	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL).$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
+	sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
 
 clean:
 	rm -f Image zImage
diff -urN linux-2.2.18-pre14/arch/arm/kernel/ecard.c linux/arch/arm/kernel/ecard.c
--- linux-2.2.18-pre14/arch/arm/kernel/ecard.c	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/kernel/ecard.c	Mon Dec  3 20:33:02 2001
@@ -140,14 +140,10 @@
 		ecard_t *ec;
 
 		for (ec = cards; ec; ec = ec->next) {
-			printk(KERN_DEBUG "Resetting card %d\n",
-			       ec->slot_no);
-
 			if (ec->loader)
 				ecard_loader_reset(POD_INT_ADDR(ec->podaddr),
 						   ec->loader);
 		}
-		printk(KERN_DEBUG "All cards reset\n");
 	} else if (req->ec->loader)
 		ecard_loader_reset(POD_INT_ADDR(req->ec->podaddr),
 				   req->ec->loader);
diff -urN linux-2.2.18-pre14/arch/arm/kernel/iic.c linux/arch/arm/kernel/iic.c
--- linux-2.2.18-pre14/arch/arm/kernel/iic.c	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/kernel/iic.c	Mon Dec  3 20:33:02 2001
@@ -22,8 +22,8 @@
  */
 static void iic_delay(void)
 {
-	extern unsigned long loops_per_sec;
-	if (loops_per_sec != (1 << 12)) {
+	extern unsigned long loops_per_jiffy;
+	if (loops_per_jiffy != (1 << 12)) {
 		udelay(100); /* was 10 */
 		return;
 	} else {
diff -urN linux-2.2.18-pre14/arch/arm/kernel/setup.c linux/arch/arm/kernel/setup.c
--- linux-2.2.18-pre14/arch/arm/kernel/setup.c	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/kernel/setup.c	Mon Dec  3 20:33:02 2001
@@ -522,8 +522,8 @@
 		     (int)processor_id & 15, elf_platform);
 
 	p += sprintf(p, "BogoMIPS\t: %lu.%02lu\n",
-		     (loops_per_sec+2500) / 500000,
-		     ((loops_per_sec+2500) / 5000) % 100);
+		     (loops_per_jiffy+2500) / (500000/HZ),
+		     ((loops_per_jiffy+2500) / (5000/HZ)) % 100);
 
 	p += sprintf(p, "Hardware\t: %s\n", machine_name);
 
diff -urN linux-2.2.18-pre14/arch/arm/lib/delay.S linux/arch/arm/lib/delay.S
--- linux-2.2.18-pre14/arch/arm/lib/delay.S	Tue Jan 20 16:39:41 1998
+++ linux/arch/arm/lib/delay.S	Mon Dec  3 20:33:03 2001
@@ -7,7 +7,7 @@
 #include <asm/assembler.h>
 		.text
 
-LC0:		.word	SYMBOL_NAME(loops_per_sec)
+LC0:		.word	SYMBOL_NAME(loops_per_jiffy)
 
 ENTRY(udelay)
 		mov	r2, #0x1000
diff -urN linux-2.2.18-pre14/arch/arm/lib/memzero.S linux/arch/arm/lib/memzero.S
--- linux-2.2.18-pre14/arch/arm/lib/memzero.S	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/lib/memzero.S	Mon Dec  3 20:33:03 2001
@@ -1,80 +1,80 @@
 /*
- * linux/arch/arm/lib/memzero.S
+ *  linux/arch/arm/lib/memzero.S
  *
- * Copyright (C) 1995-1999 Russell King
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
  */
 #include <linux/linkage.h>
 #include <asm/assembler.h>
-#include "constants.h"
-
-		.text
 
+	.text
+	.align	5
+	.word	0
 /*
- * Prototype: void memzero(void *d, size_t n)
+ * Align the pointer in r0.  r3 contains the number of bytes that we are
+ * mis-aligned by, and r1 is the number of bytes.  If r1 < 4, then we
+ * don't bother; we use byte stores instead.
+ */
+1:	subs	r1, r1, #4		@ 1 do we have enough
+	blt	5f			@ 1 bytes to align with?
+	cmp	r3, #2			@ 1
+	strltb	r2, [r0], #1		@ 1
+	strleb	r2, [r0], #1		@ 1
+	strb	r2, [r0], #1		@ 1
+	add	r1, r1, r3		@ 1 (r1 = r1 - (4 - r3))
+/*
+ * The pointer is now aligned and the length is adjusted.  Try doing the
+ * memzero again.
  */
-1:		@ 4 <= r1
-		cmp	ip, #2				@	1
-		strltb	r2, [r0], #1			@	1
-		strleb	r2, [r0], #1			@	1
-		strb	r2, [r0], #1			@	1
-		rsb	ip, ip, #4			@	1
-		sub	r1, r1, ip			@	1
-		cmp	r1, #3				@	1
-		bgt	2f				@	1	@ +8
-		b	4f				@	1	@ +9
-
-		.align	5
 
 ENTRY(__memzero)
-		mov	r2, #0				@	1
-		cmp	r1, #4				@	1
-		blt	4f				@	1	@ = 3
-
-		@ r1 >= 4
-
-		ands	ip, r0, #3			@	1
-		bne	1b				@	1	@ = 5
-
-2:		@ r1 >= 4 && (r0 & 3) = 0				@ = 5 or 11
-
-		str	lr, [sp, #-4]!			@	1
-		mov	r3, #0				@	1
-		mov	ip, #0				@	1
-		mov	lr, #0				@	1
-
-		@ 4 <= r1 <= 32						@ = 9 or 15
-
-3:		subs	r1, r1, #32			@	1
-		stmgeia	r0!, {r2, r3, ip, lr}		@	4
-		stmgeia	r0!, {r2, r3, ip, lr}		@	4
-		bgt	3b				@	1
-		LOADREGS(eqfd, sp!, {pc})		@	1/2
-
-		@ -28 <= r1 <= -1
-
-		cmp	r1, #-16			@	1
-		stmgeia	r0!, {r2, r3, ip, lr}		@	4
-		ldr	lr, [sp], #4			@	1
-		addlts	r1, r1, #16			@	1
-		RETINSTR(moveq,pc,lr)			@	1
-
-		@ -12 <= r1 <= -1
-
-		cmp	r1, #-8				@	1
-		stmgeia	r0!, {r2, r3}			@	2
-		addlts	r1, r1, #8			@	1
-		RETINSTR(moveq,pc,lr)			@	1
-
-		@ -4 <= r1 <= -1
-
-		cmp	r1, #-4				@	1
-		strge	r2, [r0], #4			@	1
-		adds	r1, r1, #4			@	1
-		RETINSTR(moveq,pc,lr)			@	1
-
-4:		@ 1 <= r1 <= 3
-		cmp	r1, #2				@	1
-		strgtb	r2, [r0], #1			@	1
-		strgeb	r2, [r0], #1			@	1
-		strb	r2, [r0], #1			@	1
-		RETINSTR(mov,pc,lr)			@	1
+	mov	r2, #0			@ 1
+	ands	r3, r0, #3		@ 1 unaligned?
+	bne	1b			@ 1
+/*
+ * r3 = 0, and we know that the pointer in r0 is aligned to a word boundary.
+ */
+	cmp	r1, #16			@ 1 we can skip this chunk if we
+	blt	4f			@ 1 have < 16 bytes
+/*
+ * We need an extra register for this loop - save the return address and
+ * use the LR
+ */
+	str	lr, [sp, #-4]!		@ 1
+	mov	ip, r2			@ 1
+	mov	lr, r2			@ 1
+
+3:	subs	r1, r1, #64		@ 1 write 32 bytes out per loop
+	stmgeia	r0!, {r2, r3, ip, lr}	@ 4
+	stmgeia	r0!, {r2, r3, ip, lr}	@ 4
+	stmgeia	r0!, {r2, r3, ip, lr}	@ 4
+	stmgeia	r0!, {r2, r3, ip, lr}	@ 4
+	bgt	3b			@ 1
+	LOADREGS(eqfd, sp!, {pc})	@ 1/2 quick exit
+/*
+ * No need to correct the count; we're only testing bits from now on
+ */
+	tst	r1, #32			@ 1
+	stmneia	r0!, {r2, r3, ip, lr}	@ 4
+	stmneia	r0!, {r2, r3, ip, lr}	@ 4
+	tst	r1, #16			@ 1 16 bytes or more?
+	stmneia	r0!, {r2, r3, ip, lr}	@ 4
+	ldr	lr, [sp], #4		@ 1
+
+4:	tst	r1, #8			@ 1 8 bytes or more?
+	stmneia	r0!, {r2, r3}		@ 2
+	tst	r1, #4			@ 1 4 bytes or more?
+	strne	r2, [r0], #4		@ 1
+/*
+ * When we get here, we've got less than 4 bytes to zero.  We
+ * may have an unaligned pointer as well.
+ */
+5:	tst	r1, #2			@ 1 2 bytes or more?
+	strneb	r2, [r0], #1		@ 1
+	strneb	r2, [r0], #1		@ 1
+	tst	r1, #1			@ 1 a byte left over
+	strneb	r2, [r0], #1		@ 1
+	RETINSTR(mov,pc,lr)		@ 1
diff -urN linux-2.2.18-pre14/arch/arm/vmlinux-armo.lds.in linux/arch/arm/vmlinux-armo.lds.in
--- linux-2.2.18-pre14/arch/arm/vmlinux-armo.lds.in	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/vmlinux-armo.lds.in	Mon Dec  3 20:33:03 2001
@@ -6,55 +6,87 @@
 ENTRY(_start)
 SECTIONS
 {
-  _text = .;			/* Text and read-only data */
-  .text : {
-	*(.text)
-	*(.fixup)
-	*(.gnu.warning)
-	} = 0x9090
-  .text.lock : { *(.text.lock) }	/* out-of-line lock text */
-  .rodata : { *(.rodata) }
-  .kstrtab : { *(.kstrtab) }
-
-  . = ALIGN(16);		/* Exception table */
-  __start___ex_table = .;
-  __ex_table : { *(__ex_table) }
-  __stop___ex_table = .;
-
-  __start___ksymtab = .;	/* Kernel symbol table */
-  __ksymtab : { *(__ksymtab) }
-  __stop___ksymtab = .;
-
-  _etext = .;			/* End of text section */
-
-  . = ALIGN(8192);
-  .data : {			/* Data */
-	*(.init.task)
-	*(.data)
-	CONSTRUCTORS
-	}
-
-  _edata = .;			/* End of data section */
-
-  . = ALIGN(32768);		/* Init code and data */
-  __init_begin = .;
-  .text.init : { *(.text.init) }
-  .data.init : { *(.data.init) }
-  . = ALIGN(32768);
-  __init_end = .;
-
-  __bss_start = .;		/* BSS */
-  .bss : {
-	*(.bss)
-	}
-  _end = . ;
-
-  /* Stabs debugging sections.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
-  .stab.excl 0 : { *(.stab.excl) }
-  .stab.exclstr 0 : { *(.stab.exclstr) }
-  .stab.index 0 : { *(.stab.index) }
-  .stab.indexstr 0 : { *(.stab.indexstr) }
-  .comment 0 : { *(.comment) }
+	. = TEXTADDR;
+
+	.init : {
+		__init_begin = .;	/* Init code and data		*/
+			*(.text.init)
+		__proc_info_begin = .;
+			*(.proc.info)
+		__proc_info_end = .;
+			*(.data.init)
+		. = ALIGN(16);
+		__setup_start = .;
+			*(.setup.init)
+		__setup_end = .;
+		__initcall_start = .;
+			*(.initcall.init)
+		__initcall_end = .;
+		. = ALIGN(32768);
+		__init_end = .;
+	}
+
+	.init.task : {
+		*(.init.task)
+	}
+
+	/DISCARD/ : {			/* Exit code and data		*/
+		*(.text.exit)
+		*(.data.exit)
+		*(.exitcall.exit)
+	}
+
+	.text : {
+		_text = .;		/* Text and read-only data	*/
+			*(.text)
+			*(.fixup)
+			*(.gnu.warning)
+			*(.text.lock)	/* out-of-line lock text	*/
+			*(.rodata)
+			*(.kstrtab)
+		. = ALIGN(16);		/* Exception table		*/
+		__start___ex_table = .;
+			*(__ex_table)
+		__stop___ex_table = .;
+
+		__start___ksymtab = .;	/* Kernel symbol table		*/
+			*(__ksymtab)
+		__stop___ksymtab = .;
+
+		*(.got)			/* Global offset table		*/
+
+		_etext = .;		/* End of text section		*/
+	}
+
+	.data : {			/* Data */
+		/*
+		 * The cacheline aligned data
+		 */
+		. = ALIGN(32);
+		*(.data.cacheline_aligned)
+
+		/*
+		 * and the usual data section
+		 */
+		*(.data)
+		CONSTRUCTORS
+
+		_edata = .;
+	}
+
+	.bss : {
+		__bss_start = .;	/* BSS				*/
+		*(.bss)
+		*(COMMON)
+		_end = . ;
+	}
+
+					/* Stabs debugging sections.  */
+	.stab 0 : { *(.stab) }
+	.stabstr 0 : { *(.stabstr) }
+	.stab.excl 0 : { *(.stab.excl) }
+	.stab.exclstr 0 : { *(.stab.exclstr) }
+	.stab.index 0 : { *(.stab.index) }
+	.stab.indexstr 0 : { *(.stab.indexstr) }
+	.comment 0 : { *(.comment) }
 }
diff -urN linux-2.2.18-pre14/arch/arm/vmlinux-armv.lds.in linux/arch/arm/vmlinux-armv.lds.in
--- linux-2.2.18-pre14/arch/arm/vmlinux-armv.lds.in	Mon Dec  3 20:32:31 2001
+++ linux/arch/arm/vmlinux-armv.lds.in	Mon Dec  3 20:33:03 2001
@@ -14,8 +14,21 @@
 			*(.proc.info)
 		__proc_info_end = .;
 			*(.data.init)
+		. = ALIGN(16);
+		__setup_start = .;
+			*(.setup.init)
+		__setup_end = .;
+		__initcall_start = .;
+			*(.initcall.init)
+		__initcall_end = .;
 		. = ALIGN(4096);
 		__init_end = .;
+	}
+
+	/DISCARD/ : {			/* Exit code and data		*/
+		*(.text.exit)
+		*(.data.exit)
+		*(.exitcall.exit)
 	}
 
 	__ebsa285_begin = .;
diff -urN linux-2.2.18-pre14/arch/i386/kernel/setup.c linux/arch/i386/kernel/setup.c
--- linux-2.2.18-pre14/arch/i386/kernel/setup.c	Mon Dec  3 20:32:31 2001
+++ linux/arch/i386/kernel/setup.c	Mon Dec  3 20:33:03 2001
@@ -1257,8 +1257,8 @@
 			if ( c->x86_capability & (1 << i) )
 				p += sprintf(p, " %s", x86_cap_flags[i]);
 		p += sprintf(p, "\nbogomips\t: %lu.%02lu\n\n",
-			     (c->loops_per_jiffy+2500)/(500000/HZ),
-			     ((c->loops_per_jiffy+2500)/(5000/HZ)) % 100);
+			     c->loops_per_jiffy/(500000/HZ),
+			     (c->loops_per_jiffy/(5000/HZ)) % 100);
 	}
 	return p - buffer;
 }
diff -urN linux-2.2.18-pre14/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
--- linux-2.2.18-pre14/arch/i386/kernel/smp.c	Mon Dec  3 20:32:31 2001
+++ linux/arch/i386/kernel/smp.c	Mon Dec  3 20:33:03 2001
@@ -1600,8 +1600,8 @@
 		}
 		printk(KERN_INFO "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
 			cpucount+1,
-			(bogosum+2500)/(500000/HZ),
-			((bogosum+2500)/(5000/HZ))%100);
+			bogosum/(500000/HZ),
+			(bogosum/(5000/HZ))%100);
 		SMP_PRINTK(("Before bogocount - setting activated=1.\n"));
 		smp_activated=1;
 		smp_num_cpus=cpucount+1;
@@ -1813,7 +1813,7 @@
 void smp_flush_tlb(void)
 {
 	int cpu = smp_processor_id();
-	int stuck;
+	long long stuck;
 	unsigned long flags;
 
 	/*
diff -urN linux-2.2.18-pre14/drivers/block/acsi.c linux/drivers/block/acsi.c
--- linux-2.2.18-pre14/drivers/block/acsi.c	Tue Dec 29 11:23:59 1998
+++ linux/drivers/block/acsi.c	Mon Dec  3 20:33:03 2001
@@ -411,7 +411,7 @@
  * 6), the timeout is based on the 'jiffies' variable to provide exact
  * timeouts for device probing etc.
  * If interrupts are disabled, the number of tries is based on the
- * 'loops_per_sec' variable. A rough estimation is sufficient here...
+ * 'loops_per_jiffy' variable. A rough estimation is sufficient here...
  */
 
 #define INT_LEVEL													\
@@ -429,7 +429,7 @@
 			if (!(mfp.par_dt_reg & 0x20)) return( 1 );
 	}
 	else {
-		long tries = loops_per_sec / HZ / 8 * timeout;
+		long tries = loops_per_jiffy / 8 * timeout;
 		while( --tries >= 0 )
 			if (!(mfp.par_dt_reg & 0x20)) return( 1 );
 	}		
@@ -446,7 +446,7 @@
 			if (mfp.par_dt_reg & 0x20) return( 1 );
 	}
 	else {
-		long tries = loops_per_sec * timeout / HZ / 8;
+		long tries = loops_per_jiffy / 8 * timeout;
 		while( tries-- >= 0 )
 			if (mfp.par_dt_reg & 0x20) return( 1 );
 	}		
diff -urN linux-2.2.18-pre14/drivers/block/ide-cd.c linux/drivers/block/ide-cd.c
--- linux-2.2.18-pre14/drivers/block/ide-cd.c	Mon Dec  3 20:32:31 2001
+++ linux/drivers/block/ide-cd.c	Mon Dec  3 20:33:03 2001
@@ -210,17 +210,17 @@
  *                         patch thanks to "Eddie C. Dost" <ecd@skynet.be>
  *
  * 4.50  Oct 19, 1998  -- New maintainers!
- *                         Jens Axboe <axboe@image.dk>
+ *                         Jens Axboe <axboe@suse.de>
  *                         Chris Zwilling <chris@cloudnet.com>
  *
- * 4.51  Dec 23, 1998  -- Jens Axboe <axboe@image.dk>
+ * 4.51  Dec 23, 1998  -- Jens Axboe <axboe@suse.de>
  *                      - ide_cdrom_reset enabled since the ide subsystem
- *                         handles resets fine now. <axboe@image.dk>
+ *                         handles resets fine now. <axboe@suse.de>
  *                      - Transfer size fix for Samsung CD-ROMs, thanks to
  *                        "Ville Hallik" <ville.hallik@mail.ee>.
  *                      - other minor stuff.
  *
- * 4.52  Jan 19, 1999  -- Jens Axboe <axboe@image.dk>
+ * 4.52  Jan 19, 1999  -- Jens Axboe <axboe@suse.de>
  *                      - Detect DVD-ROM/RAM drives
  *
  * 4.53  Feb 22, 1999   - Include other model Samsung and one Goldstar
@@ -1835,9 +1835,9 @@
 	memset(&pc, 0, sizeof (pc));
 	pc.sense = &sense;
 
-	pc.c[0] = GPCMD_PLAY_AUDIO_10;
-	put_unaligned(cpu_to_be32(lba_start), (unsigned int *) &pc.c[2]);
-	put_unaligned(cpu_to_be16(lba_end - lba_start), (unsigned int *) &pc.c[7]);
+	pc.c[0] = GPCMD_PLAY_AUDIO_MSF;
+	lba_to_msf(lba_start, &pc.c[3], &pc.c[4], &pc.c[5]);
+	lba_to_msf(lba_end-1, &pc.c[6], &pc.c[7], &pc.c[8]);
 
 	return cdrom_queue_packet_command(drive, &pc);
 }
@@ -1944,14 +1944,15 @@
 {
 	ide_drive_t *drive = (ide_drive_t*) cdi->handle;
 	struct cdrom_info *info = drive->driver_data;
+	int stat;
 
 	switch (cmd) {
 	/*
-	 * emulate PLAY_AUDIO_TI command with PLAY_AUDIO_10, since
+	 * emulate PLAY_AUDIO_TI command with PLAY_AUDIO_MSF, since
 	 * atapi doesn't support it
 	 */
 	case CDROMPLAYTRKIND: {
-		int stat, lba_start, lba_end;
+		int lba_start, lba_end;
 		struct cdrom_ti *ti = (struct cdrom_ti *)arg;
 		struct atapi_toc_entry *first_toc, *last_toc;
 
@@ -1975,7 +1976,6 @@
 	}
 
 	case CDROMREADTOCHDR: {
-		int stat;
 		struct cdrom_tochdr *tochdr = (struct cdrom_tochdr *) arg;
 		struct atapi_toc *toc;
 
@@ -1991,7 +1991,6 @@
 	}
 
 	case CDROMREADTOCENTRY: {
-		int stat;
 		struct cdrom_tocentry *tocentry = (struct cdrom_tocentry*) arg;
 		struct atapi_toc_entry *toce;
 
diff -urN linux-2.2.18-pre14/drivers/block/rd.c linux/drivers/block/rd.c
--- linux-2.2.18-pre14/drivers/block/rd.c	Mon Sep  4 10:39:17 2000
+++ linux/drivers/block/rd.c	Mon Dec  3 20:33:03 2001
@@ -653,7 +653,9 @@
 
 #define OF(args)  args
 
+#ifndef memzero
 #define memzero(s, n)     memset ((s), 0, (n))
+#endif
 
 
 typedef unsigned char  uch;
diff -urN linux-2.2.18-pre14/drivers/cdrom/cdrom.c linux/drivers/cdrom/cdrom.c
--- linux-2.2.18-pre14/drivers/cdrom/cdrom.c	Mon Dec  3 20:32:31 2001
+++ linux/drivers/cdrom/cdrom.c	Mon Dec  3 20:33:03 2001
@@ -82,17 +82,17 @@
   Thanks to Grant R. Guenther <grant@torque.net> for spotting this bug.
   -- Made a few things more pedanticly correct.
 
-2.50 Oct 19, 1998 - Jens Axboe <axboe@image.dk>
+2.50 Oct 19, 1998 - Jens Axboe <axboe@suse.de>
   -- New maintainers! Erik was too busy to continue the work on the driver,
-  so now Chris Zwilling <chris@cloudnet.com> and Jens Axboe <axboe@image.dk>
+  so now Chris Zwilling <chris@cloudnet.com> and Jens Axboe <axboe@suse.de>
   will do their best to follow in his footsteps
   
-  2.51 Dec 20, 1998 - Jens Axboe <axboe@image.dk>
+  2.51 Dec 20, 1998 - Jens Axboe <axboe@suse.de>
   -- Check if drive is capable of doing what we ask before blindly changing
   cdi->options in various ioctl.
   -- Added version to proc entry.
   
-  2.52 Jan 16, 1999 - Jens Axboe <axboe@image.dk>
+  2.52 Jan 16, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed an error in open_for_data where we would sometimes not return
   the correct error value. Thanks Huba Gaspar <huba@softcell.hu>.
   -- Fixed module usage count - usage was based on /proc/sys/dev
@@ -101,7 +101,7 @@
   dev would be removed even though it was used. cdrom.c just illuminated
   that bug.
   
-  2.53 Feb 22, 1999 - Jens Axboe <axboe@image.dk>
+  2.53 Feb 22, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixup of several ioctl calls, in particular CDROM_SET_OPTIONS has
   been "rewritten" because capabilities and options aren't in sync. They
   should be...
@@ -111,16 +111,16 @@
   -- Added CDROM_GET_CAPABILITY ioctl. This relieves userspace programs
   from parsing /proc/sys/dev/cdrom/info.
   
-  2.54 Mar 15, 1999 - Jens Axboe <axboe@image.dk>
+  2.54 Mar 15, 1999 - Jens Axboe <axboe@suse.de>
   -- Check capability mask from low level driver when counting tracks as
   per suggestion from Corey J. Scotts <cstotts@blue.weeg.uiowa.edu>.
   
-  2.55 Apr 25, 1999 - Jens Axboe <axboe@image.dk>
+  2.55 Apr 25, 1999 - Jens Axboe <axboe@suse.de>
   -- autoclose was mistakenly checked against CDC_OPEN_TRAY instead of
   CDC_CLOSE_TRAY.
   -- proc info didn't mask against capabilities mask.
   
-  3.00 Aug 5, 1999 - Jens Axboe <axboe@image.dk>
+  3.00 Aug 5, 1999 - Jens Axboe <axboe@suse.de>
   -- Unified audio ioctl handling across CD-ROM drivers. A lot of the
   code was duplicated before. Drives that support the generic packet
   interface are now being fed packets from here instead.
@@ -138,13 +138,13 @@
   -- CDROM_SEND_PACKET ioctl added. The infrastructure was in place for
   doing this anyway, with the generic_packet addition.
   
-  3.01 Aug 6, 1999 - Jens Axboe <axboe@image.dk>
+  3.01 Aug 6, 1999 - Jens Axboe <axboe@suse.de>
   -- Fix up the sysctl handling so that the option flags get set
   correctly.
   -- Fix up ioctl handling so the device specific ones actually get
   called :).
   
-  3.02 Aug 8, 1999 - Jens Axboe <axboe@image.dk>
+  3.02 Aug 8, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed volume control on SCSI drives (or others with longer audio
   page).
   -- Fixed a couple of DVD minors. Thanks to Andrew T. Veliath
@@ -153,7 +153,7 @@
   DVD patches for ide-cd and while I rearranged and unified them, the
   interface is still the same.
   
-  3.03 Sep 1, 1999 - Jens Axboe <axboe@image.dk>
+  3.03 Sep 1, 1999 - Jens Axboe <axboe@suse.de>
   -- Moved the rest of the audio ioctls from the CD-ROM drivers here. Only
   CDROMREADTOCENTRY and CDROMREADTOCHDR are left.
   -- Moved the CDROMREADxxx ioctls in here.
@@ -164,7 +164,7 @@
   drivers are updated as well.
   -- Various other cleanups.
 
-  3.04 Sep 12, 1999 - Jens Axboe <axboe@image.dk>
+  3.04 Sep 12, 1999 - Jens Axboe <axboe@suse.de>
   -- Fixed a couple of possible memory leaks (if an operation failed and
   we didn't free the buffer before returning the error).
   -- Integrated Uniform CD Changer handling from Richard Sharman
@@ -178,7 +178,7 @@
   -- Export cdrom_mode_sense and cdrom_mode_select.
   -- init_cdrom_command() for setting up a cgc command.
   
-  3.05 Oct 24, 1999 - Jens Axboe <axboe@image.dk>
+  3.05 Oct 24, 1999 - Jens Axboe <axboe@suse.de>
   -- Changed the interface for CDROM_SEND_PACKET. Before it was virtually
   impossible to send the drive data in a sensible way.
   -- Lowered stack usage in mmc_ioctl(), dvd_read_disckey(), and
@@ -187,7 +187,7 @@
   -- Fixed CDDA ripping with cdda2wav - accept much larger requests of
   number of frames and split the reads in blocks of 8.
 
-  3.06 Dec 13, 1999 - Jens Axboe <axboe@image.dk>
+  3.06 Dec 13, 1999 - Jens Axboe <axboe@suse.de>
   -- Added support for changing the region of DVD drives.
   -- Added sense data to generic command.
 
@@ -1107,6 +1107,7 @@
 		setup_report_key(&cgc, 0, 8);
 		memset(&rpc_state, 0, sizeof(rpc_state_t));
 		cgc.buffer = (char *) &rpc_state;
+		cgc.buffer = (char *) &rpc_state;
 
 		if ((ret = cdo->generic_packet(cdi, &cgc)))
 			return ret;
@@ -2553,6 +2554,7 @@
  * Note: only the top-level directory needs to do this; if
  * a lower level is referenced, the parent will be as well.
  */
+#ifdef CONFIG_PROC_FS
 static void cdrom_procfs_modcount(struct inode *inode, int fill)
 {
 	if (fill) {
@@ -2561,6 +2563,7 @@
 		MOD_DEC_USE_COUNT;
 	}
 }
+#endif
 
 static void cdrom_sysctl_register(void)
 {
@@ -2570,7 +2573,9 @@
 		return;
 
 	cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 1);
+#ifdef CONFIG_PROC_FS
 	cdrom_root_table->child->de->fill_inode = &cdrom_procfs_modcount;
+#endif
 
 	/* set the defaults */
 	cdrom_sysctl_settings.autoclose = autoclose;
diff -urN linux-2.2.18-pre14/drivers/char/dtlk.c linux/drivers/char/dtlk.c
--- linux-2.2.18-pre14/drivers/char/dtlk.c	Mon Dec  3 20:32:31 2001
+++ linux/drivers/char/dtlk.c	Mon Dec  3 20:33:03 2001
@@ -61,7 +61,7 @@
 #include <linux/mm.h>		/* for verify_area */
 #include <linux/errno.h>	/* for -EBUSY */
 #include <linux/ioport.h>	/* for check_region, request_region */
-#include <linux/delay.h>	/* for loops_per_sec */
+#include <linux/delay.h>	/* for loops_per_jiffy */
 #include <asm/segment.h>	/* for put_user_byte */
 #include <asm/io.h>		/* for inb_p, outb_p, inb, outb, etc. */
 #include <asm/uaccess.h>	/* for get_user, etc. */
diff -urN linux-2.2.18-pre14/drivers/char/epca.c linux/drivers/char/epca.c
--- linux-2.2.18-pre14/drivers/char/epca.c	Mon Dec  3 20:32:31 2001
+++ linux/drivers/char/epca.c	Mon Dec  3 20:33:03 2001
@@ -1825,8 +1825,8 @@
 	/* --------------------------------------------------------------------- 
 	   loops_per_sec hasn't been set at this point :-(, so fake it out... 
 	   I set it, so that I can use the __delay() function.
-	    
-	   Yes it is nowdays
+	   
+	   We don't use __delay(), so we don't need to fake it.
 	   
 	------------------------------------------------------------------------ */
 
diff -urN linux-2.2.18-pre14/drivers/misc/parport_pc.c linux/drivers/misc/parport_pc.c
--- linux-2.2.18-pre14/drivers/misc/parport_pc.c	Mon Dec  3 20:32:31 2001
+++ linux/drivers/misc/parport_pc.c	Mon Dec  3 20:33:04 2001
@@ -617,7 +617,7 @@
 
 	sti();
 	irqs = probe_irq_on();
-		
+
 	parport_pc_write_econtrol(pb, 0x00);	/* Reset FIFO */
 	parport_pc_write_econtrol(pb, 0xd0);	/* TEST FIFO + nErrIntrEn */
 
@@ -948,6 +948,7 @@
 		}
 	}
 
+#ifdef CONFIG_PCI
 	/* Look for parallel controllers that we don't know about. */
 	for (pcidev = pci_devices; pcidev; pcidev = pcidev->next) {
 		const int class_noprogif = pcidev->class & ~0xff;
@@ -968,6 +969,7 @@
 			"tim@cyberelk.demon.co.uk\n",
 			pcidev->vendor, pcidev->device);
 	}
+#endif
 
 	return count;
 }
diff -urN linux-2.2.18-pre14/drivers/net/am79c961a.c linux/drivers/net/am79c961a.c
--- linux-2.2.18-pre14/drivers/net/am79c961a.c	Fri May  8 00:42:39 1998
+++ linux/drivers/net/am79c961a.c	Mon Dec  3 20:33:04 2001
@@ -38,35 +38,29 @@
 static void
 am79c961_setmulticastlist (struct device *dev);
 
-static char *version = "am79c961 ethernet driver (c) 1995 R.M.King v0.00\n";
-
-#define FUNC_PROLOGUE \
-	struct dev_priv *priv = (struct dev_priv *)dev->priv
+static char *version = "am79c961 ethernet driver (c) 1995 R.M.King v0.01\n";
 
 /* --------------------------------------------------------------------------- */
 
+#ifdef __arm__
 static void
 write_rreg (unsigned long base, unsigned int reg, unsigned short val)
 {
-	__asm__("
-		strh	%1, [%2]	@ NET_RAP
-		strh	%0, [%2, #-4]	@ NET_RDP
+	__asm__("str%?h	%1, [%2]	@ NET_RAP
+		str%?h	%0, [%2, #-4]	@ NET_RDP
 		" : : "r" (val), "r" (reg), "r" (0xf0000464));
 }
 
 static inline void
 write_ireg (unsigned long base, unsigned int reg, unsigned short val)
 {
-	__asm__("
-		strh	%1, [%2]	@ NET_RAP
-		strh	%0, [%2, #8]	@ NET_RDP
+	__asm__("str%?h	%1, [%2]	@ NET_RAP
+		str%?h	%0, [%2, #8]	@ NET_RDP
 		" : : "r" (val), "r" (reg), "r" (0xf0000464));
 }
 
 #define am_writeword(dev,off,val)\
-	__asm__("\
-		strh	%0, [%1]\
-		" : : "r" ((val) & 0xffff), "r" (0xe0000000 + ((off) << 1)));
+	__asm__("str%?h	%0, [%1]" : : "r" ((val) & 0xffff), "r" (0xe0000000 + ((off) << 1)));
 
 static inline void
 am_writebuffer(struct device *dev, unsigned int offset, unsigned char *buf, unsigned int length)
@@ -74,30 +68,28 @@
 	offset = 0xe0000000 + (offset << 1);
 	length = (length + 1) & ~1;
 	if ((int)buf & 2) {
-		__asm__ __volatile__("
-			strh	%2, [%0], #4
-		" : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
+		__asm__ __volatile__("str%?h	%2, [%0], #4"
+		 : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
 		buf += 2;
 		length -= 2;
 	}
 	while (length > 8) {
 		unsigned int tmp, tmp2;
 		__asm__ __volatile__("
-			ldmia	%1!, {%2, %3}
-			strh	%2, [%0], #4
-			mov	%2, %2, lsr #16
-			strh	%2, [%0], #4
-			strh	%3, [%0], #4
-			mov	%3, %3, lsr #16
-			strh	%3, [%0], #4
-		" : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2)
+			ldm%?ia	%1!, {%2, %3}
+			str%?h	%2, [%0], #4
+			mov%?	%2, %2, lsr #16
+			str%?h	%2, [%0], #4
+			str%?h	%3, [%0], #4
+			mov%?	%3, %3, lsr #16
+			str%?h	%3, [%0], #4
+		" : "=&r" (offset), "=&r" (buf), "=&r" (tmp), "=&r" (tmp2)
 		  : "0" (offset), "1" (buf));
 		length -= 8;
 	}
 	while (length > 0) {
-		__asm__ __volatile__("
-			strh	%2, [%0], #4
-		" : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
+		__asm__ __volatile__("str%?h	%2, [%0], #4"
+		 : "=&r" (offset) : "0" (offset), "r" (buf[0] | (buf[1] << 8)));
 		buf += 2;
 		length -= 2;
 	}
@@ -107,9 +99,8 @@
 read_rreg (unsigned int base_addr, unsigned int reg)
 {
 	unsigned short v;
-	__asm__("
-		strh	%1, [%2]	@ NET_RAP
-		ldrh	%0, [%2, #-4]	@ NET_IDP
+	__asm__("str%?h	%1, [%2]	@ NET_RAP
+		ldr%?h	%0, [%2, #-4]	@ NET_IDP
 		" : "=r" (v): "r" (reg), "r" (0xf0000464));
 	return v;
 }
@@ -120,9 +111,7 @@
 	unsigned long address = 0xe0000000 + (off << 1);
 	unsigned short val;
 
-	__asm__("
-		ldrh	%0, [%1]
-		" : "=r" (val): "r" (address));
+	__asm__("ldr%?h	%0, [%1]" : "=r" (val): "r" (address));
 	return val;
 }
 
@@ -134,38 +123,41 @@
 	if ((int)buf & 2) {
 		unsigned int tmp;
 		__asm__ __volatile__("
-			ldrh	%2, [%0], #4
-			strb	%2, [%1], #1
-			mov	%2, %2, lsr #8
-			strb	%2, [%1], #1
+			ldr%?h	%2, [%0], #4
+			str%?b	%2, [%1], #1
+			mov%?	%2, %2, lsr #8
+			str%?b	%2, [%1], #1
 		" : "=&r" (offset), "=&r" (buf), "=r" (tmp): "0" (offset), "1" (buf));
 		length -= 2;
 	}
 	while (length > 8) {
 		unsigned int tmp, tmp2, tmp3;
 		__asm__ __volatile__("
-			ldrh	%2, [%0], #4
-			ldrh	%3, [%0], #4
-			orr	%2, %2, %3, lsl #16
-			ldrh	%3, [%0], #4
-			ldrh	%4, [%0], #4
-			orr	%3, %3, %4, lsl #16
-			stmia	%1!, {%2, %3}
-		" : "=&r" (offset), "=&r" (buf), "=r" (tmp), "=r" (tmp2), "=r" (tmp3)
+			ldr%?h	%2, [%0], #4
+			ldr%?h	%3, [%0], #4
+			orr%?	%2, %2, %3, lsl #16
+			ldr%?h	%3, [%0], #4
+			ldr%?h	%4, [%0], #4
+			orr%?	%3, %3, %4, lsl #16
+			stm%?ia	%1!, {%2, %3}
+		" : "=&r" (offset), "=&r" (buf), "=&r" (tmp), "=&r" (tmp2), "=&r" (tmp3)
 		  : "0" (offset), "1" (buf));
 		length -= 8;
 	}
 	while (length > 0) {
 		unsigned int tmp;
 		__asm__ __volatile__("
-			ldrh	%2, [%0], #4
-			strb	%2, [%1], #1
-			mov	%2, %2, lsr #8
-			strb	%2, [%1], #1
+			ldr%?h	%2, [%0], #4
+			str%?b	%2, [%1], #1
+			mov%?	%2, %2, lsr #8
+			str%?b	%2, [%1], #1
 		" : "=&r" (offset), "=&r" (buf), "=r" (tmp) : "0" (offset), "1" (buf));
 		length -= 2;
 	}
 }
+#else
+#error Not compatable
+#endif
 
 static int
 am79c961_ramtest(struct device *dev, unsigned int val)
@@ -259,7 +251,7 @@
 	write_rreg (dev->base_addr, SIZERXR, -RX_BUFFERS);
 	write_rreg (dev->base_addr, SIZETXR, -TX_BUFFERS);
 	write_rreg (dev->base_addr, CSR0, CSR0_STOP);
-	write_rreg (dev->base_addr, CSR3, CSR3_IDONM|CSR3_BABLM);
+	write_rreg (dev->base_addr, CSR3, CSR3_IDONM|CSR3_BABLM|CSR3_DXSUFLO);
 	write_rreg (dev->base_addr, CSR0, CSR0_IENA|CSR0_STRT);
 }
 
@@ -304,7 +296,7 @@
 	/*
 	 * The PNP initialisation should have been done by the ether bootp loader.
 	 */
-	inb ((dev->base_addr + NET_RESET) >> 1);	/* reset the device */
+	inb((dev->base_addr + NET_RESET) >> 1);	/* reset the device */
 
 	udelay (5);
 
@@ -420,26 +412,105 @@
 	return &priv->stats;
 }
 
+static inline u32 update_crc(u32 crc, u8 byte)
+{
+	int i;
+
+	for (i = 8; i != 0; i--) {
+		byte ^= crc & 1;
+		crc >>= 1;
+
+		if (byte & 1)
+			crc ^= 0xedb88320;
+
+		byte >>= 1;
+	}
+
+	return crc;
+}
+
+static void am79c961_mc_hash(struct dev_mc_list *dmi, unsigned short *hash)
+{
+	if (dmi->dmi_addrlen == ETH_ALEN && dmi->dmi_addr[0] & 0x01) {
+	    	int i, idx, bit;
+		u32 crc;
+
+		crc = 0xffffffff;
+
+		for (i = 0; i < ETH_ALEN; i++)
+			crc = update_crc(crc, dmi->dmi_addr[i]);
+
+		idx = crc >> 30;
+		bit = (crc >> 26) & 15;
+
+		hash[idx] |= 1 << bit;
+	}
+}
+
 /*
  * Set or clear promiscuous/multicast mode filter for this adaptor.
- *
- * We don't attempt any packet filtering.  The card may have a SEEQ 8004
- * in which does not have the other ethernet address registers present...
+ * We don't attempt any packet filtering.
  */
 static void am79c961_setmulticastlist (struct device *dev)
 {
 	unsigned long flags;
-	int i;
+	unsigned short multi_hash[4], mode;
+	int i, stopped;
 
-	dev->flags &= ~IFF_ALLMULTI;
+	mode = MODE_PORT0;
 
-	i = MODE_PORT0;
-	if (dev->flags & IFF_PROMISC)
-		i |= MODE_PROMISC;
+	if (dev->flags & IFF_PROMISC) {
+		mode |= MODE_PROMISC;
+	} else if (dev->flags & IFF_ALLMULTI) {
+		memset(multi_hash, 0xff, sizeof(multi_hash));
+	} else {
+		struct dev_mc_list *dmi;
 
-	save_flags_cli (flags);
-	write_rreg (dev->base_addr, MODE, i);
-	restore_flags (flags);
+		memset(multi_hash, 0x00, sizeof(multi_hash));
+
+		for (dmi = dev->mc_list; dmi; dmi = dmi->next)
+			am79c961_mc_hash(dmi, multi_hash);
+	}
+
+	save_flags_cli(flags);
+
+	stopped = read_rreg(dev->base_addr, CSR0) & CSR0_STOP;
+
+	if (!stopped) {
+		/*
+		 * Put the chip into suspend mode
+		 */
+		write_rreg(dev->base_addr, CTRL1, CTRL1_SPND);
+
+		/*
+		 * Spin waiting for chip to report suspend mode
+		 */
+		while ((read_rreg(dev->base_addr, CTRL1) & CTRL1_SPND) == 0) {
+			restore_flags(flags);
+			nop();
+			save_flags_cli(flags);
+		}
+	}
+
+	/*
+	 * Update the multicast hash table
+	 */
+	for (i = 0; i < sizeof(multi_hash) / sizeof(multi_hash[0]); i++)
+		write_rreg(dev->base_addr, i + LADRL, multi_hash[i]);
+
+	/*
+	 * Write the mode register
+	 */
+	write_rreg(dev->base_addr, MODE, mode);
+
+	if (!stopped) {
+		/*
+		 * Put the chip back into running mode
+		 */
+		write_rreg(dev->base_addr, CTRL1, 0);
+	}
+
+	restore_flags(flags);
 }
 
 /*
@@ -455,17 +526,20 @@
 		if (!test_and_set_bit(0, (void*)&dev->tbusy)) {
 			unsigned int length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
 			unsigned int hdraddr, bufaddr;
+			unsigned int head;
 			unsigned long flags;
 
-			hdraddr = priv->txhdr + (priv->txhead << 3);
-			bufaddr = priv->txbuffer[priv->txhead];
-			priv->txhead ++;
-			if (priv->txhead >= TX_BUFFERS)
-				priv->txhead = 0;
+			head = priv->txhead;
+			hdraddr = priv->txhdr + (head << 3);
+			bufaddr = priv->txbuffer[head];
+			head += 1;
+			if (head >= TX_BUFFERS)
+				head = 0;
 
 			am_writebuffer (dev, bufaddr, skb->data, length);
 			am_writeword (dev, hdraddr + 4, -length);
 			am_writeword (dev, hdraddr + 2, TMD_OWN|TMD_STP|TMD_ENP);
+			priv->txhead = head;
 
 			save_flags_cli (flags);
 			write_rreg (dev->base_addr, CSR0, CSR0_TDMD|CSR0_IENA);
@@ -483,10 +557,14 @@
 		int tickssofar = jiffies - dev->trans_start;
 		if (tickssofar < 5)
 			return 1;
-		printk (KERN_WARNING "%s: transmit timed out, network cable problem?\n", dev->name);
+		printk(KERN_WARNING "%s: transmit timed out, network cable problem?\n", dev->name);
 		/* Try to restart the adaptor. */
+		disable_irq(dev->irq);
+		am79c961_init(dev);
+		am79c961_init_for_open(dev);
 		dev->tbusy = 0;
 		dev->trans_start = jiffies;
+		enable_irq(dev->irq);
 		goto again;
 	}
 }
@@ -613,7 +691,7 @@
 			am_writeword (dev, hdraddr + 6, 0);
 
 			if (status2 & TST_RTRY)
-				priv->stats.collisions += 1;
+				priv->stats.collisions += 16;
 			if (status2 & TST_LCOL)
 				priv->stats.tx_window_errors ++;
 			if (status2 & TST_LCAR)
diff -urN linux-2.2.18-pre14/drivers/net/am79c961a.h linux/drivers/net/am79c961a.h
--- linux-2.2.18-pre14/drivers/net/am79c961a.h	Mon Feb 16 15:50:21 1998
+++ linux/drivers/net/am79c961a.h	Mon Dec  3 20:33:04 2001
@@ -45,6 +45,7 @@
 #define CSR3_EMBA	0x0008
 #define CSR3_DXMT2PD	0x0010
 #define CSR3_LAPPEN	0x0020
+#define CSR3_DXSUFLO	0x0040
 #define CSR3_IDONM	0x0100
 #define CSR3_TINTM	0x0200
 #define CSR3_RINTM	0x0400
@@ -53,6 +54,9 @@
 #define CSR3_BABLM	0x4000
 #define CSR3_MASKALL	0x5F00
 
+#define CTRL1		5
+#define CTRL1_SPND	0x0001
+
 #define LADRL		8
 #define LADRM1		9
 #define LADRM2		10
@@ -97,8 +101,8 @@
 #define TMD_ERR		0x4000
 #define TMD_OWN		0x8000
 
-#define TST_RTRY	0x0200
-#define TST_LCAR	0x0400
+#define TST_RTRY	0x0400
+#define TST_LCAR	0x0800
 #define TST_LCOL	0x1000
 #define TST_UFLO	0x4000
 
diff -urN linux-2.2.18-pre14/drivers/net/fc/iph5526.c linux/drivers/net/fc/iph5526.c
--- linux-2.2.18-pre14/drivers/net/fc/iph5526.c	Wed Aug 25 17:29:48 1999
+++ linux/drivers/net/fc/iph5526.c	Mon Dec  3 20:33:04 2001
@@ -2242,7 +2242,7 @@
 	/* (i)chip reset */
 	writel(ICHIP_HCR_RESET, fi->i_r.ptr_ichip_hw_control_reg);
 	/*wait for chip to get reset */
-	udelay(10000);
+	mdelay(10);
 	/*de-assert reset */
 	writel(ICHIP_HCR_DERESET, fi->i_r.ptr_ichip_hw_control_reg);
 	
@@ -3884,7 +3884,7 @@
 	/* This is to make sure that the ACC to the PRLI comes in 
 	 * for the last ALPA. 
 	 */
-	udelay(1000000); /* Ugly! Let the Gods forgive me */
+	mdelay(1000); /* Ugly! Let the Gods forgive me */
 
 	DPRINTK1("leaving iph5526_detect\n");
 	return no_of_hosts;
diff -urN linux-2.2.18-pre14/drivers/net/tulip.c linux/drivers/net/tulip.c
--- linux-2.2.18-pre14/drivers/net/tulip.c	Mon Dec  3 20:32:32 2001
+++ linux/drivers/net/tulip.c	Mon Dec  3 20:33:04 2001
@@ -344,6 +344,8 @@
 	0x11AD, 0xc115, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "ADMtek AN981 Comet",
 	0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
+  { "ADMtek AN985 Comet",
+	0x1317, 0x0981, 0xffff, PCI_ADDR0_IO, 256, 32, tulip_probe1 },
   { "Compex RL100-TX",
 	0x11F6, 0x9881, 0xffff, PCI_ADDR0_IO, 128, 32, tulip_probe1 },
   { "Intel 21145 Tulip",
diff -urN linux-2.2.18-pre14/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
--- linux-2.2.18-pre14/drivers/scsi/aha152x.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/scsi/aha152x.c	Mon Dec  3 20:33:04 2001
@@ -406,8 +406,6 @@
 
 /* END OF DEFINES */
 
-extern long loops_per_sec;
-
 #define DELAY_DEFAULT 100
 
 /* some additional "phases" for getphase() */
diff -urN linux-2.2.18-pre14/drivers/scsi/cpqfcTSstructs.h linux/drivers/scsi/cpqfcTSstructs.h
--- linux-2.2.18-pre14/drivers/scsi/cpqfcTSstructs.h	Mon Dec  3 20:32:32 2001
+++ linux/drivers/scsi/cpqfcTSstructs.h	Mon Dec  3 20:33:04 2001
@@ -83,7 +83,9 @@
 #define CPQFCTS_CMD_PER_LUN 15 // power of 2 -1, must be >0 
 #define CPQFCTS_REQ_QUEUE_LEN (TACH_SEST_LEN/2) // must be < TACH_SEST_LEN
 
+#ifndef LinuxVersionCode
 #define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s))
+#endif
 #ifndef DECLARE_MUTEX_LOCKED
 #define DECLARE_MUTEX_LOCKED(sem) struct semaphore sem = MUTEX_LOCKED
 #endif
@@ -104,8 +106,25 @@
                             // the fields shared with ODB
                             // need to have same value
 
+// Queues for TachLite not in original Tachyon
+// ERQ       - Exchange Request Queue (for outbound commands)
+// SFQ       - Single Frame Queue (for incoming frames)
+
+                            // Define Tachyon Outbound Command Que
+                            // (Since many Tachyon registers are Read
+                            // only, maintain copies for debugging)
+                            // most Tach ques need power-of-2 sizes,
+                            // where registers are loaded with po2 -1
+#define TACH_SEST_LEN 512   // TachLite SEST
+
+#define ELS_EXCHANGES 64    // e.g. PLOGI, RSCN, ...
+// define the total number of outstanding (simultaneous) exchanges
+#define TACH_MAX_XID (TACH_SEST_LEN + ELS_EXCHANGES)  // ELS exchanges
+
+#define ERQ_LEN 128         // power of 2, max 4096
 
 
+#ifndef HOSTS_C
 
 #ifndef BYTE
 //typedef UCHAR BYTE;
@@ -307,22 +326,6 @@
 } TachyonIMQE;
 
 
-// Queues for TachLite not in original Tachyon
-// ERQ       - Exchange Request Queue (for outbound commands)
-// SFQ       - Single Frame Queue (for incoming frames)
-
-                            // Define Tachyon Outbound Command Que
-                            // (Since many Tachyon registers are Read
-                            // only, maintain copies for debugging)
-                            // most Tach ques need power-of-2 sizes,
-                            // where registers are loaded with po2 -1
-#define TACH_SEST_LEN 512   // TachLite SEST
-
-#define ELS_EXCHANGES 64    // e.g. PLOGI, RSCN, ...
-// define the total number of outstanding (simultaneous) exchanges
-#define TACH_MAX_XID (TACH_SEST_LEN + ELS_EXCHANGES)  // ELS exchanges
-
-#define ERQ_LEN 128         // power of 2, max 4096
 
 // Inbound Message Queue structures...
 #define IMQ_LEN 512              // minimum 4 entries [(power of 2) - 1]
@@ -1489,6 +1492,6 @@
 #define BA_SEQUENCE_ABORTED	0x00000500
 
 
-
+#endif
 #endif /* CPQFCTSSTRUCTS_H	*/
 
diff -urN linux-2.2.18-pre14/drivers/scsi/sr.c linux/drivers/scsi/sr.c
--- linux-2.2.18-pre14/drivers/scsi/sr.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/scsi/sr.c	Mon Dec  3 20:33:04 2001
@@ -20,7 +20,7 @@
  *          Modified by Gerd Knorr <kraxel@cs.tu-berlin.de> to support the
  *          generic cdrom interface
  *
- *       Modified by Jens Axboe <axboe@image.dk> - Uniform sr_packet()
+ *       Modified by Jens Axboe <axboe@suse.de> - Uniform sr_packet()
  *       interface, capabilities probe additions, ioctl cleanups, etc.
  *
  *	Modified by Jens Axboe <axboe@suse.de> - support DVD-RAM
diff -urN linux-2.2.18-pre14/drivers/sound/Makefile linux/drivers/sound/Makefile
--- linux-2.2.18-pre14/drivers/sound/Makefile	Mon Dec  3 20:32:32 2001
+++ linux/drivers/sound/Makefile	Mon Dec  3 20:33:04 2001
@@ -122,7 +122,7 @@
 sb-objs		:= sb_audio.o sb_card.o sb_common.o sb_midi.o sb_mixer.o	\
 			   sb_ess.o
 softoss2-objs	:= softoss.o softoss_rs.o
-vidc_mod-objs	:= vidc.o vidc_audio.o vidc_fill.o vidc_mixer.o vidc_synth.o
+vidc_mod-objs	:= vidc.o vidc_fill.o vidc_synth.o
 wavefront-objs  := wavfront.o wf_midi.o yss225.o
 nm256-objs	:= nm256_audio.o ac97.o
 via82cxxx-objs  := via82cxxx_audio.o ac97.o
diff -urN linux-2.2.18-pre14/drivers/sound/vidc.c linux/drivers/sound/vidc.c
--- linux-2.2.18-pre14/drivers/sound/vidc.c	Wed Dec 16 12:52:01 1998
+++ linux/drivers/sound/vidc.c	Mon Dec  3 20:33:04 2001
@@ -1,118 +1,536 @@
 /*
- *	drivers/sound/vidc.c
+ * drivers/sound/vidc.c
  *
- *	Detection routine for the VIDC.
+ * VIDC20 audio driver.
  *
- *	Copyright (C) 1997 by Russell King <rmk@arm.uk.linux.org>
+ * Copyright (C) 1997-2000 by Russell King <rmk@arm.linux.org.uk>
+ *
+ * The VIDC20 sound hardware consists of the VIDC20 itself, a DAC and a DMA
+ * engine.  The DMA transfers fixed-format (16-bit little-endian linear)
+ * samples to the VIDC20, which then transfers this data serially to the
+ * DACs.  The samplerate is controlled by the VIDC.
+ *
+ * We currently support a mixer device, but it is currently non-functional.
  */
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 
-#include <asm/io.h>
+#include <asm/hardware.h>
 #include <asm/dma.h>
+#include <asm/io.h>
+#include <asm/iomd.h>
+#include <asm/system.h>
+
 #include "sound_config.h"
 #include "soundmodule.h"
 #include "vidc.h"
 
-int vidc_busy;
+#ifndef _SIOC_TYPE
+#define _SIOC_TYPE(x)	_IOC_TYPE(x)
+#endif
+#ifndef _SIOC_NR
+#define _SIOC_NR(x)	_IOC_NR(x)
+#endif
+
+#define VIDC_SOUND_CLOCK	(250000)
+
+/*
+ * When using SERIAL SOUND mode (external DAC), the number of physical
+ * channels is fixed at 2.
+ */
+static int		vidc_busy;
+static int		vidc_adev;
+static int		vidc_audio_rate;
+static char		vidc_audio_format;
+static char		vidc_audio_channels;
+
+static unsigned char	vidc_level_l[SOUND_MIXER_NRDEVICES] = {
+	85,		/* master	*/
+	50,		/* bass		*/
+	50,		/* treble	*/
+	0,		/* synth	*/
+	75,		/* pcm		*/
+	0,		/* speaker	*/
+	100,		/* ext line	*/
+	0,		/* mic		*/
+	100,		/* CD		*/
+	0,
+};
+
+static unsigned char	vidc_level_r[SOUND_MIXER_NRDEVICES] = {
+	85,		/* master	*/
+	50,		/* bass		*/
+	50,		/* treble	*/
+	0,		/* synth	*/
+	75,		/* pcm		*/
+	0,		/* speaker	*/
+	100,		/* ext line	*/
+	0,		/* mic		*/
+	100,		/* CD		*/
+	0,
+};
+
+static unsigned int	vidc_audio_volume_l;	/* left PCM vol, 0 - 65536 */
+static unsigned int	vidc_audio_volume_r;	/* right PCM vol, 0 - 65536 */
+
+static void	(*old_mksound)(unsigned int hz, unsigned int ticks);
+extern void	(*kd_mksound)(unsigned int hz, unsigned int ticks);
+extern void	vidc_update_filler(int bits, int channels);
 
-void vidc_update_filler(int format, int channels)
+static void
+vidc_mksound(unsigned int hz, unsigned int ticks)
+{
+
+}
+
+static void
+vidc_mixer_set(int mdev, unsigned int level)
+{
+	unsigned int lev_l = level & 0x007f;
+	unsigned int lev_r = (level & 0x7f00) >> 8;
+	unsigned int mlev_l, mlev_r;
+
+	if (lev_l > 100)
+		lev_l = 100;
+	if (lev_r > 100)
+		lev_r = 100;
+
+#define SCALE(lev,master)	((lev) * (master) * 65536 / 10000)
+
+	mlev_l = vidc_level_l[SOUND_MIXER_VOLUME];
+	mlev_r = vidc_level_r[SOUND_MIXER_VOLUME];
+
+	switch (mdev) {
+	case SOUND_MIXER_VOLUME:
+	case SOUND_MIXER_PCM:
+		vidc_level_l[mdev] = lev_l;
+		vidc_level_r[mdev] = lev_r;
+
+		vidc_audio_volume_l = SCALE(lev_l, mlev_l);
+		vidc_audio_volume_r = SCALE(lev_r, mlev_r);
+
+		break;
+	}
+#undef SCALE
+}
+
+static int vidc_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg)
+{
+	unsigned int val;
+	unsigned int mdev;
+
+	if (_SIOC_TYPE(cmd) != 'M')
+		return -EINVAL;
+
+	mdev = _SIOC_NR(cmd);
+
+	if (_SIOC_DIR(cmd) & _SIOC_WRITE) {
+		if (get_user(val, (unsigned int *)arg))
+			return -EFAULT;
+
+		if (mdev < SOUND_MIXER_NRDEVICES)
+			vidc_mixer_set(mdev, val);
+		else
+			return -EINVAL;
+	}
+
+	/*
+	 * Return parameters
+	 */
+	switch (mdev) {
+	case SOUND_MIXER_RECSRC:
+		val = 0;
+		break;
+
+	case SOUND_MIXER_DEVMASK:
+		val = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
+		break;
+
+	case SOUND_MIXER_STEREODEVS:
+		val = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
+		break;
+
+	case SOUND_MIXER_RECMASK:
+		val = 0;
+		break;
+
+	case SOUND_MIXER_CAPS:
+		val = 0;
+		break;
+
+	default:
+		if (mdev < SOUND_MIXER_NRDEVICES)
+			val = vidc_level_l[mdev] | vidc_level_r[mdev] << 8;
+		else
+			return -EINVAL;
+	}
+
+	return put_user(val, (unsigned int *)arg) ? -EFAULT : 0;
+}
+
+static struct mixer_operations vidc_mixer_operations = {
+	"VIDC",
+	"VIDCsound",
+	vidc_mixer_ioctl	/* ioctl                */
+};
+
+static unsigned int vidc_audio_set_format(int dev, unsigned int fmt)
+{
+	switch (fmt) {
+	default:
+		fmt = AFMT_S16_LE;
+	case AFMT_U8:
+	case AFMT_S8:
+	case AFMT_S16_LE:
+		vidc_audio_format = fmt;
+		vidc_update_filler(vidc_audio_format, vidc_audio_channels);
+	case AFMT_QUERY:
+		break;
+	}
+	return vidc_audio_format;
+}
+
+static int vidc_audio_set_speed(int dev, int rate)
+{
+	if (rate) {
+		unsigned int hwctrl, hwrate;
+		unsigned int newsize, new2size;
+
+		/*
+		 * If we have selected 44.1kHz, use the DAC clock.
+		 */
+		if (0 && rate == 44100) {
+			hwctrl = 0x00000002;
+			hwrate = 3;
+		} else {
+			hwctrl = 0x00000003;
+
+			hwrate = (((VIDC_SOUND_CLOCK * 2) / rate) + 1) >> 1;
+			if (hwrate < 3)
+				hwrate = 3;
+			if (hwrate > 255)
+				hwrate = 255;
+
+			rate = VIDC_SOUND_CLOCK / hwrate;
+		}
+
+		outl(0xb0000000 | (hwrate - 2), IO_VIDC_BASE);
+		outl(0xb1000000 | hwctrl, IO_VIDC_BASE);
+
+		newsize = (10000 / hwrate) & ~3;
+		if (newsize < 208)
+			newsize = 208;
+		if (newsize > 4096)
+			newsize = 4096;
+		for (new2size = 128; new2size < newsize; new2size <<= 1);
+		if (new2size - newsize > newsize - (new2size >> 1))
+			new2size >>= 1;
+		if (new2size > 4096) {
+			printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
+				newsize, new2size);
+			new2size = 4096;
+		}
+		dma_bufsize = new2size;
+		vidc_audio_rate = rate;
+	}
+	return vidc_audio_rate;
+}
+
+static short vidc_audio_set_channels(int dev, short channels)
+{
+	switch (channels) {
+	default:
+		channels = 2;
+	case 1:
+	case 2:
+		vidc_audio_channels = channels;
+		vidc_update_filler(vidc_audio_format, vidc_audio_channels);
+	case 0:
+		break;
+	}
+	return vidc_audio_channels;
+}
+
+/*
+ * Open the device
+ */
+static int vidc_audio_open(int dev, int mode)
+{
+	/* This audio device does not have recording capability */
+	if (mode == OPEN_READ)
+		return -EPERM;
+
+	if (vidc_busy)
+		return -EBUSY;
+
+	vidc_busy = 1;
+	return 0;
+}
+
+/*
+ * Close the device
+ */
+static void vidc_audio_close(int dev)
+{
+	vidc_busy = 0;
+}
+
+/*
+ * Output a block via DMA to sound device.
+ *
+ * We just set the DMA start and count; the DMA interrupt routine
+ * will take care of formatting the samples (via the appropriate
+ * vidc_filler routine), and flag via vidc_audio_dma_interrupt when
+ * more data is required.
+ */
+static void
+vidc_audio_output_block(int dev, unsigned long buf, int total_count, int one)
+{
+	struct dma_buffparms *dmap = audio_devs[dev]->dmap_out;
+	unsigned long flags;
+
+	save_flags_cli(flags);
+	dma_start = buf - (unsigned long)dmap->raw_buf_phys + (unsigned long)dmap->raw_buf;
+	dma_count = total_count;
+	restore_flags(flags);
+}
+
+static void
+vidc_audio_start_input(int dev, unsigned long buf, int count, int intrflag)
+{
+}
+
+static int vidc_audio_prepare_for_input(int dev, int bsize, int bcount)
+{
+	return -EINVAL;
+}
+
+static void vidc_audio_dma_interrupt(void)
+{
+	DMAbuf_outputintr(vidc_adev, 1);
+}
+
+/*
+ * Prepare for outputting samples.
+ *
+ * Each buffer that will be passed will be `bsize' bytes long,
+ * with a total of `bcount' buffers.
+ */
+static int vidc_audio_prepare_for_output(int dev, int bsize, int bcount)
+{
+	struct audio_operations *adev = audio_devs[dev];
+
+	dma_interrupt = NULL;
+	adev->dmap_out->flags |= DMA_NODMA;
+
+	return 0;
+}
+
+/*
+ * Stop our current operation.
+ */
+static void vidc_audio_reset(int dev)
+{
+	dma_interrupt = NULL;
+}
+
+static int vidc_audio_local_qlen(int dev)
+{
+	return /*dma_count !=*/ 0;
+}
+
+static void vidc_audio_trigger(int dev, int enable_bits)
+{
+	struct audio_operations *adev = audio_devs[dev];
+
+	if (enable_bits & PCM_ENABLE_OUTPUT) {
+		if (!(adev->flags & DMA_ACTIVE)) {
+			unsigned long flags;
+
+			save_flags_cli(flags);
+
+			/* prevent recusion */
+			adev->flags |= DMA_ACTIVE;
+
+			dma_interrupt = vidc_audio_dma_interrupt;
+			vidc_sound_dma_irq(0, NULL, NULL);
+			outb(DMA_CR_E | 0x10, IOMD_SD0CR);
+
+			restore_flags(flags);
+		}
+	}
+}
+
+static struct audio_driver vidc_audio_driver =
 {
-	int fillertype;
+	vidc_audio_open,		/* open 		*/
+	vidc_audio_close,		/* close		*/
+	vidc_audio_output_block,	/* output_block 	*/
+	vidc_audio_start_input, 	/* start_input		*/
+	NULL,				/* ioctl		*/
+	vidc_audio_prepare_for_input,	/* prepare_for_input	*/
+	vidc_audio_prepare_for_output,	/* prepare_for_output	*/
+	vidc_audio_reset,		/* halt_io		*/
+	vidc_audio_local_qlen,		/* local_qlen		*/
+	NULL,				/* copy_user		*/
+	NULL,				/* halt_input		*/
+	NULL,				/* halt_output		*/
+	vidc_audio_trigger,		/* trigger		*/
+	vidc_audio_set_speed,		/* set_speed		*/
+	vidc_audio_set_format,		/* set_bits		*/
+	vidc_audio_set_channels,	/* set_channels 	*/
+	NULL,				/* postprocess_write	*/
+	NULL,				/* postprocess_read	*/
+	NULL				/* mmap			*/
+};
 
+void vidc_update_filler(int format, int channels)
+{
 #define TYPE(fmt,ch) (((fmt)<<2) | ((ch)&3))
 
-	fillertype = TYPE(format, channels);
-printk("filler type: %X\n", fillertype);
-	switch (fillertype)
-	{
-		default:
-		case TYPE(AFMT_U8, 1):
-			vidc_filler = vidc_fill_1x8_u;
-			break;
-
-		case TYPE(AFMT_U8, 2):
-			vidc_filler = vidc_fill_2x8_u;
-			break;
-
-		case TYPE(AFMT_S8, 1):
-			vidc_filler = vidc_fill_1x8_s;
-			break;
-
-		case TYPE(AFMT_S8, 2):
-			vidc_filler = vidc_fill_2x8_s;
-			break;
-
-		case TYPE(AFMT_S16_LE, 1):
-			vidc_filler = vidc_fill_1x16_s;
-			break;
-
-		case TYPE(AFMT_S16_LE, 2):
-			vidc_filler = vidc_fill_2x16_s;
-			break;
+	switch (TYPE(format, channels)) {
+	default:
+	case TYPE(AFMT_U8, 1):
+		vidc_filler = vidc_fill_1x8_u;
+		break;
+
+	case TYPE(AFMT_U8, 2):
+		vidc_filler = vidc_fill_2x8_u;
+		break;
+
+	case TYPE(AFMT_S8, 1):
+		vidc_filler = vidc_fill_1x8_s;
+		break;
+
+	case TYPE(AFMT_S8, 2):
+		vidc_filler = vidc_fill_2x8_s;
+		break;
+
+	case TYPE(AFMT_S16_LE, 1):
+		vidc_filler = vidc_fill_1x16_s;
+		break;
+
+	case TYPE(AFMT_S16_LE, 2):
+		vidc_filler = vidc_fill_2x16_s;
+		break;
 	}
 }
 
 void attach_vidc(struct address_info *hw_config)
 {
 	char name[32];
-	int i;
+	int i, adev;
 
 	sprintf(name, "VIDC %d-bit sound", hw_config->card_subtype);
 	conf_printf(name, hw_config);
+	memset(dma_buf, 0, sizeof(dma_buf));
 
-	for (i = 0; i < 2; i++)
-	{
+	adev = sound_install_audiodrv(AUDIO_DRIVER_VERSION, name,
+			&vidc_audio_driver, sizeof(vidc_audio_driver),
+			DMA_AUTOMODE, AFMT_U8 | AFMT_S8 | AFMT_S16_LE,
+			NULL, hw_config->dma, hw_config->dma2);
+
+	if (adev < 0)
+		goto audio_failed;
+
+	/*
+	 * 1024 bytes => 64 buffers
+	 */
+	audio_devs[adev]->min_fragment = 10;
+	audio_devs[adev]->mixer_dev = num_mixers;
+
+	audio_devs[adev]->mixer_dev =
+		sound_install_mixer(MIXER_DRIVER_VERSION,
+				name, &vidc_mixer_operations,
+				sizeof(vidc_mixer_operations), NULL);
+
+	if (audio_devs[adev]->mixer_dev < 0)
+		goto mixer_failed;
+
+	for (i = 0; i < 2; i++) {
 		dma_buf[i] = get_free_page(GFP_KERNEL);
+		if (!dma_buf[i]) {
+			printk(KERN_ERR "%s: can't allocate required buffers\n",
+				name);
+			goto mem_failed;
+		}
 		dma_pbuf[i] = virt_to_phys(dma_buf[i]);
 	}
 
-	if (sound_alloc_dma(hw_config->dma, "VIDCsound"))
-	{
-		printk(KERN_ERR "VIDCsound: can't allocate virtual DMA channel\n");
-		return;
-	}
-	if (request_irq(hw_config->irq, vidc_sound_dma_irq, 0, "VIDCsound", &dma_start))
-	{
-		printk(KERN_ERR "VIDCsound: can't allocate DMA interrupt\n");
-		return;
-	}
-//	vidc_synth_init(hw_config);
-	vidc_audio_init(hw_config);
-	vidc_mixer_init(hw_config);
+	if (sound_alloc_dma(hw_config->dma, hw_config->name)) {
+		printk(KERN_ERR "%s: DMA %d is in  use\n", name, hw_config->dma);
+		goto dma_failed;
+	}
+
+	if (request_irq(hw_config->irq, vidc_sound_dma_irq, 0,
+			hw_config->name, &dma_start)) {
+		printk(KERN_ERR "%s: IRQ %d is in use\n", name, hw_config->irq);
+		goto irq_failed;
+	}
+	old_mksound = kd_mksound;
+	kd_mksound = vidc_mksound;
+	vidc_adev = adev;
+	vidc_mixer_set(SOUND_MIXER_VOLUME, (85 | 85 << 8));
+	return;
+
+irq_failed:
+	sound_free_dma(hw_config->dma);
+dma_failed:
+mem_failed:
+	for (i = 0; i < 2; i++)
+		free_page(dma_buf[i]);
+	sound_unload_mixerdev(audio_devs[adev]->mixer_dev);
+mixer_failed:
+	sound_unload_audiodev(adev);
+audio_failed:
+	return;
 }
 
 int probe_vidc(struct address_info *hw_config)
 {
-	hw_config->irq = IRQ_DMAS0;
-	hw_config->dma = DMA_VIRTUAL_SOUND;
-	hw_config->dma2 = -1;
-	hw_config->card_subtype = 16;
+	hw_config->irq		= IRQ_DMAS0;
+	hw_config->dma		= DMA_VIRTUAL_SOUND;
+	hw_config->dma2		= -1;
+	hw_config->card_subtype	= 16;
+	hw_config->name		= "VIDC20";
 	return 1;
 }
 
 void unload_vidc(struct address_info *hw_config)
 {
-	int i;
+	int i, adev = vidc_adev;
+
+	vidc_adev = -1;
+
+	if (old_mksound)
+		kd_mksound = old_mksound;
 
-	free_irq(hw_config->irq, NULL);
+	free_irq(hw_config->irq, &dma_start);
 	sound_free_dma(hw_config->dma);
 
-	for (i = 0; i < 2; i++)
-		free_page(dma_buf[i]);
+	if (adev >= 0) {
+		sound_unload_mixerdev(audio_devs[adev]->mixer_dev);
+		sound_unload_audiodev(adev);
+		for (i = 0; i < 2; i++)
+			free_page(dma_buf[i]);
+	}
 }
 
 #ifdef MODULE
 static struct address_info config;
+/*
+ * Note! Module use count is handled by SOUNDLOCK/SOUND_LOCK_END
+ */
 
 int init_module(void)
 {
 	if (probe_vidc(&config) == 0)
 		return -ENODEV;
-	printk("VIDC 16-bit serial sound\n");
+
 	SOUND_LOCK;
 	attach_vidc(&config);
+
 	return 0;
 }
 
diff -urN linux-2.2.18-pre14/drivers/sound/vidc.h linux/drivers/sound/vidc.h
--- linux-2.2.18-pre14/drivers/sound/vidc.h	Wed Dec 16 12:52:01 1998
+++ linux/drivers/sound/vidc.h	Mon Dec  3 20:33:04 2001
@@ -55,18 +55,9 @@
 extern unsigned long dma_start, dma_count, dma_bufsize;
 extern unsigned long dma_buf[2], dma_pbuf[2];
 
-/* vidc_audio.c */
-
-extern void     vidc_audio_init(struct address_info *hw_config);
-extern int      vidc_audio_get_volume(void);
-extern int      vidc_audio_set_volume(int vol);
-
-/* vidc_mixer.c */
-
-extern void     vidc_mixer_init(struct address_info *hw_config);
-
 /* vidc_synth.c */
 
 extern void     vidc_synth_init(struct address_info *hw_config);
+extern void	vidc_synth_exit(struct address_info *hw_config);
 extern int      vidc_synth_get_volume(void);
 extern int      vidc_synth_set_volume(int vol);
diff -urN linux-2.2.18-pre14/drivers/sound/vidc_audio.c linux/drivers/sound/vidc_audio.c
--- linux-2.2.18-pre14/drivers/sound/vidc_audio.c	Wed Jun  7 14:26:43 2000
+++ linux/drivers/sound/vidc_audio.c	Wed Dec 31 16:00:00 1969
@@ -1,313 +0,0 @@
-/*
- * drivers/sound/vidc_audio.c
- *
- * Audio routines for the VIDC
- *
- * Copyright (C) 1997 Russell King <rmk@arm.uk.linux.org>
- */
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/system.h>
-
-#include "sound_config.h"
-#include "vidc.h"
-
-/*
- * VIDC sound
- *
- * When using SERIAL SOUND mode (external DAC), the number of physical
- * channels is fixed at 2.  Therefore, the sample rate = vidc sample rate.
- */
-
-static int      vidc_adev;
-
-static int      vidc_audio_volume;
-static int      vidc_audio_rate;
-static char     vidc_audio_format;
-static char     vidc_audio_channels;
-
-extern void     vidc_update_filler(int bits, int channels);
-
-int  vidc_audio_get_volume(void)
-{
-	return vidc_audio_volume;
-}
-
-int vidc_audio_set_volume(int newvol)
-{
-	vidc_audio_volume = newvol;
-	return vidc_audio_volume;
-}
-
-static int vidc_audio_set_bits(int fmt)
-{
-printk("setting format: %d\n", fmt);
-	switch (fmt)
-	{
-		case AFMT_QUERY:
-			break;
-		case AFMT_U8:
-		case AFMT_S8:
-		case AFMT_S16_LE:
-			vidc_audio_format = fmt;
-			vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-			break;
-		default:
-			vidc_audio_format = AFMT_S16_LE;
-			vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-			break;
-	}
-	return vidc_audio_format;
-}
-
-static int vidc_audio_set_rate(int rate)
-{
-	if (rate)
-	{
-		int newsize, new2size;
-
-		vidc_audio_rate = ((500000 / rate) + 1) >> 1;
-		if (vidc_audio_rate < 3)
-			vidc_audio_rate = 3;
-		if (vidc_audio_rate > 255)
-			vidc_audio_rate = 255;
-		outl((vidc_audio_rate - 2) | 0xb0000000, IO_VIDC_BASE);
-		outl(0xb1000003, IO_VIDC_BASE);
-		newsize = (10000 / vidc_audio_rate) & ~3;
-		if (newsize < 208)
-			newsize = 208;
-		if (newsize > 4096)
-			newsize = 4096;
-		for (new2size = 128; new2size < newsize; new2size <<= 1);
-		if (new2size - newsize > newsize - (new2size >> 1))
-			new2size >>= 1;
-		dma_bufsize = new2size;
-	}
-	return 250000 / vidc_audio_rate;
-}
-
-static int vidc_audio_set_channels(int channels)
-{
-	switch (channels)
-	{
-		case 0:
-			break;
-		case 1:
-		case 2:
-			vidc_audio_channels = channels;
-			vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-			break;
-		default:
-			vidc_audio_channels = 2;
-			vidc_update_filler(vidc_audio_format, vidc_audio_channels);
-			break;
-	}
-	return vidc_audio_channels;
-}
-
-/*
- * Open the device
- *
- * dev  - device
- * mode - mode to open device (logical OR of OPEN_READ and OPEN_WRITE)
- *
- * Called when opening the DMAbuf               (dmabuf.c:259)
- */
-static int vidc_audio_open(int dev, int mode)
-{
-	if (vidc_busy)
-		return -EBUSY;
-
-	if ((mode & OPEN_READ) && (!mode & OPEN_WRITE))
-	{
-		/* This audio device doesn't have recording capability */
-		return -EIO;
-	}
-	vidc_busy = 1;
-	return 0;
-}
-
-/*
- * Close the device
- *
- * dev  - device
- *
- * Called when closing the DMAbuf               (dmabuf.c:477)
- *      after halt_xfer
- */
-static void vidc_audio_close(int dev)
-{
-	vidc_busy = 0;
-}
-
-static int vidc_audio_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
-	int ret;
-
-	switch (cmd)
-	{
-		case SOUND_PCM_WRITE_RATE:
-			if (get_user(ret, (int *) arg))
-				return -EFAULT;
-			ret = vidc_audio_set_rate(ret);
-			break;
-
-		case SOUND_PCM_READ_RATE:
-			ret = vidc_audio_set_rate(0);
-			break;
-
-		case SNDCTL_DSP_STEREO:
-			if (get_user(ret, (int *) arg))
-				return -EFAULT;
-			ret = vidc_audio_set_channels(ret + 1) - 1;
-			break;
-
-		case SOUND_PCM_WRITE_CHANNELS:
-			if (get_user(ret, (int *) arg))
-				return -EFAULT;
-			ret = vidc_audio_set_channels(ret);
-			break;
-
-		case SOUND_PCM_READ_CHANNELS:
-			ret = vidc_audio_set_channels(0);
-			break;
-
-		case SNDCTL_DSP_SETFMT:
-			if (get_user(ret, (int *) arg))
-				return -EFAULT;
-			ret = vidc_audio_set_bits(ret);
-			break;
-
-		case SOUND_PCM_READ_BITS:
-			ret = vidc_audio_set_bits(0);
-			break;
-
-		case SOUND_PCM_WRITE_FILTER:
-		case SOUND_PCM_READ_FILTER:
-			return -EINVAL;
-
-		default:
-			return -EINVAL;
-	}
-	return put_user(ret, (int *) arg);
-}
-
-/*
- * Output a block via DMA to sound device
- *
- * dev          - device number
- * buf          - physical address of buffer
- * total_count  - total byte count in buffer
- * intrflag     - set if this has been called from an interrupt (via DMAbuf_outputintr)
- * restart_dma  - set if DMA needs to be re-initialised
- *
- * Called when:
- *  1. Starting output                                  (dmabuf.c:1327)
- *  2.                                                  (dmabuf.c:1504)
- *  3. A new buffer needs to be sent to the device      (dmabuf.c:1579)
- */
-static void vidc_audio_output_block(int dev, unsigned long buf, int total_count,
-			int intrflag)
-{
-	struct audio_operations *adev = audio_devs[dev];
-	struct dma_buffparms *dmap = adev->dmap_out;
-
-	dma_start = buf - (unsigned long)dmap->raw_buf_phys + (unsigned long)dmap->raw_buf;
-	dma_count = total_count;
-
-	if (!(adev->flags & DMA_ACTIVE))
-	{
-		unsigned long flags;
-printk("kicking output: %lX+%lX [%lX]\n", dma_start, dma_count, *(unsigned long *)dma_start);
-		save_flags_cli(flags);
-		vidc_sound_dma_irq(0, NULL, NULL);
-		outb(DMA_CR_E | 0x10, IOMD_SD0CR);
-		restore_flags(flags);
-	}
-}
-
-static void vidc_audio_start_input(int dev, unsigned long buf, int count,
-		       int intrflag)
-{
-}
-
-static int vidc_audio_prepare_for_input(int dev, int bsize, int bcount)
-{
-	return -EINVAL;
-}
-
-static void vidc_audio_dma_interrupt(void)
-{
-	DMAbuf_outputintr(vidc_adev, 1);
-}
-
-/*
- * Prepare for outputting samples to `dev'
- *
- * Each buffer that will be passed will be `bsize' bytes long,
- * with a total of `bcount' buffers.
- *
- * Called when:
- *  1. A trigger enables audio output                   (dmabuf.c:978)
- *  2. We get a write buffer without dma_mode setup     (dmabuf.c:1152)
- *  3. We restart a transfer                            (dmabuf.c:1324)
- */
-static int vidc_audio_prepare_for_output(int dev, int bsize, int bcount)
-{
-	audio_devs[dev]->dmap_out->flags |= DMA_NODMA;
-	dma_interrupt = vidc_audio_dma_interrupt;
-	return 0;
-}
-
-/*
- * Stop our current operation.
- */
-static void vidc_audio_reset(int dev)
-{
-	/* stop interrupts.  Our real interrupt routine
-	 * will close DMA down for us
-	 */
-	dma_interrupt = NULL;
-}
-
-static int vidc_audio_local_qlen(int dev)
-{
-	return /*dma_count !=*/ 0;
-}
-
-static struct audio_driver vidc_audio_driver =
-{
-	vidc_audio_open,		/* open                 */
-	vidc_audio_close,		/* close                */
-	vidc_audio_output_block,	/* output_block         */
-	vidc_audio_start_input,		/* start_input          */
-	vidc_audio_ioctl,		/* ioctl                */
-	vidc_audio_prepare_for_input,	/* prepare_for_input    */
-	vidc_audio_prepare_for_output,	/* prepare_for_output   */
-	vidc_audio_reset,		/* reset                */
-	vidc_audio_local_qlen,		/*+local_qlen           */
-	NULL,				/*+copy_from_user       */
-	NULL,				/*+halt_input           */
-	NULL,				/* halt_output          */
-	NULL,				/*+trigger              */
-	NULL,				/*+set_speed            */
-	NULL,				/*+set_bits             */
-	NULL,				/*+set_channels         */
-};
-
-void vidc_audio_init(struct address_info *hw_config)
-{
-	vidc_audio_volume = 100 | (100 << 8);
-
-	if ((vidc_adev = sound_install_audiodrv(AUDIO_DRIVER_VERSION,
-				"VIDCsound", &vidc_audio_driver,
-				sizeof(struct audio_driver),
-				DMA_AUTOMODE, AFMT_U8 | AFMT_S8 | AFMT_S16_LE,
-				NULL, hw_config->dma, hw_config->dma2)) >= 0)
-	{
-		audio_devs[vidc_adev]->min_fragment = 10;	/* 1024 bytes => 64 buffers */
-		audio_devs[vidc_adev]->mixer_dev = num_mixers;
-	}
-	else printk(KERN_ERR "VIDCsound: Too many PCM devices available\n");
-}
diff -urN linux-2.2.18-pre14/drivers/sound/vidc_fill.S linux/drivers/sound/vidc_fill.S
--- linux-2.2.18-pre14/drivers/sound/vidc_fill.S	Wed Dec 16 12:52:01 1998
+++ linux/drivers/sound/vidc_fill.S	Mon Dec  3 20:33:04 2001
@@ -9,6 +9,7 @@
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/hardware.h>
+#include <asm/iomd.h>
 
 		.text
 
@@ -190,24 +191,24 @@
 		.data
 		.globl	SYMBOL_NAME(dma_interrupt)
 SYMBOL_NAME(dma_interrupt):
-		.long	0
+		.long	0				@ r3
 		.globl	SYMBOL_NAME(dma_pbuf)
 SYMBOL_NAME(dma_pbuf):
-		.long	0
-		.long	0
+		.long	0				@ r4
+		.long	0				@ r5
 		.globl	SYMBOL_NAME(dma_start)
 SYMBOL_NAME(dma_start):
-		.long	0
+		.long	0				@ r0
 		.globl	SYMBOL_NAME(dma_count)
 SYMBOL_NAME(dma_count):
-		.long	0
+		.long	0				@ r1
 		.globl	SYMBOL_NAME(dma_buf)
 SYMBOL_NAME(dma_buf):
-		.long	0
-		.long	0
+		.long	0				@ r2
+		.long	0				@ r3
 		.globl	SYMBOL_NAME(vidc_filler)
 SYMBOL_NAME(vidc_filler):
-		.long	SYMBOL_NAME(vidc_fill_noaudio)
+		.long	SYMBOL_NAME(vidc_fill_noaudio)	@ r4
 		.globl	SYMBOL_NAME(dma_bufsize)
 SYMBOL_NAME(dma_bufsize):
-		.long	0x1000
+		.long	0x1000				@ r5
diff -urN linux-2.2.18-pre14/drivers/sound/vidc_mixer.c linux/drivers/sound/vidc_mixer.c
--- linux-2.2.18-pre14/drivers/sound/vidc_mixer.c	Wed Dec 16 12:52:01 1998
+++ linux/drivers/sound/vidc_mixer.c	Wed Dec 31 16:00:00 1969
@@ -1,151 +0,0 @@
-/*
- * drivers/sound/vidc_mixer.c
- *
- * Mixer routines for VIDC
- *
- * Copyright (C) 1997 Russell King <rmk@arm.uk.linux.org>
- */
-
-#include "sound_config.h"
-#include "vidc.h"
-
-int vidc_volume;
-
-static int vidc_get_volume(void)
-{
-	return vidc_volume;
-}
-
-static int vidc_set_volume(int newvol)
-{
-	vidc_volume = newvol;
-/*  printk ("vidc_set_volume: %X\n", newvol); */
-	return newvol;
-}
-
-static int vidc_default_mixer_ioctl(int dev, unsigned int cmd, caddr_t arg)
-{
-	int ret;
-
-	switch (cmd)
-	{
-		case SOUND_MIXER_READ_VOLUME:
-			ret = vidc_get_volume();
-			break;
-
-		case SOUND_MIXER_WRITE_VOLUME:
-			if (get_user(ret, (int *) arg))
-				return -EINVAL;
-			ret = vidc_set_volume(ret);
-			break;
-
-		case SOUND_MIXER_READ_BASS:
-		case SOUND_MIXER_WRITE_BASS:
-		case SOUND_MIXER_READ_TREBLE:
-		case SOUND_MIXER_WRITE_TREBLE:
-			ret = 50;
-			break;
-
-		case SOUND_MIXER_READ_SYNTH:
-//			ret = vidc_synth_get_volume();
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_WRITE_SYNTH:
-			if (get_user(ret, (int *) arg))
-				return -EINVAL;
-//			ret = vidc_synth_set_volume(ret);
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_READ_PCM:
-			ret = vidc_audio_get_volume();
-			break;
-
-		case SOUND_MIXER_WRITE_PCM:
-			if (get_user(ret, (int *) arg))
-				return -EINVAL;
-			ret = vidc_audio_set_volume(ret);
-			break;
-
-		case SOUND_MIXER_READ_SPEAKER:
-			ret = 100;
-			break;
-
-		case SOUND_MIXER_WRITE_SPEAKER:
-			ret = 100;
-			break;
-
-		case SOUND_MIXER_READ_LINE:
-		case SOUND_MIXER_WRITE_LINE:
-		case SOUND_MIXER_READ_MIC:
-		case SOUND_MIXER_WRITE_MIC:
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_READ_CD:
-		case SOUND_MIXER_WRITE_CD:
-			ret = 100 | (100 << 8);
-			break;
-
-		case SOUND_MIXER_READ_IMIX:
-		case SOUND_MIXER_WRITE_IMIX:
-		case SOUND_MIXER_READ_ALTPCM:
-		case SOUND_MIXER_WRITE_ALTPCM:
-		case SOUND_MIXER_READ_LINE1:
-		case SOUND_MIXER_WRITE_LINE1:
-		case SOUND_MIXER_READ_LINE2:
-		case SOUND_MIXER_WRITE_LINE2:
-		case SOUND_MIXER_READ_LINE3:
-		case SOUND_MIXER_WRITE_LINE3:
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_READ_RECSRC:
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_WRITE_RECSRC:
-			return -EINVAL;
-			break;
-
-		case SOUND_MIXER_READ_DEVMASK:
-			ret = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
-			break;
-
-		case SOUND_MIXER_READ_RECMASK:
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_READ_STEREODEVS:
-			ret = SOUND_MASK_VOLUME | SOUND_MASK_PCM | SOUND_MASK_SYNTH;
-			break;
-
-		case SOUND_MIXER_READ_CAPS:
-			ret = 0;
-			break;
-
-		case SOUND_MIXER_READ_MUTE:
-			return -EINVAL;
-			break;
-
-		default:
-			return -EINVAL;
-			break;
-	}
-	return put_user(ret, (int *) arg);
-}
-
-static struct mixer_operations vidc_mixer_operations = {
-	"VIDC",
-	"VIDCsound",
-	vidc_default_mixer_ioctl	/* ioctl                */
-};
-
-void vidc_mixer_init(struct address_info *hw_config)
-{
-	int vidc_mixer = sound_alloc_mixerdev();
-	vidc_volume = 100 | (100 << 8);
-	if (num_mixers < MAX_MIXER_DEV)
-		mixer_devs[vidc_mixer] = &vidc_mixer_operations;
-}
diff -urN linux-2.2.18-pre14/drivers/sound/vidc_synth.c linux/drivers/sound/vidc_synth.c
--- linux-2.2.18-pre14/drivers/sound/vidc_synth.c	Wed Dec 16 12:52:01 1998
+++ linux/drivers/sound/vidc_synth.c	Mon Dec  3 20:33:04 2001
@@ -88,4 +88,8 @@
 	else
 		printk(KERN_ERR "VIDCsound: Too many synthesizers\n");
 }
+
+void vidc_synth_exit(struct address_info *hw_config)
+{
+}
 #endif
diff -urN linux-2.2.18-pre14/drivers/sound/wavfront.c linux/drivers/sound/wavfront.c
--- linux-2.2.18-pre14/drivers/sound/wavfront.c	Mon Dec  3 20:32:32 2001
+++ linux/drivers/sound/wavfront.c	Mon Dec  3 20:33:04 2001
@@ -87,9 +87,9 @@
  
 #if defined(__alpha__)
 #ifdef __SMP__
-#define LOOPS_PER_TICK (cpu_data[smp_processor_id()].loops_per_jiffy/HZ)
+#define LOOPS_PER_TICK (cpu_data[smp_processor_id()].loops_per_jiffy)
 #else
-#define LOOPS_PER_TICK	(loops_per_jiffy/HZ)
+#define LOOPS_PER_TICK	(loops_per_jiffy)
 #endif
 #endif
 
@@ -459,7 +459,7 @@
 
 	if (short_loop_cnt == 0) {
 		short_loop_cnt = wait_usecs *
-			(LOOPS_PER_TICK / 1000000);
+			(LOOPS_PER_TICK / (1000000 / HZ));
 	}
 
 	/* Spin for a short period of time, because >99% of all
diff -urN linux-2.2.18-pre14/drivers/sound/ymfpci.c linux/drivers/sound/ymfpci.c
--- linux-2.2.18-pre14/drivers/sound/ymfpci.c	Mon Dec  3 20:32:32 2001
+++ linux/drivers/sound/ymfpci.c	Mon Dec  3 20:33:04 2001
@@ -668,10 +668,10 @@
 				/*
 				 * Normal end of DMA.
 				 */
-				printk("ymfpci%d: %d: done: delta %d"
-				    " hwptr %d swptr %d distance %d count %d\n",
-				    codec->inst, voice->number, delta,
-				    dmabuf->hwptr, swptr, distance, dmabuf->count);
+//				printk("ymfpci%d: %d: done: delta %d"
+//				    " hwptr %d swptr %d distance %d count %d\n",
+//				    codec->inst, voice->number, delta,
+//				    dmabuf->hwptr, swptr, distance, dmabuf->count);
 			}
 			played = dmabuf->count;
 			if (ypcm->running) {
@@ -826,8 +826,8 @@
 		end >>= 1;
 	if (w_16)
 		end >>= 1;
-/* P3 */ printk("ymf_pcm_init_voice: %d: Rate %d Format 0x%08x Delta 0x%x End 0x%x\n",
-  voice->number, rate, format, delta, end);
+/* P3 */ // printk("ymf_pcm_init_voice: %d: Rate %d Format 0x%08x Delta 0x%x End 0x%x\n",
+//  voice->number, rate, format, delta, end);
 	for (nbank = 0; nbank < 2; nbank++) {
 		bank = &voice->bank[nbank];
 		bank->format = format;
@@ -1710,7 +1710,7 @@
 	case SNDCTL_DSP_SETFRAGMENT:
 		get_user_ret(val, (int *)arg, -EFAULT);
 	/* P3: these frags are for Doom. Amasingly, it sets [2,2**11]. */
-	/* P3 */ printk("ymfpci: ioctl SNDCTL_DSP_SETFRAGMENT 0x%x\n", val);
+	/* P3 */ // printk("ymfpci: ioctl SNDCTL_DSP_SETFRAGMENT 0x%x\n", val);
 
 		dmabuf->ossfragshift = val & 0xffff;
 		dmabuf->ossmaxfrags = (val >> 16) & 0xffff;
diff -urN linux-2.2.18-pre14/fs/adfs/super.c linux/fs/adfs/super.c
--- linux-2.2.18-pre14/fs/adfs/super.c	Mon Dec  3 20:32:33 2001
+++ linux/fs/adfs/super.c	Mon Dec  3 20:33:10 2001
@@ -438,8 +438,7 @@
 		kfree(sb->u.adfs_sb.s_map);
 		adfs_error(sb, "get root inode failed\n");
 		goto error_dec_use;
-	}
-	else
+	} else
 		sb->s_root->d_op = &adfs_dentry_operations;
 	return sb;
 
diff -urN linux-2.2.18-pre14/fs/fat/inode.c linux/fs/fat/inode.c
--- linux-2.2.18-pre14/fs/fat/inode.c	Mon Dec  3 20:32:33 2001
+++ linux/fs/fat/inode.c	Mon Dec  3 20:33:10 2001
@@ -216,7 +216,7 @@
 	opts->quiet = opts->sys_immutable = opts->dotsOK = opts->showexec = 0;
 	opts->codepage = 0;
 	opts->utf8 = 0;
-	opts->small_letter = 0;
+	opts->small_letter = 1;		/* Default to old behaviour */
 	opts->iocharset = NULL;
 	*debug = *fat = 0;
 
@@ -264,6 +264,9 @@
 		}
 		else if (!strcmp(this_char,"small")) {
 			opts->small_letter = 1;
+		}
+		else if (!strcmp(this_char,"big")) {
+			opts->small_letter = 0;
 		}
 		else if (!strcmp(this_char,"dotsOK") && value) {
 			if (!strcmp(value,"yes")) opts->dotsOK = 1;
diff -urN linux-2.2.18-pre14/fs/nls/nls_base.c linux/fs/nls/nls_base.c
--- linux-2.2.18-pre14/fs/nls/nls_base.c	Mon Sep  4 10:39:26 2000
+++ linux/fs/nls/nls_base.c	Mon Dec  3 20:33:10 2001
@@ -380,7 +380,7 @@
 	return;
 }
 
-void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp437.c linux/fs/nls/nls_cp437.c
--- linux-2.2.18-pre14/fs/nls/nls_cp437.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp437.c	Mon Dec  3 20:33:10 2001
@@ -409,7 +409,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp737.c linux/fs/nls/nls_cp737.c
--- linux-2.2.18-pre14/fs/nls/nls_cp737.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp737.c	Mon Dec  3 20:33:10 2001
@@ -337,7 +337,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp775.c linux/fs/nls/nls_cp775.c
--- linux-2.2.18-pre14/fs/nls/nls_cp775.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp775.c	Mon Dec  3 20:33:10 2001
@@ -337,7 +337,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp850.c linux/fs/nls/nls_cp850.c
--- linux-2.2.18-pre14/fs/nls/nls_cp850.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp850.c	Mon Dec  3 20:33:10 2001
@@ -301,7 +301,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp852.c linux/fs/nls/nls_cp852.c
--- linux-2.2.18-pre14/fs/nls/nls_cp852.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp852.c	Mon Dec  3 20:33:10 2001
@@ -301,7 +301,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp855.c linux/fs/nls/nls_cp855.c
--- linux-2.2.18-pre14/fs/nls/nls_cp855.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp855.c	Mon Dec  3 20:33:10 2001
@@ -301,7 +301,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp857.c linux/fs/nls/nls_cp857.c
--- linux-2.2.18-pre14/fs/nls/nls_cp857.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp857.c	Mon Dec  3 20:33:10 2001
@@ -265,7 +265,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp860.c linux/fs/nls/nls_cp860.c
--- linux-2.2.18-pre14/fs/nls/nls_cp860.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp860.c	Mon Dec  3 20:33:10 2001
@@ -373,7 +373,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp861.c linux/fs/nls/nls_cp861.c
--- linux-2.2.18-pre14/fs/nls/nls_cp861.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp861.c	Mon Dec  3 20:33:10 2001
@@ -409,7 +409,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp862.c linux/fs/nls/nls_cp862.c
--- linux-2.2.18-pre14/fs/nls/nls_cp862.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp862.c	Mon Dec  3 20:33:10 2001
@@ -445,7 +445,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp863.c linux/fs/nls/nls_cp863.c
--- linux-2.2.18-pre14/fs/nls/nls_cp863.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp863.c	Mon Dec  3 20:33:10 2001
@@ -409,7 +409,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp864.c linux/fs/nls/nls_cp864.c
--- linux-2.2.18-pre14/fs/nls/nls_cp864.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp864.c	Mon Dec  3 20:33:10 2001
@@ -400,7 +400,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp865.c linux/fs/nls/nls_cp865.c
--- linux-2.2.18-pre14/fs/nls/nls_cp865.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp865.c	Mon Dec  3 20:33:10 2001
@@ -409,7 +409,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp866.c linux/fs/nls/nls_cp866.c
--- linux-2.2.18-pre14/fs/nls/nls_cp866.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp866.c	Mon Dec  3 20:33:10 2001
@@ -337,7 +337,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp869.c linux/fs/nls/nls_cp869.c
--- linux-2.2.18-pre14/fs/nls/nls_cp869.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp869.c	Mon Dec  3 20:33:10 2001
@@ -301,7 +301,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp874.c linux/fs/nls/nls_cp874.c
--- linux-2.2.18-pre14/fs/nls/nls_cp874.c	Wed Jun  7 14:26:43 2000
+++ linux/fs/nls/nls_cp874.c	Mon Dec  3 20:33:10 2001
@@ -265,7 +265,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp932.c linux/fs/nls/nls_cp932.c
--- linux-2.2.18-pre14/fs/nls/nls_cp932.c	Mon Dec  3 20:32:33 2001
+++ linux/fs/nls/nls_cp932.c	Mon Dec  3 20:33:10 2001
@@ -9806,7 +9806,7 @@
 	NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   NULL,   
 	NULL,   u2c_F9, u2c_FA, NULL,   NULL,   NULL,   NULL,   u2c_FF, };
 
-static void uni2char(unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen)
+static void uni2char(const unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen)
 {
 	unsigned char *uni2charset;
 
@@ -9844,7 +9844,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	unsigned char ch, cl;
 	struct nls_unicode *charset2uni;
@@ -9942,7 +9942,7 @@
 	return;
 }
 
-static void char2uni_euc_jp(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni_euc_jp(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	unsigned char ch, cl;
 	unsigned char sjis_temp[2];
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp936.c linux/fs/nls/nls_cp936.c
--- linux-2.2.18-pre14/fs/nls/nls_cp936.c	Mon Sep  4 10:39:27 2000
+++ linux/fs/nls/nls_cp936.c	Mon Dec  3 20:33:10 2001
@@ -15609,7 +15609,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	unsigned char ch, cl;
 	struct nls_unicode *charset2uni;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp949.c linux/fs/nls/nls_cp949.c
--- linux-2.2.18-pre14/fs/nls/nls_cp949.c	Mon Sep  4 10:39:27 2000
+++ linux/fs/nls/nls_cp949.c	Mon Dec  3 20:33:10 2001
@@ -18465,7 +18465,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	unsigned char ch, cl;
 	struct nls_unicode *charset2uni;
diff -urN linux-2.2.18-pre14/fs/nls/nls_cp950.c linux/fs/nls/nls_cp950.c
--- linux-2.2.18-pre14/fs/nls/nls_cp950.c	Mon Sep  4 10:39:27 2000
+++ linux/fs/nls/nls_cp950.c	Mon Dec  3 20:33:10 2001
@@ -12753,7 +12753,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	unsigned char ch, cl;
 	struct nls_unicode *charset2uni;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-1.c linux/fs/nls/nls_iso8859-1.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-1.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-1.c	Mon Dec  3 20:33:10 2001
@@ -189,7 +189,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-14.c linux/fs/nls/nls_iso8859-14.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-14.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-14.c	Mon Dec  3 20:33:10 2001
@@ -236,7 +236,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-15.c linux/fs/nls/nls_iso8859-15.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-15.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-15.c	Mon Dec  3 20:33:10 2001
@@ -229,7 +229,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-2.c linux/fs/nls/nls_iso8859-2.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-2.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-2.c	Mon Dec  3 20:33:10 2001
@@ -261,7 +261,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-3.c linux/fs/nls/nls_iso8859-3.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-3.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-3.c	Mon Dec  3 20:33:10 2001
@@ -261,7 +261,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-4.c linux/fs/nls/nls_iso8859-4.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-4.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-4.c	Mon Dec  3 20:33:10 2001
@@ -261,7 +261,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-5.c linux/fs/nls/nls_iso8859-5.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-5.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-5.c	Mon Dec  3 20:33:10 2001
@@ -265,7 +265,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-6.c linux/fs/nls/nls_iso8859-6.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-6.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-6.c	Mon Dec  3 20:33:10 2001
@@ -225,7 +225,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-7.c linux/fs/nls/nls_iso8859-7.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-7.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-7.c	Mon Dec  3 20:33:10 2001
@@ -301,7 +301,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-8.c linux/fs/nls/nls_iso8859-8.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-8.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-8.c	Mon Dec  3 20:33:10 2001
@@ -265,7 +265,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_iso8859-9.c linux/fs/nls/nls_iso8859-9.c
--- linux-2.2.18-pre14/fs/nls/nls_iso8859-9.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_iso8859-9.c	Mon Dec  3 20:33:10 2001
@@ -225,7 +225,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/fs/nls/nls_koi8-r.c linux/fs/nls/nls_koi8-r.c
--- linux-2.2.18-pre14/fs/nls/nls_koi8-r.c	Wed Jun  7 14:26:44 2000
+++ linux/fs/nls/nls_koi8-r.c	Mon Dec  3 20:33:10 2001
@@ -337,7 +337,7 @@
 	return;
 }
 
-static void char2uni(unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
+static void char2uni(const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2)
 {
 	*uni1 = charset2uni[*rawstring].uni1;
 	*uni2 = charset2uni[*rawstring].uni2;
diff -urN linux-2.2.18-pre14/include/asm-alpha/delay.h linux/include/asm-alpha/delay.h
--- linux-2.2.18-pre14/include/asm-alpha/delay.h	Tue Jan  4 10:12:24 2000
+++ linux/include/asm-alpha/delay.h	Mon Dec  3 20:33:10 2001
@@ -40,7 +40,7 @@
 extern __inline__ void
 __udelay(unsigned long usecs, unsigned long lps)
 {
-	/* compute (usecs * 2**64 / 10**6) * loops_per_sec / 2**64 */
+	/* compute (usecs * 2**64 / 10**6) * loops_per_jiffy * HZ / 2**64 */
 
 	usecs *= 0x000010c6f7a0b5edUL;		/* 2**64 / 1000000 */
 	__asm__("umulh %1,%2,%0" :"=r" (usecs) :"r" (usecs),"r" (lps));
@@ -50,7 +50,7 @@
 extern __inline__ void
 __small_const_udelay(unsigned long usecs, unsigned long lps)
 {
-	/* compute (usecs * 2**32 / 10**6) * loops_per_sec / 2**32 */
+	/* compute (usecs * 2**32 / 10**6) * loops_per_jiffy * HZ / 2**32 */
 
         usecs *= 0x10c6;                /* 2^32 / 10^6 */
 	usecs *= lps;
@@ -62,15 +62,16 @@
 #define udelay(usecs)						\
 	(__builtin_constant_p(usecs) && usecs < 0x100000000UL	\
 	 ? __small_const_udelay(usecs,				\
-		cpu_data[smp_processor_id()].loops_per_sec)	\
+		cpu_data[smp_processor_id()].loops_per_jiffy*HZ)	\
 	 : __udelay(usecs,					\
-		cpu_data[smp_processor_id()].loops_per_sec))
+		cpu_data[smp_processor_id()].loops_per_jiffy*HZ))
 #else
 #define udelay(usecs)						\
 	(__builtin_constant_p(usecs) && usecs < 0x100000000UL	\
-	 ? __small_const_udelay(usecs, loops_per_sec)		\
-	 : __udelay(usecs, loops_per_sec))
+	 ? __small_const_udelay(usecs, loops_per_jiffy*HZ)		\
+	 : __udelay(usecs, loops_per_jiffy*HZ))
 #endif
 
 
 #endif /* defined(__ALPHA_DELAY_H) */
+
diff -urN linux-2.2.18-pre14/include/asm-alpha/smp.h linux/include/asm-alpha/smp.h
--- linux-2.2.18-pre14/include/asm-alpha/smp.h	Tue Jan  4 10:12:24 2000
+++ linux/include/asm-alpha/smp.h	Mon Dec  3 20:33:10 2001
@@ -9,7 +9,7 @@
 
 /* make a multiple of 64-bytes */
 struct cpuinfo_alpha {
-	unsigned long loops_per_sec;
+	unsigned long loops_per_jiffy;
 	unsigned long last_asn;
 	unsigned long *pgd_cache;
 	unsigned long *pte_cache;
diff -urN linux-2.2.18-pre14/include/linux/i2c.h linux/include/linux/i2c.h
--- linux-2.2.18-pre14/include/linux/i2c.h	Tue Jan  4 10:12:24 2000
+++ linux/include/linux/i2c.h	Mon Dec  3 20:33:11 2001
@@ -40,7 +40,8 @@
 	/* 2 is used in 2.3.x */
 #define I2C_BUSID_BUZ		3	/* I2C bus on a BUZ */
 #define I2C_BUSID_ZORAN		4	/* I2C bus on a Zoran */
-#define I2C_BUSID_SGIVWFB	5	/* Moved to be unique */
+#define I2C_BUSID_CYBER2000	5	/* I2C bus on a Cyber2000 */
+#define I2C_BUSID_SGIVWFB	6	/* Moved to be unique */
 
 /*
  * struct for a driver for a i2c chip (tuner, soundprocessor,
diff -urN linux-2.2.18-pre14/include/linux/netdevice.h linux/include/linux/netdevice.h
--- linux-2.2.18-pre14/include/linux/netdevice.h	Mon Dec  3 20:32:33 2001
+++ linux/include/linux/netdevice.h	Mon Dec  3 20:33:11 2001
@@ -30,7 +30,9 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/if_packet.h>
+#ifdef __KERNEL__
 #include <net/divert.h>
+#endif
 
 #include <asm/atomic.h>
 
diff -urN linux-2.2.18-pre14/include/linux/nls.h linux/include/linux/nls.h
--- linux-2.2.18-pre14/include/linux/nls.h	Mon Sep  4 10:39:28 2000
+++ linux/include/linux/nls.h	Mon Dec  3 20:33:11 2001
@@ -6,7 +6,7 @@
 struct nls_table {
 	char *charset;
 	void (*uni2char) (unsigned char ch, unsigned char cl, unsigned char *out, int boundlen, int *outlen);
-	void (*char2uni) (unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2);
+	void (*char2uni) (const unsigned char *rawstring, int *offset, unsigned char *uni1, unsigned char *uni2);
 
 	void (*inc_use_count) (void);
 	void (*dec_use_count) (void);
diff -urN linux-2.2.18-pre14/init/main.c linux/init/main.c
--- linux-2.2.18-pre14/init/main.c	Mon Dec  3 20:32:33 2001
+++ linux/init/main.c	Mon Dec  3 20:33:11 2001
@@ -1230,8 +1230,8 @@
 
 /* Round the value and print it */	
 	printk("%lu.%02lu BogoMIPS\n",
-		(loops_per_jiffy+2500)/(500000/HZ),
-		((loops_per_jiffy+2500)/(5000/HZ)) % 100);
+		loops_per_jiffy/(500000/HZ),
+		(loops_per_jiffy/(5000/HZ)) % 100);
 }
 
 /*
