## Automatically generated incremental diff
## From:   linux-2.5.68-bk10
## To:     linux-2.5.68-bk11
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $

diff -urN linux-2.5.68-bk10/Documentation/filesystems/ntfs.txt linux-2.5.68-bk11/Documentation/filesystems/ntfs.txt
--- linux-2.5.68-bk10/Documentation/filesystems/ntfs.txt	2003-04-19 19:49:33.000000000 -0700
+++ linux-2.5.68-bk11/Documentation/filesystems/ntfs.txt	2003-05-01 04:40:12.000000000 -0700
@@ -247,6 +247,19 @@
 
 Note, a technical ChangeLog aimed at kernel hackers is in fs/ntfs/ChangeLog.
 
+2.1.4:
+	- Minor update allowing compilation with all gcc versions (well, the
+	  ones the kernel can be compiled with anyway).
+2.1.3:
+	- Major bug fixes for reading files and volumes in corner cases which
+	  were being hit by Windows 2k/XP users.
+2.1.2:
+	- Major bug fixes aleviating the hangs in statfs experienced by some
+	  users.
+2.1.1:
+	- Update handling of compressed files so people no longer get the
+	  frequently reported warning messages about initialized_size !=
+	  data_size.
 2.1.0:
 	- Add configuration option for developmental write support.
 	- Initial implementation of file overwriting. (Writes to resident files
diff -urN linux-2.5.68-bk10/Makefile linux-2.5.68-bk11/Makefile
--- linux-2.5.68-bk10/Makefile	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/Makefile	2003-05-01 04:40:12.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 5
 SUBLEVEL = 68
-EXTRAVERSION = -bk10
+EXTRAVERSION = -bk11
 
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
diff -urN linux-2.5.68-bk10/arch/i386/Kconfig linux-2.5.68-bk11/arch/i386/Kconfig
--- linux-2.5.68-bk10/arch/i386/Kconfig	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/Kconfig	2003-05-01 04:40:12.000000000 -0700
@@ -273,6 +273,13 @@
 
 endchoice
 
+config X86_GENERIC
+       bool "Generic x86 support" 
+       help
+       	  Including some tuning for non selected x86 CPUs too.
+	  when it has moderate overhead. This is intended for generic 
+	  distributions kernels.
+
 #
 # Define implied options from the CPU selection here
 #
@@ -288,10 +295,10 @@
 
 config X86_L1_CACHE_SHIFT
 	int
+	default "7" if MPENTIUM4 || X86_GENERIC
 	default "4" if MELAN || M486 || M386
 	default "5" if MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCRUSOE || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2
 	default "6" if MK7 || MK8
-	default "7" if MPENTIUM4
 
 config RWSEM_GENERIC_SPINLOCK
 	bool
@@ -363,16 +370,6 @@
 	depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6
 	default y
 
-config X86_PREFETCH
-	bool
-	depends on MPENTIUMIII || MPENTIUM4 || MVIAC3_2
-	default y
-
-config X86_SSE2
-	bool
-	depends on MK8 || MPENTIUM4
-	default y
-
 config HUGETLB_PAGE
 	bool "Huge TLB Page Support"
 	help
@@ -413,6 +410,18 @@
 
 	  If you don't know what to do here, say N.
 
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "32"
+	help
+	  This allows you to specify the maximum number of CPUs which this
+	  kernel will support.  The maximum supported value is 32 and the
+	  minimum value which makes sense is 2.
+
+	  This is purely to save memory - each supported CPU adds
+	  approximately eight kilobytes to the kernel image.
+
 config PREEMPT
 	bool "Preemptible Kernel"
 	help
@@ -465,18 +474,6 @@
 	depends on !SMP && X86_UP_IOAPIC
 	default y
 
-config NR_CPUS
-	int "Maximum number of CPUs (2-32)"
-	depends on SMP
-	default "32"
-	help
-	  This allows you to specify the maximum number of CPUs which this
-	  kernel will support.  The maximum supported value is 32 and the
-	  minimum value which makes sense is 2.
-
-	  This is purely to save memory - each supported CPU adds
-	  approximately eight kilobytes to the kernel image.
-
 config X86_TSC
 	bool
 	depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2) && !X86_NUMAQ
@@ -989,6 +986,11 @@
 	depends on (X86_VISWS || SMP) && !X86_VOYAGER
 	default y
 
+config X86_IO_APIC
+	bool
+	depends on SMP && !(X86_VISWS || X86_VOYAGER)
+	default y
+
 config PCI
 	bool "PCI support" if !X86_VISWS
 	depends on !X86_VOYAGER
@@ -1004,11 +1006,6 @@
 	  information about which PCI hardware does work under Linux and which
 	  doesn't.
 
-config X86_IO_APIC
-	bool
-	depends on SMP && !(X86_VISWS || X86_VOYAGER)
-	default y
-
 choice
 	prompt "PCI access mode"
 	depends on PCI && !X86_VISWS
@@ -1048,18 +1045,6 @@
  	depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS)
 	default y
 
-config SCx200
-	tristate "NatSemi SCx200 support"
-	depends on !X86_VOYAGER
-	help
-	  This provides basic support for the National Semiconductor SCx200 
-	  processor.  Right now this is just a driver for the GPIO pins.
-
-	  If you don't know what to do here, say N.
-
-	  This support is also available as a module.  If compiled as a
-	  module, it will be called scx200.
-
 source "drivers/pci/Kconfig"
 
 config ISA
@@ -1105,6 +1090,18 @@
 
 source "drivers/mca/Kconfig"
 
+config SCx200
+	tristate "NatSemi SCx200 support"
+	depends on !X86_VOYAGER
+	help
+	  This provides basic support for the National Semiconductor SCx200 
+	  processor.  Right now this is just a driver for the GPIO pins.
+
+	  If you don't know what to do here, say N.
+
+	  This support is also available as a module.  If compiled as a
+	  module, it will be called scx200.
+
 config HOTPLUG
 	bool "Support for hot-pluggable devices"
 	---help---
diff -urN linux-2.5.68-bk10/arch/i386/kernel/apm.c linux-2.5.68-bk11/arch/i386/kernel/apm.c
--- linux-2.5.68-bk10/arch/i386/kernel/apm.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/apm.c	2003-05-01 04:40:12.000000000 -0700
@@ -1205,7 +1205,17 @@
 	spin_lock(&i8253_lock);
 
 	get_time_diff();
+	/*
+	 * Irq spinlock must be dropped around set_system_power_state.
+	 * We'll undo any timer changes due to interrupts below.
+	 */
+	spin_unlock(&i8253_lock);
+	write_sequnlock_irq(&xtime_lock);
+
 	err = set_system_power_state(APM_STATE_SUSPEND);
+
+	write_seqlock_irq(&xtime_lock);
+	spin_lock(&i8253_lock);
 	reinit_timer();
 	set_time();
 	ignore_normal_resume = 1;
diff -urN linux-2.5.68-bk10/arch/i386/kernel/cpu/amd.c linux-2.5.68-bk11/arch/i386/kernel/cpu/amd.c
--- linux-2.5.68-bk10/arch/i386/kernel/cpu/amd.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/cpu/amd.c	2003-05-01 04:40:12.000000000 -0700
@@ -178,6 +178,15 @@
 			break;
 	}
 
+	switch (c->x86) {
+	case 15:
+		set_bit(X86_FEATURE_K8, c->x86_capability);
+		break;
+	case 6:
+		set_bit(X86_FEATURE_K7, c->x86_capability); 
+		break;
+	}
+
 	display_cacheinfo(c);
 }
 
diff -urN linux-2.5.68-bk10/arch/i386/kernel/cpu/intel.c linux-2.5.68-bk11/arch/i386/kernel/cpu/intel.c
--- linux-2.5.68-bk10/arch/i386/kernel/cpu/intel.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/cpu/intel.c	2003-05-01 04:40:12.000000000 -0700
@@ -353,6 +353,11 @@
 		break;
 	}
 #endif
+
+	if (c->x86 == 15) 
+		set_bit(X86_FEATURE_P4, c->x86_capability);
+	if (c->x86 == 6) 
+		set_bit(X86_FEATURE_P3, c->x86_capability);
 }
 
 
diff -urN linux-2.5.68-bk10/arch/i386/kernel/microcode.c linux-2.5.68-bk11/arch/i386/kernel/microcode.c
--- linux-2.5.68-bk10/arch/i386/kernel/microcode.c	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/microcode.c	2003-05-01 04:40:12.000000000 -0700
@@ -65,7 +65,6 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/miscdevice.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/spinlock.h>
 #include <linux/mm.h>
 
@@ -116,9 +115,10 @@
 };
 
 static struct miscdevice microcode_dev = {
-	.minor = MICROCODE_MINOR,
-	.name	= "microcode",
-	.fops	= &microcode_fops,
+	.minor		= MICROCODE_MINOR,
+	.name		= "microcode",
+	.devfs_name	= "cpu/microcode",
+	.fops		= &microcode_fops,
 };
 
 static int __init microcode_init(void)
@@ -127,26 +127,17 @@
 
 	error = misc_register(&microcode_dev);
 	if (error)
-		goto fail;
-	error = devfs_mk_symlink("cpu/microcode", "../misc/microcode");
-	if (error)
-		goto fail_deregister;
+		return error;
 
 	printk(KERN_INFO 
 		"IA-32 Microcode Update Driver: v%s <tigran@veritas.com>\n", 
 		MICROCODE_VERSION);
 	return 0;
-
-fail_deregister:
-	misc_deregister(&microcode_dev);
-fail:
-	return error;
 }
 
 static void __exit microcode_exit(void)
 {
 	misc_deregister(&microcode_dev);
-	devfs_remove("cpu/microcode");
 	kfree(mc_applied);
 	printk(KERN_INFO "IA-32 Microcode Update Driver v%s unregistered\n", 
 			MICROCODE_VERSION);
diff -urN linux-2.5.68-bk10/arch/i386/kernel/setup.c linux-2.5.68-bk11/arch/i386/kernel/setup.c
--- linux-2.5.68-bk10/arch/i386/kernel/setup.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/setup.c	2003-05-01 04:40:12.000000000 -0700
@@ -795,41 +795,91 @@
 		pci_mem_start = low_mem_size;
 }
 
+/* Use inline assembly to define this because the nops are defined 
+   as inline assembly strings in the include files and we cannot 
+   get them easily into strings. */
+asm("intelnops: " 
+    GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
+    GENERIC_NOP7 GENERIC_NOP8); 
+asm("k8nops: " 
+    K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
+    K8_NOP7 K8_NOP8); 
+asm("k7nops: " 
+    K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
+    K7_NOP7 K7_NOP8); 
+    
+extern unsigned char intelnops[], k8nops[], k7nops[];
+static unsigned char *intel_nops[ASM_NOP_MAX+1] = { 
+     NULL,
+     intelnops,
+     intelnops + 1,
+     intelnops + 1 + 2,
+     intelnops + 1 + 2 + 3,
+     intelnops + 1 + 2 + 3 + 4,
+     intelnops + 1 + 2 + 3 + 4 + 5,
+     intelnops + 1 + 2 + 3 + 4 + 5 + 6,
+     intelnops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+}; 
+static unsigned char *k8_nops[ASM_NOP_MAX+1] = { 
+     NULL,
+     k8nops,
+     k8nops + 1,
+     k8nops + 1 + 2,
+     k8nops + 1 + 2 + 3,
+     k8nops + 1 + 2 + 3 + 4,
+     k8nops + 1 + 2 + 3 + 4 + 5,
+     k8nops + 1 + 2 + 3 + 4 + 5 + 6,
+     k8nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+}; 
+static unsigned char *k7_nops[ASM_NOP_MAX+1] = { 
+     NULL,
+     k7nops,
+     k7nops + 1,
+     k7nops + 1 + 2,
+     k7nops + 1 + 2 + 3,
+     k7nops + 1 + 2 + 3 + 4,
+     k7nops + 1 + 2 + 3 + 4 + 5,
+     k7nops + 1 + 2 + 3 + 4 + 5 + 6,
+     k7nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
+}; 
+static struct nop { 
+     int cpuid; 
+     unsigned char **noptable; 
+} noptypes[] = { 
+     { X86_FEATURE_K8, k8_nops }, 
+     { X86_FEATURE_K7, k7_nops }, 
+     { -1, 0 }
+}; 
+
 /* Replace instructions with better alternatives for this CPU type.
 
    This runs before SMP is initialized to avoid SMP problems with
    self modifying code. This implies that assymetric systems where
    APs have less capabilities than the boot processor are not handled. 
-    
    In this case boot with "noreplacement". */ 
 void apply_alternatives(void *start, void *end) 
 { 
 	struct alt_instr *a; 
 	int diff, i, k;
-
-	for (a = start; a < (struct alt_instr *)end; 
-	     a = (void *)ALIGN((unsigned long)(a + 1) + a->instrlen, 4)) { 
+        unsigned char **noptable = intel_nops; 
+	for (i = 0; noptypes[i].cpuid >= 0; i++) { 
+		if (boot_cpu_has(noptypes[i].cpuid)) { 
+			noptable = noptypes[i].noptable;
+			break;
+		}
+	} 
+	for (a = start; (void *)a < end; a++) { 
 		if (!boot_cpu_has(a->cpuid))
 			continue;
 		BUG_ON(a->replacementlen > a->instrlen); 
 		memcpy(a->instr, a->replacement, a->replacementlen); 
 		diff = a->instrlen - a->replacementlen; 
+		/* Pad the rest with nops */
 		for (i = a->replacementlen; diff > 0; diff -= k, i += k) {
-			static const char *nops[] = {
-				0,
-				"\x90",
-#if CONFIG_MK7 || CONFIG_MK8
-				"\x66\x90",
-				"\x66\x66\x90",
-				"\x66\x66\x66\x90",
-#else
-				"\x89\xf6",
-				"\x8d\x76\x00",
-				"\x8d\x74\x26\x00",
-#endif
-			};
-			k = min_t(int, diff, ARRAY_SIZE(nops)); 
-			memcpy(a->instr + i, nops[k], k); 
+			k = diff;
+			if (k > ASM_NOP_MAX)
+				k = ASM_NOP_MAX;
+			memcpy(a->instr + i, noptable[k], k); 
 		} 
 	}
 } 
diff -urN linux-2.5.68-bk10/arch/i386/kernel/timers/timer_cyclone.c linux-2.5.68-bk11/arch/i386/kernel/timers/timer_cyclone.c
--- linux-2.5.68-bk10/arch/i386/kernel/timers/timer_cyclone.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/timers/timer_cyclone.c	2003-05-01 04:40:12.000000000 -0700
@@ -67,11 +67,11 @@
 
 	/* lost tick compensation */
 	delta = last_cyclone_low - delta;	
-	delta /=(CYCLONE_TIMER_FREQ/1000000);
+	delta /= (CYCLONE_TIMER_FREQ/1000000);
 	delta += delay_at_last_interrupt;
 	lost = delta/(1000000/HZ);
 	delay = delta%(1000000/HZ);
-	if(lost >= 2)
+	if (lost >= 2)
 		jiffies += lost-1;
 	
 	/* update the monotonic base value */
@@ -83,10 +83,12 @@
 	count = ((LATCH-1) - count) * TICK_SIZE;
 	delay_at_last_interrupt = (count + LATCH/2) / LATCH;
 
-	/* catch corner case where tick rollover 
-	 * occured between cyclone and pit reads
+
+	/* catch corner case where tick rollover occured 
+	 * between cyclone and pit reads (as noted when 
+	 * usec delta is > 90% # of usecs/tick)
 	 */
-	if(abs(delay - delay_at_last_interrupt) > 900)
+	if (abs(delay - delay_at_last_interrupt) > (900000/HZ)) 
 		jiffies++;
 }
 
diff -urN linux-2.5.68-bk10/arch/i386/kernel/timers/timer_tsc.c linux-2.5.68-bk11/arch/i386/kernel/timers/timer_tsc.c
--- linux-2.5.68-bk10/arch/i386/kernel/timers/timer_tsc.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/kernel/timers/timer_tsc.c	2003-05-01 04:40:12.000000000 -0700
@@ -178,7 +178,7 @@
 	delta += delay_at_last_interrupt;
 	lost = delta/(1000000/HZ);
 	delay = delta%(1000000/HZ);
-	if(lost >= 2)
+	if (lost >= 2)
 		jiffies += lost-1;
 
 	/* update the monotonic base value */
@@ -190,10 +190,11 @@
 	count = ((LATCH-1) - count) * TICK_SIZE;
 	delay_at_last_interrupt = (count + LATCH/2) / LATCH;
 
-	/* catch corner case where tick rollover 
-	 * occured between tsc and pit reads
+	/* catch corner case where tick rollover occured 
+	 * between tsc and pit reads (as noted when 
+	 * usec delta is > 90% # of usecs/tick)
 	 */
-	if(abs(delay - delay_at_last_interrupt) > 900)
+	if (abs(delay - delay_at_last_interrupt) > (900000/HZ))
 		jiffies++;
 }
 
diff -urN linux-2.5.68-bk10/arch/i386/vmlinux.lds.S linux-2.5.68-bk11/arch/i386/vmlinux.lds.S
--- linux-2.5.68-bk10/arch/i386/vmlinux.lds.S	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/i386/vmlinux.lds.S	2003-05-01 04:40:12.000000000 -0700
@@ -85,6 +85,7 @@
   __alt_instructions = .;
   .altinstructions : { *(.altinstructions) } 
   __alt_instructions_end = .; 
+ .altinstr_replacement : { *(.altinstr_replacement) }
   . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
diff -urN linux-2.5.68-bk10/arch/ia64/ia32/ia32_entry.S linux-2.5.68-bk11/arch/ia64/ia32/ia32_entry.S
--- linux-2.5.68-bk10/arch/ia64/ia32/ia32_entry.S	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk11/arch/ia64/ia32/ia32_entry.S	2003-05-01 04:40:12.000000000 -0700
@@ -252,7 +252,7 @@
 	data8 sys_acct
 	data8 sys_umount	  /* recycled never used phys( */
 	data8 sys32_ni_syscall	  /* old lock syscall holder */
-	data8 sys32_ioctl
+	data8 compat_sys_ioctl
 	data8 compat_sys_fcntl	  /* 55 */
 	data8 sys32_ni_syscall	  /* old mpx syscall holder */
 	data8 sys_setpgid
diff -urN linux-2.5.68-bk10/arch/ia64/ia32/ia32_ioctl.c linux-2.5.68-bk11/arch/ia64/ia32/ia32_ioctl.c
--- linux-2.5.68-bk10/arch/ia64/ia32/ia32_ioctl.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/arch/ia64/ia32/ia32_ioctl.c	2003-05-01 04:40:12.000000000 -0700
@@ -293,221 +293,3 @@
 	}
 	return err;
 }
-
-asmlinkage long
-sys32_ioctl (unsigned int fd, unsigned int cmd, unsigned int arg)
-{
-	long ret;
-
-	switch (IOCTL_NR(cmd)) {
-	      case IOCTL_NR(VFAT_IOCTL_READDIR_SHORT):
-	      case IOCTL_NR(VFAT_IOCTL_READDIR_BOTH): {
-		      struct linux32_dirent *d32 = P(arg);
-		      struct dirent d[2];
-
-		      ret = DO_IOCTL(fd, _IOR('r', _IOC_NR(cmd),
-					      struct dirent [2]),
-				     (unsigned long) d);
-		      if (ret < 0)
-			  return ret;
-
-		      if (put_dirent32(d, d32) || put_dirent32(d + 1, d32 + 1))
-			  return -EFAULT;
-
-		      return ret;
-	      }
-		case IOCTL_NR(SIOCGIFCONF):
-		{
-			struct ifconf32 {
-				int		ifc_len;
-				unsigned int	ifc_ptr;
-			} ifconf32;
-			struct ifconf ifconf;
-			int i, n;
-			char *p32, *p64;
-			char buf[32];	/* sizeof IA32 ifreq structure */
-
-			if (copy_from_user(&ifconf32, P(arg), sizeof(ifconf32)))
-				return -EFAULT;
-			ifconf.ifc_len = ifconf32.ifc_len;
-			ifconf.ifc_req = P(ifconf32.ifc_ptr);
-			ret = DO_IOCTL(fd, SIOCGIFCONF, &ifconf);
-			ifconf32.ifc_len = ifconf.ifc_len;
-			if (copy_to_user(P(arg), &ifconf32, sizeof(ifconf32)))
-				return -EFAULT;
-			n = ifconf.ifc_len / sizeof(struct ifreq);
-			p32 = P(ifconf32.ifc_ptr);
-			p64 = P(ifconf32.ifc_ptr);
-			for (i = 0; i < n; i++) {
-				if (copy_from_user(buf, p64, sizeof(struct ifreq)))
-					return -EFAULT;
-				if (copy_to_user(p32, buf, sizeof(buf)))
-					return -EFAULT;
-				p32 += sizeof(buf);
-				p64 += sizeof(struct ifreq);
-			}
-			return ret;
-		}
-
-	      case IOCTL_NR(DRM_IOCTL_VERSION):
-	      {
-		      drm_version_t ver;
-		      struct {
-			      int	version_major;
-			      int	version_minor;
-			      int	version_patchlevel;
-			      unsigned int name_len;
-			      unsigned int name; /* pointer */
-			      unsigned int date_len;
-			      unsigned int date; /* pointer */
-			      unsigned int desc_len;
-			      unsigned int desc; /* pointer */
-		      } ver32;
-
-		      if (copy_from_user(&ver32, P(arg), sizeof(ver32)))
-			      return -EFAULT;
-		      ver.name_len = ver32.name_len;
-		      ver.name = P(ver32.name);
-		      ver.date_len = ver32.date_len;
-		      ver.date = P(ver32.date);
-		      ver.desc_len = ver32.desc_len;
-		      ver.desc = P(ver32.desc);
-		      ret = DO_IOCTL(fd, DRM_IOCTL_VERSION, &ver);
-		      if (ret >= 0) {
-			      ver32.version_major = ver.version_major;
-			      ver32.version_minor = ver.version_minor;
-			      ver32.version_patchlevel = ver.version_patchlevel;
-			      ver32.name_len = ver.name_len;
-			      ver32.date_len = ver.date_len;
-			      ver32.desc_len = ver.desc_len;
-			      if (copy_to_user(P(arg), &ver32, sizeof(ver32)))
-				      return -EFAULT;
-		      }
-		      return ret;
-	      }
-
-	      case IOCTL_NR(DRM_IOCTL_GET_UNIQUE):
-	      {
-		      drm_unique_t un;
-		      struct {
-			      unsigned int unique_len;
-			      unsigned int unique;
-		      } un32;
-
-		      if (copy_from_user(&un32, P(arg), sizeof(un32)))
-			      return -EFAULT;
-		      un.unique_len = un32.unique_len;
-		      un.unique = P(un32.unique);
-		      ret = DO_IOCTL(fd, DRM_IOCTL_GET_UNIQUE, &un);
-		      if (ret >= 0) {
-			      un32.unique_len = un.unique_len;
-			      if (copy_to_user(P(arg), &un32, sizeof(un32)))
-				      return -EFAULT;
-		      }
-		      return ret;
-	      }
-	      case IOCTL_NR(DRM_IOCTL_SET_UNIQUE):
-	      case IOCTL_NR(DRM_IOCTL_ADD_MAP):
-	      case IOCTL_NR(DRM_IOCTL_ADD_BUFS):
-	      case IOCTL_NR(DRM_IOCTL_MARK_BUFS):
-	      case IOCTL_NR(DRM_IOCTL_INFO_BUFS):
-	      case IOCTL_NR(DRM_IOCTL_MAP_BUFS):
-	      case IOCTL_NR(DRM_IOCTL_FREE_BUFS):
-	      case IOCTL_NR(DRM_IOCTL_ADD_CTX):
-	      case IOCTL_NR(DRM_IOCTL_RM_CTX):
-	      case IOCTL_NR(DRM_IOCTL_MOD_CTX):
-	      case IOCTL_NR(DRM_IOCTL_GET_CTX):
-	      case IOCTL_NR(DRM_IOCTL_SWITCH_CTX):
-	      case IOCTL_NR(DRM_IOCTL_NEW_CTX):
-	      case IOCTL_NR(DRM_IOCTL_RES_CTX):
-
-	      case IOCTL_NR(DRM_IOCTL_AGP_ACQUIRE):
-	      case IOCTL_NR(DRM_IOCTL_AGP_RELEASE):
-	      case IOCTL_NR(DRM_IOCTL_AGP_ENABLE):
-	      case IOCTL_NR(DRM_IOCTL_AGP_INFO):
-	      case IOCTL_NR(DRM_IOCTL_AGP_ALLOC):
-	      case IOCTL_NR(DRM_IOCTL_AGP_FREE):
-	      case IOCTL_NR(DRM_IOCTL_AGP_BIND):
-	      case IOCTL_NR(DRM_IOCTL_AGP_UNBIND):
-
-		/* Mga specific ioctls */
-
-	      case IOCTL_NR(DRM_IOCTL_MGA_INIT):
-
-		/* I810 specific ioctls */
-
-	      case IOCTL_NR(DRM_IOCTL_I810_GETBUF):
-	      case IOCTL_NR(DRM_IOCTL_I810_COPY):
-
-	      case IOCTL_NR(MTIOCGET):
-	      case IOCTL_NR(MTIOCPOS):
-	      case IOCTL_NR(MTIOCGETCONFIG):
-	      case IOCTL_NR(MTIOCSETCONFIG):
-	      case IOCTL_NR(PPPIOCSCOMPRESS):
-	      case IOCTL_NR(PPPIOCGIDLE):
-	      case IOCTL_NR(NCP_IOC_GET_FS_INFO_V2):
-	      case IOCTL_NR(NCP_IOC_GETOBJECTNAME):
-	      case IOCTL_NR(NCP_IOC_SETOBJECTNAME):
-	      case IOCTL_NR(NCP_IOC_GETPRIVATEDATA):
-	      case IOCTL_NR(NCP_IOC_SETPRIVATEDATA):
-	      case IOCTL_NR(NCP_IOC_GETMOUNTUID2):
-	      case IOCTL_NR(CAPI_MANUFACTURER_CMD):
-	      case IOCTL_NR(VIDIOCGTUNER):
-	      case IOCTL_NR(VIDIOCSTUNER):
-	      case IOCTL_NR(VIDIOCGWIN):
-	      case IOCTL_NR(VIDIOCSWIN):
-	      case IOCTL_NR(VIDIOCGFBUF):
-	      case IOCTL_NR(VIDIOCSFBUF):
-	      case IOCTL_NR(MGSL_IOCSPARAMS):
-	      case IOCTL_NR(MGSL_IOCGPARAMS):
-	      case IOCTL_NR(ATM_GETNAMES):
-	      case IOCTL_NR(ATM_GETLINKRATE):
-	      case IOCTL_NR(ATM_GETTYPE):
-	      case IOCTL_NR(ATM_GETESI):
-	      case IOCTL_NR(ATM_GETADDR):
-	      case IOCTL_NR(ATM_RSTADDR):
-	      case IOCTL_NR(ATM_ADDADDR):
-	      case IOCTL_NR(ATM_DELADDR):
-	      case IOCTL_NR(ATM_GETCIRANGE):
-	      case IOCTL_NR(ATM_SETCIRANGE):
-	      case IOCTL_NR(ATM_SETESI):
-	      case IOCTL_NR(ATM_SETESIF):
-	      case IOCTL_NR(ATM_GETSTAT):
-	      case IOCTL_NR(ATM_GETSTATZ):
-	      case IOCTL_NR(ATM_GETLOOP):
-	      case IOCTL_NR(ATM_SETLOOP):
-	      case IOCTL_NR(ATM_QUERYLOOP):
-	      case IOCTL_NR(ENI_SETMULT):
-	      case IOCTL_NR(NS_GETPSTAT):
-		/* case IOCTL_NR(NS_SETBUFLEV): This is a duplicate case with ZATM_GETPOOLZ */
-	      case IOCTL_NR(ZATM_GETPOOLZ):
-	      case IOCTL_NR(ZATM_GETPOOL):
-	      case IOCTL_NR(ZATM_SETPOOL):
-	      case IOCTL_NR(ZATM_GETTHIST):
-	      case IOCTL_NR(IDT77105_GETSTAT):
-	      case IOCTL_NR(IDT77105_GETSTATZ):
-	      case IOCTL_NR(IXJCTL_TONE_CADENCE):
-	      case IOCTL_NR(IXJCTL_FRAMES_READ):
-	      case IOCTL_NR(IXJCTL_FRAMES_WRITTEN):
-	      case IOCTL_NR(IXJCTL_READ_WAIT):
-	      case IOCTL_NR(IXJCTL_WRITE_WAIT):
-	      case IOCTL_NR(IXJCTL_DRYBUFFER_READ):
-	      case IOCTL_NR(I2OHRTGET):
-	      case IOCTL_NR(I2OLCTGET):
-	      case IOCTL_NR(I2OPARMSET):
-	      case IOCTL_NR(I2OPARMGET):
-	      case IOCTL_NR(I2OSWDL):
-	      case IOCTL_NR(I2OSWUL):
-	      case IOCTL_NR(I2OSWDEL):
-	      case IOCTL_NR(I2OHTML):
-		break;
-	      default:
-		return sys_ioctl(fd, cmd, (unsigned long)arg);
-
-		case IOCTL_NR(SG_IO):
-			return(sg_ioctl_trans(fd, cmd, arg));
-
-	}
-	printk(KERN_ERR "%x:unimplemented IA32 ioctl system call\n", cmd);
-	return -EINVAL;
-}
diff -urN linux-2.5.68-bk10/arch/mips64/kernel/ioctl32.c linux-2.5.68-bk11/arch/mips64/kernel/ioctl32.c
--- linux-2.5.68-bk10/arch/mips64/kernel/ioctl32.c	2003-04-19 19:49:30.000000000 -0700
+++ linux-2.5.68-bk11/arch/mips64/kernel/ioctl32.c	2003-05-01 04:40:13.000000000 -0700
@@ -822,70 +822,3 @@
 
 #define NR_IOCTL32_HANDLERS	(sizeof(ioctl32_handler_table) /	\
 				 sizeof(ioctl32_handler_table[0]))
-
-static struct ioctl32_list *ioctl32_hash_table[1024];
-
-static inline int ioctl32_hash(unsigned int cmd)
-{
-	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
-}
-
-int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned int arg)
-{
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct file *filp;
-	struct ioctl32_list *l;
-	int error;
-
-	l = ioctl32_hash_table[ioctl32_hash(cmd)];
-
-	error = -EBADF;
-
-	filp = fget(fd);
-	if (!filp)
-		return error;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	while (l && l->handler.cmd != cmd)
-		l = l->next;
-
-	if (l) {
-		handler = (void *)l->handler.function;
-		error = handler(fd, cmd, arg, filp);
-	} else {
-		error = -EINVAL;
-		printk("unknown ioctl: %08x\n", cmd);
-	}
-out:
-	fput(filp);
-	return error;
-}
-
-static void ioctl32_insert(struct ioctl32_list *entry)
-{
-	int hash = ioctl32_hash(entry->handler.cmd);
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = entry;
-	else {
-		struct ioctl32_list *l;
-		l = ioctl32_hash_table[hash];
-		while (l->next)
-			l = l->next;
-		l->next = entry;
-		entry->next = 0;
-	}
-}
-
-static int __init init_ioctl32(void)
-{
-	int i;
-	for (i = 0; i < NR_IOCTL32_HANDLERS; i++)
-		ioctl32_insert(&ioctl32_handler_table[i]);
-	return 0;
-}
-
-__initcall(init_ioctl32);
diff -urN linux-2.5.68-bk10/arch/mips64/kernel/scall_o32.S linux-2.5.68-bk11/arch/mips64/kernel/scall_o32.S
--- linux-2.5.68-bk10/arch/mips64/kernel/scall_o32.S	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/arch/mips64/kernel/scall_o32.S	2003-05-01 04:40:13.000000000 -0700
@@ -287,7 +287,7 @@
 	sys	sys_acct	0
 	sys	sys_umount	2
 	sys	sys_ni_syscall	0
-	sys	sys32_ioctl	3
+	sys	compat_sys_ioctl	3
 	sys	sys32_fcntl	3			/* 4055 */
 	sys	sys_ni_syscall	2
 	sys	sys_setpgid	2
diff -urN linux-2.5.68-bk10/arch/parisc/kernel/ioctl32.c linux-2.5.68-bk11/arch/parisc/kernel/ioctl32.c
--- linux-2.5.68-bk10/arch/parisc/kernel/ioctl32.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/parisc/kernel/ioctl32.c	2003-05-01 04:40:13.000000000 -0700
@@ -9,9 +9,9 @@
  */
 
 #include <linux/config.h>
-#include <linux/types.h>
-#include "sys32.h"
 #include <linux/compat.h>
+#include <linux/ioctl.h>
+#include <linux/ioctl32.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
@@ -52,12 +52,7 @@
 #include <linux/rtc.h>
 #include <linux/pci.h>
 #include <linux/serial.h>
-#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
-/* Ugh. This header really is not clean */
-/* #define min min
-#define max max */
-#include <linux/lvm.h>
-#endif /* LVM */
+#include <linux/watchdog.h>
 
 #include <scsi/scsi.h>
 /* Ugly hack. */
@@ -97,7 +92,7 @@
 #include <linux/nbd.h>
 #include <linux/random.h>
 
-#include <asm/module.h>	/* get #define module_map() */
+#include <asm/ioctls.h>
 
 /* Use this to get at 32-bit user passed pointers. 
    See sys_sparc32.c for description about these. */
@@ -111,8 +106,6 @@
 #define EXT2_IOC32_GETVERSION             _IOR('v', 1, int)
 #define EXT2_IOC32_SETVERSION             _IOW('v', 2, int)
 
-extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
-
 static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
 	mm_segment_t old_fs = get_fs();
@@ -143,17 +136,6 @@
 	return err;
 }
 
-static int siocprivate(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	int err = sys_ioctl(fd, cmd, arg);
-	if ((unsigned) err > -4095)
-		printk(KERN_WARNING 
-			"ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
-			"supported, though some will work by accident.\n",
-		    fd, cmd, (void *)arg);
-	return err;
-}
-
 static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
 	/* These are just misnamed, they actually get/put from/to user an int */
@@ -2900,669 +2882,36 @@
 	return ret;
 }
 
+int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	int err = sys_ioctl(fd, cmd, arg);
+	if ((unsigned) err > -4095)
+		printk(KERN_WARNING 
+			"ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
+			"supported, though some will work by accident.\n",
+		    fd, cmd, (void *)arg);
+	return err;
+}
 
-struct ioctl_trans {
-	unsigned long handler;
-	unsigned int cmd;
-	unsigned int next;
-};
-#define HANDLE_IOCTL(cmd, handler) asm volatile(".dword %1\n.word %0, 0" : : "i" (cmd), "i" (handler));
-
+#define HANDLE_IOCTL(cmd, handler) { cmd, (ioctl_trans_handler_t)handler, 0 },
 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl) 
 
-
-#define IOCTL_TABLE_START void ioctl32_foo(void) { asm volatile(".data\nioctl_translations:");
-#define IOCTL_TABLE_END asm volatile("\nioctl_translations_end:\n\t.previous"); }
+#define IOCTL_TABLE_START  struct ioctl_trans ioctl_start[] = {
+#define IOCTL_TABLE_END    }; struct ioctl_trans ioctl_end[0];
 
 IOCTL_TABLE_START
-/* List here exlicitly which ioctl's are known to have
- * compatible types passed or none at all...
- */
-/* Big T */
-COMPATIBLE_IOCTL(TCGETA)
-COMPATIBLE_IOCTL(TCSETA)
-COMPATIBLE_IOCTL(TCSETAW)
-COMPATIBLE_IOCTL(TCSETAF)
-COMPATIBLE_IOCTL(TCSBRK)
-COMPATIBLE_IOCTL(TCXONC)
-COMPATIBLE_IOCTL(TCFLSH)
-COMPATIBLE_IOCTL(TCGETS)
-COMPATIBLE_IOCTL(TCSETS)
-COMPATIBLE_IOCTL(TCSETSW)
-COMPATIBLE_IOCTL(TCSETSF)
-COMPATIBLE_IOCTL(TIOCLINUX)
+#include <linux/compat_ioctl.h>
+
+/* Might be moved to compat_ioctl.h with some ifdefs... */
 COMPATIBLE_IOCTL(TIOCSTART)
 COMPATIBLE_IOCTL(TIOCSTOP)
-/* Little t */
-COMPATIBLE_IOCTL(TIOCGETD)
-COMPATIBLE_IOCTL(TIOCSETD)
-COMPATIBLE_IOCTL(TIOCEXCL)
-COMPATIBLE_IOCTL(TIOCNXCL)
-COMPATIBLE_IOCTL(TIOCCONS)
-COMPATIBLE_IOCTL(TIOCGSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSWINSZ)
-COMPATIBLE_IOCTL(TIOCGWINSZ)
-COMPATIBLE_IOCTL(TIOCMGET)
-COMPATIBLE_IOCTL(TIOCMBIC)
-COMPATIBLE_IOCTL(TIOCMBIS)
-COMPATIBLE_IOCTL(TIOCMSET)
-COMPATIBLE_IOCTL(TIOCPKT)
-COMPATIBLE_IOCTL(TIOCNOTTY)
-COMPATIBLE_IOCTL(TIOCSTI)
-COMPATIBLE_IOCTL(TIOCOUTQ)
-COMPATIBLE_IOCTL(TIOCSPGRP)
-COMPATIBLE_IOCTL(TIOCGPGRP)
-COMPATIBLE_IOCTL(TIOCSCTTY)
-COMPATIBLE_IOCTL(TIOCGPTN)
-COMPATIBLE_IOCTL(TIOCSPTLCK)
-COMPATIBLE_IOCTL(TIOCSSERIAL)
-COMPATIBLE_IOCTL(TIOCSERGETLSR)
 COMPATIBLE_IOCTL(TIOCSLTC)
-/* Big F */
-#if 0
-COMPATIBLE_IOCTL(FBIOGTYPE)
-COMPATIBLE_IOCTL(FBIOSATTR)
-COMPATIBLE_IOCTL(FBIOGATTR)
-COMPATIBLE_IOCTL(FBIOSVIDEO)
-COMPATIBLE_IOCTL(FBIOGVIDEO)
-COMPATIBLE_IOCTL(FBIOGCURSOR32)  /* This is not implemented yet. Later it should be converted... */
-COMPATIBLE_IOCTL(FBIOSCURPOS)
-COMPATIBLE_IOCTL(FBIOGCURPOS)
-COMPATIBLE_IOCTL(FBIOGCURMAX)
-#endif
-COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
-COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
 
-COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
-COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
-COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
-/* Little f */
-COMPATIBLE_IOCTL(FIOCLEX)
-COMPATIBLE_IOCTL(FIONCLEX)
-COMPATIBLE_IOCTL(FIOASYNC)
-COMPATIBLE_IOCTL(FIONBIO)
-COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
-/* 0x00 */
-COMPATIBLE_IOCTL(FIBMAP)
-COMPATIBLE_IOCTL(FIGETBSZ)
-/* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
- *         Some need translations, these do not.
- */
-COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
-COMPATIBLE_IOCTL(HDIO_SET_DMA)
-COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
-COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
-COMPATIBLE_IOCTL(HDIO_SET_32BIT)
-COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
-COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
-COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
-COMPATIBLE_IOCTL(HDIO_SET_NICE)
-/* 0x02 -- Floppy ioctls */
-COMPATIBLE_IOCTL(FDMSGON)
-COMPATIBLE_IOCTL(FDMSGOFF)
-COMPATIBLE_IOCTL(FDSETEMSGTRESH)
-COMPATIBLE_IOCTL(FDFLUSH)
-COMPATIBLE_IOCTL(FDWERRORCLR)
-COMPATIBLE_IOCTL(FDSETMAXERRS)
-COMPATIBLE_IOCTL(FDGETMAXERRS)
-COMPATIBLE_IOCTL(FDGETDRVTYP)
-COMPATIBLE_IOCTL(FDEJECT)
-COMPATIBLE_IOCTL(FDCLRPRM)
-COMPATIBLE_IOCTL(FDFMTBEG)
-COMPATIBLE_IOCTL(FDFMTEND)
-COMPATIBLE_IOCTL(FDRESET)
-COMPATIBLE_IOCTL(FDTWADDLE)
-COMPATIBLE_IOCTL(FDFMTTRK)
-COMPATIBLE_IOCTL(FDRAWCMD)
-/* 0x12 */
-COMPATIBLE_IOCTL(BLKROSET)
-COMPATIBLE_IOCTL(BLKROGET)
-COMPATIBLE_IOCTL(BLKRRPART)
-COMPATIBLE_IOCTL(BLKFLSBUF)
-COMPATIBLE_IOCTL(BLKSECTSET)
-
-/* RAID */
-COMPATIBLE_IOCTL(RAID_VERSION)
-COMPATIBLE_IOCTL(GET_ARRAY_INFO)
-COMPATIBLE_IOCTL(GET_DISK_INFO)
-COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
-COMPATIBLE_IOCTL(RAID_AUTORUN)
-COMPATIBLE_IOCTL(CLEAR_ARRAY)
-COMPATIBLE_IOCTL(ADD_NEW_DISK)
-COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
-COMPATIBLE_IOCTL(SET_ARRAY_INFO)
-COMPATIBLE_IOCTL(SET_DISK_INFO)
-COMPATIBLE_IOCTL(WRITE_RAID_INFO)
-COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
-COMPATIBLE_IOCTL(PROTECT_ARRAY)
-COMPATIBLE_IOCTL(HOT_ADD_DISK)
-COMPATIBLE_IOCTL(SET_DISK_FAULTY)
-COMPATIBLE_IOCTL(HOT_GENERATE_ERROR)
-COMPATIBLE_IOCTL(RUN_ARRAY)
-COMPATIBLE_IOCTL(START_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY_RO)
-COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
-
-/* DM */
-COMPATIBLE_IOCTL(DM_VERSION)
-COMPATIBLE_IOCTL(DM_REMOVE_ALL)
-COMPATIBLE_IOCTL(DM_DEV_CREATE)
-COMPATIBLE_IOCTL(DM_DEV_REMOVE)
-COMPATIBLE_IOCTL(DM_DEV_RELOAD)
-COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
-COMPATIBLE_IOCTL(DM_DEV_RENAME)
-COMPATIBLE_IOCTL(DM_DEV_DEPS)
-COMPATIBLE_IOCTL(DM_DEV_STATUS)
-COMPATIBLE_IOCTL(DM_TARGET_STATUS)
-COMPATIBLE_IOCTL(DM_TARGET_WAIT)
-
-/* Big K */
-COMPATIBLE_IOCTL(PIO_FONT)
-COMPATIBLE_IOCTL(GIO_FONT)
-COMPATIBLE_IOCTL(KDSIGACCEPT)
-COMPATIBLE_IOCTL(KDGETKEYCODE)
-COMPATIBLE_IOCTL(KDSETKEYCODE)
-COMPATIBLE_IOCTL(KIOCSOUND)
-COMPATIBLE_IOCTL(KDMKTONE)
-COMPATIBLE_IOCTL(KDGKBTYPE)
-COMPATIBLE_IOCTL(KDSETMODE)
-COMPATIBLE_IOCTL(KDGETMODE)
-COMPATIBLE_IOCTL(KDSKBMODE)
-COMPATIBLE_IOCTL(KDGKBMODE)
-COMPATIBLE_IOCTL(KDSKBMETA)
-COMPATIBLE_IOCTL(KDGKBMETA)
-COMPATIBLE_IOCTL(KDGKBENT)
-COMPATIBLE_IOCTL(KDSKBENT)
-COMPATIBLE_IOCTL(KDGKBSENT)
-COMPATIBLE_IOCTL(KDSKBSENT)
-COMPATIBLE_IOCTL(KDGKBDIACR)
-COMPATIBLE_IOCTL(KDSKBDIACR)
-COMPATIBLE_IOCTL(KDGKBLED)
-COMPATIBLE_IOCTL(KDSKBLED)
-COMPATIBLE_IOCTL(KDGETLED)
-COMPATIBLE_IOCTL(KDSETLED)
-COMPATIBLE_IOCTL(GIO_SCRNMAP)
-COMPATIBLE_IOCTL(PIO_SCRNMAP)
-COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_FONTRESET)
-COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
-/* Little k */
-#if 0
-COMPATIBLE_IOCTL(KIOCTYPE)
-COMPATIBLE_IOCTL(KIOCLAYOUT)
-COMPATIBLE_IOCTL(KIOCGTRANS)
-COMPATIBLE_IOCTL(KIOCTRANS)
-COMPATIBLE_IOCTL(KIOCCMD)
-COMPATIBLE_IOCTL(KIOCSDIRECT)
-COMPATIBLE_IOCTL(KIOCSLED)
-COMPATIBLE_IOCTL(KIOCGLED)
-COMPATIBLE_IOCTL(KIOCSRATE)
-COMPATIBLE_IOCTL(KIOCGRATE)
-#endif
-/* Big S */
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
-COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
-COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
-/* Big T */
-COMPATIBLE_IOCTL(TUNSETNOCSUM)
-COMPATIBLE_IOCTL(TUNSETDEBUG)
-COMPATIBLE_IOCTL(TUNSETIFF)
-COMPATIBLE_IOCTL(TUNSETPERSIST)
-COMPATIBLE_IOCTL(TUNSETOWNER)
-/* Big V */
-COMPATIBLE_IOCTL(VT_SETMODE)
-COMPATIBLE_IOCTL(VT_GETMODE)
-COMPATIBLE_IOCTL(VT_GETSTATE)
-COMPATIBLE_IOCTL(VT_OPENQRY)
-COMPATIBLE_IOCTL(VT_ACTIVATE)
-COMPATIBLE_IOCTL(VT_WAITACTIVE)
-COMPATIBLE_IOCTL(VT_RELDISP)
-COMPATIBLE_IOCTL(VT_DISALLOCATE)
-COMPATIBLE_IOCTL(VT_RESIZE)
-COMPATIBLE_IOCTL(VT_RESIZEX)
-COMPATIBLE_IOCTL(VT_LOCKSWITCH)
-COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
-/* Little v, the video4linux ioctls */
-COMPATIBLE_IOCTL(VIDIOCGCAP)
-COMPATIBLE_IOCTL(VIDIOCGCHAN)
-COMPATIBLE_IOCTL(VIDIOCSCHAN)
-COMPATIBLE_IOCTL(VIDIOCGPICT)
-COMPATIBLE_IOCTL(VIDIOCSPICT)
-COMPATIBLE_IOCTL(VIDIOCCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCKEY)
-COMPATIBLE_IOCTL(VIDIOCGAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSYNC)
-COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCGMBUF)
-COMPATIBLE_IOCTL(VIDIOCGUNIT)
-COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
-/* BTTV specific... */
-COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
-COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
-COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
-/* Little m */
-COMPATIBLE_IOCTL(MTIOCTOP)
-/* Socket level stuff */
-COMPATIBLE_IOCTL(FIOSETOWN)
-COMPATIBLE_IOCTL(SIOCSPGRP)
-COMPATIBLE_IOCTL(FIOGETOWN)
-COMPATIBLE_IOCTL(SIOCGPGRP)
-COMPATIBLE_IOCTL(SIOCATMARK)
-COMPATIBLE_IOCTL(SIOCSIFLINK)
-COMPATIBLE_IOCTL(SIOCSIFENCAP)
-COMPATIBLE_IOCTL(SIOCGIFENCAP)
-COMPATIBLE_IOCTL(SIOCSIFBR)
-COMPATIBLE_IOCTL(SIOCGIFBR)
-COMPATIBLE_IOCTL(SIOCSARP)
-COMPATIBLE_IOCTL(SIOCGARP)
-COMPATIBLE_IOCTL(SIOCDARP)
-COMPATIBLE_IOCTL(SIOCSRARP)
-COMPATIBLE_IOCTL(SIOCGRARP)
-COMPATIBLE_IOCTL(SIOCDRARP)
-COMPATIBLE_IOCTL(SIOCADDDLCI)
-COMPATIBLE_IOCTL(SIOCDELDLCI)
-COMPATIBLE_IOCTL(SIOCGMIIPHY)
-COMPATIBLE_IOCTL(SIOCGMIIREG)
-COMPATIBLE_IOCTL(SIOCSMIIREG)
-COMPATIBLE_IOCTL(SIOCGIFVLAN)
-COMPATIBLE_IOCTL(SIOCSIFVLAN)
-COMPATIBLE_IOCTL(SIOCDELDLCI)
-/* SG stuff */
-COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_EMULATED_HOST)
-COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
-COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
-COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
-COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
-COMPATIBLE_IOCTL(SG_SET_DEBUG)
-COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
-COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
-COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
-COMPATIBLE_IOCTL(SG_SCSI_RESET)
-COMPATIBLE_IOCTL(SG_IO)
-COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
-COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
-COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
-/* PPP stuff */
-COMPATIBLE_IOCTL(PPPIOCGFLAGS)
-COMPATIBLE_IOCTL(PPPIOCSFLAGS)
-COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGUNIT)
-COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGMRU)
-COMPATIBLE_IOCTL(PPPIOCSMRU)
-COMPATIBLE_IOCTL(PPPIOCSMAXCID)
-COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
-COMPATIBLE_IOCTL(LPGETSTATUS)
-COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
-COMPATIBLE_IOCTL(PPPIOCGNPMODE)
-COMPATIBLE_IOCTL(PPPIOCSNPMODE)
-COMPATIBLE_IOCTL(PPPIOCGDEBUG)
-COMPATIBLE_IOCTL(PPPIOCSDEBUG)
-COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
-COMPATIBLE_IOCTL(PPPIOCATTACH)
-COMPATIBLE_IOCTL(PPPIOCDETACH)
-COMPATIBLE_IOCTL(PPPIOCSMRRU)
-COMPATIBLE_IOCTL(PPPIOCCONNECT)
-COMPATIBLE_IOCTL(PPPIOCDISCONN)
-COMPATIBLE_IOCTL(PPPIOCATTCHAN)
-/* PPPOX */
-COMPATIBLE_IOCTL(PPPOEIOCSFWD)
-COMPATIBLE_IOCTL(PPPOEIOCDFWD)
-/* CDROM stuff */
-COMPATIBLE_IOCTL(CDROMPAUSE)
-COMPATIBLE_IOCTL(CDROMRESUME)
-COMPATIBLE_IOCTL(CDROMPLAYMSF)
-COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
-COMPATIBLE_IOCTL(CDROMREADTOCHDR)
-COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
-COMPATIBLE_IOCTL(CDROMSTOP)
-COMPATIBLE_IOCTL(CDROMSTART)
-COMPATIBLE_IOCTL(CDROMEJECT)
-COMPATIBLE_IOCTL(CDROMVOLCTRL)
-COMPATIBLE_IOCTL(CDROMSUBCHNL)
-COMPATIBLE_IOCTL(CDROMEJECT_SW)
-COMPATIBLE_IOCTL(CDROMMULTISESSION)
-COMPATIBLE_IOCTL(CDROM_GET_MCN)
-COMPATIBLE_IOCTL(CDROMRESET)
-COMPATIBLE_IOCTL(CDROMVOLREAD)
-COMPATIBLE_IOCTL(CDROMSEEK)
-COMPATIBLE_IOCTL(CDROMPLAYBLK)
-COMPATIBLE_IOCTL(CDROMCLOSETRAY)
-COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
-COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
-COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
-COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
-COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
-COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
-COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
-COMPATIBLE_IOCTL(CDROM_DEBUG)
-COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
-/* Big L */
-COMPATIBLE_IOCTL(LOOP_SET_FD)
-COMPATIBLE_IOCTL(LOOP_CLR_FD)
-/* Big Q for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
-COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
-COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
-/* Big T for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_START)
-COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
-COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
-/* Little m for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
-/* Big P for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
-COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
-/* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
-/* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
-COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
-/* Big C for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
-COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
-COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
-COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
-/* Big M for sound/OSS */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_MUTE)
-/* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
-/* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
-/* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
-/* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
-COMPATIBLE_IOCTL(SOUND_MIXER_AGC)
-COMPATIBLE_IOCTL(SOUND_MIXER_3DSE)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
-COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
-COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
-COMPATIBLE_IOCTL(OSS_GETVERSION)
-/* AUTOFS */
-COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
-COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
-COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
-COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
-COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
-/* DEVFS */
-COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
-COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
-/* Raw devices */
-COMPATIBLE_IOCTL(RAW_SETBIND)
-COMPATIBLE_IOCTL(RAW_GETBIND)
-/* SMB ioctls which do not need any translations */
-COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
-/* Little a */
-COMPATIBLE_IOCTL(ATMSIGD_CTRL)
-COMPATIBLE_IOCTL(ATMARPD_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_MCAST)
-COMPATIBLE_IOCTL(ATMLEC_DATA)
-COMPATIBLE_IOCTL(ATM_SETSC)
-COMPATIBLE_IOCTL(SIOCSIFATMTCP)
-COMPATIBLE_IOCTL(SIOCMKCLIP)
-COMPATIBLE_IOCTL(ATMARP_MKIP)
-COMPATIBLE_IOCTL(ATMARP_SETENTRY)
-COMPATIBLE_IOCTL(ATMARP_ENCAP)
-COMPATIBLE_IOCTL(ATMTCP_CREATE)
-COMPATIBLE_IOCTL(ATMTCP_REMOVE)
-COMPATIBLE_IOCTL(ATMMPC_CTRL)
-COMPATIBLE_IOCTL(ATMMPC_DATA)
-#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
-/* 0xfe - lvm */
-COMPATIBLE_IOCTL(VG_SET_EXTENDABLE)
-COMPATIBLE_IOCTL(VG_STATUS_GET_COUNT)
-COMPATIBLE_IOCTL(VG_STATUS_GET_NAMELIST)
-COMPATIBLE_IOCTL(VG_REMOVE)
-COMPATIBLE_IOCTL(VG_RENAME)
-COMPATIBLE_IOCTL(VG_REDUCE)
-COMPATIBLE_IOCTL(PE_LOCK_UNLOCK)
-COMPATIBLE_IOCTL(PV_FLUSH)
-COMPATIBLE_IOCTL(LVM_LOCK_LVM)
-COMPATIBLE_IOCTL(LVM_GET_IOP_VERSION)
-#ifdef LVM_TOTAL_RESET
-COMPATIBLE_IOCTL(LVM_RESET)
-#endif
-COMPATIBLE_IOCTL(LV_SET_ACCESS)
-COMPATIBLE_IOCTL(LV_SET_STATUS)
-COMPATIBLE_IOCTL(LV_SET_ALLOCATION)
-COMPATIBLE_IOCTL(LE_REMAP)
-COMPATIBLE_IOCTL(LV_BMAP)
-COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
-#endif /* LVM */
-#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
-COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
-COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
-COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC)
-COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK)
-COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK)
-COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL)
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS)
-COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS)
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX)
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW)
-COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW)
-COMPATIBLE_IOCTL(DRM_IOCTL_LOCK)
-COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
-COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
-#endif /* DRM */
-/* Big R */
-COMPATIBLE_IOCTL(RNDGETENTCNT)
-COMPATIBLE_IOCTL(RNDADDTOENTCNT)
-COMPATIBLE_IOCTL(RNDGETPOOL)
-COMPATIBLE_IOCTL(RNDADDENTROPY)
-COMPATIBLE_IOCTL(RNDZAPENTCNT)
-COMPATIBLE_IOCTL(RNDCLEARPOOL)
-/* Bluetooth ioctls */
-COMPATIBLE_IOCTL(HCIDEVUP)
-COMPATIBLE_IOCTL(HCIDEVDOWN)
-COMPATIBLE_IOCTL(HCIDEVRESET)
-COMPATIBLE_IOCTL(HCIDEVRESTAT)
-COMPATIBLE_IOCTL(HCIGETDEVLIST)
-COMPATIBLE_IOCTL(HCIGETDEVINFO)
-COMPATIBLE_IOCTL(HCIGETCONNLIST)
-COMPATIBLE_IOCTL(HCIGETCONNINFO)
-COMPATIBLE_IOCTL(HCISETRAW)
-COMPATIBLE_IOCTL(HCISETSCAN)
-COMPATIBLE_IOCTL(HCISETAUTH)
-COMPATIBLE_IOCTL(HCISETENCRYPT)
-COMPATIBLE_IOCTL(HCISETPTYPE)
-COMPATIBLE_IOCTL(HCISETLINKPOL)
-COMPATIBLE_IOCTL(HCISETLINKMODE)
-COMPATIBLE_IOCTL(HCISETACLMTU)
-COMPATIBLE_IOCTL(HCISETSCOMTU)
-COMPATIBLE_IOCTL(HCIINQUIRY)
-/* Misc. */
-COMPATIBLE_IOCTL(0x41545900)		/* ATYIO_CLKR */
-COMPATIBLE_IOCTL(0x41545901)		/* ATYIO_CLKW */
-COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
-COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
-/* USB */
-COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
-COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
-COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
-COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
-COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_RESET)
-COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
-/* MTD */
-COMPATIBLE_IOCTL(MEMGETINFO)
-COMPATIBLE_IOCTL(MEMERASE)
-COMPATIBLE_IOCTL(MEMLOCK)
-COMPATIBLE_IOCTL(MEMUNLOCK)
-COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
-COMPATIBLE_IOCTL(MEMGETREGIONINFO)
-/* NBD */
-COMPATIBLE_IOCTL(NBD_SET_SOCK)
-COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
-COMPATIBLE_IOCTL(NBD_SET_SIZE)
-COMPATIBLE_IOCTL(NBD_DO_IT)
-COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
-COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
-COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
-COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
-COMPATIBLE_IOCTL(NBD_DISCONNECT)
+/* PA-specific ioctls */
+COMPATIBLE_IOCTL(PA_PERF_ON)
+COMPATIBLE_IOCTL(PA_PERF_OFF)
+COMPATIBLE_IOCTL(PA_PERF_VERSION)
+
 /* And these ioctls need translation */
 HANDLE_IOCTL(TIOCGSERIAL, do_tiocgserial)
 HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
@@ -3735,150 +3084,5 @@
 HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma);
 HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx);
 #endif /* DRM */
-COMPATIBLE_IOCTL(PA_PERF_ON)
-COMPATIBLE_IOCTL(PA_PERF_OFF)
-COMPATIBLE_IOCTL(PA_PERF_VERSION)
 IOCTL_TABLE_END
 
-unsigned int ioctl32_hash_table[1024];
-
-extern inline unsigned long ioctl32_hash(unsigned long cmd)
-{
-	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
-}
-
-static void ioctl32_insert_translation(struct ioctl_trans *trans)
-{
-	unsigned long hash;
-	struct ioctl_trans *t;
-
-	hash = ioctl32_hash (trans->cmd);
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = (u32)(long)trans;
-	else {
-		t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
-		while (t->next)
-			t = (struct ioctl_trans *)(long)t->next;
-		trans->next = 0;
-		t->next = (u32)(long)trans;
-	}
-}
-
-static int __init init_sys32_ioctl(void)
-{
-	int i;
-	extern struct ioctl_trans ioctl_translations[], ioctl_translations_end[];
-
-	for (i = 0; &ioctl_translations[i] < &ioctl_translations_end[0]; i++)
-		ioctl32_insert_translation(&ioctl_translations[i]);
-	return 0;
-}
-
-__initcall(init_sys32_ioctl);
-
-static struct ioctl_trans *additional_ioctls;
-
-/* Always call these with kernel lock held! */
-
-int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
-{
-	int i;
-
-panic("register_ioctl32_conversion() is B0RKEN! Called by %p\n", __builtin_return_address(0));
-
-	if (!additional_ioctls) {
-		additional_ioctls = module_map(PAGE_SIZE);
-		if (!additional_ioctls)
-			return -ENOMEM;
-		memset(additional_ioctls, 0, PAGE_SIZE);
-	}
-	for (i = 0; i < PAGE_SIZE/sizeof(struct ioctl_trans); i++)
-		if (!additional_ioctls[i].cmd)
-			break;
-	if (i == PAGE_SIZE/sizeof(struct ioctl_trans))
-		return -ENOMEM;
-	additional_ioctls[i].cmd = cmd;
-	if (!handler)
-		additional_ioctls[i].handler = (u32)(long)sys_ioctl;
-	else
-		additional_ioctls[i].handler = (u32)(long)handler;
-	ioctl32_insert_translation(&additional_ioctls[i]);
-	return 0;
-}
-
-int unregister_ioctl32_conversion(unsigned int cmd)
-{
-	unsigned long hash = ioctl32_hash(cmd);
-	struct ioctl_trans *t, *t1;
-
-	t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
-	if (!t) return -EINVAL;
-	if (t->cmd == cmd && t >= additional_ioctls &&
-	    (unsigned long)t < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-		ioctl32_hash_table[hash] = t->next;
-		t->cmd = 0;
-		return 0;
-	} else while (t->next) {
-		t1 = (struct ioctl_trans *)(long)t->next;
-		if (t1->cmd == cmd && t1 >= additional_ioctls &&
-		    (unsigned long)t1 < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-			t1->cmd = 0;
-			t->next = t1->next;
-			return 0;
-		}
-		t = t1;
-	}
-	return -EINVAL;
-}
-
-asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	struct file * filp;
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	unsigned long pafnptr[4];
-	extern char __gp;
-	struct ioctl_trans *t;
-	int error = -EBADF;
-
-	filp = fget(fd);
-	if(!filp)
-		goto out2;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	/* intercept private networking ioctl() calls here since it is
-	 * an onerous task to figure out which ones of the HANDLE_IOCTL
-	 * list map to these values.
-	 */
-	if (cmd >= SIOCDEVPRIVATE && cmd <= SIOCDEVPRIVATE + 0xf) {
-		error = siocprivate(fd, cmd, arg);
-		goto out;
-	}
-
-	t = (struct ioctl_trans *)(long)ioctl32_hash_table [ioctl32_hash (cmd)];
-
-	while (t && t->cmd != cmd)
-		t = (struct ioctl_trans *)(long)t->next;
-	if (t) {
-		handler = (void *) pafnptr;
-		pafnptr[0] = pafnptr[1] = 0UL;
-		pafnptr[2] = (unsigned long) t->handler;
-		pafnptr[3] = A(&__gp);
-		error = handler(fd, cmd, arg, filp);
-	} else {
-		static int count = 0;
-		if (++count <= 20)
-			printk(KERN_WARNING
-				"sys32_ioctl: Unknown cmd fd(%d) "
-				"cmd(%08x) arg(%08x)\n",
-				(int)fd, (unsigned int)cmd, (unsigned int)arg);
-		error = -EINVAL;
-	}
-out:
-	fput(filp);
-out2:
-	return error;
-}
diff -urN linux-2.5.68-bk10/arch/parisc/kernel/syscall.S linux-2.5.68-bk11/arch/parisc/kernel/syscall.S
--- linux-2.5.68-bk10/arch/parisc/kernel/syscall.S	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk11/arch/parisc/kernel/syscall.S	2003-05-01 04:40:13.000000000 -0700
@@ -407,8 +407,7 @@
 	ENTRY_SAME(umount)
 	/* struct sockaddr... */
 	ENTRY_SAME(getpeername)
-	/* This one's a huge ugly mess */
-	ENTRY_DIFF(ioctl)
+	ENTRY_COMP(ioctl)
 	ENTRY_COMP(fcntl)		/* 55 */
 	ENTRY_SAME(socketpair)
 	ENTRY_SAME(setpgid)
diff -urN linux-2.5.68-bk10/arch/ppc/4xx_io/serial_sicc.c linux-2.5.68-bk11/arch/ppc/4xx_io/serial_sicc.c
--- linux-2.5.68-bk10/arch/ppc/4xx_io/serial_sicc.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/4xx_io/serial_sicc.c	2003-05-01 04:40:13.000000000 -0700
@@ -431,11 +431,7 @@
 }
 
 static void
-#ifdef SUPPORT_SYSRQ
 siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs)
-#else
-siccuart_rx_chars(struct SICC_info *info)
-#endif
 {
     struct tty_struct *tty = info->tty;
     unsigned int status, ch, rsr, flg, ignored = 0;
@@ -574,25 +570,19 @@
 }
 
 
-static void siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs)
 {
     struct SICC_info *info = dev_id;
-
-#ifdef SUPPORT_SYSRQ
-            siccuart_rx_chars(info, regs);
-#else
-            siccuart_rx_chars(info);
-#endif
-
-      //powerpcClearUicsrBits(0x00000400);
+    siccuart_rx_chars(info, regs);
+    return IRQ_HANDLED;
 }
 
 
-static void siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
 {
     struct SICC_info *info = dev_id;
     siccuart_tx_chars(info);
-
+    return IRQ_HANDLED;
 }
 
 static void siccuart_tasklet_action(unsigned long data)
diff -urN linux-2.5.68-bk10/arch/ppc/8260_io/enet.c linux-2.5.68-bk11/arch/ppc/8260_io/enet.c
--- linux-2.5.68-bk10/arch/ppc/8260_io/enet.c	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/8260_io/enet.c	2003-05-01 04:40:13.000000000 -0700
@@ -122,7 +122,7 @@
 static int scc_enet_open(struct net_device *dev);
 static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static int scc_enet_rx(struct net_device *dev);
-static void scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
+static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
 static int scc_enet_close(struct net_device *dev);
 static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
@@ -272,7 +272,7 @@
 /* The interrupt handler.
  * This is called from the CPM handler, not the MPC core interrupt.
  */
-static void
+static irqreturn_t
 scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 {
 	struct	net_device *dev = dev_id;
@@ -403,7 +403,7 @@
 		printk("SCC ENET: BSY can't happen.\n");
 	}
 
-	return;
+	return IRQ_HANDLED;
 }
 
 /* During a receive, the cur_rx points to the current incoming buffer.
diff -urN linux-2.5.68-bk10/arch/ppc/8260_io/fcc_enet.c linux-2.5.68-bk11/arch/ppc/8260_io/fcc_enet.c
--- linux-2.5.68-bk10/arch/ppc/8260_io/fcc_enet.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/8260_io/fcc_enet.c	2003-05-01 04:40:13.000000000 -0700
@@ -126,7 +126,7 @@
 static int fcc_enet_open(struct net_device *dev);
 static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
 static int fcc_enet_rx(struct net_device *dev);
-static	void fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs);
+static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *);
 static int fcc_enet_close(struct net_device *dev);
 static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev);
 static void set_multicast_list(struct net_device *dev);
@@ -452,7 +452,7 @@
 }
 
 /* The interrupt handler. */
-static void
+static irqreturn_t
 fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 {
 	struct	net_device *dev = dev_id;
@@ -583,7 +583,7 @@
 	if (int_events & FCC_ENET_BSY) {
 		cep->stats.rx_dropped++;
 	}
-	return;
+	return IRQ_HANDLED;
 }
 
 /* During a receive, the cur_rx points to the current incoming buffer.
@@ -1203,7 +1203,7 @@
 }
 
 /* This interrupt occurs when the PHY detects a link change. */
-static void
+static irqreturn_t
 mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 {
 	struct	net_device *dev = dev_id;
@@ -1211,6 +1211,7 @@
 
 	mii_do_cmd(dev, fep->phy->ack_int);
 	mii_do_cmd(dev, phy_cmd_relink);  /* restart and display status */
+	return IRQ_HANDLED;
 }
 
 #endif	/* CONFIG_USE_MDIO */
diff -urN linux-2.5.68-bk10/arch/ppc/8260_io/uart.c linux-2.5.68-bk11/arch/ppc/8260_io/uart.c
--- linux-2.5.68-bk10/arch/ppc/8260_io/uart.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/8260_io/uart.c	2003-05-01 04:40:13.000000000 -0700
@@ -570,7 +570,7 @@
 /*
  * This is the serial driver's interrupt routine for a single port
  */
-static void rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
+static irqreturn_t rs_8xx_interrupt(int irq, void * dev_id, struct pt_regs * regs)
 {
 	u_char	events;
 	int	idx;
@@ -610,6 +610,7 @@
 #ifdef SERIAL_DEBUG_INTR
 	printk("end.\n");
 #endif
+	return IRQ_HANDLED;
 }
 
 
diff -urN linux-2.5.68-bk10/arch/ppc/amiga/amiints.c linux-2.5.68-bk11/arch/ppc/amiga/amiints.c
--- linux-2.5.68-bk10/arch/ppc/amiga/amiints.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/amiga/amiints.c	2003-05-01 04:40:13.000000000 -0700
@@ -55,10 +55,6 @@
 #include <asm/amigappc.h>
 #endif
 
-extern int cia_request_irq(int irq,
-                           void (*handler)(int, void *, struct pt_regs *),
-                           unsigned long flags, const char *devname, void *dev_id);
-extern void cia_free_irq(unsigned int irq, void *dev_id);
 extern void cia_init_IRQ(struct ciabase *base);
 
 unsigned short ami_intena_vals[AMI_STD_IRQS] = {
diff -urN linux-2.5.68-bk10/arch/ppc/amiga/config.c linux-2.5.68-bk11/arch/ppc/amiga/config.c
--- linux-2.5.68-bk10/arch/ppc/amiga/config.c	2003-04-19 19:50:44.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/amiga/config.c	2003-05-01 04:40:13.000000000 -0700
@@ -71,7 +71,7 @@
 
 extern char m68k_debug_device[];
 
-static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *));
+static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *));
 /* amiga specific irq functions */
 extern void amiga_init_IRQ (void);
 extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
@@ -478,8 +478,8 @@
 
 static unsigned short jiffy_ticks;
 
-static void __init amiga_sched_init(void (*timer_routine)(int, void *,
-							  struct pt_regs *))
+static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *,
+						struct pt_regs *))
 {
 	static struct resource sched_res = {
 	    "timer", 0x00bfd400, 0x00bfd5ff,
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/cpu_setup_6xx.S linux-2.5.68-bk11/arch/ppc/kernel/cpu_setup_6xx.S
--- linux-2.5.68-bk10/arch/ppc/kernel/cpu_setup_6xx.S	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/cpu_setup_6xx.S	2003-05-01 04:40:13.000000000 -0700
@@ -16,6 +16,7 @@
 #include <asm/cputable.h>
 #include <asm/ppc_asm.h>
 #include <asm/offsets.h>
+#include <asm/cache.h>
 
 _GLOBAL(__setup_cpu_601)
 	blr
@@ -63,13 +64,7 @@
 	mtspr	SPRN_L2CR2,r3
 	mtlr	r4
 	blr
-_GLOBAL(__setup_cpu_7450)
-	mflr	r4
-	bl	setup_common_caches
-	bl	setup_745x_specifics
-	mtlr	r4
-	blr
-_GLOBAL(__setup_cpu_7455)
+_GLOBAL(__setup_cpu_745x)
 	mflr	r4
 	bl	setup_common_caches
 	bl	setup_745x_specifics
@@ -265,9 +260,10 @@
 #define CS_SIZE		28
 
 	.data
-	.balign	4
+	.balign	L1_CACHE_LINE_SIZE
 cpu_state_storage:	
 	.space	CS_SIZE
+	.balign	L1_CACHE_LINE_SIZE,0
 	.text
 	
 /* Called in normal context to backup CPU 0 state. This
@@ -277,6 +273,9 @@
  * like HID0, HID1, MSSCR0, etc...
  */
 _GLOBAL(__save_cpu_setup)
+	/* Some CR fields are volatile, we back it up all */
+	mfcr	r7
+
 	/* Get storage ptr */
 	lis	r5,cpu_state_storage@h
 	ori	r5,r5,cpu_state_storage@l
@@ -322,6 +321,7 @@
 	mfspr	r4,SPRN_HID1
 	stw	r4,CS_HID1(r5)
 1:
+	mtcr	r7
 	blr
 
 /* Called with no MMU context (typically MSR:IR/DR off) to
@@ -329,6 +329,9 @@
  * function. This does not include cache setting
  */
 _GLOBAL(__restore_cpu_setup)
+	/* Some CR fields are volatile, we back it up all */
+	mfcr	r7
+
 	/* Get storage ptr */
 	lis	r5,(cpu_state_storage-KERNELBASE)@h
 	ori	r5,r5,cpu_state_storage@l
@@ -411,5 +414,6 @@
 	/* Setup final PLL */
 	mtspr	SPRN_HID1,r4
 1:
+	mtcr	r7
 	blr
 
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/cputable.c linux-2.5.68-bk11/arch/ppc/kernel/cputable.c
--- linux-2.5.68-bk10/arch/ppc/kernel/cputable.c	2003-04-19 19:49:51.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/cputable.c	2003-05-01 04:40:13.000000000 -0700
@@ -26,8 +26,7 @@
 extern void __setup_cpu_750fx(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 extern void __setup_cpu_7400(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 extern void __setup_cpu_7410(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
-extern void __setup_cpu_7450(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
-extern void __setup_cpu_7455(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
+extern void __setup_cpu_745x(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 extern void __setup_cpu_8xx(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
 extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
@@ -168,7 +167,7 @@
     	0xffff0000, 0x70000000, "750FX",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB |
 	CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP |
-	CPU_FTR_DUAL_PLL_750FX,
+	CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS,
 	COMMON_PPC,
 	32, 32,
 	__setup_cpu_750fx
@@ -216,7 +215,7 @@
 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7450
+	__setup_cpu_745x
     },
     {	/* 7450 2.1 */
     	0xffffffff, 0x80000201, "7450",
@@ -226,7 +225,7 @@
 	CPU_FTR_L3_DISABLE_NAP,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7450
+	__setup_cpu_745x
     },
     {	/* 7450 2.3 and newer */
     	0xffff0000, 0x80000000, "7450",
@@ -235,35 +234,46 @@
 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7450
+	__setup_cpu_745x
     },
     {	/* 7455 rev 1.x */
     	0xffffff00, 0x80010100, "7455",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
-	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450,
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7455
+	__setup_cpu_745x
     },
     {	/* 7455 rev 2.0 */
     	0xffffffff, 0x80010200, "7455",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
 	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
-	CPU_FTR_L3_DISABLE_NAP,
+	CPU_FTR_L3_DISABLE_NAP | CPU_FTR_HAS_HIGH_BATS,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7455
+	__setup_cpu_745x
     },
     {	/* 7455 others */
     	0xffff0000, 0x80010000, "7455",
     	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
 	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
-	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR,
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+	CPU_FTR_HAS_HIGH_BATS,
+	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
+	32, 32,
+	__setup_cpu_745x
+    },
+    {	/* 7457 */
+    	0xffff0000, 0x80020000, "7457",
+    	CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
+	CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR |
+	CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
+	CPU_FTR_HAS_HIGH_BATS,
 	COMMON_PPC | PPC_FEATURE_HAS_ALTIVEC,
 	32, 32,
-	__setup_cpu_7455
+	__setup_cpu_745x
     },
     {	/* 82xx (8240, 8245, 8260 are all 603e cores) */
 	0x7fff0000, 0x00810000, "82xx",
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/head.S linux-2.5.68-bk11/arch/ppc/kernel/head.S
--- linux-2.5.68-bk10/arch/ppc/kernel/head.S	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/head.S	2003-05-01 04:40:13.000000000 -0700
@@ -1451,6 +1451,30 @@
 	mtspr	IBAT2L,r10
 	mtspr	IBAT3U,r10
 	mtspr	IBAT3L,r10
+BEGIN_FTR_SECTION
+	/* Here's a tweak: at this point, CPU setup have
+	 * not been called yet, so HIGH_BAT_EN may not be
+	 * set in HID0 for the 745x processors. However, it
+	 * seems that doesn't affect our ability to actually
+	 * write to these SPRs.
+	 */
+	mtspr	SPRN_DBAT4U,r20
+	mtspr	SPRN_DBAT4L,r20
+	mtspr	SPRN_DBAT5U,r20
+	mtspr	SPRN_DBAT5L,r20
+	mtspr	SPRN_DBAT6U,r20
+	mtspr	SPRN_DBAT6L,r20
+	mtspr	SPRN_DBAT7U,r20
+	mtspr	SPRN_DBAT7L,r20
+	mtspr	SPRN_IBAT4U,r20
+	mtspr	SPRN_IBAT4L,r20
+	mtspr	SPRN_IBAT5U,r20
+	mtspr	SPRN_IBAT5L,r20
+	mtspr	SPRN_IBAT6U,r20
+	mtspr	SPRN_IBAT6L,r20
+	mtspr	SPRN_IBAT7U,r20
+	mtspr	SPRN_IBAT7L,r20
+END_FTR_SECTION_IFSET(CPU_FTR_HAS_HIGH_BATS)
 	blr
 
 flush_tlbs:
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/irq.c linux-2.5.68-bk11/arch/ppc/kernel/irq.c
--- linux-2.5.68-bk10/arch/ppc/kernel/irq.c	2003-04-19 19:50:40.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/irq.c	2003-05-01 04:40:13.000000000 -0700
@@ -210,7 +210,8 @@
 	return;
 }
 
-int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
+int request_irq(unsigned int irq,
+	irqreturn_t (*handler)(int, void *, struct pt_regs *),
 	unsigned long irqflags, const char * devname, void *dev_id)
 {
 	struct irqaction *action;
@@ -218,16 +219,9 @@
 
 	if (irq >= NR_IRQS)
 		return -EINVAL;
-	if (!handler)
-	{
-		/*
-		 * free_irq() used to be implemented as a call to
-		 * request_irq() with handler being NULL.  Now we have
-		 * a real free_irq() but need to allow the old behavior
-		 * for old code that hasn't caught up yet.
-		 *  -- Cort <cort@fsmlabs.com>
-		 */
-		free_irq(irq, dev_id);
+	if (!handler) {
+		printk(KERN_ERR "request_irq called with NULL handler!\n");
+		dump_stack();
 		return 0;
 	}
 	
@@ -246,8 +240,7 @@
 	action->next = NULL;
 	
 	retval = setup_irq(irq, action);
-	if (retval)
-	{
+	if (retval) {
 		kfree(action);
 		return retval;
 	}
@@ -732,6 +725,7 @@
 	}
 }
 
-void no_action(int irq, void *dev, struct pt_regs *regs)
+irqreturn_t no_action(int irq, void *dev, struct pt_regs *regs)
 {
+	return IRQ_NONE;
 }
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/l2cr.S linux-2.5.68-bk11/arch/ppc/kernel/l2cr.S
--- linux-2.5.68-bk10/arch/ppc/kernel/l2cr.S	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/l2cr.S	2003-05-01 04:40:13.000000000 -0700
@@ -40,9 +40,11 @@
 	Author:	Terry Greeniaus (tgree@phys.ualberta.ca)
 	Please e-mail updates to this file to me, thanks!
 */
+#include <linux/config.h>
 #include <asm/processor.h>
 #include <asm/cputable.h>
 #include <asm/ppc_asm.h>
+#include <asm/cache.h>
 
 /* Usage:
 	
@@ -101,6 +103,8 @@
 	blr
 END_FTR_SECTION_IFCLR(CPU_FTR_L2CR)
 
+	mflr	r9
+	
 	/* Stop DST streams */
 BEGIN_FTR_SECTION
 	DSSALL
@@ -115,6 +119,22 @@
 	mtmsr	r4
 	isync
 
+	/* Before we perform the global invalidation, we must disable dynamic
+	 * power management via HID0[DPM] to work around a processor bug where
+	 * DPM can possibly interfere with the state machine in the processor
+	 * that invalidates the L2 cache tags.
+	 */
+	mfspr	r8,HID0			/* Save HID0 in r8 */
+	rlwinm	r4,r8,0,12,10		/* Turn off HID0[DPM] */
+	sync
+	mtspr	HID0,r4			/* Disable DPM */
+	sync
+
+	/* Flush & disable L1 */
+	mr	r5,r3
+	bl	__flush_disable_L1
+	mr	r3,r5
+	
 	/* Get the current enable bit of the L2CR into r4 */
 	mfspr	r4,L2CR
 	
@@ -136,27 +156,28 @@
 	 /**** Might be a good idea to set L2DO here - to prevent instructions
 	       from getting into the cache.  But since we invalidate
 	       the next time we enable the cache it doesn't really matter.
-	       Don't do this unless you accommodate all processor variations.
+	       Don't do this unless you accomodate all processor variations.
 	       The bit moved on the 7450.....
 	  ****/
 
 	/* TODO: use HW flush assist when available */
 
-	lis	r4,0x0004
+	lis	r4,0x0002
 	mtctr	r4
 	li	r4,0
 1:
 	lwzx	r0,r0,r4
 	addi	r4,r4,32		/* Go to start of next cache line */
 	bdnz	1b
+	isync
 	
 	/* Now, flush the first 4MB of memory */
-	lis	r4,0x0004
+	lis	r4,0x0002
 	mtctr	r4
 	li	r4,0
 	sync
 1:
-	dcbf	r0,r4
+	dcbf	0,r4
 	addi	r4,r4,32		/* Go to start of next cache line */
 	bdnz	1b
 
@@ -166,25 +187,19 @@
 	 * L1 icache
 	 */
 	b	20f
-21:
+	.balign	L1_CACHE_LINE_SIZE
+22:
 	sync
 	mtspr	L2CR,r3
 	sync
-	b	22f
+	b	23f
 20:
-	b	21b
-22:
-	/* Before we perform the global invalidation, we must disable dynamic
-	 * power management via HID0[DPM] to work around a processor bug where
-	 * DPM can possibly interfere with the state machine in the processor
-	 * that invalidates the L2 cache tags.
-	 */
-	mfspr	r8,HID0			/* Save HID0 in r8 */
-	rlwinm	r4,r8,0,12,10		/* Turn off HID0[DPM] */
-	sync
-	mtspr	HID0,r4			/* Disable DPM */
-	sync
-
+	b	21f
+21:	sync
+	isync
+	b	22b
+		
+23:
 	/* Perform a global invalidation */
 	oris	r3,r3,0x0020
 	sync
@@ -211,11 +226,6 @@
 	mtspr	L2CR,r3
 	sync
 	
-	/* Restore HID0[DPM] to whatever it was before */
-	sync
-	mtspr	1008,r8
-	sync
-
 	/* See if we need to enable the cache */
 	cmplwi	r5,0
 	beq	4f
@@ -225,10 +235,20 @@
 	mtspr	L2CR,r3
 	sync
 
+4:
+	bl	__inval_enable_L1
+
+	/* Restore HID0[DPM] to whatever it was before */
+	sync
+	mtspr	1008,r8
+	sync
+
 	/* Restore MSR (restores EE and DR bits to original state) */
-4:	SYNC
+	SYNC
 	mtmsr	r7
 	isync
+
+	mtlr	r9
 	blr
 
 _GLOBAL(_get_L2CR)
@@ -286,7 +306,7 @@
 	li	r4,0
 1:
 	lwzx	r0,r0,r4
-	dcbf	r0,r4
+	dcbf	0,r4
 	addi	r4,r4,32		/* Go to start of next cache line */
 	bdnz	1b
 	
@@ -360,3 +380,73 @@
 
 /* --- End of PowerLogix code ---
  */
+
+
+/* flush_disable_L1()	- Flush and disable L1 cache
+ *
+ * clobbers r0, r3, ctr, cr0
+ *
+ */
+ 	.globl	__flush_disable_L1
+ __flush_disable_L1:
+ 
+	/* Stop pending alitvec streams and memory accesses */
+BEGIN_FTR_SECTION
+	DSSALL
+END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+ 	sync
+ 	
+	/* Load counter to 0x1000 cache lines (128k) and
+	 * load cache with datas
+	 */
+	lis	r3,0x0002
+//	li	r3,0x1000	/* 128kB / 32B */
+	mtctr	r3
+	li	r3, 0
+1:
+	lwz	r0,0(r3)
+	addi	r3,r3,0x0020	/* Go to start of next cache line */
+	bdnz	1b
+	isync
+	sync
+
+	/* Now flush those cache lines */
+	lis	r3,0x0002
+//	li	r3,0x1000	/* 128kB / 32B */
+	mtctr	r3
+	li	r3, 0
+1:
+	dcbf	0,r3
+	addi	r3,r3,0x0020	/* Go to start of next cache line */
+	bdnz	1b
+	sync
+
+	/* We can now disable the L1 cache (HID0:DCE, HID0:ICE) */
+	mfspr	r3,SPRN_HID0
+	rlwinm	r3,r3,0,18,15
+	mtspr	SPRN_HID0,r3
+	sync
+	isync	
+ 	blr
+
+/* inval_enable_L1	- Invalidate and enable L1 cache
+ *
+ * Assumes L1 is already disabled and MSR:EE is off
+ *
+ * clobbers r3
+ */
+ 	.globl	__inval_enable_L1
+ __inval_enable_L1:
+	/* Enable and then Flash inval the instruction & data cache */
+	mfspr	r3,SPRN_HID0
+	ori	r3,r3, HID0_ICE|HID0_ICFI|HID0_DCE|HID0_DCI
+	sync
+	isync
+	mtspr	SPRN_HID0,r3
+	xori	r3,r3, HID0_ICFI|HID0_DCI
+	mtspr	SPRN_HID0,r3
+	sync
+
+ 	blr
+
+ 
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/ppc_ksyms.c linux-2.5.68-bk11/arch/ppc/kernel/ppc_ksyms.c
--- linux-2.5.68-bk10/arch/ppc/kernel/ppc_ksyms.c	2003-04-19 19:50:49.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/ppc_ksyms.c	2003-05-01 04:40:13.000000000 -0700
@@ -46,6 +46,7 @@
 #include <asm/cputable.h>
 #include <asm/btext.h>
 #include <asm/div64.h>
+#include <asm/xmon.h>
 
 #ifdef  CONFIG_8xx
 #include <asm/commproc.h>
@@ -306,7 +307,6 @@
 EXPORT_SYMBOL(get_wchan);
 EXPORT_SYMBOL(console_drivers);
 #ifdef CONFIG_XMON
-extern void xmon_printf(char *fmt, ...);
 EXPORT_SYMBOL(xmon);
 EXPORT_SYMBOL(xmon_printf);
 #endif
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/setup.c linux-2.5.68-bk11/arch/ppc/kernel/setup.c
--- linux-2.5.68-bk10/arch/ppc/kernel/setup.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/setup.c	2003-05-01 04:40:13.000000000 -0700
@@ -34,6 +34,7 @@
 #include <asm/system.h>
 #include <asm/pmac_feature.h>
 #include <asm/sections.h>
+#include <asm/xmon.h>
 
 #if defined CONFIG_KGDB
 #include <asm/kgdb.h>
@@ -46,9 +47,6 @@
 extern void do_cpu_ftr_fixups(unsigned long offset);
 extern void reloc_got2(unsigned long offset);
 
-#ifdef CONFIG_XMON
-extern void xmon_map_scc(void);
-#endif
 
 #ifdef CONFIG_KGDB
 extern void kgdb_map_scc(void);
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/smp.c linux-2.5.68-bk11/arch/ppc/kernel/smp.c
--- linux-2.5.68-bk10/arch/ppc/kernel/smp.c	2003-04-19 19:51:10.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/smp.c	2003-05-01 04:40:13.000000000 -0700
@@ -35,6 +35,7 @@
 #include <asm/time.h>
 #include <asm/thread_info.h>
 #include <asm/tlbflush.h>
+#include <asm/xmon.h>
 
 int smp_threads_ready;
 volatile int smp_commenced;
diff -urN linux-2.5.68-bk10/arch/ppc/kernel/traps.c linux-2.5.68-bk11/arch/ppc/kernel/traps.c
--- linux-2.5.68-bk10/arch/ppc/kernel/traps.c	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/kernel/traps.c	2003-05-01 04:40:13.000000000 -0700
@@ -36,6 +36,7 @@
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/processor.h>
+#include <asm/xmon.h>
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
 #endif
@@ -44,15 +45,6 @@
 extern void bad_page_fault(struct pt_regs *, unsigned long, int sig);
 
 #ifdef CONFIG_XMON
-extern void xmon(struct pt_regs *regs);
-extern int xmon_bpt(struct pt_regs *regs);
-extern int xmon_sstep(struct pt_regs *regs);
-extern int xmon_iabr_match(struct pt_regs *regs);
-extern int xmon_dabr_match(struct pt_regs *regs);
-extern void (*xmon_fault_handler)(struct pt_regs *regs);
-#endif
-
-#ifdef CONFIG_XMON
 void (*debugger)(struct pt_regs *regs) = xmon;
 int (*debugger_bpt)(struct pt_regs *regs) = xmon_bpt;
 int (*debugger_sstep)(struct pt_regs *regs) = xmon_sstep;
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood.h linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood.h
--- linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood.h	2003-04-19 19:51:23.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood.h	2003-05-01 04:40:13.000000000 -0700
@@ -49,7 +49,7 @@
 #define _ISA_MEM_BASE	0
 #define PCI_DRAM_OFFSET	0
 
-#define BASE_BAUD		1312500
+#define BASE_BAUD		(378000000 / 18 / 16)
 
 #define PPC4xx_MACHINE_NAME	"IBM Redwood"
 
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood5.h linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood5.h
--- linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood5.h	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood5.h	2003-05-01 04:40:13.000000000 -0700
@@ -45,9 +45,7 @@
 #define _ISA_MEM_BASE	0
 #define PCI_DRAM_OFFSET	0
 
-/* serail defines moved from ppc4xx_serial.h *
- */
-#define BASE_BAUD		1267200
+#define BASE_BAUD		(378000000 / 18 / 16)
 
 #define PPC4xx_MACHINE_NAME	"IBM Redwood5"
 
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood6.h linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood6.h
--- linux-2.5.68-bk10/arch/ppc/platforms/4xx/redwood6.h	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/4xx/redwood6.h	2003-05-01 04:40:13.000000000 -0700
@@ -46,7 +46,7 @@
 #define _ISA_MEM_BASE	0
 #define PCI_DRAM_OFFSET	0
 
-#define BASE_BAUD		1267200
+#define BASE_BAUD		(378000000 / 18 / 16)
 
 #define PPC4xx_MACHINE_NAME	"IBM Redwood6"
 
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/chrp_setup.c linux-2.5.68-bk11/arch/ppc/platforms/chrp_setup.c
--- linux-2.5.68-bk10/arch/ppc/platforms/chrp_setup.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/chrp_setup.c	2003-05-01 04:40:13.000000000 -0700
@@ -36,6 +36,7 @@
 #include <linux/console.h>
 #include <linux/seq_file.h>
 #include <linux/root_dev.h>
+#include <linux/initrd.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -52,6 +53,7 @@
 #include <asm/btext.h>
 #include <asm/i8259.h>
 #include <asm/open_pic.h>
+#include <asm/xmon.h>
 
 unsigned long chrp_get_rtc_time(void);
 int chrp_set_rtc_time(unsigned long nowtime);
@@ -67,6 +69,13 @@
 extern unsigned long pmac_find_end_of_memory(void);
 extern int of_show_percpuinfo(struct seq_file *, int);
 
+/*
+ * XXX this should be in xmon.h, but putting it there means xmon.h
+ * has to include <linux/interrupt.h> (to get irqreturn_t), which
+ * causes all sorts of problems.  -- paulus
+ */ 
+extern irqreturn_t xmon_irq(int, void *, struct pt_regs *);
+
 extern dev_t boot_dev;
 
 extern PTE *Hash, *Hash_end;
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/pmac_cpufreq.c linux-2.5.68-bk11/arch/ppc/platforms/pmac_cpufreq.c
--- linux-2.5.68-bk10/arch/ppc/platforms/pmac_cpufreq.c	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/pmac_cpufreq.c	2003-05-01 04:40:13.000000000 -0700
@@ -262,13 +262,19 @@
 		goto out;
 	cur_freq = (*value) / 1000;
 
-	/* Check for tibook 800Mhz or 1Ghz */
-	if (machine_is_compatible("PowerBook3,4") || machine_is_compatible("PowerBook3,5")) {
+	/* Check for newer machines */
+	if (machine_is_compatible("PowerBook3,4") ||
+	    machine_is_compatible("PowerBook3,5") ||
+	    machine_is_compatible("MacRISC3")) {
 		value = (u32 *)get_property(cpunode, "min-clock-frequency", NULL);
 		if (!value)
 			goto out;
 		low_freq = (*value) / 1000;
-
+		/* The PowerBook G4 12" (PowerBook6,1) has an error in the device-tree
+		 * here */
+		if (low_freq < 100000)
+			low_freq *= 10;
+		
 		value = (u32 *)get_property(cpunode, "max-clock-frequency", NULL);
 		if (!value)
 			goto out;
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/pmac_feature.c linux-2.5.68-bk11/arch/ppc/platforms/pmac_feature.c
--- linux-2.5.68-bk10/arch/ppc/platforms/pmac_feature.c	2003-04-19 19:50:50.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/pmac_feature.c	2003-05-01 04:40:13.000000000 -0700
@@ -52,8 +52,8 @@
 #endif
 
 /* Exported from arch/ppc/kernel/idle.c */
-extern int powersave_nap;
 extern int powersave_lowspeed;
+extern int powersave_nap;
 
 /*
  * We use a single global lock to protect accesses. Each driver has
@@ -1894,10 +1894,22 @@
 		PMAC_TYPE_RACKMAC,		rackmac_features,
 		0,
 	},
+	{	"RackMac1,2",			"XServe rev. 2",
+		PMAC_TYPE_RACKMAC,		rackmac_features,
+		0,
+	},
 	{	"PowerMac3,6",			"PowerMac G4 Windtunnel",
 		PMAC_TYPE_WINDTUNNEL,		rackmac_features,
 		0,
 	},
+	{	"PowerBook5,1",			"PowerBook G4 17\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
+	{	"PowerBook6,1",			"PowerBook G4 12\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
 };
 
 /*
@@ -1994,8 +2006,8 @@
 	    	pmac_mb.features = pangea_features;
 		break;
 	    case macio_intrepid:
-		pmac_mb.model_id = PMAC_TYPE_UNKNOWN_PANGEA;
-		pmac_mb.model_name = "Unknown Pangea-based";
+		pmac_mb.model_id = PMAC_TYPE_UNKNOWN_INTREPID;
+		pmac_mb.model_name = "Unknown Intrepid-based";
 	    	pmac_mb.features = intrepid_features;
 	    	break;
 	    default:
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/pmac_pic.c linux-2.5.68-bk11/arch/ppc/platforms/pmac_pic.c
--- linux-2.5.68-bk10/arch/ppc/platforms/pmac_pic.c	2003-04-19 19:50:47.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/pmac_pic.c	2003-05-01 04:40:13.000000000 -0700
@@ -30,9 +30,17 @@
 #include <asm/pci-bridge.h>
 #include <asm/time.h>
 #include <asm/open_pic.h>
+#include <asm/xmon.h>
 
 #include "pmac_pic.h"
 
+/*
+ * XXX this should be in xmon.h, but putting it there means xmon.h
+ * has to include <linux/interrupt.h> (to get irqreturn_t), which
+ * causes all sorts of problems.  -- paulus
+ */ 
+extern irqreturn_t xmon_irq(int, void *, struct pt_regs *);
+
 struct pmac_irq_hw {
         unsigned int    event;
         unsigned int    enable;
@@ -177,7 +185,7 @@
 	NULL
 };
 
-static void gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
+static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
 {
 	int irq, bits;
 	
@@ -190,16 +198,11 @@
 		if (bits == 0)
 			continue;
 		irq += __ilog2(bits);
-		break;
+		ppc_irq_dispatch_handler(regs, irq);
+		return IRQ_HANDLED;
 	}
-	/* The previous version of this code allowed for this case, we
-	 * don't.  Put this here to check for it.
-	 * -- Cort
-	 */
-	if ( irq_desc[irq].handler != &gatwick_pic )
-		printk("gatwick irq not from gatwick pic\n");
-	else
-		ppc_irq_dispatch_handler( regs, irq );
+	printk("gatwick irq not from gatwick pic\n");
+	return IRQ_NONE;
 }
 
 int
@@ -393,7 +396,7 @@
 					nmi_irq = pswitch->intrs[0].line;
 					openpic_init_nmi_irq(nmi_irq);
 					request_irq(nmi_irq, xmon_irq, 0,
-							"NMI - XMON", 0);
+						    "NMI - XMON", 0);
 				}
 			}
 #endif	/* CONFIG_XMON */
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/pmac_sleep.S linux-2.5.68-bk11/arch/ppc/platforms/pmac_sleep.S
--- linux-2.5.68-bk10/arch/ppc/platforms/pmac_sleep.S	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/pmac_sleep.S	2003-05-01 04:40:13.000000000 -0700
@@ -15,6 +15,7 @@
 #include <asm/page.h>
 #include <asm/ppc_asm.h>
 #include <asm/cputable.h>
+#include <asm/cache.h>
 #include <asm/thread_info.h>
 #include <asm/offsets.h>
 
@@ -157,33 +158,22 @@
 	addi r3,r3,sleep_storage@l
 	stw r5,0(r3)
 
-BEGIN_FTR_SECTION
-	DSSALL
+	/* Disable DPM during cache flush */
+	mfspr	r3, SPRN_HID0
+	rlwinm	r3,r3,0,12,10
 	sync
-END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-
-/*
- * Flush the L1 data cache by reading the first 128kB of RAM
- * and then flushing the same area with the dcbf instruction.
- * The L2 cache has already been disabled.
- */
-	li	r4,0x1000	/* 128kB / 32B */
-	mtctr	r4
-	lis	r4,KERNELBASE@h
-1:
-	lwz	r0,0(r4)
-	addi	r4,r4,0x0020	/* Go to start of next cache line */
-	bdnz	1b
+	mtspr	SPRN_HID0,r3
 	sync
 	
-	li	r4,0x1000	/* 128kB / 32B */
-	mtctr	r4
-	lis	r4,KERNELBASE@h
-1:
-	dcbf	r0,r4
-	addi	r4,r4,0x0020	/* Go to start of next cache line */
-	bdnz	1b
+	/* Turn off data relocation. */
+	mfmsr	r3		/* Save MSR in r7 */
+	rlwinm	r3,r3,0,28,26	/* Turn off DR bit */
 	sync
+	mtmsr	r3
+	isync
+
+	/* Flush & disable L1 cache */
+	bl	__flush_disable_L1
 
 /*
  * Set the HID0 and MSR for sleep.
@@ -192,6 +182,7 @@
 	rlwinm	r2,r2,0,10,7	/* clear doze, nap */
 	oris	r2,r2,HID0_SLEEP@h
 	sync
+	isync
 	mtspr	HID0,r2
 	sync
 
@@ -252,16 +243,11 @@
  */
 	
 grackle_wake_up:
-	/* Enable and then Flash inval the instruction & data cache */
-	mfspr	r3,HID0
-	ori	r3,r3, HID0_ICE|HID0_ICFI|HID0_DCE|HID0_DCI
-	sync
-	isync
-	mtspr	HID0,r3
-	xori	r3,r3, HID0_ICFI|HID0_DCI
-	mtspr	HID0,r3
-	sync
-	
+	/* Invalidate & enable L1 cache, we don't care about
+	 * whatever the ROM may have tried to write to memory
+	 */
+	bl	__inval_enable_L1
+
 	/* Restore the kernel's segment registers before
 	 * we do any r1 memory access as we are not sure they
 	 * are in a sane state above the first 256Mb region
@@ -274,6 +260,8 @@
 	addi	r3,r3,0x111	/* increment VSID */
 	addis	r4,r4,0x1000	/* address of next segment */
 	bdnz	3b
+	sync
+	isync
 	
 	subi	r1,r1,SL_PC
 
@@ -325,6 +313,26 @@
 	lwz	r4,SL_IBAT3+4(r1)
 	mtibatl	3,r4
 
+BEGIN_FTR_SECTION
+	li	r4,0
+	mtspr	SPRN_DBAT4U,r4
+	mtspr	SPRN_DBAT4L,r4
+	mtspr	SPRN_DBAT5U,r4
+	mtspr	SPRN_DBAT5L,r4
+	mtspr	SPRN_DBAT6U,r4
+	mtspr	SPRN_DBAT6L,r4
+	mtspr	SPRN_DBAT7U,r4
+	mtspr	SPRN_DBAT7L,r4
+	mtspr	SPRN_IBAT4U,r4
+	mtspr	SPRN_IBAT4L,r4
+	mtspr	SPRN_IBAT5U,r4
+	mtspr	SPRN_IBAT5L,r4
+	mtspr	SPRN_IBAT6U,r4
+	mtspr	SPRN_IBAT6L,r4
+	mtspr	SPRN_IBAT7U,r4
+	mtspr	SPRN_IBAT7L,r4
+END_FTR_SECTION_IFSET(CPU_FTR_HAS_HIGH_BATS)
+
 	/* Flush all TLBs */
 	lis	r4,0x1000
 1:	addic.	r4,r4,-0x1000
@@ -368,8 +376,9 @@
 
 #endif /* defined(CONFIG_PMAC_PBOOK) || defined(CONFIG_CPU_FREQ) */
 
-
-	.data
-	.globl sleep_storage
+	.section .data
+	.balign	L1_CACHE_LINE_SIZE
 sleep_storage:
 	.long 0
+	.balign	L1_CACHE_LINE_SIZE, 0
+	.section .text
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/pmac_smp.c linux-2.5.68-bk11/arch/ppc/platforms/pmac_smp.c
--- linux-2.5.68-bk10/arch/ppc/platforms/pmac_smp.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/pmac_smp.c	2003-05-01 04:40:13.000000000 -0700
@@ -3,6 +3,12 @@
  *
  * We support both the old "powersurge" SMP architecture
  * and the current Core99 (G4 PowerMac) machines.
+ * 
+ * Note that we don't support the very first rev. of
+ * Apple/DayStar 2 CPUs board, the one with the funky
+ * watchdog. Hopefully, none of these should be there except
+ * maybe internally to Apple. I should probably still add some
+ * code to detect this card though and disable SMP. --BenH.
  *
  * Support Macintosh G4 SMP by Troy Benjegerdes (hozer@drgw.net)
  * and Ben Herrenschmidt <benh@kernel.crashing.org>.
@@ -92,25 +98,22 @@
 static volatile u8 *psurge_sec_intr;
 static volatile u32 *psurge_start;
 
-/* what sort of powersurge board we have */
-static int psurge_type;
-
 /* values for psurge_type */
+#define PSURGE_NONE		-1
 #define PSURGE_DUAL		0
 #define PSURGE_QUAD_OKEE	1
 #define PSURGE_QUAD_COTTON	2
 #define PSURGE_QUAD_ICEGRASS	3
 
+/* what sort of powersurge board we have */
+static int psurge_type = PSURGE_NONE;
+
 volatile static long int core99_l2_cache;
 volatile static long int core99_l3_cache;
 
 static void __init
 core99_init_caches(int cpu)
 {
-	/* Check cache presence on cpu 0, we assume all CPUs have
-	 * same features here. We also assume that if we don't have
-	 * L2CR, we don't have L3CR neither
-	 */
 	if (!(cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR))
 		return;
 
@@ -143,6 +146,8 @@
  */
 static inline void psurge_set_ipi(int cpu)
 {
+	if (psurge_type == PSURGE_NONE)
+		return;
 	if (cpu == 0)
 		in_be32(psurge_pri_intr);
 	else if (psurge_type == PSURGE_DUAL)
@@ -154,10 +159,14 @@
 static inline void psurge_clr_ipi(int cpu)
 {
 	if (cpu > 0) {
-		if (psurge_type == PSURGE_DUAL)
+		switch(psurge_type) {
+		case PSURGE_DUAL:
 			out_8(psurge_sec_intr, ~0);
-		else
+		case PSURGE_NONE:
+			break;
+		default:
 			PSURGE_QUAD_OUT(PSURGE_QUAD_IRQ_CLR, 1 << cpu);
+		}
 	}
 }
 
@@ -189,10 +198,11 @@
 			smp_message_recv(msg, regs);
 }
 
-void __pmac
+irqreturn_t __pmac
 psurge_primary_intr(int irq, void *d, struct pt_regs *regs)
 {
 	psurge_smp_message_recv(regs);
+	return IRQ_HANDLED;
 }
 
 static void __pmac
@@ -311,6 +321,7 @@
 		if ((in_8(hhead_base + HHEAD_CONFIG) & 0x02) == 0) {
 			/* not a dual-cpu card */
 			iounmap((void *) hhead_base);
+			psurge_type = PSURGE_NONE;
 			return 1;
 		}
 		ncpus = 2;
diff -urN linux-2.5.68-bk10/arch/ppc/platforms/prep_setup.c linux-2.5.68-bk11/arch/ppc/platforms/prep_setup.c
--- linux-2.5.68-bk10/arch/ppc/platforms/prep_setup.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/platforms/prep_setup.c	2003-05-01 04:40:13.000000000 -0700
@@ -850,7 +850,7 @@
 static volatile int calibrate_steps __initdata = 3;
 static unsigned tbstamp __initdata = 0;
 
-static void __init
+static irqreturn_t __init
 prep_calibrate_decr_handler(int irq, void *dev, struct pt_regs *regs)
 {
 	unsigned long t, freq;
@@ -866,6 +866,7 @@
 		tb_ticks_per_jiffy = freq / HZ;
 		tb_to_us = mulhwu_scale_factor(freq, 1000000);
 	}
+	return IRQ_HANDLED;
 }
 
 static void __init
diff -urN linux-2.5.68-bk10/arch/ppc/syslib/m8xx_setup.c linux-2.5.68-bk11/arch/ppc/syslib/m8xx_setup.c
--- linux-2.5.68-bk10/arch/ppc/syslib/m8xx_setup.c	2003-05-01 04:39:59.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/syslib/m8xx_setup.c	2003-05-01 04:40:13.000000000 -0700
@@ -44,6 +44,7 @@
 #include <asm/machdep.h>
 #include <asm/bootinfo.h>
 #include <asm/time.h>
+#include <asm/xmon.h>
 
 #include "ppc8xx_pic.h"
 
diff -urN linux-2.5.68-bk10/arch/ppc/syslib/open_pic.c linux-2.5.68-bk11/arch/ppc/syslib/open_pic.c
--- linux-2.5.68-bk10/arch/ppc/syslib/open_pic.c	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/syslib/open_pic.c	2003-05-01 04:40:13.000000000 -0700
@@ -821,9 +821,10 @@
 {
 }
 
-static void openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
+static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs)
 {
 	smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs);
+	return IRQ_HANDLED;
 }
 
 #endif /* CONFIG_SMP */
diff -urN linux-2.5.68-bk10/arch/ppc/syslib/ppc8xx_pic.c linux-2.5.68-bk11/arch/ppc/syslib/ppc8xx_pic.c
--- linux-2.5.68-bk10/arch/ppc/syslib/ppc8xx_pic.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/syslib/ppc8xx_pic.c	2003-05-01 04:40:13.000000000 -0700
@@ -168,7 +168,8 @@
  * drivers that may mess up the internal interrupt controllers, and also
  * allow them to run without modification on the MBX.
  */
-int request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *),
+int request_irq(unsigned int irq,
+	irqreturn_t (*handler)(int, void *, struct pt_regs *),
 	unsigned long irqflags, const char * devname, void *dev_id)
 {
 
diff -urN linux-2.5.68-bk10/arch/ppc/xmon/nonstdio.h linux-2.5.68-bk11/arch/ppc/xmon/nonstdio.h
--- linux-2.5.68-bk10/arch/ppc/xmon/nonstdio.h	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/xmon/nonstdio.h	2003-05-01 04:40:13.000000000 -0700
@@ -15,7 +15,6 @@
 #define fflush(f)	do {} while (0)
 #define fclose(f)	do {} while (0)
 extern char *fgets(char *, int, void *);
-extern void xmon_printf(const char *, ...);
 extern void xmon_fprintf(void *, const char *, ...);
 extern void xmon_sprintf(char *, const char *, ...);
 extern void xmon_puts(char*);
diff -urN linux-2.5.68-bk10/arch/ppc/xmon/start.c linux-2.5.68-bk11/arch/ppc/xmon/start.c
--- linux-2.5.68-bk10/arch/ppc/xmon/start.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/xmon/start.c	2003-05-01 04:40:13.000000000 -0700
@@ -26,7 +26,6 @@
 
 static volatile unsigned char *sccc, *sccd;
 unsigned int TXRDY, RXRDY, DLAB;
-extern void xmon_printf(const char *fmt, ...);
 static int xmon_expect(const char *str, unsigned int timeout);
 
 static int use_serial;
diff -urN linux-2.5.68-bk10/arch/ppc/xmon/xmon.c linux-2.5.68-bk11/arch/ppc/xmon/xmon.c
--- linux-2.5.68-bk10/arch/ppc/xmon/xmon.c	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc/xmon/xmon.c	2003-05-01 04:40:13.000000000 -0700
@@ -7,12 +7,14 @@
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
+#include <linux/interrupt.h>
 #include <asm/ptrace.h>
 #include <asm/string.h>
 #include <asm/prom.h>
 #include <asm/bitops.h>
 #include <asm/bootx.h>
 #include <asm/machdep.h>
+#include <asm/xmon.h>
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/backlight.h>
 #endif
@@ -103,7 +105,12 @@
 #endif /* CONFIG_SMP */
 static int pretty_print_addr(unsigned long addr);
 static void csum(void);
+#ifdef CONFIG_BOOTX_TEXT
+static void vidcmds(void);
+#endif
 static void bootcmds(void);
+static void proccall(void);
+static void printtime(void);
 
 extern int print_insn_big_powerpc(FILE *, unsigned long, unsigned);
 extern void printf(const char *fmt, ...);
@@ -116,6 +123,9 @@
 extern char* xmon_find_symbol(unsigned long addr, unsigned long* saddr);
 extern unsigned long xmon_symbol_to_addr(char* symbol);
 
+static unsigned start_tb[NR_CPUS][2];
+static unsigned stop_tb[NR_CPUS][2];
+
 #define GETWORD(v)	(((v)[0] << 24) + ((v)[1] << 16) + ((v)[2] << 8) + (v)[3])
 
 #define isxdigit(c)	(('0' <= (c) && (c) <= '9') \
@@ -165,6 +175,20 @@
 				     "r" (loops) : "ctr");
 }
 
+static void get_tb(unsigned *p)
+{
+	unsigned hi, lo, hiagain;
+
+	if ((get_pvr() >> 16) == 1)
+		return;
+
+	do {
+		asm volatile("mftbu %0; mftb %1; mftbu %2"
+			     : "=r" (hi), "=r" (lo), "=r" (hiagain));
+	} while (hi != hiagain);
+	p[0] = hi;
+	p[1] = lo;
+}
 
 void
 xmon(struct pt_regs *excp)
@@ -172,6 +196,7 @@
 	struct pt_regs regs;
 	int msr, cmd;
 
+	get_tb(stop_tb[smp_processor_id()]);
 	if (excp == NULL) {
 		asm volatile ("stw	0,0(%0)\n\
 			lwz	0,0(1)\n\
@@ -234,17 +259,18 @@
 	clear_bit(smp_processor_id(), &cpus_in_xmon);
 #endif /* CONFIG_SMP */
 	set_msr(msr);		/* restore interrupt enable */
+	get_tb(start_tb[smp_processor_id()]);
 }
 
-void
+irqreturn_t
 xmon_irq(int irq, void *d, struct pt_regs *regs)
 {
 	unsigned long flags;
-	local_save_flags(flags);
-	local_irq_disable();
+	local_irq_save(flags);
 	printf("Keyboard interrupt\n");
 	xmon(regs);
 	local_irq_restore(flags);
+	return IRQ_HANDLED;
 }
 
 int
@@ -481,13 +507,39 @@
 			cpu_cmd();
 			break;
 #endif /* CONFIG_SMP */
+#ifdef CONFIG_BOOTX_TEXT
+		case 'v':
+			vidcmds();
+			break;
+#endif
 		case 'z':
 			bootcmds();
 			break;
+		case 'p':
+			proccall();
+			break;
+		case 'T':
+			printtime();
+			break;
 		}
 	}
 }
 
+extern unsigned tb_to_us;
+
+#define mulhwu(x,y) \
+({unsigned z; asm ("mulhwu %0,%1,%2" : "=r" (z) : "r" (x), "r" (y)); z;})
+
+static void printtime(void)
+{
+	unsigned int delta;
+
+	delta = stop_tb[smp_processor_id()][1]
+		- start_tb[smp_processor_id()][1];
+	delta = mulhwu(tb_to_us, delta);
+	printf("%u.%06u seconds\n", delta / 1000000, delta % 1000000);
+}
+
 static void bootcmds(void)
 {
 	int cmd;
@@ -551,6 +603,44 @@
 }
 #endif /* CONFIG_SMP */
 
+#ifdef CONFIG_BOOTX_TEXT
+extern boot_infos_t disp_bi;
+
+static void vidcmds(void)
+{
+	int c = inchar();
+	unsigned int val, w;
+	extern int boot_text_mapped;
+
+	if (!boot_text_mapped)
+		return;
+	if (c != '\n' && scanhex(&val)) {
+		switch (c) {
+		case 'd':
+			w = disp_bi.dispDeviceRowBytes
+				/ (disp_bi.dispDeviceDepth >> 3);
+			disp_bi.dispDeviceDepth = val;
+			disp_bi.dispDeviceRowBytes = w * (val >> 3);
+			return;
+		case 'p':
+			disp_bi.dispDeviceRowBytes = val;
+			return;
+		case 'w':
+			disp_bi.dispDeviceRect[2] = val;
+			return;
+		case 'h':
+			disp_bi.dispDeviceRect[3] = val;
+			return;
+		}
+	}
+	printf("W = %d (0x%x) H = %d (0x%x) D = %d (0x%x) P = %d (0x%x)\n",
+	       disp_bi.dispDeviceRect[2], disp_bi.dispDeviceRect[2],
+	       disp_bi.dispDeviceRect[3], disp_bi.dispDeviceRect[3],
+	       disp_bi.dispDeviceDepth, disp_bi.dispDeviceDepth,
+	       disp_bi.dispDeviceRowBytes, disp_bi.dispDeviceRowBytes);
+}
+#endif /* CONFIG_BOOTX_TEXT */
+
 static unsigned short fcstab[256] = {
 	0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
 	0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
@@ -927,34 +1017,6 @@
 	scannl();
 }
 
-#if 0
-static void
-openforth()
-{
-    int c;
-    char *p;
-    char cmd[1024];
-    int args[5];
-    extern int (*prom_entry)(int *);
-
-    p = cmd;
-    c = skipbl();
-    while (c != '\n') {
-	*p++ = c;
-	c = inchar();
-    }
-    *p = 0;
-    args[0] = (int) "interpret";
-    args[1] = 1;
-    args[2] = 1;
-    args[3] = (int) cmd;
-    (*prom_entry)(args);
-    printf("\n");
-    if (args[4] != 0)
-	printf("error %x\n", args[4]);
-}
-#endif
-
 #ifndef CONFIG_PPC_STD_MMU
 static void
 dump_hash_table()
@@ -1176,11 +1238,13 @@
 }
 
 static int fault_type;
+static int fault_except;
 static char *fault_chars[] = { "--", "**", "##" };
 
 static void
 handle_fault(struct pt_regs *regs)
 {
+	fault_except = TRAP(regs);
 	fault_type = TRAP(regs) == 0x200? 0: TRAP(regs) == 0x300? 1: 2;
 	longjmp(bus_error_jmp, 1);
 }
@@ -1578,6 +1642,41 @@
 		printf("%.8x\n", a - mskip);
 }
 
+void proccall(void)
+{
+	unsigned int args[8];
+	unsigned int ret;
+	int i;
+	typedef unsigned int (*callfunc_t)(unsigned int, unsigned int,
+			unsigned int, unsigned int, unsigned int,
+			unsigned int, unsigned int, unsigned int);
+	callfunc_t func;
+
+	scanhex(&adrs);
+	if (termch != '\n')
+		termch = 0;
+	for (i = 0; i < 8; ++i)
+		args[i] = 0;
+	for (i = 0; i < 8; ++i) {
+		if (!scanhex(&args[i]) || termch == '\n')
+			break;
+		termch = 0;
+	}
+	func = (callfunc_t) adrs;
+	ret = 0;
+	if (setjmp(bus_error_jmp) == 0) {
+		debugger_fault_handler = handle_fault;
+		sync();
+		ret = func(args[0], args[1], args[2], args[3],
+			   args[4], args[5], args[6], args[7]);
+		sync();
+		printf("return value is %x\n", ret);
+	} else {
+		printf("*** %x exception occurred\n", fault_except);
+	}
+	debugger_fault_handler = 0;
+}
+
 /* Input scanning routines */
 int
 skipbl()
diff -urN linux-2.5.68-bk10/arch/ppc64/kernel/ioctl32.c linux-2.5.68-bk11/arch/ppc64/kernel/ioctl32.c
--- linux-2.5.68-bk10/arch/ppc64/kernel/ioctl32.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc64/kernel/ioctl32.c	2003-05-01 04:40:13.000000000 -0700
@@ -3649,9 +3649,9 @@
 	unsigned long next;
 };
 
-#define COMPATIBLE_IOCTL(cmd) { cmd, (unsigned long)sys_ioctl, 0 }
+#define COMPATIBLE_IOCTL(cmd) { cmd, (unsigned long)sys_ioctl, 0 },
 
-#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
+#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 },
 
 #define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
 #define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
@@ -3661,942 +3661,816 @@
      * all others default to calling sys_ioctl().
      */
 /* Big T */
-COMPATIBLE_IOCTL(TCGETA),
-COMPATIBLE_IOCTL(TCSETA),
-COMPATIBLE_IOCTL(TCSETAW),
-COMPATIBLE_IOCTL(TCSETAF),
-COMPATIBLE_IOCTL(TCSBRK),
-COMPATIBLE_IOCTL(TCSBRKP),
-COMPATIBLE_IOCTL(TCXONC),
-COMPATIBLE_IOCTL(TCFLSH),
-COMPATIBLE_IOCTL(TCGETS),
-COMPATIBLE_IOCTL(TCSETS),
-COMPATIBLE_IOCTL(TCSETSW),
-COMPATIBLE_IOCTL(TCSETSF),
-COMPATIBLE_IOCTL(TIOCLINUX),
-COMPATIBLE_IOCTL(TIOCSTART),
-COMPATIBLE_IOCTL(TIOCSTOP),
+COMPATIBLE_IOCTL(TCGETA)
+COMPATIBLE_IOCTL(TCSETA)
+COMPATIBLE_IOCTL(TCSETAW)
+COMPATIBLE_IOCTL(TCSETAF)
+COMPATIBLE_IOCTL(TCSBRK)
+COMPATIBLE_IOCTL(TCSBRKP)
+COMPATIBLE_IOCTL(TCXONC)
+COMPATIBLE_IOCTL(TCFLSH)
+COMPATIBLE_IOCTL(TCGETS)
+COMPATIBLE_IOCTL(TCSETS)
+COMPATIBLE_IOCTL(TCSETSW)
+COMPATIBLE_IOCTL(TCSETSF)
+COMPATIBLE_IOCTL(TIOCLINUX)
+COMPATIBLE_IOCTL(TIOCSTART)
+COMPATIBLE_IOCTL(TIOCSTOP)
 /* Little t */
-COMPATIBLE_IOCTL(TIOCGETD),
-COMPATIBLE_IOCTL(TIOCSETD),
-COMPATIBLE_IOCTL(TIOCEXCL),
-COMPATIBLE_IOCTL(TIOCNXCL),
-COMPATIBLE_IOCTL(TIOCCONS),
-COMPATIBLE_IOCTL(TIOCGSOFTCAR),
-COMPATIBLE_IOCTL(TIOCSSOFTCAR),
-COMPATIBLE_IOCTL(TIOCSWINSZ),
-COMPATIBLE_IOCTL(TIOCGWINSZ),
-COMPATIBLE_IOCTL(TIOCMGET),
-COMPATIBLE_IOCTL(TIOCMBIC),
-COMPATIBLE_IOCTL(TIOCMBIS),
-COMPATIBLE_IOCTL(TIOCMSET),
-COMPATIBLE_IOCTL(TIOCPKT),
-COMPATIBLE_IOCTL(TIOCNOTTY),
-COMPATIBLE_IOCTL(TIOCSTI),
-COMPATIBLE_IOCTL(TIOCOUTQ),
-COMPATIBLE_IOCTL(TIOCSPGRP),
-COMPATIBLE_IOCTL(TIOCGPGRP),
-COMPATIBLE_IOCTL(TIOCSCTTY),
-COMPATIBLE_IOCTL(TIOCGPTN),
-COMPATIBLE_IOCTL(TIOCSPTLCK),
-COMPATIBLE_IOCTL(TIOCGSERIAL),
-COMPATIBLE_IOCTL(TIOCSSERIAL),
-COMPATIBLE_IOCTL(TIOCSERGETLSR),
-COMPATIBLE_IOCTL(TIOCSLTC),
+COMPATIBLE_IOCTL(TIOCGETD)
+COMPATIBLE_IOCTL(TIOCSETD)
+COMPATIBLE_IOCTL(TIOCEXCL)
+COMPATIBLE_IOCTL(TIOCNXCL)
+COMPATIBLE_IOCTL(TIOCCONS)
+COMPATIBLE_IOCTL(TIOCGSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSWINSZ)
+COMPATIBLE_IOCTL(TIOCGWINSZ)
+COMPATIBLE_IOCTL(TIOCMGET)
+COMPATIBLE_IOCTL(TIOCMBIC)
+COMPATIBLE_IOCTL(TIOCMBIS)
+COMPATIBLE_IOCTL(TIOCMSET)
+COMPATIBLE_IOCTL(TIOCPKT)
+COMPATIBLE_IOCTL(TIOCNOTTY)
+COMPATIBLE_IOCTL(TIOCSTI)
+COMPATIBLE_IOCTL(TIOCOUTQ)
+COMPATIBLE_IOCTL(TIOCSPGRP)
+COMPATIBLE_IOCTL(TIOCGPGRP)
+COMPATIBLE_IOCTL(TIOCSCTTY)
+COMPATIBLE_IOCTL(TIOCGPTN)
+COMPATIBLE_IOCTL(TIOCSPTLCK)
+COMPATIBLE_IOCTL(TIOCGSERIAL)
+COMPATIBLE_IOCTL(TIOCSSERIAL)
+COMPATIBLE_IOCTL(TIOCSERGETLSR)
+COMPATIBLE_IOCTL(TIOCSLTC)
 /* Big F */
-COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO),
-COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO),
-COMPATIBLE_IOCTL(FBIOPAN_DISPLAY),
-COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP),
-COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP),
+COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
+COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
+COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
+COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
+COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
 #if 0
-COMPATIBLE_IOCTL(FBIOBLANK),
+COMPATIBLE_IOCTL(FBIOBLANK)
 #endif
 /* Little f */
-COMPATIBLE_IOCTL(FIOCLEX),
-COMPATIBLE_IOCTL(FIONCLEX),
-COMPATIBLE_IOCTL(FIOASYNC),
-COMPATIBLE_IOCTL(FIONBIO),
-COMPATIBLE_IOCTL(FIONREAD),  /* This is also TIOCINQ */
+COMPATIBLE_IOCTL(FIOCLEX)
+COMPATIBLE_IOCTL(FIONCLEX)
+COMPATIBLE_IOCTL(FIOASYNC)
+COMPATIBLE_IOCTL(FIONBIO)
+COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
 /* 0x00 */
-COMPATIBLE_IOCTL(FIBMAP),
-COMPATIBLE_IOCTL(FIGETBSZ),
+COMPATIBLE_IOCTL(FIBMAP)
+COMPATIBLE_IOCTL(FIGETBSZ)
 /* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
  *         Some need translations, these do not.
  */
-COMPATIBLE_IOCTL(HDIO_GET_IDENTITY),
-COMPATIBLE_IOCTL(HDIO_SET_DMA),
-COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR),
-COMPATIBLE_IOCTL(HDIO_SET_NOWERR),
-COMPATIBLE_IOCTL(HDIO_SET_32BIT),
-COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT),
-COMPATIBLE_IOCTL(HDIO_DRIVE_CMD),
-COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE),
-COMPATIBLE_IOCTL(HDIO_SET_NICE),
+COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
+COMPATIBLE_IOCTL(HDIO_SET_DMA)
+COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
+COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
+COMPATIBLE_IOCTL(HDIO_SET_32BIT)
+COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
+COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
+COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
+COMPATIBLE_IOCTL(HDIO_SET_NICE)
 /* 0x02 -- Floppy ioctls */
-COMPATIBLE_IOCTL(FDMSGON),
-COMPATIBLE_IOCTL(FDMSGOFF),
-COMPATIBLE_IOCTL(FDSETEMSGTRESH),
-COMPATIBLE_IOCTL(FDFLUSH),
-COMPATIBLE_IOCTL(FDWERRORCLR),
-COMPATIBLE_IOCTL(FDSETMAXERRS),
-COMPATIBLE_IOCTL(FDGETMAXERRS),
-COMPATIBLE_IOCTL(FDGETDRVTYP),
-COMPATIBLE_IOCTL(FDEJECT),
-COMPATIBLE_IOCTL(FDCLRPRM),
-COMPATIBLE_IOCTL(FDFMTBEG),
-COMPATIBLE_IOCTL(FDFMTEND),
-COMPATIBLE_IOCTL(FDRESET),
-COMPATIBLE_IOCTL(FDTWADDLE),
-COMPATIBLE_IOCTL(FDFMTTRK),
-COMPATIBLE_IOCTL(FDRAWCMD),
+COMPATIBLE_IOCTL(FDMSGON)
+COMPATIBLE_IOCTL(FDMSGOFF)
+COMPATIBLE_IOCTL(FDSETEMSGTRESH)
+COMPATIBLE_IOCTL(FDFLUSH)
+COMPATIBLE_IOCTL(FDWERRORCLR)
+COMPATIBLE_IOCTL(FDSETMAXERRS)
+COMPATIBLE_IOCTL(FDGETMAXERRS)
+COMPATIBLE_IOCTL(FDGETDRVTYP)
+COMPATIBLE_IOCTL(FDEJECT)
+COMPATIBLE_IOCTL(FDCLRPRM)
+COMPATIBLE_IOCTL(FDFMTBEG)
+COMPATIBLE_IOCTL(FDFMTEND)
+COMPATIBLE_IOCTL(FDRESET)
+COMPATIBLE_IOCTL(FDTWADDLE)
+COMPATIBLE_IOCTL(FDFMTTRK)
+COMPATIBLE_IOCTL(FDRAWCMD)
 /* 0x12 */
-COMPATIBLE_IOCTL(BLKROSET),
-COMPATIBLE_IOCTL(BLKROGET),
-COMPATIBLE_IOCTL(BLKRRPART),
-COMPATIBLE_IOCTL(BLKFLSBUF),
-COMPATIBLE_IOCTL(BLKSECTSET),
-COMPATIBLE_IOCTL(BLKSSZGET),
-COMPATIBLE_IOCTL(BLKRASET),
-COMPATIBLE_IOCTL(BLKFRASET),
+COMPATIBLE_IOCTL(BLKROSET)
+COMPATIBLE_IOCTL(BLKROGET)
+COMPATIBLE_IOCTL(BLKRRPART)
+COMPATIBLE_IOCTL(BLKFLSBUF)
+COMPATIBLE_IOCTL(BLKSECTSET)
+COMPATIBLE_IOCTL(BLKSSZGET)
+COMPATIBLE_IOCTL(BLKRASET)
+COMPATIBLE_IOCTL(BLKFRASET)
 /* RAID */
-COMPATIBLE_IOCTL(RAID_VERSION),
-COMPATIBLE_IOCTL(GET_ARRAY_INFO),
-COMPATIBLE_IOCTL(GET_DISK_INFO),
-COMPATIBLE_IOCTL(PRINT_RAID_DEBUG),
-COMPATIBLE_IOCTL(CLEAR_ARRAY),
-COMPATIBLE_IOCTL(ADD_NEW_DISK),
-COMPATIBLE_IOCTL(HOT_REMOVE_DISK),
-COMPATIBLE_IOCTL(SET_ARRAY_INFO),
-COMPATIBLE_IOCTL(SET_DISK_INFO),
-COMPATIBLE_IOCTL(WRITE_RAID_INFO),
-COMPATIBLE_IOCTL(UNPROTECT_ARRAY),
-COMPATIBLE_IOCTL(PROTECT_ARRAY),
-COMPATIBLE_IOCTL(HOT_ADD_DISK),
-COMPATIBLE_IOCTL(SET_DISK_FAULTY),
-COMPATIBLE_IOCTL(RUN_ARRAY),
-COMPATIBLE_IOCTL(START_ARRAY),
-COMPATIBLE_IOCTL(STOP_ARRAY),
-COMPATIBLE_IOCTL(STOP_ARRAY_RO),
-COMPATIBLE_IOCTL(RESTART_ARRAY_RW),
+COMPATIBLE_IOCTL(RAID_VERSION)
+COMPATIBLE_IOCTL(GET_ARRAY_INFO)
+COMPATIBLE_IOCTL(GET_DISK_INFO)
+COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
+COMPATIBLE_IOCTL(CLEAR_ARRAY)
+COMPATIBLE_IOCTL(ADD_NEW_DISK)
+COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
+COMPATIBLE_IOCTL(SET_ARRAY_INFO)
+COMPATIBLE_IOCTL(SET_DISK_INFO)
+COMPATIBLE_IOCTL(WRITE_RAID_INFO)
+COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
+COMPATIBLE_IOCTL(PROTECT_ARRAY)
+COMPATIBLE_IOCTL(HOT_ADD_DISK)
+COMPATIBLE_IOCTL(SET_DISK_FAULTY)
+COMPATIBLE_IOCTL(RUN_ARRAY)
+COMPATIBLE_IOCTL(START_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY_RO)
+COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
 /* Big K */
-COMPATIBLE_IOCTL(PIO_FONT),
-COMPATIBLE_IOCTL(GIO_FONT),
-COMPATIBLE_IOCTL(KDSIGACCEPT),
-COMPATIBLE_IOCTL(KDGETKEYCODE),
-COMPATIBLE_IOCTL(KDSETKEYCODE),
-COMPATIBLE_IOCTL(KIOCSOUND),
-COMPATIBLE_IOCTL(KDMKTONE),
-COMPATIBLE_IOCTL(KDGKBTYPE),
-COMPATIBLE_IOCTL(KDSETMODE),
-COMPATIBLE_IOCTL(KDGETMODE),
-COMPATIBLE_IOCTL(KDSKBMODE),
-COMPATIBLE_IOCTL(KDGKBMODE),
-COMPATIBLE_IOCTL(KDSKBMETA),
-COMPATIBLE_IOCTL(KDGKBMETA),
-COMPATIBLE_IOCTL(KDGKBENT),
-COMPATIBLE_IOCTL(KDSKBENT),
-COMPATIBLE_IOCTL(KDGKBSENT),
-COMPATIBLE_IOCTL(KDSKBSENT),
-COMPATIBLE_IOCTL(KDGKBDIACR),
-COMPATIBLE_IOCTL(KDKBDREP),
-COMPATIBLE_IOCTL(KDSKBDIACR),
-COMPATIBLE_IOCTL(KDGKBLED),
-COMPATIBLE_IOCTL(KDSKBLED),
-COMPATIBLE_IOCTL(KDGETLED),
-COMPATIBLE_IOCTL(KDSETLED),
-COMPATIBLE_IOCTL(GIO_SCRNMAP),
-COMPATIBLE_IOCTL(PIO_SCRNMAP),
-COMPATIBLE_IOCTL(GIO_UNISCRNMAP),
-COMPATIBLE_IOCTL(PIO_UNISCRNMAP),
-COMPATIBLE_IOCTL(PIO_FONTRESET),
-COMPATIBLE_IOCTL(PIO_UNIMAPCLR),
+COMPATIBLE_IOCTL(PIO_FONT)
+COMPATIBLE_IOCTL(GIO_FONT)
+COMPATIBLE_IOCTL(KDSIGACCEPT)
+COMPATIBLE_IOCTL(KDGETKEYCODE)
+COMPATIBLE_IOCTL(KDSETKEYCODE)
+COMPATIBLE_IOCTL(KIOCSOUND)
+COMPATIBLE_IOCTL(KDMKTONE)
+COMPATIBLE_IOCTL(KDGKBTYPE)
+COMPATIBLE_IOCTL(KDSETMODE)
+COMPATIBLE_IOCTL(KDGETMODE)
+COMPATIBLE_IOCTL(KDSKBMODE)
+COMPATIBLE_IOCTL(KDGKBMODE)
+COMPATIBLE_IOCTL(KDSKBMETA)
+COMPATIBLE_IOCTL(KDGKBMETA)
+COMPATIBLE_IOCTL(KDGKBENT)
+COMPATIBLE_IOCTL(KDSKBENT)
+COMPATIBLE_IOCTL(KDGKBSENT)
+COMPATIBLE_IOCTL(KDSKBSENT)
+COMPATIBLE_IOCTL(KDGKBDIACR)
+COMPATIBLE_IOCTL(KDKBDREP)
+COMPATIBLE_IOCTL(KDSKBDIACR)
+COMPATIBLE_IOCTL(KDGKBLED)
+COMPATIBLE_IOCTL(KDSKBLED)
+COMPATIBLE_IOCTL(KDGETLED)
+COMPATIBLE_IOCTL(KDSETLED)
+COMPATIBLE_IOCTL(GIO_SCRNMAP)
+COMPATIBLE_IOCTL(PIO_SCRNMAP)
+COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_FONTRESET)
+COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
 /* Big S */
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN),
-COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST),
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI),
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK),
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK),
-COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY),
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE),
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE),
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER),
-COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND),
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
+COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
+COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
 /* Big T */
-COMPATIBLE_IOCTL(TUNSETNOCSUM),
-COMPATIBLE_IOCTL(TUNSETDEBUG),
-COMPATIBLE_IOCTL(TUNSETIFF),
-COMPATIBLE_IOCTL(TUNSETPERSIST),
-COMPATIBLE_IOCTL(TUNSETOWNER),
+COMPATIBLE_IOCTL(TUNSETNOCSUM)
+COMPATIBLE_IOCTL(TUNSETDEBUG)
+COMPATIBLE_IOCTL(TUNSETIFF)
+COMPATIBLE_IOCTL(TUNSETPERSIST)
+COMPATIBLE_IOCTL(TUNSETOWNER)
 /* Big V */
-COMPATIBLE_IOCTL(VT_SETMODE),
-COMPATIBLE_IOCTL(VT_GETMODE),
-COMPATIBLE_IOCTL(VT_GETSTATE),
-COMPATIBLE_IOCTL(VT_OPENQRY),
-COMPATIBLE_IOCTL(VT_ACTIVATE),
-COMPATIBLE_IOCTL(VT_WAITACTIVE),
-COMPATIBLE_IOCTL(VT_RELDISP),
-COMPATIBLE_IOCTL(VT_DISALLOCATE),
-COMPATIBLE_IOCTL(VT_RESIZE),
-COMPATIBLE_IOCTL(VT_RESIZEX),
-COMPATIBLE_IOCTL(VT_LOCKSWITCH),
-COMPATIBLE_IOCTL(VT_UNLOCKSWITCH),
+COMPATIBLE_IOCTL(VT_SETMODE)
+COMPATIBLE_IOCTL(VT_GETMODE)
+COMPATIBLE_IOCTL(VT_GETSTATE)
+COMPATIBLE_IOCTL(VT_OPENQRY)
+COMPATIBLE_IOCTL(VT_ACTIVATE)
+COMPATIBLE_IOCTL(VT_WAITACTIVE)
+COMPATIBLE_IOCTL(VT_RELDISP)
+COMPATIBLE_IOCTL(VT_DISALLOCATE)
+COMPATIBLE_IOCTL(VT_RESIZE)
+COMPATIBLE_IOCTL(VT_RESIZEX)
+COMPATIBLE_IOCTL(VT_LOCKSWITCH)
+COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
 /* Little v, the video4linux ioctls */
-COMPATIBLE_IOCTL(VIDIOCGCAP),
-COMPATIBLE_IOCTL(VIDIOCGCHAN),
-COMPATIBLE_IOCTL(VIDIOCSCHAN),
-COMPATIBLE_IOCTL(VIDIOCGPICT),
-COMPATIBLE_IOCTL(VIDIOCSPICT),
-COMPATIBLE_IOCTL(VIDIOCCAPTURE),
-COMPATIBLE_IOCTL(VIDIOCKEY),
-COMPATIBLE_IOCTL(VIDIOCGAUDIO),
-COMPATIBLE_IOCTL(VIDIOCSAUDIO),
-COMPATIBLE_IOCTL(VIDIOCSYNC),
-COMPATIBLE_IOCTL(VIDIOCMCAPTURE),
-COMPATIBLE_IOCTL(VIDIOCGMBUF),
-COMPATIBLE_IOCTL(VIDIOCGUNIT),
-COMPATIBLE_IOCTL(VIDIOCGCAPTURE),
-COMPATIBLE_IOCTL(VIDIOCSCAPTURE),
+COMPATIBLE_IOCTL(VIDIOCGCAP)
+COMPATIBLE_IOCTL(VIDIOCGCHAN)
+COMPATIBLE_IOCTL(VIDIOCSCHAN)
+COMPATIBLE_IOCTL(VIDIOCGPICT)
+COMPATIBLE_IOCTL(VIDIOCSPICT)
+COMPATIBLE_IOCTL(VIDIOCCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCKEY)
+COMPATIBLE_IOCTL(VIDIOCGAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSYNC)
+COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCGMBUF)
+COMPATIBLE_IOCTL(VIDIOCGUNIT)
+COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
 /* BTTV specific... */
-COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256])),
-COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256])),
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int)),
-COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])), /* struct bttv_pll_info */
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int)),
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int)),
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int)),
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int)),
+COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
+COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
+COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
 /* Little p (/dev/rtc, /dev/envctrl, etc.) */
-COMPATIBLE_IOCTL(_IOR('p', 20, int[7])), /* RTCGET */
-COMPATIBLE_IOCTL(_IOW('p', 21, int[7])), /* RTCSET */
-COMPATIBLE_IOCTL(RTC_AIE_ON),
-COMPATIBLE_IOCTL(RTC_AIE_OFF),
-COMPATIBLE_IOCTL(RTC_UIE_ON),
-COMPATIBLE_IOCTL(RTC_UIE_OFF),
-COMPATIBLE_IOCTL(RTC_PIE_ON),
-COMPATIBLE_IOCTL(RTC_PIE_OFF),
-COMPATIBLE_IOCTL(RTC_WIE_ON),
-COMPATIBLE_IOCTL(RTC_WIE_OFF),
-COMPATIBLE_IOCTL(RTC_ALM_SET),
-COMPATIBLE_IOCTL(RTC_ALM_READ),
-COMPATIBLE_IOCTL(RTC_RD_TIME),
-COMPATIBLE_IOCTL(RTC_SET_TIME),
-COMPATIBLE_IOCTL(RTC_WKALM_SET),
-COMPATIBLE_IOCTL(RTC_WKALM_RD),
+COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
+COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
+COMPATIBLE_IOCTL(RTC_AIE_ON)
+COMPATIBLE_IOCTL(RTC_AIE_OFF)
+COMPATIBLE_IOCTL(RTC_UIE_ON)
+COMPATIBLE_IOCTL(RTC_UIE_OFF)
+COMPATIBLE_IOCTL(RTC_PIE_ON)
+COMPATIBLE_IOCTL(RTC_PIE_OFF)
+COMPATIBLE_IOCTL(RTC_WIE_ON)
+COMPATIBLE_IOCTL(RTC_WIE_OFF)
+COMPATIBLE_IOCTL(RTC_ALM_SET)
+COMPATIBLE_IOCTL(RTC_ALM_READ)
+COMPATIBLE_IOCTL(RTC_RD_TIME)
+COMPATIBLE_IOCTL(RTC_SET_TIME)
+COMPATIBLE_IOCTL(RTC_WKALM_SET)
+COMPATIBLE_IOCTL(RTC_WKALM_RD)
 /* Little m */
-COMPATIBLE_IOCTL(MTIOCTOP),
+COMPATIBLE_IOCTL(MTIOCTOP)
 /* Socket level stuff */
-COMPATIBLE_IOCTL(FIOSETOWN),
-COMPATIBLE_IOCTL(SIOCSPGRP),
-COMPATIBLE_IOCTL(FIOGETOWN),
-COMPATIBLE_IOCTL(SIOCGPGRP),
-COMPATIBLE_IOCTL(SIOCATMARK),
-COMPATIBLE_IOCTL(SIOCSIFLINK),
-COMPATIBLE_IOCTL(SIOCSIFENCAP),
-COMPATIBLE_IOCTL(SIOCGIFENCAP),
-COMPATIBLE_IOCTL(SIOCSIFBR),
-COMPATIBLE_IOCTL(SIOCGIFBR),
-COMPATIBLE_IOCTL(SIOCSARP),
-COMPATIBLE_IOCTL(SIOCGARP),
-COMPATIBLE_IOCTL(SIOCDARP),
-COMPATIBLE_IOCTL(SIOCSRARP),
-COMPATIBLE_IOCTL(SIOCGRARP),
-COMPATIBLE_IOCTL(SIOCDRARP),
-COMPATIBLE_IOCTL(SIOCADDDLCI),
-COMPATIBLE_IOCTL(SIOCDELDLCI),
-COMPATIBLE_IOCTL(SIOCGMIIPHY),
-COMPATIBLE_IOCTL(SIOCGMIIREG),
-COMPATIBLE_IOCTL(SIOCSMIIREG),
-COMPATIBLE_IOCTL(SIOCGIFVLAN),
-COMPATIBLE_IOCTL(SIOCSIFVLAN),
+COMPATIBLE_IOCTL(FIOSETOWN)
+COMPATIBLE_IOCTL(SIOCSPGRP)
+COMPATIBLE_IOCTL(FIOGETOWN)
+COMPATIBLE_IOCTL(SIOCGPGRP)
+COMPATIBLE_IOCTL(SIOCATMARK)
+COMPATIBLE_IOCTL(SIOCSIFLINK)
+COMPATIBLE_IOCTL(SIOCSIFENCAP)
+COMPATIBLE_IOCTL(SIOCGIFENCAP)
+COMPATIBLE_IOCTL(SIOCSIFBR)
+COMPATIBLE_IOCTL(SIOCGIFBR)
+COMPATIBLE_IOCTL(SIOCSARP)
+COMPATIBLE_IOCTL(SIOCGARP)
+COMPATIBLE_IOCTL(SIOCDARP)
+COMPATIBLE_IOCTL(SIOCSRARP)
+COMPATIBLE_IOCTL(SIOCGRARP)
+COMPATIBLE_IOCTL(SIOCDRARP)
+COMPATIBLE_IOCTL(SIOCADDDLCI)
+COMPATIBLE_IOCTL(SIOCDELDLCI)
+COMPATIBLE_IOCTL(SIOCGMIIPHY)
+COMPATIBLE_IOCTL(SIOCGMIIREG)
+COMPATIBLE_IOCTL(SIOCSMIIREG)
+COMPATIBLE_IOCTL(SIOCGIFVLAN)
+COMPATIBLE_IOCTL(SIOCSIFVLAN)
 /* SG stuff */
-COMPATIBLE_IOCTL(SG_SET_TIMEOUT),
-COMPATIBLE_IOCTL(SG_GET_TIMEOUT),
-COMPATIBLE_IOCTL(SG_EMULATED_HOST),
-COMPATIBLE_IOCTL(SG_SET_TRANSFORM),
-COMPATIBLE_IOCTL(SG_GET_TRANSFORM),
-COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE),
-COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE),
-COMPATIBLE_IOCTL(SG_GET_SCSI_ID),
-COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA),
-COMPATIBLE_IOCTL(SG_GET_LOW_DMA),
-COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID),
-COMPATIBLE_IOCTL(SG_GET_PACK_ID),
-COMPATIBLE_IOCTL(SG_GET_NUM_WAITING),
-COMPATIBLE_IOCTL(SG_SET_DEBUG),
-COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE),
-COMPATIBLE_IOCTL(SG_GET_COMMAND_Q),
-COMPATIBLE_IOCTL(SG_SET_COMMAND_Q),
-COMPATIBLE_IOCTL(SG_GET_VERSION_NUM),
-COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN),
-COMPATIBLE_IOCTL(SG_SCSI_RESET),
-COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE),
-COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN),
-COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN),
+COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_EMULATED_HOST)
+COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
+COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
+COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
+COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
+COMPATIBLE_IOCTL(SG_SET_DEBUG)
+COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
+COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
+COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
+COMPATIBLE_IOCTL(SG_SCSI_RESET)
+COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
+COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
+COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
 /* PPP stuff */
-COMPATIBLE_IOCTL(PPPIOCGFLAGS),
-COMPATIBLE_IOCTL(PPPIOCSFLAGS),
-COMPATIBLE_IOCTL(PPPIOCGASYNCMAP),
-COMPATIBLE_IOCTL(PPPIOCSASYNCMAP),
-COMPATIBLE_IOCTL(PPPIOCGUNIT),
-COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP),
-COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP),
-COMPATIBLE_IOCTL(PPPIOCGMRU),
-COMPATIBLE_IOCTL(PPPIOCSMRU),
-COMPATIBLE_IOCTL(PPPIOCSMAXCID),
-COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP),
-COMPATIBLE_IOCTL(LPGETSTATUS),
-COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP),
-COMPATIBLE_IOCTL(PPPIOCXFERUNIT),
-COMPATIBLE_IOCTL(PPPIOCGNPMODE),
-COMPATIBLE_IOCTL(PPPIOCSNPMODE),
-COMPATIBLE_IOCTL(PPPIOCGDEBUG),
-COMPATIBLE_IOCTL(PPPIOCSDEBUG),
-COMPATIBLE_IOCTL(PPPIOCNEWUNIT),
-COMPATIBLE_IOCTL(PPPIOCATTACH),
-COMPATIBLE_IOCTL(PPPIOCDETACH),
-COMPATIBLE_IOCTL(PPPIOCSMRRU),
-COMPATIBLE_IOCTL(PPPIOCCONNECT),
-COMPATIBLE_IOCTL(PPPIOCDISCONN),
-COMPATIBLE_IOCTL(PPPIOCATTCHAN),
-COMPATIBLE_IOCTL(PPPIOCGCHAN),
+COMPATIBLE_IOCTL(PPPIOCGFLAGS)
+COMPATIBLE_IOCTL(PPPIOCSFLAGS)
+COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGUNIT)
+COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGMRU)
+COMPATIBLE_IOCTL(PPPIOCSMRU)
+COMPATIBLE_IOCTL(PPPIOCSMAXCID)
+COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
+COMPATIBLE_IOCTL(LPGETSTATUS)
+COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
+COMPATIBLE_IOCTL(PPPIOCGNPMODE)
+COMPATIBLE_IOCTL(PPPIOCSNPMODE)
+COMPATIBLE_IOCTL(PPPIOCGDEBUG)
+COMPATIBLE_IOCTL(PPPIOCSDEBUG)
+COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
+COMPATIBLE_IOCTL(PPPIOCATTACH)
+COMPATIBLE_IOCTL(PPPIOCDETACH)
+COMPATIBLE_IOCTL(PPPIOCSMRRU)
+COMPATIBLE_IOCTL(PPPIOCCONNECT)
+COMPATIBLE_IOCTL(PPPIOCDISCONN)
+COMPATIBLE_IOCTL(PPPIOCATTCHAN)
+COMPATIBLE_IOCTL(PPPIOCGCHAN)
 /* PPPOX */
-COMPATIBLE_IOCTL(PPPOEIOCSFWD),
-COMPATIBLE_IOCTL(PPPOEIOCDFWD),
+COMPATIBLE_IOCTL(PPPOEIOCSFWD)
+COMPATIBLE_IOCTL(PPPOEIOCDFWD)
 /* CDROM stuff */
-COMPATIBLE_IOCTL(CDROMPAUSE),
-COMPATIBLE_IOCTL(CDROMRESUME),
-COMPATIBLE_IOCTL(CDROMPLAYMSF),
-COMPATIBLE_IOCTL(CDROMPLAYTRKIND),
-COMPATIBLE_IOCTL(CDROMREADTOCHDR),
-COMPATIBLE_IOCTL(CDROMREADTOCENTRY),
-COMPATIBLE_IOCTL(CDROMSTOP),
-COMPATIBLE_IOCTL(CDROMSTART),
-COMPATIBLE_IOCTL(CDROMEJECT),
-COMPATIBLE_IOCTL(CDROMVOLCTRL),
-COMPATIBLE_IOCTL(CDROMSUBCHNL),
-COMPATIBLE_IOCTL(CDROMEJECT_SW),
-COMPATIBLE_IOCTL(CDROMMULTISESSION),
-COMPATIBLE_IOCTL(CDROM_GET_MCN),
-COMPATIBLE_IOCTL(CDROMRESET),
-COMPATIBLE_IOCTL(CDROMVOLREAD),
-COMPATIBLE_IOCTL(CDROMSEEK),
-COMPATIBLE_IOCTL(CDROMPLAYBLK),
-COMPATIBLE_IOCTL(CDROMCLOSETRAY),
-COMPATIBLE_IOCTL(CDROM_SET_OPTIONS),
-COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS),
-COMPATIBLE_IOCTL(CDROM_SELECT_SPEED),
-COMPATIBLE_IOCTL(CDROM_SELECT_DISC),
-COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED),
-COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS),
-COMPATIBLE_IOCTL(CDROM_DISC_STATUS),
-COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS),
-COMPATIBLE_IOCTL(CDROM_LOCKDOOR),
-COMPATIBLE_IOCTL(CDROM_DEBUG),
-COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY),
+COMPATIBLE_IOCTL(CDROMPAUSE)
+COMPATIBLE_IOCTL(CDROMRESUME)
+COMPATIBLE_IOCTL(CDROMPLAYMSF)
+COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
+COMPATIBLE_IOCTL(CDROMREADTOCHDR)
+COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
+COMPATIBLE_IOCTL(CDROMSTOP)
+COMPATIBLE_IOCTL(CDROMSTART)
+COMPATIBLE_IOCTL(CDROMEJECT)
+COMPATIBLE_IOCTL(CDROMVOLCTRL)
+COMPATIBLE_IOCTL(CDROMSUBCHNL)
+COMPATIBLE_IOCTL(CDROMEJECT_SW)
+COMPATIBLE_IOCTL(CDROMMULTISESSION)
+COMPATIBLE_IOCTL(CDROM_GET_MCN)
+COMPATIBLE_IOCTL(CDROMRESET)
+COMPATIBLE_IOCTL(CDROMVOLREAD)
+COMPATIBLE_IOCTL(CDROMSEEK)
+COMPATIBLE_IOCTL(CDROMPLAYBLK)
+COMPATIBLE_IOCTL(CDROMCLOSETRAY)
+COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
+COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
+COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
+COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
+COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
+COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
+COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
+COMPATIBLE_IOCTL(CDROM_DEBUG)
+COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
 /* DVD ioctls */
-COMPATIBLE_IOCTL(DVD_READ_STRUCT),
-COMPATIBLE_IOCTL(DVD_WRITE_STRUCT),
-COMPATIBLE_IOCTL(DVD_AUTH),
+COMPATIBLE_IOCTL(DVD_READ_STRUCT)
+COMPATIBLE_IOCTL(DVD_WRITE_STRUCT)
+COMPATIBLE_IOCTL(DVD_AUTH)
 /* Big L */
-COMPATIBLE_IOCTL(LOOP_SET_FD),
-COMPATIBLE_IOCTL(LOOP_CLR_FD),
+COMPATIBLE_IOCTL(LOOP_SET_FD)
+COMPATIBLE_IOCTL(LOOP_CLR_FD)
 /* Big Q for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC),
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE),
-COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS),
-COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD),
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL),
-COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND),
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME),
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID),
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL),
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE),
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
+COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
+COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
 /* Big T for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE),
-COMPATIBLE_IOCTL(SNDCTL_TMR_START),
-COMPATIBLE_IOCTL(SNDCTL_TMR_STOP),
-COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE),
-COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO),
-COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE),
-COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME),
-COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT),
+COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_START)
+COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
+COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
 /* Little m for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME),
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE),
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD),
+COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
 /* Big P for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_DSP_RESET),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED),
-COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE),
-COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS),
-COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER),
-COMPATIBLE_IOCTL(SNDCTL_DSP_POST),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE),
-COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR),
+COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
+COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
 /* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
 /* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO),
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX),
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY),
-COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE),
-COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE),
-COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS),
-COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS),
-COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER),
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
+COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
 /* Big C for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_COPR_RESET),
-COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD),
-COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA),
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE),
-COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA),
-COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE),
-COMPATIBLE_IOCTL(SNDCTL_COPR_RUN),
-COMPATIBLE_IOCTL(SNDCTL_COPR_HALT),
-COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG),
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG),
+COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
+COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
+COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
+COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
 /* Big M for sound/OSS */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO)),
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR)),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE),
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE)
 /* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
 /* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS),
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO)),
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR)),
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE),
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
 /* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
 /* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC),
-COMPATIBLE_IOCTL(SOUND_MIXER_INFO),
-COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO),
-COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS),
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1),
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2),
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3),
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4),
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5),
-COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS),
-COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS),
-COMPATIBLE_IOCTL(OSS_GETVERSION),
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
+COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
+COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
+COMPATIBLE_IOCTL(OSS_GETVERSION)
 /* AUTOFS */
-COMPATIBLE_IOCTL(AUTOFS_IOC_READY),
-COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL),
-COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC),
-COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER),
-COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE),
+COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
+COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
+COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
 /* DEVFS */
-COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV),
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK),
-COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE),
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK),
+COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
+COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
 /* Raw devices */
-COMPATIBLE_IOCTL(RAW_SETBIND),
-COMPATIBLE_IOCTL(RAW_GETBIND),
+COMPATIBLE_IOCTL(RAW_SETBIND)
+COMPATIBLE_IOCTL(RAW_GETBIND)
 /* SMB ioctls which do not need any translations */
-COMPATIBLE_IOCTL(SMB_IOC_NEWCONN),
+COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
 /* NCP ioctls which do not need any translations */
-COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN),
-COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT),
-COMPATIBLE_IOCTL(NCP_IOC_SIGN_WANTED),
-COMPATIBLE_IOCTL(NCP_IOC_SET_SIGN_WANTED),
-COMPATIBLE_IOCTL(NCP_IOC_LOCKUNLOCK),
-COMPATIBLE_IOCTL(NCP_IOC_GETROOT),
-COMPATIBLE_IOCTL(NCP_IOC_SETROOT),
-COMPATIBLE_IOCTL(NCP_IOC_GETCHARSETS),
-COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS),
-COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL),
-COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL),
+COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN)
+COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT)
+COMPATIBLE_IOCTL(NCP_IOC_SIGN_WANTED)
+COMPATIBLE_IOCTL(NCP_IOC_SET_SIGN_WANTED)
+COMPATIBLE_IOCTL(NCP_IOC_LOCKUNLOCK)
+COMPATIBLE_IOCTL(NCP_IOC_GETROOT)
+COMPATIBLE_IOCTL(NCP_IOC_SETROOT)
+COMPATIBLE_IOCTL(NCP_IOC_GETCHARSETS)
+COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS)
+COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL)
+COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL)
 /* Little a */
-COMPATIBLE_IOCTL(ATMSIGD_CTRL),
-COMPATIBLE_IOCTL(ATMARPD_CTRL),
-COMPATIBLE_IOCTL(ATMLEC_CTRL),
-COMPATIBLE_IOCTL(ATMLEC_MCAST),
-COMPATIBLE_IOCTL(ATMLEC_DATA),
-COMPATIBLE_IOCTL(ATM_SETSC),
-COMPATIBLE_IOCTL(SIOCSIFATMTCP),
-COMPATIBLE_IOCTL(SIOCMKCLIP),
-COMPATIBLE_IOCTL(ATMARP_MKIP),
-COMPATIBLE_IOCTL(ATMARP_SETENTRY),
-COMPATIBLE_IOCTL(ATMARP_ENCAP),
-COMPATIBLE_IOCTL(ATMTCP_CREATE),
-COMPATIBLE_IOCTL(ATMTCP_REMOVE),
-COMPATIBLE_IOCTL(ATMMPC_CTRL),
-COMPATIBLE_IOCTL(ATMMPC_DATA),
+COMPATIBLE_IOCTL(ATMSIGD_CTRL)
+COMPATIBLE_IOCTL(ATMARPD_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_MCAST)
+COMPATIBLE_IOCTL(ATMLEC_DATA)
+COMPATIBLE_IOCTL(ATM_SETSC)
+COMPATIBLE_IOCTL(SIOCSIFATMTCP)
+COMPATIBLE_IOCTL(SIOCMKCLIP)
+COMPATIBLE_IOCTL(ATMARP_MKIP)
+COMPATIBLE_IOCTL(ATMARP_SETENTRY)
+COMPATIBLE_IOCTL(ATMARP_ENCAP)
+COMPATIBLE_IOCTL(ATMTCP_CREATE)
+COMPATIBLE_IOCTL(ATMTCP_REMOVE)
+COMPATIBLE_IOCTL(ATMMPC_CTRL)
+COMPATIBLE_IOCTL(ATMMPC_DATA)
 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
-COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC),
-COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID),
-COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC),
-COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK),
-COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK),
-COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL),
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS),
-COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS),
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX),
-COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW),
-COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW),
-COMPATIBLE_IOCTL(DRM_IOCTL_LOCK),
-COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK),
-COMPATIBLE_IOCTL(DRM_IOCTL_FINISH),
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
+COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_LOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
 #endif /* DRM */
 /* Big W */
 /* WIOC_GETSUPPORT not yet implemented -E */
-COMPATIBLE_IOCTL(WDIOC_GETSTATUS),
-COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS),
-COMPATIBLE_IOCTL(WDIOC_GETTEMP),
-COMPATIBLE_IOCTL(WDIOC_SETOPTIONS),
-COMPATIBLE_IOCTL(WDIOC_KEEPALIVE),
+COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
+COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS)
+COMPATIBLE_IOCTL(WDIOC_GETTEMP)
+COMPATIBLE_IOCTL(WDIOC_SETOPTIONS)
+COMPATIBLE_IOCTL(WDIOC_KEEPALIVE)
 /* Big R */
-COMPATIBLE_IOCTL(RNDGETENTCNT),
-COMPATIBLE_IOCTL(RNDADDTOENTCNT),
-COMPATIBLE_IOCTL(RNDGETPOOL),
-COMPATIBLE_IOCTL(RNDADDENTROPY),
-COMPATIBLE_IOCTL(RNDZAPENTCNT),
-COMPATIBLE_IOCTL(RNDCLEARPOOL),
+COMPATIBLE_IOCTL(RNDGETENTCNT)
+COMPATIBLE_IOCTL(RNDADDTOENTCNT)
+COMPATIBLE_IOCTL(RNDGETPOOL)
+COMPATIBLE_IOCTL(RNDADDENTROPY)
+COMPATIBLE_IOCTL(RNDZAPENTCNT)
+COMPATIBLE_IOCTL(RNDCLEARPOOL)
 /* Bluetooth ioctls */
-COMPATIBLE_IOCTL(HCIDEVUP),
-COMPATIBLE_IOCTL(HCIDEVDOWN),
-COMPATIBLE_IOCTL(HCIDEVRESET),
-COMPATIBLE_IOCTL(HCIDEVRESTAT),
-COMPATIBLE_IOCTL(HCIGETDEVLIST),
-COMPATIBLE_IOCTL(HCIGETDEVINFO),
-COMPATIBLE_IOCTL(HCIGETCONNLIST),
-COMPATIBLE_IOCTL(HCIGETCONNINFO),
-COMPATIBLE_IOCTL(HCISETRAW),
-COMPATIBLE_IOCTL(HCISETSCAN),
-COMPATIBLE_IOCTL(HCISETAUTH),
-COMPATIBLE_IOCTL(HCISETENCRYPT),
-COMPATIBLE_IOCTL(HCISETPTYPE),
-COMPATIBLE_IOCTL(HCISETLINKPOL),
-COMPATIBLE_IOCTL(HCISETLINKMODE),
-COMPATIBLE_IOCTL(HCISETACLMTU),
-COMPATIBLE_IOCTL(HCISETSCOMTU),
-COMPATIBLE_IOCTL(HCIINQUIRY),
-COMPATIBLE_IOCTL(HCIUARTSETPROTO),
-COMPATIBLE_IOCTL(HCIUARTGETPROTO),
-COMPATIBLE_IOCTL(RFCOMMCREATEDEV),
-COMPATIBLE_IOCTL(RFCOMMRELEASEDEV),
-COMPATIBLE_IOCTL(RFCOMMGETDEVLIST),
-COMPATIBLE_IOCTL(RFCOMMGETDEVINFO),
-COMPATIBLE_IOCTL(RFCOMMSTEALDLC),
-COMPATIBLE_IOCTL(BNEPCONNADD),
-COMPATIBLE_IOCTL(BNEPCONNDEL),
-COMPATIBLE_IOCTL(BNEPGETCONNLIST),
-COMPATIBLE_IOCTL(BNEPGETCONNINFO),
-COMPATIBLE_IOCTL(PCIIOC_CONTROLLER),
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO),
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM),
-COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE),
+COMPATIBLE_IOCTL(HCIDEVUP)
+COMPATIBLE_IOCTL(HCIDEVDOWN)
+COMPATIBLE_IOCTL(HCIDEVRESET)
+COMPATIBLE_IOCTL(HCIDEVRESTAT)
+COMPATIBLE_IOCTL(HCIGETDEVLIST)
+COMPATIBLE_IOCTL(HCIGETDEVINFO)
+COMPATIBLE_IOCTL(HCIGETCONNLIST)
+COMPATIBLE_IOCTL(HCIGETCONNINFO)
+COMPATIBLE_IOCTL(HCISETRAW)
+COMPATIBLE_IOCTL(HCISETSCAN)
+COMPATIBLE_IOCTL(HCISETAUTH)
+COMPATIBLE_IOCTL(HCISETENCRYPT)
+COMPATIBLE_IOCTL(HCISETPTYPE)
+COMPATIBLE_IOCTL(HCISETLINKPOL)
+COMPATIBLE_IOCTL(HCISETLINKMODE)
+COMPATIBLE_IOCTL(HCISETACLMTU)
+COMPATIBLE_IOCTL(HCISETSCOMTU)
+COMPATIBLE_IOCTL(HCIINQUIRY)
+COMPATIBLE_IOCTL(HCIUARTSETPROTO)
+COMPATIBLE_IOCTL(HCIUARTGETPROTO)
+COMPATIBLE_IOCTL(RFCOMMCREATEDEV)
+COMPATIBLE_IOCTL(RFCOMMRELEASEDEV)
+COMPATIBLE_IOCTL(RFCOMMGETDEVLIST)
+COMPATIBLE_IOCTL(RFCOMMGETDEVINFO)
+COMPATIBLE_IOCTL(RFCOMMSTEALDLC)
+COMPATIBLE_IOCTL(BNEPCONNADD)
+COMPATIBLE_IOCTL(BNEPCONNDEL)
+COMPATIBLE_IOCTL(BNEPGETCONNLIST)
+COMPATIBLE_IOCTL(BNEPGETCONNINFO)
+COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
+COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
 /* USB */
-COMPATIBLE_IOCTL(USBDEVFS_RESETEP),
-COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE),
-COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION),
-COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER),
-COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB),
-COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE),
-COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE),
-COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO),
-COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO),
-COMPATIBLE_IOCTL(USBDEVFS_RESET),
-COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT),
+COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
+COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
+COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
+COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
+COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_RESET)
+COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
 /* MTD */
-COMPATIBLE_IOCTL(MEMGETINFO),
-COMPATIBLE_IOCTL(MEMERASE),
-COMPATIBLE_IOCTL(MEMLOCK),
-COMPATIBLE_IOCTL(MEMUNLOCK),
-COMPATIBLE_IOCTL(MEMGETREGIONCOUNT),
-COMPATIBLE_IOCTL(MEMGETREGIONINFO),
+COMPATIBLE_IOCTL(MEMGETINFO)
+COMPATIBLE_IOCTL(MEMERASE)
+COMPATIBLE_IOCTL(MEMLOCK)
+COMPATIBLE_IOCTL(MEMUNLOCK)
+COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
+COMPATIBLE_IOCTL(MEMGETREGIONINFO)
 /* NBD */
-COMPATIBLE_IOCTL(NBD_SET_SOCK),
-COMPATIBLE_IOCTL(NBD_SET_BLKSIZE),
-COMPATIBLE_IOCTL(NBD_SET_SIZE),
-COMPATIBLE_IOCTL(NBD_DO_IT),
-COMPATIBLE_IOCTL(NBD_CLEAR_SOCK),
-COMPATIBLE_IOCTL(NBD_CLEAR_QUE),
-COMPATIBLE_IOCTL(NBD_PRINT_DEBUG),
-COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS),
-COMPATIBLE_IOCTL(NBD_DISCONNECT),
+COMPATIBLE_IOCTL(NBD_SET_SOCK)
+COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
+COMPATIBLE_IOCTL(NBD_SET_SIZE)
+COMPATIBLE_IOCTL(NBD_DO_IT)
+COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
+COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
+COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
+COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
+COMPATIBLE_IOCTL(NBD_DISCONNECT)
 /* device-mapper */
-COMPATIBLE_IOCTL(DM_VERSION),
-COMPATIBLE_IOCTL(DM_REMOVE_ALL),
-COMPATIBLE_IOCTL(DM_DEV_CREATE),
-COMPATIBLE_IOCTL(DM_DEV_REMOVE),
-COMPATIBLE_IOCTL(DM_DEV_RELOAD),
-COMPATIBLE_IOCTL(DM_DEV_SUSPEND),
-COMPATIBLE_IOCTL(DM_DEV_RENAME),
-COMPATIBLE_IOCTL(DM_DEV_DEPS),
-COMPATIBLE_IOCTL(DM_DEV_STATUS),
-COMPATIBLE_IOCTL(DM_TARGET_STATUS),
-COMPATIBLE_IOCTL(DM_TARGET_WAIT),
+COMPATIBLE_IOCTL(DM_VERSION)
+COMPATIBLE_IOCTL(DM_REMOVE_ALL)
+COMPATIBLE_IOCTL(DM_DEV_CREATE)
+COMPATIBLE_IOCTL(DM_DEV_REMOVE)
+COMPATIBLE_IOCTL(DM_DEV_RELOAD)
+COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
+COMPATIBLE_IOCTL(DM_DEV_RENAME)
+COMPATIBLE_IOCTL(DM_DEV_DEPS)
+COMPATIBLE_IOCTL(DM_DEV_STATUS)
+COMPATIBLE_IOCTL(DM_TARGET_STATUS)
+COMPATIBLE_IOCTL(DM_TARGET_WAIT)
 /* And these ioctls need translation */
-HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob),
-HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob),
+HANDLE_IOCTL(MEMREADOOB32, mtd_rw_oob)
+HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob)
 #ifdef CONFIG_NET
-HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32),
+HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
 #endif
-HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf),
-HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFMETRIC, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFMETRIC, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFMTU, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFMTU, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFMEM, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFMEM, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFHWADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFHWADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCADDMULTI, dev_ifsioc),
-HANDLE_IOCTL(SIOCDELMULTI, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFINDEX, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFMAP, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFDSTADDR, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFNETMASK, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFNETMASK, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFPFLAGS, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc),
-HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc),
-HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc),
-HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl),
-HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl),
-HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl),
-HANDLE_IOCTL(SIOCBONDSETHWADDR, bond_ioctl),
-HANDLE_IOCTL(SIOCBONDSLAVEINFOQUERY, bond_ioctl),
-HANDLE_IOCTL(SIOCBONDINFOQUERY, bond_ioctl),
-HANDLE_IOCTL(SIOCBONDCHANGEACTIVE, bond_ioctl),
-HANDLE_IOCTL(SIOCADDRT, routing_ioctl),
-HANDLE_IOCTL(SIOCDELRT, routing_ioctl),
+HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
+HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCADDMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCDELMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFINDEX, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl)
+HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDSETHWADDR, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDSLAVEINFOQUERY, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDINFOQUERY, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDCHANGEACTIVE, bond_ioctl)
+HANDLE_IOCTL(SIOCADDRT, routing_ioctl)
+HANDLE_IOCTL(SIOCDELRT, routing_ioctl)
 /* Note SIOCRTMSG is no longer, so this is safe and
  * the user would have seen just an -EINVAL anyways. */
-HANDLE_IOCTL(SIOCRTMSG, ret_einval),
-HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp),
-HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo),
-HANDLE_IOCTL(HDIO_GETGEO_BIG_RAW, hdio_getgeo_big),
-HANDLE_IOCTL(BLKGETSIZE, w_long),
-HANDLE_IOCTL(BLKRAGET, w_long),
-HANDLE_IOCTL(BLKFRAGET, w_long),
-HANDLE_IOCTL(0x1260, broken_blkgetsize),
-HANDLE_IOCTL(BLKSECTGET, w_long),
-HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_32BIT, hdio_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans),
-HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans),
-HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans),
-HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans),
-HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans),
-HANDLE_IOCTL(FDSETDRVPRM32, fd_ioctl_trans),
-HANDLE_IOCTL(FDGETDRVPRM32, fd_ioctl_trans),
-HANDLE_IOCTL(FDGETDRVSTAT32, fd_ioctl_trans),
-HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans),
-HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans),
-HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans),
-HANDLE_IOCTL(SG_IO,sg_ioctl_trans),
-HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans),
-HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans),
-HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans),
-HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans),
-HANDLE_IOCTL(MTIOCGETCONFIG32, mt_ioctl_trans),
-HANDLE_IOCTL(MTIOCSETCONFIG32, mt_ioctl_trans),
-HANDLE_IOCTL(CDROMREADMODE2, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROMREADMODE1, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROMREADRAW, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROMREADCOOKED, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROMREADALL, cdrom_ioctl_trans),
-HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans),
-HANDLE_IOCTL(LOOP_SET_STATUS, loop_status),
-HANDLE_IOCTL(LOOP_GET_STATUS, loop_status),
-HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout),
+HANDLE_IOCTL(SIOCRTMSG, ret_einval)
+HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
+HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo)
+HANDLE_IOCTL(HDIO_GETGEO_BIG_RAW, hdio_getgeo_big)
+HANDLE_IOCTL(BLKGETSIZE, w_long)
+HANDLE_IOCTL(BLKRAGET, w_long)
+HANDLE_IOCTL(BLKFRAGET, w_long)
+HANDLE_IOCTL(0x1260, broken_blkgetsize)
+HANDLE_IOCTL(BLKSECTGET, w_long)
+HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_32BIT, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans)
+HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans)
+HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDSETDRVPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETDRVPRM32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETDRVSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans)
+HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans)
+HANDLE_IOCTL(SG_IO,sg_ioctl_trans)
+HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans)
+HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans)
+HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCGETCONFIG32, mt_ioctl_trans)
+HANDLE_IOCTL(MTIOCSETCONFIG32, mt_ioctl_trans)
+HANDLE_IOCTL(CDROMREADMODE2, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADMODE1, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADRAW, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADCOOKED, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROMREADALL, cdrom_ioctl_trans)
+HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans)
+HANDLE_IOCTL(LOOP_SET_STATUS, loop_status)
+HANDLE_IOCTL(LOOP_GET_STATUS, loop_status)
+HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout)
 #ifdef CONFIG_VT
-HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl),
-HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl),
-HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl),
-HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl),
-HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl),
-HANDLE_IOCTL(FBIOGET_FSCREENINFO, do_fbioget_fscreeninfo_ioctl),
-HANDLE_IOCTL(FBIOGETCMAP, do_fbiogetcmap_ioctl),
-HANDLE_IOCTL(FBIOPUTCMAP, do_fbioputcmap_ioctl),
+HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl)
+HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl)
+HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl)
+HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl)
+HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl)
+HANDLE_IOCTL(FBIOGET_FSCREENINFO, do_fbioget_fscreeninfo_ioctl)
+HANDLE_IOCTL(FBIOGETCMAP, do_fbiogetcmap_ioctl)
+HANDLE_IOCTL(FBIOPUTCMAP, do_fbioputcmap_ioctl)
 #endif
-HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl),
-HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl),
-HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl),
-HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl),
-HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCSWIN32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCGFBUF32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl),
-HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl),
+HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl)
+HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCSWIN32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCGFBUF32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl)
+HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl)
 /* One SMB ioctl needs translations. */
-HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid),
+HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
 /* NCPFS */
-HANDLE_IOCTL(NCP_IOC_NCPREQUEST_32, do_ncp_ncprequest),
-HANDLE_IOCTL(NCP_IOC_GETMOUNTUID2_32, do_ncp_getmountuid2),
-HANDLE_IOCTL(NCP_IOC_GET_FS_INFO_V2_32, do_ncp_getfsinfo2),
-HANDLE_IOCTL(NCP_IOC_GETOBJECTNAME_32, do_ncp_getobjectname),
-HANDLE_IOCTL(NCP_IOC_SETOBJECTNAME_32, do_ncp_setobjectname),
-HANDLE_IOCTL(NCP_IOC_GETPRIVATEDATA_32, do_ncp_getprivatedata),
-HANDLE_IOCTL(NCP_IOC_SETPRIVATEDATA_32, do_ncp_setprivatedata),
-HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETTYPE32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETESI32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETADDR32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_RSTADDR32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_ADDADDR32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_DELADDR32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETCIRANGE32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_SETCIRANGE32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_SETESI32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_SETESIF32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETSTAT32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETSTATZ32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_GETLOOP32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_SETLOOP32, do_atm_ioctl),
-HANDLE_IOCTL(ATM_QUERYLOOP32, do_atm_ioctl),
-HANDLE_IOCTL(SONET_GETSTAT, do_atm_ioctl),
-HANDLE_IOCTL(SONET_GETSTATZ, do_atm_ioctl),
-HANDLE_IOCTL(SONET_GETDIAG, do_atm_ioctl),
-HANDLE_IOCTL(SONET_SETDIAG, do_atm_ioctl),
-HANDLE_IOCTL(SONET_CLRDIAG, do_atm_ioctl),
-HANDLE_IOCTL(SONET_SETFRAMING, do_atm_ioctl),
-HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl),
-HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl),
+HANDLE_IOCTL(NCP_IOC_NCPREQUEST_32, do_ncp_ncprequest)
+HANDLE_IOCTL(NCP_IOC_GETMOUNTUID2_32, do_ncp_getmountuid2)
+HANDLE_IOCTL(NCP_IOC_GET_FS_INFO_V2_32, do_ncp_getfsinfo2)
+HANDLE_IOCTL(NCP_IOC_GETOBJECTNAME_32, do_ncp_getobjectname)
+HANDLE_IOCTL(NCP_IOC_SETOBJECTNAME_32, do_ncp_setobjectname)
+HANDLE_IOCTL(NCP_IOC_GETPRIVATEDATA_32, do_ncp_getprivatedata)
+HANDLE_IOCTL(NCP_IOC_SETPRIVATEDATA_32, do_ncp_setprivatedata)
+HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETTYPE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETESI32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_RSTADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_ADDADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_DELADDR32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETCIRANGE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETCIRANGE32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETESI32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETESIF32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETSTAT32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETSTATZ32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_GETLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_SETLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(ATM_QUERYLOOP32, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETSTAT, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETSTATZ, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_SETDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_CLRDIAG, do_atm_ioctl)
+HANDLE_IOCTL(SONET_SETFRAMING, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl)
+HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl)
 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
-HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version),
-HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique),
-HANDLE_IOCTL(DRM32_IOCTL_SET_UNIQUE, drm32_getsetunique),
-HANDLE_IOCTL(DRM32_IOCTL_ADD_MAP, drm32_addmap),
-HANDLE_IOCTL(DRM32_IOCTL_INFO_BUFS, drm32_info_bufs),
-HANDLE_IOCTL(DRM32_IOCTL_FREE_BUFS, drm32_free_bufs),
-HANDLE_IOCTL(DRM32_IOCTL_MAP_BUFS, drm32_map_bufs),
-HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma),
-HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx),
+HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version)
+HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique)
+HANDLE_IOCTL(DRM32_IOCTL_SET_UNIQUE, drm32_getsetunique)
+HANDLE_IOCTL(DRM32_IOCTL_ADD_MAP, drm32_addmap)
+HANDLE_IOCTL(DRM32_IOCTL_INFO_BUFS, drm32_info_bufs)
+HANDLE_IOCTL(DRM32_IOCTL_FREE_BUFS, drm32_free_bufs)
+HANDLE_IOCTL(DRM32_IOCTL_MAP_BUFS, drm32_map_bufs)
+HANDLE_IOCTL(DRM32_IOCTL_DMA, drm32_dma)
+HANDLE_IOCTL(DRM32_IOCTL_RES_CTX, drm32_res_ctx)
 #endif /* DRM */
-HANDLE_IOCTL(USBDEVFS_CONTROL32, do_usbdevfs_control),
-HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk),
+HANDLE_IOCTL(USBDEVFS_CONTROL32, do_usbdevfs_control)
+HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk)
 /*HANDLE_IOCTL(USBDEVFS_SUBMITURB32, do_usbdevfs_urb)*/
-HANDLE_IOCTL(USBDEVFS_REAPURB32, do_usbdevfs_reapurb),
-HANDLE_IOCTL(USBDEVFS_REAPURBNDELAY32, do_usbdevfs_reapurb),
-HANDLE_IOCTL(USBDEVFS_DISCSIGNAL32, do_usbdevfs_discsignal),
+HANDLE_IOCTL(USBDEVFS_REAPURB32, do_usbdevfs_reapurb)
+HANDLE_IOCTL(USBDEVFS_REAPURBNDELAY32, do_usbdevfs_reapurb)
+HANDLE_IOCTL(USBDEVFS_DISCSIGNAL32, do_usbdevfs_discsignal)
 /* take care of sizeof(sizeof()) breakage */
 /* block stuff */
-HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget),
-HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset),
-HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64),
+HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget)
+HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset)
+HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64)
 };
-
-unsigned long ioctl32_hash_table[1024];
-
-static inline unsigned long ioctl32_hash(unsigned long cmd)
-{
-	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
-}
-
-static void ioctl32_insert_translation(struct ioctl_trans *trans)
-{
-	unsigned long hash;
-	struct ioctl_trans *t;
-
-	hash = ioctl32_hash (trans->cmd);
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = (long)trans;
-	else {
-		t = (struct ioctl_trans *)ioctl32_hash_table[hash];
-		while (t->next)
-			t = (struct ioctl_trans *)(long)t->next;
-		trans->next = 0;
-		t->next = (long)trans;
-	}
-}
-
-static int __init init_sys32_ioctl(void)
-{
-        int i, size = sizeof(ioctl_translations) / sizeof(struct ioctl_trans);
-        for (i=0; i < size ;i++)
-                ioctl32_insert_translation(&ioctl_translations[i]);
-	return 0;
-}
-
-__initcall(init_sys32_ioctl);
-
-static struct ioctl_trans *additional_ioctls;
-
-/* Always call these with kernel lock held! */
-
-int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
-{
-	int i;
-	if (!additional_ioctls) {
-		additional_ioctls = (struct ioctl_trans *)get_zeroed_page(GFP_KERNEL);
-		if (!additional_ioctls)
-			return -ENOMEM;
-	}
-	for (i = 0; i < PAGE_SIZE/sizeof(struct ioctl_trans); i++) {
-		if (!additional_ioctls[i].cmd)
-			break;
-		if (additional_ioctls[i].cmd == cmd)
-			printk("duplicate ioctl found: %x\n", cmd);
-	}
-	if (i == PAGE_SIZE/sizeof(struct ioctl_trans))
-		return -ENOMEM;
-	additional_ioctls[i].cmd = cmd;
-	if (!handler)
-		additional_ioctls[i].handler = (long)sys_ioctl;
-	else
-		additional_ioctls[i].handler = (long)handler;
-	ioctl32_insert_translation(&additional_ioctls[i]);
-	return 0;
-}
-
-int unregister_ioctl32_conversion(unsigned int cmd)
-{
-	unsigned long hash = ioctl32_hash(cmd);
-	struct ioctl_trans *t, *t1;
-
-	t = (struct ioctl_trans *)ioctl32_hash_table[hash];
-	if (!t) return -EINVAL;
-	if (t->cmd == cmd && t >= additional_ioctls &&
-	    (unsigned long)t < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-		ioctl32_hash_table[hash] = t->next;
-		t->cmd = 0;
-		return 0;
-	} else while (t->next) {
-		t1 = (struct ioctl_trans *)t->next;
-		if (t1->cmd == cmd && t1 >= additional_ioctls &&
-		    (unsigned long)t1 < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-			t1->cmd = 0;
-			t->next = t1->next;
-			return 0;
-		}
-		t = t1;
-	}
-	return -EINVAL;
-}
-
-asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	struct file * filp;
-	int error = -EBADF;
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct ioctl_trans *t;
-
-	filp = fget(fd);
-	if (!filp)
-		goto out2;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	t = (struct ioctl_trans *)ioctl32_hash_table [ioctl32_hash (cmd)];
-
-	while (t && t->cmd != cmd)
-		t = (struct ioctl_trans *)t->next;
-	if (t) {
-		handler = (void *)t->handler;
-		error = handler(fd, cmd, arg, filp);
-	} else {
-		static int count = 0;
-		if (++count <= 20)
-			printk("sys32_ioctl(%s:%d): Unknown cmd fd(%d) "
-			       "cmd(%08x) arg(%08x)\n",
-			       current->comm, current->pid,
-			       (int)fd, (unsigned int)cmd, (unsigned int)arg);
-		error = -EINVAL;
-	}
-out:
-	fput(filp);
-out2:
-	return error;
-}
diff -urN linux-2.5.68-bk10/arch/ppc64/kernel/misc.S linux-2.5.68-bk11/arch/ppc64/kernel/misc.S
--- linux-2.5.68-bk10/arch/ppc64/kernel/misc.S	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk11/arch/ppc64/kernel/misc.S	2003-05-01 04:40:13.000000000 -0700
@@ -556,8 +556,8 @@
 	.llong .sys_acct
 	.llong .sys32_umount
 	.llong .sys_ni_syscall		/* old lock syscall */
-	.llong .sys32_ioctl
-	.llong .compat_sys_fcntl	/* 55 */
+	.llong .compat_sys_ioctl
+	.llong .compat_sys_fcntl		/* 55 */
 	.llong .sys_ni_syscall		/* old mpx syscall */
 	.llong .sys32_setpgid
 	.llong .sys_ni_syscall		/* old ulimit syscall */
diff -urN linux-2.5.68-bk10/arch/s390/kernel/compat_ioctl.c linux-2.5.68-bk11/arch/s390/kernel/compat_ioctl.c
--- linux-2.5.68-bk10/arch/s390/kernel/compat_ioctl.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk11/arch/s390/kernel/compat_ioctl.c	2003-05-01 04:40:13.000000000 -0700
@@ -972,113 +972,3 @@
 
 #define NR_IOCTL32_HANDLERS	(sizeof(ioctl32_handler_table) /	\
 				 sizeof(ioctl32_handler_table[0]))
-
-static struct ioctl32_list *ioctl32_hash_table[1024];
-
-static inline int ioctl32_hash(unsigned int cmd)
-{
-	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
-}
-
-int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct file *filp;
-	struct ioctl32_list *l;
-	int error;
-
-	l = ioctl32_hash_table[ioctl32_hash(cmd)];
-
-	error = -EBADF;
-
-	filp = fget(fd);
-	if (!filp)
-		return error;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	while (l && l->handler.cmd != cmd)
-		l = l->next;
-
-	if (l) {
-		handler = (void *)l->handler.function;
-		error = handler(fd, cmd, arg, filp);
-	} else {
-		error = -EINVAL;
-		printk("unknown ioctl: %08x\n", cmd);
-	}
-out:
-	fput(filp);
-	return error;
-}
-
-static void ioctl32_insert(struct ioctl32_list *entry)
-{
-	int hash = ioctl32_hash(entry->handler.cmd);
-
-	entry->next = 0;
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = entry;
-	else {
-		struct ioctl32_list *l;
-		l = ioctl32_hash_table[hash];
-		while (l->next)
-			l = l->next;
-		l->next = entry;
-	}
-}
-
-int register_ioctl32_conversion(unsigned int cmd,
-				int (*handler)(unsigned int, unsigned int,
-					       unsigned long, struct file *))
-{
-	struct ioctl32_list *l, *new;
-	int hash;
-
-	hash = ioctl32_hash(cmd);
-	for (l = ioctl32_hash_table[hash]; l != NULL; l = l->next)
-		if (l->handler.cmd == cmd)
-			return -EBUSY;
-	new = kmalloc(sizeof(struct ioctl32_list), GFP_KERNEL);
-	if (new == NULL)
-		return -ENOMEM;
-	new->handler.cmd = cmd;
-	new->handler.function = (void *) handler;
-	ioctl32_insert(new);
-	return 0;
-}
-
-int unregister_ioctl32_conversion(unsigned int cmd)
-{
-	struct ioctl32_list *p, *l;
-	int hash;
-
-	hash = ioctl32_hash(cmd);
-	p = NULL;
-	for (l = ioctl32_hash_table[hash]; l != NULL; l = l->next) {
-		if (l->handler.cmd == cmd)
-			break;
-		p = l;
-	}
-	if (l == NULL)
-		return -ENOENT;
-	if (p == NULL)
-		ioctl32_hash_table[hash] = l->next;
-	else
-		p->next = l->next;
-	kfree(l);
-	return 0;
-}
-
-static int __init init_ioctl32(void)
-{
-	int i;
-	for (i = 0; i < NR_IOCTL32_HANDLERS; i++)
-		ioctl32_insert(&ioctl32_handler_table[i]);
-	return 0;
-}
-
-__initcall(init_ioctl32);
diff -urN linux-2.5.68-bk10/arch/sparc/kernel/ioport.c linux-2.5.68-bk11/arch/sparc/kernel/ioport.c
--- linux-2.5.68-bk10/arch/sparc/kernel/ioport.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/kernel/ioport.c	2003-05-01 04:40:13.000000000 -0700
@@ -62,13 +62,6 @@
 };
 
 /*
- * BTFIXUP would do as well but it seems overkill for the case.
- */
-static void (*_sparc_mapioaddr)(unsigned long pa, unsigned long va,
-    int bus, int ro);
-static void (*_sparc_unmapioaddr)(unsigned long va);
-
-/*
  * Our mini-allocator...
  * Boy this is gross! We need it because we must map I/O for
  * timers and interrupt controller before the kmalloc is available.
@@ -201,8 +194,6 @@
 _sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz)
 {
 	unsigned long offset = ((unsigned long) pa) & (~PAGE_MASK);
-	unsigned long va;
-	unsigned int psz;
 
 	if (allocate_resource(&sparc_iomap, res,
 	    (offset + sz + PAGE_SIZE-1) & PAGE_MASK,
@@ -213,27 +204,10 @@
 		prom_halt();
 	}
 
-	va = res->start;
 	pa &= PAGE_MASK;
-	for (psz = res->end - res->start + 1; psz != 0; psz -= PAGE_SIZE) {
-		(*_sparc_mapioaddr)(pa, va, bus, 0);
-		va += PAGE_SIZE;
-		pa += PAGE_SIZE;
-	}
+	sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
 
-	/*
-	 * XXX Playing with implementation details here.
-	 * On sparc64 Ebus has resources with precise boundaries.
-	 * We share drivers with sparc64. Too clever drivers use
-	 * start of a resource instead of a base address.
-	 *
-	 * XXX-2 This may be not valid anymore, clean when
-	 * interface to sbus_ioremap() is resolved.
-	 */
-	res->start += offset;
-	res->end = res->start + sz - 1;		/* not strictly necessary.. */
-
-	return (void *) res->start;
+	return (void *) (res->start + offset);
 }
 
 /*
@@ -244,12 +218,8 @@
 	unsigned long plen;
 
 	plen = res->end - res->start + 1;
-	plen = (plen + PAGE_SIZE-1) & PAGE_MASK;
-	while (plen != 0) {
-		plen -= PAGE_SIZE;
-		(*_sparc_unmapioaddr)(res->start + plen);
-	}
-
+	if ((plen & (PAGE_SIZE-1)) != 0) BUG();
+	sparc_unmapiorange(res->start, plen);
 	release_resource(res);
 }
 
@@ -283,40 +253,44 @@
 	}
 
 	order = get_order(len_total);
-	va = __get_free_pages(GFP_KERNEL, order);
-	if (va == 0) {
-		/*
-		 * printk here may be flooding... Consider removal XXX.
-		 */
-		printk("sbus_alloc_consistent: no %ld pages\n", len_total>>PAGE_SHIFT);
-		return NULL;
-	}
+	if ((va = __get_free_pages(GFP_KERNEL, order)) == 0)
+		goto err_nopages;
 
-	if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
-		free_pages(va, order);
-		printk("sbus_alloc_consistent: no core\n");
-		return NULL;
-	}
+	if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL)
+		goto err_nomem;
 	memset((char*)res, 0, sizeof(struct resource));
 
 	if (allocate_resource(&_sparc_dvma, res, len_total,
 	    _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE, NULL, NULL) != 0) {
 		printk("sbus_alloc_consistent: cannot occupy 0x%lx", len_total);
-		free_pages(va, order);
-		kfree(res);
-		return NULL;
+		goto err_nova;
 	}
+	mmu_inval_dma_area(va, len_total);
+	// XXX The mmu_map_dma_area does this for us below, see comments.
+	// sparc_mapiorange(0, virt_to_phys(va), res->start, len_total);
+	/*
+	 * XXX That's where sdev would be used. Currently we load
+	 * all iommu tables with the same translations.
+	 */
+	if (mmu_map_dma_area(dma_addrp, va, res->start, len_total) != 0)
+		goto err_noiommu;
 
-	mmu_map_dma_area(va, res->start, len_total);
-
-	*dma_addrp = res->start;
 	return (void *)res->start;
+
+err_noiommu:
+	release_resource(res);
+err_nova:
+	free_pages(va, order);
+err_nomem:
+	kfree(res);
+err_nopages:
+	return NULL;
 }
 
 void sbus_free_consistent(struct sbus_dev *sdev, long n, void *p, u32 ba)
 {
 	struct resource *res;
-	unsigned long pgp;
+	struct page *pgv;
 
 	if ((res = _sparc_find_resource(&_sparc_dvma,
 	    (unsigned long)p)) == NULL) {
@@ -340,10 +314,10 @@
 	kfree(res);
 
 	/* mmu_inval_dma_area(va, n); */ /* it's consistent, isn't it */
-	pgp = (unsigned long) phys_to_virt(mmu_translate_dvma(ba));
+	pgv = mmu_translate_dvma(ba);
 	mmu_unmap_dma_area(ba, n);
 
-	free_pages(pgp, get_order(n));
+	__free_pages(pgv, get_order(n));
 }
 
 /*
@@ -353,39 +327,6 @@
  */
 dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *va, size_t len, int direction)
 {
-#if 0 /* This is the version that abuses consistent space */
-	unsigned long len_total = (len + PAGE_SIZE-1) & PAGE_MASK;
-	struct resource *res;
-
-	/* XXX why are some lenghts signed, others unsigned? */
-	if (len <= 0) {
-		return 0;
-	}
-	/* XXX So what is maxphys for us and how do drivers know it? */
-	if (len > 256*1024) {			/* __get_free_pages() limit */
-		return 0;
-	}
-
-	if ((res = kmalloc(sizeof(struct resource), GFP_KERNEL)) == NULL) {
-		printk("sbus_map_single: no core\n");
-		return 0;
-	}
-	memset((char*)res, 0, sizeof(struct resource));
-	res->name = va; /* XXX */
-
-	if (allocate_resource(&_sparc_dvma, res, len_total,
-	    _sparc_dvma.start, _sparc_dvma.end, PAGE_SIZE) != 0) {
-		printk("sbus_map_single: cannot occupy 0x%lx", len);
-		kfree(res);
-		return 0;
-	}
-
-	mmu_map_dma_area(va, res->start, len_total);
-	mmu_flush_dma_area((unsigned long)va, len_total); /* in all contexts? */
-
-	return res->start;
-#endif
-#if 1 /* "trampoline" version */
 	/* XXX why are some lenghts signed, others unsigned? */
 	if (len <= 0) {
 		return 0;
@@ -395,36 +336,11 @@
 		return 0;
 	}
 	return mmu_get_scsi_one(va, len, sdev->bus);
-#endif
 }
 
 void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t ba, size_t n, int direction)
 {
-#if 0 /* This is the version that abuses consistent space */
-	struct resource *res;
-	unsigned long va;
-
-	if ((res = _sparc_find_resource(&_sparc_dvma, ba)) == NULL) {
-		printk("sbus_unmap_single: cannot find %08x\n", (unsigned)ba);
-		return;
-	}
-
-	n = (n + PAGE_SIZE-1) & PAGE_MASK;
-	if ((res->end-res->start)+1 != n) {
-		printk("sbus_unmap_single: region 0x%lx asked 0x%lx\n",
-		    (long)((res->end-res->start)+1), n);
-		return;
-	}
-
-	va = (unsigned long) res->name;	/* XXX Ouch */
-	mmu_inval_dma_area(va, n);	/* in all contexts, mm's?... */
-	mmu_unmap_dma_area(ba, n);	/* iounit cache flush is here */
-	release_resource(res);
-	kfree(res);
-#endif
-#if 1 /* "trampoline" version */
 	mmu_release_scsi_one(ba, n, sdev->bus);
-#endif
 }
 
 int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg, int n, int direction)
@@ -456,7 +372,7 @@
 	if (res == NULL)
 		panic("sbus_dma_sync_single: 0x%x\n", ba);
 
-	va = (unsigned long) phys_to_virt(mmu_translate_dvma(ba));
+	va = page_address(mmu_translate_dvma(ba)); /* XXX higmem */
 	/*
 	 * XXX This bogosity will be fixed with the iommu rewrite coming soon
 	 * to a kernel near you. - Anton
@@ -511,24 +427,12 @@
 		kfree(res);
 		return NULL;
 	}
-
 	mmu_inval_dma_area(va, len_total);
-
 #if 0
-/* P3 */ printk("pci_alloc_consistent: kva %lx uncva %lx phys %lx size %x\n",
+/* P3 */ printk("pci_alloc_consistent: kva %lx uncva %lx phys %lx size %lx\n",
   (long)va, (long)res->start, (long)virt_to_phys(va), len_total);
 #endif
-	{
-		unsigned long xva, xpa;
-		xva = res->start;
-		xpa = virt_to_phys(va);
-		while (len_total != 0) {
-			len_total -= PAGE_SIZE;
-			(*_sparc_mapioaddr)(xpa, xva, 0, 0);
-			xva += PAGE_SIZE;
-			xpa += PAGE_SIZE;
-		}
-	}
+	sparc_mapiorange(0, virt_to_phys(va), res->start, len_total);
 
 	*pba = virt_to_phys(va); /* equals virt_to_bus (R.I.P.) for us. */
 	return (void *) res->start;
@@ -567,12 +471,7 @@
 
 	pgp = (unsigned long) phys_to_virt(ba);	/* bus_to_virt actually */
 	mmu_inval_dma_area(pgp, n);
-	{
-		int x;
-		for (x = 0; x < n; x += PAGE_SIZE) {
-			(*_sparc_unmapioaddr)((unsigned long)p + n);
-		}
-	}
+	sparc_unmapiorange((unsigned long)p, n);
 
 	release_resource(res);
 	kfree(res);
@@ -751,37 +650,6 @@
 	return NULL;
 }
 
-/*
- * Necessary boot time initializations.
- */
-
-void ioport_init(void)
-{
-	extern void sun4c_mapioaddr(unsigned long, unsigned long, int, int);
-	extern void srmmu_mapioaddr(unsigned long, unsigned long, int, int);
-	extern void sun4c_unmapioaddr(unsigned long);
-	extern void srmmu_unmapioaddr(unsigned long);
-
-	switch(sparc_cpu_model) {
-	case sun4c:
-	case sun4:
-	case sun4e:
-		_sparc_mapioaddr = sun4c_mapioaddr;
-		_sparc_unmapioaddr = sun4c_unmapioaddr;
-		break;
-	case sun4m:
-	case sun4d:
-		_sparc_mapioaddr = srmmu_mapioaddr;
-		_sparc_unmapioaddr = srmmu_unmapioaddr;
-		break;
-	default:
-		printk("ioport_init: cpu type %d is unknown.\n",
-		    sparc_cpu_model);
-		prom_halt();
-	};
-
-}
-
 void register_proc_sparc_ioport(void)
 {
 #ifdef CONFIG_PROC_FS
diff -urN linux-2.5.68-bk10/arch/sparc/lib/Makefile linux-2.5.68-bk11/arch/sparc/lib/Makefile
--- linux-2.5.68-bk10/arch/sparc/lib/Makefile	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/lib/Makefile	2003-05-01 04:40:14.000000000 -0700
@@ -10,4 +10,4 @@
          strlen.o checksum.o blockops.o memscan.o memcmp.o strncmp.o \
 	 strncpy_from_user.o divdi3.o udivdi3.o strlen_user.o \
 	 copy_user.o locks.o atomic.o bitops.o debuglocks.o lshrdi3.o \
-	 ashldi3.o rwsem.o muldi3.o
+	 ashldi3.o rwsem.o muldi3.o bitext.o
diff -urN linux-2.5.68-bk10/arch/sparc/lib/bitext.c linux-2.5.68-bk11/arch/sparc/lib/bitext.c
--- linux-2.5.68-bk10/arch/sparc/lib/bitext.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.68-bk11/arch/sparc/lib/bitext.c	2003-05-01 04:40:14.000000000 -0700
@@ -0,0 +1,114 @@
+/*
+ * bitext.c: kernel little helper (of bit shuffling variety).
+ *
+ * Copyright (C) 2002 Pete Zaitcev <zaitcev@yahoo.com>
+ *
+ * The algorithm to search a zero bit string is geared towards its application.
+ * We expect a couple of fixed sizes of requests, so a rotating counter, reset
+ * by align size, should provide fast enough search while maintaining low
+ * fragmentation.
+ */
+
+#include <linux/smp_lock.h>
+
+#include <asm/bitext.h>
+#include <asm/bitops.h>
+
+/**
+ * bit_map_string_get - find and set a bit string in bit map.
+ * @t: the bit map.
+ * @len: requested string length
+ * @align: requested alignment
+ *
+ * Returns offset in the map or -1 if out of space.
+ *
+ * Not safe to call from an interrupt (uses spin_lock).
+ */
+int bit_map_string_get(struct bit_map *t, int len, int align)
+{
+	int offset, count;	/* siamese twins */
+	int off_new;
+	int align1;
+	int i;
+
+	if (align == 0)
+		align = 1;
+	align1 = align - 1;
+	if ((align & align1) != 0)
+		BUG();
+	if (align < 0 || align >= t->size)
+		BUG();
+	if (len <= 0 || len > t->size)
+		BUG();
+
+	spin_lock(&t->lock);
+	offset = t->last_off & ~align1;
+	count = 0;
+	for (;;) {
+		off_new = find_next_zero_bit(t->map, t->size, offset);
+		off_new = (off_new + align1) & ~align1;
+		count += off_new - offset;
+		offset = off_new;
+		if (offset >= t->size)
+			offset = 0;
+		if (count + len > t->size) {
+			spin_unlock(&t->lock);
+/* P3 */ printk(KERN_ERR
+  "bitmap out: size %d used %d off %d len %d align %d count %d\n",
+  t->size, t->used, offset, len, align, count);
+			return -1;
+		}
+
+		if (offset + len > t->size) {
+			offset = 0;
+			count += t->size - offset;
+			continue;
+		}
+
+		i = 0;
+		while (test_bit(offset + i, t->map) == 0) {
+			i++;
+			if (i == len) {
+				for (i = 0; i < len; i++)
+					__set_bit(offset + i, t->map);
+				if ((t->last_off = offset + len) >= t->size)
+					t->last_off = 0;
+				t->used += len;
+				spin_unlock(&t->lock);
+				return offset;
+			}
+		}
+		count += i + 1;
+		if ((offset += i + 1) >= t->size)
+			offset = 0;
+	}
+}
+
+void bit_map_clear(struct bit_map *t, int offset, int len)
+{
+	int i;
+
+	if (t->used < len)
+		BUG();		/* Much too late to do any good, but alas... */
+	spin_lock(&t->lock);
+	for (i = 0; i < len; i++) {
+		if (test_bit(offset + i, t->map) == 0)
+			BUG();
+		__clear_bit(offset + i, t->map);
+	}
+	t->used -= len;
+	spin_unlock(&t->lock);
+}
+
+void bit_map_init(struct bit_map *t, unsigned long *map, int size)
+{
+
+	if ((size & 07) != 0)
+		BUG();
+	memset(map, 0, size>>3);
+
+	memset(t, 0, sizeof *t);
+	spin_lock_init(&t->lock);
+	t->map = map;
+	t->size = size;
+}
diff -urN linux-2.5.68-bk10/arch/sparc/mm/init.c linux-2.5.68-bk11/arch/sparc/mm/init.c
--- linux-2.5.68-bk10/arch/sparc/mm/init.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/init.c	2003-05-01 04:40:14.000000000 -0700
@@ -88,8 +88,6 @@
 #endif
 }
 
-extern pgprot_t protection_map[16];
-
 void __init sparc_context_init(int numctx)
 {
 	int ctx;
diff -urN linux-2.5.68-bk10/arch/sparc/mm/io-unit.c linux-2.5.68-bk11/arch/sparc/mm/io-unit.c
--- linux-2.5.68-bk10/arch/sparc/mm/io-unit.c	2003-04-19 19:49:23.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/io-unit.c	2003-05-01 04:40:14.000000000 -0700
@@ -176,13 +176,15 @@
 }
 
 #ifdef CONFIG_SBUS
-static void iounit_map_dma_area(unsigned long va, __u32 addr, int len)
+static int iounit_map_dma_area(dma_addr_t *pba, unsigned long va, __u32 addr, int len)
 {
 	unsigned long page, end;
 	pgprot_t dvma_prot;
 	iopte_t *iopte;
 	struct sbus_bus *sbus;
 
+	*pba = addr;
+
 	dvma_prot = __pgprot(SRMMU_CACHE | SRMMU_ET_PTE | SRMMU_PRIV);
 	end = PAGE_ALIGN((addr + len));
 	while(addr < end) {
@@ -213,6 +215,8 @@
 	}
 	flush_cache_all();
 	flush_tlb_all();
+
+	return 0;
 }
 
 static void iounit_unmap_dma_area(unsigned long addr, int len)
@@ -221,7 +225,7 @@
 }
 
 /* XXX We do not pass sbus device here, bad. */
-static unsigned long iounit_translate_dvma(unsigned long addr)
+static struct page *iounit_translate_dvma(unsigned long addr)
 {
 	struct sbus_bus *sbus = sbus_root;	/* They are all the same */
 	struct iounit_struct *iounit = (struct iounit_struct *)sbus->iommu;
@@ -230,7 +234,7 @@
 
 	i = ((addr - IOUNIT_DMA_BASE) >> PAGE_SHIFT);
 	iopte = (iopte_t *)(iounit->page_table + i);
-	return (iopte_val(*iopte) & 0xFFFFFFF0) << 4; /* XXX sun4d guru, help */
+	return pfn_to_page(iopte_val(*iopte) >> (PAGE_SHIFT-4)); /* XXX sun4d guru, help */
 }
 #endif
 
diff -urN linux-2.5.68-bk10/arch/sparc/mm/iommu.c linux-2.5.68-bk11/arch/sparc/mm/iommu.c
--- linux-2.5.68-bk10/arch/sparc/mm/iommu.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/iommu.c	2003-05-01 04:40:14.000000000 -0700
@@ -23,6 +23,18 @@
 #include <asm/mbus.h>
 #include <asm/cacheflush.h>
 #include <asm/tlbflush.h>
+#include <asm/bitext.h>
+#include <asm/iommu.h>
+
+/*
+ * This can be sized dynamically, but we will do this
+ * only when we have a guidance about actual I/O pressures.
+ */
+#define IOMMU_RNGE	IOMMU_RNGE_256MB
+#define IOMMU_START	0xF0000000
+#define IOMMU_WINSIZE	(256*1024*1024U)
+#define IOMMU_NPTES	(IOMMU_WINSIZE/PAGE_SIZE)	/* 64K PTEs, 265KB */
+#define IOMMU_ORDER	6				/* 4096 * (1<<6) */
 
 /* srmmu.c */
 extern int viking_mxcc_present;
@@ -34,34 +46,30 @@
 extern void viking_flush_page(unsigned long page);
 extern void viking_mxcc_flush_page(unsigned long page);
 
-#define IOPERM        (IOPTE_CACHE | IOPTE_WRITE | IOPTE_VALID)
-#define MKIOPTE(phys) (((((phys)>>4) & IOPTE_PAGE) | IOPERM) & ~IOPTE_WAZ)
-
-static inline void iommu_map_dvma_pages_for_iommu(struct iommu_struct *iommu)
-{
-	unsigned long kern_end = (unsigned long) high_memory;
-	unsigned long first = PAGE_OFFSET;
-	unsigned long last = kern_end;
-	iopte_t *iopte = iommu->page_table;
+/*
+ * Values precomputed according to CPU type.
+ */
+static unsigned int ioperm_noc;		/* Consistent mapping iopte flags */
+static pgprot_t dvma_prot;		/* Consistent mapping pte flags */
 
-	iopte += ((first - iommu->start) >> PAGE_SHIFT);
-	while(first <= last) {
-		*iopte++ = __iopte(MKIOPTE(__pa(first)));
-		first += PAGE_SIZE;
-	}
-}
+#define IOPERM        (IOPTE_CACHE | IOPTE_WRITE | IOPTE_VALID)
+#define MKIOPTE(pfn, perm) (((((pfn)<<8) & IOPTE_PAGE) | (perm)) & ~IOPTE_WAZ)
 
 void __init
 iommu_init(int iommund, struct sbus_bus *sbus)
 {
-	unsigned int impl, vers, ptsize;
+	unsigned int impl, vers;
 	unsigned long tmp;
 	struct iommu_struct *iommu;
 	struct linux_prom_registers iommu_promregs[PROMREG_MAX];
 	struct resource r;
-	int i;
+	unsigned long *bitmap;
 
 	iommu = kmalloc(sizeof(struct iommu_struct), GFP_ATOMIC);
+	if (!iommu) {
+		prom_printf("Unable to allocate iommu structure\n");
+		prom_halt();
+	}
 	prom_getproperty(iommund, "reg", (void *) iommu_promregs,
 			 sizeof(iommu_promregs));
 	memset(&r, 0, sizeof(r));
@@ -69,93 +77,129 @@
 	r.start = iommu_promregs[0].phys_addr;
 	iommu->regs = (struct iommu_regs *)
 		sbus_ioremap(&r, 0, PAGE_SIZE * 3, "iommu_regs");
-	if(!iommu->regs)
-		panic("Cannot map IOMMU registers.");
+	if(!iommu->regs) {
+		prom_printf("Cannot map IOMMU registers\n");
+		prom_halt();
+	}
 	impl = (iommu->regs->control & IOMMU_CTRL_IMPL) >> 28;
 	vers = (iommu->regs->control & IOMMU_CTRL_VERS) >> 24;
 	tmp = iommu->regs->control;
 	tmp &= ~(IOMMU_CTRL_RNGE);
-	switch(PAGE_OFFSET & 0xf0000000) {
-	case 0xf0000000:
-		tmp |= (IOMMU_RNGE_256MB | IOMMU_CTRL_ENAB);
-		iommu->plow = iommu->start = 0xf0000000;
-		break;
-	case 0xe0000000:
-		tmp |= (IOMMU_RNGE_512MB | IOMMU_CTRL_ENAB);
-		iommu->plow = iommu->start = 0xe0000000;
-		break;
-	case 0xd0000000:
-	case 0xc0000000:
-		tmp |= (IOMMU_RNGE_1GB | IOMMU_CTRL_ENAB);
-		iommu->plow = iommu->start = 0xc0000000;
-		break;
-	case 0xb0000000:
-	case 0xa0000000:
-	case 0x90000000:
-	case 0x80000000:
-		tmp |= (IOMMU_RNGE_2GB | IOMMU_CTRL_ENAB);
-		iommu->plow = iommu->start = 0x80000000;
-		break;
-	}
+	tmp |= (IOMMU_RNGE_256MB | IOMMU_CTRL_ENAB);
 	iommu->regs->control = tmp;
 	iommu_invalidate(iommu->regs);
+	iommu->start = IOMMU_START;
 	iommu->end = 0xffffffff;
 
 	/* Allocate IOMMU page table */
-	ptsize = iommu->end - iommu->start + 1;
-	ptsize = (ptsize >> PAGE_SHIFT) * sizeof(iopte_t);
-
 	/* Stupid alignment constraints give me a headache. 
 	   We need 256K or 512K or 1M or 2M area aligned to
            its size and current gfp will fortunately give
            it to us. */
-	for (i = 6; i < 9; i++)
-		if ((1 << (i + PAGE_SHIFT)) == ptsize)
-			break;
-        tmp = __get_free_pages(GFP_KERNEL, i);
+        tmp = __get_free_pages(GFP_KERNEL, IOMMU_ORDER);
 	if (!tmp) {
-		prom_printf("Could not allocate iopte of size 0x%08x\n", ptsize);
+		prom_printf("Unable to allocate iommu table [0x%08x]\n",
+			    IOMMU_NPTES*sizeof(iopte_t));
 		prom_halt();
 	}
-	iommu->lowest = iommu->page_table = (iopte_t *)tmp;
+	iommu->page_table = (iopte_t *)tmp;
 
 	/* Initialize new table. */
+	memset(iommu->page_table, 0, IOMMU_NPTES*sizeof(iopte_t));
 	flush_cache_all();
-	memset(iommu->page_table, 0, ptsize);
-	iommu_map_dvma_pages_for_iommu(iommu);
-	if(viking_mxcc_present) {
-		unsigned long start = (unsigned long) iommu->page_table;
-		unsigned long end = (start + ptsize);
+	flush_tlb_all();
+	iommu->regs->base = __pa((unsigned long) iommu->page_table) >> 4;
+	iommu_invalidate(iommu->regs);
+
+	bitmap = kmalloc(IOMMU_NPTES>>3, GFP_KERNEL);
+	if (!bitmap) {
+		prom_printf("Unable to allocate iommu bitmap [%d]\n",
+			    (int)(IOMMU_NPTES>>3));
+		prom_halt();
+	}
+	bit_map_init(&iommu->usemap, bitmap, IOMMU_NPTES);
+
+	printk("IOMMU: impl %d vers %d table 0x%p[%d B] map [%d b]\n",
+	    impl, vers, iommu->page_table,
+	    (int)(IOMMU_NPTES*sizeof(iopte_t)), (int)IOMMU_NPTES);
+
+	sbus->iommu = iommu;
+}
+
+/* This begs to be btfixup-ed by srmmu. */
+static void iommu_viking_flush_iotlb(iopte_t *iopte, unsigned int niopte)
+{
+	unsigned long start;
+	unsigned long end;
+
+	start = (unsigned long)iopte & PAGE_MASK;
+	end = PAGE_ALIGN(start + niopte*sizeof(iopte_t));
+	if (viking_mxcc_present) {
 		while(start < end) {
 			viking_mxcc_flush_page(start);
 			start += PAGE_SIZE;
 		}
 	} else if (viking_flush) {
-		unsigned long start = (unsigned long) iommu->page_table;
-		unsigned long end = (start + ptsize);
 		while(start < end) {
 			viking_flush_page(start);
 			start += PAGE_SIZE;
 		}
 	}
-	flush_tlb_all();
-	iommu->regs->base = __pa((unsigned long) iommu->page_table) >> 4;
-	iommu_invalidate(iommu->regs);
+}
 
-	sbus->iommu = iommu;
-	printk("IOMMU: impl %d vers %d page table at %p of size %d bytes\n",
-	       impl, vers, iommu->page_table, ptsize);
+static u32 iommu_get_one(struct page *page, int npages, struct sbus_bus *sbus)
+{
+	struct iommu_struct *iommu = sbus->iommu;
+	int ioptex;
+	iopte_t *iopte, *iopte0;
+	unsigned int busa, busa0;
+	int i;
+
+	ioptex = bit_map_string_get(&iommu->usemap, npages, 1);
+	if (ioptex < 0)
+		panic("iommu out");
+	busa0 = iommu->start + (ioptex << PAGE_SHIFT);
+	iopte0 = &iommu->page_table[ioptex];
+
+	busa = busa0;
+	iopte = iopte0;
+	for (i = 0; i < npages; i++) {
+		iopte_val(*iopte) = MKIOPTE(page_to_pfn(page), IOPERM);
+		iommu_invalidate_page(iommu->regs, busa);
+		busa += PAGE_SIZE;
+		iopte++;
+		page++;
+	}
+
+	iommu_viking_flush_iotlb(iopte0, npages);
+
+	return busa0;
+}
+
+static u32 iommu_get_scsi_one(char *vaddr, unsigned int len,
+    struct sbus_bus *sbus)
+{
+	unsigned long off;
+	int npages;
+	struct page *page;
+	u32 busa;
+
+	off = (unsigned long)vaddr & ~PAGE_MASK;
+	npages = (off + len + PAGE_SIZE-1) >> PAGE_SHIFT;
+	page = virt_to_page((unsigned long)vaddr & PAGE_MASK);
+	busa = iommu_get_one(page, npages, sbus);
+	return busa + off;
 }
 
 static __u32 iommu_get_scsi_one_noflush(char *vaddr, unsigned long len, struct sbus_bus *sbus)
 {
-	return (__u32)vaddr;
+	return iommu_get_scsi_one(vaddr, len, sbus);
 }
 
 static __u32 iommu_get_scsi_one_gflush(char *vaddr, unsigned long len, struct sbus_bus *sbus)
 {
 	flush_page_for_dma(0);
-	return (__u32)vaddr;
+	return iommu_get_scsi_one(vaddr, len, sbus);
 }
 
 static __u32 iommu_get_scsi_one_pflush(char *vaddr, unsigned long len, struct sbus_bus *sbus)
@@ -166,75 +210,129 @@
 		flush_page_for_dma(page);
 		page += PAGE_SIZE;
 	}
-	return (__u32)vaddr;
+	return iommu_get_scsi_one(vaddr, len, sbus);
 }
 
 static void iommu_get_scsi_sgl_noflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus)
 {
+	int n;
+
 	while (sz != 0) {
 		--sz;
-		sg[sz].dvma_address = (__u32) (page_address(sg[sz].page) + sg[sz].offset);
-		sg[sz].dvma_length = (__u32) (sg[sz].length);
+		n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
+		sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset;
+		sg->dvma_length = (__u32) sg->length;
+		sg++;
 	}
 }
 
 static void iommu_get_scsi_sgl_gflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus)
 {
+	int n;
+
 	flush_page_for_dma(0);
 	while (sz != 0) {
 		--sz;
-		sg[sz].dvma_address = (__u32) (page_address(sg[sz].page) + sg[sz].offset);
-		sg[sz].dvma_length = (__u32) (sg[sz].length);
+		n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
+		sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset;
+		sg->dvma_length = (__u32) sg->length;
+		sg++;
 	}
 }
 
 static void iommu_get_scsi_sgl_pflush(struct scatterlist *sg, int sz, struct sbus_bus *sbus)
 {
 	unsigned long page, oldpage = 0;
+	int n, i;
 
 	while(sz != 0) {
 		--sz;
-		page = (unsigned long) page_address(sg[sz].page);
-		if (oldpage == page)
-			page += PAGE_SIZE; /* We flushed that page already */
-		while(page < (unsigned long)(page_address(sg[sz].page) + sg[sz].offset + sg[sz].length)) {
-			flush_page_for_dma(page);
-			page += PAGE_SIZE;
+
+		n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
+
+		/*
+		 * We expect unmapped highmem pages to be not in the cache.
+		 * XXX Is this a good assumption?
+		 * XXX What if someone else unmaps it here and races us?
+		 */
+		if ((page = (unsigned long) page_address(sg->page)) != 0) {
+			for (i = 0; i < n; i++) {
+				if (page != oldpage) {	/* Already flushed? */
+					flush_page_for_dma(page);
+					oldpage = page;
+				}
+				page += PAGE_SIZE;
+			}
 		}
-		sg[sz].dvma_address = (__u32) (page_address(sg[sz].page) + sg[sz].offset);
-		sg[sz].dvma_length = (__u32) (sg[sz].length);
-		oldpage = page - PAGE_SIZE;
+
+		sg->dvma_address = iommu_get_one(sg->page, n, sbus) + sg->offset;
+		sg->dvma_length = (__u32) sg->length;
+		sg++;
+	}
+}
+
+static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
+{
+	struct iommu_struct *iommu = sbus->iommu;
+	int ioptex;
+	int i;
+
+	if (busa < iommu->start)
+		BUG();
+	ioptex = (busa - iommu->start) >> PAGE_SHIFT;
+	for (i = 0; i < npages; i++) {
+		iopte_val(iommu->page_table[ioptex + i]) = 0;
+		iommu_invalidate_page(iommu->regs, busa);
+		busa += PAGE_SIZE;
 	}
+	bit_map_clear(&iommu->usemap, ioptex, npages);
 }
 
 static void iommu_release_scsi_one(__u32 vaddr, unsigned long len, struct sbus_bus *sbus)
 {
+	unsigned long off;
+	int npages;
+
+	off = vaddr & ~PAGE_MASK;
+	npages = (off + len + PAGE_SIZE-1) >> PAGE_SHIFT;
+	iommu_release_one(vaddr & PAGE_MASK, npages, sbus);
 }
 
 static void iommu_release_scsi_sgl(struct scatterlist *sg, int sz, struct sbus_bus *sbus)
 {
+	int n;
+
+	while(sz != 0) {
+		--sz;
+
+		n = (sg->length + sg->offset + PAGE_SIZE-1) >> PAGE_SHIFT;
+		iommu_release_one(sg->dvma_address & PAGE_MASK, n, sbus);
+		sg->dvma_address = 0x21212121;
+		sg++;
+	}
 }
 
 #ifdef CONFIG_SBUS
-static void iommu_map_dma_area(unsigned long va, __u32 addr, int len)
+static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
+    unsigned long addr, int len)
 {
-	unsigned long page, end, ipte_cache;
-	pgprot_t dvma_prot;
+	unsigned long page, end;
 	struct iommu_struct *iommu = sbus_root->iommu;
 	iopte_t *iopte = iommu->page_table;
 	iopte_t *first;
+	int ioptex;
 
-	if(viking_mxcc_present || srmmu_modtype == HyperSparc) {
-		dvma_prot = __pgprot(SRMMU_CACHE | SRMMU_ET_PTE | SRMMU_PRIV);
-		ipte_cache = 1;
-	} else {
-		dvma_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV);
-		ipte_cache = 0;
-	}
+	if ((va & ~PAGE_MASK) != 0) BUG();
+	if ((addr & ~PAGE_MASK) != 0) BUG();
+	if ((len & ~PAGE_MASK) != 0) BUG();
+
+	ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT, 1);
+	if (ioptex < 0)
+		panic("iommu out");
 
-	iopte += ((addr - iommu->start) >> PAGE_SHIFT);
+	iopte += ioptex;
 	first = iopte;
-	end = PAGE_ALIGN((addr + len));
+	end = addr + len;
 	while(addr < end) {
 		page = va;
 		{
@@ -252,16 +350,11 @@
 			pgdp = pgd_offset(&init_mm, addr);
 			pmdp = pmd_offset(pgdp, addr);
 			ptep = pte_offset_map(pmdp, addr);
-			/* XXX What if we run out of atomic maps above */
 
 			set_pte(ptep, mk_pte(virt_to_page(page), dvma_prot));
-			if (ipte_cache != 0) {
-				iopte_val(*iopte++) = MKIOPTE(__pa(page));
-			} else {
-				iopte_val(*iopte++) =
-					MKIOPTE(__pa(page)) & ~IOPTE_CACHE;
-			}
 		}
+		iopte_val(*iopte++) =
+		    MKIOPTE(page_to_pfn(virt_to_page(page)), ioperm_noc);
 		addr += PAGE_SIZE;
 		va += PAGE_SIZE;
 	}
@@ -277,23 +370,12 @@
 	 *        to handle the latter case as well.
 	 */
 	flush_cache_all();
-	if(viking_mxcc_present) {
-		unsigned long start = ((unsigned long) first) & PAGE_MASK;
-		unsigned long end = PAGE_ALIGN(((unsigned long) iopte));
-		while(start < end) {
-			viking_mxcc_flush_page(start);
-			start += PAGE_SIZE;
-		}
-	} else if(viking_flush) {
-		unsigned long start = ((unsigned long) first) & PAGE_MASK;
-		unsigned long end = PAGE_ALIGN(((unsigned long) iopte));
-		while(start < end) {
-			viking_flush_page(start);
-			start += PAGE_SIZE;
-		}
-	}
+	iommu_viking_flush_iotlb(first, len >> PAGE_SHIFT);
 	flush_tlb_all();
 	iommu_invalidate(iommu->regs);
+
+	*pba = iommu->start + (ioptex << PAGE_SHIFT);
+	return 0;
 }
 
 static void iommu_unmap_dma_area(unsigned long busa, int len)
@@ -301,27 +383,29 @@
 	struct iommu_struct *iommu = sbus_root->iommu;
 	iopte_t *iopte = iommu->page_table;
 	unsigned long end;
+	int ioptex = (busa - iommu->start) >> PAGE_SHIFT;
 
-	iopte += ((busa - iommu->start) >> PAGE_SHIFT);
-	end = PAGE_ALIGN((busa + len));
+	if ((busa & ~PAGE_MASK) != 0) BUG();
+	if ((len & ~PAGE_MASK) != 0) BUG();
+
+	iopte += ioptex;
+	end = busa + len;
 	while (busa < end) {
 		iopte_val(*iopte++) = 0;
 		busa += PAGE_SIZE;
 	}
-	flush_tlb_all();	/* P3: Hmm... it would not hurt. */
+	flush_tlb_all();
 	iommu_invalidate(iommu->regs);
+	bit_map_clear(&iommu->usemap, ioptex, len >> PAGE_SHIFT);
 }
 
-static unsigned long iommu_translate_dvma(unsigned long busa)
+static struct page *iommu_translate_dvma(unsigned long busa)
 {
 	struct iommu_struct *iommu = sbus_root->iommu;
 	iopte_t *iopte = iommu->page_table;
-	unsigned long pa;
 
 	iopte += ((busa - iommu->start) >> PAGE_SHIFT);
-	pa = pte_val(*iopte);
-	pa = (pa & 0xFFFFFFF0) << 4;		/* Loose higher bits of 36 */
-	return pa + PAGE_OFFSET;
+	return pfn_to_page((pte_val(*iopte) & IOPTE_PAGE) >> (PAGE_SHIFT-4));
 }
 #endif
 
@@ -352,12 +436,20 @@
 		BTFIXUPSET_CALL(mmu_get_scsi_one, iommu_get_scsi_one_pflush, BTFIXUPCALL_NORM);
 		BTFIXUPSET_CALL(mmu_get_scsi_sgl, iommu_get_scsi_sgl_pflush, BTFIXUPCALL_NORM);
 	}
-	BTFIXUPSET_CALL(mmu_release_scsi_one, iommu_release_scsi_one, BTFIXUPCALL_NOP);
-	BTFIXUPSET_CALL(mmu_release_scsi_sgl, iommu_release_scsi_sgl, BTFIXUPCALL_NOP);
+	BTFIXUPSET_CALL(mmu_release_scsi_one, iommu_release_scsi_one, BTFIXUPCALL_NORM);
+	BTFIXUPSET_CALL(mmu_release_scsi_sgl, iommu_release_scsi_sgl, BTFIXUPCALL_NORM);
 
 #ifdef CONFIG_SBUS
 	BTFIXUPSET_CALL(mmu_map_dma_area, iommu_map_dma_area, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(mmu_unmap_dma_area, iommu_unmap_dma_area, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(mmu_translate_dvma, iommu_translate_dvma, BTFIXUPCALL_NORM);
 #endif
+
+	if (viking_mxcc_present || srmmu_modtype == HyperSparc) {
+		dvma_prot = __pgprot(SRMMU_CACHE | SRMMU_ET_PTE | SRMMU_PRIV);
+		ioperm_noc = IOPTE_CACHE | IOPTE_WRITE | IOPTE_VALID;
+	} else {
+		dvma_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV);
+		ioperm_noc = IOPTE_WRITE | IOPTE_VALID;
+	}
 }
diff -urN linux-2.5.68-bk10/arch/sparc/mm/loadmmu.c linux-2.5.68-bk11/arch/sparc/mm/loadmmu.c
--- linux-2.5.68-bk10/arch/sparc/mm/loadmmu.c	2003-04-19 19:50:02.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/loadmmu.c	2003-05-01 04:40:14.000000000 -0700
@@ -26,7 +26,6 @@
 
 extern void ld_mmu_sun4c(void);
 extern void ld_mmu_srmmu(void);
-extern void ioport_init(void);
 
 void __init load_mmu(void)
 {
@@ -44,5 +43,4 @@
 		prom_halt();
 	}
 	btfixup();
-	ioport_init();
 }
diff -urN linux-2.5.68-bk10/arch/sparc/mm/srmmu.c linux-2.5.68-bk11/arch/sparc/mm/srmmu.c
--- linux-2.5.68-bk10/arch/sparc/mm/srmmu.c	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/srmmu.c	2003-05-01 04:40:14.000000000 -0700
@@ -21,6 +21,7 @@
 #include <linux/fs.h>
 #include <linux/seq_file.h>
 
+#include <asm/bitext.h>
 #include <asm/page.h>
 #include <asm/pgalloc.h>
 #include <asm/pgtable.h>
@@ -137,29 +138,26 @@
 int srmmu_cache_pagetables;
 
 /* these will be initialized in srmmu_nocache_calcsize() */
-int srmmu_nocache_npages;
 unsigned long srmmu_nocache_size;
 unsigned long srmmu_nocache_end;
 unsigned long pkmap_base;
 unsigned long pkmap_base_end;
-unsigned long srmmu_nocache_bitmap_size;
 extern unsigned long fix_kmap_begin;
 extern unsigned long fix_kmap_end;
 
+/* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */
 #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4)
 
 void *srmmu_nocache_pool;
 void *srmmu_nocache_bitmap;
-int srmmu_nocache_low;
-int srmmu_nocache_used;
-static spinlock_t srmmu_nocache_spinlock = SPIN_LOCK_UNLOCKED;
+static struct bit_map srmmu_nocache_map;
 
 /* This makes sense. Honest it does - Anton */
 #define __nocache_pa(VADDR) (((unsigned long)VADDR) - SRMMU_NOCACHE_VADDR + __pa((unsigned long)srmmu_nocache_pool))
 #define __nocache_va(PADDR) (__va((unsigned long)PADDR) - (unsigned long)srmmu_nocache_pool + SRMMU_NOCACHE_VADDR)
 #define __nocache_fix(VADDR) __va(__nocache_pa(VADDR))
 
-static inline unsigned long srmmu_pte_pfn(pte_t pte)
+static unsigned long srmmu_pte_pfn(pte_t pte)
 {
 	if (srmmu_device_memory(pte_val(pte))) {
 		/* XXX Anton obviously had something in mind when he did this.
@@ -219,15 +217,6 @@
 static inline void srmmu_pgd_clear(pgd_t * pgdp)
 { srmmu_set_pte((pte_t *)pgdp, __pte(0)); }
 
-static inline int srmmu_pte_write(pte_t pte)
-{ return pte_val(pte) & SRMMU_WRITE; }
-
-static inline int srmmu_pte_dirty(pte_t pte)
-{ return pte_val(pte) & SRMMU_DIRTY; }
-
-static inline int srmmu_pte_young(pte_t pte)
-{ return pte_val(pte) & SRMMU_REF; }
-
 static inline pte_t srmmu_pte_wrprotect(pte_t pte)
 { return __pte(pte_val(pte) & ~SRMMU_WRITE);}
 
@@ -321,10 +310,7 @@
  */
 static unsigned long __srmmu_get_nocache(int size, int align)
 {
-	int offset = srmmu_nocache_low;
-	int i;
-	unsigned long va_tmp, phys_tmp;
-	int lowest_failed = 0;
+	int offset;
 
 	if (size < SRMMU_NOCACHE_BITMAP_SHIFT) {
 		printk("Size 0x%x too small for nocache request\n", size);
@@ -334,49 +320,20 @@
 		printk("Size 0x%x unaligned int nocache request\n", size);
 		size += SRMMU_NOCACHE_BITMAP_SHIFT-1;
 	}
-	size = size >> SRMMU_NOCACHE_BITMAP_SHIFT;
-
-	spin_lock(&srmmu_nocache_spinlock);
-
-repeat:
-	offset = find_next_zero_bit(srmmu_nocache_bitmap, srmmu_nocache_bitmap_size, offset);
 
-	/* we align on physical address */
-	if (align) {
-		va_tmp = (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT));
-		phys_tmp = (__nocache_pa(va_tmp) + align - 1) & ~(align - 1);
-		va_tmp = (unsigned long)__nocache_va(phys_tmp);
-		offset = (va_tmp - SRMMU_NOCACHE_VADDR) >> SRMMU_NOCACHE_BITMAP_SHIFT;
-	}
-
-	if ((srmmu_nocache_bitmap_size - offset) < size) {
-		printk("Run out of nocached RAM!\n");
-		spin_unlock(&srmmu_nocache_spinlock);
+	offset = bit_map_string_get(&srmmu_nocache_map,
+		       			size >> SRMMU_NOCACHE_BITMAP_SHIFT,
+					align >> SRMMU_NOCACHE_BITMAP_SHIFT);
+/* P3 */ /* printk("srmmu: get size %d align %d, got %d (0x%x)\n",
+   size >> SRMMU_NOCACHE_BITMAP_SHIFT, align >> SRMMU_NOCACHE_BITMAP_SHIFT,
+   offset, offset); */
+	if (offset == -1) {
+		printk("srmmu: out of nocache %d: %d/%d\n",
+		    size, (int) srmmu_nocache_size,
+		    srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT);
 		return 0;
 	}
 
-	i = 0;
-	while(i < size) {
-		if (test_bit(offset + i, srmmu_nocache_bitmap)) {
-			lowest_failed = 1;
-			offset = offset + i + 1;
-			goto repeat;
-		}
-		i++;
-	}
-
-	i = 0;
-	while(i < size) {
-		set_bit(offset + i, srmmu_nocache_bitmap);
-		i++;
-		srmmu_nocache_used++;
-	}
-
-	if (!lowest_failed && ((align >> SRMMU_NOCACHE_BITMAP_SHIFT) <= 1) && (offset > srmmu_nocache_low))
-		srmmu_nocache_low = offset;
-
-	spin_unlock(&srmmu_nocache_spinlock);
-
 	return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT));
 }
 
@@ -422,63 +379,57 @@
 	offset = (vaddr - SRMMU_NOCACHE_VADDR) >> SRMMU_NOCACHE_BITMAP_SHIFT;
 	size = size >> SRMMU_NOCACHE_BITMAP_SHIFT;
 
-	spin_lock(&srmmu_nocache_spinlock);
-
-	while(size--) {
-		clear_bit(offset + size, srmmu_nocache_bitmap);
-		srmmu_nocache_used--;
-	}
-
-	if (offset < srmmu_nocache_low)
-		srmmu_nocache_low = offset;
-
-	spin_unlock(&srmmu_nocache_spinlock);
+/* P3 */ /* printk("srmmu: free off %d (0x%x) size %d\n", offset, offset, size); */
+	bit_map_clear(&srmmu_nocache_map, offset, size);
 }
 
 void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end);
 
 extern unsigned long probe_memory(void);	/* in fault.c */
 
-/* Reserve nocache dynamically proportionally to the amount of
+/*
+ * Reserve nocache dynamically proportionally to the amount of
  * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002
  */
 void srmmu_nocache_calcsize(void)
 {
 	unsigned long sysmemavail = probe_memory() / 1024;
+	int srmmu_nocache_npages;
 
 	srmmu_nocache_npages =
 		sysmemavail / SRMMU_NOCACHE_ALCRATIO / 1024 * 256;
-	if (sysmemavail % (SRMMU_NOCACHE_ALCRATIO * 1024))
-		srmmu_nocache_npages += 256;
+
+ /* P3 XXX The 4x overuse: corroborated by /proc/meminfo. */
+	// if (srmmu_nocache_npages < 256) srmmu_nocache_npages = 256;
+	if (srmmu_nocache_npages < 550) srmmu_nocache_npages = 550;
 
 	/* anything above 1280 blows up */
 	if (srmmu_nocache_npages > 1280) srmmu_nocache_npages = 1280;
 
 	srmmu_nocache_size = srmmu_nocache_npages * PAGE_SIZE;
-	srmmu_nocache_bitmap_size = srmmu_nocache_npages * 16;
 	srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size;
 	fix_kmap_begin = srmmu_nocache_end;
 	fix_kmap_end = fix_kmap_begin + (KM_TYPE_NR * NR_CPUS - 1) * PAGE_SIZE;
 	pkmap_base = SRMMU_NOCACHE_VADDR + srmmu_nocache_size + 0x40000;
 	pkmap_base_end = pkmap_base + LAST_PKMAP * PAGE_SIZE;
-
-	/* printk("system memory available = %luk\nnocache ram size = %luk\n",
-		sysmemavail, srmmu_nocache_size / 1024); */
 }
 
 void srmmu_nocache_init(void)
 {
+	unsigned int bitmap_bits;
 	pgd_t *pgd;
 	pmd_t *pmd;
 	pte_t *pte;
 	unsigned long paddr, vaddr;
 	unsigned long pteval;
 
+	bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
+
 	srmmu_nocache_pool = __alloc_bootmem(srmmu_nocache_size, PAGE_SIZE, 0UL);
 	memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
 
-	srmmu_nocache_bitmap = __alloc_bootmem(srmmu_nocache_bitmap_size, SMP_CACHE_BYTES, 0UL);
-	memset(srmmu_nocache_bitmap, 0, srmmu_nocache_bitmap_size);
+	srmmu_nocache_bitmap = __alloc_bootmem(bitmap_bits >> 3, SMP_CACHE_BYTES, 0UL);
+	bit_map_init(&srmmu_nocache_map, srmmu_nocache_bitmap, bitmap_bits);
 
 	srmmu_swapper_pg_dir = (pgd_t *)__srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
 	memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
@@ -486,11 +437,12 @@
 
 	srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
 
-	spin_lock_init(&srmmu_nocache_spinlock);
-
 	paddr = __pa((unsigned long)srmmu_nocache_pool);
 	vaddr = SRMMU_NOCACHE_VADDR;
 
+/* P3 */ printk("srmmu: pool 0x%x vaddr 0x%x bitmap 0x%x bits %d (0x%x)\n",
+  (int)srmmu_nocache_pool, vaddr, srmmu_nocache_bitmap, bitmap_bits, bitmap_bits);
+
 	while (vaddr < srmmu_nocache_end) {
 		pgd = pgd_offset_k(vaddr);
 		pmd = srmmu_pmd_offset(__nocache_fix(pgd), vaddr);
@@ -637,7 +589,8 @@
 }
 
 /* Low level IO area allocation on the SRMMU. */
-void srmmu_mapioaddr(unsigned long physaddr, unsigned long virt_addr, int bus_type, int rdonly)
+static inline void srmmu_mapioaddr(unsigned long physaddr,
+    unsigned long virt_addr, int bus_type)
 {
 	pgd_t *pgdp;
 	pmd_t *pmdp;
@@ -656,16 +609,24 @@
 	 * 36-bit physical address on the I/O space lines...
 	 */
 	tmp |= (bus_type << 28);
-	if(rdonly)
-		tmp |= SRMMU_PRIV_RDONLY;
-	else
-		tmp |= SRMMU_PRIV;
+	tmp |= SRMMU_PRIV;
 	__flush_page_to_ram(virt_addr);
 	srmmu_set_pte(ptep, __pte(tmp));
+}
+
+static void srmmu_mapiorange(unsigned int bus, unsigned long xpa,
+    unsigned long xva, unsigned int len)
+{
+	while (len != 0) {
+		len -= PAGE_SIZE;
+		srmmu_mapioaddr(xpa, xva, bus);
+		xva += PAGE_SIZE;
+		xpa += PAGE_SIZE;
+	}
 	flush_tlb_all();
 }
 
-void srmmu_unmapioaddr(unsigned long virt_addr)
+static inline void srmmu_unmapioaddr(unsigned long virt_addr)
 {
 	pgd_t *pgdp;
 	pmd_t *pmdp;
@@ -677,6 +638,15 @@
 
 	/* No need to flush uncacheable page. */
 	srmmu_pte_clear(ptep);
+}
+
+static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len)
+{
+	while (len != 0) {
+		len -= PAGE_SIZE;
+		srmmu_unmapioaddr(virt_addr);
+		virt_addr += PAGE_SIZE;
+	}
 	flush_tlb_all();
 }
 
@@ -1398,7 +1368,7 @@
 		   srmmu_name,
 		   num_contexts,
 		   srmmu_nocache_size,
-		   (srmmu_nocache_used << SRMMU_NOCACHE_BITMAP_SHIFT));
+		   srmmu_nocache_map.used << SRMMU_NOCACHE_BITMAP_SHIFT);
 }
 
 static void srmmu_update_mmu_cache(struct vm_area_struct * vma, unsigned long address, pte_t pte)
@@ -2258,7 +2228,10 @@
 	BTFIXUPSET_CALL(pte_mkyoung, srmmu_pte_mkyoung, BTFIXUPCALL_ORINT(SRMMU_REF));
 	BTFIXUPSET_CALL(update_mmu_cache, srmmu_update_mmu_cache, BTFIXUPCALL_NOP);
 	BTFIXUPSET_CALL(destroy_context, srmmu_destroy_context, BTFIXUPCALL_NORM);
-	
+
+	BTFIXUPSET_CALL(sparc_mapiorange, srmmu_mapiorange, BTFIXUPCALL_NORM);
+	BTFIXUPSET_CALL(sparc_unmapiorange, srmmu_unmapiorange, BTFIXUPCALL_NORM);
+
 	BTFIXUPSET_CALL(mmu_info, srmmu_mmu_info, BTFIXUPCALL_NORM);
 
 	BTFIXUPSET_CALL(alloc_thread_info, srmmu_alloc_thread_info, BTFIXUPCALL_NORM);
diff -urN linux-2.5.68-bk10/arch/sparc/mm/sun4c.c linux-2.5.68-bk11/arch/sparc/mm/sun4c.c
--- linux-2.5.68-bk10/arch/sparc/mm/sun4c.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc/mm/sun4c.c	2003-05-01 04:40:14.000000000 -0700
@@ -534,10 +534,13 @@
 }
 
 /* Addr is always aligned on a page boundary for us already. */
-static void sun4c_map_dma_area(unsigned long va, u32 addr, int len)
+static int sun4c_map_dma_area(dma_addr_t *pba, unsigned long va,
+    unsigned long addr, int len)
 {
 	unsigned long page, end;
 
+	*pba = addr;
+
 	end = PAGE_ALIGN((addr + len));
 	while (addr < end) {
 		page = va;
@@ -550,13 +553,15 @@
 		addr += PAGE_SIZE;
 		va += PAGE_SIZE;
 	}
+
+	return 0;
 }
 
-static unsigned long sun4c_translate_dvma(unsigned long busa)
+static struct page *sun4c_translate_dvma(unsigned long busa)
 {
 	/* Fortunately for us, bus_addr == uncached_virt in sun4c. */
 	unsigned long pte = sun4c_get_pte(busa);
-	return (pte << PAGE_SHIFT) + PAGE_OFFSET;
+	return pfn_to_page(pte & SUN4C_PFN_MASK);
 }
 
 static void sun4c_unmap_dma_area(unsigned long busa, int len)
@@ -1578,21 +1583,33 @@
 	}
 }
 
-void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr,
-		     int bus_type, int rdonly)
+static inline void sun4c_mapioaddr(unsigned long physaddr, unsigned long virt_addr)
 {
 	unsigned long page_entry;
 
 	page_entry = ((physaddr >> PAGE_SHIFT) & SUN4C_PFN_MASK);
 	page_entry |= ((pg_iobits | _SUN4C_PAGE_PRIV) & ~(_SUN4C_PAGE_PRESENT));
-	if (rdonly)
-		page_entry &= ~_SUN4C_WRITEABLE;
 	sun4c_put_pte(virt_addr, page_entry);
 }
 
-void sun4c_unmapioaddr(unsigned long virt_addr)
+static void sun4c_mapiorange(unsigned int bus, unsigned long xpa,
+    unsigned long xva, unsigned int len)
 {
-	sun4c_put_pte(virt_addr, 0);
+	while (len != 0) {
+		len -= PAGE_SIZE;
+		sun4c_mapioaddr(xpa, xva);
+		xva += PAGE_SIZE;
+		xpa += PAGE_SIZE;
+	}
+}
+
+static void sun4c_unmapiorange(unsigned long virt_addr, unsigned int len)
+{
+	while (len != 0) {
+		len -= PAGE_SIZE;
+		sun4c_put_pte(virt_addr, 0);
+		virt_addr += PAGE_SIZE;
+	}
 }
 
 static void sun4c_alloc_context(struct mm_struct *old_mm, struct mm_struct *mm)
@@ -1783,7 +1800,7 @@
  */
 static pte_t sun4c_mk_pte(struct page *page, pgprot_t pgprot)
 {
-	return __pte((page - mem_map) | pgprot_val(pgprot));
+	return __pte(page_to_pfn(page) | pgprot_val(pgprot));
 }
 
 static pte_t sun4c_mk_pte_phys(unsigned long phys_page, pgprot_t pgprot)
@@ -2225,6 +2242,9 @@
 	BTFIXUPSET_CALL(mmu_unmap_dma_area, sun4c_unmap_dma_area, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(mmu_translate_dvma, sun4c_translate_dvma, BTFIXUPCALL_NORM);
 
+	BTFIXUPSET_CALL(sparc_mapiorange, sun4c_mapiorange, BTFIXUPCALL_NORM);
+	BTFIXUPSET_CALL(sparc_unmapiorange, sun4c_unmapiorange, BTFIXUPCALL_NORM);
+
 	BTFIXUPSET_CALL(alloc_thread_info, sun4c_alloc_thread_info, BTFIXUPCALL_NORM);
 	BTFIXUPSET_CALL(free_thread_info, sun4c_free_thread_info, BTFIXUPCALL_NORM);
 
diff -urN linux-2.5.68-bk10/arch/sparc64/defconfig linux-2.5.68-bk11/arch/sparc64/defconfig
--- linux-2.5.68-bk10/arch/sparc64/defconfig	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/defconfig	2003-05-01 04:40:14.000000000 -0700
@@ -370,25 +370,103 @@
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_NETLINK_DEV=y
-# CONFIG_NETFILTER is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
 CONFIG_UNIX=y
 CONFIG_NET_KEY=m
 CONFIG_INET=y
 # CONFIG_IP_MULTICAST is not set
 # CONFIG_IP_ADVANCED_ROUTER is not set
 # CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
 CONFIG_ARPD=y
 CONFIG_INET_ECN=y
 # CONFIG_SYN_COOKIES is not set
 CONFIG_INET_AH=y
 CONFIG_INET_ESP=y
 CONFIG_INET_IPCOMP=y
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+CONFIG_IP_NF_IRC=m
+CONFIG_IP_NF_TFTP=m
+CONFIG_IP_NF_AMANDA=m
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+CONFIG_IP_NF_MATCH_UNCLEAN=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_PHYSDEV=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_MIRROR=m
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_NAT_LOCAL=y
+CONFIG_IP_NF_NAT_SNMP_BASIC=m
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_NAT_TFTP=m
+CONFIG_IP_NF_NAT_AMANDA=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_MARK=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_COMPAT_IPCHAINS=m
+CONFIG_IP_NF_COMPAT_IPFWADM=m
 CONFIG_IPV6=m
 CONFIG_IPV6_PRIVACY=y
 CONFIG_INET6_AH=m
 CONFIG_INET6_ESP=m
+
+#
+# IPv6: Netfilter Configuration
+#
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_LIMIT=m
+CONFIG_IP6_NF_MATCH_MAC=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_MULTIPORT=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_MARK=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AHESP=m
+CONFIG_IP6_NF_MATCH_LENGTH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_MARK=m
 CONFIG_XFRM_USER=m
 
 #
@@ -410,7 +488,20 @@
 CONFIG_DECNET=m
 CONFIG_DECNET_SIOCGIFCONF=y
 # CONFIG_DECNET_ROUTER is not set
-# CONFIG_BRIDGE is not set
+CONFIG_BRIDGE=m
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_IPF=m
+CONFIG_BRIDGE_EBT_ARPF=m
+CONFIG_BRIDGE_EBT_VLANF=m
+CONFIG_BRIDGE_EBT_MARKF=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
@@ -433,6 +524,7 @@
 CONFIG_NET_SCH_TBF=m
 CONFIG_NET_SCH_GRED=m
 CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_INGRESS=m
 CONFIG_NET_QOS=y
 CONFIG_NET_ESTIMATOR=y
 CONFIG_NET_CLS=y
diff -urN linux-2.5.68-bk10/arch/sparc64/kernel/ioctl32.c linux-2.5.68-bk11/arch/sparc64/kernel/ioctl32.c
--- linux-2.5.68-bk10/arch/sparc64/kernel/ioctl32.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/kernel/ioctl32.c	2003-05-01 04:40:14.000000000 -0700
@@ -11,6 +11,7 @@
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/compat.h>
+#include <linux/ioctl32.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
@@ -670,7 +671,7 @@
 	return (void *) (usp - len);
 }
 
-static int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
 	struct ifreq *u_ifreq64;
 	struct ifreq32 *u_ifreq32 = (struct ifreq32 *) arg;
@@ -3832,65 +3833,23 @@
 #define BNEPGETCONNLIST	_IOR('B', 210, int)
 #define BNEPGETCONNINFO	_IOR('B', 211, int)
 
-struct ioctl_trans {
-	unsigned int cmd;
-	unsigned int handler;
-	unsigned int next;
-};
+typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
 
-#define COMPATIBLE_IOCTL(cmd) asm volatile(".word %0, sys_ioctl, 0" : : "i" (cmd));
-#define HANDLE_IOCTL(cmd,handler) asm volatile(".word %0, %1, 0" : : "i" (cmd), "i" (handler));
-#define IOCTL_TABLE_START void ioctl32_foo(void) { asm volatile(".data\nioctl_translations:");
-#define IOCTL_TABLE_END asm volatile("\nioctl_translations_end:\n\t.previous"); }
+#define COMPATIBLE_IOCTL(cmd)		HANDLE_IOCTL((cmd),sys_ioctl)
+#define HANDLE_IOCTL(cmd,handler)	{ (cmd), (ioctl32_handler_t)(handler), NULL },
+#define IOCTL_TABLE_START \
+	struct ioctl_trans ioctl_start[] = {
+#define IOCTL_TABLE_END \
+	}; struct ioctl_trans ioctl_end[0];
 
 IOCTL_TABLE_START
-/* List here exlicitly which ioctl's are known to have
- * compatible types passed or none at all...
- */
-/* Big T */
-COMPATIBLE_IOCTL(TCGETA)
-COMPATIBLE_IOCTL(TCSETA)
-COMPATIBLE_IOCTL(TCSETAW)
-COMPATIBLE_IOCTL(TCSETAF)
-COMPATIBLE_IOCTL(TCSBRK)
+#include <linux/compat_ioctl.h>
 COMPATIBLE_IOCTL(TCSBRKP)
-COMPATIBLE_IOCTL(TCXONC)
-COMPATIBLE_IOCTL(TCFLSH)
-COMPATIBLE_IOCTL(TCGETS)
-COMPATIBLE_IOCTL(TCSETS)
-COMPATIBLE_IOCTL(TCSETSW)
-COMPATIBLE_IOCTL(TCSETSF)
-COMPATIBLE_IOCTL(TIOCLINUX)
 COMPATIBLE_IOCTL(TIOCSTART)
 COMPATIBLE_IOCTL(TIOCSTOP)
-/* Little t */
-COMPATIBLE_IOCTL(TIOCGETD)
-COMPATIBLE_IOCTL(TIOCSETD)
-COMPATIBLE_IOCTL(TIOCEXCL)
-COMPATIBLE_IOCTL(TIOCNXCL)
-COMPATIBLE_IOCTL(TIOCCONS)
-COMPATIBLE_IOCTL(TIOCGSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSWINSZ)
-COMPATIBLE_IOCTL(TIOCGWINSZ)
-COMPATIBLE_IOCTL(TIOCMGET)
-COMPATIBLE_IOCTL(TIOCMBIC)
-COMPATIBLE_IOCTL(TIOCMBIS)
-COMPATIBLE_IOCTL(TIOCMSET)
-COMPATIBLE_IOCTL(TIOCPKT)
-COMPATIBLE_IOCTL(TIOCNOTTY)
-COMPATIBLE_IOCTL(TIOCSTI)
-COMPATIBLE_IOCTL(TIOCOUTQ)
-COMPATIBLE_IOCTL(TIOCSPGRP)
-COMPATIBLE_IOCTL(TIOCGPGRP)
-COMPATIBLE_IOCTL(TIOCSCTTY)
-COMPATIBLE_IOCTL(TIOCGPTN)
-COMPATIBLE_IOCTL(TIOCSPTLCK)
 COMPATIBLE_IOCTL(TIOCGSERIAL)
 COMPATIBLE_IOCTL(TIOCSSERIAL)
-COMPATIBLE_IOCTL(TIOCSERGETLSR)
 COMPATIBLE_IOCTL(TIOCSLTC)
-/* Big F */
 COMPATIBLE_IOCTL(FBIOGTYPE)
 COMPATIBLE_IOCTL(FBIOSATTR)
 COMPATIBLE_IOCTL(FBIOGATTR)
@@ -3900,109 +3859,6 @@
 COMPATIBLE_IOCTL(FBIOSCURPOS)
 COMPATIBLE_IOCTL(FBIOGCURPOS)
 COMPATIBLE_IOCTL(FBIOGCURMAX)
-COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
-COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
-COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
-COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
-COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
-/* Little f */
-COMPATIBLE_IOCTL(FIOCLEX)
-COMPATIBLE_IOCTL(FIONCLEX)
-COMPATIBLE_IOCTL(FIOASYNC)
-COMPATIBLE_IOCTL(FIONBIO)
-COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
-/* 0x00 */
-COMPATIBLE_IOCTL(FIBMAP)
-COMPATIBLE_IOCTL(FIGETBSZ)
-/* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
- *         Some need translations, these do not.
- */
-COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
-COMPATIBLE_IOCTL(HDIO_SET_DMA)
-COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
-COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
-COMPATIBLE_IOCTL(HDIO_SET_32BIT)
-COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
-COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
-COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
-COMPATIBLE_IOCTL(HDIO_SET_NICE)
-/* 0x02 -- Floppy ioctls */
-COMPATIBLE_IOCTL(FDMSGON)
-COMPATIBLE_IOCTL(FDMSGOFF)
-COMPATIBLE_IOCTL(FDSETEMSGTRESH)
-COMPATIBLE_IOCTL(FDFLUSH)
-COMPATIBLE_IOCTL(FDWERRORCLR)
-COMPATIBLE_IOCTL(FDSETMAXERRS)
-COMPATIBLE_IOCTL(FDGETMAXERRS)
-COMPATIBLE_IOCTL(FDGETDRVTYP)
-COMPATIBLE_IOCTL(FDEJECT)
-COMPATIBLE_IOCTL(FDCLRPRM)
-COMPATIBLE_IOCTL(FDFMTBEG)
-COMPATIBLE_IOCTL(FDFMTEND)
-COMPATIBLE_IOCTL(FDRESET)
-COMPATIBLE_IOCTL(FDTWADDLE)
-COMPATIBLE_IOCTL(FDFMTTRK)
-COMPATIBLE_IOCTL(FDRAWCMD)
-/* 0x12 */
-COMPATIBLE_IOCTL(BLKROSET)
-COMPATIBLE_IOCTL(BLKROGET)
-COMPATIBLE_IOCTL(BLKRRPART)
-COMPATIBLE_IOCTL(BLKFLSBUF)
-COMPATIBLE_IOCTL(BLKSECTSET)
-COMPATIBLE_IOCTL(BLKSSZGET)
-/* RAID */
-COMPATIBLE_IOCTL(RAID_VERSION)
-COMPATIBLE_IOCTL(GET_ARRAY_INFO)
-COMPATIBLE_IOCTL(GET_DISK_INFO)
-COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
-COMPATIBLE_IOCTL(CLEAR_ARRAY)
-COMPATIBLE_IOCTL(ADD_NEW_DISK)
-COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
-COMPATIBLE_IOCTL(SET_ARRAY_INFO)
-COMPATIBLE_IOCTL(SET_DISK_INFO)
-COMPATIBLE_IOCTL(WRITE_RAID_INFO)
-COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
-COMPATIBLE_IOCTL(PROTECT_ARRAY)
-COMPATIBLE_IOCTL(HOT_ADD_DISK)
-COMPATIBLE_IOCTL(SET_DISK_FAULTY)
-COMPATIBLE_IOCTL(RUN_ARRAY)
-COMPATIBLE_IOCTL(START_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY_RO)
-COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
-
-/* Big K */
-COMPATIBLE_IOCTL(PIO_FONT)
-COMPATIBLE_IOCTL(GIO_FONT)
-COMPATIBLE_IOCTL(KDSIGACCEPT)
-COMPATIBLE_IOCTL(KDGETKEYCODE)
-COMPATIBLE_IOCTL(KDSETKEYCODE)
-COMPATIBLE_IOCTL(KIOCSOUND)
-COMPATIBLE_IOCTL(KDMKTONE)
-COMPATIBLE_IOCTL(KDGKBTYPE)
-COMPATIBLE_IOCTL(KDSETMODE)
-COMPATIBLE_IOCTL(KDGETMODE)
-COMPATIBLE_IOCTL(KDSKBMODE)
-COMPATIBLE_IOCTL(KDGKBMODE)
-COMPATIBLE_IOCTL(KDSKBMETA)
-COMPATIBLE_IOCTL(KDGKBMETA)
-COMPATIBLE_IOCTL(KDGKBENT)
-COMPATIBLE_IOCTL(KDSKBENT)
-COMPATIBLE_IOCTL(KDGKBSENT)
-COMPATIBLE_IOCTL(KDSKBSENT)
-COMPATIBLE_IOCTL(KDGKBDIACR)
-COMPATIBLE_IOCTL(KDKBDREP)
-COMPATIBLE_IOCTL(KDSKBDIACR)
-COMPATIBLE_IOCTL(KDGKBLED)
-COMPATIBLE_IOCTL(KDSKBLED)
-COMPATIBLE_IOCTL(KDGETLED)
-COMPATIBLE_IOCTL(KDSETLED)
-COMPATIBLE_IOCTL(GIO_SCRNMAP)
-COMPATIBLE_IOCTL(PIO_SCRNMAP)
-COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_FONTRESET)
-COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
 /* Little k */
 COMPATIBLE_IOCTL(KIOCTYPE)
 COMPATIBLE_IOCTL(KIOCLAYOUT)
@@ -4014,81 +3870,11 @@
 COMPATIBLE_IOCTL(KIOCGLED)
 COMPATIBLE_IOCTL(KIOCSRATE)
 COMPATIBLE_IOCTL(KIOCGRATE)
-/* Big S */
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
-COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
-COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
-/* Big T */
-COMPATIBLE_IOCTL(TUNSETNOCSUM)
-COMPATIBLE_IOCTL(TUNSETDEBUG)
-COMPATIBLE_IOCTL(TUNSETIFF)
-COMPATIBLE_IOCTL(TUNSETPERSIST)
-COMPATIBLE_IOCTL(TUNSETOWNER)
-/* Big V */
-COMPATIBLE_IOCTL(VT_SETMODE)
-COMPATIBLE_IOCTL(VT_GETMODE)
-COMPATIBLE_IOCTL(VT_GETSTATE)
-COMPATIBLE_IOCTL(VT_OPENQRY)
-COMPATIBLE_IOCTL(VT_ACTIVATE)
-COMPATIBLE_IOCTL(VT_WAITACTIVE)
-COMPATIBLE_IOCTL(VT_RELDISP)
-COMPATIBLE_IOCTL(VT_DISALLOCATE)
-COMPATIBLE_IOCTL(VT_RESIZE)
-COMPATIBLE_IOCTL(VT_RESIZEX)
-COMPATIBLE_IOCTL(VT_LOCKSWITCH)
-COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
-/* Little v */
 COMPATIBLE_IOCTL(VUIDSFORMAT)
 COMPATIBLE_IOCTL(VUIDGFORMAT)
 /* Little v, the video4linux ioctls */
-COMPATIBLE_IOCTL(VIDIOCGCAP)
-COMPATIBLE_IOCTL(VIDIOCGCHAN)
-COMPATIBLE_IOCTL(VIDIOCSCHAN)
-COMPATIBLE_IOCTL(VIDIOCGPICT)
-COMPATIBLE_IOCTL(VIDIOCSPICT)
-COMPATIBLE_IOCTL(VIDIOCCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCKEY)
-COMPATIBLE_IOCTL(VIDIOCGAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSYNC)
-COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCGMBUF)
-COMPATIBLE_IOCTL(VIDIOCGUNIT)
-COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
-/* BTTV specific... */
-COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
-COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
-COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
-/* Little p (/dev/rtc, /dev/envctrl, etc.) */
 COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
 COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
-COMPATIBLE_IOCTL(RTC_AIE_ON)
-COMPATIBLE_IOCTL(RTC_AIE_OFF)
-COMPATIBLE_IOCTL(RTC_UIE_ON)
-COMPATIBLE_IOCTL(RTC_UIE_OFF)
-COMPATIBLE_IOCTL(RTC_PIE_ON)
-COMPATIBLE_IOCTL(RTC_PIE_OFF)
-COMPATIBLE_IOCTL(RTC_WIE_ON)
-COMPATIBLE_IOCTL(RTC_WIE_OFF)
-COMPATIBLE_IOCTL(RTC_ALM_SET)
-COMPATIBLE_IOCTL(RTC_ALM_READ)
-COMPATIBLE_IOCTL(RTC_RD_TIME)
-COMPATIBLE_IOCTL(RTC_SET_TIME)
-COMPATIBLE_IOCTL(RTC_WKALM_SET)
-COMPATIBLE_IOCTL(RTC_WKALM_RD)
 COMPATIBLE_IOCTL(ENVCTRL_RD_WARNING_TEMPERATURE)
 COMPATIBLE_IOCTL(ENVCTRL_RD_SHUTDOWN_TEMPERATURE)
 COMPATIBLE_IOCTL(ENVCTRL_RD_CPU_TEMPERATURE)
@@ -4102,8 +3888,6 @@
 /* COMPATIBLE_IOCTL(D7SIOCRD) same value as ENVCTRL_RD_VOLTAGE_STATUS */
 COMPATIBLE_IOCTL(D7SIOCWR)
 COMPATIBLE_IOCTL(D7SIOCTM)
-/* Little m */
-COMPATIBLE_IOCTL(MTIOCTOP)
 /* OPENPROMIO, SunOS/Solaris only, the NetBSD one's have
  * embedded pointers in the arg which we'd need to clean up...
  */
@@ -4122,127 +3906,7 @@
 COMPATIBLE_IOCTL(OPROMSETCUR)
 COMPATIBLE_IOCTL(OPROMPCI2NODE)
 COMPATIBLE_IOCTL(OPROMPATH2NODE)
-/* Socket level stuff */
-COMPATIBLE_IOCTL(FIOSETOWN)
-COMPATIBLE_IOCTL(SIOCSPGRP)
-COMPATIBLE_IOCTL(FIOGETOWN)
-COMPATIBLE_IOCTL(SIOCGPGRP)
-COMPATIBLE_IOCTL(SIOCATMARK)
-COMPATIBLE_IOCTL(SIOCSIFLINK)
-COMPATIBLE_IOCTL(SIOCSIFENCAP)
-COMPATIBLE_IOCTL(SIOCGIFENCAP)
-COMPATIBLE_IOCTL(SIOCSIFBR)
-COMPATIBLE_IOCTL(SIOCGIFBR)
-COMPATIBLE_IOCTL(SIOCSARP)
-COMPATIBLE_IOCTL(SIOCGARP)
-COMPATIBLE_IOCTL(SIOCDARP)
-COMPATIBLE_IOCTL(SIOCSRARP)
-COMPATIBLE_IOCTL(SIOCGRARP)
-COMPATIBLE_IOCTL(SIOCDRARP)
-COMPATIBLE_IOCTL(SIOCADDDLCI)
-COMPATIBLE_IOCTL(SIOCDELDLCI)
-COMPATIBLE_IOCTL(SIOCGMIIPHY)
-COMPATIBLE_IOCTL(SIOCGMIIREG)
-COMPATIBLE_IOCTL(SIOCSMIIREG)
-COMPATIBLE_IOCTL(SIOCGIFVLAN)
-COMPATIBLE_IOCTL(SIOCSIFVLAN)
-/* SG stuff */
-COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_EMULATED_HOST)
-COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
-COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
-COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
-COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
-COMPATIBLE_IOCTL(SG_SET_DEBUG)
-COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
-COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
-COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
-COMPATIBLE_IOCTL(SG_SCSI_RESET)
-COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
-COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
-COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
-/* PPP stuff */
-COMPATIBLE_IOCTL(PPPIOCGFLAGS)
-COMPATIBLE_IOCTL(PPPIOCSFLAGS)
-COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGUNIT)
-COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGMRU)
-COMPATIBLE_IOCTL(PPPIOCSMRU)
-COMPATIBLE_IOCTL(PPPIOCSMAXCID)
-COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
-/* PPPIOCSCOMPRESS is translated */
-COMPATIBLE_IOCTL(PPPIOCGNPMODE)
-COMPATIBLE_IOCTL(PPPIOCSNPMODE)
-/* PPPIOCSPASS is translated */
-/* PPPIOCSACTIVE is translated */
-COMPATIBLE_IOCTL(PPPIOCGDEBUG)
-COMPATIBLE_IOCTL(PPPIOCSDEBUG)
-/* PPPIOCGIDLE is translated */
-COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
-COMPATIBLE_IOCTL(PPPIOCATTACH)
-COMPATIBLE_IOCTL(PPPIOCDETACH)
-COMPATIBLE_IOCTL(PPPIOCSMRRU)
-COMPATIBLE_IOCTL(PPPIOCCONNECT)
-COMPATIBLE_IOCTL(PPPIOCDISCONN)
-COMPATIBLE_IOCTL(PPPIOCATTCHAN)
-COMPATIBLE_IOCTL(PPPIOCGCHAN)
-/* LP */
-COMPATIBLE_IOCTL(LPGETSTATUS)
-/* PPPOX */
-COMPATIBLE_IOCTL(PPPOEIOCSFWD)
-COMPATIBLE_IOCTL(PPPOEIOCDFWD)
-/* CDROM stuff */
-COMPATIBLE_IOCTL(CDROMPAUSE)
-COMPATIBLE_IOCTL(CDROMRESUME)
-COMPATIBLE_IOCTL(CDROMPLAYMSF)
-COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
-COMPATIBLE_IOCTL(CDROMREADTOCHDR)
-COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
-COMPATIBLE_IOCTL(CDROMSTOP)
-COMPATIBLE_IOCTL(CDROMSTART)
-COMPATIBLE_IOCTL(CDROMEJECT)
-COMPATIBLE_IOCTL(CDROMVOLCTRL)
-COMPATIBLE_IOCTL(CDROMSUBCHNL)
-COMPATIBLE_IOCTL(CDROMEJECT_SW)
-COMPATIBLE_IOCTL(CDROMMULTISESSION)
-COMPATIBLE_IOCTL(CDROM_GET_MCN)
-COMPATIBLE_IOCTL(CDROMRESET)
-COMPATIBLE_IOCTL(CDROMVOLREAD)
-COMPATIBLE_IOCTL(CDROMSEEK)
-COMPATIBLE_IOCTL(CDROMPLAYBLK)
-COMPATIBLE_IOCTL(CDROMCLOSETRAY)
-COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
-COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
-COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
-COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
-COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
-COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
-COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
-COMPATIBLE_IOCTL(CDROM_DEBUG)
-COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
-/* DVD ioctls */
-COMPATIBLE_IOCTL(DVD_READ_STRUCT)
-COMPATIBLE_IOCTL(DVD_WRITE_STRUCT)
-COMPATIBLE_IOCTL(DVD_AUTH)
 /* Big L */
-COMPATIBLE_IOCTL(LOOP_SET_FD)
-COMPATIBLE_IOCTL(LOOP_CLR_FD)
 COMPATIBLE_IOCTL(LOOP_SET_STATUS64)
 COMPATIBLE_IOCTL(LOOP_GET_STATUS64)
 /* Big A */
@@ -4252,175 +3916,10 @@
 COMPATIBLE_IOCTL(AUDIO_GETDEV)
 COMPATIBLE_IOCTL(AUDIO_GETDEV_SUNOS)
 COMPATIBLE_IOCTL(AUDIO_FLUSH)
-/* Big Q for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
-COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
-COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
-/* Big T for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_START)
-COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
-COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
-/* Little m for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
-/* Big P for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
-COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
-/* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
-/* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
-COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
-/* Big C for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
-COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
-COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
-COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
-/* Big M for sound/OSS */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE)
-/* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
-/* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
-/* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
-/* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
-COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
-COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
-COMPATIBLE_IOCTL(OSS_GETVERSION)
-/* AUTOFS */
-COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
-COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
-COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
-COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
-COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
-/* DEVFS */
-COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
-COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
 /* Raw devices */
 COMPATIBLE_IOCTL(RAW_SETBIND)
 COMPATIBLE_IOCTL(RAW_GETBIND)
-/* SMB ioctls which do not need any translations */
-COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
 /* NCP ioctls which do not need any translations */
 COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN)
 COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT)
@@ -4433,22 +3932,6 @@
 COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS)
 COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL)
 COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL)
-/* Little a */
-COMPATIBLE_IOCTL(ATMSIGD_CTRL)
-COMPATIBLE_IOCTL(ATMARPD_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_MCAST)
-COMPATIBLE_IOCTL(ATMLEC_DATA)
-COMPATIBLE_IOCTL(ATM_SETSC)
-COMPATIBLE_IOCTL(SIOCSIFATMTCP)
-COMPATIBLE_IOCTL(SIOCMKCLIP)
-COMPATIBLE_IOCTL(ATMARP_MKIP)
-COMPATIBLE_IOCTL(ATMARP_SETENTRY)
-COMPATIBLE_IOCTL(ATMARP_ENCAP)
-COMPATIBLE_IOCTL(ATMTCP_CREATE)
-COMPATIBLE_IOCTL(ATMTCP_REMOVE)
-COMPATIBLE_IOCTL(ATMMPC_CTRL)
-COMPATIBLE_IOCTL(ATMMPC_DATA)
 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
 COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
 COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
@@ -4470,42 +3953,9 @@
 COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
 COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
 #endif /* DRM */
-/* Big W */
-/* WIOC_GETSUPPORT not yet implemented -E */
-COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
-COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS)
-COMPATIBLE_IOCTL(WDIOC_GETTEMP)
-COMPATIBLE_IOCTL(WDIOC_SETOPTIONS)
-COMPATIBLE_IOCTL(WDIOC_KEEPALIVE)
 COMPATIBLE_IOCTL(WIOCSTART)
 COMPATIBLE_IOCTL(WIOCSTOP)
 COMPATIBLE_IOCTL(WIOCGSTAT)
-/* Big R */
-COMPATIBLE_IOCTL(RNDGETENTCNT)
-COMPATIBLE_IOCTL(RNDADDTOENTCNT)
-COMPATIBLE_IOCTL(RNDGETPOOL)
-COMPATIBLE_IOCTL(RNDADDENTROPY)
-COMPATIBLE_IOCTL(RNDZAPENTCNT)
-COMPATIBLE_IOCTL(RNDCLEARPOOL)
-/* Bluetooth ioctls */
-COMPATIBLE_IOCTL(HCIDEVUP)
-COMPATIBLE_IOCTL(HCIDEVDOWN)
-COMPATIBLE_IOCTL(HCIDEVRESET)
-COMPATIBLE_IOCTL(HCIDEVRESTAT)
-COMPATIBLE_IOCTL(HCIGETDEVLIST)
-COMPATIBLE_IOCTL(HCIGETDEVINFO)
-COMPATIBLE_IOCTL(HCIGETCONNLIST)
-COMPATIBLE_IOCTL(HCIGETCONNINFO)
-COMPATIBLE_IOCTL(HCISETRAW)
-COMPATIBLE_IOCTL(HCISETSCAN)
-COMPATIBLE_IOCTL(HCISETAUTH)
-COMPATIBLE_IOCTL(HCISETENCRYPT)
-COMPATIBLE_IOCTL(HCISETPTYPE)
-COMPATIBLE_IOCTL(HCISETLINKPOL)
-COMPATIBLE_IOCTL(HCISETLINKMODE)
-COMPATIBLE_IOCTL(HCISETACLMTU)
-COMPATIBLE_IOCTL(HCISETSCOMTU)
-COMPATIBLE_IOCTL(HCIINQUIRY)
 COMPATIBLE_IOCTL(HCIUARTSETPROTO)
 COMPATIBLE_IOCTL(HCIUARTGETPROTO)
 COMPATIBLE_IOCTL(RFCOMMCREATEDEV)
@@ -4517,42 +3967,6 @@
 COMPATIBLE_IOCTL(BNEPCONNDEL)
 COMPATIBLE_IOCTL(BNEPGETCONNLIST)
 COMPATIBLE_IOCTL(BNEPGETCONNINFO)
-/* Misc. */
-COMPATIBLE_IOCTL(0x41545900)		/* ATYIO_CLKR */
-COMPATIBLE_IOCTL(0x41545901)		/* ATYIO_CLKW */
-COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
-COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
-/* USB */
-COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
-COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
-COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
-COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
-COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_RESET)
-COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
-/* MTD */
-COMPATIBLE_IOCTL(MEMGETINFO)
-COMPATIBLE_IOCTL(MEMERASE)
-COMPATIBLE_IOCTL(MEMLOCK)
-COMPATIBLE_IOCTL(MEMUNLOCK)
-COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
-COMPATIBLE_IOCTL(MEMGETREGIONINFO)
-/* NBD */
-COMPATIBLE_IOCTL(NBD_SET_SOCK)
-COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
-COMPATIBLE_IOCTL(NBD_SET_SIZE)
-COMPATIBLE_IOCTL(NBD_DO_IT)
-COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
-COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
-COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
-COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
-COMPATIBLE_IOCTL(NBD_DISCONNECT)
 /* device-mapper */
 COMPATIBLE_IOCTL(DM_VERSION)
 COMPATIBLE_IOCTL(DM_REMOVE_ALL)
@@ -4741,134 +4155,3 @@
 HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset)
 HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64)
 IOCTL_TABLE_END
-
-unsigned int ioctl32_hash_table[1024];
-
-static inline unsigned long ioctl32_hash(unsigned long cmd)
-{
-	return ((cmd >> 6) ^ (cmd >> 4) ^ cmd) & 0x3ff;
-}
-
-static void ioctl32_insert_translation(struct ioctl_trans *trans)
-{
-	unsigned long hash;
-	struct ioctl_trans *t;
-
-	hash = ioctl32_hash (trans->cmd);
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = (u32)(long)trans;
-	else {
-		t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
-		while (t->next)
-			t = (struct ioctl_trans *)(long)t->next;
-		trans->next = 0;
-		t->next = (u32)(long)trans;
-	}
-}
-
-static int __init init_sys32_ioctl(void)
-{
-	int i;
-	extern struct ioctl_trans ioctl_translations[], ioctl_translations_end[];
-
-	for (i = 0; &ioctl_translations[i] < &ioctl_translations_end[0]; i++)
-		ioctl32_insert_translation(&ioctl_translations[i]);
-	return 0;
-}
-
-__initcall(init_sys32_ioctl);
-
-static struct ioctl_trans *additional_ioctls;
-
-/* Always call these with kernel lock held! */
-
-int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
-{
-	int i;
-	if (!additional_ioctls) {
-		additional_ioctls = vmalloc(PAGE_SIZE);
-		if (!additional_ioctls)
-			return -ENOMEM;
-		memset(additional_ioctls, 0, PAGE_SIZE);
-	}
-	for (i = 0; i < PAGE_SIZE/sizeof(struct ioctl_trans); i++)
-		if (!additional_ioctls[i].cmd)
-			break;
-	if (i == PAGE_SIZE/sizeof(struct ioctl_trans))
-		return -ENOMEM;
-	additional_ioctls[i].cmd = cmd;
-	if (!handler)
-		additional_ioctls[i].handler = (u32)(long)sys_ioctl;
-	else
-		additional_ioctls[i].handler = (u32)(long)handler;
-	ioctl32_insert_translation(&additional_ioctls[i]);
-	return 0;
-}
-
-int unregister_ioctl32_conversion(unsigned int cmd)
-{
-	unsigned long hash = ioctl32_hash(cmd);
-	struct ioctl_trans *t, *t1;
-
-	t = (struct ioctl_trans *)(long)ioctl32_hash_table[hash];
-	if (!t) return -EINVAL;
-	if (t->cmd == cmd && t >= additional_ioctls &&
-	    (unsigned long)t < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-		ioctl32_hash_table[hash] = t->next;
-		t->cmd = 0;
-		t->next = 0;
-		return 0;
-	} else while (t->next) {
-		t1 = (struct ioctl_trans *)(long)t->next;
-		if (t1->cmd == cmd && t1 >= additional_ioctls &&
-		    (unsigned long)t1 < ((unsigned long)additional_ioctls) + PAGE_SIZE) {
-			t->next = t1->next;
-			t1->cmd = 0;
-			t1->next = 0;
-			return 0;
-		}
-		t = t1;
-	}
-	return -EINVAL;
-}
-
-asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	struct file * filp;
-	int error = -EBADF;
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct ioctl_trans *t;
-
-	filp = fget(fd);
-	if(!filp)
-		goto out2;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	t = (struct ioctl_trans *)(long)ioctl32_hash_table [ioctl32_hash (cmd)];
-
-	while (t && t->cmd != cmd)
-		t = (struct ioctl_trans *)(long)t->next;
-	if (t) {
-		handler = (void *)(long)t->handler;
-		error = handler(fd, cmd, arg, filp);
-	} else if (cmd >= SIOCDEVPRIVATE &&
-		   cmd <= (SIOCDEVPRIVATE + 15)) {
-		error = siocdevprivate_ioctl(fd, cmd, arg);
-	} else {
-		static int count;
-		if (++count <= 20)
-			printk("sys32_ioctl(%s:%d): Unknown cmd fd(%d) "
-			       "cmd(%08x) arg(%08x)\n",
-			       current->comm, current->pid,
-			       (int)fd, (unsigned int)cmd, (unsigned int)arg);
-		error = -EINVAL;
-	}
-out:
-	fput(filp);
-out2:
-	return error;
-}
diff -urN linux-2.5.68-bk10/arch/sparc64/kernel/sparc64_ksyms.c linux-2.5.68-bk11/arch/sparc64/kernel/sparc64_ksyms.c
--- linux-2.5.68-bk10/arch/sparc64/kernel/sparc64_ksyms.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/kernel/sparc64_ksyms.c	2003-05-01 04:40:14.000000000 -0700
@@ -91,7 +91,7 @@
 extern int svr4_getcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
 extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
 extern int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
-extern int sys32_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
+extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
 extern long sparc32_open(const char * filename, int flags, int mode);
 extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));
@@ -319,7 +319,7 @@
 EXPORT_SYMBOL(svr4_setcontext);
 EXPORT_SYMBOL(prom_cpu_nodes);
 EXPORT_SYMBOL(sys_ioctl);
-EXPORT_SYMBOL(sys32_ioctl);
+EXPORT_SYMBOL(compat_sys_ioctl);
 EXPORT_SYMBOL(sparc32_open);
 #endif
 
diff -urN linux-2.5.68-bk10/arch/sparc64/kernel/sunos_ioctl32.c linux-2.5.68-bk11/arch/sparc64/kernel/sunos_ioctl32.c
--- linux-2.5.68-bk10/arch/sparc64/kernel/sunos_ioctl32.c	2003-04-19 19:51:10.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/kernel/sunos_ioctl32.c	2003-05-01 04:40:14.000000000 -0700
@@ -92,7 +92,7 @@
 
 extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
 
-extern asmlinkage int sys32_ioctl(unsigned int, unsigned int, u32);
+extern asmlinkage int compat_sys_ioctl(unsigned int, unsigned int, u32);
 extern asmlinkage int sys_setsid(void);
 
 asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
@@ -127,39 +127,39 @@
 	}
 	switch(cmd) {
 	case _IOW('r', 10, struct rtentry32):
-		ret = sys32_ioctl(fd, SIOCADDRT, arg);
+		ret = compat_sys_ioctl(fd, SIOCADDRT, arg);
 		goto out;
 	case _IOW('r', 11, struct rtentry32):
-		ret = sys32_ioctl(fd, SIOCDELRT, arg);
+		ret = compat_sys_ioctl(fd, SIOCDELRT, arg);
 		goto out;
 
 	case _IOW('i', 12, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFADDR, arg);
 		goto out;
 	case _IOWR('i', 13, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFADDR, arg);
 		goto out;
 	case _IOW('i', 14, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFDSTADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFDSTADDR, arg);
 		goto out;
 	case _IOWR('i', 15, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFDSTADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFDSTADDR, arg);
 		goto out;
 	case _IOW('i', 16, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFFLAGS, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFFLAGS, arg);
 		goto out;
 	case _IOWR('i', 17, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFFLAGS, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFFLAGS, arg);
 		goto out;
 	case _IOW('i', 18, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFMEM, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFMEM, arg);
 		goto out;
 	case _IOWR('i', 19, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFMEM, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFMEM, arg);
 		goto out;
 
 	case _IOWR('i', 20, struct ifconf32):
-		ret = sys32_ioctl(fd, SIOCGIFCONF, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFCONF, arg);
 		goto out;
 
 	case _IOW('i', 21, struct ifreq): /* SIOCSIFMTU */
@@ -170,32 +170,32 @@
 		goto out;
 
 	case _IOWR('i', 23, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFBRDADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFBRDADDR, arg);
 		goto out;
 	case _IOW('i', 24, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFBRDADDR, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFBRDADDR, arg);
 		goto out;
 	case _IOWR('i', 25, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFNETMASK, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFNETMASK, arg);
 		goto out;
 	case _IOW('i', 26, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFNETMASK, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFNETMASK, arg);
 		goto out;
 	case _IOWR('i', 27, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCGIFMETRIC, arg);
+		ret = compat_sys_ioctl(fd, SIOCGIFMETRIC, arg);
 		goto out;
 	case _IOW('i', 28, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCSIFMETRIC, arg);
+		ret = compat_sys_ioctl(fd, SIOCSIFMETRIC, arg);
 		goto out;
 
 	case _IOW('i', 30, struct arpreq):
-		ret = sys32_ioctl(fd, SIOCSARP, arg);
+		ret = compat_sys_ioctl(fd, SIOCSARP, arg);
 		goto out;
 	case _IOWR('i', 31, struct arpreq):
-		ret = sys32_ioctl(fd, SIOCGARP, arg);
+		ret = compat_sys_ioctl(fd, SIOCGARP, arg);
 		goto out;
 	case _IOW('i', 32, struct arpreq):
-		ret = sys32_ioctl(fd, SIOCDARP, arg);
+		ret = compat_sys_ioctl(fd, SIOCDARP, arg);
 		goto out;
 
 	case _IOW('i', 40, struct ifreq32): /* SIOCUPPER */
@@ -209,10 +209,10 @@
 		goto out;
 
 	case _IOW('i', 49, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCADDMULTI, arg);
+		ret = compat_sys_ioctl(fd, SIOCADDMULTI, arg);
 		goto out;
 	case _IOW('i', 50, struct ifreq32):
-		ret = sys32_ioctl(fd, SIOCDELMULTI, arg);
+		ret = compat_sys_ioctl(fd, SIOCDELMULTI, arg);
 		goto out;
 
 	/* FDDI interface ioctls, unsupported. */
@@ -246,7 +246,7 @@
 		ret = -EFAULT;
 		if(get_user(oldval, ptr))
 			goto out;
-		ret = sys32_ioctl(fd, cmd, arg);
+		ret = compat_sys_ioctl(fd, cmd, arg);
 		__get_user(newval, ptr);
 		if(newval == -1) {
 			__put_user(oldval, ptr);
@@ -265,7 +265,7 @@
 		ret = -EFAULT;
 		if(get_user(oldval, ptr))
 			goto out;
-		ret = sys32_ioctl(fd, cmd, arg);
+		ret = compat_sys_ioctl(fd, cmd, arg);
 		__get_user(newval, ptr);
 		if(newval == -1) {
 			__put_user(oldval, ptr);
@@ -277,7 +277,7 @@
 	}
 	};
 
-	ret = sys32_ioctl(fd, cmd, arg);
+	ret = compat_sys_ioctl(fd, cmd, arg);
 	/* so stupid... */
 	ret = (ret == -EINVAL ? -EOPNOTSUPP : ret);
 out:
diff -urN linux-2.5.68-bk10/arch/sparc64/kernel/systbls.S linux-2.5.68-bk11/arch/sparc64/kernel/systbls.S
--- linux-2.5.68-bk10/arch/sparc64/kernel/systbls.S	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/kernel/systbls.S	2003-05-01 04:40:14.000000000 -0700
@@ -29,7 +29,7 @@
 	.word sys_chown, sys_sync, sys_kill, compat_sys_newstat, sys32_sendfile
 /*40*/	.word compat_sys_newlstat, sys_dup, sys_pipe, compat_sys_times, sys_getuid
 	.word sys_umount, sys32_setgid16, sys32_getgid16, sys_signal, sys32_geteuid16
-/*50*/	.word sys32_getegid16, sys_acct, sys_nis_syscall, sys_getgid, sys32_ioctl
+/*50*/	.word sys32_getegid16, sys_acct, sys_nis_syscall, sys_getgid, compat_sys_ioctl
 	.word sys_reboot, sys32_mmap2, sys_symlink, sys_readlink, sys32_execve
 /*60*/	.word sys_umask, sys_chroot, compat_sys_newfstat, sys_fstat64, sys_getpagesize
 	.word sys_msync, sys_vfork, sys32_pread64, sys32_pwrite64, sys_geteuid
diff -urN linux-2.5.68-bk10/arch/sparc64/solaris/ioctl.c linux-2.5.68-bk11/arch/sparc64/solaris/ioctl.c
--- linux-2.5.68-bk10/arch/sparc64/solaris/ioctl.c	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/solaris/ioctl.c	2003-05-01 04:40:14.000000000 -0700
@@ -23,6 +23,7 @@
 #include <linux/netdevice.h>
 #include <linux/mtio.h>
 #include <linux/time.h>
+#include <linux/compat.h>
 
 #include <net/sock.h>
 
@@ -35,7 +36,7 @@
 
 extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, 
 	unsigned long arg);
-extern asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd,
+extern asmlinkage int compat_sys_ioctl(unsigned int fd, unsigned int cmd,
 	u32 arg);
 asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 
@@ -597,9 +598,9 @@
 {
 	switch (cmd & 0xff) {
 	case 10: /* SIOCADDRT */
-		return sys32_ioctl(fd, SIOCADDRT, arg);
+		return compat_sys_ioctl(fd, SIOCADDRT, arg);
 	case 11: /* SIOCDELRT */
-		return sys32_ioctl(fd, SIOCDELRT, arg);
+		return compat_sys_ioctl(fd, SIOCDELRT, arg);
 	}
 	return -ENOSYS;
 }
@@ -608,45 +609,45 @@
 {
 	switch (cmd & 0xff) {
 	case 12: /* SIOCSIFADDR */
-		return sys32_ioctl(fd, SIOCSIFADDR, arg);
+		return compat_sys_ioctl(fd, SIOCSIFADDR, arg);
 	case 13: /* SIOCGIFADDR */
-		return sys32_ioctl(fd, SIOCGIFADDR, arg);
+		return compat_sys_ioctl(fd, SIOCGIFADDR, arg);
 	case 14: /* SIOCSIFDSTADDR */
-		return sys32_ioctl(fd, SIOCSIFDSTADDR, arg);
+		return compat_sys_ioctl(fd, SIOCSIFDSTADDR, arg);
 	case 15: /* SIOCGIFDSTADDR */
-		return sys32_ioctl(fd, SIOCGIFDSTADDR, arg);
+		return compat_sys_ioctl(fd, SIOCGIFDSTADDR, arg);
 	case 16: /* SIOCSIFFLAGS */
-		return sys32_ioctl(fd, SIOCSIFFLAGS, arg);
+		return compat_sys_ioctl(fd, SIOCSIFFLAGS, arg);
 	case 17: /* SIOCGIFFLAGS */
-		return sys32_ioctl(fd, SIOCGIFFLAGS, arg);
+		return compat_sys_ioctl(fd, SIOCGIFFLAGS, arg);
 	case 18: /* SIOCSIFMEM */
-		return sys32_ioctl(fd, SIOCSIFMEM, arg);
+		return compat_sys_ioctl(fd, SIOCSIFMEM, arg);
 	case 19: /* SIOCGIFMEM */
-		return sys32_ioctl(fd, SIOCGIFMEM, arg);
+		return compat_sys_ioctl(fd, SIOCGIFMEM, arg);
 	case 20: /* SIOCGIFCONF */
-		return sys32_ioctl(fd, SIOCGIFCONF, arg);
+		return compat_sys_ioctl(fd, SIOCGIFCONF, arg);
 	case 21: /* SIOCSIFMTU */
-		return sys32_ioctl(fd, SIOCSIFMTU, arg);
+		return compat_sys_ioctl(fd, SIOCSIFMTU, arg);
 	case 22: /* SIOCGIFMTU */
-		return sys32_ioctl(fd, SIOCGIFMTU, arg);
+		return compat_sys_ioctl(fd, SIOCGIFMTU, arg);
 	case 23: /* SIOCGIFBRDADDR */
-		return sys32_ioctl(fd, SIOCGIFBRDADDR, arg);
+		return compat_sys_ioctl(fd, SIOCGIFBRDADDR, arg);
 	case 24: /* SIOCSIFBRDADDR */
-		return sys32_ioctl(fd, SIOCSIFBRDADDR, arg);
+		return compat_sys_ioctl(fd, SIOCSIFBRDADDR, arg);
 	case 25: /* SIOCGIFNETMASK */
-		return sys32_ioctl(fd, SIOCGIFNETMASK, arg);
+		return compat_sys_ioctl(fd, SIOCGIFNETMASK, arg);
 	case 26: /* SIOCSIFNETMASK */
-		return sys32_ioctl(fd, SIOCSIFNETMASK, arg);
+		return compat_sys_ioctl(fd, SIOCSIFNETMASK, arg);
 	case 27: /* SIOCGIFMETRIC */
-		return sys32_ioctl(fd, SIOCGIFMETRIC, arg);
+		return compat_sys_ioctl(fd, SIOCGIFMETRIC, arg);
 	case 28: /* SIOCSIFMETRIC */
-		return sys32_ioctl(fd, SIOCSIFMETRIC, arg);
+		return compat_sys_ioctl(fd, SIOCSIFMETRIC, arg);
 	case 30: /* SIOCSARP */
-		return sys32_ioctl(fd, SIOCSARP, arg);
+		return compat_sys_ioctl(fd, SIOCSARP, arg);
 	case 31: /* SIOCGARP */
-		return sys32_ioctl(fd, SIOCGARP, arg);
+		return compat_sys_ioctl(fd, SIOCGARP, arg);
 	case 32: /* SIOCDARP */
-		return sys32_ioctl(fd, SIOCDARP, arg);
+		return compat_sys_ioctl(fd, SIOCDARP, arg);
 	case 52: /* SIOCGETNAME */
 	case 53: /* SIOCGETPEER */
 		{
diff -urN linux-2.5.68-bk10/arch/sparc64/solaris/timod.c linux-2.5.68-bk11/arch/sparc64/solaris/timod.c
--- linux-2.5.68-bk10/arch/sparc64/solaris/timod.c	2003-04-19 19:49:11.000000000 -0700
+++ linux-2.5.68-bk11/arch/sparc64/solaris/timod.c	2003-05-01 04:40:14.000000000 -0700
@@ -29,8 +29,6 @@
 
 extern asmlinkage int sys_ioctl(unsigned int fd, unsigned int cmd, 
 	unsigned long arg);
-extern asmlinkage int sys32_ioctl(unsigned int fd, unsigned int cmd,
-	u32 arg);
 asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 
 static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED;
diff -urN linux-2.5.68-bk10/arch/x86_64/ia32/ia32_ioctl.c linux-2.5.68-bk11/arch/x86_64/ia32/ia32_ioctl.c
--- linux-2.5.68-bk10/arch/x86_64/ia32/ia32_ioctl.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/x86_64/ia32/ia32_ioctl.c	2003-05-01 04:40:14.000000000 -0700
@@ -63,12 +63,6 @@
 #include <linux/ctype.h>
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/rfcomm.h>
-#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
-/* Ugh. This header really is not clean */
-#define min min
-#define max max
-#include <linux/lvm.h>
-#endif /* LVM */
 
 #include <scsi/scsi.h>
 /* Ugly hack. */
@@ -683,7 +677,7 @@
 	return (void *)regs->rsp - len; 
 }
 
-static int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
 	struct ifreq *u_ifreq64;
 	struct ifreq32 *u_ifreq32 = (struct ifreq32 *) arg;
@@ -2340,445 +2334,6 @@
         return -EINVAL;
 }
 
-#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
-/* Ugh, LVM. Pitty it was not cleaned up before accepted :((. */
-/* AK: dev_t/kdev_t use here is somewhat dubious */
-typedef struct {
-	uint8_t vg_name[NAME_LEN];
-	uint32_t vg_number;
-	uint32_t vg_access;
-	uint32_t vg_status;
-	uint32_t lv_max;
-	uint32_t lv_cur;
-	uint32_t lv_open;
-	uint32_t pv_max;
-	uint32_t pv_cur;
-	uint32_t pv_act;
-	uint32_t dummy;
-	uint32_t vgda;
-	uint32_t pe_size;
-	uint32_t pe_total;
-	uint32_t pe_allocated;
-	uint32_t pvg_total;
-	u32 proc;
-	u32 pv[ABS_MAX_PV + 1];
-	u32 lv[ABS_MAX_LV + 1];
-    	uint8_t vg_uuid[UUID_LEN+1];	/* volume group UUID */
-	uint8_t dummy1[200];
-} vg32_t;
-
-typedef struct {
-	uint8_t id[2];
-	uint16_t version;
-	lvm_disk_data_t pv_on_disk;
-	lvm_disk_data_t vg_on_disk;
-	lvm_disk_data_t pv_namelist_on_disk;
-	lvm_disk_data_t lv_on_disk;
-	lvm_disk_data_t pe_on_disk;
-	uint8_t pv_name[NAME_LEN];
-	uint8_t vg_name[NAME_LEN];
-	uint8_t system_id[NAME_LEN];
-	__u32 pv_dev;
-	uint32_t pv_number;
-	uint32_t pv_status;
-	uint32_t pv_allocatable;
-	uint32_t pv_size;
-	uint32_t lv_cur;
-	uint32_t pe_size;
-	uint32_t pe_total;
-	uint32_t pe_allocated;
-	uint32_t pe_stale;
-	u32 pe;
-	u32 inode;
-	uint8_t pv_uuid[UUID_LEN+1];
-} pv32_t;
-
-typedef struct {
-	char lv_name[NAME_LEN];
-	u32 lv;
-} lv_req32_t;
-
-typedef struct {
-	u32 lv_index;
-	u32 lv;
-	/* Transfer size because user space and kernel space differ */
-	uint16_t size;
-} lv_status_byindex_req32_t;
-
-typedef struct {
-	dev_t dev;
-	u32   lv;
-} lv_status_bydev_req32_t;
-
-typedef struct {
-	uint8_t lv_name[NAME_LEN];
-	kdev_t old_dev;
-	kdev_t new_dev;
-	u32 old_pe;
-	u32 new_pe;
-} le_remap_req32_t;
-
-typedef struct {
-	char pv_name[NAME_LEN];
-	u32 pv;
-} pv_status_req32_t;
-
-typedef struct {
-	uint8_t lv_name[NAME_LEN];
-	uint8_t vg_name[NAME_LEN];
-	uint32_t lv_access;
-	uint32_t lv_status;
-	uint32_t lv_open;
-	kdev_t lv_dev;
-	uint32_t lv_number;
-	uint32_t lv_mirror_copies;
-	uint32_t lv_recovery;
-	uint32_t lv_schedule;
-	uint32_t lv_size;
-	u32 lv_current_pe;
-	uint32_t lv_current_le;
-	uint32_t lv_allocated_le;
-	uint32_t lv_stripes;
-	uint32_t lv_stripesize;
-	uint32_t lv_badblock;
-	uint32_t lv_allocation;
-	uint32_t lv_io_timeout;
-	uint32_t lv_read_ahead;
-	/* delta to version 1 starts here */
-	u32 lv_snapshot_org;
-	u32 lv_snapshot_prev;
-	u32 lv_snapshot_next;
-	u32 lv_block_exception;
-	uint32_t lv_remap_ptr;
-	uint32_t lv_remap_end;
-	uint32_t lv_chunk_size;
-	uint32_t lv_snapshot_minor;
-	char dummy[200];
-} lv32_t;
-
-typedef struct {
-	u32 hash[2];
-	u32 rsector_org;
-	kdev_t rdev_org;
-	u32 rsector_new;
-	kdev_t rdev_new;
-} lv_block_exception32_t;
-
-static void put_lv_t(lv_t *l)
-{
-	if (l->lv_current_pe) vfree(l->lv_current_pe);
-	if (l->lv_block_exception) vfree(l->lv_block_exception);
-	kfree(l);
-}
-
-static lv_t *get_lv_t(u32 p, int *errp)
-{
-	int err, i;
-	u32 ptr1, ptr2;
-	size_t size;
-	lv_block_exception32_t *lbe32;
-	lv_block_exception_t *lbe;
-	lv32_t *ul = (lv32_t *)A(p);
-	lv_t *l = (lv_t *) kmalloc(sizeof(lv_t), GFP_KERNEL);
-
-	if (!l) {
-		*errp = -ENOMEM;
-		return NULL;
-	}
-	memset(l, 0, sizeof(lv_t));
-	err = copy_from_user(l, ul, (long)&((lv32_t *)0)->lv_current_pe);
-	err |= __copy_from_user(&l->lv_current_le, &ul->lv_current_le,
-				((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le));
-	err |= __copy_from_user(&l->lv_remap_ptr, &ul->lv_remap_ptr,
-				((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr));
-	err |= __get_user(ptr1, &ul->lv_current_pe);
-	err |= __get_user(ptr2, &ul->lv_block_exception);
-	if (err) {
-		kfree(l);
-		*errp = -EFAULT;
-		return NULL;
-	}
-	if (ptr1) {
-		size = l->lv_allocated_le * sizeof(pe_t);
-		l->lv_current_pe = vmalloc(size);
-		if (l->lv_current_pe)
-			err = copy_from_user(l->lv_current_pe, (void *)A(ptr1), size);
-	}
-	if (!err && ptr2) {
-		size = l->lv_remap_end * sizeof(lv_block_exception_t);
-		l->lv_block_exception = lbe = vmalloc(size);
-		if (l->lv_block_exception) {
-			lbe32 = (lv_block_exception32_t *)A(ptr2);
-			memset(lbe, 0, size);
-                       for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) {
-                               err |= get_user(lbe->rsector_org, &lbe32->rsector_org);
-                               err |= __get_user(lbe->rdev_org, &lbe32->rdev_org);
-                               err |= __get_user(lbe->rsector_new, &lbe32->rsector_new);
-                               err |= __get_user(lbe->rdev_new, &lbe32->rdev_new);
-			}
-		}
-	}
-	if (err || (ptr1 && !l->lv_current_pe) || (ptr2 && !l->lv_block_exception)) {
-		if (!err)
-			*errp = -ENOMEM;
-		else
-			*errp = -EFAULT;
-		put_lv_t(l);
-		return NULL;
-	}
-	return l;
-}
-
-static int copy_lv_t(u32 ptr, lv_t *l)
-{
-	int err;
-	lv32_t *ul = (lv32_t *)A(ptr);
-	u32 ptr1;
-	size_t size;
-
-	err = get_user(ptr1, &ul->lv_current_pe);
-	if (err)
-		return -EFAULT;
-	err = copy_to_user(ul, l, (long)&((lv32_t *)0)->lv_current_pe);
-	err |= __copy_to_user(&ul->lv_current_le, &l->lv_current_le,
-				((long)&ul->lv_snapshot_org) - ((long)&ul->lv_current_le));
-	err |= __copy_to_user(&ul->lv_remap_ptr, &l->lv_remap_ptr,
-				((long)&ul->dummy[0]) - ((long)&ul->lv_remap_ptr));
-	size = l->lv_allocated_le * sizeof(pe_t);
-	if (ptr1)
-		err |= __copy_to_user((void *)A(ptr1), l->lv_current_pe, size);
-	return err ? -EFAULT : 0;
-}
-
-static int do_lvm_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	vg_t *v = NULL;
-	union {
-		lv_req_t lv_req;
-		le_remap_req_t le_remap;
-		lv_status_byindex_req_t lv_byindex;
-	        lv_status_bydev_req_t lv_bydev;
-		pv_status_req_t pv_status;
-	} u;
-	pv_t p;
-	int err;
-	u32 ptr = 0;
-	int i;
-	mm_segment_t old_fs;
-	void *karg = &u;
-
-	switch (cmd) {
-	case VG_STATUS:
-		v = kmalloc(sizeof(vg_t), GFP_KERNEL);
-		if (!v)
-			return -ENOMEM;
-		karg = v;
-		break;
-
-	case VG_CREATE_OLD:
-	case VG_CREATE:
-		v = kmalloc(sizeof(vg_t), GFP_KERNEL);
-		if (!v)
-			return -ENOMEM;
-		if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc)) {
-			kfree(v);
-			return -EFAULT;
-		}
-		/* 'proc' field is unused, just NULL it out. */
-		v->proc = NULL;
-		if (copy_from_user(v->vg_uuid, ((vg32_t *)arg)->vg_uuid, UUID_LEN+1)) {
-			kfree(v);
-			return -EFAULT;
-		}
-		    
-		karg = v;
-		memset(v->pv, 0, sizeof(v->pv) + sizeof(v->lv));
-		if (v->pv_max > ABS_MAX_PV || v->lv_max > ABS_MAX_LV)
-			return -EPERM;
-		for (i = 0; i < v->pv_max; i++) {
-			err = __get_user(ptr, &((vg32_t *)arg)->pv[i]);
-			if (err)
-				break;
-			if (ptr) {
-				v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL);
-				if (!v->pv[i]) {
-					err = -ENOMEM;
-					break;
-				}
-				err = copy_from_user(v->pv[i], (void *)A(ptr),
-						     sizeof(pv32_t) - 8 - UUID_LEN+1);
-				if (err) {
-					err = -EFAULT;
-					break;
-				}
-				err = copy_from_user(v->pv[i]->pv_uuid,
-						     ((pv32_t *)A(ptr))->pv_uuid,
-						     UUID_LEN+1);
-				if (err) {
-				        err = -EFAULT;
-					break;
-				}
-
-				v->pv[i]->pe = NULL;
-				v->pv[i]->bd = NULL;
-			}
-		}
-		if (!err) {
-			for (i = 0; i < v->lv_max; i++) {
-				err = __get_user(ptr, &((vg32_t *)arg)->lv[i]);
-				if (err)
-					break;
-				if (ptr) {
-					v->lv[i] = get_lv_t(ptr, &err);
-					if (err)
-						break;
-				}
-			}
-		}
-		break;
-
-	case LV_CREATE:
-	case LV_EXTEND:
-	case LV_REDUCE:
-	case LV_REMOVE:
-	case LV_RENAME:
-	case LV_STATUS_BYNAME:
-	        err = copy_from_user(&u.pv_status, (void*)arg, sizeof(u.pv_status.pv_name));
-		if (err)
-			return -EFAULT;
-		if (cmd != LV_REMOVE) {
-			err = __get_user(ptr, &((lv_req32_t *)arg)->lv);
-			if (err)
-				return err;
-			u.lv_req.lv = get_lv_t(ptr, &err);
-		} else
-			u.lv_req.lv = NULL;
-		break;
-
-	case LV_STATUS_BYINDEX:
-		err = get_user(u.lv_byindex.lv_index,
-			       &((lv_status_byindex_req32_t *)arg)->lv_index);
-		err |= __get_user(ptr, &((lv_status_byindex_req32_t *)arg)->lv);
-		if (err)
-			return err;
-		u.lv_byindex.lv = get_lv_t(ptr, &err);
-		break;
-
-	case LV_STATUS_BYDEV:
-	        err = get_user(u.lv_bydev.dev, &((lv_status_bydev_req32_t *)arg)->dev);
-		err |= __get_user(ptr, &((lv_status_bydev_req32_t *)arg)->lv);
-		if (err)
-			return err;
-		u.lv_bydev.lv = get_lv_t(ptr, &err);
-		break;		
-
-	case VG_EXTEND:
-		err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1);
-		if (err)
-			return -EFAULT;
-		err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1);
-		if (err)
-			return -EFAULT;
-		p.pe = NULL;
-		p.bd = NULL;
-		karg = &p;
-		break;
-
-	case PV_CHANGE:
-	case PV_STATUS:
-		err = copy_from_user(&u.pv_status, (void*)arg, sizeof(u.lv_req.lv_name));
-		if (err)
-			return -EFAULT;
-		err = __get_user(ptr, &((pv_status_req32_t *)arg)->pv);
-		if (err)
-			return err;
-		u.pv_status.pv = &p;
-		if (cmd == PV_CHANGE) {
-			err = copy_from_user(&p, (void *)A(ptr),
-					     sizeof(pv32_t) - 8 - UUID_LEN+1);
-			if (err)
-				return -EFAULT;
-			p.pe = NULL;
-			p.bd = NULL;
-		}
-		break;
-	};
-
-        old_fs = get_fs(); set_fs (KERNEL_DS);
-        err = sys_ioctl (fd, cmd, (unsigned long)karg);
-        set_fs (old_fs);
-
-	switch (cmd) {
-	case VG_STATUS:
-		if (!err) {
-			if (copy_to_user((void *)arg, v, (long)&((vg32_t *)0)->proc) ||
-			    clear_user(&((vg32_t *)arg)->proc, sizeof(vg32_t) - (long)&((vg32_t *)0)->proc))
-				err = -EFAULT;
-		}
-		if (copy_to_user(((vg32_t *)arg)->vg_uuid, v->vg_uuid, UUID_LEN+1)) {
-		        err = -EFAULT;
-		}
-		kfree(v);
-		break;
-
-	case VG_CREATE_OLD:
-	case VG_CREATE:
-		for (i = 0; i < v->pv_max; i++) {
-			if (v->pv[i])
-				kfree(v->pv[i]);
-		}
-		for (i = 0; i < v->lv_max; i++) {
-			if (v->lv[i])
-				put_lv_t(v->lv[i]);
-		}
-		kfree(v);
-		break;
-
-	case LV_STATUS_BYNAME:
-		if (!err && u.lv_req.lv)
-			err = copy_lv_t(ptr, u.lv_req.lv);
-		/* Fall through */
-
-        case LV_CREATE:
-	case LV_EXTEND:
-	case LV_REDUCE:
-		if (u.lv_req.lv)
-			put_lv_t(u.lv_req.lv);
-		break;
-
-	case LV_STATUS_BYINDEX:
-		if (u.lv_byindex.lv) {
-			if (!err)
-				err = copy_lv_t(ptr, u.lv_byindex.lv);
-			put_lv_t(u.lv_byindex.lv);
-		}
-		break;
-
-	case LV_STATUS_BYDEV:
-	        if (u.lv_bydev.lv) {
-			if (!err)
-				err = copy_lv_t(ptr, u.lv_bydev.lv);
-			put_lv_t(u.lv_byindex.lv);
-	        }
-	        break;
-
-	case PV_STATUS:
-		if (!err) {
-			err = copy_to_user((void *)A(ptr), &p, sizeof(pv32_t) - 8 - UUID_LEN+1);
-			if (err)
-				return -EFAULT;
-			err = copy_to_user(((pv_t *)A(ptr))->pv_uuid, p.pv_uuid, UUID_LEN + 1);
-			if (err)
-				return -EFAULT;
-	}
-		break;
-	};
-
-	return err;
-}
-#endif
-
-
 static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
 	return -EINVAL;
@@ -3581,567 +3136,21 @@
 	return err;
 } 
 
-struct ioctl_trans {
-	unsigned long cmd;
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct ioctl_trans *next;
-};
-
 #define REF_SYMBOL(handler) if (0) (void)handler;
 #define HANDLE_IOCTL2(cmd,handler) REF_SYMBOL(handler);  asm volatile(".quad %c0, " #handler ",0"::"i" (cmd)); 
 #define HANDLE_IOCTL(cmd,handler) HANDLE_IOCTL2(cmd,handler)
 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd,sys_ioctl)
-#define IOCTL_TABLE_START void ioctl_dummy(void) { asm volatile("\nioctl_start:\n\t" );
-#define IOCTL_TABLE_END  asm volatile("\nioctl_end:"); }
+#define IOCTL_TABLE_START void ioctl_dummy(void) { asm volatile("\n.global ioctl_start\nioctl_start:\n\t" );
+#define IOCTL_TABLE_END  asm volatile("\n.global ioctl_end;\nioctl_end:\n"); }
 
 IOCTL_TABLE_START
-/* List here explicitly which ioctl's are known to have
- * compatible types passed or none at all...
- */
-/* Big T */
-COMPATIBLE_IOCTL(TCGETA)
-COMPATIBLE_IOCTL(TCSETA)
-COMPATIBLE_IOCTL(TCSETAW)
-COMPATIBLE_IOCTL(TCSETAF)
-COMPATIBLE_IOCTL(TCSBRK)
-COMPATIBLE_IOCTL(TCXONC)
-COMPATIBLE_IOCTL(TCFLSH)
-COMPATIBLE_IOCTL(TCGETS)
-COMPATIBLE_IOCTL(TCSETS)
-COMPATIBLE_IOCTL(TCSETSW)
-COMPATIBLE_IOCTL(TCSETSF)
-COMPATIBLE_IOCTL(TIOCLINUX)
-/* Little t */
-COMPATIBLE_IOCTL(TIOCGETD)
-COMPATIBLE_IOCTL(TIOCSETD)
-COMPATIBLE_IOCTL(TIOCEXCL)
-COMPATIBLE_IOCTL(TIOCNXCL)
-COMPATIBLE_IOCTL(TIOCCONS)
-COMPATIBLE_IOCTL(TIOCGSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSSOFTCAR)
-COMPATIBLE_IOCTL(TIOCSWINSZ)
-COMPATIBLE_IOCTL(TIOCGWINSZ)
-COMPATIBLE_IOCTL(TIOCMGET)
-COMPATIBLE_IOCTL(TIOCMBIC)
-COMPATIBLE_IOCTL(TIOCMBIS)
-COMPATIBLE_IOCTL(TIOCMSET)
-COMPATIBLE_IOCTL(TIOCPKT)
-COMPATIBLE_IOCTL(TIOCNOTTY)
-COMPATIBLE_IOCTL(TIOCSTI)
-COMPATIBLE_IOCTL(TIOCOUTQ)
-COMPATIBLE_IOCTL(TIOCSPGRP)
-COMPATIBLE_IOCTL(TIOCGPGRP)
-COMPATIBLE_IOCTL(TIOCSCTTY)
-COMPATIBLE_IOCTL(TIOCGPTN)
-COMPATIBLE_IOCTL(TIOCSPTLCK)
-COMPATIBLE_IOCTL(TIOCSERGETLSR)
-/* Big F */
-COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
-COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
-COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
-COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
-COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
-/* Little f */
-COMPATIBLE_IOCTL(FIOCLEX)
-COMPATIBLE_IOCTL(FIONCLEX)
-COMPATIBLE_IOCTL(FIOASYNC)
-COMPATIBLE_IOCTL(FIONBIO)
-COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
-/* 0x00 */
-COMPATIBLE_IOCTL(FIBMAP)
-COMPATIBLE_IOCTL(FIGETBSZ)
-/* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
- *         Some need translations, these do not.
- */
-COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
-COMPATIBLE_IOCTL(HDIO_SET_DMA)
+#include <linux/compat_ioctl.h>
 COMPATIBLE_IOCTL(HDIO_SET_KEEPSETTINGS)
-COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
-COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
-COMPATIBLE_IOCTL(HDIO_SET_32BIT)
-COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
-COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
-COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
 COMPATIBLE_IOCTL(HDIO_SCAN_HWIF)
-COMPATIBLE_IOCTL(HDIO_SET_NICE)
-/* 0x02 -- Floppy ioctls */
-COMPATIBLE_IOCTL(FDMSGON)
-COMPATIBLE_IOCTL(FDMSGOFF)
-COMPATIBLE_IOCTL(FDSETEMSGTRESH)
-COMPATIBLE_IOCTL(FDFLUSH)
-COMPATIBLE_IOCTL(FDWERRORCLR)
-COMPATIBLE_IOCTL(FDSETMAXERRS)
-COMPATIBLE_IOCTL(FDGETMAXERRS)
-COMPATIBLE_IOCTL(FDGETDRVTYP)
-COMPATIBLE_IOCTL(FDEJECT)
-COMPATIBLE_IOCTL(FDCLRPRM)
-COMPATIBLE_IOCTL(FDFMTBEG)
-COMPATIBLE_IOCTL(FDFMTEND)
-COMPATIBLE_IOCTL(FDRESET)
-COMPATIBLE_IOCTL(FDTWADDLE)
-COMPATIBLE_IOCTL(FDFMTTRK)
-COMPATIBLE_IOCTL(FDRAWCMD)
-/* 0x12 */
-COMPATIBLE_IOCTL(BLKROSET)
-COMPATIBLE_IOCTL(BLKROGET)
-COMPATIBLE_IOCTL(BLKRRPART)
-COMPATIBLE_IOCTL(BLKFLSBUF)
 COMPATIBLE_IOCTL(BLKRASET)
 COMPATIBLE_IOCTL(BLKFRASET)
-COMPATIBLE_IOCTL(BLKSECTSET)
-COMPATIBLE_IOCTL(BLKSSZGET)
-/* RAID */
-COMPATIBLE_IOCTL(RAID_VERSION)
-COMPATIBLE_IOCTL(GET_ARRAY_INFO)
-COMPATIBLE_IOCTL(GET_DISK_INFO)
-COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
-COMPATIBLE_IOCTL(CLEAR_ARRAY)
-COMPATIBLE_IOCTL(ADD_NEW_DISK)
-COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
-COMPATIBLE_IOCTL(SET_ARRAY_INFO)
-COMPATIBLE_IOCTL(SET_DISK_INFO)
-COMPATIBLE_IOCTL(WRITE_RAID_INFO)
-COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
-COMPATIBLE_IOCTL(PROTECT_ARRAY)
-COMPATIBLE_IOCTL(HOT_ADD_DISK)
-COMPATIBLE_IOCTL(SET_DISK_FAULTY)
-COMPATIBLE_IOCTL(RUN_ARRAY)
-COMPATIBLE_IOCTL(START_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY)
-COMPATIBLE_IOCTL(STOP_ARRAY_RO)
-COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
-/* Big K */
-COMPATIBLE_IOCTL(PIO_FONT)
-COMPATIBLE_IOCTL(GIO_FONT)
-COMPATIBLE_IOCTL(KDSIGACCEPT)
-COMPATIBLE_IOCTL(KDGETKEYCODE)
-COMPATIBLE_IOCTL(KDSETKEYCODE)
-COMPATIBLE_IOCTL(KIOCSOUND)
-COMPATIBLE_IOCTL(KDMKTONE)
-COMPATIBLE_IOCTL(KDGKBTYPE)
-COMPATIBLE_IOCTL(KDSETMODE)
-COMPATIBLE_IOCTL(KDGETMODE)
-COMPATIBLE_IOCTL(KDSKBMODE)
-COMPATIBLE_IOCTL(KDGKBMODE)
-COMPATIBLE_IOCTL(KDSKBMETA)
-COMPATIBLE_IOCTL(KDGKBMETA)
-COMPATIBLE_IOCTL(KDGKBENT)
-COMPATIBLE_IOCTL(KDSKBENT)
-COMPATIBLE_IOCTL(KDGKBSENT)
-COMPATIBLE_IOCTL(KDSKBSENT)
-COMPATIBLE_IOCTL(KDGKBDIACR)
-COMPATIBLE_IOCTL(KDSKBDIACR)
-COMPATIBLE_IOCTL(KDKBDREP)
-COMPATIBLE_IOCTL(KDGKBLED)
-COMPATIBLE_IOCTL(KDSKBLED)
-COMPATIBLE_IOCTL(KDGETLED)
-COMPATIBLE_IOCTL(KDSETLED)
-COMPATIBLE_IOCTL(GIO_SCRNMAP)
-COMPATIBLE_IOCTL(PIO_SCRNMAP)
-COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
-COMPATIBLE_IOCTL(PIO_FONTRESET)
-COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
-/* Big S */
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
-COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
-COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
-COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
-/* Big T */
-COMPATIBLE_IOCTL(TUNSETNOCSUM)
-COMPATIBLE_IOCTL(TUNSETDEBUG)
-COMPATIBLE_IOCTL(TUNSETIFF)
-COMPATIBLE_IOCTL(TUNSETPERSIST)
-COMPATIBLE_IOCTL(TUNSETOWNER)
-/* Big V */
-COMPATIBLE_IOCTL(VT_SETMODE)
-COMPATIBLE_IOCTL(VT_GETMODE)
-COMPATIBLE_IOCTL(VT_GETSTATE)
-COMPATIBLE_IOCTL(VT_OPENQRY)
-COMPATIBLE_IOCTL(VT_ACTIVATE)
-COMPATIBLE_IOCTL(VT_WAITACTIVE)
-COMPATIBLE_IOCTL(VT_RELDISP)
-COMPATIBLE_IOCTL(VT_DISALLOCATE)
-COMPATIBLE_IOCTL(VT_RESIZE)
-COMPATIBLE_IOCTL(VT_RESIZEX)
-COMPATIBLE_IOCTL(VT_LOCKSWITCH)
-COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
-/* Little v */
-/* Little v, the video4linux ioctls (conflict?) */
-COMPATIBLE_IOCTL(VIDIOCGCAP)
-COMPATIBLE_IOCTL(VIDIOCGCHAN)
-COMPATIBLE_IOCTL(VIDIOCSCHAN)
-COMPATIBLE_IOCTL(VIDIOCGPICT)
-COMPATIBLE_IOCTL(VIDIOCSPICT)
-COMPATIBLE_IOCTL(VIDIOCCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCKEY)
-COMPATIBLE_IOCTL(VIDIOCGAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSAUDIO)
-COMPATIBLE_IOCTL(VIDIOCSYNC)
-COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCGMBUF)
-COMPATIBLE_IOCTL(VIDIOCGUNIT)
-COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
-COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
-/* BTTV specific... */
-COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
-COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
-COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
-COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
-/* Little p (/dev/rtc, /dev/envctrl, etc.) */
-COMPATIBLE_IOCTL(RTC_AIE_ON)
-COMPATIBLE_IOCTL(RTC_AIE_OFF)
-COMPATIBLE_IOCTL(RTC_UIE_ON)
-COMPATIBLE_IOCTL(RTC_UIE_OFF)
-COMPATIBLE_IOCTL(RTC_PIE_ON)
-COMPATIBLE_IOCTL(RTC_PIE_OFF)
-COMPATIBLE_IOCTL(RTC_WIE_ON)
-COMPATIBLE_IOCTL(RTC_WIE_OFF)
-COMPATIBLE_IOCTL(RTC_ALM_SET)
-COMPATIBLE_IOCTL(RTC_ALM_READ)
-COMPATIBLE_IOCTL(RTC_RD_TIME)
-COMPATIBLE_IOCTL(RTC_SET_TIME)
-COMPATIBLE_IOCTL(RTC_WKALM_SET)
-COMPATIBLE_IOCTL(RTC_WKALM_RD)
-/* Little m */
-COMPATIBLE_IOCTL(MTIOCTOP)
-/* Socket level stuff */
-COMPATIBLE_IOCTL(FIOSETOWN)
-COMPATIBLE_IOCTL(SIOCSPGRP)
-COMPATIBLE_IOCTL(FIOGETOWN)
-COMPATIBLE_IOCTL(SIOCGPGRP)
-COMPATIBLE_IOCTL(SIOCATMARK)
-COMPATIBLE_IOCTL(SIOCSIFLINK)
-COMPATIBLE_IOCTL(SIOCSIFENCAP)
-COMPATIBLE_IOCTL(SIOCGIFENCAP)
-COMPATIBLE_IOCTL(SIOCSIFBR)
-COMPATIBLE_IOCTL(SIOCGIFBR)
-COMPATIBLE_IOCTL(SIOCSARP)
-COMPATIBLE_IOCTL(SIOCGARP)
-COMPATIBLE_IOCTL(SIOCDARP)
-COMPATIBLE_IOCTL(SIOCSRARP)
-COMPATIBLE_IOCTL(SIOCGRARP)
-COMPATIBLE_IOCTL(SIOCDRARP)
-COMPATIBLE_IOCTL(SIOCADDDLCI)
-COMPATIBLE_IOCTL(SIOCDELDLCI)
-COMPATIBLE_IOCTL(SIOCGMIIPHY)
-COMPATIBLE_IOCTL(SIOCGMIIREG)
-COMPATIBLE_IOCTL(SIOCSMIIREG)
-COMPATIBLE_IOCTL(SIOCGIFVLAN)
-COMPATIBLE_IOCTL(SIOCSIFVLAN)
-/* SG stuff */
-COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
-COMPATIBLE_IOCTL(SG_EMULATED_HOST)
-COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
-COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
-COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
-COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
-COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
-COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_PACK_ID)
-COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
-COMPATIBLE_IOCTL(SG_SET_DEBUG)
-COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
-COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
-COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
-COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
-COMPATIBLE_IOCTL(SG_SCSI_RESET)
-COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
-COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
-COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
-/* PPP stuff */
-COMPATIBLE_IOCTL(PPPIOCGFLAGS)
-COMPATIBLE_IOCTL(PPPIOCSFLAGS)
-COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGUNIT)
-COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCGMRU)
-COMPATIBLE_IOCTL(PPPIOCSMRU)
-COMPATIBLE_IOCTL(PPPIOCSMAXCID)
-COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
-COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
-/* PPPIOCSCOMPRESS is translated */
-COMPATIBLE_IOCTL(PPPIOCGNPMODE)
-COMPATIBLE_IOCTL(PPPIOCSNPMODE)
-COMPATIBLE_IOCTL(PPPIOCGDEBUG)
-COMPATIBLE_IOCTL(PPPIOCSDEBUG)
-/* PPPIOCSPASS is translated */
-/* PPPIOCSACTIVE is translated */
-/* PPPIOCGIDLE is translated */
-COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
-COMPATIBLE_IOCTL(PPPIOCATTACH)
-COMPATIBLE_IOCTL(PPPIOCDETACH)
-COMPATIBLE_IOCTL(PPPIOCSMRRU)
-COMPATIBLE_IOCTL(PPPIOCCONNECT)
-COMPATIBLE_IOCTL(PPPIOCDISCONN)
-COMPATIBLE_IOCTL(PPPIOCATTCHAN)
-COMPATIBLE_IOCTL(PPPIOCGCHAN)
-/* PPPOX */
-COMPATIBLE_IOCTL(PPPOEIOCSFWD)
-COMPATIBLE_IOCTL(PPPOEIOCDFWD)
-/* LP */
-COMPATIBLE_IOCTL(LPGETSTATUS)
-/* CDROM stuff */
-COMPATIBLE_IOCTL(CDROMPAUSE)
-COMPATIBLE_IOCTL(CDROMRESUME)
-COMPATIBLE_IOCTL(CDROMPLAYMSF)
-COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
-COMPATIBLE_IOCTL(CDROMREADTOCHDR)
-COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
-COMPATIBLE_IOCTL(CDROMSTOP)
-COMPATIBLE_IOCTL(CDROMSTART)
-COMPATIBLE_IOCTL(CDROMEJECT)
-COMPATIBLE_IOCTL(CDROMVOLCTRL)
-COMPATIBLE_IOCTL(CDROMSUBCHNL)
-COMPATIBLE_IOCTL(CDROMEJECT_SW)
-COMPATIBLE_IOCTL(CDROMMULTISESSION)
-COMPATIBLE_IOCTL(CDROM_GET_MCN)
-COMPATIBLE_IOCTL(CDROMRESET)
-COMPATIBLE_IOCTL(CDROMVOLREAD)
-COMPATIBLE_IOCTL(CDROMSEEK)
-COMPATIBLE_IOCTL(CDROMPLAYBLK)
-COMPATIBLE_IOCTL(CDROMCLOSETRAY)
-COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
-COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
-COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
-COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
-COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
-COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
-COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
-COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
-COMPATIBLE_IOCTL(CDROM_DEBUG)
-COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
-/* DVD ioctls */
-COMPATIBLE_IOCTL(DVD_READ_STRUCT)
-COMPATIBLE_IOCTL(DVD_WRITE_STRUCT)
-COMPATIBLE_IOCTL(DVD_AUTH)
-/* Big L */
-COMPATIBLE_IOCTL(LOOP_SET_FD)
-COMPATIBLE_IOCTL(LOOP_CLR_FD)
-/* Big A */
-/* sparc only */
-/* Big Q for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
-COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
-COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
-COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
-COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
-/* Big T for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_START)
-COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
-COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
-COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
-COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
-/* Little m for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
-COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
-/* Big P for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
-COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
-COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
-/* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
-/* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
-COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
-COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
-COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
-COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
-/* Big C for sound/OSS */
-COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
-COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
-COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
-COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
-COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
-COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
-/* Big M for sound/OSS */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE)
-/* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
-/* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
-COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
-COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
-/* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
-/* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
-COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
-COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
-COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
-COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
-COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
-COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
-COMPATIBLE_IOCTL(OSS_GETVERSION)
-/* AUTOFS */
-COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
-COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
-COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
-COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
-COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
-COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
-/* DEVFS */
-COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
-COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
-COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
-/* SMB ioctls which do not need any translations */
-COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
-/* Little a */
-COMPATIBLE_IOCTL(ATMSIGD_CTRL)
-COMPATIBLE_IOCTL(ATMARPD_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_CTRL)
-COMPATIBLE_IOCTL(ATMLEC_MCAST)
-COMPATIBLE_IOCTL(ATMLEC_DATA)
-COMPATIBLE_IOCTL(ATM_SETSC)
-COMPATIBLE_IOCTL(SIOCSIFATMTCP)
-COMPATIBLE_IOCTL(SIOCMKCLIP)
-COMPATIBLE_IOCTL(ATMARP_MKIP)
-COMPATIBLE_IOCTL(ATMARP_SETENTRY)
-COMPATIBLE_IOCTL(ATMARP_ENCAP)
-COMPATIBLE_IOCTL(ATMTCP_CREATE)
-COMPATIBLE_IOCTL(ATMTCP_REMOVE)
-COMPATIBLE_IOCTL(ATMMPC_CTRL)
-COMPATIBLE_IOCTL(ATMMPC_DATA)
-#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
-/* 0xfe - lvm */
-COMPATIBLE_IOCTL(VG_SET_EXTENDABLE)
-COMPATIBLE_IOCTL(VG_STATUS_GET_COUNT)
-COMPATIBLE_IOCTL(VG_STATUS_GET_NAMELIST)
-COMPATIBLE_IOCTL(VG_REMOVE)
-COMPATIBLE_IOCTL(VG_RENAME)
-COMPATIBLE_IOCTL(VG_REDUCE)
-COMPATIBLE_IOCTL(PE_LOCK_UNLOCK)
-COMPATIBLE_IOCTL(PV_FLUSH)
-COMPATIBLE_IOCTL(LVM_LOCK_LVM)
-COMPATIBLE_IOCTL(LVM_GET_IOP_VERSION)
-#ifdef LVM_TOTAL_RESET
-COMPATIBLE_IOCTL(LVM_RESET)
-#endif
-COMPATIBLE_IOCTL(LV_SET_ACCESS)
-COMPATIBLE_IOCTL(LV_SET_STATUS)
-COMPATIBLE_IOCTL(LV_SET_ALLOCATION)
-COMPATIBLE_IOCTL(LE_REMAP)
-COMPATIBLE_IOCTL(LV_BMAP)
-COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
-#endif /* LVM */
+COMPATIBLE_IOCTL(0x4B50)   /* KDGHWCLK - not in the kernel, but don't complain */
+COMPATIBLE_IOCTL(0x4B51)   /* KDSHWCLK - not in the kernel, but don't complain */
 #ifdef CONFIG_AUTOFS_FS
 COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
 COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
@@ -4149,6 +3158,7 @@
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_SETTIMEOUT)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
 #endif
 #ifdef CONFIG_RTC
 COMPATIBLE_IOCTL(RTC_AIE_ON)
@@ -4166,44 +3176,6 @@
 COMPATIBLE_IOCTL(RTC_WKALM_SET)
 COMPATIBLE_IOCTL(RTC_WKALM_RD)
 #endif
-/* Big W */
-/* WIOC_GETSUPPORT not yet implemented -E */
-COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
-COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS)
-COMPATIBLE_IOCTL(WDIOC_GETTEMP)
-COMPATIBLE_IOCTL(WDIOC_SETOPTIONS)
-COMPATIBLE_IOCTL(WDIOC_KEEPALIVE)
-#if 0 /* sparc only ? */
-COMPATIBLE_IOCTL(WIOCSTART)
-COMPATIBLE_IOCTL(WIOCSTOP)
-COMPATIBLE_IOCTL(WIOCGSTAT)
-#endif
-/* Big R */
-COMPATIBLE_IOCTL(RNDGETENTCNT)
-COMPATIBLE_IOCTL(RNDADDTOENTCNT)
-COMPATIBLE_IOCTL(RNDGETPOOL)
-COMPATIBLE_IOCTL(RNDADDENTROPY)
-COMPATIBLE_IOCTL(RNDZAPENTCNT)
-COMPATIBLE_IOCTL(RNDCLEARPOOL)
-/* Bluetooth ioctls */
-COMPATIBLE_IOCTL(HCIDEVUP)
-COMPATIBLE_IOCTL(HCIDEVDOWN)
-COMPATIBLE_IOCTL(HCIDEVRESET)
-COMPATIBLE_IOCTL(HCIDEVRESTAT)
-COMPATIBLE_IOCTL(HCIGETDEVLIST)
-COMPATIBLE_IOCTL(HCIGETDEVINFO)
-COMPATIBLE_IOCTL(HCIGETCONNLIST)
-COMPATIBLE_IOCTL(HCIGETCONNINFO)
-COMPATIBLE_IOCTL(HCISETRAW)
-COMPATIBLE_IOCTL(HCISETSCAN)
-COMPATIBLE_IOCTL(HCISETAUTH)
-COMPATIBLE_IOCTL(HCISETENCRYPT)
-COMPATIBLE_IOCTL(HCISETPTYPE)
-COMPATIBLE_IOCTL(HCISETLINKPOL)
-COMPATIBLE_IOCTL(HCISETLINKMODE)
-COMPATIBLE_IOCTL(HCISETACLMTU)
-COMPATIBLE_IOCTL(HCISETSCOMTU)
-COMPATIBLE_IOCTL(HCIINQUIRY)
 COMPATIBLE_IOCTL(HCIUARTSETPROTO)
 COMPATIBLE_IOCTL(HCIUARTGETPROTO)
 COMPATIBLE_IOCTL(RFCOMMCREATEDEV)
@@ -4215,44 +3187,7 @@
 COMPATIBLE_IOCTL(BNEPCONNDEL)
 COMPATIBLE_IOCTL(BNEPGETCONNLIST)
 COMPATIBLE_IOCTL(BNEPGETCONNINFO)
-/* Misc. */
-COMPATIBLE_IOCTL(0x41545900)		/* ATYIO_CLKR */
-COMPATIBLE_IOCTL(0x41545901)		/* ATYIO_CLKW */
-COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
-COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
-COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
-COMPATIBLE_IOCTL(0x4B50);   /* KDGHWCLK - not in the kernel, but don't complain */
-COMPATIBLE_IOCTL(0x4B51);   /* KDSHWCLK - not in the kernel, but don't complain */
-/* USB */
-COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
-COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
-COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
-COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
-COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
-COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
-COMPATIBLE_IOCTL(USBDEVFS_RESET)
-COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
-/* MTD */
-COMPATIBLE_IOCTL(MEMGETINFO)
-COMPATIBLE_IOCTL(MEMERASE)
-COMPATIBLE_IOCTL(MEMLOCK)
-COMPATIBLE_IOCTL(MEMUNLOCK)
-COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
-COMPATIBLE_IOCTL(MEMGETREGIONINFO)
-/* NBD */
-COMPATIBLE_IOCTL(NBD_SET_SOCK)
-COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
-COMPATIBLE_IOCTL(NBD_SET_SIZE)
-COMPATIBLE_IOCTL(NBD_DO_IT)
-COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
-COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
-COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
-COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
-COMPATIBLE_IOCTL(NBD_DISCONNECT)
+
 /* And these ioctls need translation */
 HANDLE_IOCTL(TIOCGDEV, tiocgdev)
 HANDLE_IOCTL(TIOCGSERIAL, serial_struct_ioctl)
@@ -4447,217 +3382,3 @@
 HANDLE_IOCTL(MTRRIOC32_KILL_PAGE_ENTRY, mtrr_ioctl32)
 IOCTL_TABLE_END
 
-#define IOCTL_HASHSIZE 256
-struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE];
-
-extern struct ioctl_trans ioctl_start[], ioctl_end[]; 
-
-extern struct ioctl_trans ioctl_start[], ioctl_end[]; 
-
-static inline unsigned long ioctl32_hash(unsigned long cmd)
-{
-	return (((cmd >> 6) ^ (cmd >> 4) ^ cmd)) % IOCTL_HASHSIZE;
-}
-
-static void ioctl32_insert_translation(struct ioctl_trans *trans)
-{
-	unsigned long hash;
-	struct ioctl_trans *t;
-
-	hash = ioctl32_hash (trans->cmd);
-	if (!ioctl32_hash_table[hash])
-		ioctl32_hash_table[hash] = trans;
-	else {
-		t = ioctl32_hash_table[hash];
-		while (t->next)
-			t = t->next;
-		trans->next = 0;
-		t->next = trans;
-	}
-}
-
-static int __init init_sys32_ioctl(void)
-{
-	int i;
-
-	for (i = 0; &ioctl_start[i] < &ioctl_end[0]; i++) {
-		if (ioctl_start[i].next != 0) { 
-			printk("ioctl translation %d bad\n",i); 
-			return -1;
-		}
-
-		ioctl32_insert_translation(&ioctl_start[i]);
-	}
-	return 0;
-}
-
-__initcall(init_sys32_ioctl);
-
-static struct ioctl_trans *ioctl_free_list;
-
-/* Never free them really. This avoids SMP races. With a Read-Copy-Update
-   enabled kernel we could just use the RCU infrastructure for this. */
-static void free_ioctl(struct ioctl_trans *t) 
-{ 
-	t->cmd = 0; 
-	mb();
-	t->next = ioctl_free_list;
-	ioctl_free_list = t;
-} 
-
-int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
-{
-	struct ioctl_trans *t;
-	unsigned long hash = ioctl32_hash(cmd);
-
-	lock_kernel(); 
-	for (t = (struct ioctl_trans *)ioctl32_hash_table[hash];
-	     t;
-	     t = t->next) { 
-		if (t->cmd == cmd) {
-			printk("Trying to register duplicated ioctl32 handler %x\n", cmd);
-			unlock_kernel();
-			return -EINVAL; 
-	}
-	} 
-
-	if (ioctl_free_list) { 
-		t = ioctl_free_list; 
-		ioctl_free_list = t->next; 
-	} else { 
-		t = kmalloc(sizeof(struct ioctl_trans), GFP_KERNEL); 
-		if (!t) { 
-			unlock_kernel();
-		return -ENOMEM;
-		}
-	}
-	
-	t->next = NULL;
-	t->cmd = cmd;
-	t->handler = handler; 
-	ioctl32_insert_translation(t);
-
-	unlock_kernel();
-	return 0;
-}
-
-static inline int builtin_ioctl(struct ioctl_trans *t)
-{ 
-	return t >= (struct ioctl_trans *)ioctl_start &&
-	       t < (struct ioctl_trans *)ioctl_end; 
-} 
-
-/* Problem: 
-   This function cannot unregister duplicate ioctls, because they are not
-   unique.
-   When they happen we need to extend the prototype to pass the handler too. */
-
-int unregister_ioctl32_conversion(unsigned int cmd)
-{
-	unsigned long hash = ioctl32_hash(cmd);
-	struct ioctl_trans *t, *t1;
-
-	lock_kernel(); 
-
-	t = (struct ioctl_trans *)ioctl32_hash_table[hash];
-	if (!t) { 
-		unlock_kernel();
-		return -EINVAL;
-	} 
-
-	if (t->cmd == cmd) { 
-		if (builtin_ioctl(t)) {
-			printk("%p tried to unregister builtin ioctl %x\n",
-			       __builtin_return_address(0), cmd);
-		} else { 
-		ioctl32_hash_table[hash] = t->next;
-			free_ioctl(t); 
-			unlock_kernel();
-		return 0;
-		}
-	} 
-	while (t->next) {
-		t1 = (struct ioctl_trans *)(long)t->next;
-		if (t1->cmd == cmd) { 
-			if (builtin_ioctl(t1)) {
-				printk("%p tried to unregister builtin ioctl %x\n",
-				       __builtin_return_address(0), cmd);
-				goto out;
-			} else { 
-			t->next = t1->next;
-				free_ioctl(t1); 
-				unlock_kernel();
-			return 0;
-		}
-		}
-		t = t1;
-	}
-	printk(KERN_ERR "Trying to free unknown 32bit ioctl handler %x\n", cmd);
- out:
-	unlock_kernel();
-	return -EINVAL;
-}
-
-EXPORT_SYMBOL(register_ioctl32_conversion); 
-EXPORT_SYMBOL(unregister_ioctl32_conversion); 
-
-asmlinkage long sys32_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-	struct file * filp;
-	int error = -EBADF;
-	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
-	struct ioctl_trans *t;
-
-	filp = fget(fd);
-	if(!filp)
-		goto out2;
-
-	if (!filp->f_op || !filp->f_op->ioctl) {
-		error = sys_ioctl (fd, cmd, arg);
-		goto out;
-	}
-
-	t = (struct ioctl_trans *)ioctl32_hash_table [ioctl32_hash (cmd)];
-
-	while (t && t->cmd != cmd)
-		t = (struct ioctl_trans *)t->next;
-	if (t) {
-		handler = t->handler;
-		error = handler(fd, cmd, arg, filp);
-	} else if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
-		error = siocdevprivate_ioctl(fd, cmd, arg);
-	} else {
-		static int count;
-		if (++count <= 50) { 
-			char buf[10];
-			char *path = (char *)__get_free_page(GFP_KERNEL), *fn = "?"; 
-
-			/* find the name of the device. */
-			if (path) {
-				struct file *f = fget(fd); 
-				if (f) {
-					fn = d_path(f->f_dentry, f->f_vfsmnt, 
-						    path, PAGE_SIZE);
-					fput(f);
-				}
-			}
-
-			sprintf(buf,"'%c'", (cmd>>24) & 0x3f); 
-			if (!isprint(buf[1]))
-			    sprintf(buf, "%02x", buf[1]);
-			printk("ioctl32(%s:%d): Unknown cmd fd(%d) "
-			       "cmd(%08x){%s} arg(%08x) on %s\n",
-			       current->comm, current->pid,
-			       (int)fd, (unsigned int)cmd, buf, (unsigned int)arg,
-			       fn);
-			if (path) 
-				free_page((unsigned long)path); 
-		}
-		error = -EINVAL;
-	}
-out:
-	fput(filp);
-out2:
-	return error;
-}
-
diff -urN linux-2.5.68-bk10/arch/x86_64/ia32/ia32entry.S linux-2.5.68-bk11/arch/x86_64/ia32/ia32entry.S
--- linux-2.5.68-bk10/arch/x86_64/ia32/ia32entry.S	2003-04-19 19:49:22.000000000 -0700
+++ linux-2.5.68-bk11/arch/x86_64/ia32/ia32entry.S	2003-05-01 04:40:14.000000000 -0700
@@ -258,7 +258,7 @@
 	.quad sys_acct
 	.quad sys_umount			/* new_umount */
 	.quad ni_syscall			/* old lock syscall holder */
-	.quad sys32_ioctl
+	.quad compat_sys_ioctl
 	.quad compat_sys_fcntl64		/* 55 */
 	.quad ni_syscall			/* old mpx syscall holder */
 	.quad sys_setpgid
diff -urN linux-2.5.68-bk10/arch/x86_64/ia32/sys_ia32.c linux-2.5.68-bk11/arch/x86_64/ia32/sys_ia32.c
--- linux-2.5.68-bk10/arch/x86_64/ia32/sys_ia32.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/arch/x86_64/ia32/sys_ia32.c	2003-05-01 04:40:14.000000000 -0700
@@ -855,28 +855,14 @@
 	return i;
 }
 
-asmlinkage long
-sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options)
-{
-	return compat_sys_wait4(pid, stat_addr, options, NULL);
-}
-
-
 extern asmlinkage long
-sys_getrusage(int who, struct rusage *ru);
+compat_sys_wait4(compat_pid_t pid, compat_uint_t * stat_addr, int options,
+		 struct compat_rusage *ru);
 
 asmlinkage long
-sys32_getrusage(int who, struct rusage32 *ru)
+sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options)
 {
-	struct rusage r;
-	int ret;
-	mm_segment_t old_fs = get_fs();
-		
-	set_fs (KERNEL_DS);
-	ret = sys_getrusage(who, &r);
-	set_fs (old_fs);
-	if (put_rusage (ru, &r)) return -EFAULT;
-	return ret;
+	return compat_sys_wait4(pid, stat_addr, options, NULL);
 }
 
 int sys32_ni_syscall(int call)
diff -urN linux-2.5.68-bk10/arch/x86_64/kernel/irq.c linux-2.5.68-bk11/arch/x86_64/kernel/irq.c
--- linux-2.5.68-bk10/arch/x86_64/kernel/irq.c	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk11/arch/x86_64/kernel/irq.c	2003-05-01 04:40:14.000000000 -0700
@@ -74,7 +74,7 @@
  * Special irq handlers.
  */
 
-void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
+irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) { return IRQ_NONE; }
 
 /*
  * Generic no controller code
@@ -433,7 +433,7 @@
  */
  
 int request_irq(unsigned int irq, 
-		void (*handler)(int, void *, struct pt_regs *),
+		irqreturn_t (*handler)(int, void *, struct pt_regs *),
 		unsigned long irqflags, 
 		const char * devname,
 		void *dev_id)
diff -urN linux-2.5.68-bk10/arch/x86_64/kernel/time.c linux-2.5.68-bk11/arch/x86_64/kernel/time.c
--- linux-2.5.68-bk10/arch/x86_64/kernel/time.c	2003-04-19 19:50:08.000000000 -0700
+++ linux-2.5.68-bk11/arch/x86_64/kernel/time.c	2003-05-01 04:40:14.000000000 -0700
@@ -195,7 +195,7 @@
 	spin_unlock(&rtc_lock);
 }
 
-static void timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	static unsigned long rtc_update = 0;
 
@@ -255,6 +255,8 @@
 	}
  
 	write_sequnlock(&xtime_lock);
+
+	return IRQ_HANDLED;
 }
 
 unsigned long get_cmos_time(void)
diff -urN linux-2.5.68-bk10/drivers/block/DAC960.c linux-2.5.68-bk11/drivers/block/DAC960.c
--- linux-2.5.68-bk10/drivers/block/DAC960.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/block/DAC960.c	2003-05-01 04:40:16.000000000 -0700
@@ -46,43 +46,126 @@
 #include "DAC960.h"
 
 
-/*
-  DAC960_ControllerCount is the number of DAC960 Controllers detected.
-*/
+static DAC960_Controller_T *DAC960_Controllers[DAC960_MaxControllers];
+static int DAC960_ControllerCount;
+static PROC_DirectoryEntry_T *DAC960_ProcDirectoryEntry;
 
-static int
-  DAC960_ControllerCount =			0;
 
-/*
-  DAC960_Controllers is an array of pointers to the DAC960 Controller
-  structures.
-*/
+static long disk_size(DAC960_Controller_T *p, int drive_nr)
+{
+	if (p->FirmwareType == DAC960_V1_Controller) {
+		if (drive_nr >= p->LogicalDriveCount)
+			return 0;
+		return p->V1.LogicalDriveInformation[drive_nr].
+			LogicalDriveSize;
+	} else {
+		DAC960_V2_LogicalDeviceInfo_T *i =
+			p->V2.LogicalDeviceInformation[drive_nr];
+		if (i == NULL)
+			return 0;
+		return i->ConfigurableDeviceSize;
+	}
+}
 
-static DAC960_Controller_T
-  *DAC960_Controllers[DAC960_MaxControllers] =	{ NULL };
+static int DAC960_open(struct inode *inode, struct file *file)
+{
+	struct gendisk *disk = inode->i_bdev->bd_disk;
+	DAC960_Controller_T *p = disk->queue->queuedata;
+	int drive_nr = (int)disk->private_data;
 
+	/* bad hack for the "user" ioctls */
+	if (!p->ControllerNumber && !drive_nr && (file->f_flags & O_NONBLOCK))
+		return 0;
+
+	if (p->FirmwareType == DAC960_V1_Controller) {
+		if (p->V1.LogicalDriveInformation[drive_nr].
+		    LogicalDriveState == DAC960_V1_LogicalDrive_Offline)
+			return -ENXIO;
+	} else {
+		DAC960_V2_LogicalDeviceInfo_T *i =
+			p->V2.LogicalDeviceInformation[drive_nr];
+		if (i->LogicalDeviceState == DAC960_V2_LogicalDevice_Offline)
+			return -ENXIO;
+	}
 
-static int DAC960_revalidate(struct gendisk *);
-/*
-  DAC960_BlockDeviceOperations is the Block Device Operations structure for
-  DAC960 Logical Disk Devices.
-*/
+	check_disk_change(inode->i_bdev);
 
-static struct block_device_operations DAC960_BlockDeviceOperations = {
-	.owner		=THIS_MODULE,
-	.open		=DAC960_Open,
-	.release	=DAC960_Release,
-	.ioctl		=DAC960_IOCTL,
-	.revalidate_disk=DAC960_revalidate,
-};
+	if (!get_capacity(p->disks[drive_nr]))
+		return -ENXIO;
+	return 0;
+}
 
+static int DAC960_ioctl(struct inode *inode, struct file *file,
+			unsigned int cmd, unsigned long arg)
+{
+	struct gendisk *disk = inode->i_bdev->bd_disk;
+	DAC960_Controller_T *p = disk->queue->queuedata;
+	int drive_nr = (int)disk->private_data;
+	struct hd_geometry g, *loc = (struct hd_geometry *)arg;
 
-/*
-  DAC960_ProcDirectoryEntry is the DAC960 /proc/rd directory entry.
-*/
+	if (file->f_flags & O_NONBLOCK)
+		return DAC960_UserIOCTL(inode, file, cmd, arg);
+
+	if (cmd != HDIO_GETGEO || !loc)
+		return -EINVAL;
+
+	if (p->FirmwareType == DAC960_V1_Controller) {
+		g.heads = p->V1.GeometryTranslationHeads;
+		g.sectors = p->V1.GeometryTranslationSectors;
+		g.cylinders = p->V1.LogicalDriveInformation[drive_nr].
+			LogicalDriveSize / (g.heads * g.sectors);
+	} else {
+		DAC960_V2_LogicalDeviceInfo_T *i =
+			p->V2.LogicalDeviceInformation[drive_nr];
+		switch (i->DriveGeometry) {
+		case DAC960_V2_Geometry_128_32:
+			g.heads = 128;
+			g.sectors = 32;
+			break;
+		case DAC960_V2_Geometry_255_63:
+			g.heads = 255;
+			g.sectors = 63;
+			break;
+		default:
+			DAC960_Error("Illegal Logical Device Geometry %d\n",
+					p, i->DriveGeometry);
+			return -EINVAL;
+		}
 
-static PROC_DirectoryEntry_T
-  *DAC960_ProcDirectoryEntry;
+		g.cylinders = i->ConfigurableDeviceSize / (g.heads * g.sectors);
+	}
+	
+	g.start = get_start_sect(inode->i_bdev);
+
+	return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; 
+}
+
+static int DAC960_media_changed(struct gendisk *disk)
+{
+	DAC960_Controller_T *p = disk->queue->queuedata;
+	int drive_nr = (int)disk->private_data;
+
+	if (!p->LogicalDriveInitiallyAccessible[drive_nr])
+		return 1;
+	return 0;
+}
+
+static int DAC960_revalidate_disk(struct gendisk *disk)
+{
+	DAC960_Controller_T *p = disk->queue->queuedata;
+	int unit = (int)disk->private_data;
+
+	set_capacity(disk, disk_size(p, unit));
+	return 0;
+}
+
+static struct block_device_operations DAC960_BlockDeviceOperations = {
+	.owner			= THIS_MODULE,
+	.open			= DAC960_open,
+	.ioctl			= DAC960_ioctl,
+	.media_changed		= DAC960_media_changed,
+	.revalidate_disk	= DAC960_revalidate_disk,
+};
 
 
 /*
@@ -2433,21 +2516,6 @@
   blk_cleanup_queue(&Controller->RequestQueue);
 }
 
-static long disk_size(DAC960_Controller_T *Controller, int disk)
-{
-	if (Controller->FirmwareType == DAC960_V1_Controller) {
-		if (disk >= Controller->LogicalDriveCount)
-			return 0;
-		return Controller->V1.LogicalDriveInformation[disk].LogicalDriveSize;
-	} else {
-		DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
-			Controller->V2.LogicalDeviceInformation[disk];
-		if (LogicalDeviceInfo == NULL)
-			return 0;
-		return LogicalDeviceInfo->ConfigurableDeviceSize;
-	}
-}
-
 /*
   DAC960_ComputeGenericDiskInfo computes the values for the Generic Disk
   Information Partition Sector Counts and Block Sizes.
@@ -2460,14 +2528,6 @@
 		set_capacity(Controller->disks[disk], disk_size(Controller, disk));
 }
 
-static int DAC960_revalidate(struct gendisk *disk)
-{
-	DAC960_Controller_T *p = disk->queue->queuedata;
-	int unit = (int)disk->private_data;
-	set_capacity(disk, disk_size(p, unit));
-	return 0;
-}
-
 /*
   DAC960_ReportErrorStatus reports Controller BIOS Messages passed through
   the Error Status Register when the driver performs the BIOS handshaking.
@@ -5575,151 +5635,6 @@
     }
 }
 
-
-/*
-  DAC960_Open is the Device Open Function for the DAC960 Driver.
-*/
-
-static int DAC960_Open(Inode_T *Inode, File_T *File)
-{
-  int ControllerNumber = DAC960_ControllerNumber(Inode->i_rdev);
-  int LogicalDriveNumber = DAC960_LogicalDriveNumber(Inode->i_rdev);
-  DAC960_Controller_T *Controller;
-  if (ControllerNumber == 0 && LogicalDriveNumber == 0 &&
-      (File->f_flags & O_NONBLOCK))
-    goto ModuleOnly;
-  if (ControllerNumber < 0 || ControllerNumber > DAC960_ControllerCount - 1)
-    return -ENXIO;
-  Controller = DAC960_Controllers[ControllerNumber];
-  if (Controller == NULL) return -ENXIO;
-  if (Controller->FirmwareType == DAC960_V1_Controller)
-    {
-      if (LogicalDriveNumber > Controller->LogicalDriveCount - 1)
-	return -ENXIO;
-      if (Controller->V1.LogicalDriveInformation
-			 [LogicalDriveNumber].LogicalDriveState
-	  == DAC960_V1_LogicalDrive_Offline)
-	return -ENXIO;
-    }
-  else
-    {
-      DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
-	Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
-      if (LogicalDeviceInfo == NULL ||
-	  LogicalDeviceInfo->LogicalDeviceState
-	  == DAC960_V2_LogicalDevice_Offline)
-	return -ENXIO;
-    }
-  if (!Controller->LogicalDriveInitiallyAccessible[LogicalDriveNumber])
-    {
-      long size;
-      Controller->LogicalDriveInitiallyAccessible[LogicalDriveNumber] = true;
-      size = disk_size(Controller, LogicalDriveNumber);
-      set_capacity(Controller->disks[LogicalDriveNumber], size);
-      Inode->i_bdev->bd_invalidated = 1;
-    }
-  if (!get_capacity(Controller->disks[LogicalDriveNumber]))
-    return -ENXIO;
-  /*
-    Increment Controller and Logical Drive Usage Counts.
-  */
-  Controller->ControllerUsageCount++;
-  Controller->LogicalDriveUsageCount[LogicalDriveNumber]++;
- ModuleOnly:
-  return 0;
-}
-
-
-/*
-  DAC960_Release is the Device Release Function for the DAC960 Driver.
-*/
-
-static int DAC960_Release(Inode_T *Inode, File_T *File)
-{
-  int ControllerNumber = DAC960_ControllerNumber(Inode->i_rdev);
-  int LogicalDriveNumber = DAC960_LogicalDriveNumber(Inode->i_rdev);
-  DAC960_Controller_T *Controller = DAC960_Controllers[ControllerNumber];
-  if (ControllerNumber == 0 && LogicalDriveNumber == 0 &&
-      File != NULL && (File->f_flags & O_NONBLOCK))
-    goto ModuleOnly;
-  /*
-    Decrement the Logical Drive and Controller Usage Counts.
-  */
-  Controller->LogicalDriveUsageCount[LogicalDriveNumber]--;
-  Controller->ControllerUsageCount--;
- ModuleOnly:
-  return 0;
-}
-
-
-/*
-  DAC960_IOCTL is the Device IOCTL Function for the DAC960 Driver.
-*/
-
-static int DAC960_IOCTL(Inode_T *Inode, File_T *File,
-			unsigned int Request, unsigned long Argument)
-{
-  int ControllerNumber = DAC960_ControllerNumber(Inode->i_rdev);
-  int LogicalDriveNumber = DAC960_LogicalDriveNumber(Inode->i_rdev);
-  DiskGeometry_T Geometry, *UserGeometry;
-  DAC960_Controller_T *Controller;
-
-  if (File != NULL && (File->f_flags & O_NONBLOCK))
-    return DAC960_UserIOCTL(Inode, File, Request, Argument);
-  if (ControllerNumber < 0 || ControllerNumber > DAC960_ControllerCount - 1)
-    return -ENXIO;
-  Controller = DAC960_Controllers[ControllerNumber];
-  if (Controller == NULL) return -ENXIO;
-  switch (Request)
-    {
-    case HDIO_GETGEO:
-      /* Get BIOS Disk Geometry. */
-      UserGeometry = (DiskGeometry_T *) Argument;
-      if (UserGeometry == NULL) return -EINVAL;
-      if (Controller->FirmwareType == DAC960_V1_Controller)
-	{
-	  if (LogicalDriveNumber > Controller->LogicalDriveCount - 1)
-	    return -ENXIO;
-	  Geometry.heads = Controller->V1.GeometryTranslationHeads;
-	  Geometry.sectors = Controller->V1.GeometryTranslationSectors;
-	  Geometry.cylinders =
-	    Controller->V1.LogicalDriveInformation[LogicalDriveNumber]
-						  .LogicalDriveSize
-	    / (Geometry.heads * Geometry.sectors);
-	}
-      else
-	{
-	  DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
-	    Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
-	  if (LogicalDeviceInfo == NULL)
-	    return -EINVAL;
-	  switch (LogicalDeviceInfo->DriveGeometry)
-	    {
-	    case DAC960_V2_Geometry_128_32:
-	      Geometry.heads = 128;
-	      Geometry.sectors = 32;
-	      break;
-	    case DAC960_V2_Geometry_255_63:
-	      Geometry.heads = 255;
-	      Geometry.sectors = 63;
-	      break;
-	    default:
-	      DAC960_Error("Illegal Logical Device Geometry %d\n",
-			   Controller, LogicalDeviceInfo->DriveGeometry);
-	      return -EINVAL;
-	    }
-	  Geometry.cylinders =
-	    LogicalDeviceInfo->ConfigurableDeviceSize
-	    / (Geometry.heads * Geometry.sectors);
-	}
-      Geometry.start = get_start_sect(Inode->i_bdev);
-      return (copy_to_user(UserGeometry, &Geometry,
-			   sizeof(DiskGeometry_T)) ? -EFAULT : 0);
-    }
-  return -EINVAL;
-}
-
-
 /*
   DAC960_UserIOCTL is the User IOCTL Function for the DAC960 Driver.
 */
diff -urN linux-2.5.68-bk10/drivers/block/DAC960.h linux-2.5.68-bk11/drivers/block/DAC960.h
--- linux-2.5.68-bk10/drivers/block/DAC960.h	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/block/DAC960.h	2003-05-01 04:40:16.000000000 -0700
@@ -2364,7 +2364,6 @@
   unsigned short MaxBlocksPerCommand;
   unsigned short ControllerScatterGatherLimit;
   unsigned short DriverScatterGatherLimit;
-  unsigned int ControllerUsageCount;
   u64		BounceBufferLimit;
   unsigned int CombinedStatusBufferLength;
   unsigned int InitialStatusLength;
@@ -2397,7 +2396,6 @@
   DAC960_Command_T InitialCommand;
   DAC960_Command_T *Commands[DAC960_MaxDriverQueueDepth];
   PROC_DirectoryEntry_T *ControllerProcEntry;
-  unsigned int LogicalDriveUsageCount[DAC960_MaxLogicalDrives];
   boolean LogicalDriveInitiallyAccessible[DAC960_MaxLogicalDrives];
   void (*QueueCommand)(DAC960_Command_T *Command);
   boolean (*ReadControllerConfiguration)(struct DAC960_Controller *);
@@ -4242,9 +4240,6 @@
 static void DAC960_V1_QueueMonitoringCommand(DAC960_Command_T *);
 static void DAC960_V2_QueueMonitoringCommand(DAC960_Command_T *);
 static void DAC960_MonitoringTimerFunction(unsigned long);
-static int DAC960_Open(Inode_T *, File_T *);
-static int DAC960_Release(Inode_T *, File_T *);
-static int DAC960_IOCTL(Inode_T *, File_T *, unsigned int, unsigned long);
 static int DAC960_UserIOCTL(Inode_T *, File_T *, unsigned int, unsigned long);
 static void DAC960_Message(DAC960_MessageLevel_T, unsigned char *,
 			   DAC960_Controller_T *, ...);
diff -urN linux-2.5.68-bk10/drivers/block/xd.c linux-2.5.68-bk11/drivers/block/xd.c
--- linux-2.5.68-bk10/drivers/block/xd.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/block/xd.c	2003-05-01 04:40:17.000000000 -0700
@@ -57,7 +57,9 @@
 #include "xd.h"
 
 static void __init do_xd_setup (int *integers);
+#ifdef MODULE
 static int xd[5] = { -1,-1,-1,-1, };
+#endif
 
 #define XD_DONT_USE_DMA		0  /* Initial value. may be overriden using
 				      "nodma" module option */
@@ -148,16 +150,18 @@
 static int __init xd_init(void)
 {
 	u_char i,controller;
-	u_char count = 0;
 	unsigned int address;
 	int err;
 
 #ifdef MODULE
-	for (i = 4; i > 0; i--)
-		if (((xd[i] = xd[i-1]) >= 0) && !count)
-			count = i;
-	if ((xd[0] = count))
-		do_xd_setup(xd);
+	{
+		u_char count = 0;
+		for (i = 4; i > 0; i--)
+			if (((xd[i] = xd[i-1]) >= 0) && !count)
+				count = i;
+		if ((xd[0] = count))
+			do_xd_setup(xd);
+	}
 #endif
 
 	init_timer (&xd_watchdog_int); xd_watchdog_int.function = xd_watchdog;
diff -urN linux-2.5.68-bk10/drivers/char/misc.c linux-2.5.68-bk11/drivers/char/misc.c
--- linux-2.5.68-bk10/drivers/char/misc.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/char/misc.c	2003-05-01 04:40:18.000000000 -0700
@@ -192,21 +192,12 @@
 		}
 		misc->minor = i;
 	}
+
 	if (misc->minor < DYNAMIC_MINORS)
 		misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7);
-
-
-	/*
-	 * please use it if you want to do fancy things with your
-	 * name...
-	 */
 	if (misc->devfs_name[0] == '\0') {
-		/* yuck, yet another stupid special-casing.
-		   whos actually using this?  Please switch over
-		   to ->devfs_name ASAP */
 		snprintf(misc->devfs_name, sizeof(misc->devfs_name),
-				strchr(misc->name, '/') ?
-				  "%s" : "misc/%s", misc->name);
+				"misc/%s", misc->name);
 	}
 
 	devfs_register(NULL, misc->devfs_name, 0, MISC_MAJOR, misc->minor,
diff -urN linux-2.5.68-bk10/drivers/char/mwave/mwavedd.c linux-2.5.68-bk11/drivers/char/mwave/mwavedd.c
--- linux-2.5.68-bk10/drivers/char/mwave/mwavedd.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/drivers/char/mwave/mwavedd.c	2003-05-01 04:40:18.000000000 -0700
@@ -502,8 +502,6 @@
 	&dev_attr_uart_irq,
 	&dev_attr_uart_io,
 };
-static int nr_registered_attrs;
-static int device_registered;
 
 /*
 * mwave_init is called on module load
@@ -518,13 +516,13 @@
 
 	PRINTK_1(TRACE_MWAVE, "mwavedd::mwave_exit entry\n");
 
-	for (i = 0; i < nr_registered_attrs; i++)
+	for (i = 0; i < pDrvData->nr_registered_attrs; i++)
 		device_remove_file(&mwave_device, mwave_dev_attrs[i]);
-	nr_registered_attrs = 0;
+	pDrvData->nr_registered_attrs = 0;
 
-	if (device_registered) {
+	if (pDrvData->device_registered) {
 		device_unregister(&mwave_device);
-		device_registered = 0;
+		pDrvData->device_registered = FALSE;
 	}
 
 	if ( pDrvData->sLine >= 0 ) {
@@ -650,7 +648,7 @@
 
 	if (device_register(&mwave_device))
 		goto cleanup_error;
-	device_registered = 1;
+	pDrvData->device_registered = TRUE;
 	for (i = 0; i < ARRAY_SIZE(mwave_dev_attrs); i++) {
 		if(device_create_file(&mwave_device, mwave_dev_attrs[i])) {
 			PRINTK_ERROR(KERN_ERR_MWAVE
@@ -659,7 +657,7 @@
 					mwave_dev_attrs[i]->attr.name);
 			goto cleanup_error;
 		}
-		nr_registered_attrs++;
+		pDrvData->nr_registered_attrs++;
 	}
 
 	/* SUCCESS! */
diff -urN linux-2.5.68-bk10/drivers/char/mwave/mwavedd.h linux-2.5.68-bk11/drivers/char/mwave/mwavedd.h
--- linux-2.5.68-bk10/drivers/char/mwave/mwavedd.h	2003-04-19 19:49:57.000000000 -0700
+++ linux-2.5.68-bk11/drivers/char/mwave/mwavedd.h	2003-05-01 04:40:18.000000000 -0700
@@ -140,6 +140,8 @@
 	MWAVE_IPC IPCs[16];
 	BOOLEAN bMwaveDevRegistered;
 	short sLine;
+	int nr_registered_attrs;
+	int device_registered;
 
 } MWAVE_DEVICE_DATA, *pMWAVE_DEVICE_DATA;
 
diff -urN linux-2.5.68-bk10/drivers/i2c/i2c-elektor.c linux-2.5.68-bk11/drivers/i2c/i2c-elektor.c
--- linux-2.5.68-bk10/drivers/i2c/i2c-elektor.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/drivers/i2c/i2c-elektor.c	2003-05-01 04:40:18.000000000 -0700
@@ -132,9 +132,10 @@
 }
 
 
-static void pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) {
+static irqreturn_t pcf_isa_handler(int this_irq, void *dev_id, struct pt_regs *regs) {
 	pcf_pending = 1;
 	wake_up_interruptible(&pcf_wait);
+	return IRQ_HANDLED;
 }
 
 
diff -urN linux-2.5.68-bk10/drivers/ide/ide-disk.c linux-2.5.68-bk11/drivers/ide/ide-disk.c
--- linux-2.5.68-bk10/drivers/ide/ide-disk.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ide/ide-disk.c	2003-05-01 04:40:19.000000000 -0700
@@ -72,14 +72,6 @@
 
 #include "legacy/pdc4030.h"
 
-static inline u32 idedisk_read_24 (ide_drive_t *drive)
-{
-	u8 hcyl = HWIF(drive)->INB(IDE_HCYL_REG);
-	u8 lcyl = HWIF(drive)->INB(IDE_LCYL_REG);
-	u8 sect = HWIF(drive)->INB(IDE_SECTOR_REG);
-	return (hcyl<<16)|(lcyl<<8)|sect;
-}
-
 /*
  * lba_capacity_is_ok() performs a sanity check on the claimed "lba_capacity"
  * value for this drive (from its reported identification information).
@@ -812,9 +804,9 @@
 			if (drive->addressing == 1) {
 				__u64 sectors = 0;
 				u32 low = 0, high = 0;
-				low = idedisk_read_24(drive);
+				low = ide_read_24(drive);
 				hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
-				high = idedisk_read_24(drive);
+				high = ide_read_24(drive);
 				sectors = ((__u64)high << 24) | low;
 				printk(", LBAsect=%llu, high=%d, low=%d",
 				       (unsigned long long) sectors,
diff -urN linux-2.5.68-bk10/drivers/ide/ide-iops.c linux-2.5.68-bk11/drivers/ide/ide-iops.c
--- linux-2.5.68-bk10/drivers/ide/ide-iops.c	2003-04-19 19:49:09.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ide/ide-iops.c	2003-05-01 04:40:19.000000000 -0700
@@ -263,7 +263,7 @@
 
 EXPORT_SYMBOL(default_hwif_transport);
 
-u32 read_24 (ide_drive_t *drive)
+u32 ide_read_24 (ide_drive_t *drive)
 {
 	u8 hcyl = HWIF(drive)->INB(IDE_HCYL_REG);
 	u8 lcyl = HWIF(drive)->INB(IDE_LCYL_REG);
@@ -271,7 +271,7 @@
 	return (hcyl<<16)|(lcyl<<8)|sect;
 }
 
-EXPORT_SYMBOL(read_24);
+EXPORT_SYMBOL(ide_read_24);
 
 void SELECT_DRIVE (ide_drive_t *drive)
 {
diff -urN linux-2.5.68-bk10/drivers/ide/ide-taskfile.c linux-2.5.68-bk11/drivers/ide/ide-taskfile.c
--- linux-2.5.68-bk10/drivers/ide/ide-taskfile.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ide/ide-taskfile.c	2003-05-01 04:40:19.000000000 -0700
@@ -61,15 +61,6 @@
 #define task_map_rq(rq, flags)		ide_map_buffer((rq), (flags))
 #define task_unmap_rq(rq, buf, flags)	ide_unmap_buffer((rq), (buf), (flags))
 
-inline u32 task_read_24 (ide_drive_t *drive)
-{
-	return	(HWIF(drive)->INB(IDE_HCYL_REG)<<16) |
-		(HWIF(drive)->INB(IDE_LCYL_REG)<<8) |
-		 HWIF(drive)->INB(IDE_SECTOR_REG);
-}
-
-EXPORT_SYMBOL(task_read_24);
-
 static void ata_bswap_data (void *buffer, int wcount)
 {
 	u16 *p = buffer;
@@ -216,88 +207,6 @@
 EXPORT_SYMBOL(do_rw_taskfile);
 
 /*
- * Error reporting, in human readable form (luxurious, but a memory hog).
- */
-u8 taskfile_dump_status (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	ide_hwif_t *hwif = HWIF(drive);
-	unsigned long flags;
-	u8 err = 0;
-
-	local_irq_set(flags);
-	printk("%s: %s: status=0x%02x", drive->name, msg, stat);
-#if FANCY_STATUS_DUMPS
-	printk(" { ");
-	if (stat & BUSY_STAT) {
-		printk("Busy ");
-	} else {
-		if (stat & READY_STAT)	printk("DriveReady ");
-		if (stat & WRERR_STAT)	printk("DeviceFault ");
-		if (stat & SEEK_STAT)	printk("SeekComplete ");
-		if (stat & DRQ_STAT)	printk("DataRequest ");
-		if (stat & ECC_STAT)	printk("CorrectedError ");
-		if (stat & INDEX_STAT)	printk("Index ");
-		if (stat & ERR_STAT)	printk("Error ");
-	}
-	printk("}");
-#endif  /* FANCY_STATUS_DUMPS */
-	printk("\n");
-	if ((stat & (BUSY_STAT|ERR_STAT)) == ERR_STAT) {
-		err = hwif->INB(IDE_ERROR_REG);
-		printk("%s: %s: error=0x%02x", drive->name, msg, err);
-#if FANCY_STATUS_DUMPS
-		if (drive->media == ide_disk)
-			goto media_out;
-
-		printk(" { ");
-		if (err & ABRT_ERR)	printk("DriveStatusError ");
-		if (err & ICRC_ERR)	printk("Bad%s", (err & ABRT_ERR) ? "CRC " : "Sector ");
-		if (err & ECC_ERR)	printk("UncorrectableError ");
-		if (err & ID_ERR)	printk("SectorIdNotFound ");
-		if (err & TRK0_ERR)	printk("TrackZeroNotFound ");
-		if (err & MARK_ERR)	printk("AddrMarkNotFound ");
-		printk("}");
-		if ((err & (BBD_ERR | ABRT_ERR)) == BBD_ERR ||
-		    (err & (ECC_ERR|ID_ERR|MARK_ERR))) {
-			if (drive->addressing == 1) {
-				u64 sectors = 0;
-				u32 high = 0;
-				u32 low = task_read_24(drive);
-				hwif->OUTB(0x80, IDE_CONTROL_REG);
-				high = task_read_24(drive);
-				sectors = ((u64)high << 24) | low;
-				printk(", LBAsect=%lld", (long long) sectors);
-			} else {
-				u8 cur  = hwif->INB(IDE_SELECT_REG);
-				u8 low  = hwif->INB(IDE_LCYL_REG);
-				u8 high = hwif->INB(IDE_HCYL_REG);
-				u8 sect = hwif->INB(IDE_SECTOR_REG);
-				/* using LBA? */
-				if (cur & 0x40) {
-					printk(", LBAsect=%d", (u32)
-						((cur&0xf)<<24)|(high<<16)|
-						(low<<8)|sect);
-				} else {
-					printk(", CHS=%d/%d/%d",
-						((high<<8) + low),
-						(cur & 0xf), sect);
-				}
-			}
-			if (HWGROUP(drive)->rq)
-				printk(", sector=%llu",
-					(unsigned long long)HWGROUP(drive)->rq->sector);
-		}
-media_out:
-#endif  /* FANCY_STATUS_DUMPS */
-		printk("\n");
-	}
-	local_irq_restore(flags);
-	return err;
-}
-
-EXPORT_SYMBOL(taskfile_dump_status);
-
-/*
  * Clean up after success/failure of an explicit taskfile operation.
  */
 void ide_end_taskfile (ide_drive_t *drive, u8 stat, u8 err)
@@ -358,99 +267,6 @@
 EXPORT_SYMBOL(ide_end_taskfile);
 
 /*
- * try_to_flush_leftover_data() is invoked in response to a drive
- * unexpectedly having its DRQ_STAT bit set.  As an alternative to
- * resetting the drive, this routine tries to clear the condition
- * by read a sector's worth of data from the drive.  Of course,
- * this may not help if the drive is *waiting* for data from *us*.
- */
-void task_try_to_flush_leftover_data (ide_drive_t *drive)
-{
-	int i = (drive->mult_count ? drive->mult_count : 1) * SECTOR_WORDS;
-
-	if (drive->media != ide_disk)
-		return;
-	while (i > 0) {
-		u32 buffer[16];
-		unsigned int wcount = (i > 16) ? 16 : i;
-		i -= wcount;
-		taskfile_input_data(drive, buffer, wcount);
-	}
-}
-
-EXPORT_SYMBOL(task_try_to_flush_leftover_data);
-
-/*
- * taskfile_error() takes action based on the error returned by the drive.
- */
-ide_startstop_t taskfile_error (ide_drive_t *drive, const char *msg, u8 stat)
-{
-	ide_hwif_t *hwif;
-	struct request *rq;
-	u8 err;
-
-        err = taskfile_dump_status(drive, msg, stat);
-	if (drive == NULL || (rq = HWGROUP(drive)->rq) == NULL)
-		return ide_stopped;
-
-	hwif = HWIF(drive);
-	/* retry only "normal" I/O: */
-	if (rq->flags & REQ_DRIVE_TASKFILE) {
-		rq->errors = 1;
-		ide_end_taskfile(drive, stat, err);
-		return ide_stopped;
-	}
-	if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr)) {
-		/* other bits are useless when BUSY */
-		rq->errors |= ERROR_RESET;
-	} else {
-		if (drive->media != ide_disk)
-			goto media_out;
-		if (stat & ERR_STAT) {
-			/* err has different meaning on cdrom and tape */
-			if (err == ABRT_ERR) {
-				if (drive->select.b.lba &&
-				    (hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY))
-					/* some newer drives don't
-					 * support WIN_SPECIFY
-					 */
-					return ide_stopped;
-			} else if ((err & BAD_CRC) == BAD_CRC) {
-				/* UDMA crc error -- just retry the operation */
-				drive->crc_count++;
-			} else if (err & (BBD_ERR | ECC_ERR)) {
-				/* retries won't help these */
-				rq->errors = ERROR_MAX;
-			} else if (err & TRK0_ERR) {
-				/* help it find track zero */
-				rq->errors |= ERROR_RECAL;
-			}
-                }
-media_out:
-                if ((stat & DRQ_STAT) && rq_data_dir(rq) != WRITE)
-                        task_try_to_flush_leftover_data(drive);
-	}
-	if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) {
-		/* force an abort */
-		hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
-	}
-	if (rq->errors >= ERROR_MAX) {
-		DRIVER(drive)->end_request(drive, 0, 0);
-	} else {
-		if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
-			++rq->errors;
-			return ide_do_reset(drive);
-		}
-		if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
-			drive->special.b.recalibrate = 1;
-		++rq->errors;
-	}
-	return ide_stopped;
-}
-
-EXPORT_SYMBOL(taskfile_error);
-
-/*
  * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd.
  */
 ide_startstop_t set_multmode_intr (ide_drive_t *drive)
diff -urN linux-2.5.68-bk10/drivers/ide/ide.c linux-2.5.68-bk11/drivers/ide/ide.c
--- linux-2.5.68-bk10/drivers/ide/ide.c	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ide/ide.c	2003-05-01 04:40:19.000000000 -0700
@@ -359,13 +359,6 @@
 
 EXPORT_SYMBOL(current_capacity);
 
-static inline u32 read_24 (ide_drive_t *drive)
-{
-	return  (HWIF(drive)->INB(IDE_HCYL_REG)<<16) |
-		(HWIF(drive)->INB(IDE_LCYL_REG)<<8) |
-		 HWIF(drive)->INB(IDE_SECTOR_REG);
-}
-
 /*
  * Error reporting, in human readable form (luxurious, but a memory hog).
  */
@@ -412,9 +405,9 @@
 				    (drive->addressing == 1)) {
 					u64 sectors = 0;
 					u32 high = 0;
-					u32 low = read_24(drive);
+					u32 low = ide_read_24(drive);
 					hwif->OUTB(drive->ctl|0x80, IDE_CONTROL_REG);
-					high = read_24(drive);
+					high = ide_read_24(drive);
 
 					sectors = ((u64)high << 24) | low;
 					printk(", LBAsect=%llu, high=%d, low=%d",
diff -urN linux-2.5.68-bk10/drivers/ieee1394/amdtp.c linux-2.5.68-bk11/drivers/ieee1394/amdtp.c
--- linux-2.5.68-bk10/drivers/ieee1394/amdtp.c	2003-04-19 19:50:01.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/amdtp.c	2003-05-01 04:40:19.000000000 -0700
@@ -268,7 +268,7 @@
 	spinlock_t stream_list_lock;
 };
 
-static struct hpsb_highlevel *amdtp_highlevel;
+static struct hpsb_highlevel amdtp_highlevel;
 
 
 /* FIXME: This doesn't belong here... */
@@ -1169,7 +1169,7 @@
 	struct amdtp_host *host;
 	int i = ieee1394_file_to_instance(file);
 
-	host = hpsb_get_hostinfo_bykey(amdtp_highlevel, i);
+	host = hpsb_get_hostinfo_bykey(&amdtp_highlevel, i);
 	if (host == NULL)
 		return -ENODEV;
 
@@ -1201,7 +1201,7 @@
 
 /* IEEE1394 Subsystem functions */
 
-static void amdtp_add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void amdtp_add_host(struct hpsb_host *host)
 {
 	struct amdtp_host *ah;
 	int minor;
@@ -1210,7 +1210,7 @@
 	if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME) != 0)
 		return;
 
-	ah = hpsb_create_hostinfo(hl, host, sizeof(*ah));
+	ah = hpsb_create_hostinfo(&amdtp_highlevel, host, sizeof(*ah));
 	if (!ah) {
 		HPSB_ERR("amdtp: Unable able to alloc hostinfo");
 		return;
@@ -1219,7 +1219,7 @@
 	ah->host = host;
 	ah->ohci = host->hostdata;
 
-	hpsb_set_hostinfo_key(hl, host, ah->ohci->id);
+	hpsb_set_hostinfo_key(&amdtp_highlevel, host, ah->ohci->id);
 
 	minor = IEEE1394_MINOR_BLOCK_AMDTP * 16 + ah->ohci->id;
 
@@ -1234,7 +1234,7 @@
 
 static void amdtp_remove_host(struct hpsb_host *host)
 {
-	struct amdtp_host *ah = hpsb_get_hostinfo(amdtp_highlevel, host);
+	struct amdtp_host *ah = hpsb_get_hostinfo(&amdtp_highlevel, host);
 
 	if (ah)
 		devfs_remove("amdtp/%d", ah->ohci->id);
@@ -1242,7 +1242,8 @@
 	return;
 }
 
-static struct hpsb_highlevel_ops amdtp_highlevel_ops = {
+static struct hpsb_highlevel amdtp_highlevel = {
+	.name =		"amdtp",
 	.add_host =	amdtp_add_host,
 	.remove_host =	amdtp_remove_host,
 };
@@ -1268,14 +1269,7 @@
 
 	devfs_mk_dir("amdtp");
 
-	amdtp_highlevel = hpsb_register_highlevel ("amdtp",
-						   &amdtp_highlevel_ops);
-	if (amdtp_highlevel == NULL) {
-		HPSB_ERR("amdtp: unable to register highlevel ops");
-		devfs_remove("amdtp");
-		ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_AMDTP);
-		return -EIO;
-	}
+	hpsb_register_highlevel(&amdtp_highlevel);
 
 #ifdef CONFIG_COMPAT
 	ret = register_ioctl32_conversion(AMDTP_IOC_CHANNEL, NULL);
@@ -1304,7 +1298,7 @@
 		HPSB_ERR("amdtp: Error unregistering ioctl32 translations");
 #endif
 
-        hpsb_unregister_highlevel(amdtp_highlevel);
+        hpsb_unregister_highlevel(&amdtp_highlevel);
 	devfs_remove("amdtp");
         ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_AMDTP);
 
diff -urN linux-2.5.68-bk10/drivers/ieee1394/cmp.c linux-2.5.68-bk11/drivers/ieee1394/cmp.c
--- linux-2.5.68-bk10/drivers/ieee1394/cmp.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/cmp.c	2003-05-01 04:40:19.000000000 -0700
@@ -75,7 +75,7 @@
 #define CSR_PCR_MAP      0x900
 #define CSR_PCR_MAP_END  0x9fc
 
-static struct hpsb_highlevel *cmp_highlevel;
+static struct hpsb_highlevel cmp_highlevel;
 
 struct cmp_pcr *
 cmp_register_opcr(struct hpsb_host *host, int opcr_number, int payload,
@@ -85,7 +85,7 @@
 	struct cmp_host *ch;
 	struct plug *plug;
 
-	ch = hpsb_get_hostinfo(cmp_highlevel, host);
+	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 
 	if (opcr_number >= ch->u.ompr.nplugs ||
 	    ch->opcr[opcr_number].update != NULL)
@@ -108,7 +108,7 @@
 	struct cmp_host *ch;
 	struct plug *plug;
 
-	ch = hpsb_get_hostinfo(cmp_highlevel, host);
+	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 	plug = (struct plug *)opcr;
 	if (plug - ch->opcr >= ch->u.ompr.nplugs) BUG();
 
@@ -128,9 +128,9 @@
 	}
 }
 
-static void cmp_add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void cmp_add_host(struct hpsb_host *host)
 {
-	struct cmp_host *ch = hpsb_create_hostinfo(hl, host, sizeof (*ch));
+	struct cmp_host *ch = hpsb_create_hostinfo(&cmp_highlevel, host, sizeof (*ch));
 
 	if (ch == NULL) {
 		HPSB_ERR("Failed to allocate cmp_host");
@@ -149,7 +149,7 @@
 {
 	struct cmp_host *ch;
 
-	ch = hpsb_get_hostinfo(cmp_highlevel, host);
+	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 	if (ch == NULL) {
 		HPSB_ERR("cmp: Tried to reset unknown host");
 		return;
@@ -168,7 +168,7 @@
 	if (length != 4)
 		return RCODE_TYPE_ERROR;
 
-	ch = hpsb_get_hostinfo(cmp_highlevel, host);
+	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 	if (csraddr == 0x900) {
 		*buf = cpu_to_be32(ch->u.ompr_quadlet);
 		return RCODE_COMPLETE;   
@@ -201,7 +201,7 @@
 	int plug;
 	struct cmp_host *ch;
 
-	ch = hpsb_get_hostinfo(cmp_highlevel, host);
+	ch = hpsb_get_hostinfo(&cmp_highlevel, host);
 	
 	if (extcode != EXTCODE_COMPARE_SWAP) 
 		return RCODE_TYPE_ERROR;
@@ -258,7 +258,8 @@
 }
 
 
-static struct hpsb_highlevel_ops cmp_highlevel_ops = {
+static struct hpsb_highlevel cmp_highlevel = {
+	.name =		"cmp",
 	.add_host =	cmp_add_host,
         .host_reset =	cmp_host_reset,
 };
@@ -280,14 +281,9 @@
 
 static int __init cmp_init_module (void)
 {
-	cmp_highlevel = hpsb_register_highlevel ("cmp",
-						 &cmp_highlevel_ops);
-	if (cmp_highlevel == NULL) {
-		HPSB_ERR("cmp: unable to register highlevel ops");
-		return -EIO;
-	}
+	hpsb_register_highlevel (&cmp_highlevel);
 
-	hpsb_register_addrspace(cmp_highlevel, &pcr_ops,
+	hpsb_register_addrspace(&cmp_highlevel, &pcr_ops,
 				CSR_REGISTER_BASE + CSR_PCR_MAP,
 				CSR_REGISTER_BASE + CSR_PCR_MAP_END);
 
@@ -298,7 +294,7 @@
 
 static void __exit cmp_exit_module (void)
 {
-        hpsb_unregister_highlevel(cmp_highlevel);
+        hpsb_unregister_highlevel(&cmp_highlevel);
 
 	HPSB_INFO("Unloaded CMP driver");
 }
diff -urN linux-2.5.68-bk10/drivers/ieee1394/csr.c linux-2.5.68-bk11/drivers/ieee1394/csr.c
--- linux-2.5.68-bk10/drivers/ieee1394/csr.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/csr.c	2003-05-01 04:40:19.000000000 -0700
@@ -90,7 +90,7 @@
 }
 
 
-static void add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void add_host(struct hpsb_host *host)
 {
         host->csr.lock = SPIN_LOCK_UNLOCKED;
 
@@ -647,7 +647,8 @@
 }
 
 
-static struct hpsb_highlevel_ops csr_ops = {
+static struct hpsb_highlevel csr_highlevel = {
+	.name =		"standard registers",
 	.add_host =	add_host,
         .host_reset =	host_reset,
 };
@@ -668,35 +669,29 @@
 	.lock64 = lock64_regs,
 };
 
-static struct hpsb_highlevel *hl;
-
 void init_csr(void)
 {
-        hl = hpsb_register_highlevel("standard registers", &csr_ops);
-        if (hl == NULL) {
-                HPSB_ERR("out of memory during ieee1394 initialization");
-                return;
-        }
+	hpsb_register_highlevel(&csr_highlevel);
 
-        hpsb_register_addrspace(hl, &reg_ops, CSR_REGISTER_BASE,
+        hpsb_register_addrspace(&csr_highlevel, &reg_ops, CSR_REGISTER_BASE,
                                 CSR_REGISTER_BASE + CSR_CONFIG_ROM);
-        hpsb_register_addrspace(hl, &map_ops, 
+        hpsb_register_addrspace(&csr_highlevel, &map_ops, 
                                 CSR_REGISTER_BASE + CSR_CONFIG_ROM,
                                 CSR_REGISTER_BASE + CSR_CONFIG_ROM_END);
         if (fcp) {
-		hpsb_register_addrspace(hl, &fcp_ops,
+		hpsb_register_addrspace(&csr_highlevel, &fcp_ops,
                                 CSR_REGISTER_BASE + CSR_FCP_COMMAND,
                                 CSR_REGISTER_BASE + CSR_FCP_END);
 	}
-        hpsb_register_addrspace(hl, &map_ops,
+        hpsb_register_addrspace(&csr_highlevel, &map_ops,
                                 CSR_REGISTER_BASE + CSR_TOPOLOGY_MAP,
                                 CSR_REGISTER_BASE + CSR_TOPOLOGY_MAP_END);
-        hpsb_register_addrspace(hl, &map_ops,
+        hpsb_register_addrspace(&csr_highlevel, &map_ops,
                                 CSR_REGISTER_BASE + CSR_SPEED_MAP,
                                 CSR_REGISTER_BASE + CSR_SPEED_MAP_END);
 }
 
 void cleanup_csr(void)
 {
-        hpsb_unregister_highlevel(hl);
+        hpsb_unregister_highlevel(&csr_highlevel);
 }
diff -urN linux-2.5.68-bk10/drivers/ieee1394/dv1394.c linux-2.5.68-bk11/drivers/ieee1394/dv1394.c
--- linux-2.5.68-bk10/drivers/ieee1394/dv1394.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/dv1394.c	2003-05-01 04:40:19.000000000 -0700
@@ -175,8 +175,6 @@
 static LIST_HEAD(dv1394_cards);
 static spinlock_t dv1394_cards_lock = SPIN_LOCK_UNLOCKED;
 
-static struct hpsb_highlevel *hl_handle; /* = NULL; */
-
 /* translate from a struct file* to the corresponding struct video_card* */
 
 static inline struct video_card* file_to_video_card(struct file *file)
@@ -2620,7 +2618,7 @@
 #endif	
 }
 
-static void dv1394_add_host (struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void dv1394_add_host (struct hpsb_host *host)
 {
 	struct ti_ohci *ohci;
 	char buf[16];
@@ -2776,7 +2774,8 @@
 	wake_up_interruptible(&video->waitq);
 }
 
-static struct hpsb_highlevel_ops hl_ops = {
+static struct hpsb_highlevel dv1394_highlevel = {
+	.name =		"dv1394",
 	.add_host =	dv1394_add_host,
 	.remove_host =	dv1394_remove_host,
 	.host_reset =   dv1394_host_reset,
@@ -2900,7 +2899,7 @@
 
 	hpsb_unregister_protocol(&dv1394_driver);
 
-	hpsb_unregister_highlevel (hl_handle);
+	hpsb_unregister_highlevel(&dv1394_highlevel);
 	ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_DV1394);
 #ifdef CONFIG_DEVFS_FS
 	devfs_remove("ieee1394/dv");
@@ -2937,18 +2936,7 @@
 	}
 #endif
 
-	hl_handle = hpsb_register_highlevel ("dv1394", &hl_ops);
-	if (hl_handle == NULL) {
-		printk(KERN_ERR "dv1394: hpsb_register_highlevel failed\n");
-		ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_DV1394);
-#ifdef CONFIG_DEVFS_FS
-		devfs_remove("ieee1394/dv");
-#endif
-#ifdef CONFIG_PROC_FS
-		dv1394_procfs_del("dv");
-#endif
-		return -ENOMEM;
-	}
+	hpsb_register_highlevel(&dv1394_highlevel);
 
 	hpsb_register_protocol(&dv1394_driver);
 
diff -urN linux-2.5.68-bk10/drivers/ieee1394/eth1394.c linux-2.5.68-bk11/drivers/ieee1394/eth1394.c
--- linux-2.5.68-bk10/drivers/ieee1394/eth1394.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/eth1394.c	2003-05-01 04:40:19.000000000 -0700
@@ -78,14 +78,14 @@
 	printk(KERN_ERR fmt, ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 895 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 906 $ Ben Collins <bcollins@debian.org>";
 
 /* Our ieee1394 highlevel driver */
 #define ETHER1394_DRIVER_NAME "ether1394"
 
 static kmem_cache_t *packet_task_cache;
-static struct hpsb_highlevel *hl_handle = NULL;
 
+static struct hpsb_highlevel eth1394_highlevel;
 
 /* Use common.lf to determine header len */
 static int hdr_type_len[] = {
@@ -318,7 +318,7 @@
  * when the module is installed. This is where we add all of our ethernet
  * devices. One for each host.
  */
-static void ether1394_add_host (struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void ether1394_add_host (struct hpsb_host *host)
 {
 	struct host_info *hi = NULL;
 	struct net_device *dev = NULL;
@@ -342,7 +342,7 @@
 	priv->host = host;
 	spin_lock_init(&priv->lock);
 
-	hi = hpsb_create_hostinfo(hl, host, sizeof(*hi));
+	hi = hpsb_create_hostinfo(&eth1394_highlevel, host, sizeof(*hi));
 
 	if (hi == NULL)
 		goto out;
@@ -373,7 +373,7 @@
 	if (dev != NULL)
 		kfree (dev);
 	if (hi)
-		hpsb_destroy_hostinfo(hl, host);
+		hpsb_destroy_hostinfo(&eth1394_highlevel, host);
 
 	ETH1394_PRINT_G (KERN_ERR, "Out of memory\n");
 
@@ -383,7 +383,7 @@
 /* Remove a card from our list */
 static void ether1394_remove_host (struct hpsb_host *host)
 {
-	struct host_info *hi = hpsb_get_hostinfo(hl_handle, host);
+	struct host_info *hi = hpsb_get_hostinfo(&eth1394_highlevel, host);
 
 	if (hi != NULL) {
 		struct eth1394_priv *priv = (struct eth1394_priv *)hi->dev->priv;
@@ -401,7 +401,7 @@
 /* A reset has just arisen */
 static void ether1394_host_reset (struct hpsb_host *host)
 {
-	struct host_info *hi = hpsb_get_hostinfo(hl_handle, host);
+	struct host_info *hi = hpsb_get_hostinfo(&eth1394_highlevel, host);
 	struct net_device *dev;
 
 	/* This can happen for hosts that we don't use */
@@ -518,7 +518,7 @@
 	struct sk_buff *skb;
 	char *buf = (char *)data;
 	unsigned long flags;
-	struct host_info *hi = hpsb_get_hostinfo(hl_handle, host);
+	struct host_info *hi = hpsb_get_hostinfo(&eth1394_highlevel, host);
 	struct net_device *dev;
 	struct eth1394_priv *priv;
 
@@ -590,7 +590,7 @@
 	quadlet_t *data;
 	char *buf;
 	unsigned long flags;
-	struct host_info *hi = hpsb_get_hostinfo(hl_handle, iso->host);
+	struct host_info *hi = hpsb_get_hostinfo(&eth1394_highlevel, iso->host);
 	struct net_device *dev;
 	struct eth1394_priv *priv;
 	unsigned int len;
@@ -879,7 +879,8 @@
 };
 
 /* Ieee1394 highlevel driver functions */
-static struct hpsb_highlevel_ops hl_ops = {
+static struct hpsb_highlevel eth1394_highlevel = {
+	.name =		ETHER1394_DRIVER_NAME,
 	.add_host =	ether1394_add_host,
 	.remove_host =	ether1394_remove_host,
 	.host_reset =	ether1394_host_reset,
@@ -891,14 +892,9 @@
 					      0, 0, NULL, NULL);
 
 	/* Register ourselves as a highlevel driver */
-	hl_handle = hpsb_register_highlevel (ETHER1394_DRIVER_NAME, &hl_ops);
+	hpsb_register_highlevel(&eth1394_highlevel);
 
-	if (hl_handle == NULL) {
-		ETH1394_PRINT_G (KERN_ERR, "No more memory for driver\n");
-		return -ENOMEM;
-	}
-
-	hpsb_register_addrspace (hl_handle, &addr_ops, ETHER1394_REGION_ADDR,
+	hpsb_register_addrspace(&eth1394_highlevel, &addr_ops, ETHER1394_REGION_ADDR,
 				 ETHER1394_REGION_ADDR_END);
 
 	return 0;
@@ -906,7 +902,7 @@
 
 static void __exit ether1394_exit_module (void)
 {
-	hpsb_unregister_highlevel (hl_handle);
+	hpsb_unregister_highlevel(&eth1394_highlevel);
 	kmem_cache_destroy(packet_task_cache);
 }
 
diff -urN linux-2.5.68-bk10/drivers/ieee1394/highlevel.c linux-2.5.68-bk11/drivers/ieee1394/highlevel.c
--- linux-2.5.68-bk10/drivers/ieee1394/highlevel.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/highlevel.c	2003-05-01 04:40:19.000000000 -0700
@@ -54,6 +54,9 @@
 	struct hl_host_info *hi = NULL;
 	struct list_head *lh;
 
+	if (!hl || !host)
+		return NULL;
+
 	read_lock(&hl->host_info_lock);
 	list_for_each (lh, &hl->host_info_list) {
 		hi = list_entry(lh, struct hl_host_info, list);
@@ -185,6 +188,9 @@
 	struct hl_host_info *hi;
 	void *data = NULL;
 
+	if (!hl)
+		return NULL;
+
 	read_lock(&hl->host_info_lock);
 	list_for_each (lh, &hl->host_info_list) {
 		hi = list_entry(lh, struct hl_host_info, list);
@@ -199,42 +205,53 @@
 }
 
 
-struct hpsb_highlevel *hpsb_register_highlevel(const char *name,
-                                               struct hpsb_highlevel_ops *ops)
+struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key)
 {
-        struct hpsb_highlevel *hl;
 	struct list_head *lh;
-	unsigned long flags;
+	struct hl_host_info *hi;
+	struct hpsb_host *host = NULL;
+
+	if (!hl)
+		return NULL;
+
+	read_lock(&hl->host_info_lock);
+	list_for_each (lh, &hl->host_info_list) {
+		hi = list_entry(lh, struct hl_host_info, list);
+		if (hi->key == key) {
+			host = hi->host;
+			break;
+		}
+	}
+	read_unlock(&hl->host_info_lock);
+
+	return host;
+}
 
-        hl = (struct hpsb_highlevel *)kmalloc(sizeof(struct hpsb_highlevel),
-                                              GFP_KERNEL);
-        if (hl == NULL) {
-                return NULL;
-        }
 
-        INIT_LIST_HEAD(&hl->hl_list);
+void hpsb_register_highlevel(struct hpsb_highlevel *hl)
+{
+	struct list_head *lh;
+	unsigned long flags;
+
         INIT_LIST_HEAD(&hl->addr_list);
 	INIT_LIST_HEAD(&hl->host_info_list);
 
 	rwlock_init(&hl->host_info_lock);
 
-        hl->name = name;
-        hl->op = ops;
-
 	write_lock_irqsave(&hl_drivers_lock, flags);
         list_add_tail(&hl->hl_list, &hl_drivers);
 	write_unlock_irqrestore(&hl_drivers_lock, flags);
 
-	if (hl->op->add_host) {
+	if (hl->add_host) {
 		down(&hpsb_hosts_lock);
 		list_for_each (lh, &hpsb_hosts) {
 			struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
-			hl->op->add_host(host, hl);
+			hl->add_host(host);
 		}
 		up(&hpsb_hosts_lock);
 	}
 
-        return hl;
+        return;
 }
 
 void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
@@ -243,10 +260,6 @@
         struct hpsb_address_serve *as;
 	unsigned long flags;
 
-        if (hl == NULL) {
-                return;
-        }
-
 	write_lock_irqsave(&addr_space_lock, flags);
 	list_for_each_safe (lh, next, &hl->addr_list) {
                 as = list_entry(lh, struct hpsb_address_serve, addr_list);
@@ -259,18 +272,16 @@
         list_del(&hl->hl_list);
 	write_unlock_irqrestore(&hl_drivers_lock, flags);
 
-        if (hl->op->remove_host) {
+        if (hl->remove_host) {
 		down(&hpsb_hosts_lock);
 		list_for_each(lh, &hpsb_hosts) {
 			struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
 
-			hl->op->remove_host(host);
+			hl->remove_host(host);
 			hpsb_destroy_hostinfo(hl, host);
 		}
 		up(&hpsb_hosts_lock);
 	}
-
-        kfree(hl);
 }
 
 int hpsb_register_addrspace(struct hpsb_highlevel *hl,
@@ -386,8 +397,8 @@
         read_lock(&hl_drivers_lock);
         list_for_each(entry, &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
-		if (hl->op->add_host)
-			hl->op->add_host(host, hl);
+		if (hl->add_host)
+			hl->add_host(host);
         }
         read_unlock(&hl_drivers_lock);
 }
@@ -401,8 +412,8 @@
 	list_for_each(entry, &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
 
-		if (hl->op->remove_host) {
-			hl->op->remove_host(host);
+		if (hl->remove_host) {
+			hl->remove_host(host);
 			hpsb_destroy_hostinfo(hl, host);
 		}
         }
@@ -418,8 +429,8 @@
 	list_for_each(entry, &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
 
-                if (hl->op->host_reset)
-                        hl->op->host_reset(host);
+                if (hl->host_reset)
+                        hl->host_reset(host);
         }
 	read_unlock(&hl_drivers_lock);
 }
@@ -436,8 +447,8 @@
 
         while (entry != &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
-                if (hl->op->iso_receive) {
-                        hl->op->iso_receive(host, channel, data, length);
+                if (hl->iso_receive) {
+                        hl->iso_receive(host, channel, data, length);
                 }
                 entry = entry->next;
         }
@@ -456,8 +467,8 @@
 
         while (entry != &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
-                if (hl->op->fcp_request) {
-                        hl->op->fcp_request(host, nodeid, direction, cts, data,
+                if (hl->fcp_request) {
+                        hl->fcp_request(host, nodeid, direction, cts, data,
                                             length);
                 }
                 entry = entry->next;
diff -urN linux-2.5.68-bk10/drivers/ieee1394/highlevel.h linux-2.5.68-bk11/drivers/ieee1394/highlevel.h
--- linux-2.5.68-bk10/drivers/ieee1394/highlevel.h	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/highlevel.h	2003-05-01 04:40:19.000000000 -0700
@@ -3,21 +3,6 @@
 #define IEEE1394_HIGHLEVEL_H
 
 
-struct hpsb_highlevel {
-        struct list_head hl_list;
-
-        /* List of hpsb_address_serve. */
-        struct list_head addr_list;
-
-        const char *name;
-        struct hpsb_highlevel_ops *op;
-
-	/* Used by the highlevel drivers to store data per host */
-	struct list_head host_info_list;
-	rwlock_t host_info_lock;
-};
-
-
 struct hpsb_address_serve {
         struct list_head as_list; /* global list */
         
@@ -35,14 +20,16 @@
  * following structures are of interest to actual highlevel drivers.  
  */
 
-struct hpsb_highlevel_ops {
+struct hpsb_highlevel {
+	const char *name;
+
         /* Any of the following pointers can legally be NULL, except for
          * iso_receive which can only be NULL when you don't request
          * channels. */
 
         /* New host initialized.  Will also be called during
          * hpsb_register_highlevel for all hosts already installed. */
-        void (*add_host) (struct hpsb_host *host, struct hpsb_highlevel *hl);
+        void (*add_host) (struct hpsb_host *host);
 
         /* Host about to be removed.  Will also be called during
          * hpsb_unregister_highlevel once for each host. */
@@ -66,6 +53,13 @@
          */
         void (*fcp_request) (struct hpsb_host *host, int nodeid, int direction,
                              int cts, u8 *data, unsigned int length);
+
+
+	struct list_head hl_list;
+	struct list_head addr_list;
+
+	struct list_head host_info_list;
+	rwlock_t host_info_lock;
 };
 
 struct hpsb_address_ops {
@@ -131,8 +125,7 @@
  * Register highlevel driver.  The name pointer has to stay valid at all times
  * because the string is not copied.
  */
-struct hpsb_highlevel *hpsb_register_highlevel(const char *name,
-                                               struct hpsb_highlevel_ops *ops);
+void hpsb_register_highlevel(struct hpsb_highlevel *hl);
 void hpsb_unregister_highlevel(struct hpsb_highlevel *hl);
 
 /*
@@ -162,19 +155,28 @@
 
 /* Retrieve a hostinfo pointer bound to this driver/host */
 void *hpsb_get_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
+
 /* Allocate a hostinfo pointer of data_size bound to this driver/host */
 void *hpsb_create_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host,
 			   size_t data_size);
+
 /* Free and remove the hostinfo pointer bound to this driver/host */
 void hpsb_destroy_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host);
+
 /* Set an alternate lookup key for the hostinfo bound to this driver/host */
 void hpsb_set_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host, unsigned long key);
+
 /* Retrieve the alternate lookup key for the hostinfo bound to this driver/host */
 unsigned long hpsb_get_hostinfo_key(struct hpsb_highlevel *hl, struct hpsb_host *host);
-/* Retrive a hostinfo pointer bound to this driver using its alternate key */
+
+/* Retrieve a hostinfo pointer bound to this driver using its alternate key */
 void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key);
+
 /* Set the hostinfo pointer to something useful. Usually follows a call to
  * hpsb_create_hostinfo, where the size is 0. */
 int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *data);
 
+/* Retrieve hpsb_host using a highlevel handle and a key */
+struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key);
+
 #endif /* IEEE1394_HIGHLEVEL_H */
diff -urN linux-2.5.68-bk10/drivers/ieee1394/hosts.c linux-2.5.68-bk11/drivers/ieee1394/hosts.c
--- linux-2.5.68-bk10/drivers/ieee1394/hosts.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/hosts.c	2003-05-01 04:40:19.000000000 -0700
@@ -148,9 +148,36 @@
 	return h;
 }
 
+static int alloc_hostnum(void)
+{
+	int hostnum = 0;
+
+	while (1) {
+		struct list_head *lh;
+		int found = 0;
+
+		list_for_each(lh, &hpsb_hosts) {
+			struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
+
+			if (host->id == hostnum) {
+				found = 1;
+				break;
+			}
+		}
+
+		if (!found)
+			return hostnum;
+
+		hostnum++;
+	}
+
+	return 0;
+}
+
 void hpsb_add_host(struct hpsb_host *host)
 {
 	down(&hpsb_hosts_lock);
+	host->id = alloc_hostnum();
         list_add_tail(&host->host_list, &hpsb_hosts);
 	up(&hpsb_hosts_lock);
 
diff -urN linux-2.5.68-bk10/drivers/ieee1394/hosts.h linux-2.5.68-bk11/drivers/ieee1394/hosts.h
--- linux-2.5.68-bk10/drivers/ieee1394/hosts.h	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/hosts.h	2003-05-01 04:40:20.000000000 -0700
@@ -66,6 +66,8 @@
 
 	struct pci_dev *pdev;
 
+	int id;
+
 	struct device device;
 };
 
diff -urN linux-2.5.68-bk10/drivers/ieee1394/ieee1394.h linux-2.5.68-bk11/drivers/ieee1394/ieee1394.h
--- linux-2.5.68-bk10/drivers/ieee1394/ieee1394.h	2003-04-19 19:48:57.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/ieee1394.h	2003-05-01 04:40:20.000000000 -0700
@@ -52,10 +52,13 @@
 #define SPEED_800		0x03
 #define SPEED_1600		0x04
 #define SPEED_3200		0x05
-
+/* The current highest tested speed supported by the subsystem */
+#define SPEED_MAX		SPEED_800
 
 /* Maps speed values above to a string representation */
 extern const char *hpsb_speedto_str[];
+extern const u8 hpsb_speedto_maxrec[];
+
 
 #define SELFID_PWRCL_NO_POWER    0x0
 #define SELFID_PWRCL_PROVIDE_15W 0x1
diff -urN linux-2.5.68-bk10/drivers/ieee1394/ieee1394_core.c linux-2.5.68-bk11/drivers/ieee1394/ieee1394_core.c
--- linux-2.5.68-bk10/drivers/ieee1394/ieee1394_core.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/ieee1394_core.c	2003-05-01 04:40:20.000000000 -0700
@@ -60,6 +60,7 @@
 
 /* Some globals used */
 const char *hpsb_speedto_str[] = { "S100", "S200", "S400", "S800", "S1600", "S3200" };
+const u8 hpsb_speedto_maxrec[] = {   0x7,    0x8,    0x9,   0x10,    0x11,    0x12 };
 
 static void dump_packet(const char *text, quadlet_t *data, int size)
 {
@@ -285,7 +286,7 @@
 
         for (i = 0; i < (nodecount * 64); i += 64) {
                 for (j = 0; j < nodecount; j++) {
-                        map[i+j] = SPEED_400;
+                        map[i+j] = SPEED_MAX;
                 }
         }
 
@@ -1239,6 +1240,7 @@
 
 /** ieee1394_core.c **/
 EXPORT_SYMBOL(hpsb_speedto_str);
+EXPORT_SYMBOL(hpsb_speedto_maxrec);
 EXPORT_SYMBOL(hpsb_set_packet_complete_task);
 EXPORT_SYMBOL(alloc_hpsb_packet);
 EXPORT_SYMBOL(free_hpsb_packet);
@@ -1278,6 +1280,7 @@
 EXPORT_SYMBOL(hpsb_listen_channel);
 EXPORT_SYMBOL(hpsb_unlisten_channel);
 EXPORT_SYMBOL(hpsb_get_hostinfo);
+EXPORT_SYMBOL(hpsb_get_host_bykey);
 EXPORT_SYMBOL(hpsb_create_hostinfo);
 EXPORT_SYMBOL(hpsb_destroy_hostinfo);
 EXPORT_SYMBOL(hpsb_set_hostinfo_key);
diff -urN linux-2.5.68-bk10/drivers/ieee1394/nodemgr.c linux-2.5.68-bk11/drivers/ieee1394/nodemgr.c
--- linux-2.5.68-bk10/drivers/ieee1394/nodemgr.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/nodemgr.c	2003-05-01 04:40:20.000000000 -0700
@@ -70,7 +70,6 @@
 
 static DECLARE_MUTEX(nodemgr_serialize);
 
-static struct hpsb_highlevel *nodemgr_hl;
 
 struct host_info {
 	struct hpsb_host *host;
@@ -78,10 +77,24 @@
 	struct completion exited;
 	struct semaphore reset_sem;
 	int pid;
-	int id;
 	char daemon_name[15];
 };
 
+static struct hpsb_highlevel nodemgr_highlevel;
+
+static int nodemgr_driverdata_ne;
+static int nodemgr_driverdata_host;
+
+static struct device_driver nodemgr_driver_ne = {
+	.name	= "ieee1394_node",
+	.bus	= &ieee1394_bus_type,
+};
+
+static struct device_driver nodemgr_driver_host = {
+	.name	= "ieee1394_host",
+	.bus	= &ieee1394_bus_type,
+};
+
 
 #define fw_attr(class, class_type, field, type, format_string)		\
 static ssize_t fw_show_##class##_##field (struct device *dev, char *buf)\
@@ -364,7 +377,9 @@
         struct unit_directory *ud;
 	struct ieee1394_device_id *id;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
+	if (dev->driver_data == &nodemgr_driverdata_ne ||
+	    dev->driver_data == &nodemgr_driverdata_host ||
+	    drv == &nodemgr_driver_ne || drv == &nodemgr_driver_host)
 		return 0;
 
 	ud = container_of(dev, struct unit_directory, device);
@@ -448,7 +463,7 @@
 
 		snprintf(ud->device.name, DEVICE_NAME_SIZE,
 			 "IEEE-1394 unit directory %d-" NODE_BUS_FMT "-%u",
-			 hi->id, NODE_BUS_ARGS(ne->nodeid), ud->id);
+			 hi->host->id, NODE_BUS_ARGS(ne->nodeid), ud->id);
 	}
 }
 
@@ -494,18 +509,21 @@
 static struct device nodemgr_dev_template_ud = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ud,
-	.class_num	= DEV_CLASS_UNIT_DIRECTORY,
 };
 
+
 static struct device nodemgr_dev_template_ne = {
 	.bus		= &ieee1394_bus_type,
 	.release	= nodemgr_release_ne,
-	.class_num	= DEV_CLASS_NODE,
+	.driver		= &nodemgr_driver_ne,
+	.driver_data	= &nodemgr_driverdata_ne,
 };
 
+
 static struct device nodemgr_dev_template_host = {
 	.bus		= &ieee1394_bus_type,
-	.class_num	= DEV_CLASS_HOST,
+	.driver		= &nodemgr_driver_host,
+	.driver_data	= &nodemgr_driverdata_host,
 };
 
 
@@ -696,7 +714,7 @@
 	snprintf(ne->device.bus_id, BUS_ID_SIZE, "%016Lx",
 		 (unsigned long long)(ne->guid));
 	snprintf(ne->device.name, DEVICE_NAME_SIZE,
-		 "IEEE-1394 device %d-" NODE_BUS_FMT, hi->id,
+		 "IEEE-1394 device %d-" NODE_BUS_FMT, host->id,
 		 NODE_BUS_ARGS(ne->nodeid));
 
 	device_register(&ne->device);
@@ -711,7 +729,7 @@
 
 	HPSB_DEBUG("%s added: ID:BUS[%d-" NODE_BUS_FMT "]  GUID[%016Lx]",
 		   (host->node_id == nodeid) ? "Host" : "Node",
-		   hi->id, NODE_BUS_ARGS(nodeid), (unsigned long long)guid);
+		   host->id, NODE_BUS_ARGS(nodeid), (unsigned long long)guid);
 
         return ne;
 }
@@ -727,7 +745,7 @@
         struct guid_search_baton *search = __data;
         struct node_entry *ne;
 
-        if (dev->class_num != DEV_CLASS_NODE)
+        if (dev->driver_data != &nodemgr_driverdata_ne)
                 return 0;
 
         ne = container_of(dev, struct node_entry, device);
@@ -764,7 +782,7 @@
 	struct nodeid_search_baton *search = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
+	if (dev->driver_data != &nodemgr_driverdata_ne)
 		return 0;
 
 	ne = container_of(dev, struct node_entry, device);
@@ -1131,7 +1149,9 @@
 	if (!dev)
 		return -ENODEV;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
+	/* Have to check driver_data, since on remove, driver == NULL */
+	if (dev->driver_data == &nodemgr_driverdata_ne ||
+	    dev->driver_data == &nodemgr_driverdata_host)
 		return -ENODEV;
 
 	ud = container_of(dev, struct unit_directory, device);
@@ -1173,20 +1193,6 @@
 #endif /* CONFIG_HOTPLUG */
 
 
-static DECLARE_MUTEX(host_num_sema);
-/* Must hold above mutex until the result of the below call is assigned to
- * a hostinfo entry. */
-static int nodemgr_alloc_host_num(void)
-{
-	int hostnum;
-
-	for (hostnum = 0; hpsb_get_hostinfo_bykey(nodemgr_hl, hostnum); hostnum++)
-		/* Do nothing */;
-
-	return hostnum;
-}
-
-
 int hpsb_register_protocol(struct hpsb_protocol_driver *driver)
 {
 	driver_register(&driver->driver);
@@ -1258,7 +1264,8 @@
 	struct node_entry *ne = __data;
 	struct unit_directory *ud;
 
-	if (dev->class_num != DEV_CLASS_UNIT_DIRECTORY)
+	if (dev->driver_data == &nodemgr_driverdata_ne ||
+	    dev->driver_data == &nodemgr_driverdata_host)
 		return 0;
 
 	ud = container_of(dev, struct unit_directory, device);
@@ -1295,7 +1302,7 @@
 	if (ne->nodeid != nodeid) {
 		snprintf(ne->device.name, DEVICE_NAME_SIZE,
 			 "IEEE-1394 device %d-" NODE_BUS_FMT,
-			 hi->id, NODE_BUS_ARGS(ne->nodeid));
+			 hi->host->id, NODE_BUS_ARGS(ne->nodeid));
 		HPSB_DEBUG("Node " NODE_BUS_FMT " changed to " NODE_BUS_FMT,
 			   NODE_BUS_ARGS(ne->nodeid), NODE_BUS_ARGS(nodeid));
 		ne->nodeid = nodeid;
@@ -1446,7 +1453,7 @@
 	struct cleanup_baton *cleanup = __data;
 	struct node_entry *ne;
 
-	if (dev->class_num != DEV_CLASS_NODE)
+	if (dev->driver_data != &nodemgr_driverdata_ne)
 		return 0;
 
 	ne = container_of(dev, struct node_entry, device);
@@ -1550,7 +1557,7 @@
 		else {
 			HPSB_DEBUG("The root node is not cycle master capable; "
 				   "selecting a new root node and resetting...");
-			hpsb_send_phy_config(host, host->node_id, -1);
+			hpsb_send_phy_config(host, NODEID_TO_NODE(host->node_id), -1);
 			hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT);
 		}
 	}
@@ -1583,7 +1590,7 @@
 			return 1;
 		}
 
-		hpsb_send_phy_config(host, host->node_id, -1);
+		hpsb_send_phy_config(host, NODEID_TO_NODE(host->node_id), -1);
 		hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT);
 
 		return 0;
@@ -1732,27 +1739,17 @@
 			 addr, extcode, data, arg);
 }
 
-static void nodemgr_add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void nodemgr_add_host(struct hpsb_host *host)
 {
 	struct host_info *hi;
-	int id;
 
-	down(&host_num_sema);
-	/* Must be called before we create the hostinfo entry, else it
-	 * will match entry '0' since all keys default to zero */
-	id = nodemgr_alloc_host_num();
-	hi = hpsb_create_hostinfo(hl, host, sizeof(*hi));
+	hi = hpsb_create_hostinfo(&nodemgr_highlevel, host, sizeof(*hi));
 
 	if (!hi) {
-		up(&host_num_sema);
 		HPSB_ERR ("NodeMgr: out of memory in add host");
 		return;
 	}
 
-	hi->id = id;
-	hpsb_set_hostinfo_key(hl, host, hi->id);
-	up(&host_num_sema);
-
 	hi->host = host;
 	init_completion(&hi->exited);
         sema_init(&hi->reset_sem, 0);
@@ -1760,11 +1757,11 @@
 	memcpy(&host->device, &nodemgr_dev_template_host,
 	       sizeof(host->device));
 	host->device.parent = &host->pdev->dev;
-	snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", hi->id);
+	snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", host->id);
 	snprintf(host->device.name, DEVICE_NAME_SIZE, "IEEE-1394 Host %s-%d",
-		 host->driver->name, hi->id);
+		 host->driver->name, host->id);
 
-	sprintf(hi->daemon_name, "knodemgrd_%d", hi->id);
+	sprintf(hi->daemon_name, "knodemgrd_%d", host->id);
 
 	hi->pid = kernel_thread(nodemgr_host_thread, hi,
 				CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
@@ -1772,7 +1769,7 @@
 	if (hi->pid < 0) {
 		HPSB_ERR ("NodeMgr: failed to start %s thread for %s",
 			  hi->daemon_name, host->driver->name);
-		hpsb_destroy_hostinfo(hl, host);
+		hpsb_destroy_hostinfo(&nodemgr_highlevel, host);
 		return;
 	}
 
@@ -1781,7 +1778,7 @@
 
 static void nodemgr_host_reset(struct hpsb_host *host)
 {
-	struct host_info *hi = hpsb_get_hostinfo(nodemgr_hl, host);
+	struct host_info *hi = hpsb_get_hostinfo(&nodemgr_highlevel, host);
 
 	if (hi != NULL) {
 #ifdef CONFIG_IEEE1394_VERBOSEDEBUG
@@ -1796,7 +1793,7 @@
 
 static void nodemgr_remove_host(struct hpsb_host *host)
 {
-	struct host_info *hi = hpsb_get_hostinfo(nodemgr_hl, host);
+	struct host_info *hi = hpsb_get_hostinfo(&nodemgr_highlevel, host);
 
 	if (hi) {
 		if (hi->pid >= 0) {
@@ -1812,7 +1809,8 @@
 	return;
 }
 
-static struct hpsb_highlevel_ops nodemgr_ops = {
+static struct hpsb_highlevel nodemgr_highlevel = {
+	.name =		"Node manager",
 	.add_host =	nodemgr_add_host,
 	.host_reset =	nodemgr_host_reset,
 	.remove_host =	nodemgr_remove_host,
@@ -1821,16 +1819,17 @@
 void init_ieee1394_nodemgr(void)
 {
 	bus_register(&ieee1394_bus_type);
+	driver_register(&nodemgr_driver_host);
+	driver_register(&nodemgr_driver_ne);
 
-	nodemgr_hl = hpsb_register_highlevel("Node manager", &nodemgr_ops);
-        if (!nodemgr_hl) {
-		HPSB_ERR("NodeMgr: out of memory during ieee1394 initialization");
-        }
+	hpsb_register_highlevel(&nodemgr_highlevel);
 }
 
 void cleanup_ieee1394_nodemgr(void)
 {
-        hpsb_unregister_highlevel(nodemgr_hl);
+        hpsb_unregister_highlevel(&nodemgr_highlevel);
 
+	driver_unregister(&nodemgr_driver_ne);
+	driver_unregister(&nodemgr_driver_host);
 	bus_unregister(&ieee1394_bus_type);
 }
diff -urN linux-2.5.68-bk10/drivers/ieee1394/nodemgr.h linux-2.5.68-bk11/drivers/ieee1394/nodemgr.h
--- linux-2.5.68-bk10/drivers/ieee1394/nodemgr.h	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/nodemgr.h	2003-05-01 04:40:20.000000000 -0700
@@ -79,11 +79,6 @@
 	u16	max_rec;	/* Maximum packet size node can receive */
 };
 
-enum {
-	DEV_CLASS_NODE,
-	DEV_CLASS_UNIT_DIRECTORY,
-	DEV_CLASS_HOST,
-};
 
 #define UNIT_DIRECTORY_VENDOR_ID	0x01
 #define UNIT_DIRECTORY_MODEL_ID		0x02
diff -urN linux-2.5.68-bk10/drivers/ieee1394/ohci1394.c linux-2.5.68-bk11/drivers/ieee1394/ohci1394.c
--- linux-2.5.68-bk10/drivers/ieee1394/ohci1394.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/ohci1394.c	2003-05-01 04:40:20.000000000 -0700
@@ -164,7 +164,7 @@
 printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 902 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 908 $ Ben Collins <bcollins@debian.org>";
 
 /* Module Parameters */
 static int phys_dma = 1;
diff -urN linux-2.5.68-bk10/drivers/ieee1394/raw1394.c linux-2.5.68-bk11/drivers/ieee1394/raw1394.c
--- linux-2.5.68-bk10/drivers/ieee1394/raw1394.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/raw1394.c	2003-05-01 04:40:20.000000000 -0700
@@ -77,11 +77,11 @@
 static spinlock_t host_info_lock = SPIN_LOCK_UNLOCKED;
 static atomic_t internal_generation = ATOMIC_INIT(0);
 
-static struct hpsb_highlevel *hl_handle;
-
 static atomic_t iso_buffer_size;
 static const int iso_buffer_max = 4 * 1024 * 1024; /* 4 MB */
 
+static struct hpsb_highlevel raw1394_highlevel;
+
 static int arm_read (struct hpsb_host *host, int nodeid, quadlet_t *buffer,
              u64 addr, unsigned int length, u16 flags);
 static int arm_write (struct hpsb_host *host, int nodeid, int destid,
@@ -188,7 +188,7 @@
 }
 
 
-static void add_host(struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void add_host(struct hpsb_host *host)
 {
         struct host_info *hi;
         unsigned long flags;
@@ -601,7 +601,7 @@
                 if (fi->listen_channels & (1ULL << channel)) {
                         req->req.error = RAW1394_ERROR_ALREADY;
                 } else {
-                        if(hpsb_listen_channel(hl_handle, fi->host, channel)) {
+                        if(hpsb_listen_channel(&raw1394_highlevel, fi->host, channel)) {
 				req->req.error = RAW1394_ERROR_ALREADY;
 			} else {
 				fi->listen_channels |= 1ULL << channel;
@@ -614,7 +614,7 @@
                 channel = ~channel;
 
                 if (fi->listen_channels & (1ULL << channel)) {
-                        hpsb_unlisten_channel(hl_handle, fi->host, channel);
+                        hpsb_unlisten_channel(&raw1394_highlevel, fi->host, channel);
                         fi->listen_channels &= ~(1ULL << channel);
                 } else {
                         req->req.error = RAW1394_ERROR_INVALID_ARG;
@@ -1679,7 +1679,7 @@
                 spin_unlock_irqrestore(&host_info_lock, flags);
                 return sizeof(struct raw1394_request);
         }
-        retval = hpsb_register_addrspace(hl_handle, &arm_ops, req->req.address,
+        retval = hpsb_register_addrspace(&raw1394_highlevel, &arm_ops, req->req.address,
                 req->req.address + req->req.length);
         if (retval) {
                /* INSERT ENTRY */
@@ -1766,7 +1766,7 @@
                 spin_unlock_irqrestore(&host_info_lock, flags);
                 return sizeof(struct raw1394_request);
         } 
-        retval = hpsb_unregister_addrspace(hl_handle, addr->start);
+        retval = hpsb_unregister_addrspace(&raw1394_highlevel, addr->start);
         if (!retval) {
                 printk(KERN_ERR "raw1394: arm_Unregister failed -> EINVAL\n");
                 spin_unlock_irqrestore(&host_info_lock, flags);
@@ -2379,7 +2379,7 @@
 
         for (i = 0; i < 64; i++) {
                 if (fi->listen_channels & (1ULL << i)) {
-                        hpsb_unlisten_channel(hl_handle, fi->host, i);
+                        hpsb_unlisten_channel(&raw1394_highlevel, fi->host, i);
                 }
         }
 
@@ -2424,7 +2424,7 @@
                 }
                 if (!another_host) {
                         DBGMSG("raw1394_release: call hpsb_arm_unregister");
-                        retval = hpsb_unregister_addrspace(hl_handle, addr->start);
+                        retval = hpsb_unregister_addrspace(&raw1394_highlevel, addr->start);
                         if (!retval) {
                                 ++fail;
                                 printk(KERN_ERR "raw1394_release arm_Unregister failed\n");
@@ -2507,7 +2507,8 @@
 /******************************************************************************/
 
 
-static struct hpsb_highlevel_ops hl_ops = {
+static struct hpsb_highlevel raw1394_highlevel = {
+	.name =		RAW1394_DEVICE_NAME,
         .add_host =    add_host,
         .remove_host = remove_host,
         .host_reset =  host_reset,
@@ -2528,11 +2529,7 @@
 
 static int __init init_raw1394(void)
 {
-        hl_handle = hpsb_register_highlevel(RAW1394_DEVICE_NAME, &hl_ops);
-        if (hl_handle == NULL) {
-                HPSB_ERR("raw1394 failed to register with ieee1394 highlevel");
-                return -ENOMEM;
-        }
+	hpsb_register_highlevel(&raw1394_highlevel);
 
         devfs_register(NULL, RAW1394_DEVICE_NAME, 0,
 			IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16,
@@ -2542,7 +2539,7 @@
                                       THIS_MODULE, &file_ops)) {
                 HPSB_ERR("raw1394 failed to register minor device block");
                 devfs_remove(RAW1394_DEVICE_NAME);
-                hpsb_unregister_highlevel(hl_handle);
+                hpsb_unregister_highlevel(&raw1394_highlevel);
                 return -EBUSY;
         }
 
@@ -2558,7 +2555,7 @@
 	hpsb_unregister_protocol(&raw1394_driver);
         ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_RAW1394);
         devfs_remove(RAW1394_DEVICE_NAME);
-        hpsb_unregister_highlevel(hl_handle);
+        hpsb_unregister_highlevel(&raw1394_highlevel);
 }
 
 module_init(init_raw1394);
diff -urN linux-2.5.68-bk10/drivers/ieee1394/sbp2.c linux-2.5.68-bk11/drivers/ieee1394/sbp2.c
--- linux-2.5.68-bk10/drivers/ieee1394/sbp2.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/sbp2.c	2003-05-01 04:40:20.000000000 -0700
@@ -298,7 +298,7 @@
 #include "sbp2.h"
 
 static char version[] __devinitdata =
-	"$Rev: 896 $ James Goodwin <jamesg@filanet.com>";
+	"$Rev: 912 $ James Goodwin <jamesg@filanet.com>";
 
 /*
  * Module load parameter definitions
@@ -311,15 +311,10 @@
  * NOTE: On certain OHCI parts I have seen short packets on async transmit
  * (probably due to PCI latency/throughput issues with the part). You can
  * bump down the speed if you are running into problems.
- *
- * Valid values:
- * max_speed = 2 (default: max speed 400mb)
- * max_speed = 1 (max speed 200mb)
- * max_speed = 0 (max speed 100mb)
  */
-static int max_speed = SPEED_400;
+static int max_speed = SPEED_MAX;
 module_param(max_speed, int, 0644);
-MODULE_PARM_DESC(max_speed, "Force max speed (2 = 400mb default, 1 = 200mb, 0 = 100mb)");
+MODULE_PARM_DESC(max_speed, "Force max speed (3 = 800mb, 2 = 400mb default, 1 = 200mb, 0 = 100mb)");
 
 /*
  * Set serialize_io to 1 if you'd like only one scsi command sent
@@ -454,11 +449,8 @@
 	
 static Scsi_Host_Template scsi_driver_template;
 
-static u8 sbp2_speedto_maxrec[] = { 0x7, 0x8, 0x9 };
-
-static struct hpsb_highlevel *sbp2_hl_handle = NULL;
-
-static struct hpsb_highlevel_ops sbp2_hl_ops = {
+static struct hpsb_highlevel sbp2_highlevel = {
+	.name =		SBP2_DEVICE_NAME,
 	.remove_host =	sbp2_remove_host,
 };
 
@@ -774,21 +766,22 @@
 /* Free our DMA's */
 static void sbp2util_free_command_dma(struct sbp2_command_info *command)
 {
-	struct sbp2scsi_host_info *hi;
+	struct hpsb_host *host;
 
-	hi = hpsb_get_hostinfo_bykey(sbp2_hl_handle, (unsigned long)command->Current_SCpnt->device->host);
-	if (!hi) {
-		printk(KERN_ERR "%s: hi == NULL\n", __FUNCTION__);
+	host = hpsb_get_host_bykey(&sbp2_highlevel,
+			(unsigned long)command->Current_SCpnt->device->host);
+	if (!host) {
+		printk(KERN_ERR "%s: host == NULL\n", __FUNCTION__);
 		return;
 	}
 
 	if (command->cmd_dma) {
 		if (command->dma_type == CMD_DMA_SINGLE) {
-			pci_unmap_single(hi->host->pdev, command->cmd_dma,
+			pci_unmap_single(host->pdev, command->cmd_dma,
 					 command->dma_size, command->dma_dir);
 			SBP2_DMA_FREE("single bulk");
 		} else if (command->dma_type == CMD_DMA_PAGE) {
-			pci_unmap_page(hi->host->pdev, command->cmd_dma,
+			pci_unmap_page(host->pdev, command->cmd_dma,
 				       command->dma_size, command->dma_dir);
 			SBP2_DMA_FREE("single page");
 		} /* XXX: Check for CMD_DMA_NONE bug */
@@ -797,7 +790,7 @@
 	}
 
 	if (command->sge_buffer) {
-		pci_unmap_sg(hi->host->pdev, command->sge_buffer,
+		pci_unmap_sg(host->pdev, command->sge_buffer,
 			     command->dma_size, command->dma_dir);
 		SBP2_DMA_FREE("scatter list");
 		command->sge_buffer = NULL;
@@ -910,7 +903,7 @@
 
 	SBP2_DEBUG("sbp2_add_host");
 
-	hi = hpsb_get_hostinfo(sbp2_hl_handle, host);
+	hi = hpsb_get_hostinfo(&sbp2_highlevel, host);
 	if (hi)
 		return hi;
 
@@ -921,13 +914,13 @@
 		return NULL;
 	}
 
-	hi = hpsb_create_hostinfo(sbp2_hl_handle, host, sizeof(*hi));
+	hi = hpsb_create_hostinfo(&sbp2_highlevel, host, sizeof(*hi));
 	if (!hi) {
 		SBP2_ERR("failed to allocate hostinfo");
 		scsi_unregister(hi->scsi_host);
 	}
 
-	hpsb_set_hostinfo_key(sbp2_hl_handle, host, (unsigned long)scsi_host);
+	hpsb_set_hostinfo_key(&sbp2_highlevel, host, (unsigned long)scsi_host);
 
 	hi->scsi_host = scsi_host;
 	hi->host = host;
@@ -941,7 +934,7 @@
 	if (scsi_add_host(hi->scsi_host, NULL)) {
 		SBP2_ERR("failed to add scsi host");
 		scsi_unregister(hi->scsi_host);
-		hpsb_destroy_hostinfo(sbp2_hl_handle, host);
+		hpsb_destroy_hostinfo(&sbp2_highlevel, host);
 	}
 
 	return hi;
@@ -957,13 +950,12 @@
 
 	SBP2_DEBUG("sbp2_remove_host");
 
-	hi = hpsb_get_hostinfo(sbp2_hl_handle, host);
+	hi = hpsb_get_hostinfo(&sbp2_highlevel, host);
 
 	if (hi) {
 		scsi_remove_host(hi->scsi_host);
 		scsi_unregister(hi->scsi_host);
-	} else
-		SBP2_ERR("attempt to remove unknown host %p", host);
+	}
 }
 
 /*
@@ -1092,7 +1084,7 @@
 	scsi_id->ne = ne;
 	scsi_id->ud = ud;
 	scsi_id->speed_code = SPEED_100;
-	scsi_id->max_payload_size = sbp2_speedto_maxrec[SPEED_100];
+	scsi_id->max_payload_size = hpsb_speedto_maxrec[SPEED_100];
 	ud->device.driver_data = scsi_id;
 
 	atomic_set(&scsi_id->sbp2_login_complete, 0);
@@ -1854,7 +1846,7 @@
 
 	/* Payload size is the lesser of what our speed supports and what
 	 * our host supports.  */
-	scsi_id->max_payload_size = min(sbp2_speedto_maxrec[scsi_id->speed_code],
+	scsi_id->max_payload_size = min(hpsb_speedto_maxrec[scsi_id->speed_code],
 					(u8)(((be32_to_cpu(hi->host->csr.rom[2]) >> 12) & 0xf) - 1));
 
 	SBP2_ERR("Node[" NODE_BUS_FMT "]: Max speed [%s] - Max payload [%u]",
@@ -2565,7 +2557,7 @@
 		return(RCODE_ADDRESS_ERROR);
 	}
 
-	hi = hpsb_get_hostinfo(sbp2_hl_handle, host);
+	hi = hpsb_get_hostinfo(&sbp2_highlevel, host);
 
 	if (!hi) {
 		SBP2_ERR("host info is NULL - this is bad!");
@@ -2712,7 +2704,7 @@
 	/*
 	 * Pull our host info and scsi id instance data from the scsi command
 	 */
-	hi = hpsb_get_hostinfo_bykey(sbp2_hl_handle, (unsigned long)SCpnt->device->host);
+	hi = hpsb_get_hostinfo_bykey(&sbp2_highlevel, (unsigned long)SCpnt->device->host);
 
 	if (!hi) {
 		SBP2_ERR("sbp2scsi_host_info is NULL - this is bad!");
@@ -2941,7 +2933,7 @@
  */
 static int sbp2scsi_abort (Scsi_Cmnd *SCpnt) 
 {
-	struct sbp2scsi_host_info *hi = hpsb_get_hostinfo_bykey(sbp2_hl_handle,
+	struct sbp2scsi_host_info *hi = hpsb_get_hostinfo_bykey(&sbp2_highlevel,
 								(unsigned long)SCpnt->device->host);
 	struct scsi_id_instance_data *scsi_id = hi->scsi_id[SCpnt->device->id];
 	struct sbp2_command_info *command;
@@ -2992,7 +2984,7 @@
  */
 static int sbp2scsi_reset (Scsi_Cmnd *SCpnt) 
 {
-	struct sbp2scsi_host_info *hi = hpsb_get_hostinfo_bykey(sbp2_hl_handle,
+	struct sbp2scsi_host_info *hi = hpsb_get_hostinfo_bykey(&sbp2_highlevel,
 								(unsigned long)SCpnt->device->host);
 	struct scsi_id_instance_data *scsi_id = hi->scsi_id[SCpnt->device->id];
 
@@ -3019,24 +3011,24 @@
 			      int length, int hostno, int inout)
 {
 	Scsi_Device *scd;
-	struct Scsi_Host *host;
-	struct sbp2scsi_host_info *hi;
+	struct Scsi_Host *scsi_host;
+	struct hpsb_host *host;
 	char *pos = buffer;
 
 	/* if someone is sending us data, just throw it away */
 	if (inout)
 		return length;
 
-	host = scsi_host_hn_get(hostno);
-	if (!host)  /* if we couldn't find it, we return an error */
+	scsi_host = scsi_host_hn_get(hostno);
+	if (!scsi_host)  /* if we couldn't find it, we return an error */
 		return -ESRCH;
 
-	hi = hpsb_get_hostinfo_bykey(sbp2_hl_handle, (unsigned long)host);
-	if (!hi) /* shouldn't happen, but... */
+	host = hpsb_get_host_bykey(&sbp2_highlevel, (unsigned long)scsi_host);
+	if (!host) /* shouldn't happen, but... */
 		return -ESRCH;
 
 	SPRINTF("Host scsi%d             : SBP-2 IEEE-1394 (%s)\n", hostno,
-		hi->host->driver->name);
+		host->driver->name);
 	SPRINTF("Driver version         : %s\n", version);
 
 	SPRINTF("\nModule options         :\n");
@@ -3045,10 +3037,10 @@
 	SPRINTF("  serialize_io         : %s\n", serialize_io ? "yes" : "no");
 	SPRINTF("  exclusive_login      : %s\n", exclusive_login ? "yes" : "no");
 
-	SPRINTF("\nAttached devices       : %s\n", !list_empty(&host->my_devices) ?
+	SPRINTF("\nAttached devices       : %s\n", !list_empty(&scsi_host->my_devices) ?
 		"" : "none");
 
-	list_for_each_entry (scd, &host->my_devices, siblings) {
+	list_for_each_entry (scd, &scsi_host->my_devices, siblings) {
 		int i;
 
 		SPRINTF("  [Channel: %02d, Id: %02d, Lun: %02d]  ", scd->channel,
@@ -3070,7 +3062,7 @@
 	SPRINTF("\n");
 
 	/* release the reference count on this host */
-	scsi_host_put(host);
+	scsi_host_put(scsi_host);
 	/* Calculate start of next buffer, and return value. */
 	*start = buffer + offset;
 
@@ -3112,49 +3104,33 @@
 {
 	SBP2_DEBUG("sbp2_module_init");
 
-	/* Module load debug option to force one command at a time
-	 * (serializing I/O) */
+	/* Module load debug option to force one command at a time (serializing I/O) */
 	if (serialize_io) {
 		SBP2_ERR("Driver forced to serialize I/O (serialize_io = 1)");
 		scsi_driver_template.can_queue = 1;
 		scsi_driver_template.cmd_per_lun = 1;
 	}
 
-	/* 
-	 * Set max sectors (module load option). Default is 255 sectors. 
-	 */
+	/* Set max sectors (module load option). Default is 255 sectors. */
 	scsi_driver_template.max_sectors = max_sectors;
 
 
-	/*
-	 * Register our high level driver with 1394 stack
-	 */
-	sbp2_hl_handle = hpsb_register_highlevel(SBP2_DEVICE_NAME,
-						 &sbp2_hl_ops);
-	if (!sbp2_hl_handle) {
-		SBP2_ERR("sbp2 failed to register with ieee1394 highlevel");
-		return(-ENOMEM);
-	}
+	/* Register our high level driver with 1394 stack */
+	hpsb_register_highlevel(&sbp2_highlevel);
 
-	/*
-	 * Register our sbp2 status address space...
-	 */
-	hpsb_register_addrspace(sbp2_hl_handle, &sbp2_ops,
-				SBP2_STATUS_FIFO_ADDRESS,
+	/* Register our sbp2 status address space... */
+	hpsb_register_addrspace(&sbp2_highlevel, &sbp2_ops, SBP2_STATUS_FIFO_ADDRESS,
 				SBP2_STATUS_FIFO_ADDRESS + 
-				SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(
-					SBP2SCSI_MAX_SCSI_IDS+1));
+				SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(SBP2SCSI_MAX_SCSI_IDS+1));
 
-	/*
-	 * Handle data movement if physical dma is not enabled/supported
-	 * on host controller
-	 */
+	/* Handle data movement if physical dma is not enabled/supported
+	 * on host controller */
 #ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA
-	hpsb_register_addrspace(sbp2_hl_handle, &sbp2_physdma_ops,
-			0x0ULL, 0xfffffffcULL);
+	hpsb_register_addrspace(&sbp2_highlevel, &sbp2_physdma_ops, 0x0ULL, 0xfffffffcULL);
 #endif
 
 	hpsb_register_protocol(&sbp2_driver);
+
 	return 0;
 }
 
@@ -3163,8 +3139,8 @@
 	SBP2_DEBUG("sbp2_module_exit");
 
 	hpsb_unregister_protocol(&sbp2_driver);
-	if (sbp2_hl_handle)
-		hpsb_unregister_highlevel(sbp2_hl_handle);
+
+	hpsb_unregister_highlevel(&sbp2_highlevel);
 }
 
 module_init(sbp2_module_init);
diff -urN linux-2.5.68-bk10/drivers/ieee1394/video1394.c linux-2.5.68-bk11/drivers/ieee1394/video1394.c
--- linux-2.5.68-bk10/drivers/ieee1394/video1394.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/ieee1394/video1394.c	2003-05-01 04:40:20.000000000 -0700
@@ -146,8 +146,7 @@
 void wakeup_dma_ir_ctx(unsigned long l);
 void wakeup_dma_it_ctx(unsigned long l);
 
-static struct hpsb_highlevel *hl_handle = NULL;
-
+static struct hpsb_highlevel video1394_highlevel;
 
 static int free_dma_iso_ctx(struct dma_iso_ctx *d)
 {
@@ -1151,7 +1150,7 @@
 	struct ti_ohci *ohci;
 	struct file_ctx *ctx;
 
-	ohci = hpsb_get_hostinfo_bykey(hl_handle, i);
+	ohci = hpsb_get_hostinfo_bykey(&video1394_highlevel, i);
         if (ohci == NULL)
                 return -EIO;
 
@@ -1236,7 +1235,7 @@
 };
 
 
-static void video1394_add_host (struct hpsb_host *host, struct hpsb_highlevel *hl)
+static void video1394_add_host (struct hpsb_host *host)
 {
 	struct ti_ohci *ohci;
 	char name[16];
@@ -1248,13 +1247,13 @@
 
 	ohci = (struct ti_ohci *)host->hostdata;
 
-	if (!hpsb_create_hostinfo(hl, host, 0)) {
+	if (!hpsb_create_hostinfo(&video1394_highlevel, host, 0)) {
 		PRINT(KERN_ERR, ohci->id, "Cannot allocate hostinfo");
 		return;
 	}
 
-	hpsb_set_hostinfo(hl, host, ohci);
-	hpsb_set_hostinfo_key(hl, host, ohci->id);
+	hpsb_set_hostinfo(&video1394_highlevel, host, ohci);
+	hpsb_set_hostinfo_key(&video1394_highlevel, host, ohci->id);
 
 	sprintf(name, "%s/%d", VIDEO1394_DRIVER_NAME, ohci->id);
 	minor = IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->id;
@@ -1267,7 +1266,7 @@
 
 static void video1394_remove_host (struct hpsb_host *host)
 {
-	struct ti_ohci *ohci = hpsb_get_hostinfo(hl_handle, host);
+	struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
 
 	if (ohci)
 		devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->id);
@@ -1276,7 +1275,8 @@
 }
 
 
-static struct hpsb_highlevel_ops hl_ops = {
+static struct hpsb_highlevel video1394_highlevel = {
+	.name =		VIDEO1394_DRIVER_NAME,
 	.add_host =	video1394_add_host,
 	.remove_host =	video1394_remove_host,
 };
@@ -1415,7 +1415,7 @@
 
 	hpsb_unregister_protocol(&video1394_driver);
 
-	hpsb_unregister_highlevel (hl_handle);
+	hpsb_unregister_highlevel(&video1394_highlevel);
 
 	devfs_remove(VIDEO1394_DRIVER_NAME);
 	ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_VIDEO1394);
@@ -1436,13 +1436,7 @@
 
 	devfs_mk_dir(VIDEO1394_DRIVER_NAME);
 
-	hl_handle = hpsb_register_highlevel (VIDEO1394_DRIVER_NAME, &hl_ops);
-	if (hl_handle == NULL) {
-		PRINT_G(KERN_ERR, "No more memory for driver\n");
-		devfs_remove(VIDEO1394_DRIVER_NAME);
-		ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_VIDEO1394);
-		return -ENOMEM;
-	}
+	hpsb_register_highlevel(&video1394_highlevel);
 
 	hpsb_register_protocol(&video1394_driver);
 
diff -urN linux-2.5.68-bk10/drivers/input/joystick/sidewinder.c linux-2.5.68-bk11/drivers/input/joystick/sidewinder.c
--- linux-2.5.68-bk10/drivers/input/joystick/sidewinder.c	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk11/drivers/input/joystick/sidewinder.c	2003-05-01 04:40:20.000000000 -0700
@@ -573,8 +573,8 @@
 {
 	struct sw *sw;
 	int i, j, k, l;
-	unsigned char buf[SW_LENGTH];
-	unsigned char idbuf[SW_LENGTH];
+	unsigned char *buf = NULL;	/* [SW_LENGTH] */
+	unsigned char *idbuf = NULL;	/* [SW_LENGTH] */
 	unsigned char m = 1;
 	char comment[40];
 
@@ -583,6 +583,11 @@
 	if (!(sw = kmalloc(sizeof(struct sw), GFP_KERNEL))) return;
 	memset(sw, 0, sizeof(struct sw));
 
+	buf = kmalloc(SW_LENGTH, GFP_KERNEL);
+	idbuf = kmalloc(SW_LENGTH, GFP_KERNEL);
+	if (!buf || !idbuf)
+		goto fail1;
+
 	gameport->private = sw;
 
 	sw->gameport = gameport;
@@ -739,6 +744,8 @@
 	return;
 fail2:	gameport_close(gameport);
 fail1:	kfree(sw);
+	kfree(buf);
+	kfree(idbuf);
 }
 
 static void sw_disconnect(struct gameport *gameport)
diff -urN linux-2.5.68-bk10/drivers/input/misc/uinput.c linux-2.5.68-bk11/drivers/input/misc/uinput.c
--- linux-2.5.68-bk10/drivers/input/misc/uinput.c	2003-04-19 19:50:43.000000000 -0700
+++ linux-2.5.68-bk11/drivers/input/misc/uinput.c	2003-05-01 04:40:20.000000000 -0700
@@ -167,7 +167,7 @@
 
 static int uinput_alloc_device(struct file *file, const char *buffer, size_t count)
 {
-	struct uinput_user_dev	user_dev;
+	struct uinput_user_dev	*user_dev;
 	struct input_dev	*dev;
 	struct uinput_device	*udev;
 	int			size,
@@ -178,34 +178,40 @@
 	udev = (struct uinput_device *)file->private_data;
 	dev = udev->dev;
 
-	if (copy_from_user(&user_dev, buffer, sizeof(struct uinput_user_dev))) {
+	user_dev = kmalloc(sizeof(*user_dev), GFP_KERNEL);
+	if (!user_dev) {
+		retval = -ENOMEM;
+		goto exit;
+	}
+
+	if (copy_from_user(user_dev, buffer, sizeof(struct uinput_user_dev))) {
 		retval = -EFAULT;
 		goto exit;
 	}
 
 	if (NULL != dev->name) 
 		kfree(dev->name);
-		
-	size = strnlen(user_dev.name, UINPUT_MAX_NAME_SIZE);
+
+	size = strnlen(user_dev->name, UINPUT_MAX_NAME_SIZE);
 	dev->name = kmalloc(size + 1, GFP_KERNEL);
 	if (!dev->name) {
 		retval = -ENOMEM;
 		goto exit;
 	}
 
-	strncpy(dev->name, user_dev.name, size);
+	strncpy(dev->name, user_dev->name, size);
 	dev->name[size] = '\0';
-	dev->id.bustype	= user_dev.id.bustype;
-	dev->id.vendor	= user_dev.id.vendor;
-	dev->id.product	= user_dev.id.product;
-	dev->id.version	= user_dev.id.version;
-	dev->ff_effects_max = user_dev.ff_effects_max;
+	dev->id.bustype	= user_dev->id.bustype;
+	dev->id.vendor	= user_dev->id.vendor;
+	dev->id.product	= user_dev->id.product;
+	dev->id.version	= user_dev->id.version;
+	dev->ff_effects_max = user_dev->ff_effects_max;
 
 	size = sizeof(int) * (ABS_MAX + 1);
-	memcpy(dev->absmax, user_dev.absmax, size);
-	memcpy(dev->absmin, user_dev.absmin, size);
-	memcpy(dev->absfuzz, user_dev.absfuzz, size);
-	memcpy(dev->absflat, user_dev.absflat, size);
+	memcpy(dev->absmax, user_dev->absmax, size);
+	memcpy(dev->absmin, user_dev->absmin, size);
+	memcpy(dev->absfuzz, user_dev->absfuzz, size);
+	memcpy(dev->absflat, user_dev->absflat, size);
 
 	/* check if absmin/absmax/absfuzz/absflat are filled as
 	 * told in Documentation/input/input-programming.txt */
@@ -216,6 +222,7 @@
 	}
 
 exit:
+	kfree(user_dev);
 	return retval;
 }
 
diff -urN linux-2.5.68-bk10/drivers/mca/Kconfig linux-2.5.68-bk11/drivers/mca/Kconfig
--- linux-2.5.68-bk10/drivers/mca/Kconfig	2003-04-19 19:51:10.000000000 -0700
+++ linux-2.5.68-bk11/drivers/mca/Kconfig	2003-05-01 04:40:21.000000000 -0700
@@ -1,6 +1,3 @@
-comment "Micro Channel Architecture Bus support"
-	depends on MCA
-
 config MCA_LEGACY
 	bool "Legacy MCA API Support"
 	depends on MCA
diff -urN linux-2.5.68-bk10/drivers/md/dm-ioctl.c linux-2.5.68-bk11/drivers/md/dm-ioctl.c
--- linux-2.5.68-bk10/drivers/md/dm-ioctl.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/md/dm-ioctl.c	2003-05-01 04:40:21.000000000 -0700
@@ -1084,9 +1084,10 @@
 };
 
 static struct miscdevice _dm_misc = {
-	.minor = MISC_DYNAMIC_MINOR,
-	.name  = DM_NAME,
-	.fops  = &_ctl_fops
+	.minor		= MISC_DYNAMIC_MINOR,
+	.name		= DM_NAME,
+	.devfs_name	= "mapper/control",
+	.fops		= &_ctl_fops
 };
 
 /*
@@ -1107,18 +1108,12 @@
 		return r;
 	}
 
-	r = devfs_mk_symlink(DM_DIR "/control", "../misc/" DM_NAME);
-	if (r) {
-		DMERR("devfs_mk_symlink failed for control device");
-		goto failed;
-	}
 	DMINFO("%d.%d.%d%s initialised: %s", DM_VERSION_MAJOR,
 	       DM_VERSION_MINOR, DM_VERSION_PATCHLEVEL, DM_VERSION_EXTRA,
 	       DM_DRIVER_EMAIL);
 	return 0;
 
       failed:
-	devfs_remove(DM_DIR "/control");
 	if (misc_deregister(&_dm_misc) < 0)
 		DMERR("misc_deregister failed for control device");
 	dm_hash_exit();
@@ -1127,7 +1122,6 @@
 
 void dm_interface_exit(void)
 {
-	devfs_remove(DM_DIR "/control");
 	if (misc_deregister(&_dm_misc) < 0)
 		DMERR("misc_deregister failed for control device");
 	dm_hash_exit();
diff -urN linux-2.5.68-bk10/drivers/media/radio/miropcm20-rds.c linux-2.5.68-bk11/drivers/media/radio/miropcm20-rds.c
--- linux-2.5.68-bk10/drivers/media/radio/miropcm20-rds.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk11/drivers/media/radio/miropcm20-rds.c	2003-05-01 04:40:21.000000000 -0700
@@ -13,7 +13,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/miscdevice.h>
-#include <linux/devfs_fs_kernel.h>
 #include <asm/uaccess.h>
 #include "miropcm20-rds-core.h"
 
@@ -114,28 +113,17 @@
 static struct miscdevice rds_miscdev = {
 	.minor		= MISC_DYNAMIC_MINOR,
 	.name		= "radiotext",
+	.devfs_name	= "v4l/rds/radiotext",
 	.fops		= &rds_fops,
 };
 
 static int __init miropcm20_rds_init(void)
 {
-	int error;
-
-	error = misc_register(&rds_miscdev);
-	if (error)
-		return error;
-
-	error = devfs_mk_symlink("v4l/rds/radiotext",
-				 "../misc/radiotext");
-	if (error)
-		misc_deregister(&rds_miscdev);
-
-	return error;
+	return misc_register(&rds_miscdev);
 }
 
 static void __exit miropcm20_rds_cleanup(void)
 {
-	devfs_remove("v4l/rds/radiotext");
 	misc_deregister(&rds_miscdev);
 }
 
diff -urN linux-2.5.68-bk10/drivers/media/video/bttv-driver.c linux-2.5.68-bk11/drivers/media/video/bttv-driver.c
--- linux-2.5.68-bk10/drivers/media/video/bttv-driver.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/drivers/media/video/bttv-driver.c	2003-05-01 04:40:21.000000000 -0700
@@ -1279,7 +1279,7 @@
 }
 
 static int
-buffer_setup(struct file *file, int *count, int *size)
+buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
 {
 	struct bttv_fh *fh = file->private_data;
 	
@@ -3156,22 +3156,23 @@
 	spin_unlock(&btv->s_lock);
 }
 
-static void bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
+static irqreturn_t bttv_irq(int irq, void *dev_id, struct pt_regs * regs)
 {
 	u32 stat,astat;
 	u32 dstat;
 	int count;
 	struct bttv *btv;
+	int handled = 0;
 
 	btv=(struct bttv *)dev_id;
 	count=0;
-	while (1) 
-	{
+	while (1) {
 		/* get/clear interrupt status bits */
 		stat=btread(BT848_INT_STAT);
 		astat=stat&btread(BT848_INT_MASK);
 		if (!astat)
-			return;
+			break;
+		handled = 1;
 		btwrite(stat,BT848_INT_STAT);
 
 		/* get device status bits */
@@ -3231,6 +3232,7 @@
 			       "bttv%d: IRQ lockup, cleared int mask\n", btv->nr);
 		}
 	}
+	return IRQ_RETVAL(handled);
 }
 
 
diff -urN linux-2.5.68-bk10/drivers/net/irda/ali-ircc.c linux-2.5.68-bk11/drivers/net/irda/ali-ircc.c
--- linux-2.5.68-bk10/drivers/net/irda/ali-ircc.c	2003-04-19 19:49:11.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/ali-ircc.c	2003-05-01 04:40:22.000000000 -0700
@@ -95,7 +95,6 @@
 static int  ali_ircc_net_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static int  ali_ircc_pmproc(struct pm_dev *dev, pm_request_t rqst, void *data);
 static void ali_ircc_change_speed(struct ali_ircc_cb *self, __u32 baud);
-static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static void ali_ircc_suspend(struct ali_ircc_cb *self);
 static void ali_ircc_wakeup(struct ali_ircc_cb *self);
 static struct net_device_stats *ali_ircc_net_get_stats(struct net_device *dev);
@@ -632,7 +631,8 @@
  *    An interrupt from the chip has arrived. Time to do some work
  *
  */
-static void ali_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id,
+					struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
 	struct ali_ircc_cb *self;
@@ -641,7 +641,7 @@
 		
  	if (!dev) {
 		WARNING("%s: irq %d for unknown device.\n", driver_name, irq);
-		return;
+		return IRQ_NONE;
 	}	
 	
 	self = (struct ali_ircc_cb *) dev->priv;
@@ -656,7 +656,8 @@
 		
 	spin_unlock(&self->lock);
 	
-	IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);		
+	IRDA_DEBUG(2, "%s(), ----------------- End ------------------\n", __FUNCTION__);
+	return IRQ_HANDLED;
 }
 /*
  * Function ali_ircc_fir_interrupt(irq, struct ali_ircc_cb *self, regs)
diff -urN linux-2.5.68-bk10/drivers/net/irda/donauboe.c linux-2.5.68-bk11/drivers/net/irda/donauboe.c
--- linux-2.5.68-bk10/drivers/net/irda/donauboe.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/donauboe.c	2003-05-01 04:40:22.000000000 -0700
@@ -745,20 +745,20 @@
   return 1;
 }
 
-STATIC void
+STATIC irqreturn_t
 toshoboe_probeinterrupt (int irq, void *dev_id, struct pt_regs *regs)
 {
   struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
   __u8 irqstat;
 
   if (self == NULL && toshoboe_invalid_dev(irq)) 
-    return;
+    return IRQ_NONE;
 
   irqstat = INB (OBOE_ISR);
 
 /* was it us */
   if (!(irqstat & OBOE_INT_MASK))
-    return;
+    return IRQ_NONE;
 
 /* Ack all the interrupts */
   OUTB (irqstat, OBOE_ISR);
@@ -791,6 +791,7 @@
   if (irqstat & OBOE_INT_SIP) {
     self->int_sip++;
     PROBE_DEBUG("I"); }
+  return IRQ_HANDLED;
 }
 
 STATIC int
diff -urN linux-2.5.68-bk10/drivers/net/irda/nsc-ircc.c linux-2.5.68-bk11/drivers/net/irda/nsc-ircc.c
--- linux-2.5.68-bk10/drivers/net/irda/nsc-ircc.c	2003-04-19 19:48:46.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/nsc-ircc.c	2003-05-01 04:40:22.000000000 -0700
@@ -131,7 +131,6 @@
 static int  nsc_ircc_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
 static void nsc_ircc_dma_xmit(struct nsc_ircc_cb *self, int iobase);
 static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 baud);
-static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static int  nsc_ircc_is_receiving(struct nsc_ircc_cb *self);
 static int  nsc_ircc_read_dongle_id (int iobase);
 static void nsc_ircc_init_dongle_interface (int iobase, int dongle_id);
@@ -1781,7 +1780,8 @@
  *    An interrupt from the chip has arrived. Time to do some work
  *
  */
-static void nsc_ircc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id,
+				struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
 	struct nsc_ircc_cb *self;
@@ -1790,7 +1790,7 @@
 
 	if (!dev) {
 		WARNING("%s: irq %d for unknown device.\n", driver_name, irq);
-		return;
+		return IRQ_NONE;
 	}
 	self = (struct nsc_ircc_cb *) dev->priv;
 
@@ -1818,6 +1818,7 @@
 	outb(bsr, iobase+BSR);       /* Restore bank register */
 
 	spin_unlock(&self->lock);
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.68-bk10/drivers/net/irda/smc-ircc.c linux-2.5.68-bk11/drivers/net/irda/smc-ircc.c
--- linux-2.5.68-bk10/drivers/net/irda/smc-ircc.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/smc-ircc.c	2003-05-01 04:40:22.000000000 -0700
@@ -992,9 +992,9 @@
 		return IRQ_NONE;
 	}
 	irport = (struct irport_cb *) dev->priv;
-	ASSERT(irport != NULL, return;);
+	ASSERT(irport != NULL, return IRQ_NONE;);
 	self = (struct ircc_cb *) irport->priv;
-	ASSERT(self != NULL, return;);
+	ASSERT(self != NULL, return IRQ_NONE;);
 
 	/* Check if we should use the SIR interrupt handler */
 	if (self->io->speed < 576000) {
diff -urN linux-2.5.68-bk10/drivers/net/irda/toshoboe.c linux-2.5.68-bk11/drivers/net/irda/toshoboe.c
--- linux-2.5.68-bk10/drivers/net/irda/toshoboe.c	2003-04-19 19:48:48.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/toshoboe.c	2003-05-01 04:40:22.000000000 -0700
@@ -349,7 +349,7 @@
 }
 
 /*interrupt handler */
-static void
+static irqreturn_t
 toshoboe_interrupt (int irq, void *dev_id, struct pt_regs *regs)
 {
   struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
@@ -360,7 +360,7 @@
     {
       printk (KERN_WARNING "%s: irq %d for unknown device.\n",
               driver_name, irq);
-      return;
+      return IRQ_NONE;
     }
 
   IRDA_DEBUG (4, "%s()\n", __FUNCTION__ );
@@ -369,7 +369,7 @@
 
 /* woz it us */
   if (!(irqstat & 0xf8))
-    return;
+    return IRQ_NONE;
 
   outb_p (irqstat, OBOE_ISR);   /*Acknologede it */
 
@@ -456,8 +456,7 @@
       self->stats.rx_errors++;
 
     }
-
-
+  return IRQ_HANDLED;
 }
 
 static int
diff -urN linux-2.5.68-bk10/drivers/net/irda/vlsi_ir.c linux-2.5.68-bk11/drivers/net/irda/vlsi_ir.c
--- linux-2.5.68-bk10/drivers/net/irda/vlsi_ir.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/vlsi_ir.c	2003-05-01 04:40:22.000000000 -0700
@@ -1570,7 +1570,8 @@
 
 /********************************************************/
 
-static void vlsi_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
+static irqreturn_t vlsi_interrupt(int irq, void *dev_instance,
+					struct pt_regs *regs)
 {
 	struct net_device *ndev = dev_instance;
 	vlsi_irda_dev_t *idev = ndev->priv;
@@ -1579,6 +1580,7 @@
 	int 		boguscount = 32;
 	unsigned	got_act;
 	unsigned long	flags;
+	int		handled = 0;
 
 	got_act = 0;
 	iobase = ndev->base_addr;
@@ -1591,7 +1593,7 @@
 
 		if (!(irintr&=IRINTR_INT_MASK))		/* not our INT - probably shared */
 			break;
-
+		handled = 1;
 		if (irintr&IRINTR_RPKTINT)
 			vlsi_rx_interrupt(ndev);
 
@@ -1610,7 +1612,7 @@
 
 	if (boguscount <= 0)
 		printk(KERN_WARNING "%s: too much work in interrupt!\n", __FUNCTION__);
-
+	return IRQ_RETVAL(handled);
 }
 
 /********************************************************/
diff -urN linux-2.5.68-bk10/drivers/net/irda/w83977af_ir.c linux-2.5.68-bk11/drivers/net/irda/w83977af_ir.c
--- linux-2.5.68-bk10/drivers/net/irda/w83977af_ir.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/irda/w83977af_ir.c	2003-05-01 04:40:22.000000000 -0700
@@ -97,7 +97,6 @@
 static int  w83977af_pio_write(int iobase, __u8 *buf, int len, int fifo_size);
 static void w83977af_dma_write(struct w83977af_ir *self, int iobase);
 static void w83977af_change_speed(struct w83977af_ir *self, __u32 speed);
-static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 static int  w83977af_is_receiving(struct w83977af_ir *self);
 
 static int  w83977af_net_init(struct net_device *dev);
@@ -1118,7 +1117,8 @@
  *    An interrupt from the chip has arrived. Time to do some work
  *
  */
-static void w83977af_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t w83977af_interrupt(int irq, void *dev_id,
+					struct pt_regs *regs)
 {
 	struct net_device *dev = (struct net_device *) dev_id;
 	struct w83977af_ir *self;
@@ -1128,7 +1128,7 @@
 	if (!dev) {
 		printk(KERN_WARNING "%s: irq %d for unknown device.\n", 
 			driver_name, irq);
-		return;
+		return IRQ_NONE;
 	}
 	self = (struct w83977af_ir *) dev->priv;
 
@@ -1153,7 +1153,7 @@
 
 	outb(icr, iobase+ICR);    /* Restore (new) interrupts */
 	outb(set, iobase+SSR);    /* Restore bank register */
-
+	return IRQ_HANDLED;
 }
 
 /*
diff -urN linux-2.5.68-bk10/drivers/net/wan/Kconfig linux-2.5.68-bk11/drivers/net/wan/Kconfig
--- linux-2.5.68-bk10/drivers/net/wan/Kconfig	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/wan/Kconfig	2003-05-01 04:40:24.000000000 -0700
@@ -255,8 +255,8 @@
 
  	  If you want to compile the driver as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want),
-	  say M here and read Documentation/modules.txt.  The module
-	  will be called hdlc.o.
+	  say M here and read <file:Documentation/modules.txt>.  The module
+	  will be called hdlc.
 
 	  If unsure, say N here.
 
@@ -363,7 +363,7 @@
 	  If you want to compile the driver as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want),
 	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called n2.o.
+	  will be called n2.
 
 	  If unsure, say N here.
 
@@ -378,7 +378,7 @@
 	  If you want to compile the driver as a module ( = code which can be
 	  inserted in and removed from the running kernel whenever you want),
 	  say M here and read <file:Documentation/modules.txt>.  The module
-	  will be called c101.o.
+	  will be called c101.
 
 	  If unsure, say N here.
 
diff -urN linux-2.5.68-bk10/drivers/net/wan/c101.c linux-2.5.68-bk11/drivers/net/wan/c101.c
--- linux-2.5.68-bk10/drivers/net/wan/c101.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/wan/c101.c	2003-05-01 04:40:24.000000000 -0700
@@ -157,14 +157,9 @@
 	port_t *port = hdlc_to_port(hdlc);
 	int result;
 
-	if (!try_module_get(THIS_MODULE))
-		return -EFAULT;	/* rmmod in progress */
-
 	result = hdlc_open(hdlc);
-	if (result) {
+	if (result)
 		return result;
-		module_put(THIS_MODULE);
-	}
 
 	writeb(1, port->win0base + C101_DTR);
 	sca_out(0, MSCI1_OFFSET + CTL, port); /* RTS uses ch#2 output */
@@ -183,7 +178,6 @@
 	writeb(0, port->win0base + C101_DTR);
 	sca_out(CTL_NORTS, MSCI1_OFFSET + CTL, port);
 	hdlc_close(hdlc);
-	module_put(THIS_MODULE);
 	return 0;
 }
 
@@ -319,6 +313,7 @@
 	dev = hdlc_to_dev(&card->hdlc);
 
 	spin_lock_init(&card->lock);
+	SET_MODULE_OWNER(dev);
 	dev->irq = irq;
 	dev->mem_start = winbase;
 	dev->mem_end = winbase + C101_MAPPED_RAM_SIZE - 1;
diff -urN linux-2.5.68-bk10/drivers/net/wan/n2.c linux-2.5.68-bk11/drivers/net/wan/n2.c
--- linux-2.5.68-bk10/drivers/net/wan/n2.c	2003-05-01 04:40:00.000000000 -0700
+++ linux-2.5.68-bk11/drivers/net/wan/n2.c	2003-05-01 04:40:25.000000000 -0700
@@ -218,15 +218,9 @@
 	u8 mcr = inb(io + N2_MCR) | (port->phy_node ? TX422_PORT1:TX422_PORT0);
 	int result;
 
-
-	if (!try_module_get(THIS_MODULE))
-		return -EFAULT;	/* rmmod in progress */
-
 	result = hdlc_open(hdlc);
-	if (result) {
+	if (result)
 		return result;
-		module_put(THIS_MODULE);
-	}
 
 	mcr &= port->phy_node ? ~DTR_PORT1 : ~DTR_PORT0; /* set DTR ON */
 	outb(mcr, io + N2_MCR);
@@ -251,7 +245,6 @@
 	mcr |= port->phy_node ? DTR_PORT1 : DTR_PORT0; /* set DTR OFF */
 	outb(mcr, io + N2_MCR);
 	hdlc_close(hdlc);
-	module_put(THIS_MODULE);
 	return 0;
 }
 
@@ -451,6 +444,7 @@
 			port->log_node = 1;
 
 		spin_lock_init(&port->lock);
+		SET_MODULE_OWNER(dev);
 		dev->irq = irq;
 		dev->mem_start = winbase;
 		dev->mem_end = winbase + USE_WINDOWSIZE-1;
diff -urN linux-2.5.68-bk10/drivers/usb/Makefile linux-2.5.68-bk11/drivers/usb/Makefile
--- linux-2.5.68-bk10/drivers/usb/Makefile	2003-04-19 19:51:10.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/Makefile	2003-05-01 04:40:35.000000000 -0700
@@ -36,7 +36,6 @@
 obj-$(CONFIG_USB_VICAM)		+= media/
 
 obj-$(CONFIG_USB_CATC)		+= net/
-obj-$(CONFIG_USB_CDCETHER)	+= net/
 obj-$(CONFIG_USB_KAWETH)	+= net/
 obj-$(CONFIG_USB_PEGASUS)	+= net/
 obj-$(CONFIG_USB_RTL8150)	+= net/
diff -urN linux-2.5.68-bk10/drivers/usb/core/urb.c linux-2.5.68-bk11/drivers/usb/core/urb.c
--- linux-2.5.68-bk10/drivers/usb/core/urb.c	2003-04-19 19:50:01.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/core/urb.c	2003-05-01 04:40:36.000000000 -0700
@@ -14,6 +14,29 @@
 #include "hcd.h"
 
 /**
+ * usb_init_urb - initializes a urb so that it can be used by a USB driver
+ * @urb: pointer to the urb to initialize
+ *
+ * Initializes a urb so that the USB subsystem can use it properly.
+ *
+ * If a urb is created with a call to usb_alloc_urb() it is not
+ * necessary to call this function.  Only use this if you allocate the
+ * space for a struct urb on your own.  If you call this function, be
+ * careful when freeing the memory for your urb that it is no longer in
+ * use by the USB core.
+ *
+ * Only use this function if you _really_ understand what you are doing.
+ */
+void usb_init_urb(struct urb *urb)
+{
+	if (urb) {
+		memset(urb, 0, sizeof(*urb));
+		urb->count = (atomic_t)ATOMIC_INIT(1);
+		spin_lock_init(&urb->lock);
+	}
+}
+
+/**
  * usb_alloc_urb - creates a new urb for a USB driver to use
  * @iso_packets: number of iso packets for this urb
  * @mem_flags: the type of memory to allocate, see kmalloc() for a list of
@@ -40,11 +63,7 @@
 		err("alloc_urb: kmalloc failed");
 		return NULL;
 	}
-
-	memset(urb, 0, sizeof(*urb));
-	urb->count = (atomic_t)ATOMIC_INIT(1);
-	spin_lock_init(&urb->lock);
-
+	usb_init_urb(urb);
 	return urb;
 }
 
@@ -387,7 +406,7 @@
 		return -ENODEV;
 }
 
-// asynchronous request completion model
+EXPORT_SYMBOL(usb_init_urb);
 EXPORT_SYMBOL(usb_alloc_urb);
 EXPORT_SYMBOL(usb_free_urb);
 EXPORT_SYMBOL(usb_get_urb);
diff -urN linux-2.5.68-bk10/drivers/usb/host/uhci-hcd.c linux-2.5.68-bk11/drivers/usb/host/uhci-hcd.c
--- linux-2.5.68-bk10/drivers/usb/host/uhci-hcd.c	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/host/uhci-hcd.c	2003-05-01 04:40:36.000000000 -0700
@@ -1283,7 +1283,8 @@
 	}
 
 	if (last_urb) {
-		*end = (last_urb->start_frame + last_urb->number_of_packets) & 1023;
+		*end = (last_urb->start_frame + last_urb->number_of_packets *
+				last_urb->interval) & (UHCI_NUMFRAMES-1);
 		ret = 0;
 	} else
 		ret = -1;	/* no previous urb found */
@@ -1933,9 +1934,10 @@
 
 	dbg("%x: suspend_hc", io_addr);
 
-	outw(USBCMD_EGSM, io_addr + USBCMD);
-
 	uhci->is_suspended = 1;
+	smp_wmb();
+
+	outw(USBCMD_EGSM, io_addr + USBCMD);
 }
 
 static void wakeup_hc(struct uhci_hcd *uhci)
@@ -1945,6 +1947,9 @@
 
 	dbg("%x: wakeup_hc", io_addr);
 
+	/* Global resume for 20ms */
+	outw(USBCMD_FGR | USBCMD_EGSM, io_addr + USBCMD);
+	wait_ms(20);
 	outw(0, io_addr + USBCMD);
 	
 	/* wait for EOP to be sent */
@@ -1965,7 +1970,7 @@
 	int i;
 
 	for (i = 0; i < uhci->rh_numports; i++)
-		connection |= (inw(io_addr + USBPORTSC1 + i * 2) & 0x1);
+		connection |= (inw(io_addr + USBPORTSC1 + i * 2) & USBPORTSC_CCS);
 
 	return connection;
 }
diff -urN linux-2.5.68-bk10/drivers/usb/input/usbkbd.c linux-2.5.68-bk11/drivers/usb/input/usbkbd.c
--- linux-2.5.68-bk10/drivers/usb/input/usbkbd.c	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/input/usbkbd.c	2003-05-01 04:40:36.000000000 -0700
@@ -359,9 +359,6 @@
 	.probe =	usb_kbd_probe,
 	.disconnect =	usb_kbd_disconnect,
 	.id_table =	usb_kbd_id_table,
-	.driver	= {
-		.devclass = &input_devclass,
-	},
 };
 
 static int __init usb_kbd_init(void)
diff -urN linux-2.5.68-bk10/drivers/usb/input/usbmouse.c linux-2.5.68-bk11/drivers/usb/input/usbmouse.c
--- linux-2.5.68-bk10/drivers/usb/input/usbmouse.c	2003-04-19 19:51:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/input/usbmouse.c	2003-05-01 04:40:36.000000000 -0700
@@ -242,9 +242,6 @@
 	.probe		= usb_mouse_probe,
 	.disconnect	= usb_mouse_disconnect,
 	.id_table	= usb_mouse_id_table,
-	.driver	= {
-		.devclass = &input_devclass,
-	},
 };
 
 static int __init usb_mouse_init(void)
diff -urN linux-2.5.68-bk10/drivers/usb/media/vicam.c linux-2.5.68-bk11/drivers/usb/media/vicam.c
--- linux-2.5.68-bk10/drivers/usb/media/vicam.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/media/vicam.c	2003-05-01 04:40:36.000000000 -0700
@@ -1,7 +1,10 @@
 /*
  * USB ViCam WebCam driver
  * Copyright (c) 2002 Joe Burks (jburks@wavicle.org),
- *                    John Tyner (jtyner@cs.ucr.edu)
+ *                    Christopher L Cheney (ccheney@cheney.cx),
+ *                    Pavel Machek (pavel@suse.cz),
+ *                    John Tyner (jtyner@cs.ucr.edu),
+ *                    Monroe Williams (monroe@pobox.com)
  *
  * Supports 3COM HomeConnect PC Digital WebCam
  *
diff -urN linux-2.5.68-bk10/drivers/usb/net/Kconfig linux-2.5.68-bk11/drivers/usb/net/Kconfig
--- linux-2.5.68-bk10/drivers/usb/net/Kconfig	2003-04-19 19:50:33.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/net/Kconfig	2003-05-01 04:40:36.000000000 -0700
@@ -28,30 +28,6 @@
 	  The module will be called catc. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
-config USB_CDCETHER
-	tristate "USB CDC Ethernet support (EXPERIMENTAL)"
-	depends on USB && NET && EXPERIMENTAL
-	---help---
-	  This driver supports devices conforming to the Communication Device
-	  Class Ethernet Control Model.  This is used in some cable modems.
-	  For more details on the specification, get the Communication Device
-	  Class specification from <http://www.usb.org/>.
-
-	  This driver should work with the following devices:
-	  * Ericsson PipeRider (all variants)
-	  * Motorola (DM100 and SB4100)
-	  * Broadcom Cable Modem (reference design)
-	  * Toshiba PCX1100U and possibly other cable modems
-
-	  The device creates a network device (ethX, where X depends on what
-	  other networking devices you have in use), as for a normal PCI
-	  or ISA based ethernet network card.
-
-	  This code is also available as a module ( = code which can be
-	  inserted in and removed from the running kernel whenever you want).
-	  The module will be called cdc-ether.  If you want to compile it 
-	  as a module, say M here and read <file:Documentation/modules.txt>.
-
 config USB_KAWETH
 	tristate "USB KLSI KL5USB101-based ethernet device support"
 	depends on USB && NET
@@ -124,26 +100,147 @@
 	  module, say M here and read <file:Documentation/modules.txt>.
 
 config USB_USBNET
-	tristate "USB-to-USB Networking for cables, PDAs and other devices"
+	tristate "Host-to-Host Networking for Cables and Smart Devices"
 	depends on USB && NET
 	---help---
-	  This driver supports network links over USB with USB "Network"
-	  or "data transfer" cables, often used to network laptops to PCs.
-	  Such cables have chips from suppliers such as Belkin/eTEK, GeneSys
-	  (GeneLink), NetChip and Prolific.  Some motherboards with USB PC2PC
-	  support include such chips.
-	  
-	  Intelligent USB devices, such as PDAs running Linux (like Yopy
-	  and Zaurus, or iPaqs after upgrading to Linux) can use the same
-	  approach to provide Internet access.
-
-	  These links will have names like "usb0", "usb1", etc.  They act
-	  like two-node Ethernets, so you can use 802.1d Ethernet Bridging
-	  (CONFIG_BRIDGE) to simplify your network routing.  For more
-	  information see <http://www.linux-usb.org/usbnet/>.
+	  This driver supports several kinds of network links over USB,
+	  with "minidrivers" built around a common network driver core
+	  that supports deep queues for efficient transfers.
+
+	  Typically, these links involves only two network hosts.  The
+	  host runs "usbnet", and the other end of the link might be:
+
+	  - Another USB host, when using USB "network" or "data transfer"
+	    cables.  These are often used to network laptops to PCs, like
+	    "Laplink" parallel cables or some motherboards.  These rely
+	    on specialized chips from many suppliers.
+
+	  - An intelligent USB gadget, perhaps embedding a Linux system.
+	    These include PDAs running Linux (iPaq, Yopy, Zaurus, and
+	    others), and devices that interoperate using the standard
+	    CDC-Ethernet specification (including many cable modems).
+
+	  The link will appear with a name like "usb0", when the link is
+	  a two-node link, or "eth0" for most CDC-Ethernet devices.  Those
+	  two-node links are most easily managed with Ethernet Bridging
+	  (CONFIG_BRIDGE) instead of routing.
+
+	  For more information see <http://www.linux-usb.org/usbnet/>.
 
 	  This code is also available as a kernel module (code which can be
 	  inserted in and removed from the running kernel whenever you want).
 	  The module will be called usbnet. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+comment "USB Host-to-Host Cables"
+	depends on USB_USBNET
+
+config USB_AN2720
+	boolean "AnchorChips 2720 based cables (Xircom PGUNET, ...)"
+	depends on USB_USBNET
+	default y
+	help
+	  Choose this option if you're using a host-to-host cable
+	  based on this design.  Note that AnchorChips is now a
+	  Cypress brand.
+
+config USB_BELKIN
+	boolean "eTEK based host-to-host cables (Advance, Belkin, ...)"
+	depends on USB_USBNET
+	default y
+	help
+	  Choose this option if you're using a host-to-host cable
+	  based on this design:  two NetChip 2890 chips and an Atmel
+	  microcontroller, with LEDs that indicate traffic.
+
+config USB_GENESYS
+	boolean "GeneSys GL620USB-A based cables"
+	default y
+	depends on USB_USBNET
+	help
+	  Choose this option if you're using a host-to-host cable,
+	  or PC2PC motherboard, with this chip.
+
+	  Note that the half-duplex "GL620USB" is not supported.
+
+config USB_NET1080
+	boolean "NetChip 1080 based cables (Laplink, ...)"
+	default y
+	depends on USB_USBNET
+	help
+	  Choose this option if you're using a host-to-host cable based
+	  on this design:  one NetChip 1080 chips and supporting logic,
+	  supporting LEDs that indicate traffic
+
+config USB_PL2301
+	boolean "Prolific PL-2301/2302 based cables"
+	default y
+	# handshake/init/reset problems, from original 'plusb' driver
+	depends on USB_USBNET && EXPERIMENTAL
+	help
+	  Choose this option if you're using a host-to-host cable
+	  with one of these chips.
+
+comment "Intelligent USB Devices/Gadgets"
+	depends on USB_USBNET
+
+config USB_ARMLINUX
+	boolean "Embedded ARM Linux links (iPaq, ...)"
+	depends on USB_USBNET
+	default y
+	help
+	  Choose this option to support the "usb-eth" networking driver
+	  used by most of the ARM Linux community with device controllers
+	  such as the SA-11x0 and PXA-25x UDCs.
+
+	  Although the ROMs shipped with Sharp Zaurus products use a
+	  different link level framing protocol, you can have them use
+	  this simpler protocol by installing a different kernel.
+
+config USB_EPSON2888
+	boolean "Epson 2888 based firmware (DEVELOPMENT)"
+	depends on USB_USBNET
+	default y
+	help
+	  Choose this option to support the usb networking links used
+	  by some sample firmware from Epson.
+
+config USB_ZAURUS
+	boolean "Sharp Zaurus (stock ROMs)"
+	depends on USB_USBNET
+	default y
+	help
+	  Choose this option to support the usb networking links used by
+	  Zaurus models like the SL-5000D, SL-5500, SL-5600, A-300, B-500.
+
+	  If you install an alternate ROM image, you may no longer need
+	  to support this protocol.  Only the "eth-fd" driver really needs
+	  this non-conformant variant of CDC Ethernet protocol.
+
+config USB_CDCETHER
+	boolean "CDC Ethernet support (smart devices such as cable modems)"
+	# experimental primarily because cdc-ether was.
+	# make it non-experimental after more interop testing
+	depends on USB_USBNET && EXPERIMENTAL
+	default y
+	help
+	  This option supports devices conforming to the Communication Device
+	  Class (CDC) Ethernet Control Model, a specification that's easy to
+	  implement in device firmware.  The CDC specifications are available
+	  from <http://www.usb.org/>.
+	  
+	  CDC Ethernet is an implementation option for DOCSIS cable modems
+	  that support USB connectivity, used for non-Microsoft USB hosts.
+ 	  This driver should work with at least the following devices:
+
+ 	    * Ericsson PipeRider (all variants)
+ 	    * Motorola (DM100 and SB4100)
+ 	    * Broadcom Cable Modem (reference design)
+ 	    * Toshiba PCX1100U
+	    * ...
+
+	  This driver creates an interface named "ethX", where X depends on
+	  what other networking devices you have in use.  However, if the
+	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
+	  name is used instead.
+
diff -urN linux-2.5.68-bk10/drivers/usb/net/Makefile linux-2.5.68-bk11/drivers/usb/net/Makefile
--- linux-2.5.68-bk10/drivers/usb/net/Makefile	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/net/Makefile	2003-05-01 04:40:37.000000000 -0700
@@ -3,7 +3,6 @@
 #
 
 obj-$(CONFIG_USB_CATC)		+= catc.o
-obj-$(CONFIG_USB_CDCETHER)	+= cdc-ether.o
 obj-$(CONFIG_USB_KAWETH)	+= kaweth.o
 obj-$(CONFIG_USB_PEGASUS)	+= pegasus.o
 obj-$(CONFIG_USB_RTL8150)	+= rtl8150.o
diff -urN linux-2.5.68-bk10/drivers/usb/net/usbnet.c linux-2.5.68-bk11/drivers/usb/net/usbnet.c
--- linux-2.5.68-bk10/drivers/usb/net/usbnet.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/net/usbnet.c	2003-05-01 04:40:37.000000000 -0700
@@ -157,20 +157,7 @@
 #include <linux/dma-mapping.h>
 
 
-/* minidrivers _could_ be individually configured */
-#define	CONFIG_USB_AN2720
-#define	CONFIG_USB_BELKIN
-#undef	CONFIG_USB_CDCETHER
-//#define	CONFIG_USB_CDCETHER		/* NYET */
-#define	CONFIG_USB_EPSON2888
-#define	CONFIG_USB_GENESYS
-#define	CONFIG_USB_NET1080
-#define	CONFIG_USB_PL2301
-#define	CONFIG_USB_ARMLINUX
-#define	CONFIG_USB_ZAURUS
-
-
-#define DRIVER_VERSION		"31-Mar-2003"
+#define DRIVER_VERSION		"25-Apr-2003"
 
 /*-------------------------------------------------------------------------*/
 
@@ -256,6 +243,7 @@
 #define FLAG_FRAMING_Z	0x0004		/* zaurus adds a trailer */
 
 #define FLAG_NO_SETINT	0x0010		/* device can't set_interface() */
+#define FLAG_ETHER	0x0020		/* maybe use "eth%d" names */
 
 	/* init device ... can sleep, or cause probe() failure */
 	int	(*bind)(struct usbnet *, struct usb_interface *);
@@ -314,24 +302,20 @@
 			: (in_interrupt () ? "in_interrupt" : "can sleep"))
 
 #ifdef DEBUG
-#define devdbg(usbnet, fmt, arg...)				\
-	do {							\
-		printk(KERN_DEBUG "%s:", (usbnet)->net.name);	\
-		printk(fmt, ## arg);				\
-		printk("\n");					\
-	} while (0)
+#define devdbg(usbnet, fmt, arg...) \
+	printk(KERN_DEBUG "%s: " fmt "\n" , (usbnet)->net.name , ## arg)
 #else
 #define devdbg(usbnet, fmt, arg...) do {} while(0)
 #endif
 
 #define deverr(usbnet, fmt, arg...) \
-	printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net.name, ## arg)
+	printk(KERN_ERR "%s: " fmt "\n" , (usbnet)->net.name , ## arg)
 #define devwarn(usbnet, fmt, arg...) \
-	printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net.name, ## arg)
+	printk(KERN_WARNING "%s: " fmt "\n" , (usbnet)->net.name , ## arg)
 
 #define devinfo(usbnet, fmt, arg...) \
 	do { if ((usbnet)->msg_level >= 1) \
-	printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name, ## arg); \
+	printk(KERN_INFO "%s: " fmt "\n" , (usbnet)->net.name , ## arg); \
 	} while (0)
 
 /*-------------------------------------------------------------------------*/
@@ -396,6 +380,7 @@
 
 
 #ifdef	CONFIG_USB_AN2720
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -421,6 +406,7 @@
 
 
 #ifdef	CONFIG_USB_BELKIN
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -447,7 +433,11 @@
  * Takes two interfaces.  The DATA interface is inactive till an altsetting
  * is selected.  Configuration data includes class descriptors.
  *
- * Zaurus uses nonstandard framing, but is otherwise CDC Ether.
+ * Zaurus uses nonstandard framing, and doesn't uniquify its Ethernet
+ * addresses, but is otherwise CDC Ether.
+ *
+ * This should interop with whatever the 2.4 "CDCEther.c" driver
+ * (by Brad Hards) talked with.
  *
  *-------------------------------------------------------------------------*/
 
@@ -589,9 +579,17 @@
 	if (!info->header || !info ->u || !info->ether)
 		goto bad_desc;
 
-	status = get_ethernet_addr (dev, info->ether);
-	if (status < 0)
-		return status;
+#ifdef CONFIG_USB_ZAURUS
+	/* Zaurus ethernet addresses aren't unique ... */
+	if ((dev->driver_info->flags & FLAG_FRAMING_Z) != 0)
+		/* ignore */ ;
+	else
+#endif
+	{
+		status = get_ethernet_addr (dev, info->ether);
+		if (status < 0)
+			return status;
+	}
 
 	/* claim data interface and set it up ... with side effects.
 	 * network traffic can't flow until an altsetting is enabled.
@@ -609,8 +607,6 @@
 
 	dev->net.mtu = cpu_to_le16p (&info->ether->wMaxSegmentSize)
 		- ETH_HLEN;
-	if ((dev->driver_info->flags & FLAG_FRAMING_Z) == 0)
-		strcpy (dev->net.name, "eth%d");
 	return 0;
 
 bad_desc:
@@ -640,9 +636,11 @@
 
 
 #ifdef	CONFIG_USB_CDCETHER
+#define	HAVE_HARDWARE
 
 static const struct driver_info	cdc_info = {
 	.description =	"CDC Ethernet Device",
+	.flags =	FLAG_ETHER,
 	// .check_connect = cdc_check_connect,
 	.bind =		cdc_bind,
 	.unbind =	cdc_unbind,
@@ -653,6 +651,7 @@
 
 
 #ifdef	CONFIG_USB_EPSON2888
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -663,6 +662,8 @@
  * implements this interface.  Product developers can reuse or modify that
  * code, such as by using their own product and vendor codes.
  *
+ * Support was from Juro Bystricky <bystricky.juro@erd.epson.com>
+ *
  *-------------------------------------------------------------------------*/
 
 static const struct driver_info	epson2888_info = {
@@ -676,6 +677,7 @@
 
 
 #ifdef CONFIG_USB_GENESYS
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -693,6 +695,9 @@
  *    the transfer direction.  (That's disabled here, partially coded.)
  *    A control URB would block until other side writes an interrupt.
  *
+ * Original code from Jiun-Jie Huang <huangjj@genesyslogic.com.tw>
+ * and merged into "usbnet" by Stanislav Brabec <utx@penguin.cz>.
+ *
  *-------------------------------------------------------------------------*/
 
 // control msg write command
@@ -1011,6 +1016,7 @@
 
 
 #ifdef	CONFIG_USB_NET1080
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -1526,11 +1532,15 @@
 
 
 #ifdef CONFIG_USB_PL2301
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
  * Prolific PL-2301/PL-2302 driver ... http://www.prolifictech.com
  *
+ * The protocol and handshaking used here should be bug-compatible
+ * with the Linux 2.2 "plusb" driver, by Deti Fliegl.
+ *
  *-------------------------------------------------------------------------*/
 
 /*
@@ -1590,6 +1600,7 @@
 
 
 #ifdef	CONFIG_USB_ARMLINUX
+#define	HAVE_HARDWARE
 
 /*-------------------------------------------------------------------------
  *
@@ -1622,6 +1633,7 @@
 
 
 #ifdef CONFIG_USB_ZAURUS
+#define	HAVE_HARDWARE
 
 #include <linux/crc32.h>
 
@@ -1736,7 +1748,9 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* urb completions may be in_irq; avoid doing real work then. */
+/* some LK 2.4 HCDs oopsed if we freed or resubmitted urbs from
+ * completion callbacks.  2.5 should have fixed those bugs...
+ */
 
 static void defer_bh (struct usbnet *dev, struct sk_buff *skb)
 {
@@ -2502,6 +2516,10 @@
 	int				status;
 
 	info = (struct driver_info *) prod->driver_info;
+	if (!info) {
+		dev_dbg (&udev->dev, "blacklisted by %s\n", driver_name);
+		return -ENODEV;
+	}
 	xdev = interface_to_usbdev (udev);
 	interface = &udev->altsetting [udev->act_altsetting];
 
@@ -2553,9 +2571,15 @@
 
 	// allow device-specific bind/init procedures
 	// NOTE net->name still not usable ...
-	if (info->bind)
+	if (info->bind) {
 		status = info->bind (dev, udev);
-	else if (!info->in || info->out)
+		// heuristic:  "usb%d" for links we know are two-host,
+		// else "eth%d" when there's reasonable doubt.  userspace
+		// can rename the link if it knows better.
+		if ((dev->driver_info->flags & FLAG_ETHER) != 0
+				&& (net->dev_addr [0] & 0x02) == 0)
+			strcpy (net->name, "eth%d");
+	} else if (!info->in || info->out)
 		status = get_endpoints (dev, udev);
 	else {
 		dev->in = usb_rcvbulkpipe (xdev, info->in);
@@ -2592,6 +2616,10 @@
 
 /*-------------------------------------------------------------------------*/
 
+#ifndef	HAVE_HARDWARE
+#error You need to configure some hardware for this driver
+#endif
+
 /*
  * chip vendor names won't normally be on the cables, and
  * may not be on the device.
@@ -2716,6 +2744,22 @@
 #endif
 
 #ifdef	CONFIG_USB_CDCETHER
+
+#ifndef	CONFIG_USB_ZAURUS
+	/* if we couldn't whitelist Zaurus, we must blacklist it */
+{
+	.match_flags	=   USB_DEVICE_ID_MATCH_INT_INFO
+			  | USB_DEVICE_ID_MATCH_DEVICE, 
+	.idVendor		= 0x04DD,
+	.idProduct		= 0x8004,
+	/* match the master interface */
+	.bInterfaceClass	= USB_CLASS_COMM,
+	.bInterfaceSubClass	= 6 /* Ethernet model */,
+	.bInterfaceProtocol	= 0,
+	.driver_info 		= 0, /* BLACKLIST */
+},
+#endif
+
 {
 	/* CDC Ether uses two interfaces, not necessarily consecutive.
 	 * We match the main interface, ignoring the optional device
@@ -2725,10 +2769,7 @@
 	 * NOTE:  this match must come AFTER entries working around
 	 * bugs/quirks in a given product (like Zaurus, above).
 	 */
-	.match_flags		= USB_DEVICE_ID_MATCH_INT_INFO,
-	.bInterfaceClass	= USB_CLASS_COMM,
-	.bInterfaceSubClass	= 6 /* Ethernet model */,
-	.bInterfaceProtocol	= 0,
+	USB_INTERFACE_INFO (USB_CLASS_COMM, 6 /* Ethernet model */, 0),
 	.driver_info = (unsigned long) &cdc_info,
 },
 #endif
diff -urN linux-2.5.68-bk10/drivers/usb/serial/empeg.c linux-2.5.68-bk11/drivers/usb/serial/empeg.c
--- linux-2.5.68-bk10/drivers/usb/serial/empeg.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/serial/empeg.c	2003-05-01 04:40:37.000000000 -0700
@@ -222,8 +222,6 @@
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
-	usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf);
-
 	while (count > 0) {
 
 		/* try to find a free urb in our list of them */
@@ -264,6 +262,8 @@
 			memcpy (urb->transfer_buffer, current_position, transfer_size);
 		}
 
+		usb_serial_debug_data (__FILE__, __FUNCTION__, transfer_size, urb->transfer_buffer);
+
 		/* build up our urb */
 		usb_fill_bulk_urb (
 			urb,
diff -urN linux-2.5.68-bk10/drivers/usb/serial/io_edgeport.c linux-2.5.68-bk11/drivers/usb/serial/io_edgeport.c
--- linux-2.5.68-bk10/drivers/usb/serial/io_edgeport.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/serial/io_edgeport.c	2003-05-01 04:40:37.000000000 -0700
@@ -1356,6 +1356,7 @@
 	} else {
 		memcpy(&fifo->fifo[fifo->head], data, firsthalf);
 	}  
+	usb_serial_debug_data (__FILE__, __FUNCTION__, firsthalf, &fifo->fifo[fifo->head]);
 
 	// update the index and size
 	fifo->head  += firsthalf;
@@ -1376,16 +1377,13 @@
 		} else {
 			memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf);
 		}
+		usb_serial_debug_data (__FILE__, __FUNCTION__, secondhalf, &fifo->fifo[fifo->head]);
 		// update the index and size
 		fifo->count += secondhalf;
 		fifo->head  += secondhalf;
 		// No need to check for wrap since we can not get to end of fifo in this part
 	}
 
-	if (copySize) {
-		usb_serial_debug_data (__FILE__, __FUNCTION__, copySize, data);
-	}
-
 	send_more_port_data((struct edgeport_serial *)usb_get_serial_data(port->serial), edge_port);
 
 	dbg("%s wrote %d byte(s) TxCredits %d, Fifo %d", __FUNCTION__, copySize, edge_port->txCredits, fifo->count);
diff -urN linux-2.5.68-bk10/drivers/usb/serial/ipaq.c linux-2.5.68-bk11/drivers/usb/serial/ipaq.c
--- linux-2.5.68-bk10/drivers/usb/serial/ipaq.c	2003-04-19 19:50:40.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/serial/ipaq.c	2003-05-01 04:40:37.000000000 -0700
@@ -370,8 +370,6 @@
 
 	dbg("%s - port %d", __FUNCTION__, port->number);
 
-	usb_serial_debug_data(__FILE__, __FUNCTION__, count, buf);
-	
 	while (count > 0) {
 		transfer_size = min(count, PACKET_SIZE);
 		if (ipaq_write_bulk(port, from_user, current_position, transfer_size)) {
diff -urN linux-2.5.68-bk10/drivers/usb/serial/keyspan.c linux-2.5.68-bk11/drivers/usb/serial/keyspan.c
--- linux-2.5.68-bk10/drivers/usb/serial/keyspan.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/serial/keyspan.c	2003-05-01 04:40:37.000000000 -0700
@@ -340,8 +340,8 @@
 	p_priv = usb_get_serial_port_data(port);
 	d_details = p_priv->device_details;
 
-	dbg("%s - for port %d (%d chars [%x]), flip=%d",
-	    __FUNCTION__, port->number, count, buf[0], p_priv->out_flip);
+	dbg("%s - for port %d (%d chars), flip=%d",
+	    __FUNCTION__, port->number, count, p_priv->out_flip);
 
 	for (left = count; left > 0; left -= todo) {
 		todo = left;
diff -urN linux-2.5.68-bk10/drivers/usb/serial/usb-serial.h linux-2.5.68-bk11/drivers/usb/serial/usb-serial.h
--- linux-2.5.68-bk10/drivers/usb/serial/usb-serial.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/serial/usb-serial.h	2003-05-01 04:40:37.000000000 -0700
@@ -370,7 +370,7 @@
 
 /* Use our own dbg macro */
 #undef dbg
-#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0)
+#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg); } while (0)
 
 
 
diff -urN linux-2.5.68-bk10/drivers/usb/storage/unusual_devs.h linux-2.5.68-bk11/drivers/usb/storage/unusual_devs.h
--- linux-2.5.68-bk10/drivers/usb/storage/unusual_devs.h	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk11/drivers/usb/storage/unusual_devs.h	2003-05-01 04:40:37.000000000 -0700
@@ -35,6 +35,14 @@
 
 /* If you edit this file, please try to keep it sorted first by VendorID,
  * then by ProductID.
+ *
+ * If you want to add an entry for this file, please send the following
+ * to greg@kroah.com:
+ *	- patch that adds the entry for your device which includes your
+ *	  email address right above the entry.
+ *	- a copy of /proc/bus/usb/devices with your device plugged in
+ *	  running with this patch.
+ *
  */
 
 UNUSUAL_DEV(  0x03ee, 0x0000, 0x0000, 0x0245, 
@@ -229,10 +237,18 @@
 		US_SC_8070, US_PR_BULK, NULL,
 		US_FL_FIX_INQUIRY | US_FL_START_STOP ),
 
+/* Submitted by Lars Gemeinhardt <linux-usb@gemeinhardt.info>
+ * Needed for START_STOP flag */
+UNUSUAL_DEV(  0x0547, 0x2810, 0x0001, 0x0001,
+                "Mello",
+                "MP3 Player",
+		US_SC_SCSI, US_PR_BULK, NULL,
+		US_FL_START_STOP),
+
 /* This entry is needed because the device reports Sub=ff */
-UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0440, 
+UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0450, 
 		"Sony",
-		"DSC-S30/S70/S75/505V/F505/F707/F717", 
+		"DSC-S30/S70/S75/505V/F505/F707/F717/P8", 
 		US_SC_SCSI, US_PR_CB, NULL,
 		US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
 
@@ -299,6 +315,19 @@
                 US_SC_8070, US_PR_CBI, NULL,
                 US_FL_FIX_INQUIRY ),
 
+/* This Pentax still camera is not conformant
+ * to the USB storage specification: -
+ * - It does not like the INQUIRY command. So we must handle this command
+ *   of the SCSI layer ourselves.
+ * Tested on Rev. 10.00 (0x1000)
+ * Submitted by James Courtier-Dutton <James@superbug.demon.co.uk>
+ */
+UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000,
+                "ASAHI PENTAX",
+                "PENTAX OPTIO 430",
+                US_SC_8070, US_PR_CBI, NULL,
+                US_FL_FIX_INQUIRY ),
+
 #ifdef CONFIG_USB_STORAGE_ISD200
 UNUSUAL_DEV(  0x05ab, 0x0031, 0x0100, 0x0110,
 		"In-System",
diff -urN linux-2.5.68-bk10/fs/Kconfig linux-2.5.68-bk11/fs/Kconfig
--- linux-2.5.68-bk10/fs/Kconfig	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/Kconfig	2003-05-01 04:40:39.000000000 -0700
@@ -135,7 +135,7 @@
 # CONFIG_JBD could be its own option (even modular), but until there are
 # other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
 # dep_tristate '  Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
-	bool
+	tristate
 	default EXT3_FS
 	help
 	  This is a generic journaling layer for block devices.  It is
diff -urN linux-2.5.68-bk10/fs/block_dev.c linux-2.5.68-bk11/fs/block_dev.c
--- linux-2.5.68-bk10/fs/block_dev.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/block_dev.c	2003-05-01 04:40:39.000000000 -0700
@@ -689,6 +689,15 @@
 	return generic_file_write_nolock(file, &local_iov, 1, ppos);
 }
 
+static ssize_t blkdev_file_aio_write(struct kiocb *iocb, const char *buf,
+				   size_t count, loff_t pos)
+{
+	struct iovec local_iov = { .iov_base = (void *)buf, .iov_len = count };
+
+	return generic_file_aio_write_nolock(iocb, &local_iov, 1, &iocb->ki_pos);
+}
+
+
 struct address_space_operations def_blk_aops = {
 	.readpage	= blkdev_readpage,
 	.writepage	= blkdev_writepage,
@@ -705,6 +714,8 @@
 	.llseek		= block_llseek,
 	.read		= generic_file_read,
 	.write		= blkdev_file_write,
+  	.aio_read	= generic_file_aio_read,
+  	.aio_write	= blkdev_file_aio_write, 
 	.mmap		= generic_file_mmap,
 	.fsync		= block_fsync,
 	.ioctl		= blkdev_ioctl,
diff -urN linux-2.5.68-bk10/fs/buffer.c linux-2.5.68-bk11/fs/buffer.c
--- linux-2.5.68-bk10/fs/buffer.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/buffer.c	2003-05-01 04:40:39.000000000 -0700
@@ -2019,7 +2019,7 @@
 	struct inode *inode = page->mapping->host;
 	sector_t iblock, lblock;
 	struct buffer_head *bh, *head, *arr[MAX_BUF_PER_PAGE];
-	unsigned int blocksize, blocks;
+	unsigned int blocksize;
 	int nr, i;
 	int fully_mapped = 1;
 
@@ -2032,7 +2032,6 @@
 		create_empty_buffers(page, blocksize, 0);
 	head = page_buffers(page);
 
-	blocks = PAGE_CACHE_SIZE >> inode->i_blkbits;
 	iblock = (sector_t)page->index << (PAGE_CACHE_SHIFT - inode->i_blkbits);
 	lblock = (inode->i_size+blocksize-1) >> inode->i_blkbits;
 	bh = head;
diff -urN linux-2.5.68-bk10/fs/compat.c linux-2.5.68-bk11/fs/compat.c
--- linux-2.5.68-bk10/fs/compat.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk11/fs/compat.c	2003-05-01 04:40:40.000000000 -0700
@@ -4,7 +4,11 @@
  *  Kernel compatibililty routines for e.g. 32 bit syscall support
  *  on 64 bit kernels.
  *
- *  Copyright (C) 2002 Stephen Rothwell, IBM Corporation
+ *  Copyright (C) 2002       Stephen Rothwell, IBM Corporation
+ *  Copyright (C) 1997-2000  Jakub Jelinek  (jakub@redhat.com)
+ *  Copyright (C) 1998       Eddie C. Dost  (ecd@skynet.be)
+ *  Copyright (C) 2001,2002  Andi Kleen, SuSE Labs 
+ *  Copyright (C) 2003       Pavel Machek (pavel@suse.cz)
  *
  *  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
@@ -20,6 +24,13 @@
 #include <linux/namei.h>
 #include <linux/file.h>
 #include <linux/vfs.h>
+#include <linux/ioctl32.h>
+#include <linux/init.h>
+#include <linux/sockios.h>	/* for SIOCDEVPRIVATE */
+#include <linux/fs.h>
+#include <linux/smp_lock.h>
+#include <linux/ctype.h>
+#include <linux/module.h>
 
 #include <asm/uaccess.h>
 
@@ -130,6 +141,217 @@
 	return error;
 }
 
+
+/* ioctl32 stuff, used by sparc64, parisc, s390x, ppc64, x86_64 */
+
+#define IOCTL_HASHSIZE 256
+struct ioctl_trans *ioctl32_hash_table[IOCTL_HASHSIZE];
+
+extern struct ioctl_trans ioctl_start[], ioctl_end[]; 
+
+static inline unsigned long ioctl32_hash(unsigned long cmd)
+{
+	return (((cmd >> 6) ^ (cmd >> 4) ^ cmd)) % IOCTL_HASHSIZE;
+}
+
+static void ioctl32_insert_translation(struct ioctl_trans *trans)
+{
+	unsigned long hash;
+	struct ioctl_trans *t;
+
+	hash = ioctl32_hash (trans->cmd);
+	if (!ioctl32_hash_table[hash])
+		ioctl32_hash_table[hash] = trans;
+	else {
+		t = ioctl32_hash_table[hash];
+		while (t->next)
+			t = t->next;
+		trans->next = 0;
+		t->next = trans;
+	}
+}
+
+static int __init init_sys32_ioctl(void)
+{
+	int i;
+
+	for (i = 0; &ioctl_start[i] < &ioctl_end[0]; i++) {
+		if (ioctl_start[i].next != 0) { 
+			printk("ioctl translation %d bad\n",i); 
+			return -1;
+		}
+
+		ioctl32_insert_translation(&ioctl_start[i]);
+	}
+	return 0;
+}
+
+__initcall(init_sys32_ioctl);
+
+static struct ioctl_trans *ioctl_free_list;
+
+/* Never free them really. This avoids SMP races. With a Read-Copy-Update
+   enabled kernel we could just use the RCU infrastructure for this. */
+static void free_ioctl(struct ioctl_trans *t) 
+{ 
+	t->cmd = 0; 
+	mb();
+	t->next = ioctl_free_list;
+	ioctl_free_list = t;
+} 
+
+int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *))
+{
+	struct ioctl_trans *t;
+	unsigned long hash = ioctl32_hash(cmd);
+
+	lock_kernel(); 
+	for (t = (struct ioctl_trans *)ioctl32_hash_table[hash];
+	     t;
+	     t = t->next) { 
+		if (t->cmd == cmd) {
+			printk("Trying to register duplicated ioctl32 handler %x\n", cmd);
+			unlock_kernel();
+			return -EINVAL; 
+		}
+	} 
+
+	if (ioctl_free_list) { 
+		t = ioctl_free_list; 
+		ioctl_free_list = t->next; 
+	} else { 
+		t = kmalloc(sizeof(struct ioctl_trans), GFP_KERNEL); 
+		if (!t) { 
+			unlock_kernel();
+			return -ENOMEM;
+		}
+	}
+	
+	t->next = NULL;
+	t->cmd = cmd;
+	t->handler = handler; 
+	ioctl32_insert_translation(t);
+
+	unlock_kernel();
+	return 0;
+}
+
+static inline int builtin_ioctl(struct ioctl_trans *t)
+{ 
+	return t >= (struct ioctl_trans *)ioctl_start &&
+	       t < (struct ioctl_trans *)ioctl_end; 
+} 
+
+/* Problem: 
+   This function cannot unregister duplicate ioctls, because they are not
+   unique.
+   When they happen we need to extend the prototype to pass the handler too. */
+
+int unregister_ioctl32_conversion(unsigned int cmd)
+{
+	unsigned long hash = ioctl32_hash(cmd);
+	struct ioctl_trans *t, *t1;
+
+	lock_kernel(); 
+
+	t = (struct ioctl_trans *)ioctl32_hash_table[hash];
+	if (!t) { 
+		unlock_kernel();
+		return -EINVAL;
+	} 
+
+	if (t->cmd == cmd) { 
+		if (builtin_ioctl(t)) {
+			printk("%p tried to unregister builtin ioctl %x\n",
+			       __builtin_return_address(0), cmd);
+		} else { 
+		ioctl32_hash_table[hash] = t->next;
+			free_ioctl(t); 
+			unlock_kernel();
+		return 0;
+		}
+	} 
+	while (t->next) {
+		t1 = (struct ioctl_trans *)(long)t->next;
+		if (t1->cmd == cmd) { 
+			if (builtin_ioctl(t1)) {
+				printk("%p tried to unregister builtin ioctl %x\n",
+				       __builtin_return_address(0), cmd);
+				goto out;
+			} else { 
+			t->next = t1->next;
+				free_ioctl(t1); 
+				unlock_kernel();
+			return 0;
+			}
+		}
+		t = t1;
+	}
+	printk(KERN_ERR "Trying to free unknown 32bit ioctl handler %x\n", cmd);
+ out:
+	unlock_kernel();
+	return -EINVAL;
+}
+
+EXPORT_SYMBOL(register_ioctl32_conversion); 
+EXPORT_SYMBOL(unregister_ioctl32_conversion); 
+
+asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+	struct file * filp;
+	int error = -EBADF;
+	int (*handler)(unsigned int, unsigned int, unsigned long, struct file * filp);
+	struct ioctl_trans *t;
+
+	filp = fget(fd);
+	if(!filp)
+		goto out2;
+
+	if (!filp->f_op || !filp->f_op->ioctl) {
+		error = sys_ioctl (fd, cmd, arg);
+		goto out;
+	}
+
+	t = (struct ioctl_trans *)ioctl32_hash_table [ioctl32_hash (cmd)];
+
+	while (t && t->cmd != cmd)
+		t = (struct ioctl_trans *)t->next;
+	if (t) {
+		handler = t->handler;
+		error = handler(fd, cmd, arg, filp);
+	} else if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
+		error = siocdevprivate_ioctl(fd, cmd, arg);
+	} else {
+		static int count;
+		if (++count <= 50) { 
+			char buf[10];
+			char *path = (char *)__get_free_page(GFP_KERNEL), *fn = "?"; 
+
+			/* find the name of the device. */
+			if (path) {
+		       		fn = d_path(filp->f_dentry, filp->f_vfsmnt, 
+					    path, PAGE_SIZE);
+			}
+
+			sprintf(buf,"'%c'", (cmd>>24) & 0x3f); 
+			if (!isprint(buf[1]))
+			    sprintf(buf, "%02x", buf[1]);
+			printk("ioctl32(%s:%d): Unknown cmd fd(%d) "
+			       "cmd(%08x){%s} arg(%08x) on %s\n",
+			       current->comm, current->pid,
+			       (int)fd, (unsigned int)cmd, buf, (unsigned int)arg,
+			       fn);
+			if (path) 
+				free_page((unsigned long)path); 
+		}
+		error = -EINVAL;
+	}
+out:
+	fput(filp);
+out2:
+	return error;
+}
+
 static int get_compat_flock(struct flock *kfl, struct compat_flock *ufl)
 {
 	if (!access_ok(VERIFY_READ, ufl, sizeof(*ufl)) ||
diff -urN linux-2.5.68-bk10/fs/ext3/super.c linux-2.5.68-bk11/fs/ext3/super.c
--- linux-2.5.68-bk10/fs/ext3/super.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/ext3/super.c	2003-05-01 04:40:40.000000000 -0700
@@ -978,12 +978,6 @@
 		return;
 	}
 
-	if (s_flags & MS_RDONLY) {
-		printk(KERN_INFO "EXT3-fs: %s: orphan cleanup on readonly fs\n",
-		       sb->s_id);
-		sb->s_flags &= ~MS_RDONLY;
-	}
-
 	if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
 		if (es->s_last_orphan)
 			jbd_debug(1, "Errors on filesystem, "
@@ -993,6 +987,12 @@
 		return;
 	}
 
+	if (s_flags & MS_RDONLY) {
+		printk(KERN_INFO "EXT3-fs: %s: orphan cleanup on readonly fs\n",
+		       sb->s_id);
+		sb->s_flags &= ~MS_RDONLY;
+	}
+
 	while (es->s_last_orphan) {
 		struct inode *inode;
 
diff -urN linux-2.5.68-bk10/fs/filesystems.c linux-2.5.68-bk11/fs/filesystems.c
--- linux-2.5.68-bk10/fs/filesystems.c	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk11/fs/filesystems.c	2003-05-01 04:40:40.000000000 -0700
@@ -32,17 +32,7 @@
 /* WARNING: This can be used only if we _already_ own a reference */
 void get_filesystem(struct file_system_type *fs)
 {
-	if (!try_module_get(fs->owner)) {
-#ifdef CONFIG_MODULE_UNLOAD
-		unsigned int cpu = get_cpu();
-		local_inc(&fs->owner->ref[cpu].count);
-		put_cpu();
-#else
-		/* Getting filesystem while it's starting up?  We're
-                   already supposed to have a reference. */
-		BUG();
-#endif
-	}
+	__module_get(fs->owner);
 }
 
 void put_filesystem(struct file_system_type *fs)
diff -urN linux-2.5.68-bk10/fs/ntfs/ChangeLog linux-2.5.68-bk11/fs/ntfs/ChangeLog
--- linux-2.5.68-bk10/fs/ntfs/ChangeLog	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/ChangeLog	2003-05-01 04:40:40.000000000 -0700
@@ -20,6 +20,31 @@
 	  sufficient for synchronisation here. We then just need to make sure
 	  ntfs_readpage/writepage/truncate interoperate properly with us.
 
+2.1.4 - Reduce compiler requirements.
+
+	- Remove all uses of unnamed structs and unions in the driver to make
+	  old and newer gcc versions happy. Makes it a bit uglier IMO but at
+	  least people will stop hassling me about it.
+
+2.1.3 - Important bug fixes in corner cases.
+
+	- super.c::parse_ntfs_boot_sector(): Correct the check for 64-bit
+	  clusters. (Philipp Thomas)
+	- attrib.c::load_attribute_list(): Fix bug when initialized_size is a
+	  multiple of the block_size but not the cluster size. (Szabolcs
+	  Szakacsits <szaka@sienet.hu>)
+
+2.1.2 - Important bug fixes aleviating the hangs in statfs.
+
+	- Fix buggy free cluster and free inode determination logic.
+
+2.1.1 - Minor updates.
+
+	- Add handling for initialized_size != data_size in compressed files.
+	- Reduce function local stack usage from 0x3d4 bytes to just noise in
+	  fs/ntfs/upcase.c. (Randy Dunlap <rddunlap@osdl.ord>)
+	- Remove compiler warnings for newer gcc.
+
 2.1.0 - First steps towards write support: implement file overwrite.
 
 	- Add configuration option for developmental write support with an
diff -urN linux-2.5.68-bk10/fs/ntfs/Makefile linux-2.5.68-bk11/fs/ntfs/Makefile
--- linux-2.5.68-bk10/fs/ntfs/Makefile	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/Makefile	2003-05-01 04:40:40.000000000 -0700
@@ -5,7 +5,7 @@
 ntfs-objs := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \
 	     mst.o namei.o super.o sysctl.o time.o unistr.o upcase.o
 
-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.0\"
+EXTRA_CFLAGS = -DNTFS_VERSION=\"2.1.4\"
 
 ifeq ($(CONFIG_NTFS_DEBUG),y)
 EXTRA_CFLAGS += -DDEBUG
diff -urN linux-2.5.68-bk10/fs/ntfs/aops.c linux-2.5.68-bk11/fs/ntfs/aops.c
--- linux-2.5.68-bk10/fs/ntfs/aops.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/aops.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * aops.c - NTFS kernel address space operations and page cache handling.
  * 	    Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (c) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -111,7 +111,7 @@
 		unsigned int i, recs, nr_err;
 		u32 rec_size;
 
-		rec_size = ni->_IDM(index_block_size);
+		rec_size = ni->itype.index.block_size;
 		recs = PAGE_CACHE_SIZE / rec_size;
 		addr = kmap_atomic(page, KM_BIO_SRC_IRQ);
 		for (i = nr_err = 0; i < recs; i++) {
@@ -124,7 +124,7 @@
 					ni->mft_no ? "index" : "mft",
 					(long long)(((s64)page->index <<
 					PAGE_CACHE_SHIFT >>
-					ni->_IDM(index_block_size_bits)) + i));
+					ni->itype.index.block_size_bits) + i));
 		}
 		flush_dcache_page(page);
 		kunmap_atomic(addr, KM_BIO_SRC_IRQ);
@@ -383,7 +383,7 @@
 	if (!NInoAttr(ni))
 		base_ni = ni;
 	else
-		base_ni = ni->_INE(base_ntfs_ino);
+		base_ni = ni->ext.base_ntfs_ino;
 
 	/* Map, pin, and lock the mft record. */
 	mrec = map_mft_record(base_ni);
@@ -406,7 +406,7 @@
 	attr_pos = page->index << PAGE_CACHE_SHIFT;
 
 	/* The total length of the attribute value. */
-	attr_len = le32_to_cpu(ctx->attr->_ARA(value_length));
+	attr_len = le32_to_cpu(ctx->attr->data.resident.value_length);
 
 	addr = kmap(page);
 	/* Copy over in bounds data, zeroing the remainder of the page. */
@@ -418,8 +418,8 @@
 			memset(addr + bytes, 0, PAGE_CACHE_SIZE - bytes);
 		/* Copy the data to the page. */
 		memcpy(addr, attr_pos + (char*)ctx->attr +
-				le16_to_cpu(ctx->attr->_ARA(value_offset)),
-				bytes);
+				le16_to_cpu(
+				ctx->attr->data.resident.value_offset), bytes);
 	} else
 		memset(addr, 0, PAGE_CACHE_SIZE);
 	flush_dcache_page(page);
@@ -892,7 +892,7 @@
 	if (!NInoAttr(ni))
 		base_ni = ni;
 	else
-		base_ni = ni->_INE(base_ntfs_ino);
+		base_ni = ni->ext.base_ntfs_ino;
 
 	/* Map, pin, and lock the mft record. */
 	m = map_mft_record(base_ni);
@@ -917,7 +917,7 @@
 	attr_pos = page->index << PAGE_CACHE_SHIFT;
 
 	/* The total length of the attribute value. */
-	attr_len = le32_to_cpu(ctx->attr->_ARA(value_length));
+	attr_len = le32_to_cpu(ctx->attr->data.resident.value_length);
 
 	if (unlikely(vi->i_size != attr_len)) {
 		ntfs_error(vi->i_sb, "BUG()! i_size (0x%Lx) doesn't match "
@@ -956,8 +956,9 @@
 
 	kaddr = kmap_atomic(page, KM_USER0);
 	/* Copy the data from the page to the mft record. */
-	memcpy((u8*)ctx->attr + le16_to_cpu(ctx->attr->_ARA(value_offset)) +
-			attr_pos, kaddr, bytes);
+	memcpy((u8*)ctx->attr + le16_to_cpu(
+			ctx->attr->data.resident.value_offset) + attr_pos,
+			kaddr, bytes);
 	flush_dcache_mft_record_page(ctx->ntfs_ino);
 #if 0
 	/* Zero out of bounds area. */
@@ -1656,7 +1657,7 @@
 	if (!NInoAttr(ni))
 		base_ni = ni;
 	else
-		base_ni = ni->_INE(base_ntfs_ino);
+		base_ni = ni->ext.base_ntfs_ino;
 
 	/* Map, pin, and lock the mft record. */
 	m = map_mft_record(base_ni);
@@ -1681,7 +1682,7 @@
 	attr_pos = page->index << PAGE_CACHE_SHIFT;
 
 	/* The total length of the attribute value. */
-	attr_len = le32_to_cpu(ctx->attr->_ARA(value_length));
+	attr_len = le32_to_cpu(ctx->attr->data.resident.value_length);
 
 	if (unlikely(vi->i_size != attr_len)) {
 		ntfs_error(vi->i_sb, "BUG()! i_size (0x%Lx) doesn't match "
@@ -1705,8 +1706,8 @@
 	 * Calculate the address of the attribute value corresponding to the
 	 * beginning of the current data @page.
 	 */
-	kattr = (u8*)ctx->attr + le16_to_cpu(ctx->attr->_ARA(value_offset)) +
-			attr_pos;
+	kattr = (u8*)ctx->attr + le16_to_cpu(
+			ctx->attr->data.resident.value_offset) + attr_pos;
 
 	kaddr = kmap_atomic(page, KM_USER0);
 
diff -urN linux-2.5.68-bk10/fs/ntfs/attrib.c linux-2.5.68-bk11/fs/ntfs/attrib.c
--- linux-2.5.68-bk10/fs/ntfs/attrib.c	2003-04-19 19:51:20.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/attrib.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,8 +1,8 @@
 /**
  * attrib.c - NTFS attribute operations. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (C) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -731,17 +731,18 @@
 
 #ifdef DEBUG
 	/* Make sure attr exists and is non-resident. */
-	if (!attr || !attr->non_resident ||
-			sle64_to_cpu(attr->_ANR(lowest_vcn)) < (VCN)0) {
+	if (!attr || !attr->non_resident || sle64_to_cpu(
+			attr->data.non_resident.lowest_vcn) < (VCN)0) {
 		ntfs_error(vol->sb, "Invalid arguments.");
 		return ERR_PTR(-EINVAL);
 	}
 #endif
 	/* Start at vcn = lowest_vcn and lcn 0. */
-	vcn = sle64_to_cpu(attr->_ANR(lowest_vcn));
+	vcn = sle64_to_cpu(attr->data.non_resident.lowest_vcn);
 	lcn = 0;
 	/* Get start of the mapping pairs array. */
-	buf = (u8*)attr + le16_to_cpu(attr->_ANR(mapping_pairs_offset));
+	buf = (u8*)attr + le16_to_cpu(
+			attr->data.non_resident.mapping_pairs_offset);
 	attr_end = (u8*)attr + le32_to_cpu(attr->length);
 	if (unlikely(buf < (u8*)attr || buf > attr_end)) {
 		ntfs_error(vol->sb, "Corrupt attribute.");
@@ -867,7 +868,7 @@
 	 * If there is a highest_vcn specified, it must be equal to the final
 	 * vcn in the run list - 1, or something has gone badly wrong.
 	 */
-	deltaxcn = sle64_to_cpu(attr->_ANR(highest_vcn));
+	deltaxcn = sle64_to_cpu(attr->data.non_resident.highest_vcn);
 	if (unlikely(deltaxcn && vcn - 1 != deltaxcn)) {
 mpa_err:
 		ntfs_error(vol->sb, "Corrupt mapping pairs array in "
@@ -875,10 +876,11 @@
 		goto err_out;
 	}
 	/* Setup not mapped run list element if this is the base extent. */
-	if (!attr->_ANR(lowest_vcn)) {
+	if (!attr->data.non_resident.lowest_vcn) {
 		VCN max_cluster;
 
-		max_cluster = (sle64_to_cpu(attr->_ANR(allocated_size)) +
+		max_cluster = (sle64_to_cpu(
+				attr->data.non_resident.allocated_size) +
 				vol->cluster_size - 1) >>
 				vol->cluster_size_bits;
 		/*
@@ -951,7 +953,7 @@
 	if (!NInoAttr(ni))
 		base_ni = ni;
 	else
-		base_ni = ni->_INE(base_ntfs_ino);
+		base_ni = ni->ext.base_ntfs_ino;
 
 	mrec = map_mft_record(base_ni);
 	if (IS_ERR(mrec))
@@ -1180,19 +1182,23 @@
 			return TRUE;
 		/* @val is present; compare values. */
 		else {
+			u32 vl;
 			register int rc;
-			
+
+			vl = le32_to_cpu(a->data.resident.value_length);
+			if (vl > val_len)
+				vl = val_len;
+
 			rc = memcmp(val, (u8*)a + le16_to_cpu(
-					a->_ARA(value_offset)), 
-				    	min_t(const u32, val_len,
-					le32_to_cpu(a->_ARA(value_length))));
+					a->data.resident.value_offset), vl);
 			/*
 			 * If @val collates before the current attribute's
 			 * value, there is no matching attribute.
 			 */
 			if (!rc) {
 				register u32 avl;
-				avl = le32_to_cpu(a->_ARA(value_length));
+				avl = le32_to_cpu(
+						a->data.resident.value_length);
 				if (val_len == avl)
 					return TRUE;
 				if (val_len < avl)
@@ -1235,11 +1241,9 @@
 	unsigned char block_size_bits = sb->s_blocksize_bits;
 
 	ntfs_debug("Entering.");
-#ifdef DEBUG
 	if (!vol || !run_list || !al || size <= 0 || initialized_size < 0 ||
 			initialized_size > size)
 		return -EINVAL;
-#endif
 	if (!initialized_size) {
 		memset(al, 0, size);
 		return 0;
@@ -1270,8 +1274,8 @@
 						"read attribute list.");
 				goto err_out;
 			}
-			if (al + block_size > al_end)
-				goto do_partial;
+			if (al + block_size >= al_end)
+				goto do_final;
 			memcpy(al, bh->b_data, block_size);
 			brelse(bh);
 			al += block_size;
@@ -1285,7 +1289,7 @@
 done:
 	up_read(&run_list->lock);
 	return err;
-do_partial:
+do_final:
 	if (al < al_end) {
 		/* Partial block. */
 		memcpy(al, bh->b_data, al_end - al);
@@ -1546,9 +1550,11 @@
 		 * If no @val specified or @val specified and it matches, we
 		 * have found it!
 		 */
-		if (!val || (!a->non_resident && le32_to_cpu(a->_ARA(value_length))
-				== val_len && !memcmp((u8*)a +
-				le16_to_cpu(a->_ARA(value_offset)), val, val_len))) {
+		if (!val || (!a->non_resident && le32_to_cpu(
+				a->data.resident.value_length) == val_len &&
+				!memcmp((u8*)a +
+				le16_to_cpu(a->data.resident.value_offset),
+				val, val_len))) {
 			ntfs_debug("Done, found.");
 			return TRUE;
 		}
diff -urN linux-2.5.68-bk10/fs/ntfs/attrib.h linux-2.5.68-bk11/fs/ntfs/attrib.h
--- linux-2.5.68-bk10/fs/ntfs/attrib.h	2003-04-19 19:49:13.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/attrib.h	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * attrib.h - Defines for attribute handling in NTFS Linux kernel driver.
  *	      Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (C) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -93,8 +93,8 @@
 static inline s64 attribute_value_length(const ATTR_RECORD *a)
 {
 	if (!a->non_resident)
-		return (s64)le32_to_cpu(a->_ARA(value_length));
-	return sle64_to_cpu(a->_ANR(data_size));
+		return (s64)le32_to_cpu(a->data.resident.value_length);
+	return sle64_to_cpu(a->data.non_resident.data_size);
 }
 
 extern void reinit_attr_search_ctx(attr_search_context *ctx);
diff -urN linux-2.5.68-bk10/fs/ntfs/compress.c linux-2.5.68-bk11/fs/ntfs/compress.c
--- linux-2.5.68-bk10/fs/ntfs/compress.c	2003-04-19 19:49:31.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/compress.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * compress.c - NTFS kernel compressed attributes handling.
  *		Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (C) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -44,7 +44,7 @@
 	 * The maximum compression block size is by definition 16 * the cluster
 	 * size, with the maximum supported cluster size being 4kiB. Thus the
 	 * maximum compression buffer size is 64kiB, so we use this when
-	 * initializing the per-CPU buffers.
+	 * initializing the compression buffer.
 	 */
 	NTFS_MAX_CB_SIZE	= 64 * 1024,
 } ntfs_compression_constants;
@@ -89,6 +89,40 @@
 }
 
 /**
+ * zero_partial_compressed_page - zero out of bounds compressed page region
+ */
+static void zero_partial_compressed_page(ntfs_inode *ni, struct page *page)
+{
+	u8 *kp = page_address(page);
+	unsigned int kp_ofs;
+
+	ntfs_debug("Zeroing page region outside initialized size.");
+	if (((s64)page->index << PAGE_CACHE_SHIFT) >= ni->initialized_size) {
+		/*
+		 * FIXME: Using clear_page() will become wrong when we get
+		 * PAGE_CACHE_SIZE != PAGE_SIZE but for now there is no problem.
+		 */
+		clear_page(kp);
+		return;
+	}
+	kp_ofs = ni->initialized_size & ~PAGE_CACHE_MASK;
+	memset(kp + kp_ofs, 0, PAGE_CACHE_SIZE - kp_ofs);
+	return;
+}
+
+/**
+ * handle_bounds_compressed_page - test for&handle out of bounds compressed page
+ */
+static inline void handle_bounds_compressed_page(ntfs_inode *ni,
+		struct page *page)
+{
+	if ((page->index >= (ni->initialized_size >> PAGE_CACHE_SHIFT)) &&
+			(ni->initialized_size < VFS_I(ni)->i_size))
+		zero_partial_compressed_page(ni, page);
+	return;
+}
+
+/**
  * ntfs_decompress - decompress a compression block into an array of pages
  * @dest_pages:		destination array of pages
  * @dest_index:		current index into @dest_pages (IN/OUT)
@@ -164,7 +198,7 @@
 			cb - cb_start);
 
 	/* Have we reached the end of the compression block? */
-	if (cb == cb_end || !le16_to_cpup(cb)) {
+	if (cb == cb_end || !le16_to_cpup((u16*)cb)) {
 		int i;
 
 		ntfs_debug("Completed. Returning success (0).");
@@ -173,19 +207,29 @@
 		/* We can sleep from now on, so we drop lock. */
 		spin_unlock(&ntfs_cb_lock);
 		/* Second stage: finalize completed pages. */
-		for (i = 0; i < nr_completed_pages; i++) {
-			int di = completed_pages[i];
+		if (nr_completed_pages > 0) {
+			struct page *page = dest_pages[completed_pages[0]];
+			ntfs_inode *ni = NTFS_I(page->mapping->host);
 
-			dp = dest_pages[di];
-			flush_dcache_page(dp);
-			kunmap(dp);
-			SetPageUptodate(dp);
-			unlock_page(dp);
-			if (di == xpage)
-				*xpage_done = 1;
-			else
-				page_cache_release(dp);
-			dest_pages[di] = NULL;
+			for (i = 0; i < nr_completed_pages; i++) {
+				int di = completed_pages[i];
+
+				dp = dest_pages[di];
+				/*
+				 * If we are outside the initialized size, zero
+				 * the out of bounds page range.
+				 */
+				handle_bounds_compressed_page(ni, dp);
+				flush_dcache_page(dp);
+				kunmap(dp);
+				SetPageUptodate(dp);
+				unlock_page(dp);
+				if (di == xpage)
+					*xpage_done = 1;
+				else
+					page_cache_release(dp);
+				dest_pages[di] = NULL;
+			}
 		}
 		return err;
 	}
@@ -204,7 +248,8 @@
 
 	/* Setup the current sub-block source pointers and validate range. */
 	cb_sb_start = cb;
-	cb_sb_end = cb_sb_start + (le16_to_cpup(cb) & NTFS_SB_SIZE_MASK) + 3;
+	cb_sb_end = cb_sb_start + (le16_to_cpup((u16*)cb) & NTFS_SB_SIZE_MASK)
+			+ 3;
 	if (cb_sb_end > cb_end)
 		goto return_overflow;
 
@@ -225,7 +270,7 @@
 	dp_addr = (u8*)page_address(dp) + do_sb_start;
 
 	/* Now, we are ready to process the current sub-block (sb). */
-	if (!(le16_to_cpup(cb) & NTFS_SB_IS_COMPRESSED)) {
+	if (!(le16_to_cpup((u16*)cb) & NTFS_SB_IS_COMPRESSED)) {
 		ntfs_debug("Found uncompressed sub-block.");
 		/* This sb is not compressed, just copy it into destination. */
 
@@ -330,7 +375,7 @@
 			lg++;
 
 		/* Get the phrase token into i. */
-		pt = le16_to_cpup(cb);
+		pt = le16_to_cpup((u16*)cb);
 
 		/*
 		 * Calculate starting position of the byte sequence in
@@ -432,7 +477,7 @@
 	u8 *cb, *cb_pos, *cb_end;
 	struct buffer_head **bhs;
 	unsigned long offset, index = page->index;
-	u32 cb_size = ni->_ICF(compression_block_size);
+	u32 cb_size = ni->itype.compressed.block_size;
 	u64 cb_size_mask = cb_size - 1UL;
 	VCN vcn;
 	LCN lcn;
@@ -447,7 +492,7 @@
 			& ~cb_size_mask) >> vol->cluster_size_bits;
 	/* Number of compression blocks (cbs) in the wanted vcn range. */
 	unsigned int nr_cbs = (end_vcn - start_vcn) << vol->cluster_size_bits
-			>> ni->_ICF(compression_block_size_bits);
+			>> ni->itype.compressed.block_size_bits;
 	/*
 	 * Number of pages required to store the uncompressed data from all
 	 * compression blocks (cbs) overlapping @page. Due to alignment
@@ -528,7 +573,7 @@
 	 */
 	cur_page = 0;
 	cur_ofs = 0;
-	cb_clusters = ni->_ICF(compression_block_clusters);
+	cb_clusters = ni->itype.compressed.block_clusters;
 do_next_cb:
 	nr_cbs--;
 	nr_bhs = 0;
@@ -763,6 +808,11 @@
 		for (; cur2_page < cb_max_page; cur2_page++) {
 			page = pages[cur2_page];
 			if (page) {
+				/*
+				 * If we are outside the initialized size, zero
+				 * the out of bounds page range.
+				 */
+				handle_bounds_compressed_page(ni, page);
 				flush_dcache_page(page);
 				kunmap(page);
 				SetPageUptodate(page);
diff -urN linux-2.5.68-bk10/fs/ntfs/dir.c linux-2.5.68-bk11/fs/ntfs/dir.c
--- linux-2.5.68-bk10/fs/ntfs/dir.c	2003-04-19 19:48:58.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/dir.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,8 +1,8 @@
 /**
  * dir.c - NTFS kernel directory operations. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (c) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -105,7 +105,7 @@
 	}
 	/* Get to the index root value (it's been verified in read_inode). */
 	ir = (INDEX_ROOT*)((u8*)ctx->attr +
-			le16_to_cpu(ctx->attr->_ARA(value_offset)));
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
 	index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
 	/* The first index entry. */
 	ie = (INDEX_ENTRY*)((u8*)&ir->index +
@@ -114,18 +114,18 @@
 	 * Loop until we exceed valid memory (corruption case) or until we
 	 * reach the last entry.
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		/* Bounds checks. */
 		if ((u8*)ie < (u8*)ctx->mrec || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end)
 			goto dir_err_out;
 		/*
 		 * The last entry cannot contain a name. It can however contain
 		 * a pointer to a child node in the B+tree so we just break out.
 		 */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/*
 		 * We perform a case sensitive comparison and if that matches
@@ -159,7 +159,7 @@
 					}
 				}
 				name->mref = le64_to_cpu(
-						ie->_IIF(indexed_file));
+						ie->data.dir.indexed_file);
 				name->type = FILE_NAME_DOS;
 				name->len = 0;
 				*res = name;
@@ -168,7 +168,7 @@
 					kfree(name);
 				*res = NULL;
 			}
-			mref = le64_to_cpu(ie->_IIF(indexed_file));
+			mref = le64_to_cpu(ie->data.dir.indexed_file);
 			put_attr_search_ctx(ctx);
 			unmap_mft_record(dir_ni);
 			return mref;
@@ -211,7 +211,7 @@
 				err = -ENOMEM;
 				goto err_out;
 			}
-			name->mref = le64_to_cpu(ie->_IIF(indexed_file));
+			name->mref = le64_to_cpu(ie->data.dir.indexed_file);
 			name->type = type;
 			if (type != FILE_NAME_DOS) {
 				name->len = len;
@@ -265,7 +265,7 @@
 	 * we have got a matching name cached in name in which case return the
 	 * mft reference associated with it.
 	 */
-	if (!(ie->_IEH(flags) & INDEX_ENTRY_NODE)) {
+	if (!(ie->flags & INDEX_ENTRY_NODE)) {
 		if (name) {
 			put_attr_search_ctx(ctx);
 			unmap_mft_record(dir_ni);
@@ -284,7 +284,7 @@
 		goto err_out;
 	}
 	/* Get the starting vcn of the index_block holding the child node. */
-	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->_IEH(length)) - 8);
+	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
 	ia_mapping = VFS_I(dir_ni)->i_mapping;
 	/*
 	 * We are done with the index root and the mft record. Release them,
@@ -301,7 +301,7 @@
 	 * disk if necessary.
 	 */
 	page = ntfs_map_page(ia_mapping, vcn <<
-			dir_ni->_IDM(index_vcn_size_bits) >> PAGE_CACHE_SHIFT);
+			dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
 	if (IS_ERR(page)) {
 		ntfs_error(sb, "Failed to map directory index page, error %ld.",
 				-PTR_ERR(page));
@@ -312,7 +312,7 @@
 fast_descend_into_child_node:
 	/* Get to the index allocation block. */
 	ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
-			dir_ni->_IDM(index_vcn_size_bits)) & ~PAGE_CACHE_MASK));
+			dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
 	/* Bounds checks. */
 	if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) {
 		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
@@ -331,18 +331,18 @@
 		goto unm_err_out;
 	}
 	if (le32_to_cpu(ia->index.allocated_size) + 0x18 !=
-			dir_ni->_IDM(index_block_size)) {
+			dir_ni->itype.index.block_size) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx has a size (%u) differing from the "
 				"directory specified size (%u). Directory "
 				"inode is corrupt or driver bug.",
 				(long long)vcn, dir_ni->mft_no,
 				le32_to_cpu(ia->index.allocated_size) + 0x18,
-				dir_ni->_IDM(index_block_size));
+				dir_ni->itype.index.block_size);
 		err = -EIO;
 		goto unm_err_out;
 	}
-	index_end = (u8*)ia + dir_ni->_IDM(index_block_size);
+	index_end = (u8*)ia + dir_ni->itype.index.block_size;
 	if (index_end > kaddr + PAGE_CACHE_SIZE) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx crosses page boundary. Impossible! "
@@ -352,7 +352,7 @@
 		goto unm_err_out;
 	}
 	index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
-	if (index_end > (u8*)ia + dir_ni->_IDM(index_block_size)) {
+	if (index_end > (u8*)ia + dir_ni->itype.index.block_size) {
 		ntfs_error(sb, "Size of index buffer (VCN 0x%Lx) of directory "
 				"inode 0x%lx exceeds maximum size.",
 				(long long)vcn, dir_ni->mft_no);
@@ -367,11 +367,11 @@
 	 * loop until we exceed valid memory (corruption case) or until we
 	 * reach the last entry.
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		/* Bounds check. */
 		if ((u8*)ie < (u8*)ia || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end) {
 			ntfs_error(sb, "Index entry out of bounds in "
 					"directory inode 0x%lx.",
@@ -383,7 +383,7 @@
 		 * The last entry cannot contain a name. It can however contain
 		 * a pointer to a child node in the B+tree so we just break out.
 		 */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/*
 		 * We perform a case sensitive comparison and if that matches
@@ -417,7 +417,7 @@
 					}
 				}
 				name->mref = le64_to_cpu(
-						ie->_IIF(indexed_file));
+						ie->data.dir.indexed_file);
 				name->type = FILE_NAME_DOS;
 				name->len = 0;
 				*res = name;
@@ -426,7 +426,7 @@
 					kfree(name);
 				*res = NULL;
 			}
-			mref = le64_to_cpu(ie->_IIF(indexed_file));
+			mref = le64_to_cpu(ie->data.dir.indexed_file);
 			ntfs_unmap_page(page);
 			return mref;
 		}
@@ -469,7 +469,7 @@
 				err = -ENOMEM;
 				goto unm_err_out;
 			}
-			name->mref = le64_to_cpu(ie->_IIF(indexed_file));
+			name->mref = le64_to_cpu(ie->data.dir.indexed_file);
 			name->type = type;
 			if (type != FILE_NAME_DOS) {
 				name->len = len;
@@ -521,7 +521,7 @@
 	 * We have finished with this index buffer without success. Check for
 	 * the presence of a child node.
 	 */
-	if (ie->_IEH(flags) & INDEX_ENTRY_NODE) {
+	if (ie->flags & INDEX_ENTRY_NODE) {
 		if ((ia->index.flags & NODE_MASK) == LEAF_NODE) {
 			ntfs_error(sb, "Index entry with child node found in "
 					"a leaf node in directory inode 0x%lx.",
@@ -531,8 +531,7 @@
 		}
 		/* Child node present, descend into it. */
 		old_vcn = vcn;
-		vcn = sle64_to_cpup((u8*)ie +
-				le16_to_cpu(ie->_IEH(length)) - 8);
+		vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
 		if (vcn >= 0) {
 			/* If vcn is in the same page cache page as old_vcn we
 			 * recycle the mapped page. */
@@ -646,7 +645,7 @@
 	}
 	/* Get to the index root value (it's been verified in read_inode). */
 	ir = (INDEX_ROOT*)((u8*)ctx->attr +
-			le16_to_cpu(ctx->attr->_ARA(value_offset)));
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
 	index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
 	/* The first index entry. */
 	ie = (INDEX_ENTRY*)((u8*)&ir->index +
@@ -655,18 +654,18 @@
 	 * Loop until we exceed valid memory (corruption case) or until we
 	 * reach the last entry.
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		/* Bounds checks. */
 		if ((u8*)ie < (u8*)ctx->mrec || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end)
 			goto dir_err_out;
 		/*
 		 * The last entry cannot contain a name. It can however contain
 		 * a pointer to a child node in the B+tree so we just break out.
 		 */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/*
 		 * If the current entry has a name type of POSIX, the name is
@@ -691,7 +690,7 @@
 				ie->key.file_name.file_name_length, ic,
 				vol->upcase, vol->upcase_len)) {
 found_it:
-			mref = le64_to_cpu(ie->_IIF(indexed_file));
+			mref = le64_to_cpu(ie->data.dir.indexed_file);
 			put_attr_search_ctx(ctx);
 			unmap_mft_record(dir_ni);
 			return mref;
@@ -738,7 +737,7 @@
 	 * We have finished with this index without success. Check for the
 	 * presence of a child node.
 	 */
-	if (!(ie->_IEH(flags) & INDEX_ENTRY_NODE)) {
+	if (!(ie->flags & INDEX_ENTRY_NODE)) {
 		/* No child node, return -ENOENT. */
 		err = -ENOENT;
 		goto err_out;
@@ -752,7 +751,7 @@
 		goto err_out;
 	}
 	/* Get the starting vcn of the index_block holding the child node. */
-	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->_IEH(length)) - 8);
+	vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
 	ia_mapping = VFS_I(dir_ni)->i_mapping;
 	/*
 	 * We are done with the index root and the mft record. Release them,
@@ -769,7 +768,7 @@
 	 * disk if necessary.
 	 */
 	page = ntfs_map_page(ia_mapping, vcn <<
-			dir_ni->_IDM(index_vcn_size_bits) >> PAGE_CACHE_SHIFT);
+			dir_ni->itype.index.vcn_size_bits >> PAGE_CACHE_SHIFT);
 	if (IS_ERR(page)) {
 		ntfs_error(sb, "Failed to map directory index page, error %ld.",
 				-PTR_ERR(page));
@@ -780,7 +779,7 @@
 fast_descend_into_child_node:
 	/* Get to the index allocation block. */
 	ia = (INDEX_ALLOCATION*)(kaddr + ((vcn <<
-			dir_ni->_IDM(index_vcn_size_bits)) & ~PAGE_CACHE_MASK));
+			dir_ni->itype.index.vcn_size_bits) & ~PAGE_CACHE_MASK));
 	/* Bounds checks. */
 	if ((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE) {
 		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
@@ -799,18 +798,18 @@
 		goto unm_err_out;
 	}
 	if (le32_to_cpu(ia->index.allocated_size) + 0x18 !=
-			dir_ni->_IDM(index_block_size)) {
+			dir_ni->itype.index.block_size) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx has a size (%u) differing from the "
 				"directory specified size (%u). Directory "
 				"inode is corrupt or driver bug.",
 				(long long)vcn, dir_ni->mft_no,
 				le32_to_cpu(ia->index.allocated_size) + 0x18,
-				dir_ni->_IDM(index_block_size));
+				dir_ni->itype.index.block_size);
 		err = -EIO;
 		goto unm_err_out;
 	}
-	index_end = (u8*)ia + dir_ni->_IDM(index_block_size);
+	index_end = (u8*)ia + dir_ni->itype.index.block_size;
 	if (index_end > kaddr + PAGE_CACHE_SIZE) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx crosses page boundary. Impossible! "
@@ -820,7 +819,7 @@
 		goto unm_err_out;
 	}
 	index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
-	if (index_end > (u8*)ia + dir_ni->_IDM(index_block_size)) {
+	if (index_end > (u8*)ia + dir_ni->itype.index.block_size) {
 		ntfs_error(sb, "Size of index buffer (VCN 0x%Lx) of directory "
 				"inode 0x%lx exceeds maximum size.",
 				(long long)vcn, dir_ni->mft_no);
@@ -835,11 +834,11 @@
 	 * loop until we exceed valid memory (corruption case) or until we
 	 * reach the last entry.
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		/* Bounds check. */
 		if ((u8*)ie < (u8*)ia || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end) {
 			ntfs_error(sb, "Index entry out of bounds in "
 					"directory inode 0x%lx.",
@@ -851,7 +850,7 @@
 		 * The last entry cannot contain a name. It can however contain
 		 * a pointer to a child node in the B+tree so we just break out.
 		 */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/*
 		 * If the current entry has a name type of POSIX, the name is
@@ -876,7 +875,7 @@
 				ie->key.file_name.file_name_length, ic,
 				vol->upcase, vol->upcase_len)) {
 found_it2:
-			mref = le64_to_cpu(ie->_IIF(indexed_file));
+			mref = le64_to_cpu(ie->data.dir.indexed_file);
 			ntfs_unmap_page(page);
 			return mref;
 		}
@@ -922,7 +921,7 @@
 	 * We have finished with this index buffer without success. Check for
 	 * the presence of a child node.
 	 */
-	if (ie->_IEH(flags) & INDEX_ENTRY_NODE) {
+	if (ie->flags & INDEX_ENTRY_NODE) {
 		if ((ia->index.flags & NODE_MASK) == LEAF_NODE) {
 			ntfs_error(sb, "Index entry with child node found in "
 					"a leaf node in directory inode 0x%lx.",
@@ -932,8 +931,7 @@
 		}
 		/* Child node present, descend into it. */
 		old_vcn = vcn;
-		vcn = sle64_to_cpup((u8*)ie +
-				le16_to_cpu(ie->_IEH(length)) - 8);
+		vcn = sle64_to_cpup((u8*)ie + le16_to_cpu(ie->length) - 8);
 		if (vcn >= 0) {
 			/* If vcn is in the same page cache page as old_vcn we
 			 * recycle the mapped page. */
@@ -1007,7 +1005,7 @@
 	if (index_type == INDEX_TYPE_ALLOCATION)
 		*fpos = (u8*)ie - (u8*)iu.ia +
 				(sle64_to_cpu(iu.ia->index_block_vcn) <<
-				ndir->_IDM(index_vcn_size_bits)) +
+				ndir->itype.index.vcn_size_bits) +
 				vol->mft_record_size;
 	else /* if (index_type == INDEX_TYPE_ROOT) */
 		*fpos = (u8*)ie - (u8*)iu.ir;
@@ -1016,11 +1014,11 @@
 		ntfs_debug("Skipping DOS name space entry.");
 		return 0;
 	}
-	if (MREF_LE(ie->_IIF(indexed_file)) == FILE_root) {
+	if (MREF_LE(ie->data.dir.indexed_file) == FILE_root) {
 		ntfs_debug("Skipping root directory self reference entry.");
 		return 0;
 	}
-	if (MREF_LE(ie->_IIF(indexed_file)) < FILE_first_user &&
+	if (MREF_LE(ie->data.dir.indexed_file) < FILE_first_user &&
 			!NVolShowSystemFiles(vol)) {
 		ntfs_debug("Skipping system file.");
 		return 0;
@@ -1039,10 +1037,10 @@
 		dt_type = DT_REG;
 	ntfs_debug("Calling filldir for %s with len %i, fpos 0x%Lx, inode "
 			"0x%lx, DT_%s.", name, name_len, *fpos,
-			MREF_LE(ie->_IIF(indexed_file)),
+			MREF_LE(ie->data.dir.indexed_file),
 			dt_type == DT_DIR ? "DIR" : "REG");
 	return filldir(dirent, name, name_len, *fpos,
-			MREF_LE(ie->_IIF(indexed_file)), dt_type);
+			MREF_LE(ie->data.dir.indexed_file), dt_type);
 }
 
 /*
@@ -1139,7 +1137,7 @@
 	}
 	/* Get to the index root value (it's been verified in read_inode). */
 	ir = (INDEX_ROOT*)((u8*)ctx->attr +
-			le16_to_cpu(ctx->attr->_ARA(value_offset)));
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
 	index_end = (u8*)&ir->index + le32_to_cpu(ir->index.index_length);
 	/* The first index entry. */
 	ie = (INDEX_ENTRY*)((u8*)&ir->index +
@@ -1149,16 +1147,16 @@
 	 * reach the last entry or until filldir tells us it has had enough
 	 * or signals an error (both covered by the rc test).
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		ntfs_debug("In index root, offset 0x%x.", (u8*)ie - (u8*)ir);
 		/* Bounds checks. */
 		if (unlikely((u8*)ie < (u8*)ctx->mrec || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end))
 			goto err_out;
 		/* The last entry cannot contain a name. */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/* Skip index root entry if continuing previous readdir. */
 		if (ir_pos > (u8*)ie - (u8*)ir)
@@ -1192,7 +1190,7 @@
 	/* Get the offset into the index allocation attribute. */
 	ia_pos = (s64)fpos - vol->mft_record_size;
 	ia_mapping = vdir->i_mapping;
-	bmp_vi = ndir->_IDM(bmp_ino);
+	bmp_vi = ndir->itype.index.bmp_ino;
 	if (unlikely(!bmp_vi)) {
 		ntfs_debug("Inode %lu, regetting index bitmap.", vdir->i_ino);
 		bmp_vi = ntfs_attr_iget(vdir, AT_BITMAP, I30, 4);
@@ -1201,11 +1199,11 @@
 			err = PTR_ERR(bmp_vi);
 			goto err_out;
 		}
-		ndir->_IDM(bmp_ino) = bmp_vi;
+		ndir->itype.index.bmp_ino = bmp_vi;
 	}
 	bmp_mapping = bmp_vi->i_mapping;
 	/* Get the starting bitmap bit position and sanity check it. */
-	bmp_pos = ia_pos >> ndir->_IDM(index_block_size_bits);
+	bmp_pos = ia_pos >> ndir->itype.index.block_size_bits;
 	if (unlikely(bmp_pos >> 3 >= bmp_vi->i_size)) {
 		ntfs_error(sb, "Current index allocation position exceeds "
 				"index bitmap size.");
@@ -1245,7 +1243,7 @@
 		if (unlikely(((bmp_pos + cur_bmp_pos) >> 3) >= vdir->i_size))
 			goto unm_EOD;
 		ia_pos = (bmp_pos + cur_bmp_pos) <<
-				ndir->_IDM(index_block_size_bits);
+				ndir->itype.index.block_size_bits;
 	}
 	ntfs_debug("Handling index buffer 0x%Lx.",
 			(long long)bmp_pos + cur_bmp_pos);
@@ -1269,7 +1267,7 @@
 	}
 	/* Get the current index buffer. */
 	ia = (INDEX_ALLOCATION*)(kaddr + (ia_pos & ~PAGE_CACHE_MASK &
-			~(s64)(ndir->_IDM(index_block_size) - 1)));
+			~(s64)(ndir->itype.index.block_size - 1)));
 	/* Bounds checks. */
 	if (unlikely((u8*)ia < kaddr || (u8*)ia > kaddr + PAGE_CACHE_SIZE)) {
 		ntfs_error(sb, "Out of bounds check failed. Corrupt directory "
@@ -1277,45 +1275,45 @@
 		goto err_out;
 	}
 	if (unlikely(sle64_to_cpu(ia->index_block_vcn) != (ia_pos &
-			~(s64)(ndir->_IDM(index_block_size) - 1)) >>
-			ndir->_IDM(index_vcn_size_bits))) {
+			~(s64)(ndir->itype.index.block_size - 1)) >>
+			ndir->itype.index.vcn_size_bits)) {
 		ntfs_error(sb, "Actual VCN (0x%Lx) of index buffer is "
 				"different from expected VCN (0x%Lx). "
 				"Directory inode 0x%lx is corrupt or driver "
 				"bug. ",
 				(long long)sle64_to_cpu(ia->index_block_vcn),
 				(long long)ia_pos >>
-				ndir->_IDM(index_vcn_size_bits), vdir->i_ino);
+				ndir->itype.index.vcn_size_bits, vdir->i_ino);
 		goto err_out;
 	}
 	if (unlikely(le32_to_cpu(ia->index.allocated_size) + 0x18 !=
-			ndir->_IDM(index_block_size))) {
+			ndir->itype.index.block_size)) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx has a size (%u) differing from the "
 				"directory specified size (%u). Directory "
 				"inode is corrupt or driver bug.",
 				(long long)ia_pos >>
-				ndir->_IDM(index_vcn_size_bits), vdir->i_ino,
+				ndir->itype.index.vcn_size_bits, vdir->i_ino,
 				le32_to_cpu(ia->index.allocated_size) + 0x18,
-				ndir->_IDM(index_block_size));
+				ndir->itype.index.block_size);
 		goto err_out;
 	}
-	index_end = (u8*)ia + ndir->_IDM(index_block_size);
+	index_end = (u8*)ia + ndir->itype.index.block_size;
 	if (unlikely(index_end > kaddr + PAGE_CACHE_SIZE)) {
 		ntfs_error(sb, "Index buffer (VCN 0x%Lx) of directory inode "
 				"0x%lx crosses page boundary. Impossible! "
 				"Cannot access! This is probably a bug in the "
 				"driver.", (long long)ia_pos >>
-				ndir->_IDM(index_vcn_size_bits), vdir->i_ino);
+				ndir->itype.index.vcn_size_bits, vdir->i_ino);
 		goto err_out;
 	}
-	ia_start = ia_pos & ~(s64)(ndir->_IDM(index_block_size) - 1);
+	ia_start = ia_pos & ~(s64)(ndir->itype.index.block_size - 1);
 	index_end = (u8*)&ia->index + le32_to_cpu(ia->index.index_length);
-	if (unlikely(index_end > (u8*)ia + ndir->_IDM(index_block_size))) {
+	if (unlikely(index_end > (u8*)ia + ndir->itype.index.block_size)) {
 		ntfs_error(sb, "Size of index buffer (VCN 0x%Lx) of directory "
 				"inode 0x%lx exceeds maximum size.",
 				(long long)ia_pos >>
-				ndir->_IDM(index_vcn_size_bits), vdir->i_ino);
+				ndir->itype.index.vcn_size_bits, vdir->i_ino);
 		goto err_out;
 	}
 	/* The first index entry in this index buffer. */
@@ -1326,17 +1324,17 @@
 	 * reach the last entry or until filldir tells us it has had enough
 	 * or signals an error (both covered by the rc test).
 	 */
-	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->_IEH(length)))) {
+	for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) {
 		ntfs_debug("In index allocation, offset 0x%Lx.",
 				(long long)ia_start + ((u8*)ie - (u8*)ia));
 		/* Bounds checks. */
 		if (unlikely((u8*)ie < (u8*)ia || (u8*)ie +
 				sizeof(INDEX_ENTRY_HEADER) > index_end ||
-				(u8*)ie + le16_to_cpu(ie->_IEH(key_length)) >
+				(u8*)ie + le16_to_cpu(ie->key_length) >
 				index_end))
 			goto err_out;
 		/* The last entry cannot contain a name. */
-		if (ie->_IEH(flags) & INDEX_ENTRY_END)
+		if (ie->flags & INDEX_ENTRY_END)
 			break;
 		/* Skip index block entry if continuing previous readdir. */
 		if (ia_pos - ia_start > (u8*)ie - (u8*)ia)
diff -urN linux-2.5.68-bk10/fs/ntfs/inode.c linux-2.5.68-bk11/fs/ntfs/inode.c
--- linux-2.5.68-bk10/fs/ntfs/inode.c	2003-04-19 19:50:49.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/inode.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,7 +1,7 @@
 /**
  * inode.c - NTFS kernel inode handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -336,14 +336,14 @@
 	ni->attr_list_size = 0;
 	ni->attr_list = NULL;
 	init_run_list(&ni->attr_list_rl);
-	ni->_IDM(bmp_ino) = NULL;
-	ni->_IDM(index_block_size) = 0;
-	ni->_IDM(index_vcn_size) = 0;
-	ni->_IDM(index_block_size_bits) = 0;
-	ni->_IDM(index_vcn_size_bits) = 0;
+	ni->itype.index.bmp_ino = NULL;
+	ni->itype.index.block_size = 0;
+	ni->itype.index.vcn_size = 0;
+	ni->itype.index.block_size_bits = 0;
+	ni->itype.index.vcn_size_bits = 0;
 	init_MUTEX(&ni->extent_lock);
 	ni->nr_extents = 0;
-	ni->_INE(base_ntfs_ino) = NULL;
+	ni->ext.base_ntfs_ino = NULL;
 	return;
 }
 
@@ -426,14 +426,14 @@
 					"chkdsk.");
 			return -EIO;
 		}
-		if (!(attr->_ARA(resident_flags) & RESIDENT_ATTR_IS_INDEXED)) {
+		if (!(attr->data.resident.flags & RESIDENT_ATTR_IS_INDEXED)) {
 			ntfs_error(ctx->ntfs_ino->vol->sb, "Unindexed file "
 					"name. You should run chkdsk.");
 			return -EIO;
 		}
 		file_name_attr = (FILE_NAME_ATTR*)((u8*)attr +
-				le16_to_cpu(attr->_ARA(value_offset)));
-		p2 = (u8*)attr + le32_to_cpu(attr->_ARA(value_length));
+				le16_to_cpu(attr->data.resident.value_offset));
+		p2 = (u8*)attr + le32_to_cpu(attr->data.resident.value_length);
 		if (p2 < (u8*)attr || p2 > p)
 			goto err_corrupt_attr;
 		/* This attribute is ok, but is it in the $Extend directory? */
@@ -578,7 +578,7 @@
 	}
 	/* Get the standard information attribute value. */
 	si = (STANDARD_INFORMATION*)((char*)ctx->attr +
-			le16_to_cpu(ctx->attr->_ARA(value_offset)));
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
 
 	/* Transfer information from the standard information into vfs_ino. */
 	/*
@@ -633,7 +633,7 @@
 		}
 		if (ctx->attr->non_resident) {
 			NInoSetAttrListNonResident(ni);
-			if (ctx->attr->_ANR(lowest_vcn)) {
+			if (ctx->attr->data.non_resident.lowest_vcn) {
 				ntfs_error(vi->i_sb, "Attribute list has non "
 						"zero lowest_vcn. Inode is "
 						"corrupt. You should run "
@@ -659,17 +659,17 @@
 			/* Now load the attribute list. */
 			if ((err = load_attribute_list(vol, &ni->attr_list_rl,
 					ni->attr_list, ni->attr_list_size,
-					sle64_to_cpu(
-					ctx->attr->_ANR(initialized_size))))) {
+					sle64_to_cpu(ctx->attr->data.
+					non_resident.initialized_size)))) {
 				ntfs_error(vi->i_sb, "Failed to load "
 						"attribute list attribute.");
 				goto unm_err_out;
 			}
 		} else /* if (!ctx.attr->non_resident) */ {
 			if ((u8*)ctx->attr + le16_to_cpu(
-					ctx->attr->_ARA(value_offset)) +
+					ctx->attr->data.resident.value_offset) +
 					le32_to_cpu(
-					ctx->attr->_ARA(value_length)) >
+					ctx->attr->data.resident.value_length) >
 					(u8*)ctx->mrec + vol->mft_record_size) {
 				ntfs_error(vi->i_sb, "Corrupt attribute list "
 						"in inode.");
@@ -677,9 +677,9 @@
 			}
 			/* Now copy the attribute list. */
 			memcpy(ni->attr_list, (u8*)ctx->attr + le16_to_cpu(
-					ctx->attr->_ARA(value_offset)),
+					ctx->attr->data.resident.value_offset),
 					le32_to_cpu(
-					ctx->attr->_ARA(value_length)));
+					ctx->attr->data.resident.value_length));
 		}
 	}
 skip_attr_list_load:
@@ -728,9 +728,10 @@
 		}
 		if (ctx->attr->flags & ATTR_IS_SPARSE)
 			NInoSetSparse(ni);
-		ir = (INDEX_ROOT*)((char*)ctx->attr +
-				le16_to_cpu(ctx->attr->_ARA(value_offset)));
-		ir_end = (char*)ir + le32_to_cpu(ctx->attr->_ARA(value_length));
+		ir = (INDEX_ROOT*)((char*)ctx->attr + le16_to_cpu(
+				ctx->attr->data.resident.value_offset));
+		ir_end = (char*)ir + le32_to_cpu(
+				ctx->attr->data.resident.value_length);
 		if (ir_end > (char*)ctx->mrec + vol->mft_record_size) {
 			ntfs_error(vi->i_sb, "$INDEX_ROOT attribute is "
 					"corrupt.");
@@ -752,41 +753,41 @@
 					"COLLATION_FILE_NAME. Not allowed.");
 			goto unm_err_out;
 		}
-		ni->_IDM(index_block_size) = le32_to_cpu(ir->index_block_size);
-		if (ni->_IDM(index_block_size) &
-				(ni->_IDM(index_block_size) - 1)) {
+		ni->itype.index.block_size = le32_to_cpu(ir->index_block_size);
+		if (ni->itype.index.block_size &
+				(ni->itype.index.block_size - 1)) {
 			ntfs_error(vi->i_sb, "Index block size (%u) is not a "
 					"power of two.",
-					ni->_IDM(index_block_size));
+					ni->itype.index.block_size);
 			goto unm_err_out;
 		}
-		if (ni->_IDM(index_block_size) > PAGE_CACHE_SIZE) {
+		if (ni->itype.index.block_size > PAGE_CACHE_SIZE) {
 			ntfs_error(vi->i_sb, "Index block size (%u) > "
 					"PAGE_CACHE_SIZE (%ld) is not "
 					"supported. Sorry.",
-					ni->_IDM(index_block_size),
+					ni->itype.index.block_size,
 					PAGE_CACHE_SIZE);
 			err = -EOPNOTSUPP;
 			goto unm_err_out;
 		}
-		if (ni->_IDM(index_block_size) < NTFS_BLOCK_SIZE) {
+		if (ni->itype.index.block_size < NTFS_BLOCK_SIZE) {
 			ntfs_error(vi->i_sb, "Index block size (%u) < "
 					"NTFS_BLOCK_SIZE (%i) is not "
 					"supported. Sorry.",
-					ni->_IDM(index_block_size),
+					ni->itype.index.block_size,
 					NTFS_BLOCK_SIZE);
 			err = -EOPNOTSUPP;
 			goto unm_err_out;
 		}
-		ni->_IDM(index_block_size_bits) =
-				ffs(ni->_IDM(index_block_size)) - 1;
+		ni->itype.index.block_size_bits =
+				ffs(ni->itype.index.block_size) - 1;
 		/* Determine the size of a vcn in the directory index. */
-		if (vol->cluster_size <= ni->_IDM(index_block_size)) {
-			ni->_IDM(index_vcn_size) = vol->cluster_size;
-			ni->_IDM(index_vcn_size_bits) = vol->cluster_size_bits;
+		if (vol->cluster_size <= ni->itype.index.block_size) {
+			ni->itype.index.vcn_size = vol->cluster_size;
+			ni->itype.index.vcn_size_bits = vol->cluster_size_bits;
 		} else {
-			ni->_IDM(index_vcn_size) = vol->sector_size;
-			ni->_IDM(index_vcn_size_bits) = vol->sector_size_bits;
+			ni->itype.index.vcn_size = vol->sector_size;
+			ni->itype.index.vcn_size_bits = vol->sector_size_bits;
 		}
 
 		/* Setup the index allocation attribute, even if not present. */
@@ -836,18 +837,19 @@
 					"is compressed.");
 			goto unm_err_out;
 		}
-		if (ctx->attr->_ANR(lowest_vcn)) {
+		if (ctx->attr->data.non_resident.lowest_vcn) {
 			ntfs_error(vi->i_sb, "First extent of "
 					"$INDEX_ALLOCATION attribute has non "
 					"zero lowest_vcn. Inode is corrupt. "
 					"You should run chkdsk.");
 			goto unm_err_out;
 		}
-		vi->i_size = sle64_to_cpu(ctx->attr->_ANR(data_size));
+		vi->i_size = sle64_to_cpu(
+				ctx->attr->data.non_resident.data_size);
 		ni->initialized_size = sle64_to_cpu(
-				ctx->attr->_ANR(initialized_size));
+				ctx->attr->data.non_resident.initialized_size);
 		ni->allocated_size = sle64_to_cpu(
-				ctx->attr->_ANR(allocated_size));
+				ctx->attr->data.non_resident.allocated_size);
 		/*
 		 * We are done with the mft record, so we release it. Otherwise
 		 * we would deadlock in ntfs_attr_iget().
@@ -863,7 +865,7 @@
 			err = PTR_ERR(bvi);
 			goto unm_err_out;
 		}
-		ni->_IDM(bmp_ino) = bvi;
+		ni->itype.index.bmp_ino = bvi;
 		bni = NTFS_I(bvi);
 		if (NInoCompressed(bni) || NInoEncrypted(bni) ||
 				NInoSparse(bni)) {
@@ -873,7 +875,7 @@
 		}
 		/* Consistency check bitmap size vs. index allocation size. */
 		if ((bvi->i_size << 3) < (vi->i_size >>
-				ni->_IDM(index_block_size_bits))) {
+				ni->itype.index.block_size_bits)) {
 			ntfs_error(vi->i_sb, "Index bitmap too small (0x%Lx) "
 					"for index allocation (0x%Lx).",
 					bvi->i_size << 3, vi->i_size);
@@ -950,25 +952,28 @@
 						"corrupt file.");
 					goto unm_err_out;
 				}
-				ni->_ICF(compression_block_clusters) = 1U <<
-					ctx->attr->_ANR(compression_unit);
-				if (ctx->attr->_ANR(compression_unit) != 4) {
+				ni->itype.compressed.block_clusters = 1U <<
+						ctx->attr->data.non_resident.
+						compression_unit;
+				if (ctx->attr->data.non_resident.
+						compression_unit != 4) {
 					ntfs_error(vi->i_sb, "Found "
 						"nonstandard compression unit "
 						"(%u instead of 4). Cannot "
 						"handle this. This might "
 						"indicate corruption so you "
 						"should run chkdsk.",
-					     ctx->attr->_ANR(compression_unit));
+						ctx->attr->data.non_resident.
+						compression_unit);
 					err = -EOPNOTSUPP;
 					goto unm_err_out;
 				}
-				ni->_ICF(compression_block_size) = 1U << (
-						ctx->attr->_ANR(
-						compression_unit) +
+				ni->itype.compressed.block_size = 1U << (
+						ctx->attr->data.non_resident.
+						compression_unit +
 						vol->cluster_size_bits);
-				ni->_ICF(compression_block_size_bits) = ffs(
-					ni->_ICF(compression_block_size)) - 1;
+				ni->itype.compressed.block_size_bits = ffs(
+					ni->itype.compressed.block_size) - 1;
 			}
 			if (ctx->attr->flags & ATTR_IS_ENCRYPTED) {
 				if (ctx->attr->flags & ATTR_COMPRESSION_MASK) {
@@ -980,7 +985,7 @@
 			}
 			if (ctx->attr->flags & ATTR_IS_SPARSE)
 				NInoSetSparse(ni);
-			if (ctx->attr->_ANR(lowest_vcn)) {
+			if (ctx->attr->data.non_resident.lowest_vcn) {
 				ntfs_error(vi->i_sb, "First extent of $DATA "
 						"attribute has non zero "
 						"lowest_vcn. Inode is corrupt. "
@@ -988,24 +993,18 @@
 				goto unm_err_out;
 			}
 			/* Setup all the sizes. */
-			vi->i_size = sle64_to_cpu(ctx->attr->_ANR(data_size));
+			vi->i_size = sle64_to_cpu(
+					ctx->attr->data.non_resident.data_size);
 			ni->initialized_size = sle64_to_cpu(
-					ctx->attr->_ANR(initialized_size));
+					ctx->attr->data.non_resident.
+					initialized_size);
 			ni->allocated_size = sle64_to_cpu(
-					ctx->attr->_ANR(allocated_size));
+					ctx->attr->data.non_resident.
+					allocated_size);
 			if (NInoCompressed(ni)) {
-				ni->_ICF(compressed_size) = sle64_to_cpu(
-					ctx->attr->_ANR(compressed_size));
-				if (vi->i_size != ni->initialized_size)
-					ntfs_warning(vi->i_sb, "BUG: Found "
-						"compressed file with "
-						"data_size not equal to "
-						"initialized_size. This will "
-						"probably cause problems when "
-						"trying to access the file. "
-						"Please notify linux-ntfs-dev@"
-						"lists.sf.net that you saw "
-						"this message. Thanks!");
+				ni->itype.compressed.size = sle64_to_cpu(
+						ctx->attr->data.non_resident.
+						compressed_size);
 			}
 		} else { /* Resident attribute. */
 			/*
@@ -1015,7 +1014,8 @@
 			 * path. (Probably only affects truncate().)
 			 */
 			vi->i_size = ni->initialized_size = ni->allocated_size =
-				le32_to_cpu(ctx->attr->_ARA(value_length));
+					le32_to_cpu(
+					ctx->attr->data.resident.value_length);
 		}
 no_data_attr_special_case:
 		/* We are done with the mft record, so we release it. */
@@ -1049,7 +1049,7 @@
 	if (!NInoCompressed(ni))
 		vi->i_blocks = ni->allocated_size >> 9;
 	else
-		vi->i_blocks = ni->_ICF(compressed_size) >> 9;
+		vi->i_blocks = ni->itype.compressed.size >> 9;
 
 	ntfs_debug("Done.");
 	return 0;
@@ -1146,7 +1146,7 @@
 		 * read code paths.
 		 */
 		vi->i_size = ni->initialized_size = ni->allocated_size =
-			le32_to_cpu(ctx->attr->_ARA(value_length));
+			le32_to_cpu(ctx->attr->data.resident.value_length);
 	} else {
 		NInoSetNonResident(ni);
 		if (ctx->attr->flags & ATTR_COMPRESSION_MASK) {
@@ -1189,25 +1189,27 @@
 						"corrupt file.");
 				goto unm_err_out;
 			}
-			ni->_ICF(compression_block_clusters) = 1U <<
-					ctx->attr->_ANR(compression_unit);
-			if (ctx->attr->_ANR(compression_unit) != 4) {
+			ni->itype.compressed.block_clusters = 1U <<
+					ctx->attr->data.non_resident.
+					compression_unit;
+			if (ctx->attr->data.non_resident.compression_unit != 4) {
 				ntfs_error(vi->i_sb, "Found "
 					"nonstandard compression unit "
 					"(%u instead of 4). Cannot "
 					"handle this. This might "
 					"indicate corruption so you "
 					"should run chkdsk.",
-				     ctx->attr->_ANR(compression_unit));
+					ctx->attr->data.non_resident.
+					compression_unit);
 				err = -EOPNOTSUPP;
 				goto unm_err_out;
 			}
-			ni->_ICF(compression_block_size) = 1U << (
-					ctx->attr->_ANR(
-					compression_unit) +
+			ni->itype.compressed.block_size = 1U << (
+					ctx->attr->data.non_resident.
+					compression_unit +
 					vol->cluster_size_bits);
-			ni->_ICF(compression_block_size_bits) = ffs(
-				ni->_ICF(compression_block_size)) - 1;
+			ni->itype.compressed.block_size_bits = ffs(
+				ni->itype.compressed.block_size) - 1;
 		}
 		if (ctx->attr->flags & ATTR_IS_ENCRYPTED) {
 			if (ctx->attr->flags & ATTR_COMPRESSION_MASK) {
@@ -1242,30 +1244,23 @@
 			}
 			NInoSetSparse(ni);
 		}
-		if (ctx->attr->_ANR(lowest_vcn)) {
+		if (ctx->attr->data.non_resident.lowest_vcn) {
 			ntfs_error(vi->i_sb, "First extent of attribute has "
 					"non-zero lowest_vcn. Inode is "
 					"corrupt. You should run chkdsk.");
 			goto unm_err_out;
 		}
 		/* Setup all the sizes. */
-		vi->i_size = sle64_to_cpu(ctx->attr->_ANR(data_size));
+		vi->i_size = sle64_to_cpu(
+				ctx->attr->data.non_resident.data_size);
 		ni->initialized_size = sle64_to_cpu(
-				ctx->attr->_ANR(initialized_size));
+				ctx->attr->data.non_resident.initialized_size);
 		ni->allocated_size = sle64_to_cpu(
-				ctx->attr->_ANR(allocated_size));
+				ctx->attr->data.non_resident.allocated_size);
 		if (NInoCompressed(ni)) {
-			ni->_ICF(compressed_size) = sle64_to_cpu(
-				ctx->attr->_ANR(compressed_size));
-			if (vi->i_size != ni->initialized_size)
-				ntfs_warning(vi->i_sb, "Compressed attribute "
-						"with data_size unequal to "
-						"initialized size found. This "
-						"will probably cause problems "
-						"when trying to access the "
-						"file. Please notify "
-						"linux-ntfs-dev@lists.sf.net "
-						"that you saw this message.");
+			ni->itype.compressed.size = sle64_to_cpu(
+					ctx->attr->data.non_resident.
+					compressed_size);
 		}
 	}
 
@@ -1277,14 +1272,14 @@
 	if (!NInoCompressed(ni))
 		vi->i_blocks = ni->allocated_size >> 9;
 	else
-		vi->i_blocks = ni->_ICF(compressed_size) >> 9;
+		vi->i_blocks = ni->itype.compressed.size >> 9;
 
 	/*
 	 * Make sure the base inode doesn't go away and attach it to the
 	 * attribute inode.
 	 */
 	igrab(base_vi);
-	ni->_INE(base_ntfs_ino) = base_ni;
+	ni->ext.base_ntfs_ino = base_ni;
 	ni->nr_extents = -1;
 
 	put_attr_search_ctx(ctx);
@@ -1371,8 +1366,8 @@
 	 * This sets up our little cheat allowing us to reuse the async io
 	 * completion handler for directories.
 	 */
-	ni->_IDM(index_block_size) = vol->mft_record_size;
-	ni->_IDM(index_block_size_bits) = vol->mft_record_size_bits;
+	ni->itype.index.block_size = vol->mft_record_size;
+	ni->itype.index.block_size_bits = vol->mft_record_size_bits;
 
 	/* Very important! Needed to be able to call map_mft_record*(). */
 	vol->mft_ino = vi;
@@ -1456,7 +1451,7 @@
 		}
 		if (ctx->attr->non_resident) {
 			NInoSetAttrListNonResident(ni);
-			if (ctx->attr->_ANR(lowest_vcn)) {
+			if (ctx->attr->data.non_resident.lowest_vcn) {
 				ntfs_error(sb, "Attribute list has non zero "
 						"lowest_vcn. $MFT is corrupt. "
 						"You should run chkdsk.");
@@ -1476,8 +1471,8 @@
 			/* Now load the attribute list. */
 			if ((err = load_attribute_list(vol, &ni->attr_list_rl,
 					ni->attr_list, ni->attr_list_size,
-					sle64_to_cpu(
-					ctx->attr->_ANR(initialized_size))))) {
+					sle64_to_cpu(ctx->attr->data.
+					non_resident.initialized_size)))) {
 				ntfs_error(sb, "Failed to load attribute list "
 						"attribute with error code %i.",
 						-err);
@@ -1485,9 +1480,9 @@
 			}
 		} else /* if (!ctx.attr->non_resident) */ {
 			if ((u8*)ctx->attr + le16_to_cpu(
-					ctx->attr->_ARA(value_offset)) +
+					ctx->attr->data.resident.value_offset) +
 					le32_to_cpu(
-					ctx->attr->_ARA(value_length)) >
+					ctx->attr->data.resident.value_length) >
 					(u8*)ctx->mrec + vol->mft_record_size) {
 				ntfs_error(sb, "Corrupt attribute list "
 						"attribute.");
@@ -1495,9 +1490,9 @@
 			}
 			/* Now copy the attribute list. */
 			memcpy(ni->attr_list, (u8*)ctx->attr + le16_to_cpu(
-					ctx->attr->_ARA(value_offset)),
+					ctx->attr->data.resident.value_offset),
 					le32_to_cpu(
-					ctx->attr->_ARA(value_length)));
+					ctx->attr->data.resident.value_length));
 		}
 		/* The attribute list is now setup in memory. */
 		/*
@@ -1606,7 +1601,7 @@
 		if (!next_vcn) {
 			u64 ll;
 
-			if (attr->_ANR(lowest_vcn)) {
+			if (attr->data.non_resident.lowest_vcn) {
 				ntfs_error(sb, "First extent of $DATA "
 						"attribute has non zero "
 						"lowest_vcn. $MFT is corrupt. "
@@ -1614,14 +1609,16 @@
 				goto put_err_out;
 			}
 			/* Get the last vcn in the $DATA attribute. */
-			last_vcn = sle64_to_cpu(attr->_ANR(allocated_size)) >>
-					vol->cluster_size_bits;
+			last_vcn = sle64_to_cpu(
+					attr->data.non_resident.allocated_size)
+					>> vol->cluster_size_bits;
 			/* Fill in the inode size. */
-			vi->i_size = sle64_to_cpu(attr->_ANR(data_size));
-			ni->initialized_size = sle64_to_cpu(
-					attr->_ANR(initialized_size));
+			vi->i_size = sle64_to_cpu(
+					attr->data.non_resident.data_size);
+			ni->initialized_size = sle64_to_cpu(attr->data.
+					non_resident.initialized_size);
 			ni->allocated_size = sle64_to_cpu(
-					attr->_ANR(allocated_size));
+					attr->data.non_resident.allocated_size);
 			/* Set the number of mft records. */
 			ll = vi->i_size >> vol->mft_record_size_bits;
 			/*
@@ -1687,7 +1684,7 @@
 		}
 
 		/* Get the lowest vcn for the next extent. */
-		highest_vcn = sle64_to_cpu(attr->_ANR(highest_vcn));
+		highest_vcn = sle64_to_cpu(attr->data.non_resident.highest_vcn);
 		next_vcn = highest_vcn + 1;
 
 		/* Only one extent or error, which we catch below. */
@@ -1695,7 +1692,8 @@
 			break;
 
 		/* Avoid endless loops due to corruption. */
-		if (next_vcn < sle64_to_cpu(attr->_ANR(lowest_vcn))) {
+		if (next_vcn < sle64_to_cpu(
+				attr->data.non_resident.lowest_vcn)) {
 			ntfs_error(sb, "$MFT has corrupt attribute list "
 					"attribute. Run chkdsk.");
 			goto put_err_out;
@@ -1796,9 +1794,9 @@
 		ntfs_inode *ni;
 
 		ni = NTFS_I(vi);
-		if (NInoIndexAllocPresent(ni) && ni->_IDM(bmp_ino)) {
-			iput(ni->_IDM(bmp_ino));
-			ni->_IDM(bmp_ino) = NULL;
+		if (NInoIndexAllocPresent(ni) && ni->itype.index.bmp_ino) {
+			iput(ni->itype.index.bmp_ino);
+			ni->itype.index.bmp_ino = NULL;
 		}
 	}
 	return;
@@ -1831,8 +1829,8 @@
 
 		// FIXME: Handle dirty case for each extent inode!
 		for (i = 0; i < ni->nr_extents; i++)
-			ntfs_clear_extent_inode(ni->_INE(extent_ntfs_inos)[i]);
-		kfree(ni->_INE(extent_ntfs_inos));
+			ntfs_clear_extent_inode(ni->ext.extent_ntfs_inos[i]);
+		kfree(ni->ext.extent_ntfs_inos);
 	}
 	/* Free all alocated memory. */
 	down_write(&ni->run_list.lock);
@@ -1888,9 +1886,9 @@
 	if (NInoAttr(ni)) {
 		/* Release the base inode if we are holding it. */
 		if (ni->nr_extents == -1) {
-			iput(VFS_I(ni->_INE(base_ntfs_ino)));
+			iput(VFS_I(ni->ext.base_ntfs_ino));
 			ni->nr_extents = 0;
-			ni->_INE(base_ntfs_ino) = NULL;
+			ni->ext.base_ntfs_ino = NULL;
 		}
 	}
 	return;
diff -urN linux-2.5.68-bk10/fs/ntfs/inode.h linux-2.5.68-bk11/fs/ntfs/inode.h
--- linux-2.5.68-bk10/fs/ntfs/inode.h	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/inode.h	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * inode.h - Defines for inode structures NTFS Linux kernel driver. Part of
  *	     the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (c) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -93,23 +93,21 @@
 		struct { /* It is a directory or $MFT. */
 			struct inode *bmp_ino;	/* Attribute inode for the
 						   directory index $BITMAP. */
-			u32 index_block_size;	/* Size of an index block. */
-			u32 index_vcn_size;	/* Size of a vcn in this
+			u32 block_size;		/* Size of an index block. */
+			u32 vcn_size;		/* Size of a vcn in this
 						   directory index. */
-			u8 index_block_size_bits; /* Log2 of the above. */
-			u8 index_vcn_size_bits;	/* Log2 of the above. */
-		} SN(idm);
+			u8 block_size_bits; 	/* Log2 of the above. */
+			u8 vcn_size_bits;	/* Log2 of the above. */
+		} index;
 		struct { /* It is a compressed file or fake inode. */
-			s64 compressed_size;		/* Copy from $DATA. */
-			u32 compression_block_size;     /* Size of a compression
-						           block (cb). */
-			u8 compression_block_size_bits; /* Log2 of the size of
-							   a cb. */
-			u8 compression_block_clusters;  /* Number of clusters
-							   per compression
-							   block. */
-		} SN(icf);
-	} SN(idc);
+			s64 size;		/* Copy of compressed_size from
+						   $DATA. */
+			u32 block_size;		/* Size of a compression block
+						   (cb). */
+			u8 block_size_bits;	/* Log2 of the size of a cb. */
+			u8 block_clusters;	/* Number of clusters per cb. */
+		} compressed;
+	} itype;
 	struct semaphore extent_lock;	/* Lock for accessing/modifying the
 					   below . */
 	s32 nr_extents;	/* For a base mft record, the number of attached extent
@@ -126,13 +124,9 @@
 						   record. For fake inodes, the
 						   real (base) inode to which
 						   the attribute belongs. */
-	} SN(ine);
+	} ext;
 };
 
-#define _IDM(X)  SC(idc.idm,X)
-#define _ICF(X)  SC(idc.icf,X)
-#define _INE(X)  SC(ine,X)
-
 /*
  * Defined bits for the state field in the ntfs_inode structure.
  * (f) = files only, (d) = directories only, (a) = attributes/fake inodes only
diff -urN linux-2.5.68-bk10/fs/ntfs/layout.h linux-2.5.68-bk11/fs/ntfs/layout.h
--- linux-2.5.68-bk10/fs/ntfs/layout.h	2003-04-19 19:49:52.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/layout.h	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * layout.h - All NTFS associated on-disk structures. Part of the Linux-NTFS
  *	      project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (C) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -296,7 +296,11 @@
  */
 typedef struct {
 /*Ofs*/
-/*  0*/	NTFS_RECORD SN(mnr);	/* Usually the magic is "FILE". */
+/*  0	NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
+	NTFS_RECORD_TYPES magic;/* Usually the magic is "FILE". */
+	u16 usa_ofs;		/* See NTFS_RECORD definition above. */
+	u16 usa_count;		/* See NTFS_RECORD definition above. */
+
 /*  8*/	u64 lsn;		/* $LogFile sequence number for this record.
 				   Changed every time the record is modified. */
 /* 16*/	u16 sequence_number;	/* Number of times this mft record has been
@@ -360,8 +364,6 @@
  */
 } __attribute__ ((__packed__)) MFT_RECORD;
 
-#define _MNR(X)  SC(mnr,X)
-
 /*
  * System defined attributes (32-bit). Each attribute type has a corresponding
  * attribute name (Unicode string of maximum 64 character length) as described
@@ -612,10 +614,10 @@
 					     have a name present as this might
 					     not have a length of a multiple
 					     of 8-bytes. */
-/* 22 */		RESIDENT_ATTR_FLAGS resident_flags; /* See above. */
-/* 23 */		s8 reservedR;	  /* Reserved/alignment to 8-byte
+/* 22 */		RESIDENT_ATTR_FLAGS flags; /* See above. */
+/* 23 */		s8 reserved;	  /* Reserved/alignment to 8-byte
 					     boundary. */
-		} SN(ara) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) resident;
 		/* Non-resident attributes. */
 		struct {
 /* 16*/			VCN lowest_vcn;	/* Lowest valid virtual cluster number
@@ -641,7 +643,7 @@
 				compressed. (This effectively limits the
 				compression unit size to be a power of two
 				clusters.) WinNT4 only uses a value of 4. */
-/* 35*/			u8 reserved1[5];	/* Align to 8-byte boundary. */
+/* 35*/			u8 reserved[5];		/* Align to 8-byte boundary. */
 /* The sizes below are only used when lowest_vcn is zero, as otherwise it would
    be difficult to keep them up-to-date.*/
 /* 40*/			s64 allocated_size;	/* Byte size of disk space
@@ -665,13 +667,10 @@
 				cluster size. Represents the actual amount of
 				disk space being used on the disk. */
 /* sizeof(compressed attr) = 72*/
-		} SN(anr) __attribute__ ((__packed__));
-	} SN(aua) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) non_resident;
+	} __attribute__ ((__packed__)) data;
 } __attribute__ ((__packed__)) ATTR_RECORD;
 
-#define _ARA(X)  SC(aua.ara,X)
-#define _ANR(X)  SC(aua.anr,X)
-
 typedef ATTR_RECORD ATTR_REC;
 
 /*
@@ -763,11 +762,13 @@
 					   disabled altogether for speed. */
 /* 32*/	FILE_ATTR_FLAGS file_attributes; /* Flags describing the file. */
 /* 36*/	union {
-		/* NTFS 1.2 (and previous, presumably) */
-/* 36 */	u8 reserved12[12];	/* Reserved/alignment to 8-byte
-					   boundary. */
-/* sizeof() = 48 bytes */
-		/* NTFS 3.0 */
+	/* NTFS 1.2 */
+		struct {
+		/* 36*/	u8 reserved12[12];	/* Reserved/alignment to 8-byte
+						   boundary. */
+		} __attribute__ ((__packed__)) v1;
+	/* sizeof() = 48 bytes */
+	/* NTFS 3.x */
 		struct {
 /*
  * If a volume has been upgraded from a previous NTFS version, then these
@@ -777,12 +778,12 @@
  * the fields are present. Maybe just check like this:
  * 	if (resident.ValueLength < sizeof(STANDARD_INFORMATION)) {
  * 		Assume NTFS 1.2- format.
- * 		If (volume version is 3.0+)
- * 			Upgrade attribute to NTFS 3.0 format.
+ * 		If (volume version is 3.x)
+ * 			Upgrade attribute to NTFS 3.x format.
  * 		else
  * 			Use NTFS 1.2- format for access.
  * 	} else
- * 		Use NTFS 3.0 format for access.
+ * 		Use NTFS 3.x format for access.
  * Only problem is that it might be legal to set the length of the value to
  * arbitrarily large values thus spoiling this check. - But chkdsk probably
  * views that as a corruption, assuming that it behaves like this for all
@@ -818,13 +819,11 @@
 				partition. This, in contrast to disabling the
 				journal is a very fast process, so the user
 				won't even notice it. */
-		} SN(svs);
-	} SN(sei);
-/* sizeof() = 72 bytes (NTFS 3.0) */
+		} __attribute__ ((__packed__)) v3;
+	/* sizeof() = 72 bytes (NTFS 3.x) */
+	} __attribute__ ((__packed__)) ver;
 } __attribute__ ((__packed__)) STANDARD_INFORMATION;
 
-#define _SVS(X)  SC(sei.svs,X)
-
 /*
  * Attribute: Attribute list (0x20).
  *
@@ -956,21 +955,20 @@
 						   pack the extended attributes
 						   (EAs), if such are present.*/
 		/* 3e*/	u16 reserved;		/* Reserved for alignment. */
-		} SN(fea) __attribute__ ((__packed__));
-	/* 3c*/	u32 reparse_point_tag;		/* Type of reparse point,
+		} __attribute__ ((__packed__)) ea;
+	/* 3c*/	struct {
+		/* 3c*/	u32 reparse_point_tag;	/* Type of reparse point,
 						   present only in reparse
 						   points and only if there are
 						   no EAs. */
-	} SN(fer) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) rp;
+	} __attribute__ ((__packed__)) type;
 /* 40*/	u8 file_name_length;			/* Length of file name in
 						   (Unicode) characters. */
 /* 41*/	FILE_NAME_TYPE_FLAGS file_name_type;	/* Namespace of the file name.*/
 /* 42*/	uchar_t file_name[0];			/* File name in Unicode. */
 } __attribute__ ((__packed__)) FILE_NAME_ATTR;
 
-#define _FEA(X)  SC(fer.fea,X)
-#define _FER(X)  SC(fer,X)
-
 /*
  * GUID structures store globally unique identifiers (GUID). A GUID is a 
  * 128-bit value consisting of one group of eight hexadecimal digits, followed
@@ -1008,9 +1006,9 @@
 			GUID birth_volume_id;
 			GUID birth_object_id;
 			GUID domain_id;
-		} SN(obv) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) origin;
 		u8 extended_info[48];
-	} SN(oei) __attribute__ ((__packed__));
+	} __attribute__ ((__packed__)) opt;
 } __attribute__ ((__packed__)) OBJ_ID_INDEX_DATA;
 
 /*
@@ -1032,13 +1030,11 @@
 			GUID birth_object_id;	/* Unique id of file when it was
 						   first created. */
 			GUID domain_id;		/* Reserved, zero. */
-		} SN(obv) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) origin;
 		u8 extended_info[48];
-	} SN(oei) __attribute__ ((__packed__));
+	} __attribute__ ((__packed__)) opt;
 } __attribute__ ((__packed__)) OBJECT_ID_ATTR;
 
-#define _OBV(X)  SC(oei.obv,X)
-
 /*
  * The pre-defined IDENTIFIER_AUTHORITIES used as SID_IDENTIFIER_AUTHORITY in
  * the SID structure (see below).
@@ -1174,14 +1170,12 @@
  */
 typedef union {
 	struct {
-		u32 low_part;         /* Low 32-bits. */
-		u16 high_part;        /* High 16-bits. */
-	} SN(sia) __attribute__ ((__packed__));
+		u32 low;         /* Low 32-bits. */
+		u16 high;        /* High 16-bits. */
+	} __attribute__ ((__packed__)) parts;
 	u8 value[6];			/* Value as individual bytes. */
 } __attribute__ ((__packed__)) SID_IDENTIFIER_AUTHORITY;
 
-#define _SIA(X)  SC(sia,X)
-
 /*
  * The SID structure is a variable-length structure used to uniquely identify
  * users or groups. SID stands for security identifier.
@@ -1287,9 +1281,10 @@
  * data depends on the ACE type.
  */
 typedef struct {
-	ACE_TYPES type;		/* Type of the ACE. */
-	ACE_FLAGS flags;	/* Flags describing the ACE. */
-	u16 size;		/* Size in bytes of the ACE. */
+/*Ofs*/
+/*  0*/	ACE_TYPES type;		/* Type of the ACE. */
+/*  1*/	ACE_FLAGS flags;	/* Flags describing the ACE. */
+/*  2*/	u16 size;		/* Size in bytes of the ACE. */
 } __attribute__ ((__packed__)) ACE_HEADER;
 
 /*
@@ -1446,12 +1441,15 @@
  * ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE, SYSTEM_AUDIT_ACE, SYSTEM_ALARM_ACE
  */
 typedef struct {
-	ACE_HEADER SN(aah);		/* The ACE header. */
-	ACCESS_MASK mask;	/* Access mask associated with the ACE. */
-	SID sid;		/* The SID associated with the ACE. */
+/*  0	ACE_HEADER; -- Unfolded here as gcc doesn't like unnamed structs. */
+	ACE_TYPES type;		/* Type of the ACE. */
+	ACE_FLAGS flags;	/* Flags describing the ACE. */
+	u16 size;		/* Size in bytes of the ACE. */
+/*  4*/	ACCESS_MASK mask;	/* Access mask associated with the ACE. */
+
+/*  8*/	SID sid;		/* The SID associated with the ACE. */
 } __attribute__ ((__packed__)) ACCESS_ALLOWED_ACE, ACCESS_DENIED_ACE,
 			       SYSTEM_AUDIT_ACE, SYSTEM_ALARM_ACE;
-#define _AAH(X)  SC(aah,X)
 
 /*
  * The object ACE flags (32-bit).
@@ -1462,12 +1460,17 @@
 } OBJECT_ACE_FLAGS;
 
 typedef struct {
-	ACE_HEADER SN(aah);	/* The ACE_HEADER. */
-	ACCESS_MASK mask;	/* Access mask associated with the ACE. */
-	OBJECT_ACE_FLAGS flags;	/* Flags describing the object ACE. */
-	GUID object_type;
-	GUID inherited_object_type;
-	SID sid;		/* The SID associated with the ACE. */
+/*  0	ACE_HEADER; -- Unfolded here as gcc doesn't like unnamed structs. */
+	ACE_TYPES type;		/* Type of the ACE. */
+	ACE_FLAGS flags;	/* Flags describing the ACE. */
+	u16 size;		/* Size in bytes of the ACE. */
+/*  4*/	ACCESS_MASK mask;	/* Access mask associated with the ACE. */
+
+/*  8*/	OBJECT_ACE_FLAGS object_flags;	/* Flags describing the object ACE. */
+/* 12*/	GUID object_type;
+/* 28*/	GUID inherited_object_type;
+
+/* 44*/	SID sid;		/* The SID associated with the ACE. */
 } __attribute__ ((__packed__)) ACCESS_ALLOWED_OBJECT_ACE,
 			       ACCESS_DENIED_OBJECT_ACE,
 			       SYSTEM_AUDIT_OBJECT_ACE,
@@ -1711,13 +1714,17 @@
  * $SDS data stream and the second copy will be at offset 0x451d0.
  */
 typedef struct {
-	SECURITY_DESCRIPTOR_HEADER SN(sdh);	  /* The security descriptor header. */
-	SECURITY_DESCRIPTOR_RELATIVE sid; /* The self-relative security
+/*Ofs*/
+/*  0	SECURITY_DESCRIPTOR_HEADER; -- Unfolded here as gcc doesn't like
+				       unnamed structs. */
+	u32 hash;	   /* Hash of the security descriptor. */
+	u32 security_id;   /* The security_id assigned to the descriptor. */
+	u64 offset;	   /* Byte offset of this entry in the $SDS stream. */
+	u32 length;	   /* Size in bytes of this entry in $SDS stream. */
+/* 20*/	SECURITY_DESCRIPTOR_RELATIVE sid; /* The self-relative security
 					     descriptor. */
 } __attribute__ ((__packed__)) SDS_ENTRY;
 
-#define _SDH(X)  SC(sdh,X)
-
 /*
  * The index entry key used in the $SII index. The collation type is
  * COLLATION_NTOFS_ULONG. 
@@ -1888,7 +1895,11 @@
  * index entries (INDEX_ENTRY structures), as described by the INDEX_HEADER.
  */
 typedef struct {
-/*  0*/	NTFS_RECORD SN(inr);	/* Magic is "INDX". */
+/*  0	NTFS_RECORD; -- Unfolded here as gcc doesn't like unnamed structs. */
+	NTFS_RECORD_TYPES magic;/* Magic is "INDX". */
+	u16 usa_ofs;		/* See NTFS_RECORD definition. */
+	u16 usa_count;		/* See NTFS_RECORD definition. */
+
 /*  8*/	s64 lsn;		/* $LogFile sequence number of the last
 				   modification of this index block. */
 /* 16*/	VCN index_block_vcn;	/* Virtual cluster number of the index block.
@@ -1909,8 +1920,6 @@
  */
 } __attribute__ ((__packed__)) INDEX_BLOCK;
 
-#define _INR(X)  SC(inr,X)
-
 typedef INDEX_BLOCK INDEX_ALLOCATION;
 
 /*
@@ -2014,19 +2023,21 @@
  * This the index entry header (see below).
  */
 typedef struct {
-/*  0*/	union {		/* Only valid when INDEX_ENTRY_END is not set. */
-		MFT_REF indexed_file;		/* The mft reference of the file
+/*  0*/	union {
+		struct { /* Only valid when INDEX_ENTRY_END is not set. */
+			MFT_REF indexed_file;	/* The mft reference of the file
 						   described by this index
 						   entry. Used for directory
 						   indexes. */
+		} __attribute__ ((__packed__)) dir;
 		struct { /* Used for views/indexes to find the entry's data. */
 			u16 data_offset;	/* Data byte offset from this
 						   INDEX_ENTRY. Follows the
 						   index key. */
 			u16 data_length;	/* Data length in bytes. */
 			u32 reservedV;		/* Reserved (zero). */
-		} SN(iev) __attribute__ ((__packed__));
-	} SN(iif) __attribute__ ((__packed__));
+		} __attribute__ ((__packed__)) vi;
+	} __attribute__ ((__packed__)) data;
 /*  8*/	u16 length;		 /* Byte size of this index entry, multiple of
 				    8-bytes. */
 /* 10*/	u16 key_length;		 /* Byte size of the key value, which is in the
@@ -2037,9 +2048,6 @@
 /* sizeof() = 16 bytes */
 } __attribute__ ((__packed__)) INDEX_ENTRY_HEADER;
 
-#define _IIF(X)  SC(ieh.iif,X)
-#define _IEV(X)  SC(iif.iev,X)
-
 /*
  * This is an index entry. A sequence of such entries follows each INDEX_HEADER
  * structure. Together they make up a complete index. The index follows either
@@ -2048,7 +2056,31 @@
  * NOTE: Before NTFS 3.0 only filename attributes were indexed.
  */
 typedef struct {
-/*  0*/ INDEX_ENTRY_HEADER SN(ieh);	/* The index entry header (see above). */
+/*Ofs*/
+/*  0	INDEX_ENTRY_HEADER; -- Unfolded here as gcc dislikes unnamed structs. */
+	union {
+		struct { /* Only valid when INDEX_ENTRY_END is not set. */
+			MFT_REF indexed_file;	/* The mft reference of the file
+						   described by this index
+						   entry. Used for directory
+						   indexes. */
+		} __attribute__ ((__packed__)) dir;
+		struct { /* Used for views/indexes to find the entry's data. */
+			u16 data_offset;	/* Data byte offset from this
+						   INDEX_ENTRY. Follows the
+						   index key. */
+			u16 data_length;	/* Data length in bytes. */
+			u32 reservedV;		/* Reserved (zero). */
+		} __attribute__ ((__packed__)) vi;
+	} __attribute__ ((__packed__)) data;
+	u16 length;		 /* Byte size of this index entry, multiple of
+				    8-bytes. */
+	u16 key_length;		 /* Byte size of the key value, which is in the
+				    index entry. It follows field reserved. Not
+				    multiple of 8-bytes. */
+	INDEX_ENTRY_FLAGS flags; /* Bit field of INDEX_ENTRY_* flags. */
+	u16 reserved;		 /* Reserved/align to 8-byte boundary. */
+
 /* 16*/	union {		/* The key of the indexed attribute. NOTE: Only present
 			   if INDEX_ENTRY_END bit in flags is not set. NOTE: On
 			   NTFS versions before 3.0 the only valid key is the
@@ -2060,7 +2092,8 @@
 		GUID object_id;		/* $O index in FILE_Extend/$ObjId: The
 					   object_id of the mft record found in
 					   the data part of the index. */
-		REPARSE_INDEX_KEY SN(iri);	/* $R index in FILE_Extend/$Reparse. */
+		REPARSE_INDEX_KEY reparse;	/* $R index in
+						   FILE_Extend/$Reparse. */
 		SID sid;		/* $O index in FILE_Extend/$Quota:
 					   SID of the owner of the user_id. */
 		u32 owner_id;		/* $Q index in FILE_Extend/$Quota:
@@ -2083,9 +2116,6 @@
 	//		   where sizeof(VCN) can be hardcoded as 8 if wanted. */
 } __attribute__ ((__packed__)) INDEX_ENTRY;
 
-#define _IEH(X)  SC(ieh,X)
-#define _IRI(X)  SC(key.iri,X)
-
 /*
  * Attribute: Bitmap (0xb0).
  *
diff -urN linux-2.5.68-bk10/fs/ntfs/mft.c linux-2.5.68-bk11/fs/ntfs/mft.c
--- linux-2.5.68-bk10/fs/ntfs/mft.c	2003-04-19 19:50:07.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/mft.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,8 +1,8 @@
 /**
  * mft.c - NTFS kernel mft record operations. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (c) 2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -39,18 +39,18 @@
 	ATTR_RECORD *a;
 
 	memset(m, 0, size);
-	m->_MNR(magic) = magic_FILE;
+	m->magic = magic_FILE;
 	/* Aligned to 2-byte boundary. */
-	m->_MNR(usa_ofs) = cpu_to_le16((sizeof(MFT_RECORD) + 1) & ~1);
-	m->_MNR(usa_count) = cpu_to_le16(size / NTFS_BLOCK_SIZE + 1);
+	m->usa_ofs = cpu_to_le16((sizeof(MFT_RECORD) + 1) & ~1);
+	m->usa_count = cpu_to_le16(size / NTFS_BLOCK_SIZE + 1);
 	/* Set the update sequence number to 1. */
 	*(u16*)((char*)m + ((sizeof(MFT_RECORD) + 1) & ~1)) = cpu_to_le16(1);
 	m->lsn = cpu_to_le64(0LL);
 	m->sequence_number = cpu_to_le16(1);
 	m->link_count = cpu_to_le16(0);
 	/* Aligned to 8-byte boundary. */
-	m->attrs_offset = cpu_to_le16((le16_to_cpu(m->_MNR(usa_ofs)) +
-			(le16_to_cpu(m->_MNR(usa_count)) << 1) + 7) & ~7);
+	m->attrs_offset = cpu_to_le16((le16_to_cpu(m->usa_ofs) +
+			(le16_to_cpu(m->usa_count) << 1) + 7) & ~7);
 	m->flags = cpu_to_le16(0);
 	/*
 	 * Using attrs_offset plus eight bytes (for the termination attribute),
@@ -329,7 +329,7 @@
 	 */
 	down(&base_ni->extent_lock);
 	if (base_ni->nr_extents > 0) {
-		extent_nis = base_ni->_INE(extent_ntfs_inos);
+		extent_nis = base_ni->ext.extent_ntfs_inos;
 		for (i = 0; i < base_ni->nr_extents; i++) {
 			if (mft_no != extent_nis[i]->mft_no)
 				continue;
@@ -374,7 +374,7 @@
 	ni->vol = base_ni->vol;
 	ni->seq_no = seq_no;
 	ni->nr_extents = -1;
-	ni->_INE(base_ntfs_ino) = base_ni;
+	ni->ext.base_ntfs_ino = base_ni;
 	/* Now map the record. */
 	m = map_mft_record(ni);
 	if (unlikely(IS_ERR(m))) {
@@ -404,14 +404,14 @@
 			m = ERR_PTR(-ENOMEM);
 			goto unm_err_out;
 		}
-		if (base_ni->_INE(extent_ntfs_inos)) {
-			memcpy(tmp, base_ni->_INE(extent_ntfs_inos), new_size -
+		if (base_ni->ext.extent_ntfs_inos) {
+			memcpy(tmp, base_ni->ext.extent_ntfs_inos, new_size -
 					4 * sizeof(ntfs_inode *));
-			kfree(base_ni->_INE(extent_ntfs_inos));
+			kfree(base_ni->ext.extent_ntfs_inos);
 		}
-		base_ni->_INE(extent_ntfs_inos) = tmp;
+		base_ni->ext.extent_ntfs_inos = tmp;
 	}
-	base_ni->_INE(extent_ntfs_inos)[base_ni->nr_extents++] = ni;
+	base_ni->ext.extent_ntfs_inos[base_ni->nr_extents++] = ni;
 	up(&base_ni->extent_lock);
 	atomic_dec(&base_ni->count);
 	ntfs_debug("Done 2.");
diff -urN linux-2.5.68-bk10/fs/ntfs/namei.c linux-2.5.68-bk11/fs/ntfs/namei.c
--- linux-2.5.68-bk10/fs/ntfs/namei.c	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/namei.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * namei.c - NTFS kernel directory inode operations. Part of the Linux-NTFS
  * 	     project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -210,12 +210,12 @@
 			a = ctx->attr;
 			if (a->non_resident || a->flags)
 				goto eio_err_out;
-			val_len = le32_to_cpu(a->_ARA(value_length));
-			if (le16_to_cpu(a->_ARA(value_offset)) + val_len >
-					le32_to_cpu(a->length))
+			val_len = le32_to_cpu(a->data.resident.value_length);
+			if (le16_to_cpu(a->data.resident.value_offset) +
+					val_len > le32_to_cpu(a->length))
 				goto eio_err_out;
 			fn = (FILE_NAME_ATTR*)((u8*)ctx->attr + le16_to_cpu(
-					ctx->attr->_ARA(value_offset)));
+					ctx->attr->data.resident.value_offset));
 			if ((u32)(fn->file_name_length * sizeof(uchar_t) +
 					sizeof(FILE_NAME_ATTR)) > val_len)
 				goto eio_err_out;
diff -urN linux-2.5.68-bk10/fs/ntfs/super.c linux-2.5.68-bk11/fs/ntfs/super.c
--- linux-2.5.68-bk10/fs/ntfs/super.c	2003-04-19 19:50:10.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/super.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,8 +1,8 @@
 /*
  * super.c - NTFS kernel super block handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001,2002 Anton Altaparmakov.
- * Copyright (c) 2001,2002 Richard Russon.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
+ * Copyright (c) 2001,2002 Richard Russon
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -619,9 +619,8 @@
 	 * the same as it is much faster on 32-bit CPUs.
 	 */
 	ll = sle64_to_cpu(b->number_of_sectors) >> sectors_per_cluster_bits;
-	if ((u64)ll >= 1ULL << (sizeof(unsigned long) * 8)) {
-		ntfs_error(vol->sb, "Cannot handle %i-bit clusters. Sorry.",
-				sizeof(unsigned long) * 4);
+	if ((u64)ll >= 1ULL << 32) {
+		ntfs_error(vol->sb, "Cannot handle 64-bit clusters. Sorry.");
 		return FALSE;
 	}
 	vol->nr_clusters = ll;
@@ -884,10 +883,10 @@
 		goto iput_volume_failed;
 	}
 	vi = (VOLUME_INFORMATION*)((char*)ctx->attr +
-			le16_to_cpu(ctx->attr->_ARA(value_offset)));
+			le16_to_cpu(ctx->attr->data.resident.value_offset));
 	/* Some bounds checks. */
 	if ((u8*)vi < (u8*)ctx->attr || (u8*)vi +
-			le32_to_cpu(ctx->attr->_ARA(value_length)) >
+			le32_to_cpu(ctx->attr->data.resident.value_length) >
 			(u8*)ctx->attr + le32_to_cpu(ctx->attr->length))
 		goto err_put_vol;
 	/* Setup volume flags and version. */
@@ -1060,78 +1059,93 @@
  * get_nr_free_clusters - return the number of free clusters on a volume
  * @vol:	ntfs volume for which to obtain free cluster count
  *
- * Calculate the number of free clusters on the mounted NTFS volume @vol.
- *
- * Errors are ignored and we just return the number of free clusters we have
- * found. This means we return an underestimate on error.
+ * Calculate the number of free clusters on the mounted NTFS volume @vol. We
+ * actually calculate the number of clusters in use instead because this
+ * allows us to not care about partial pages as these will be just zero filled
+ * and hence not be counted as allocated clusters.
+ *
+ * The only particularity is that clusters beyond the end of the logical ntfs
+ * volume will be marked as allocated to prevent errors which means we have to
+ * discount those at the end. This is important as the cluster bitmap always
+ * has a size in multiples of 8 bytes, i.e. up to 63 clusters could be outside
+ * the logical volume and marked in use when they are not as they do not exist.
+ *
+ * If any pages cannot be read we assume all clusters in the erroring pages are
+ * in use. This means we return an underestimate on errors which is better than
+ * an overestimate.
  */
 static s64 get_nr_free_clusters(ntfs_volume *vol)
 {
+	s64 nr_free = vol->nr_clusters;
+	u32 *kaddr;
 	struct address_space *mapping = vol->lcnbmp_ino->i_mapping;
 	filler_t *readpage = (filler_t*)mapping->a_ops->readpage;
 	struct page *page;
 	unsigned long index, max_index;
-	unsigned int max_size, i;
-	s64 nr_free = 0LL;
-	u32 *b;
+	unsigned int max_size;
 
 	ntfs_debug("Entering.");
 	/* Serialize accesses to the cluster bitmap. */
 	down_read(&vol->lcnbmp_lock);
 	/*
 	 * Convert the number of bits into bytes rounded up, then convert into
-	 * multiples of PAGE_CACHE_SIZE.
+	 * multiples of PAGE_CACHE_SIZE, rounding up so that if we have one
+	 * full and one partial page max_index = 2.
 	 */
-	max_index = (vol->nr_clusters + 7) >> (3 + PAGE_CACHE_SHIFT);
+	max_index = (((vol->nr_clusters + 7) >> 3) + PAGE_CACHE_SIZE - 1) >>
+			PAGE_CACHE_SHIFT;
 	/* Use multiples of 4 bytes. */
 	max_size = PAGE_CACHE_SIZE >> 2;
-	ntfs_debug("Reading $BITMAP, max_index = 0x%lx, max_size = 0x%x.",
+	ntfs_debug("Reading $Bitmap, max_index = 0x%lx, max_size = 0x%x.",
 			max_index, max_size);
-	for (index = 0UL; index < max_index;) {
-handle_partial_page:
+	for (index = 0UL; index < max_index; index++) {
+		unsigned int i;
 		/*
 		 * Read the page from page cache, getting it from backing store
 		 * if necessary, and increment the use count.
 		 */
-		page = read_cache_page(mapping, index++, (filler_t*)readpage,
+		page = read_cache_page(mapping, index, (filler_t*)readpage,
 				NULL);
 		/* Ignore pages which errored synchronously. */
 		if (IS_ERR(page)) {
 			ntfs_debug("Sync read_cache_page() error. Skipping "
-					"page (index 0x%lx).", index - 1);
+					"page (index 0x%lx).", index);
+			nr_free -= PAGE_CACHE_SIZE * 8;
 			continue;
 		}
 		wait_on_page_locked(page);
+		/* Ignore pages which errored asynchronously. */
 		if (!PageUptodate(page)) {
 			ntfs_debug("Async read_cache_page() error. Skipping "
-					"page (index 0x%lx).", index - 1);
-			/* Ignore pages which errored asynchronously. */
+					"page (index 0x%lx).", index);
 			page_cache_release(page);
+			nr_free -= PAGE_CACHE_SIZE * 8;
 			continue;
 		}
-		b = (u32*)kmap(page);
-		/* For each 4 bytes, add up the number zero bits. */
-	  	for (i = 0; i < max_size; i++)
-			nr_free += (s64)(32 - hweight32(b[i]));
-		kunmap(page);
-		page_cache_release(page);
-	}
-	if (max_size == PAGE_CACHE_SIZE >> 2) {
+		kaddr = (u32*)kmap_atomic(page, KM_USER0);
 		/*
-		 * Get the multiples of 4 bytes in use in the final partial
-		 * page.
+		 * For each 4 bytes, subtract the number of set bits. If this
+		 * is the last page and it is partial we don't really care as
+		 * it just means we do a little extra work but it won't affect
+		 * the result as all out of range bytes are set to zero by
+		 * ntfs_readpage().
 		 */
-		max_size = ((((vol->nr_clusters + 7) >> 3) & ~PAGE_CACHE_MASK)
-				+ 3) >> 2;
-		/* If there is a partial page go back and do it. */
-		if (max_size) {
-			ntfs_debug("Handling partial page, max_size = 0x%x.",
-					max_size);
-			goto handle_partial_page;
-		}
+	  	for (i = 0; i < max_size; i++)
+			nr_free -= (s64)hweight32(kaddr[i]);
+		kunmap_atomic(kaddr, KM_USER0);
+		page_cache_release(page);
 	}
-	ntfs_debug("Finished reading $BITMAP, last index = 0x%lx", index - 1);
+	ntfs_debug("Finished reading $Bitmap, last index = 0x%lx.", index - 1);
+	/*
+	 * Fixup for eventual bits outside logical ntfs volume (see function
+	 * description above).
+	 */
+	if (vol->nr_clusters & 63)
+		nr_free += 64 - (vol->nr_clusters & 63);
 	up_read(&vol->lcnbmp_lock);
+	/* If errors occured we may well have gone below zero, fix this. */
+	if (nr_free < 0)
+		nr_free = 0;
 	ntfs_debug("Exiting.");
 	return nr_free;
 }
@@ -1141,64 +1155,81 @@
  * @vol:	ntfs volume for which to obtain free inode count
  *
  * Calculate the number of free mft records (inodes) on the mounted NTFS
- * volume @vol.
- *
- * Errors are ignored and we just return the number of free inodes we have
- * found. This means we return an underestimate on error.
+ * volume @vol. We actually calculate the number of mft records in use instead
+ * because this allows us to not care about partial pages as these will be just
+ * zero filled and hence not be counted as allocated mft record.
+ *
+ * If any pages cannot be read we assume all mft records in the erroring pages
+ * are in use. This means we return an underestimate on errors which is better
+ * than an overestimate.
  *
  * NOTE: Caller must hold mftbmp_lock rw_semaphore for reading or writing.
  */
 static unsigned long __get_nr_free_mft_records(ntfs_volume *vol)
 {
-	struct address_space *mapping;
+	s64 nr_free = vol->nr_mft_records;
+	u32 *kaddr;
+	struct address_space *mapping = vol->mftbmp_ino->i_mapping;
+	filler_t *readpage = (filler_t*)mapping->a_ops->readpage;
 	struct page *page;
-	unsigned long index, max_index, nr_free = 0;
-	unsigned int max_size, i;
-	u32 *b;
+	unsigned long index, max_index;
+	unsigned int max_size;
 
-	mapping = vol->mftbmp_ino->i_mapping;
+	ntfs_debug("Entering.");
 	/*
-	 * Convert the number of bits into bytes rounded up to a multiple of 8
-	 * bytes, then convert into multiples of PAGE_CACHE_SIZE.
+	 * Convert the number of bits into bytes rounded up, then convert into
+	 * multiples of PAGE_CACHE_SIZE, rounding up so that if we have one
+	 * full and one partial page max_index = 2.
 	 */
-	max_index = (((vol->nr_mft_records + 7) >> 3) + 7) >> PAGE_CACHE_SHIFT;
+	max_index = (((vol->nr_mft_records + 7) >> 3) + PAGE_CACHE_SIZE - 1) >>
+			PAGE_CACHE_SHIFT;
 	/* Use multiples of 4 bytes. */
 	max_size = PAGE_CACHE_SIZE >> 2;
 	ntfs_debug("Reading $MFT/$BITMAP, max_index = 0x%lx, max_size = "
 			"0x%x.", max_index, max_size);
-	for (index = 0UL; index < max_index;) {
-handle_partial_page:
-		page = ntfs_map_page(mapping, index++);
+	for (index = 0UL; index < max_index; index++) {
+		unsigned int i;
+		/*
+		 * Read the page from page cache, getting it from backing store
+		 * if necessary, and increment the use count.
+		 */
+		page = read_cache_page(mapping, index, (filler_t*)readpage,
+				NULL);
+		/* Ignore pages which errored synchronously. */
 		if (IS_ERR(page)) {
-			ntfs_debug("ntfs_map_page() error. Skipping page "
-					"(index 0x%lx).", index - 1);
+			ntfs_debug("Sync read_cache_page() error. Skipping "
+					"page (index 0x%lx).", index);
+			nr_free -= PAGE_CACHE_SIZE * 8;
 			continue;
 		}
-		b = (u32*)page_address(page);
-		/* For each 4 bytes, add up the number of zero bits. */
-		for (i = 0; i < max_size; i++)
-			nr_free += 32 - hweight32(b[i]);
-		ntfs_unmap_page(page);
-	}
-	if (index == max_index) {
+		wait_on_page_locked(page);
+		/* Ignore pages which errored asynchronously. */
+		if (!PageUptodate(page)) {
+			ntfs_debug("Async read_cache_page() error. Skipping "
+					"page (index 0x%lx).", index);
+			page_cache_release(page);
+			nr_free -= PAGE_CACHE_SIZE * 8;
+			continue;
+		}
+		kaddr = (u32*)kmap_atomic(page, KM_USER0);
 		/*
-		 * Get the multiples of 4 bytes in use in the final partial
-		 * page.
+		 * For each 4 bytes, subtract the number of set bits. If this
+		 * is the last page and it is partial we don't really care as
+		 * it just means we do a little extra work but it won't affect
+		 * the result as all out of range bytes are set to zero by
+		 * ntfs_readpage().
 		 */
-		max_size = ((((((vol->nr_mft_records + 7) >> 3) + 7) & ~7) &
-				~PAGE_CACHE_MASK) + 3) >> 2;
-		/* If there is a partial page go back and do it. */
-		if (max_size) {
-			/* Compensate for out of bounds zero bits. */
-			if ((i = vol->nr_mft_records & 31))
-				nr_free -= 32 - i;
-			ntfs_debug("Handling partial page, max_size = 0x%x",
-					max_size);
-			goto handle_partial_page;
-		}
+	  	for (i = 0; i < max_size; i++)
+			nr_free -= (s64)hweight32(kaddr[i]);
+		kunmap_atomic(kaddr, KM_USER0);
+		page_cache_release(page);
 	}
-	ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx",
+	ntfs_debug("Finished reading $MFT/$BITMAP, last index = 0x%lx.",
 			index - 1);
+	/* If errors occured we may well have gone below zero, fix this. */
+	if (nr_free < 0)
+		nr_free = 0;
+	ntfs_debug("Exiting.");
 	return nr_free;
 }
 
@@ -1761,7 +1792,7 @@
 }
 
 MODULE_AUTHOR("Anton Altaparmakov <aia21@cantab.net>");
-MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2002 Anton Altaparmakov");
+MODULE_DESCRIPTION("NTFS 1.2/3.x driver - Copyright (c) 2001-2003 Anton Altaparmakov");
 MODULE_LICENSE("GPL");
 #ifdef DEBUG
 MODULE_PARM(debug_msgs, "i");
diff -urN linux-2.5.68-bk10/fs/ntfs/unistr.c linux-2.5.68-bk11/fs/ntfs/unistr.c
--- linux-2.5.68-bk10/fs/ntfs/unistr.c	2003-04-19 19:50:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/unistr.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,7 +1,7 @@
 /*
  * unistr.c - NTFS Unicode string handling. Part of the Linux-NTFS project.
  *
- * Copyright (c) 2001 Anton Altaparmakov.
+ * Copyright (c) 2001-2003 Anton Altaparmakov
  *
  * This program/include file is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as published
@@ -96,10 +96,12 @@
 		const int err_val, const IGNORE_CASE_BOOL ic,
 		const uchar_t *upcase, const u32 upcase_len)
 {
-	u32 cnt;
-	const u32 min_len = min_t(const u32, name1_len, name2_len);
+	u32 cnt, min_len;
 	uchar_t c1, c2;
 
+	min_len = name1_len;
+	if (name1_len > name2_len)
+		min_len = name2_len;
 	for (cnt = 0; cnt < min_len; ++cnt) {
 		c1 = le16_to_cpu(*name1++);
 		c2 = le16_to_cpu(*name2++);
diff -urN linux-2.5.68-bk10/fs/ntfs/upcase.c linux-2.5.68-bk11/fs/ntfs/upcase.c
--- linux-2.5.68-bk10/fs/ntfs/upcase.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/fs/ntfs/upcase.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,8 +2,8 @@
  * upcase.c - Generate the full NTFS Unicode upcase table in little endian.
  *	      Part of the Linux-NTFS project.
  *
- * Copyright (C) 2001 Richard Russon <ntfs@flatcap.org>
- * Copyright (c) 2001,2002 Anton Altaparmakov
+ * Copyright (c) 2001 Richard Russon <ntfs@flatcap.org>
+ * Copyright (c) 2001-2003 Anton Altaparmakov
  *
  * Modified for mkntfs inclusion 9 June 2001 by Anton Altaparmakov.
  * Modified for kernel inclusion 10 September 2001 by Anton Altparmakov.
@@ -28,7 +28,7 @@
 
 uchar_t *generate_default_upcase(void)
 {
-	const int uc_run_table[][3] = { /* Start, End, Add */
+	static const int uc_run_table[][3] = { /* Start, End, Add */
 	{0x0061, 0x007B,  -32}, {0x0451, 0x045D, -80}, {0x1F70, 0x1F72,  74},
 	{0x00E0, 0x00F7,  -32}, {0x045E, 0x0460, -80}, {0x1F72, 0x1F76,  86},
 	{0x00F8, 0x00FF,  -32}, {0x0561, 0x0587, -48}, {0x1F76, 0x1F78, 100},
@@ -45,7 +45,7 @@
 	{0}
 	};
 
-	const int uc_dup_table[][2] = { /* Start, End */
+	static const int uc_dup_table[][2] = { /* Start, End */
 	{0x0100, 0x012F}, {0x01A0, 0x01A6}, {0x03E2, 0x03EF}, {0x04CB, 0x04CC},
 	{0x0132, 0x0137}, {0x01B3, 0x01B7}, {0x0460, 0x0481}, {0x04D0, 0x04EB},
 	{0x0139, 0x0149}, {0x01CD, 0x01DD}, {0x0490, 0x04BF}, {0x04EE, 0x04F5},
@@ -55,7 +55,7 @@
 	{0}
 	};
 
-	const int uc_word_table[][2] = { /* Offset, Value */
+	static const int uc_word_table[][2] = { /* Offset, Value */
 	{0x00FF, 0x0178}, {0x01AD, 0x01AC}, {0x01F3, 0x01F1}, {0x0269, 0x0196},
 	{0x0183, 0x0182}, {0x01B0, 0x01AF}, {0x0253, 0x0181}, {0x026F, 0x019C},
 	{0x0185, 0x0184}, {0x01B9, 0x01B8}, {0x0254, 0x0186}, {0x0272, 0x019D},
diff -urN linux-2.5.68-bk10/fs/partitions/check.c linux-2.5.68-bk11/fs/partitions/check.c
--- linux-2.5.68-bk10/fs/partitions/check.c	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/partitions/check.c	2003-05-01 04:40:40.000000000 -0700
@@ -99,25 +99,32 @@
 #ifdef CONFIG_DEVFS_FS
 	if (hd->devfs_name[0] != '\0') {
 		if (part)
-			sprintf(buf, "%s/part%d", hd->devfs_name, part);
+			snprintf(buf, BDEVNAME_SIZE, "%s/part%d",
+					hd->devfs_name, part);
 		else if (hd->minors != 1)
-			sprintf(buf, "%s/disc", hd->devfs_name);
+			snprintf(buf, BDEVNAME_SIZE, "%s/disc", hd->devfs_name);
 		else
-			sprintf(buf, "%s", hd->devfs_name);
+			snprintf(buf, BDEVNAME_SIZE, "%s", hd->devfs_name);
 		return buf;
 	}
 #endif
 
 	if (!part)
-		sprintf(buf, "%s", hd->disk_name);
+		snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name);
 	else if (isdigit(hd->disk_name[strlen(hd->disk_name)-1]))
-		sprintf(buf, "%sp%d", hd->disk_name, part);
+		snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, part);
 	else
-		sprintf(buf, "%s%d", hd->disk_name, part);
+		snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, part);
 
 	return buf;
 }
 
+const char *bdevname(struct block_device *bdev, char *buf)
+{
+	int part = MINOR(bdev->bd_dev) - bdev->bd_disk->first_minor;
+	return disk_name(bdev->bd_disk, part, buf);
+}
+
 static struct parsed_partitions *
 check_partition(struct gendisk *hd, struct block_device *bdev)
 {
@@ -417,7 +424,7 @@
 struct dev_name {
 	struct list_head list;
 	dev_t dev;
-	char namebuf[64];
+	char namebuf[BDEVNAME_SIZE];
 	char *name;
 };
 
diff -urN linux-2.5.68-bk10/fs/partitions/check.h linux-2.5.68-bk11/fs/partitions/check.h
--- linux-2.5.68-bk10/fs/partitions/check.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/fs/partitions/check.h	2003-05-01 04:40:40.000000000 -0700
@@ -8,7 +8,7 @@
 enum { MAX_PART = 256 };
 
 struct parsed_partitions {
-	char name[40];
+	char name[BDEVNAME_SIZE];
 	struct {
 		sector_t from;
 		sector_t size;
diff -urN linux-2.5.68-bk10/fs/proc/generic.c linux-2.5.68-bk11/fs/proc/generic.c
--- linux-2.5.68-bk10/fs/proc/generic.c	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk11/fs/proc/generic.c	2003-05-01 04:40:40.000000000 -0700
@@ -136,11 +136,11 @@
 				       "proc_file_read: Apparent buffer overflow!\n");
 				n = PAGE_SIZE;
 			}
-			if (n > count)
-				n = count;
 			n -= *ppos;
 			if (n <= 0)
 				break;
+			if (n > count)
+				n = count;
 			start = page + *ppos;
 		} else if (start < page) {
 			if (n > PAGE_SIZE) {
diff -urN linux-2.5.68-bk10/include/asm-i386/cpufeature.h linux-2.5.68-bk11/include/asm-i386/cpufeature.h
--- linux-2.5.68-bk10/include/asm-i386/cpufeature.h	2003-04-19 19:50:30.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-i386/cpufeature.h	2003-05-01 04:40:40.000000000 -0700
@@ -63,6 +63,11 @@
 #define X86_FEATURE_K6_MTRR	(3*32+ 1) /* AMD K6 nonstandard MTRRs */
 #define X86_FEATURE_CYRIX_ARR	(3*32+ 2) /* Cyrix ARRs (= MTRRs) */
 #define X86_FEATURE_CENTAUR_MCR	(3*32+ 3) /* Centaur MCRs (= MTRRs) */
+/* cpu types for specific tunings: */
+#define X86_FEATURE_K8		(3*32+ 4) /* Opteron, Athlon64 */
+#define X86_FEATURE_K7		(3*32+ 5) /* Athlon */
+#define X86_FEATURE_P3		(3*32+ 6) /* P3 */
+#define X86_FEATURE_P4		(3*32+ 7) /* P4 */
 
 /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
 
diff -urN linux-2.5.68-bk10/include/asm-i386/processor.h linux-2.5.68-bk11/include/asm-i386/processor.h
--- linux-2.5.68-bk10/include/asm-i386/processor.h	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-i386/processor.h	2003-05-01 04:40:40.000000000 -0700
@@ -15,6 +15,7 @@
 #include <asm/sigcontext.h>
 #include <asm/cpufeature.h>
 #include <asm/msr.h>
+#include <asm/system.h>
 #include <linux/cache.h>
 #include <linux/config.h>
 #include <linux/threads.h>
@@ -495,32 +496,93 @@
 
 #define cpu_relax()	rep_nop()
 
-/* Prefetch instructions for Pentium III and AMD Athlon */
-#ifdef 	CONFIG_X86_PREFETCH
+/* generic versions from gas */
+#define GENERIC_NOP1	".byte 0x90\n"
+#define GENERIC_NOP2    	".byte 0x89,0xf6\n"
+#define GENERIC_NOP3        ".byte 0x8d,0x76,0x00\n"
+#define GENERIC_NOP4        ".byte 0x8d,0x74,0x26,0x00\n"
+#define GENERIC_NOP5        GENERIC_NOP1 GENERIC_NOP4
+#define GENERIC_NOP6	".byte 0x8d,0xb6,0x00,0x00,0x00,0x00\n"
+#define GENERIC_NOP7	".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n"
+#define GENERIC_NOP8	GENERIC_NOP1 GENERIC_NOP7
+
+/* Opteron nops */
+#define K8_NOP1 GENERIC_NOP1
+#define K8_NOP2	".byte 0x66,0x90\n" 
+#define K8_NOP3	".byte 0x66,0x66,0x90\n" 
+#define K8_NOP4	".byte 0x66,0x66,0x66,0x90\n" 
+#define K8_NOP5	K8_NOP3 K8_NOP2 
+#define K8_NOP6	K8_NOP3 K8_NOP3
+#define K8_NOP7	K8_NOP4 K8_NOP3
+#define K8_NOP8	K8_NOP4 K8_NOP4
+
+/* K7 nops */
+/* uses eax dependencies (arbitary choice) */
+#define K7_NOP1  GENERIC_NOP1
+#define K7_NOP2	".byte 0x8b,0xc0\n" 
+#define K7_NOP3	".byte 0x8d,0x04,0x20\n"
+#define K7_NOP4	".byte 0x8d,0x44,0x20,0x00\n"
+#define K7_NOP5	K7_NOP4 ASM_NOP1
+#define K7_NOP6	".byte 0x8d,0x80,0,0,0,0\n"
+#define K7_NOP7        ".byte 0x8D,0x04,0x05,0,0,0,0\n"
+#define K7_NOP8        K7_NOP7 ASM_NOP1
+
+#ifdef CONFIG_MK8
+#define ASM_NOP1 K8_NOP1
+#define ASM_NOP2 K8_NOP2
+#define ASM_NOP3 K8_NOP3
+#define ASM_NOP4 K8_NOP4
+#define ASM_NOP5 K8_NOP5
+#define ASM_NOP6 K8_NOP6
+#define ASM_NOP7 K8_NOP7
+#define ASM_NOP8 K8_NOP8
+#elif CONFIG_MK7
+#define ASM_NOP1 K7_NOP1
+#define ASM_NOP2 K7_NOP2
+#define ASM_NOP3 K7_NOP3
+#define ASM_NOP4 K7_NOP4
+#define ASM_NOP5 K7_NOP5
+#define ASM_NOP6 K7_NOP6
+#define ASM_NOP7 K7_NOP7
+#define ASM_NOP8 K7_NOP8
+#else
+#define ASM_NOP1 GENERIC_NOP1
+#define ASM_NOP2 GENERIC_NOP2
+#define ASM_NOP3 GENERIC_NOP3
+#define ASM_NOP4 GENERIC_NOP4
+#define ASM_NOP5 GENERIC_NOP5
+#define ASM_NOP6 GENERIC_NOP6
+#define ASM_NOP7 GENERIC_NOP7
+#define ASM_NOP8 GENERIC_NOP8
+#endif
 
+#define ASM_NOP_MAX 8
+
+/* Prefetch instructions for Pentium III and AMD Athlon */
+/* It's not worth to care about 3dnow! prefetches for the K6
+   because they are microcoded there and very slow. */
 #define ARCH_HAS_PREFETCH
 extern inline void prefetch(const void *x)
 {
-	__asm__ __volatile__ ("prefetchnta (%0)" : : "r"(x));
+	alternative_input(ASM_NOP4,
+			  "prefetchnta (%1)",
+			  X86_FEATURE_XMM,
+			  "r" (x));
 }
 
-#elif defined CONFIG_X86_USE_3DNOW
-
 #define ARCH_HAS_PREFETCH
 #define ARCH_HAS_PREFETCHW
 #define ARCH_HAS_SPINLOCK_PREFETCH
 
-extern inline void prefetch(const void *x)
-{
-	 __asm__ __volatile__ ("prefetch (%0)" : : "r"(x));
-}
-
+/* 3dnow! prefetch to get an exclusive cache line. Useful for 
+   spinlocks to avoid one state transition in the cache coherency protocol. */
 extern inline void prefetchw(const void *x)
 {
-	 __asm__ __volatile__ ("prefetchw (%0)" : : "r"(x));
+	alternative_input(ASM_NOP4,
+			  "prefetchw (%1)",
+			  X86_FEATURE_3DNOW,
+			  "r" (x));
 }
 #define spin_lock_prefetch(x)	prefetchw(x)
 
-#endif
-
 #endif /* __ASM_I386_PROCESSOR_H */
diff -urN linux-2.5.68-bk10/include/asm-i386/system.h linux-2.5.68-bk11/include/asm-i386/system.h
--- linux-2.5.68-bk10/include/asm-i386/system.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-i386/system.h	2003-05-01 04:40:40.000000000 -0700
@@ -277,13 +277,16 @@
 /* Compiling for a 386 proper.	Is it worth implementing via cli/sti?  */
 #endif
 
+#ifdef __KERNEL__
 struct alt_instr { 
-	u8 *instr; 		/* original instruction */
-	u8  cpuid;		/* cpuid bit set for replacement */
-	u8  instrlen;		/* length of original instruction */
-	u8  replacementlen; 	/* length of new instruction, <= instrlen */ 
-	u8  replacement[0];   	/* new instruction */
+	__u8 *instr; 		/* original instruction */
+	__u8 *replacement;
+	__u8  cpuid;		/* cpuid bit set for replacement */
+	__u8  instrlen;		/* length of original instruction */
+	__u8  replacementlen; 	/* length of new instruction, <= instrlen */ 
+	__u8  pad;
 }; 
+#endif
 
 /* 
  * Alternative instructions for different CPU types or capabilities.
@@ -302,13 +305,40 @@
 		      ".section .altinstructions,\"a\"\n"     	     \
 		      "  .align 4\n"				       \
 		      "  .long 661b\n"            /* label */          \
+		      "  .long 663f\n"		  /* new instruction */ 	\
 		      "  .byte %c0\n"             /* feature bit */    \
 		      "  .byte 662b-661b\n"       /* sourcelen */      \
 		      "  .byte 664f-663f\n"       /* replacementlen */ \
+		      ".previous\n"						\
+		      ".section .altinstr_replacement,\"ax\"\n"			\
 		      "663:\n\t" newinstr "\n664:\n"   /* replacement */    \
 		      ".previous" :: "i" (feature) : "memory")  
 
 /*
+ * Alternative inline assembly with input.
+ * 
+ * Pecularities:
+ * No memory clobber here. 
+ * Argument numbers start with 1.
+ * Best is to use constraints that are fixed size (like (%1) ... "r")
+ * If you use variable sized constraints like "m" or "g" in the 
+ * replacement maake sure to pad to the worst case length.
+ */
+#define alternative_input(oldinstr, newinstr, feature, input)			\
+	asm volatile ("661:\n\t" oldinstr "\n662:\n"				\
+		      ".section .altinstructions,\"a\"\n"			\
+		      "  .align 4\n"						\
+		      "  .long 661b\n"            /* label */			\
+		      "  .long 663f\n"		  /* new instruction */ 	\
+		      "  .byte %c0\n"             /* feature bit */		\
+		      "  .byte 662b-661b\n"       /* sourcelen */		\
+		      "  .byte 664f-663f\n"       /* replacementlen */ 		\
+		      ".previous\n"						\
+		      ".section .altinstr_replacement,\"ax\"\n"			\
+		      "663:\n\t" newinstr "\n664:\n"   /* replacement */ 	\
+		      ".previous" :: "i" (feature), input)  
+
+/*
  * Force strict CPU ordering.
  * And yes, this is required on UP too when we're talking
  * to devices.
diff -urN linux-2.5.68-bk10/include/asm-ppc/bug.h linux-2.5.68-bk11/include/asm-ppc/bug.h
--- linux-2.5.68-bk10/include/asm-ppc/bug.h	2003-04-19 19:50:34.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-ppc/bug.h	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
 #define _PPC_BUG_H
 
 #include <linux/config.h>
-#include <asm/system.h> /* for xmon definition */
+#include <asm/xmon.h>
 
 #ifdef CONFIG_XMON
 extern void xmon(struct pt_regs *);
diff -urN linux-2.5.68-bk10/include/asm-ppc/cputable.h linux-2.5.68-bk11/include/asm-ppc/cputable.h
--- linux-2.5.68-bk10/include/asm-ppc/cputable.h	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-ppc/cputable.h	2003-05-01 04:40:40.000000000 -0700
@@ -74,6 +74,7 @@
 #define CPU_FTR_NAP_DISABLE_L2_PR	0x00002000
 #define CPU_FTR_DUAL_PLL_750FX		0x00004000
 #define CPU_FTR_NO_DPM			0x00008000
+#define CPU_FTR_HAS_HIGH_BATS		0x00010000
 
 #ifdef __ASSEMBLY__
 
diff -urN linux-2.5.68-bk10/include/asm-ppc/delay.h linux-2.5.68-bk11/include/asm-ppc/delay.h
--- linux-2.5.68-bk10/include/asm-ppc/delay.h	2003-04-19 19:50:08.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-ppc/delay.h	2003-05-01 04:40:40.000000000 -0700
@@ -31,7 +31,7 @@
  *  -- paulus
  */
 #define __MAX_UDELAY	(226050910/HZ)	/* maximum udelay argument */
-#define __MAX_NDELAY	(4294967295/HZ)	/* maximum ndelay argument */
+#define __MAX_NDELAY	(2147483647/HZ)	/* maximum ndelay argument */
 
 extern __inline__ void __udelay(unsigned int x)
 {
diff -urN linux-2.5.68-bk10/include/asm-ppc/processor.h linux-2.5.68-bk11/include/asm-ppc/processor.h
--- linux-2.5.68-bk10/include/asm-ppc/processor.h	2003-04-19 19:48:48.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-ppc/processor.h	2003-05-01 04:40:40.000000000 -0700
@@ -104,6 +104,15 @@
 #define	SPRN_DBAT2U	0x21C	/* Data BAT 2 Upper Register */
 #define	SPRN_DBAT3L	0x21F	/* Data BAT 3 Lower Register */
 #define	SPRN_DBAT3U	0x21E	/* Data BAT 3 Upper Register */
+#define	SPRN_DBAT4L	0x239	/* Data BAT 4 Lower Register */
+#define	SPRN_DBAT4U	0x238	/* Data BAT 4 Upper Register */
+#define	SPRN_DBAT5L	0x23B	/* Data BAT 5 Lower Register */
+#define	SPRN_DBAT5U	0x23A	/* Data BAT 5 Upper Register */
+#define	SPRN_DBAT6L	0x23D	/* Data BAT 6 Lower Register */
+#define	SPRN_DBAT6U	0x23C	/* Data BAT 6 Upper Register */
+#define	SPRN_DBAT7L	0x23F	/* Data BAT 7 Lower Register */
+#define	SPRN_DBAT7U	0x23E	/* Data BAT 7 Upper Register */
+
 #define	SPRN_DBCR	0x3F2	/* Debug Control Regsiter */
 #define	  DBCR_EDM	0x80000000
 #define	  DBCR_IDM	0x40000000
@@ -267,6 +276,14 @@
 #define	SPRN_IBAT2U	0x214	/* Instruction BAT 2 Upper Register */
 #define	SPRN_IBAT3L	0x217	/* Instruction BAT 3 Lower Register */
 #define	SPRN_IBAT3U	0x216	/* Instruction BAT 3 Upper Register */
+#define	SPRN_IBAT4L	0x231	/* Instruction BAT 4 Lower Register */
+#define	SPRN_IBAT4U	0x230	/* Instruction BAT 4 Upper Register */
+#define	SPRN_IBAT5L	0x233	/* Instruction BAT 5 Lower Register */
+#define	SPRN_IBAT5U	0x232	/* Instruction BAT 5 Upper Register */
+#define	SPRN_IBAT6L	0x235	/* Instruction BAT 6 Lower Register */
+#define	SPRN_IBAT6U	0x234	/* Instruction BAT 6 Upper Register */
+#define	SPRN_IBAT7L	0x237	/* Instruction BAT 7 Lower Register */
+#define	SPRN_IBAT7U	0x236	/* Instruction BAT 7 Upper Register */
 #define	SPRN_ICCR	0x3FB	/* Instruction Cache Cacheability Register */
 #define	  ICCR_NOCACHE		0	/* Noncacheable */
 #define	  ICCR_CACHE		1	/* Cacheable */
@@ -448,6 +465,14 @@
 #define	DBAT2U	SPRN_DBAT2U	/* Data BAT 2 Upper Register */
 #define	DBAT3L	SPRN_DBAT3L	/* Data BAT 3 Lower Register */
 #define	DBAT3U	SPRN_DBAT3U	/* Data BAT 3 Upper Register */
+#define	DBAT4L	SPRN_DBAT4L	/* Data BAT 4 Lower Register */
+#define	DBAT4U	SPRN_DBAT4U	/* Data BAT 4 Upper Register */
+#define	DBAT5L	SPRN_DBAT5L	/* Data BAT 5 Lower Register */
+#define	DBAT5U	SPRN_DBAT5U	/* Data BAT 5 Upper Register */
+#define	DBAT6L	SPRN_DBAT6L	/* Data BAT 6 Lower Register */
+#define	DBAT6U	SPRN_DBAT6U	/* Data BAT 6 Upper Register */
+#define	DBAT7L	SPRN_DBAT7L	/* Data BAT 7 Lower Register */
+#define	DBAT7U	SPRN_DBAT7U	/* Data BAT 7 Upper Register */
 #define	DCMP	SPRN_DCMP      	/* Data TLB Compare Register */
 #define	DEC	SPRN_DEC       	/* Decrement Register */
 #define	DMISS	SPRN_DMISS     	/* Data TLB Miss Register */
@@ -466,6 +491,14 @@
 #define	IBAT2U	SPRN_IBAT2U	/* Instruction BAT 2 Upper Register */
 #define	IBAT3L	SPRN_IBAT3L	/* Instruction BAT 3 Lower Register */
 #define	IBAT3U	SPRN_IBAT3U	/* Instruction BAT 3 Upper Register */
+#define	IBAT4L	SPRN_IBAT4L	/* Instruction BAT 4 Lower Register */
+#define	IBAT4U	SPRN_IBAT4U	/* Instruction BAT 4 Upper Register */
+#define	IBAT5L	SPRN_IBAT5L	/* Instruction BAT 5 Lower Register */
+#define	IBAT5U	SPRN_IBAT5U	/* Instruction BAT 5 Upper Register */
+#define	IBAT6L	SPRN_IBAT6L	/* Instruction BAT 6 Lower Register */
+#define	IBAT6U	SPRN_IBAT6U	/* Instruction BAT 6 Upper Register */
+#define	IBAT7L	SPRN_IBAT7L	/* Instruction BAT 7 Lower Register */
+#define	IBAT7U	SPRN_IBAT7U	/* Instruction BAT 7 Upper Register */
 #define	ICMP	SPRN_ICMP	/* Instruction TLB Compare Register */
 #define	IMISS	SPRN_IMISS	/* Instruction TLB Miss Register */
 #define	IMMR	SPRN_IMMR      	/* PPC 860/821 Internal Memory Map Register */
diff -urN linux-2.5.68-bk10/include/asm-ppc/system.h linux-2.5.68-bk11/include/asm-ppc/system.h
--- linux-2.5.68-bk10/include/asm-ppc/system.h	2003-04-19 19:49:17.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-ppc/system.h	2003-05-01 04:40:40.000000000 -0700
@@ -50,8 +50,6 @@
 #endif /* CONFIG_SMP */
 
 #ifdef __KERNEL__
-extern void xmon_irq(int, void *, struct pt_regs *);
-extern void xmon(struct pt_regs *excp);
 extern void print_backtrace(unsigned long *);
 extern void show_regs(struct pt_regs * regs);
 extern void flush_instruction_cache(void);
diff -urN linux-2.5.68-bk10/include/asm-ppc/xmon.h linux-2.5.68-bk11/include/asm-ppc/xmon.h
--- linux-2.5.68-bk10/include/asm-ppc/xmon.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.68-bk11/include/asm-ppc/xmon.h	2003-05-01 04:40:40.000000000 -0700
@@ -0,0 +1,17 @@
+#ifndef __PPC_XMON_H
+#define __PPC_XMON_H
+#ifdef __KERNEL__
+
+struct pt_regs;
+
+extern void xmon(struct pt_regs *excp);
+extern void xmon_printf(const char *fmt, ...);
+extern void xmon_map_scc(void);
+extern int xmon_bpt(struct pt_regs *regs);
+extern int xmon_sstep(struct pt_regs *regs);
+extern int xmon_iabr_match(struct pt_regs *regs);
+extern int xmon_dabr_match(struct pt_regs *regs);
+extern void (*xmon_fault_handler)(struct pt_regs *regs);
+
+#endif
+#endif
diff -urN linux-2.5.68-bk10/include/asm-sparc/bitext.h linux-2.5.68-bk11/include/asm-sparc/bitext.h
--- linux-2.5.68-bk10/include/asm-sparc/bitext.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.68-bk11/include/asm-sparc/bitext.h	2003-05-01 04:40:40.000000000 -0700
@@ -0,0 +1,24 @@
+/*
+ * bitext.h: Bit string operations on the sparc, specific to architecture.
+ *
+ * Copyright 2002 Pete Zaitcev <zaitcev@yahoo.com>
+ */
+
+#ifndef _SPARC_BITEXT_H
+#define _SPARC_BITEXT_H
+
+#include <linux/smp_lock.h>
+
+struct bit_map {
+	spinlock_t lock;
+	unsigned long *map;
+	int size;
+	int used;
+	int last_off;
+};
+
+extern int bit_map_string_get(struct bit_map *t, int len, int align);
+extern void bit_map_clear(struct bit_map *t, int offset, int len);
+extern void bit_map_init(struct bit_map *t, unsigned long *map, int size);
+
+#endif /* defined(_SPARC_BITEXT_H) */
diff -urN linux-2.5.68-bk10/include/asm-sparc/iommu.h linux-2.5.68-bk11/include/asm-sparc/iommu.h
--- linux-2.5.68-bk10/include/asm-sparc/iommu.h	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-sparc/iommu.h	2003-05-01 04:40:40.000000000 -0700
@@ -6,6 +6,7 @@
 #define _SPARC_IOMMU_H
 
 #include <asm/page.h>
+#include <asm/bitext.h>
 
 /* The iommu handles all virtual to physical address translations
  * that occur between the SBUS and physical memory.  Access by
@@ -100,11 +101,11 @@
 struct iommu_struct {
 	struct iommu_regs *regs;
 	iopte_t *page_table;
-	iopte_t *lowest;     /* to speed up searches... */
-	unsigned long plow;
 	/* For convenience */
 	unsigned long start; /* First managed virtual address */
 	unsigned long end;   /* Last managed virtual address */
+
+	struct bit_map usemap;
 };
 
 extern __inline__ void iommu_invalidate(struct iommu_regs *regs)
@@ -112,9 +113,9 @@
 	regs->tlbflush = 0;
 }
 
-extern __inline__ void iommu_invalidate_page(struct iommu_regs *regs, unsigned long page)
+extern __inline__ void iommu_invalidate_page(struct iommu_regs *regs, unsigned long ba)
 {
-	regs->pageflush = (page & PAGE_MASK);
+	regs->pageflush = (ba & PAGE_MASK);
 }
 
 #endif /* !(_SPARC_IOMMU_H) */
diff -urN linux-2.5.68-bk10/include/asm-sparc/pgtable.h linux-2.5.68-bk11/include/asm-sparc/pgtable.h
--- linux-2.5.68-bk10/include/asm-sparc/pgtable.h	2003-04-19 19:49:56.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-sparc/pgtable.h	2003-05-01 04:40:40.000000000 -0700
@@ -27,6 +27,7 @@
 #ifndef __ASSEMBLY__
 
 struct vm_area_struct;
+struct page;
 
 extern void load_mmu(void);
 extern unsigned long calc_highpages(void);
@@ -51,15 +52,30 @@
 
 /*
  * mmu_map/unmap are provided by iommu/iounit; Invalid to call on IIep.
+ *
+ * The mmu_map_dma_area establishes two mappings in one go.
+ * These mappings point to pages normally mapped at 'va' (linear address).
+ * First mapping is for CPU visible address at 'a', uncached.
+ * This is an alias, but it works because it is an uncached mapping.
+ * Second mapping is for device visible address, or "bus" address.
+ * The bus address is returned at '*pba'.
+ *
+ * These functions seem distinct, but are hard to split. On sun4c,
+ * at least for now, 'a' is equal to bus address, and retured in *pba.
+ * On sun4m, page attributes depend on the CPU type, so we have to
+ * know if we are mapping RAM or I/O, so it has to be an additional argument
+ * to a separate mapping function for CPU visible mappings.
  */
-BTFIXUPDEF_CALL(void,  mmu_map_dma_area, unsigned long va, __u32 addr, int len)
-BTFIXUPDEF_CALL(unsigned long /*phys*/, mmu_translate_dvma, unsigned long busa)
+BTFIXUPDEF_CALL(int,  mmu_map_dma_area, dma_addr_t *, unsigned long, unsigned long, int len)
+BTFIXUPDEF_CALL(struct page *, mmu_translate_dvma, unsigned long busa)
 BTFIXUPDEF_CALL(void,  mmu_unmap_dma_area, unsigned long busa, int len)
 
-#define mmu_map_dma_area(va, ba,len) BTFIXUP_CALL(mmu_map_dma_area)(va,ba,len)
+#define mmu_map_dma_area(pba,va,a,len) BTFIXUP_CALL(mmu_map_dma_area)(pba,va,a,len)
 #define mmu_unmap_dma_area(ba,len) BTFIXUP_CALL(mmu_unmap_dma_area)(ba,len)
 #define mmu_translate_dvma(ba)     BTFIXUP_CALL(mmu_translate_dvma)(ba)
 
+/*
+ */
 BTFIXUPDEF_SIMM13(pmd_shift)
 BTFIXUPDEF_SETHI(pmd_size)
 BTFIXUPDEF_SETHI(pmd_mask)
@@ -377,6 +393,12 @@
 
 #define update_mmu_cache(vma,addr,pte) BTFIXUP_CALL(update_mmu_cache)(vma,addr,pte)
 
+BTFIXUPDEF_CALL(void, sparc_mapiorange, unsigned int, unsigned long,
+    unsigned long, unsigned int)
+BTFIXUPDEF_CALL(void, sparc_unmapiorange, unsigned long, unsigned int)
+#define sparc_mapiorange(bus,pa,va,len) BTFIXUP_CALL(sparc_mapiorange)(bus,pa,va,len)
+#define sparc_unmapiorange(va,len) BTFIXUP_CALL(sparc_unmapiorange)(va,len)
+
 extern int invalid_segment;
 
 /* Encode and de-code a swap entry */
diff -urN linux-2.5.68-bk10/include/asm-sparc/sbus.h linux-2.5.68-bk11/include/asm-sparc/sbus.h
--- linux-2.5.68-bk10/include/asm-sparc/sbus.h	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-sparc/sbus.h	2003-05-01 04:40:40.000000000 -0700
@@ -10,7 +10,7 @@
 #include <linux/ioport.h>
 
 #include <asm/oplib.h>
-#include <asm/iommu.h>
+/* #include <asm/iommu.h> */ /* Unused since we use opaque iommu (|io-unit) */
 #include <asm/scatterlist.h>
 
 /* We scan which devices are on the SBus using the PROM node device
diff -urN linux-2.5.68-bk10/include/asm-x86_64/floppy.h linux-2.5.68-bk11/include/asm-x86_64/floppy.h
--- linux-2.5.68-bk10/include/asm-x86_64/floppy.h	2003-04-19 19:48:56.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-x86_64/floppy.h	2003-05-01 04:40:40.000000000 -0700
@@ -51,7 +51,7 @@
 static int virtual_dma_mode;
 static int doing_pdma;
 
-static void floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
+static irqreturn_t floppy_hardint(int irq, void *dev_id, struct pt_regs * regs)
 {
 	register unsigned char st;
 
@@ -109,12 +109,14 @@
 #endif
 		doing_pdma = 0;
 		floppy_interrupt(irq, dev_id, regs);
-		return;
+		return IRQ_HANDLED;
 	}
 #ifdef TRACE_FLPY_INT
 	if(!virtual_dma_count)
 		dma_wait++;
 #endif
+
+	return IRQ_HANDLED;
 }
 
 static void fd_disable_dma(void)
diff -urN linux-2.5.68-bk10/include/asm-x86_64/mpspec.h linux-2.5.68-bk11/include/asm-x86_64/mpspec.h
--- linux-2.5.68-bk10/include/asm-x86_64/mpspec.h	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-x86_64/mpspec.h	2003-05-01 04:40:40.000000000 -0700
@@ -198,6 +198,8 @@
 #endif /*CONFIG_X86_IO_APIC*/
 #endif
 
+extern void mp_config_ioapic_for_sci(int irq);
+
 extern int using_apic_timer;
 
 #endif
diff -urN linux-2.5.68-bk10/include/asm-x86_64/msr.h linux-2.5.68-bk11/include/asm-x86_64/msr.h
--- linux-2.5.68-bk10/include/asm-x86_64/msr.h	2003-04-19 19:51:07.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-x86_64/msr.h	2003-05-01 04:40:40.000000000 -0700
@@ -228,6 +228,9 @@
 
 /* VIA Cyrix defined MSRs*/
 #define MSR_VIA_FCR			0x1107
+#define MSR_VIA_LONGHAUL		0x110a
+#define MSR_VIA_RNG			0x110b
+#define MSR_VIA_BCR2			0x1147
 
 /* Intel defined MSRs. */
 #define MSR_IA32_P5_MC_ADDR		0
diff -urN linux-2.5.68-bk10/include/asm-x86_64/processor.h linux-2.5.68-bk11/include/asm-x86_64/processor.h
--- linux-2.5.68-bk10/include/asm-x86_64/processor.h	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-x86_64/processor.h	2003-05-01 04:40:40.000000000 -0700
@@ -304,11 +304,16 @@
 
 #define cpu_has_fpu 1
 
+#if 0
+/* disabled for now to work around opteron errata #91. Also gcc 3.2
+   doesn't like this in some cases. */
 #define ARCH_HAS_PREFETCH
+#define prefetch(x) __builtin_prefetch((x),0,1)
+#endif
+
 #define ARCH_HAS_PREFETCHW
 #define ARCH_HAS_SPINLOCK_PREFETCH
 
-#define prefetch(x) __builtin_prefetch((x),0,1)
 #define prefetchw(x) __builtin_prefetch((x),1,1)
 #define spin_lock_prefetch(x)  prefetchw(x)
 #define cpu_relax()   rep_nop()
diff -urN linux-2.5.68-bk10/include/asm-x86_64/vsyscall.h linux-2.5.68-bk11/include/asm-x86_64/vsyscall.h
--- linux-2.5.68-bk10/include/asm-x86_64/vsyscall.h	2003-04-19 19:51:12.000000000 -0700
+++ linux-2.5.68-bk11/include/asm-x86_64/vsyscall.h	2003-05-01 04:40:40.000000000 -0700
@@ -1,7 +1,6 @@
 #ifndef _ASM_X86_64_VSYSCALL_H_
 #define _ASM_X86_64_VSYSCALL_H_
 
-#include <linux/time.h>
 #include <linux/seqlock.h>
 
 enum vsyscall_num {
diff -urN linux-2.5.68-bk10/include/linux/compat_ioctl.h linux-2.5.68-bk11/include/linux/compat_ioctl.h
--- linux-2.5.68-bk10/include/linux/compat_ioctl.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.5.68-bk11/include/linux/compat_ioctl.h	2003-05-01 04:40:40.000000000 -0700
@@ -0,0 +1,653 @@
+/* List here explicitly which ioctl's are known to have
+ * compatible types passed or none at all...
+ */
+/* Big T */
+COMPATIBLE_IOCTL(TCGETA)
+COMPATIBLE_IOCTL(TCSETA)
+COMPATIBLE_IOCTL(TCSETAW)
+COMPATIBLE_IOCTL(TCSETAF)
+COMPATIBLE_IOCTL(TCSBRK)
+COMPATIBLE_IOCTL(TCXONC)
+COMPATIBLE_IOCTL(TCFLSH)
+COMPATIBLE_IOCTL(TCGETS)
+COMPATIBLE_IOCTL(TCSETS)
+COMPATIBLE_IOCTL(TCSETSW)
+COMPATIBLE_IOCTL(TCSETSF)
+COMPATIBLE_IOCTL(TIOCLINUX)
+/* Little t */
+COMPATIBLE_IOCTL(TIOCGETD)
+COMPATIBLE_IOCTL(TIOCSETD)
+COMPATIBLE_IOCTL(TIOCEXCL)
+COMPATIBLE_IOCTL(TIOCNXCL)
+COMPATIBLE_IOCTL(TIOCCONS)
+COMPATIBLE_IOCTL(TIOCGSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSSOFTCAR)
+COMPATIBLE_IOCTL(TIOCSWINSZ)
+COMPATIBLE_IOCTL(TIOCGWINSZ)
+COMPATIBLE_IOCTL(TIOCMGET)
+COMPATIBLE_IOCTL(TIOCMBIC)
+COMPATIBLE_IOCTL(TIOCMBIS)
+COMPATIBLE_IOCTL(TIOCMSET)
+COMPATIBLE_IOCTL(TIOCPKT)
+COMPATIBLE_IOCTL(TIOCNOTTY)
+COMPATIBLE_IOCTL(TIOCSTI)
+COMPATIBLE_IOCTL(TIOCOUTQ)
+COMPATIBLE_IOCTL(TIOCSPGRP)
+COMPATIBLE_IOCTL(TIOCGPGRP)
+COMPATIBLE_IOCTL(TIOCSCTTY)
+COMPATIBLE_IOCTL(TIOCGPTN)
+COMPATIBLE_IOCTL(TIOCSPTLCK)
+COMPATIBLE_IOCTL(TIOCSERGETLSR)
+/* Big F */
+COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
+COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
+COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
+COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
+COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
+/* Little f */
+COMPATIBLE_IOCTL(FIOCLEX)
+COMPATIBLE_IOCTL(FIONCLEX)
+COMPATIBLE_IOCTL(FIOASYNC)
+COMPATIBLE_IOCTL(FIONBIO)
+COMPATIBLE_IOCTL(FIONREAD)  /* This is also TIOCINQ */
+/* 0x00 */
+COMPATIBLE_IOCTL(FIBMAP)
+COMPATIBLE_IOCTL(FIGETBSZ)
+/* 0x03 -- HD/IDE ioctl's used by hdparm and friends.
+ *         Some need translations, these do not.
+ */
+COMPATIBLE_IOCTL(HDIO_GET_IDENTITY)
+COMPATIBLE_IOCTL(HDIO_SET_DMA)
+COMPATIBLE_IOCTL(HDIO_SET_UNMASKINTR)
+COMPATIBLE_IOCTL(HDIO_SET_NOWERR)
+COMPATIBLE_IOCTL(HDIO_SET_32BIT)
+COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
+COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
+COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
+COMPATIBLE_IOCTL(HDIO_SET_NICE)
+/* 0x02 -- Floppy ioctls */
+COMPATIBLE_IOCTL(FDMSGON)
+COMPATIBLE_IOCTL(FDMSGOFF)
+COMPATIBLE_IOCTL(FDSETEMSGTRESH)
+COMPATIBLE_IOCTL(FDFLUSH)
+COMPATIBLE_IOCTL(FDWERRORCLR)
+COMPATIBLE_IOCTL(FDSETMAXERRS)
+COMPATIBLE_IOCTL(FDGETMAXERRS)
+COMPATIBLE_IOCTL(FDGETDRVTYP)
+COMPATIBLE_IOCTL(FDEJECT)
+COMPATIBLE_IOCTL(FDCLRPRM)
+COMPATIBLE_IOCTL(FDFMTBEG)
+COMPATIBLE_IOCTL(FDFMTEND)
+COMPATIBLE_IOCTL(FDRESET)
+COMPATIBLE_IOCTL(FDTWADDLE)
+COMPATIBLE_IOCTL(FDFMTTRK)
+COMPATIBLE_IOCTL(FDRAWCMD)
+/* 0x12 */
+COMPATIBLE_IOCTL(BLKROSET)
+COMPATIBLE_IOCTL(BLKROGET)
+COMPATIBLE_IOCTL(BLKRRPART)
+COMPATIBLE_IOCTL(BLKFLSBUF)
+COMPATIBLE_IOCTL(BLKSECTSET)
+COMPATIBLE_IOCTL(BLKSSZGET)
+/* RAID */
+COMPATIBLE_IOCTL(RAID_VERSION)
+COMPATIBLE_IOCTL(GET_ARRAY_INFO)
+COMPATIBLE_IOCTL(GET_DISK_INFO)
+COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
+COMPATIBLE_IOCTL(RAID_AUTORUN)
+COMPATIBLE_IOCTL(CLEAR_ARRAY)
+COMPATIBLE_IOCTL(ADD_NEW_DISK)
+COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
+COMPATIBLE_IOCTL(SET_ARRAY_INFO)
+COMPATIBLE_IOCTL(SET_DISK_INFO)
+COMPATIBLE_IOCTL(WRITE_RAID_INFO)
+COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
+COMPATIBLE_IOCTL(PROTECT_ARRAY)
+COMPATIBLE_IOCTL(HOT_ADD_DISK)
+COMPATIBLE_IOCTL(SET_DISK_FAULTY)
+COMPATIBLE_IOCTL(RUN_ARRAY)
+COMPATIBLE_IOCTL(START_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY)
+COMPATIBLE_IOCTL(STOP_ARRAY_RO)
+COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
+#ifdef CONFIG_DM
+/* DM */
+COMPATIBLE_IOCTL(DM_VERSION)
+COMPATIBLE_IOCTL(DM_REMOVE_ALL)
+COMPATIBLE_IOCTL(DM_DEV_CREATE)
+COMPATIBLE_IOCTL(DM_DEV_REMOVE)
+COMPATIBLE_IOCTL(DM_DEV_RELOAD)
+COMPATIBLE_IOCTL(DM_DEV_SUSPEND)
+COMPATIBLE_IOCTL(DM_DEV_RENAME)
+COMPATIBLE_IOCTL(DM_DEV_DEPS)
+COMPATIBLE_IOCTL(DM_DEV_STATUS)
+COMPATIBLE_IOCTL(DM_TARGET_STATUS)
+COMPATIBLE_IOCTL(DM_TARGET_WAIT)
+#endif
+/* Big K */
+COMPATIBLE_IOCTL(PIO_FONT)
+COMPATIBLE_IOCTL(GIO_FONT)
+COMPATIBLE_IOCTL(KDSIGACCEPT)
+COMPATIBLE_IOCTL(KDGETKEYCODE)
+COMPATIBLE_IOCTL(KDSETKEYCODE)
+COMPATIBLE_IOCTL(KIOCSOUND)
+COMPATIBLE_IOCTL(KDMKTONE)
+COMPATIBLE_IOCTL(KDGKBTYPE)
+COMPATIBLE_IOCTL(KDSETMODE)
+COMPATIBLE_IOCTL(KDGETMODE)
+COMPATIBLE_IOCTL(KDSKBMODE)
+COMPATIBLE_IOCTL(KDGKBMODE)
+COMPATIBLE_IOCTL(KDSKBMETA)
+COMPATIBLE_IOCTL(KDGKBMETA)
+COMPATIBLE_IOCTL(KDGKBENT)
+COMPATIBLE_IOCTL(KDSKBENT)
+COMPATIBLE_IOCTL(KDGKBSENT)
+COMPATIBLE_IOCTL(KDSKBSENT)
+COMPATIBLE_IOCTL(KDGKBDIACR)
+COMPATIBLE_IOCTL(KDSKBDIACR)
+COMPATIBLE_IOCTL(KDKBDREP)
+COMPATIBLE_IOCTL(KDGKBLED)
+COMPATIBLE_IOCTL(KDSKBLED)
+COMPATIBLE_IOCTL(KDGETLED)
+COMPATIBLE_IOCTL(KDSETLED)
+COMPATIBLE_IOCTL(GIO_SCRNMAP)
+COMPATIBLE_IOCTL(PIO_SCRNMAP)
+COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_UNISCRNMAP)
+COMPATIBLE_IOCTL(PIO_FONTRESET)
+COMPATIBLE_IOCTL(PIO_UNIMAPCLR)
+/* Big S */
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_IDLUN)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_DOORUNLOCK)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TEST_UNIT_READY)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_ENABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_TAGGED_DISABLE)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_BUS_NUMBER)
+COMPATIBLE_IOCTL(SCSI_IOCTL_SEND_COMMAND)
+COMPATIBLE_IOCTL(SCSI_IOCTL_PROBE_HOST)
+COMPATIBLE_IOCTL(SCSI_IOCTL_GET_PCI)
+/* Big T */
+COMPATIBLE_IOCTL(TUNSETNOCSUM)
+COMPATIBLE_IOCTL(TUNSETDEBUG)
+COMPATIBLE_IOCTL(TUNSETIFF)
+COMPATIBLE_IOCTL(TUNSETPERSIST)
+COMPATIBLE_IOCTL(TUNSETOWNER)
+/* Big V */
+COMPATIBLE_IOCTL(VT_SETMODE)
+COMPATIBLE_IOCTL(VT_GETMODE)
+COMPATIBLE_IOCTL(VT_GETSTATE)
+COMPATIBLE_IOCTL(VT_OPENQRY)
+COMPATIBLE_IOCTL(VT_ACTIVATE)
+COMPATIBLE_IOCTL(VT_WAITACTIVE)
+COMPATIBLE_IOCTL(VT_RELDISP)
+COMPATIBLE_IOCTL(VT_DISALLOCATE)
+COMPATIBLE_IOCTL(VT_RESIZE)
+COMPATIBLE_IOCTL(VT_RESIZEX)
+COMPATIBLE_IOCTL(VT_LOCKSWITCH)
+COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
+/* Little v */
+/* Little v, the video4linux ioctls (conflict?) */
+COMPATIBLE_IOCTL(VIDIOCGCAP)
+COMPATIBLE_IOCTL(VIDIOCGCHAN)
+COMPATIBLE_IOCTL(VIDIOCSCHAN)
+COMPATIBLE_IOCTL(VIDIOCGPICT)
+COMPATIBLE_IOCTL(VIDIOCSPICT)
+COMPATIBLE_IOCTL(VIDIOCCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCKEY)
+COMPATIBLE_IOCTL(VIDIOCGAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSAUDIO)
+COMPATIBLE_IOCTL(VIDIOCSYNC)
+COMPATIBLE_IOCTL(VIDIOCMCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCGMBUF)
+COMPATIBLE_IOCTL(VIDIOCGUNIT)
+COMPATIBLE_IOCTL(VIDIOCGCAPTURE)
+COMPATIBLE_IOCTL(VIDIOCSCAPTURE)
+/* BTTV specific... */
+COMPATIBLE_IOCTL(_IOW('v',  BASE_VIDIOCPRIVATE+0, char [256]))
+COMPATIBLE_IOCTL(_IOR('v',  BASE_VIDIOCPRIVATE+1, char [256]))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+2, unsigned int))
+COMPATIBLE_IOCTL(_IOW('v' , BASE_VIDIOCPRIVATE+3, char [16])) /* struct bttv_pll_info */
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
+COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
+/* Little p (/dev/rtc, /dev/envctrl, etc.) */
+COMPATIBLE_IOCTL(RTC_AIE_ON)
+COMPATIBLE_IOCTL(RTC_AIE_OFF)
+COMPATIBLE_IOCTL(RTC_UIE_ON)
+COMPATIBLE_IOCTL(RTC_UIE_OFF)
+COMPATIBLE_IOCTL(RTC_PIE_ON)
+COMPATIBLE_IOCTL(RTC_PIE_OFF)
+COMPATIBLE_IOCTL(RTC_WIE_ON)
+COMPATIBLE_IOCTL(RTC_WIE_OFF)
+COMPATIBLE_IOCTL(RTC_ALM_SET)
+COMPATIBLE_IOCTL(RTC_ALM_READ)
+COMPATIBLE_IOCTL(RTC_RD_TIME)
+COMPATIBLE_IOCTL(RTC_SET_TIME)
+COMPATIBLE_IOCTL(RTC_WKALM_SET)
+COMPATIBLE_IOCTL(RTC_WKALM_RD)
+/* Little m */
+COMPATIBLE_IOCTL(MTIOCTOP)
+/* Socket level stuff */
+COMPATIBLE_IOCTL(FIOSETOWN)
+COMPATIBLE_IOCTL(SIOCSPGRP)
+COMPATIBLE_IOCTL(FIOGETOWN)
+COMPATIBLE_IOCTL(SIOCGPGRP)
+COMPATIBLE_IOCTL(SIOCATMARK)
+COMPATIBLE_IOCTL(SIOCSIFLINK)
+COMPATIBLE_IOCTL(SIOCSIFENCAP)
+COMPATIBLE_IOCTL(SIOCGIFENCAP)
+COMPATIBLE_IOCTL(SIOCSIFBR)
+COMPATIBLE_IOCTL(SIOCGIFBR)
+COMPATIBLE_IOCTL(SIOCSARP)
+COMPATIBLE_IOCTL(SIOCGARP)
+COMPATIBLE_IOCTL(SIOCDARP)
+COMPATIBLE_IOCTL(SIOCSRARP)
+COMPATIBLE_IOCTL(SIOCGRARP)
+COMPATIBLE_IOCTL(SIOCDRARP)
+COMPATIBLE_IOCTL(SIOCADDDLCI)
+COMPATIBLE_IOCTL(SIOCDELDLCI)
+COMPATIBLE_IOCTL(SIOCGMIIPHY)
+COMPATIBLE_IOCTL(SIOCGMIIREG)
+COMPATIBLE_IOCTL(SIOCSMIIREG)
+COMPATIBLE_IOCTL(SIOCGIFVLAN)
+COMPATIBLE_IOCTL(SIOCSIFVLAN)
+/* SG stuff */
+COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
+COMPATIBLE_IOCTL(SG_EMULATED_HOST)
+COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
+COMPATIBLE_IOCTL(SG_GET_SCSI_ID)
+COMPATIBLE_IOCTL(SG_SET_FORCE_LOW_DMA)
+COMPATIBLE_IOCTL(SG_GET_LOW_DMA)
+COMPATIBLE_IOCTL(SG_SET_FORCE_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_PACK_ID)
+COMPATIBLE_IOCTL(SG_GET_NUM_WAITING)
+COMPATIBLE_IOCTL(SG_SET_DEBUG)
+COMPATIBLE_IOCTL(SG_GET_SG_TABLESIZE)
+COMPATIBLE_IOCTL(SG_GET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_SET_COMMAND_Q)
+COMPATIBLE_IOCTL(SG_GET_VERSION_NUM)
+COMPATIBLE_IOCTL(SG_NEXT_CMD_LEN)
+COMPATIBLE_IOCTL(SG_SCSI_RESET)
+COMPATIBLE_IOCTL(SG_IO)
+COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
+COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
+COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
+/* PPP stuff */
+COMPATIBLE_IOCTL(PPPIOCGFLAGS)
+COMPATIBLE_IOCTL(PPPIOCSFLAGS)
+COMPATIBLE_IOCTL(PPPIOCGASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGUNIT)
+COMPATIBLE_IOCTL(PPPIOCGRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSRASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCGMRU)
+COMPATIBLE_IOCTL(PPPIOCSMRU)
+COMPATIBLE_IOCTL(PPPIOCSMAXCID)
+COMPATIBLE_IOCTL(PPPIOCGXASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCSXASYNCMAP)
+COMPATIBLE_IOCTL(PPPIOCXFERUNIT)
+/* PPPIOCSCOMPRESS is translated */
+COMPATIBLE_IOCTL(PPPIOCGNPMODE)
+COMPATIBLE_IOCTL(PPPIOCSNPMODE)
+COMPATIBLE_IOCTL(PPPIOCGDEBUG)
+COMPATIBLE_IOCTL(PPPIOCSDEBUG)
+/* PPPIOCSPASS is translated */
+/* PPPIOCSACTIVE is translated */
+/* PPPIOCGIDLE is translated */
+COMPATIBLE_IOCTL(PPPIOCNEWUNIT)
+COMPATIBLE_IOCTL(PPPIOCATTACH)
+COMPATIBLE_IOCTL(PPPIOCDETACH)
+COMPATIBLE_IOCTL(PPPIOCSMRRU)
+COMPATIBLE_IOCTL(PPPIOCCONNECT)
+COMPATIBLE_IOCTL(PPPIOCDISCONN)
+COMPATIBLE_IOCTL(PPPIOCATTCHAN)
+COMPATIBLE_IOCTL(PPPIOCGCHAN)
+/* PPPOX */
+COMPATIBLE_IOCTL(PPPOEIOCSFWD)
+COMPATIBLE_IOCTL(PPPOEIOCDFWD)
+/* LP */
+COMPATIBLE_IOCTL(LPGETSTATUS)
+/* CDROM stuff */
+COMPATIBLE_IOCTL(CDROMPAUSE)
+COMPATIBLE_IOCTL(CDROMRESUME)
+COMPATIBLE_IOCTL(CDROMPLAYMSF)
+COMPATIBLE_IOCTL(CDROMPLAYTRKIND)
+COMPATIBLE_IOCTL(CDROMREADTOCHDR)
+COMPATIBLE_IOCTL(CDROMREADTOCENTRY)
+COMPATIBLE_IOCTL(CDROMSTOP)
+COMPATIBLE_IOCTL(CDROMSTART)
+COMPATIBLE_IOCTL(CDROMEJECT)
+COMPATIBLE_IOCTL(CDROMVOLCTRL)
+COMPATIBLE_IOCTL(CDROMSUBCHNL)
+COMPATIBLE_IOCTL(CDROMEJECT_SW)
+COMPATIBLE_IOCTL(CDROMMULTISESSION)
+COMPATIBLE_IOCTL(CDROM_GET_MCN)
+COMPATIBLE_IOCTL(CDROMRESET)
+COMPATIBLE_IOCTL(CDROMVOLREAD)
+COMPATIBLE_IOCTL(CDROMSEEK)
+COMPATIBLE_IOCTL(CDROMPLAYBLK)
+COMPATIBLE_IOCTL(CDROMCLOSETRAY)
+COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
+COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
+COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
+COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
+COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
+COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
+COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
+COMPATIBLE_IOCTL(CDROM_DEBUG)
+COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
+/* DVD ioctls */
+COMPATIBLE_IOCTL(DVD_READ_STRUCT)
+COMPATIBLE_IOCTL(DVD_WRITE_STRUCT)
+COMPATIBLE_IOCTL(DVD_AUTH)
+/* Big L */
+COMPATIBLE_IOCTL(LOOP_SET_FD)
+COMPATIBLE_IOCTL(LOOP_CLR_FD)
+/* Big A */
+/* sparc only */
+/* Big Q for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_CTRLRATE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETOUTCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETINCOUNT)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PERCMODE)
+COMPATIBLE_IOCTL(SNDCTL_FM_LOAD_INSTR)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_TESTMIDI)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_RESETSAMPLES)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRSYNTHS)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_NRMIDIS)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_INFO)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_THRESHOLD)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_MEMAVL)
+COMPATIBLE_IOCTL(SNDCTL_FM_4OP_ENABLE)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_PANIC)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_OUTOFBAND)
+COMPATIBLE_IOCTL(SNDCTL_SEQ_GETTIME)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_ID)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_CONTROL)
+COMPATIBLE_IOCTL(SNDCTL_SYNTH_REMOVESAMPLE)
+/* Big T for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_TMR_TIMEBASE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_START)
+COMPATIBLE_IOCTL(SNDCTL_TMR_STOP)
+COMPATIBLE_IOCTL(SNDCTL_TMR_CONTINUE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_TEMPO)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SOURCE)
+COMPATIBLE_IOCTL(SNDCTL_TMR_METRONOME)
+COMPATIBLE_IOCTL(SNDCTL_TMR_SELECT)
+/* Little m for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_MIDI_PRETIME)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUMODE)
+COMPATIBLE_IOCTL(SNDCTL_MIDI_MPUCMD)
+/* Big P for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_DSP_RESET)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SYNC)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SPEED)
+COMPATIBLE_IOCTL(SNDCTL_DSP_STEREO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETBLKSIZE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_WRITE_FILTER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_POST)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SUBDIVIDE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFRAGMENT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETFMTS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETFMT)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOSPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETISPACE)
+COMPATIBLE_IOCTL(SNDCTL_DSP_NONBLOCK)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETCAPS)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETTRIGGER)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETIPTR)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETOPTR)
+/* SNDCTL_DSP_MAPINBUF,  XXX needs translation */
+/* SNDCTL_DSP_MAPOUTBUF,  XXX needs translation */
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETSYNCRO)
+COMPATIBLE_IOCTL(SNDCTL_DSP_SETDUPLEX)
+COMPATIBLE_IOCTL(SNDCTL_DSP_GETODELAY)
+COMPATIBLE_IOCTL(SNDCTL_DSP_PROFILE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_RATE)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_CHANNELS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_BITS)
+COMPATIBLE_IOCTL(SOUND_PCM_READ_FILTER)
+/* Big C for sound/OSS */
+COMPATIBLE_IOCTL(SNDCTL_COPR_RESET)
+COMPATIBLE_IOCTL(SNDCTL_COPR_LOAD)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WDATA)
+COMPATIBLE_IOCTL(SNDCTL_COPR_WCODE)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RUN)
+COMPATIBLE_IOCTL(SNDCTL_COPR_HALT)
+COMPATIBLE_IOCTL(SNDCTL_COPR_SENDMSG)
+COMPATIBLE_IOCTL(SNDCTL_COPR_RCVMSG)
+/* Big M for sound/OSS */
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_LINE3)
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_READ(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_MUTE)
+/* SOUND_MIXER_READ_ENHANCE,  same value as READ_MUTE */
+/* SOUND_MIXER_READ_LOUD,  same value as READ_MUTE */
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_DEVMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_RECMASK)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_STEREODEVS)
+COMPATIBLE_IOCTL(SOUND_MIXER_READ_CAPS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_VOLUME)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_BASS)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_TREBLE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SYNTH)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_PCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_SPEAKER)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MIC)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_CD)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IMIX)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_ALTPCM)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECLEV)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_IGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_OGAIN)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_LINE3)
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL1))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL2))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_DIGITAL3))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEIN))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_PHONEOUT))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_VIDEO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_RADIO))
+COMPATIBLE_IOCTL(MIXER_WRITE(SOUND_MIXER_MONITOR))
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_MUTE)
+/* SOUND_MIXER_WRITE_ENHANCE,  same value as WRITE_MUTE */
+/* SOUND_MIXER_WRITE_LOUD,  same value as WRITE_MUTE */
+COMPATIBLE_IOCTL(SOUND_MIXER_WRITE_RECSRC)
+COMPATIBLE_IOCTL(SOUND_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_OLD_MIXER_INFO)
+COMPATIBLE_IOCTL(SOUND_MIXER_ACCESS)
+COMPATIBLE_IOCTL(SOUND_MIXER_AGC)
+COMPATIBLE_IOCTL(SOUND_MIXER_3DSE)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE1)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE2)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE3)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE4)
+COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
+COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
+COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
+COMPATIBLE_IOCTL(OSS_GETVERSION)
+/* AUTOFS */
+COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
+COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
+COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
+/* DEVFS */
+COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
+COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE)
+COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK)
+/* Raw devices */
+COMPATIBLE_IOCTL(RAW_SETBIND)
+COMPATIBLE_IOCTL(RAW_GETBIND)
+/* SMB ioctls which do not need any translations */
+COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
+/* Little a */
+COMPATIBLE_IOCTL(ATMSIGD_CTRL)
+COMPATIBLE_IOCTL(ATMARPD_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_CTRL)
+COMPATIBLE_IOCTL(ATMLEC_MCAST)
+COMPATIBLE_IOCTL(ATMLEC_DATA)
+COMPATIBLE_IOCTL(ATM_SETSC)
+COMPATIBLE_IOCTL(SIOCSIFATMTCP)
+COMPATIBLE_IOCTL(SIOCMKCLIP)
+COMPATIBLE_IOCTL(ATMARP_MKIP)
+COMPATIBLE_IOCTL(ATMARP_SETENTRY)
+COMPATIBLE_IOCTL(ATMARP_ENCAP)
+COMPATIBLE_IOCTL(ATMTCP_CREATE)
+COMPATIBLE_IOCTL(ATMTCP_REMOVE)
+COMPATIBLE_IOCTL(ATMMPC_CTRL)
+COMPATIBLE_IOCTL(ATMMPC_DATA)
+#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
+/* 0xfe - lvm */
+COMPATIBLE_IOCTL(VG_SET_EXTENDABLE)
+COMPATIBLE_IOCTL(VG_STATUS_GET_COUNT)
+COMPATIBLE_IOCTL(VG_STATUS_GET_NAMELIST)
+COMPATIBLE_IOCTL(VG_REMOVE)
+COMPATIBLE_IOCTL(VG_RENAME)
+COMPATIBLE_IOCTL(VG_REDUCE)
+COMPATIBLE_IOCTL(PE_LOCK_UNLOCK)
+COMPATIBLE_IOCTL(PV_FLUSH)
+COMPATIBLE_IOCTL(LVM_LOCK_LVM)
+COMPATIBLE_IOCTL(LVM_GET_IOP_VERSION)
+#ifdef LVM_TOTAL_RESET
+COMPATIBLE_IOCTL(LVM_RESET)
+#endif
+COMPATIBLE_IOCTL(LV_SET_ACCESS)
+COMPATIBLE_IOCTL(LV_SET_STATUS)
+COMPATIBLE_IOCTL(LV_SET_ALLOCATION)
+COMPATIBLE_IOCTL(LE_REMAP)
+COMPATIBLE_IOCTL(LV_BMAP)
+COMPATIBLE_IOCTL(LV_SNAPSHOT_USE_RATE)
+#endif /* LVM */
+#if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_IRQ_BUSID)
+COMPATIBLE_IOCTL(DRM_IOCTL_AUTH_MAGIC)
+COMPATIBLE_IOCTL(DRM_IOCTL_BLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNBLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_CONTROL)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_MARK_BUFS)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_MOD_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_GET_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_SWITCH_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_NEW_CTX)
+COMPATIBLE_IOCTL(DRM_IOCTL_ADD_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_RM_DRAW)
+COMPATIBLE_IOCTL(DRM_IOCTL_LOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_UNLOCK)
+COMPATIBLE_IOCTL(DRM_IOCTL_FINISH)
+#endif /* DRM */
+/* Big W */
+/* WIOC_GETSUPPORT not yet implemented -E */
+COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
+COMPATIBLE_IOCTL(WDIOC_GETBOOTSTATUS)
+COMPATIBLE_IOCTL(WDIOC_GETTEMP)
+COMPATIBLE_IOCTL(WDIOC_SETOPTIONS)
+COMPATIBLE_IOCTL(WDIOC_KEEPALIVE)
+/* Big R */
+COMPATIBLE_IOCTL(RNDGETENTCNT)
+COMPATIBLE_IOCTL(RNDADDTOENTCNT)
+COMPATIBLE_IOCTL(RNDGETPOOL)
+COMPATIBLE_IOCTL(RNDADDENTROPY)
+COMPATIBLE_IOCTL(RNDZAPENTCNT)
+COMPATIBLE_IOCTL(RNDCLEARPOOL)
+/* Bluetooth ioctls */
+COMPATIBLE_IOCTL(HCIDEVUP)
+COMPATIBLE_IOCTL(HCIDEVDOWN)
+COMPATIBLE_IOCTL(HCIDEVRESET)
+COMPATIBLE_IOCTL(HCIDEVRESTAT)
+COMPATIBLE_IOCTL(HCIGETDEVLIST)
+COMPATIBLE_IOCTL(HCIGETDEVINFO)
+COMPATIBLE_IOCTL(HCIGETCONNLIST)
+COMPATIBLE_IOCTL(HCIGETCONNINFO)
+COMPATIBLE_IOCTL(HCISETRAW)
+COMPATIBLE_IOCTL(HCISETSCAN)
+COMPATIBLE_IOCTL(HCISETAUTH)
+COMPATIBLE_IOCTL(HCISETENCRYPT)
+COMPATIBLE_IOCTL(HCISETPTYPE)
+COMPATIBLE_IOCTL(HCISETLINKPOL)
+COMPATIBLE_IOCTL(HCISETLINKMODE)
+COMPATIBLE_IOCTL(HCISETACLMTU)
+COMPATIBLE_IOCTL(HCISETSCOMTU)
+COMPATIBLE_IOCTL(HCIINQUIRY)
+/* Misc. */
+COMPATIBLE_IOCTL(0x41545900)		/* ATYIO_CLKR */
+COMPATIBLE_IOCTL(0x41545901)		/* ATYIO_CLKW */
+COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
+COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
+COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
+/* USB */
+COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
+COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_SETCONFIGURATION)
+COMPATIBLE_IOCTL(USBDEVFS_GETDRIVER)
+COMPATIBLE_IOCTL(USBDEVFS_DISCARDURB)
+COMPATIBLE_IOCTL(USBDEVFS_CLAIMINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_RELEASEINTERFACE)
+COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
+COMPATIBLE_IOCTL(USBDEVFS_RESET)
+COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
+/* MTD */
+COMPATIBLE_IOCTL(MEMGETINFO)
+COMPATIBLE_IOCTL(MEMERASE)
+COMPATIBLE_IOCTL(MEMLOCK)
+COMPATIBLE_IOCTL(MEMUNLOCK)
+COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
+COMPATIBLE_IOCTL(MEMGETREGIONINFO)
+/* NBD */
+COMPATIBLE_IOCTL(NBD_SET_SOCK)
+COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
+COMPATIBLE_IOCTL(NBD_SET_SIZE)
+COMPATIBLE_IOCTL(NBD_DO_IT)
+COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
+COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
+COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
+COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
+COMPATIBLE_IOCTL(NBD_DISCONNECT)
diff -urN linux-2.5.68-bk10/include/linux/fs.h linux-2.5.68-bk11/include/linux/fs.h
--- linux-2.5.68-bk10/include/linux/fs.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/fs.h	2003-05-01 04:40:40.000000000 -0700
@@ -1068,10 +1068,7 @@
 /* fs/block_dev.c */
 #define BDEVNAME_SIZE	32	/* Largest string for a blockdev identifier */
 extern const char *__bdevname(dev_t, char *buffer);
-extern inline const char *bdevname(struct block_device *bdev, char *buffer)
-{
-	return __bdevname(bdev->bd_dev, buffer);
-}
+extern const char *bdevname(struct block_device *bdev, char *buffer);
 extern struct block_device *lookup_bdev(const char *);
 extern struct block_device *open_bdev_excl(const char *, int, int, void *);
 extern void close_bdev_excl(struct block_device *, int);
diff -urN linux-2.5.68-bk10/include/linux/gfp.h linux-2.5.68-bk11/include/linux/gfp.h
--- linux-2.5.68-bk10/include/linux/gfp.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/gfp.h	2003-05-01 04:40:40.000000000 -0700
@@ -31,6 +31,7 @@
 #define __GFP_REPEAT	0x400	/* Retry the allocation.  Might fail */
 #define __GFP_NOFAIL	0x800	/* Retry for ever.  Cannot fail */
 #define __GFP_NORETRY	0x1000	/* Do not retry.  Might fail */
+#define __GFP_NO_GROW	0x2000	/* Slab internal usage */
 
 #define GFP_ATOMIC	(__GFP_HIGH)
 #define GFP_NOIO	(__GFP_WAIT)
diff -urN linux-2.5.68-bk10/include/linux/ide.h linux-2.5.68-bk11/include/linux/ide.h
--- linux-2.5.68-bk10/include/linux/ide.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/ide.h	2003-05-01 04:40:40.000000000 -0700
@@ -1408,6 +1408,8 @@
 	void			*special;
 } pkt_task_t;
 
+extern inline u32 ide_read_24(ide_drive_t *);
+
 extern inline void SELECT_DRIVE(ide_drive_t *);
 extern inline void SELECT_INTERRUPT(ide_drive_t *);
 extern inline void SELECT_MASK(ide_drive_t *, int);
diff -urN linux-2.5.68-bk10/include/linux/initrd.h linux-2.5.68-bk11/include/linux/initrd.h
--- linux-2.5.68-bk10/include/linux/initrd.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/initrd.h	2003-05-01 04:40:40.000000000 -0700
@@ -13,4 +13,6 @@
 /* 1 if it is not an error if initrd_start < memory_start */
 extern int initrd_below_start_ok;
 
+/* free_initrd_mem always gets called with the next two as arguments.. */
 extern unsigned long initrd_start, initrd_end;
+extern void free_initrd_mem(unsigned long, unsigned long);
diff -urN linux-2.5.68-bk10/include/linux/ioctl32.h linux-2.5.68-bk11/include/linux/ioctl32.h
--- linux-2.5.68-bk10/include/linux/ioctl32.h	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/ioctl32.h	2003-05-01 04:40:40.000000000 -0700
@@ -19,5 +19,12 @@
 
 extern int unregister_ioctl32_conversion(unsigned int cmd);
 
+typedef int (*ioctl_trans_handler_t)(unsigned int, unsigned int, unsigned long, struct file *);
+
+struct ioctl_trans {
+	unsigned long cmd;
+	ioctl_trans_handler_t handler;
+	struct ioctl_trans *next;
+};
 
 #endif
diff -urN linux-2.5.68-bk10/include/linux/list.h linux-2.5.68-bk11/include/linux/list.h
--- linux-2.5.68-bk10/include/linux/list.h	2003-05-01 04:40:08.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/list.h	2003-05-01 04:40:40.000000000 -0700
@@ -437,6 +437,10 @@
 	for (pos = (head)->first; pos; \
 	     pos = pos->next) 
 
+#define hlist_for_each_safe(pos, n, head) \
+	for (pos = (head)->first; n = pos ? pos->next : 0, pos; \
+	     pos = n)
+
 #else
 #warning "don't include kernel headers in userspace"
 #endif /* __KERNEL__ */
diff -urN linux-2.5.68-bk10/include/linux/module.h linux-2.5.68-bk11/include/linux/module.h
--- linux-2.5.68-bk10/include/linux/module.h	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/module.h	2003-05-01 04:40:40.000000000 -0700
@@ -20,10 +20,7 @@
 #include <asm/module.h>
 
 /* Not Yet Implemented */
-#define MODULE_AUTHOR(name)
-#define MODULE_DESCRIPTION(desc)
 #define MODULE_SUPPORTED_DEVICE(name)
-#define MODULE_PARM_DESC(var,desc)
 #define print_modules()
 
 /* v850 toolchain uses a `_' prefix for all user symbols */
@@ -58,12 +55,11 @@
 	       unsigned long value);
 
 #ifdef MODULE
-#define ___module_cat(a,b) a ## b
+#define ___module_cat(a,b) __mod_ ## a ## b
 #define __module_cat(a,b) ___module_cat(a,b)
-/* For userspace: you can also call me... */
-#define MODULE_ALIAS(alias)					\
-	static const char __module_cat(__alias_,__LINE__)[]	\
-		__attribute__((section(".modinfo"),unused)) = "alias=" alias
+#define __MODULE_INFO(tag, name, info)					  \
+static const char __module_cat(name,__LINE__)[]				  \
+  __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
 
 #define MODULE_GENERIC_TABLE(gtype,name)			\
 extern const struct gtype##_id __mod_##gtype##_table		\
@@ -71,6 +67,19 @@
 
 #define THIS_MODULE (&__this_module)
 
+#else  /* !MODULE */
+
+#define MODULE_GENERIC_TABLE(gtype,name)
+#define __MODULE_INFO(tag, name, info)
+#define THIS_MODULE ((struct module *)0)
+#endif
+
+/* Generic info of form tag = "info" */
+#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)
+
+/* For userspace: you can also call me... */
+#define MODULE_ALIAS(_alias) MODULE_INFO(alias, _alias)
+
 /*
  * The following license idents are currently accepted as indicating free
  * software modules
@@ -97,17 +106,18 @@
  * 2.	So the community can ignore bug reports including proprietary modules
  * 3.	So vendors can do likewise based on their own policies
  */
-#define MODULE_LICENSE(license)					\
-	static const char __module_license[]			\
-		__attribute__((section(".init.license"), unused)) = license
+#define MODULE_LICENSE(_license) MODULE_INFO(license, _license)
 
-#else  /* !MODULE */
-
-#define MODULE_ALIAS(alias)
-#define MODULE_GENERIC_TABLE(gtype,name)
-#define THIS_MODULE ((struct module *)0)
-#define MODULE_LICENSE(license)
-#endif
+/* Author, ideally of form NAME <EMAIL>[, NAME <EMAIL>]*[ and NAME <EMAIL>] */
+#define MODULE_AUTHOR(_author) MODULE_INFO(author, _author)
+  
+/* What your module does. */
+#define MODULE_DESCRIPTION(_description) MODULE_INFO(description, _description)
+
+/* One for each parameter, describing how to use it.  Some files do
+   multiple of these per line, so can't just use MODULE_INFO. */
+#define MODULE_PARM_DESC(_parm, desc) \
+	__MODULE_INFO(parm, _parm, #_parm ":" desc)
 
 #define MODULE_DEVICE_TABLE(type,name)		\
   MODULE_GENERIC_TABLE(type##_device,name)
@@ -255,6 +265,7 @@
 
 #ifdef CONFIG_MODULE_UNLOAD
 
+unsigned int module_refcount(struct module *mod);
 void __symbol_put(const char *symbol);
 #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x)
 void symbol_put_addr(void *addr);
@@ -265,6 +276,17 @@
 #define local_dec(x) atomic_dec(x)
 #endif
 
+/* Sometimes we know we already have a refcount, and it's easier not
+   to handle the error case (which only happens with rmmod --wait). */
+static inline void __module_get(struct module *module)
+{
+	if (module) {
+		BUG_ON(module_refcount(module) == 0);
+		local_inc(&module->ref[get_cpu()].count);
+		put_cpu();
+	}
+}
+
 static inline int try_module_get(struct module *module)
 {
 	int ret = 1;
@@ -300,6 +322,9 @@
 static inline void module_put(struct module *module)
 {
 }
+static inline void __module_get(struct module *module)
+{
+}
 #define symbol_put(x) do { } while(0)
 #define symbol_put_addr(p) do { } while(0)
 
@@ -357,6 +382,10 @@
 #define symbol_put(x) do { } while(0)
 #define symbol_put_addr(x) do { } while(0)
 
+static inline void __module_get(struct module *module)
+{
+}
+
 static inline int try_module_get(struct module *module)
 {
 	return 1;
diff -urN linux-2.5.68-bk10/include/linux/percpu_counter.h linux-2.5.68-bk11/include/linux/percpu_counter.h
--- linux-2.5.68-bk10/include/linux/percpu_counter.h	2003-04-19 19:49:54.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/percpu_counter.h	2003-05-01 04:40:40.000000000 -0700
@@ -7,7 +7,7 @@
 #include <linux/config.h>
 #include <linux/spinlock.h>
 #include <linux/smp.h>
-#include <linux/preempt.h>
+#include <linux/threads.h>
 
 #ifdef CONFIG_SMP
 
diff -urN linux-2.5.68-bk10/include/linux/slab.h linux-2.5.68-bk11/include/linux/slab.h
--- linux-2.5.68-bk10/include/linux/slab.h	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/slab.h	2003-05-01 04:40:40.000000000 -0700
@@ -22,8 +22,11 @@
 #define	SLAB_KERNEL		GFP_KERNEL
 #define	SLAB_DMA		GFP_DMA
 
-#define SLAB_LEVEL_MASK		(__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|__GFP_NORETRY)
-#define	SLAB_NO_GROW		0x00001000UL	/* don't grow a cache */
+#define SLAB_LEVEL_MASK		(__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\
+				__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|\
+				__GFP_NOFAIL|__GFP_NORETRY)
+
+#define	SLAB_NO_GROW		__GFP_NO_GROW	/* don't grow a cache */
 
 /* flags to pass to kmem_cache_create().
  * The first 3 are only valid when the allocator as been build
diff -urN linux-2.5.68-bk10/include/linux/usb.h linux-2.5.68-bk11/include/linux/usb.h
--- linux-2.5.68-bk10/include/linux/usb.h	2003-04-19 19:49:21.000000000 -0700
+++ linux-2.5.68-bk11/include/linux/usb.h	2003-05-01 04:40:40.000000000 -0700
@@ -765,6 +765,7 @@
 	urb->start_frame = -1;
 }
 
+extern void usb_init_urb(struct urb *urb);
 extern struct urb *usb_alloc_urb(int iso_packets, int mem_flags);
 extern void usb_free_urb(struct urb *urb);
 #define usb_put_urb usb_free_urb
@@ -973,7 +974,7 @@
 void usb_show_string(struct usb_device *dev, char *id, int index);
 
 #ifdef DEBUG
-#define dbg(format, arg...) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg)
+#define dbg(format, arg...) printk(KERN_DEBUG "%s: " format "\n" , __FILE__ , ## arg)
 #else
 #define dbg(format, arg...) do {} while (0)
 #endif
diff -urN linux-2.5.68-bk10/include/net/irda/irport.h linux-2.5.68-bk11/include/net/irda/irport.h
--- linux-2.5.68-bk10/include/net/irda/irport.h	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/include/net/irda/irport.h	2003-05-01 04:40:40.000000000 -0700
@@ -73,7 +73,7 @@
 	/* For piggyback drivers */
 	void *priv;                
 	void (*change_speed)(void *priv, __u32 speed);
-	void (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
+	int (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
 };
 
 struct irport_cb *irport_open(int i, unsigned int iobase, unsigned int irq);
diff -urN linux-2.5.68-bk10/kernel/fork.c linux-2.5.68-bk11/kernel/fork.c
--- linux-2.5.68-bk10/kernel/fork.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk11/kernel/fork.c	2003-05-01 04:40:40.000000000 -0700
@@ -43,7 +43,9 @@
 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk);
 extern void exit_semundo(struct task_struct *tsk);
 
-/* The idle threads do not count.. */
+/* The idle threads do not count..
+ * Protected by write_lock_irq(&tasklist_lock)
+ */
 int nr_threads;
 
 int max_threads;
@@ -792,9 +794,9 @@
 	atomic_inc(&p->user->processes);
 
 	/*
-	 * Counter increases are protected by
-	 * the kernel lock so nr_threads can't
-	 * increase under us (but it may decrease).
+	 * If multiple threads are within copy_process(), then this check
+	 * triggers too late. This doesn't hurt, the check is only there
+	 * to stop root fork bombs.
 	 */
 	if (nr_threads >= max_threads)
 		goto bad_fork_cleanup_count;
diff -urN linux-2.5.68-bk10/kernel/ksyms.c linux-2.5.68-bk11/kernel/ksyms.c
--- linux-2.5.68-bk10/kernel/ksyms.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/kernel/ksyms.c	2003-05-01 04:40:40.000000000 -0700
@@ -515,6 +515,7 @@
 EXPORT_SYMBOL(vsnprintf);
 EXPORT_SYMBOL(vsscanf);
 EXPORT_SYMBOL(__bdevname);
+EXPORT_SYMBOL(bdevname);
 EXPORT_SYMBOL(cdevname);
 EXPORT_SYMBOL(simple_strtoull);
 EXPORT_SYMBOL(simple_strtoul);
diff -urN linux-2.5.68-bk10/kernel/module.c linux-2.5.68-bk11/kernel/module.c
--- linux-2.5.68-bk10/kernel/module.c	2003-04-19 19:50:30.000000000 -0700
+++ linux-2.5.68-bk11/kernel/module.c	2003-05-01 04:40:40.000000000 -0700
@@ -431,7 +431,7 @@
 }
 #endif
 
-static unsigned int module_refcount(struct module *mod)
+unsigned int module_refcount(struct module *mod)
 {
 	unsigned int i, total = 0;
 
@@ -439,6 +439,7 @@
 		total += atomic_read(&mod->ref[i].count);
 	return total;
 }
+EXPORT_SYMBOL(module_refcount);
 
 /* This exists whether we can unload or not */
 static void free_module(struct module *mod);
@@ -939,12 +940,12 @@
 /* Change all symbols so that sh_value encodes the pointer directly. */
 static int simplify_symbols(Elf_Shdr *sechdrs,
 			    unsigned int symindex,
-			    unsigned int strindex,
+			    const char *strtab,
 			    unsigned int versindex,
 			    struct module *mod)
 {
 	Elf_Sym *sym = (void *)sechdrs[symindex].sh_addr;
-	const char *strtab = (char *)sechdrs[strindex].sh_addr;
+	
 	unsigned int i, n = sechdrs[symindex].sh_size / sizeof(Elf_Sym);
 	int ret = 0;
 
@@ -1063,13 +1064,9 @@
 		|| strcmp(license, "Dual MPL/GPL") == 0);
 }
 
-static void set_license(struct module *mod, Elf_Shdr *sechdrs, int licenseidx)
+static void set_license(struct module *mod, const char *license)
 {
-	char *license;
-
-	if (licenseidx) 
-		license = (char *)sechdrs[licenseidx].sh_addr;
-	else
+	if (!license)
 		license = "unspecified";
 
 	mod->license_gplok = license_is_gpl_compatible(license);
@@ -1080,6 +1077,40 @@
 	}
 }
 
+/* Parse tag=value strings from .modinfo section */
+static char *next_string(char *string, unsigned long *secsize)
+{
+	/* Skip non-zero chars */
+	while (string[0]) {
+		string++;
+		if ((*secsize)-- <= 1)
+			return NULL;
+	}
+
+	/* Skip any zero padding. */
+	while (!string[0]) {
+		string++;
+		if ((*secsize)-- <= 1)
+			return NULL;
+	}
+	return string;
+}
+
+static char *get_modinfo(Elf_Shdr *sechdrs,
+			 unsigned int info,
+			 const char *tag)
+{
+	char *p;
+	unsigned int taglen = strlen(tag);
+	unsigned long size = sechdrs[info].sh_size;
+
+	for (p = (char *)sechdrs[info].sh_addr; p; p = next_string(p, &size)) {
+		if (strncmp(p, tag, taglen) == 0 && p[taglen] == '=')
+			return p + taglen + 1;
+	}
+	return NULL;
+}
+
 /* Allocate and load the module: note that size of section 0 is always
    zero, and we rely on this for optional sections. */
 static struct module *load_module(void __user *umod,
@@ -1088,9 +1119,9 @@
 {
 	Elf_Ehdr *hdr;
 	Elf_Shdr *sechdrs;
-	char *secstrings, *args;
-	unsigned int i, symindex, exportindex, strindex, setupindex, exindex,
-		modindex, obsparmindex, licenseindex, gplindex, vmagindex,
+	char *secstrings, *args, *modmagic, *strtab = NULL;
+	unsigned int i, symindex = 0, strindex = 0, setupindex, exindex,
+		exportindex, modindex, obsparmindex, infoindex, gplindex,
 		crcindex, gplcrcindex, versindex;
 	long arglen;
 	struct module *mod;
@@ -1124,6 +1155,7 @@
 	/* Convenience variables */
 	sechdrs = (void *)hdr + hdr->e_shoff;
 	secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+	sechdrs[0].sh_addr = 0;
 
 	/* And these should exist, but gcc whinges if we don't init them */
 	symindex = strindex = 0;
@@ -1137,6 +1169,7 @@
 		if (sechdrs[i].sh_type == SHT_SYMTAB) {
 			symindex = i;
 			strindex = sechdrs[i].sh_link;
+			strtab = (char *)hdr + sechdrs[strindex].sh_offset;
 		}
 #ifndef CONFIG_MODULE_UNLOAD
 		/* Don't load .exit sections */
@@ -1145,12 +1178,6 @@
 #endif
 	}
 
-#ifdef CONFIG_KALLSYMS
-	/* Keep symbol and string tables for decoding later. */
-	sechdrs[symindex].sh_flags |= SHF_ALLOC;
-	sechdrs[strindex].sh_flags |= SHF_ALLOC;
-#endif
-
 	modindex = find_sec(hdr, sechdrs, secstrings,
 			    ".gnu.linkonce.this_module");
 	if (!modindex) {
@@ -1168,9 +1195,16 @@
 	setupindex = find_sec(hdr, sechdrs, secstrings, "__param");
 	exindex = find_sec(hdr, sechdrs, secstrings, "__ex_table");
 	obsparmindex = find_sec(hdr, sechdrs, secstrings, "__obsparm");
-	licenseindex = find_sec(hdr, sechdrs, secstrings, ".init.license");
-	vmagindex = find_sec(hdr, sechdrs, secstrings, "__vermagic");
 	versindex = find_sec(hdr, sechdrs, secstrings, "__versions");
+	infoindex = find_sec(hdr, sechdrs, secstrings, ".modinfo");
+
+	/* Don't keep modinfo section */
+	sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
+#ifdef CONFIG_KALLSYMS
+	/* Keep symbol and string tables for decoding later. */
+	sechdrs[symindex].sh_flags |= SHF_ALLOC;
+	sechdrs[strindex].sh_flags |= SHF_ALLOC;
+#endif
 
 	/* Check module struct version now, before we try to use module. */
 	if (!check_modstruct_version(sechdrs, versindex, mod)) {
@@ -1178,14 +1212,15 @@
 		goto free_hdr;
 	}
 
+	modmagic = get_modinfo(sechdrs, infoindex, "vermagic");
 	/* This is allowed: modprobe --force will invalidate it. */
-	if (!vmagindex) {
+	if (!modmagic) {
 		tainted |= TAINT_FORCED_MODULE;
 		printk(KERN_WARNING "%s: no version magic, tainting kernel.\n",
 		       mod->name);
-	} else if (!same_magic((char *)sechdrs[vmagindex].sh_addr, vermagic)) {
+	} else if (!same_magic(modmagic, vermagic)) {
 		printk(KERN_ERR "%s: version magic '%s' should be '%s'\n",
-		       mod->name, (char*)sechdrs[vmagindex].sh_addr, vermagic);
+		       mod->name, modmagic, vermagic);
 		err = -ENOEXEC;
 		goto free_hdr;
 	}
@@ -1265,11 +1300,11 @@
 	/* Now we've moved module, initialize linked lists, etc. */
 	module_unload_init(mod);
 
-	/* Set up license info based on contents of section */
-	set_license(mod, sechdrs, licenseindex);
+	/* Set up license info based on the info section */
+	set_license(mod, get_modinfo(sechdrs, infoindex, "license"));
 
 	/* Fix up syms, so that st_value is a pointer to location. */
-	err = simplify_symbols(sechdrs, symindex, strindex, versindex, mod);
+	err = simplify_symbols(sechdrs, symindex, strtab, versindex, mod);
 	if (err < 0)
 		goto cleanup;
 
@@ -1300,8 +1335,7 @@
 	for (i = 1; i < hdr->e_shnum; i++) {
 		const char *strtab = (char *)sechdrs[strindex].sh_addr;
 		if (sechdrs[i].sh_type == SHT_REL)
-			err = apply_relocate(sechdrs, strtab, symindex, i,
-					     mod);
+			err = apply_relocate(sechdrs, strtab, symindex, i,mod);
 		else if (sechdrs[i].sh_type == SHT_RELA)
 			err = apply_relocate_add(sechdrs, strtab, symindex, i,
 						 mod);
diff -urN linux-2.5.68-bk10/lib/percpu_counter.c linux-2.5.68-bk11/lib/percpu_counter.c
--- linux-2.5.68-bk10/lib/percpu_counter.c	2003-04-19 19:48:49.000000000 -0700
+++ linux-2.5.68-bk11/lib/percpu_counter.c	2003-05-01 04:40:40.000000000 -0700
@@ -1,5 +1,6 @@
 
 #include <linux/percpu_counter.h>
+#include <linux/sched.h>
 
 void percpu_counter_mod(struct percpu_counter *fbc, long amount)
 {
diff -urN linux-2.5.68-bk10/mm/memory.c linux-2.5.68-bk11/mm/memory.c
--- linux-2.5.68-bk10/mm/memory.c	2003-04-19 19:49:25.000000000 -0700
+++ linux-2.5.68-bk11/mm/memory.c	2003-05-01 04:40:40.000000000 -0700
@@ -292,8 +292,11 @@
 				 * and not mapped via rmap - duplicate the
 				 * mapping as is.
 				 */
-				page = pfn_to_page(pfn);
-				if (!pfn_valid(pfn) || PageReserved(page)) {
+				page = NULL;
+				if (pfn_valid(pfn)) 
+					page = pfn_to_page(pfn); 
+
+				if (!page || PageReserved(page)) {
 					set_pte(dst_pte, pte);
 					goto cont_copy_pte_range_noset;
 				}
diff -urN linux-2.5.68-bk10/mm/oom_kill.c linux-2.5.68-bk11/mm/oom_kill.c
--- linux-2.5.68-bk10/mm/oom_kill.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/mm/oom_kill.c	2003-05-01 04:40:40.000000000 -0700
@@ -208,6 +208,11 @@
  */
 void out_of_memory(void)
 {
+	/*
+	 * oom_lock protects out_of_memory()'s static variables.
+	 * It's a global lock; this is not performance-critical.
+	 */
+	static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
 	static unsigned long first, last, count, lastkill;
 	unsigned long now, since;
 
@@ -217,6 +222,7 @@
 	if (nr_swap_pages > 0)
 		return;
 
+	spin_lock(&oom_lock);
 	now = jiffies;
 	since = now - last;
 	last = now;
@@ -235,14 +241,14 @@
 	 */
 	since = now - first;
 	if (since < HZ)
-		return;
+		goto out_unlock;
 
 	/*
 	 * If we have gotten only a few failures,
 	 * we're not really oom. 
 	 */
 	if (++count < 10)
-		return;
+		goto out_unlock;
 
 	/*
 	 * If we just killed a process, wait a while
@@ -251,15 +257,27 @@
 	 */
 	since = now - lastkill;
 	if (since < HZ*5)
-		return;
+		goto out_unlock;
 
 	/*
 	 * Ok, really out of memory. Kill something.
 	 */
 	lastkill = now;
+
+	/* oom_kill() sleeps */
+	spin_unlock(&oom_lock);
 	oom_kill();
+	spin_lock(&oom_lock);
 
 reset:
-	first = now;
+	/*
+	 * We dropped the lock above, so check to be sure the variable
+	 * first only ever increases to prevent false OOM's.
+	 */
+	if (time_after(now, first))
+		first = now;
 	count = 0;
+
+out_unlock:
+	spin_unlock(&oom_lock);
 }
diff -urN linux-2.5.68-bk10/mm/vmscan.c linux-2.5.68-bk11/mm/vmscan.c
--- linux-2.5.68-bk10/mm/vmscan.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/mm/vmscan.c	2003-05-01 04:40:40.000000000 -0700
@@ -557,6 +557,7 @@
 refill_inactive_zone(struct zone *zone, const int nr_pages_in,
 			struct page_state *ps, int priority)
 {
+	int pgmoved;
 	int pgdeactivate = 0;
 	int nr_pages = nr_pages_in;
 	LIST_HEAD(l_hold);	/* The pages which were snipped off */
@@ -570,6 +571,7 @@
 	long swap_tendency;
 
 	lru_add_drain();
+	pgmoved = 0;
 	spin_lock_irq(&zone->lru_lock);
 	while (nr_pages && !list_empty(&zone->active_list)) {
 		page = list_entry(zone->active_list.prev, struct page, lru);
@@ -584,9 +586,11 @@
 		} else {
 			page_cache_get(page);
 			list_add(&page->lru, &l_hold);
+			pgmoved++;
 		}
 		nr_pages--;
 	}
+	zone->nr_active -= pgmoved;
 	spin_unlock_irq(&zone->lru_lock);
 
 	/*
@@ -646,10 +650,10 @@
 			continue;
 		}
 		list_add(&page->lru, &l_inactive);
-		pgdeactivate++;
 	}
 
 	pagevec_init(&pvec, 1);
+	pgmoved = 0;
 	spin_lock_irq(&zone->lru_lock);
 	while (!list_empty(&l_inactive)) {
 		page = list_entry(l_inactive.prev, struct page, lru);
@@ -659,19 +663,27 @@
 		if (!TestClearPageActive(page))
 			BUG();
 		list_move(&page->lru, &zone->inactive_list);
+		pgmoved++;
 		if (!pagevec_add(&pvec, page)) {
+			zone->nr_inactive += pgmoved;
 			spin_unlock_irq(&zone->lru_lock);
+			pgdeactivate += pgmoved;
+			pgmoved = 0;
 			if (buffer_heads_over_limit)
 				pagevec_strip(&pvec);
 			__pagevec_release(&pvec);
 			spin_lock_irq(&zone->lru_lock);
 		}
 	}
+	zone->nr_inactive += pgmoved;
+	pgdeactivate += pgmoved;
 	if (buffer_heads_over_limit) {
 		spin_unlock_irq(&zone->lru_lock);
 		pagevec_strip(&pvec);
 		spin_lock_irq(&zone->lru_lock);
 	}
+
+	pgmoved = 0;
 	while (!list_empty(&l_active)) {
 		page = list_entry(l_active.prev, struct page, lru);
 		prefetchw_prev_lru_page(page, &l_active, flags);
@@ -679,14 +691,16 @@
 			BUG();
 		BUG_ON(!PageActive(page));
 		list_move(&page->lru, &zone->active_list);
+		pgmoved++;
 		if (!pagevec_add(&pvec, page)) {
+			zone->nr_active += pgmoved;
+			pgmoved = 0;
 			spin_unlock_irq(&zone->lru_lock);
 			__pagevec_release(&pvec);
 			spin_lock_irq(&zone->lru_lock);
 		}
 	}
-	zone->nr_active -= pgdeactivate;
-	zone->nr_inactive += pgdeactivate;
+	zone->nr_active += pgmoved;
 	spin_unlock_irq(&zone->lru_lock);
 	pagevec_release(&pvec);
 
diff -urN linux-2.5.68-bk10/net/802/psnap.c linux-2.5.68-bk11/net/802/psnap.c
--- linux-2.5.68-bk10/net/802/psnap.c	2003-04-19 19:51:17.000000000 -0700
+++ linux-2.5.68-bk11/net/802/psnap.c	2003-05-01 04:40:40.000000000 -0700
@@ -21,9 +21,9 @@
 #include <linux/mm.h>
 #include <linux/in.h>
 #include <linux/init.h>
-#include <linux/brlock.h>
 
-LIST_HEAD(snap_list);
+static LIST_HEAD(snap_list);
+static spinlock_t snap_lock = SPIN_LOCK_UNLOCKED;
 static struct llc_sap *snap_sap;
 
 /*
@@ -34,17 +34,13 @@
 	struct list_head *entry;
 	struct datalink_proto *proto = NULL, *p;
 
-	if (list_empty(&snap_list))
-		goto out;
-
-	list_for_each(entry, &snap_list) {
+	list_for_each_rcu(entry, &snap_list) {
 		p = list_entry(entry, struct datalink_proto, node);
 		if (!memcmp(p->type, desc, 5)) {
 			proto = p;
 			break;
 		}
 	}
-out:
 	return proto;
 }
 
@@ -55,11 +51,13 @@
 		    struct packet_type *pt)
 {
 	int rc = 1;
-	struct datalink_proto *proto = find_snap_client(skb->h.raw);
+	struct datalink_proto *proto;
 	static struct packet_type snap_packet_type = {
 		.type = __constant_htons(ETH_P_SNAP),
 	};
 
+	rcu_read_lock();
+	proto = find_snap_client(skb->h.raw);
 	if (proto) {
 		/* Pass the frame on. */
 		skb->h.raw  += 5;
@@ -71,6 +69,7 @@
 		rc = 1;
 	}
 
+	rcu_read_unlock();
 	return rc;
 }
 
@@ -124,7 +123,7 @@
 {
 	struct datalink_proto *proto = NULL;
 
-	br_write_lock_bh(BR_NETPROTO_LOCK);
+	spin_lock_bh(&snap_lock);
 
 	if (find_snap_client(desc))
 		goto out;
@@ -135,10 +134,12 @@
 		proto->rcvfunc		= rcvfunc;
 		proto->header_length	= 5 + 3; /* snap + 802.2 */
 		proto->request		= snap_request;
-		list_add(&proto->node, &snap_list);
+		list_add_rcu(&proto->node, &snap_list);
 	}
 out:
-	br_write_unlock_bh(BR_NETPROTO_LOCK);
+	spin_unlock_bh(&snap_lock);
+
+	synchronize_net();
 	return proto;
 }
 
@@ -147,12 +148,13 @@
  */
 void unregister_snap_client(struct datalink_proto *proto)
 {
-	br_write_lock_bh(BR_NETPROTO_LOCK);
+	spin_lock_bh(&snap_lock);
+	list_del_rcu(&proto->node);
+	spin_unlock_bh(&snap_lock);
 
-	list_del(&proto->node);
-	kfree(proto);
+	synchronize_net();
 
-	br_write_unlock_bh(BR_NETPROTO_LOCK);
+	kfree(proto);
 }
 
 MODULE_LICENSE("GPL");
diff -urN linux-2.5.68-bk10/net/bridge/br_fdb.c linux-2.5.68-bk11/net/bridge/br_fdb.c
--- linux-2.5.68-bk10/net/bridge/br_fdb.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/bridge/br_fdb.c	2003-05-01 04:40:40.000000000 -0700
@@ -68,28 +68,6 @@
 	return x & (BR_HASH_SIZE - 1);
 }
 
-static __inline__ void __hash_link(struct net_bridge *br,
-				   struct net_bridge_fdb_entry *ent,
-				   int hash)
-{
-	ent->next_hash = br->hash[hash];
-	if (ent->next_hash != NULL)
-		ent->next_hash->pprev_hash = &ent->next_hash;
-	br->hash[hash] = ent;
-	ent->pprev_hash = &br->hash[hash];
-}
-
-static __inline__ void __hash_unlink(struct net_bridge_fdb_entry *ent)
-{
-	*(ent->pprev_hash) = ent->next_hash;
-	if (ent->next_hash != NULL)
-		ent->next_hash->pprev_hash = ent->pprev_hash;
-	ent->next_hash = NULL;
-	ent->pprev_hash = NULL;
-}
-
-
-
 void br_fdb_changeaddr(struct net_bridge_port *p, unsigned char *newaddr)
 {
 	struct net_bridge *br;
@@ -99,22 +77,24 @@
 	br = p->br;
 	write_lock_bh(&br->hash_lock);
 	for (i=0;i<BR_HASH_SIZE;i++) {
-		struct net_bridge_fdb_entry *f;
+		struct hlist_node *h;
+		
+		hlist_for_each(h, &br->hash[i]) {
+			struct net_bridge_fdb_entry *f
+				= hlist_entry(h, struct net_bridge_fdb_entry, hlist);
 
-		f = br->hash[i];
-		while (f != NULL) {
 			if (f->dst == p && f->is_local) {
 				memcpy(f->addr.addr, newaddr, ETH_ALEN);
 				if (newhash != i) {
-					__hash_unlink(f);
-					__hash_link(br, f, newhash);
+					hlist_del(&f->hlist);
+					hlist_add_head(&f->hlist,
+						       &br->hash[newhash]);
 				}
-				write_unlock_bh(&br->hash_lock);
-				return;
+				goto out;
 			}
-			f = f->next_hash;
 		}
 	}
+ out:
 	write_unlock_bh(&br->hash_lock);
 }
 
@@ -127,19 +107,16 @@
 
 	write_lock_bh(&br->hash_lock);
 	for (i=0;i<BR_HASH_SIZE;i++) {
-		struct net_bridge_fdb_entry *f;
-
-		f = br->hash[i];
-		while (f != NULL) {
-			struct net_bridge_fdb_entry *g;
-
-			g = f->next_hash;
+		struct hlist_node *h, *g;
+		
+		hlist_for_each_safe(h, g, &br->hash[i]) {
+			struct net_bridge_fdb_entry *f
+				= hlist_entry(h, struct net_bridge_fdb_entry, hlist);
 			if (!f->is_static &&
 			    time_before_eq(f->ageing_timer, timeout)) {
-				__hash_unlink(f);
+				hlist_del(&f->hlist);
 				br_fdb_put(f);
 			}
-			f = g;
 		}
 	}
 	write_unlock_bh(&br->hash_lock);
@@ -151,18 +128,15 @@
 
 	write_lock_bh(&br->hash_lock);
 	for (i=0;i<BR_HASH_SIZE;i++) {
-		struct net_bridge_fdb_entry *f;
-
-		f = br->hash[i];
-		while (f != NULL) {
-			struct net_bridge_fdb_entry *g;
-
-			g = f->next_hash;
+		struct hlist_node *h, *g;
+		
+		hlist_for_each_safe(h, g, &br->hash[i]) {
+			struct net_bridge_fdb_entry *f
+				= hlist_entry(h, struct net_bridge_fdb_entry, hlist);
 			if (f->dst == p) {
-				__hash_unlink(f);
+				hlist_del(&f->hlist);
 				br_fdb_put(f);
 			}
-			f = g;
 		}
 	}
 	write_unlock_bh(&br->hash_lock);
@@ -170,25 +144,24 @@
 
 struct net_bridge_fdb_entry *br_fdb_get(struct net_bridge *br, unsigned char *addr)
 {
-	struct net_bridge_fdb_entry *fdb;
+	struct hlist_node *h;
 
 	read_lock_bh(&br->hash_lock);
-	fdb = br->hash[br_mac_hash(addr)];
-	while (fdb != NULL) {
+		
+	hlist_for_each(h, &br->hash[br_mac_hash(addr)]) {
+		struct net_bridge_fdb_entry *fdb
+			= hlist_entry(h, struct net_bridge_fdb_entry, hlist);
+
 		if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
-			if (!has_expired(br, fdb)) {
-				atomic_inc(&fdb->use_count);
-				read_unlock_bh(&br->hash_lock);
-				return fdb;
-			}
+			if (has_expired(br, fdb))
+				goto ret_null;
 
+			atomic_inc(&fdb->use_count);
 			read_unlock_bh(&br->hash_lock);
-			return NULL;
+			return fdb;
 		}
-
-		fdb = fdb->next_hash;
 	}
-
+ ret_null:
 	read_unlock_bh(&br->hash_lock);
 	return NULL;
 }
@@ -213,12 +186,16 @@
 
 	read_lock_bh(&br->hash_lock);
 	for (i=0;i<BR_HASH_SIZE;i++) {
-		struct net_bridge_fdb_entry *f;
-
-		for (f = br->hash[i]; f != NULL && num < maxnum;
-		     f = f->next_hash) {
+		struct hlist_node *h;
+		
+		hlist_for_each(h, &br->hash[i]) {
+			struct net_bridge_fdb_entry *f
+				= hlist_entry(h, struct net_bridge_fdb_entry, hlist);
 			struct __fdb_entry ent;
 
+			if (num >= maxnum)
+				goto out;
+
 			if (has_expired(br, f)) 
 				continue;
 
@@ -277,14 +254,15 @@
 		   unsigned char *addr,
 		   int is_local)
 {
+	struct hlist_node *h;
 	struct net_bridge_fdb_entry *fdb;
 	int hash;
 
 	hash = br_mac_hash(addr);
 
 	write_lock_bh(&br->hash_lock);
-	fdb = br->hash[hash];
-	while (fdb != NULL) {
+	hlist_for_each(h, &br->hash[hash]) {
+		fdb = hlist_entry(h, struct net_bridge_fdb_entry, hlist);
 		if (!fdb->is_local &&
 		    !memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
 			__fdb_possibly_replace(fdb, source, is_local);
@@ -292,7 +270,6 @@
 			return;
 		}
 
-		fdb = fdb->next_hash;
 	}
 
 	fdb = kmalloc(sizeof(*fdb), GFP_ATOMIC);
@@ -308,7 +285,7 @@
 	fdb->is_static = is_local;
 	fdb->ageing_timer = jiffies;
 
-	__hash_link(br, fdb, hash);
+	hlist_add_head(&fdb->hlist, &br->hash[hash]);
 
 	write_unlock_bh(&br->hash_lock);
 }
diff -urN linux-2.5.68-bk10/net/bridge/br_private.h linux-2.5.68-bk11/net/bridge/br_private.h
--- linux-2.5.68-bk10/net/bridge/br_private.h	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/bridge/br_private.h	2003-05-01 04:40:40.000000000 -0700
@@ -43,8 +43,7 @@
 
 struct net_bridge_fdb_entry
 {
-	struct net_bridge_fdb_entry	*next_hash;
-	struct net_bridge_fdb_entry	**pprev_hash;
+	struct hlist_node		hlist;
 	atomic_t			use_count;
 	mac_addr			addr;
 	struct net_bridge_port		*dst;
@@ -86,7 +85,7 @@
 	struct net_device		dev;
 	struct net_device_stats		statistics;
 	rwlock_t			hash_lock;
-	struct net_bridge_fdb_entry	*hash[BR_HASH_SIZE];
+	struct hlist_head		hash[BR_HASH_SIZE];
 	struct timer_list		tick;
 
 	/* STP */
diff -urN linux-2.5.68-bk10/net/core/netfilter.c linux-2.5.68-bk11/net/core/netfilter.c
--- linux-2.5.68-bk10/net/core/netfilter.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/core/netfilter.c	2003-05-01 04:40:40.000000000 -0700
@@ -550,6 +550,7 @@
 		 unsigned int verdict)
 {
 	struct list_head *elem = &info->elem->list;
+	struct list_head *i;
 
 	rcu_read_lock();
 
@@ -592,10 +593,6 @@
 			      info->indev, info->outdev, info->okfn))
 			goto next_hook;
 		break;
-
-	case NF_DROP:
-		kfree_skb(skb);
-		break;
 	}
 	rcu_read_unlock();
 
@@ -611,6 +608,10 @@
 	}
 #endif
 
+
+	if (verdict == NF_DROP)
+		kfree_skb(skb);
+
 	kfree(info);
 	return;
 }
diff -urN linux-2.5.68-bk10/net/core/skbuff.c linux-2.5.68-bk11/net/core/skbuff.c
--- linux-2.5.68-bk10/net/core/skbuff.c	2003-04-19 19:50:30.000000000 -0700
+++ linux-2.5.68-bk11/net/core/skbuff.c	2003-05-01 04:40:40.000000000 -0700
@@ -20,6 +20,7 @@
  *		Ray VanTassle	:	Fixed --skb->lock in free
  *		Alan Cox	:	skb_copy copy arp field
  *		Andi Kleen	:	slabified it.
+ *		Robert Olsson	:	Removed skb_head_pool
  *
  *	NOTE:
  *		The __skb_ routines should be called with interrupts
@@ -63,15 +64,8 @@
 #include <asm/uaccess.h>
 #include <asm/system.h>
 
-int sysctl_hot_list_len = 128;
-
 static kmem_cache_t *skbuff_head_cache;
 
-static union {
-	struct sk_buff_head	list;
-	char			pad[SMP_CACHE_BYTES];
-} skb_head_pool[NR_CPUS];
-
 /*
  *	Keep out-of-line to prevent kernel bloat.
  *	__builtin_return_address is not used because it is not always
@@ -109,44 +103,6 @@
 	BUG();
 }
 
-static __inline__ struct sk_buff *skb_head_from_pool(void)
-{
-	struct sk_buff_head *list;
-	struct sk_buff *skb = NULL;
-	unsigned long flags;
-
-	local_irq_save(flags);
-
-	list = &skb_head_pool[smp_processor_id()].list;
-
-	if (skb_queue_len(list))
-		skb = __skb_dequeue(list);
-
-	local_irq_restore(flags);
-	return skb;
-}
-
-static __inline__ void skb_head_to_pool(struct sk_buff *skb)
-{
-	struct sk_buff_head *list;
-	unsigned long flags;
-
-	local_irq_save(flags);
-
-	list = &skb_head_pool[smp_processor_id()].list;
-
-	if (skb_queue_len(list) < sysctl_hot_list_len) {
-		__skb_queue_head(list, skb);
-		local_irq_restore(flags);
-
-		return;
-	}
-
-	local_irq_restore(flags);
-	kmem_cache_free(skbuff_head_cache, skb);
-}
-
-
 /* 	Allocate a new skbuff. We do this ourselves so we can fill in a few
  *	'private' fields and also do memory statistics to find all the
  *	[BEEP] leaks.
@@ -174,13 +130,10 @@
 		might_sleep();
 
 	/* Get the HEAD */
-	skb = skb_head_from_pool();
-	if (!skb) {
-		skb = kmem_cache_alloc(skbuff_head_cache,
-				       gfp_mask & ~__GFP_DMA);
-		if (!skb)
-			goto out;
-	}
+	skb = kmem_cache_alloc(skbuff_head_cache,
+			       gfp_mask & ~__GFP_DMA);
+	if (!skb)
+		goto out;
 
 	/* Get the DATA. Size must match skb_add_mtu(). */
 	size = SKB_DATA_ALIGN(size);
@@ -204,7 +157,7 @@
 out:
 	return skb;
 nodata:
-	skb_head_to_pool(skb);
+	kmem_cache_free(skbuff_head_cache, skb);
 	skb = NULL;
 	goto out;
 }
@@ -254,7 +207,7 @@
 void kfree_skbmem(struct sk_buff *skb)
 {
 	skb_release_data(skb);
-	skb_head_to_pool(skb);
+	kmem_cache_free(skbuff_head_cache, skb);
 }
 
 /**
@@ -309,13 +262,10 @@
 
 struct sk_buff *skb_clone(struct sk_buff *skb, int gfp_mask)
 {
-	struct sk_buff *n = skb_head_from_pool();
+	struct sk_buff *n = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
 
-	if (!n) {
-		n = kmem_cache_alloc(skbuff_head_cache, gfp_mask);
-		if (!n)
-			return NULL;
-	}
+	if (!n) 
+		return NULL;
 
 #define C(x) n->x = skb->x
 
@@ -1204,8 +1154,6 @@
 
 void __init skb_init(void)
 {
-	int i;
-
 	skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
 					      sizeof(struct sk_buff),
 					      0,
@@ -1213,7 +1161,4 @@
 					      NULL, NULL);
 	if (!skbuff_head_cache)
 		panic("cannot create skbuff cache");
-
-	for (i = 0; i < NR_CPUS; i++)
-		skb_queue_head_init(&skb_head_pool[i].list);
 }
diff -urN linux-2.5.68-bk10/net/core/sysctl_net_core.c linux-2.5.68-bk11/net/core/sysctl_net_core.c
--- linux-2.5.68-bk10/net/core/sysctl_net_core.c	2003-04-19 19:49:10.000000000 -0700
+++ linux-2.5.68-bk11/net/core/sysctl_net_core.c	2003-05-01 04:40:40.000000000 -0700
@@ -28,7 +28,6 @@
 
 extern int sysctl_core_destroy_delay;
 extern int sysctl_optmem_max;
-extern int sysctl_hot_list_len;
 
 #ifdef CONFIG_NET_DIVERT
 extern char sysctl_divert_version[];
@@ -150,14 +149,6 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec
 	},
-	{
-		.ctl_name	= NET_CORE_HOT_LIST_LENGTH,
-		.procname	= "hot_list_length",
-		.data		= &sysctl_hot_list_len,
-		.maxlen		= sizeof(int),
-		.mode		= 0644,
-		.proc_handler	= &proc_dointvec
-	},
 #ifdef CONFIG_NET_DIVERT
 	{
 		.ctl_name	= NET_CORE_DIVERT_VERSION,
diff -urN linux-2.5.68-bk10/net/ipv4/ip_output.c linux-2.5.68-bk11/net/ipv4/ip_output.c
--- linux-2.5.68-bk10/net/ipv4/ip_output.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/ipv4/ip_output.c	2003-05-01 04:40:40.000000000 -0700
@@ -263,7 +263,7 @@
 				newskb->dev, ip_dev_loopback_xmit);
 	}
 
-	if (skb->len > dev->mtu || skb_shinfo(skb)->frag_list)
+	if (skb->len > dst_pmtu(&rt->u.dst) || skb_shinfo(skb)->frag_list)
 		return ip_fragment(skb, ip_finish_output);
 	else
 		return ip_finish_output(skb);
@@ -273,7 +273,7 @@
 {
 	IP_INC_STATS(IpOutRequests);
 
-	if ((skb->len > skb->dst->dev->mtu || skb_shinfo(skb)->frag_list) &&
+	if ((skb->len > dst_pmtu(skb->dst) || skb_shinfo(skb)->frag_list) &&
 	    !skb_shinfo(skb)->tso_size)
 		return ip_fragment(skb, ip_finish_output);
 	else
diff -urN linux-2.5.68-bk10/net/ipv4/ipip.c linux-2.5.68-bk11/net/ipv4/ipip.c
--- linux-2.5.68-bk10/net/ipv4/ipip.c	2003-04-19 19:51:22.000000000 -0700
+++ linux-2.5.68-bk11/net/ipv4/ipip.c	2003-05-01 04:40:40.000000000 -0700
@@ -433,7 +433,7 @@
 		fl.fl4_src = eiph->saddr;
 		fl.fl4_tos = eiph->tos;
 		if (ip_route_output_key(&rt, &fl) ||
-		    rt->u.dst.dev->type != ARPHRD_IPGRE) {
+		    rt->u.dst.dev->type != ARPHRD_TUNNEL) {
 			ip_rt_put(rt);
 			kfree_skb(skb2);
 			return;
@@ -441,7 +441,7 @@
 	} else {
 		ip_rt_put(rt);
 		if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
-		    skb2->dst->dev->type != ARPHRD_IPGRE) {
+		    skb2->dst->dev->type != ARPHRD_TUNNEL) {
 			kfree_skb(skb2);
 			return;
 		}
diff -urN linux-2.5.68-bk10/net/llc/af_llc.c linux-2.5.68-bk11/net/llc/af_llc.c
--- linux-2.5.68-bk10/net/llc/af_llc.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/af_llc.c	2003-05-01 04:40:40.000000000 -0700
@@ -11,7 +11,7 @@
  *   connections.
  *
  * Copyright (c) 2001 by Jay Schulist <jschlst@samba.org>
- *		 2002 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2002-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -623,7 +623,8 @@
 	struct sk_buff *skb;
 	int rc = -EOPNOTSUPP;
 
-	dprintk("%s: accepting on %02X\n", __FUNCTION__, llc_sk(sk)->addr.sllc_ssap);
+	dprintk("%s: accepting on %02X\n", __FUNCTION__,
+	        llc_sk(sk)->addr.sllc_ssap);
 	lock_sock(sk);
 	if (sk->type != SOCK_STREAM)
 		goto out;
@@ -634,7 +635,8 @@
 	rc = llc_ui_wait_for_data(sk, sk->rcvtimeo);
 	if (rc)
 		goto out;
-	dprintk("%s: got a new connection on %02X\n", __FUNCTION__, llc_sk(sk)->addr.sllc_ssap);
+	dprintk("%s: got a new connection on %02X\n", __FUNCTION__,
+	        llc_sk(sk)->addr.sllc_ssap);
 	skb = skb_dequeue(&sk->receive_queue);
 	rc = -EINVAL;
 	if (!skb->sk)
@@ -692,8 +694,9 @@
 	timeout = sock_rcvtimeo(sk, noblock);
 	rc = llc_ui_wait_for_data(sk, timeout);
 	if (rc) {
-		dprintk("%s: llc_ui_wait_for_data failed recv in %02X from %02X\n",
-			__FUNCTION__, llc_sk(sk)->laddr.lsap, llc_sk(sk)->daddr.lsap);
+		dprintk("%s: llc_ui_wait_for_data failed recv "
+			"in %02X from %02X\n", __FUNCTION__,
+			llc_sk(sk)->laddr.lsap, llc_sk(sk)->daddr.lsap);
 		goto out;
 	}
 	skb = skb_dequeue(&sk->receive_queue);
@@ -742,7 +745,8 @@
 	struct sk_buff *skb;
 	int rc = -EINVAL, size = 0, copied = 0, hdrlen;
 
-	dprintk("%s: sending from %02X to %02X\n", __FUNCTION__, llc->laddr.lsap, llc->daddr.lsap);
+	dprintk("%s: sending from %02X to %02X\n", __FUNCTION__,
+		llc->laddr.lsap, llc->daddr.lsap);
 	lock_sock(sk);
 	if (addr) {
 		if (msg->msg_namelen < sizeof(*addr))
@@ -906,49 +910,49 @@
 		goto out;
 	rc = -EINVAL;
 	switch (optname) {
-		case LLC_OPT_RETRY:
-			if (opt > LLC_OPT_MAX_RETRY)
-				goto out;
-			llc->n2 = opt;
-			break;
-		case LLC_OPT_SIZE:
-			if (opt > LLC_OPT_MAX_SIZE)
-				goto out;
-			llc->n1 = opt;
-			break;
-		case LLC_OPT_ACK_TMR_EXP:
-			if (opt > LLC_OPT_MAX_ACK_TMR_EXP)
-				goto out;
-			llc->ack_timer.expire = opt;
-			break;
-		case LLC_OPT_P_TMR_EXP:
-			if (opt > LLC_OPT_MAX_P_TMR_EXP)
-				goto out;
-			llc->pf_cycle_timer.expire = opt;
-			break;
-		case LLC_OPT_REJ_TMR_EXP:
-			if (opt > LLC_OPT_MAX_REJ_TMR_EXP)
-				goto out;
-			llc->rej_sent_timer.expire = opt;
-			break;
-		case LLC_OPT_BUSY_TMR_EXP:
-			if (opt > LLC_OPT_MAX_BUSY_TMR_EXP)
-				goto out;
-			llc->busy_state_timer.expire = opt;
-			break;
-		case LLC_OPT_TX_WIN:
-			if (opt > LLC_OPT_MAX_WIN)
-				goto out;
-			llc->k = opt;
-			break;
-		case LLC_OPT_RX_WIN:
-			if (opt > LLC_OPT_MAX_WIN)
-				goto out;
-			llc->rw = opt;
-			break;
-		default:
-			rc = -ENOPROTOOPT;
+	case LLC_OPT_RETRY:
+		if (opt > LLC_OPT_MAX_RETRY)
+			goto out;
+		llc->n2 = opt;
+		break;
+	case LLC_OPT_SIZE:
+		if (opt > LLC_OPT_MAX_SIZE)
+			goto out;
+		llc->n1 = opt;
+		break;
+	case LLC_OPT_ACK_TMR_EXP:
+		if (opt > LLC_OPT_MAX_ACK_TMR_EXP)
+			goto out;
+		llc->ack_timer.expire = opt;
+		break;
+	case LLC_OPT_P_TMR_EXP:
+		if (opt > LLC_OPT_MAX_P_TMR_EXP)
+			goto out;
+		llc->pf_cycle_timer.expire = opt;
+		break;
+	case LLC_OPT_REJ_TMR_EXP:
+		if (opt > LLC_OPT_MAX_REJ_TMR_EXP)
 			goto out;
+		llc->rej_sent_timer.expire = opt;
+		break;
+	case LLC_OPT_BUSY_TMR_EXP:
+		if (opt > LLC_OPT_MAX_BUSY_TMR_EXP)
+			goto out;
+		llc->busy_state_timer.expire = opt;
+		break;
+	case LLC_OPT_TX_WIN:
+		if (opt > LLC_OPT_MAX_WIN)
+			goto out;
+		llc->k = opt;
+		break;
+	case LLC_OPT_RX_WIN:
+		if (opt > LLC_OPT_MAX_WIN)
+			goto out;
+		llc->rw = opt;
+		break;
+	default:
+		rc = -ENOPROTOOPT;
+		goto out;
 	}
 	rc = 0;
 out:
@@ -983,25 +987,25 @@
 	if (len != sizeof(int))
 		goto out;
 	switch (optname) {
-		case LLC_OPT_RETRY:
-			val = llc->n2;				break;
-		case LLC_OPT_SIZE:
-			val = llc->n1;				break;
-		case LLC_OPT_ACK_TMR_EXP:
-			val = llc->ack_timer.expire;		break;
-		case LLC_OPT_P_TMR_EXP:
-			val = llc->pf_cycle_timer.expire;	break;
-		case LLC_OPT_REJ_TMR_EXP:
-			val = llc->rej_sent_timer.expire;	break;
-		case LLC_OPT_BUSY_TMR_EXP:
-			val = llc->busy_state_timer.expire;	break;
-		case LLC_OPT_TX_WIN:
-			val = llc->k;				break;
-		case LLC_OPT_RX_WIN:
-			val = llc->rw;				break;
-		default:
-			rc = -ENOPROTOOPT;
-			goto out;
+	case LLC_OPT_RETRY:
+		val = llc->n2;				break;
+	case LLC_OPT_SIZE:
+		val = llc->n1;				break;
+	case LLC_OPT_ACK_TMR_EXP:
+		val = llc->ack_timer.expire;		break;
+	case LLC_OPT_P_TMR_EXP:
+		val = llc->pf_cycle_timer.expire;	break;
+	case LLC_OPT_REJ_TMR_EXP:
+		val = llc->rej_sent_timer.expire;	break;
+	case LLC_OPT_BUSY_TMR_EXP:
+		val = llc->busy_state_timer.expire;	break;
+	case LLC_OPT_TX_WIN:
+		val = llc->k;				break;
+	case LLC_OPT_RX_WIN:
+		val = llc->rw;				break;
+	default:
+		rc = -ENOPROTOOPT;
+		goto out;
 	}
 	rc = 0;
 	if (put_user(len, optlen) || copy_to_user(optval, &val, len))
@@ -1038,7 +1042,8 @@
 };
 
 static char llc_ui_banner[] __initdata =
-	KERN_INFO "NET4.0 IEEE 802.2 BSD sockets, Jay Schulist, 2001, Arnaldo C. Melo, 2002\n";
+	KERN_INFO "NET4.0 IEEE 802.2 BSD sockets, Jay Schulist, 2001, "
+		  "Arnaldo C. Melo, 2002-2003\n";
 
 int __init llc_ui_init(void)
 {
diff -urN linux-2.5.68-bk10/net/llc/llc_actn.c linux-2.5.68-bk11/net/llc/llc_actn.c
--- linux-2.5.68-bk10/net/llc/llc_actn.c	2003-04-19 19:48:55.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_actn.c	2003-05-01 04:40:40.000000000 -0700
@@ -8,7 +8,7 @@
  *   them return 0 On success and 1 otherwise.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_c_ac.c linux-2.5.68-bk11/net/llc/llc_c_ac.c
--- linux-2.5.68-bk10/net/llc/llc_c_ac.c	2003-04-19 19:51:13.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_c_ac.c	2003-05-01 04:40:40.000000000 -0700
@@ -8,7 +8,7 @@
  *   them return 0 On success and 1 otherwise.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -145,33 +145,32 @@
 	struct llc_opt *llc = llc_sk(sk);
 
 	switch (ev->type) {
-		case LLC_CONN_EV_TYPE_PDU:
-			if (!LLC_PDU_IS_RSP(pdu) &&
-			    !LLC_PDU_TYPE_IS_U(pdu) &&
-			    LLC_U_PDU_RSP(pdu) == LLC_2_PDU_RSP_FRMR) {
-				reason = LLC_RESET_REASON_LOCAL;
-				rc = 0;
-			} else if (!LLC_PDU_IS_CMD(pdu) &&
-				   !LLC_PDU_TYPE_IS_U(pdu) &&
-				   LLC_U_PDU_CMD(pdu) ==
-				   			LLC_2_PDU_CMD_SABME) {
-				reason = LLC_RESET_REASON_REMOTE;
-				rc = 0;
-			} else {
-				reason = 0;
-				rc  = 1;
-			}
-			break;
-		case LLC_CONN_EV_TYPE_ACK_TMR:
-		case LLC_CONN_EV_TYPE_P_TMR:
-		case LLC_CONN_EV_TYPE_REJ_TMR:
-		case LLC_CONN_EV_TYPE_BUSY_TMR:
-			if (llc->retry_count > llc->n2) {
-				reason = LLC_RESET_REASON_LOCAL;
-				rc = 0;
-			} else
-				rc = 1;
-			break;
+	case LLC_CONN_EV_TYPE_PDU:
+		if (!LLC_PDU_IS_RSP(pdu) &&
+		    !LLC_PDU_TYPE_IS_U(pdu) &&
+		    LLC_U_PDU_RSP(pdu) == LLC_2_PDU_RSP_FRMR) {
+			reason = LLC_RESET_REASON_LOCAL;
+			rc = 0;
+		} else if (!LLC_PDU_IS_CMD(pdu) &&
+			   !LLC_PDU_TYPE_IS_U(pdu) &&
+			   LLC_U_PDU_CMD(pdu) == LLC_2_PDU_CMD_SABME) {
+			reason = LLC_RESET_REASON_REMOTE;
+			rc = 0;
+		} else {
+			reason = 0;
+			rc  = 1;
+		}
+		break;
+	case LLC_CONN_EV_TYPE_ACK_TMR:
+	case LLC_CONN_EV_TYPE_P_TMR:
+	case LLC_CONN_EV_TYPE_REJ_TMR:
+	case LLC_CONN_EV_TYPE_BUSY_TMR:
+		if (llc->retry_count > llc->n2) {
+			reason = LLC_RESET_REASON_LOCAL;
+			rc = 0;
+		} else
+			rc = 1;
+		break;
 	}
 	if (!rc) {
 		ev->reason   = reason;
diff -urN linux-2.5.68-bk10/net/llc/llc_c_ev.c linux-2.5.68-bk11/net/llc/llc_c_ev.c
--- linux-2.5.68-bk10/net/llc/llc_c_ev.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_c_ev.c	2003-05-01 04:40:40.000000000 -0700
@@ -24,7 +24,7 @@
  * in their comments, at below.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -485,11 +485,11 @@
 				rc = 0;
 		} else if (!LLC_PDU_TYPE_IS_U(pdu))
 			switch (LLC_U_PDU_CMD(pdu)) {
-				case LLC_2_PDU_CMD_SABME:
-				case LLC_2_PDU_CMD_DISC:
-					if (!LLC_U_PF_IS_0(pdu))
-						rc = 0;
-					break;
+			case LLC_2_PDU_CMD_SABME:
+			case LLC_2_PDU_CMD_DISC:
+				if (!LLC_U_PF_IS_0(pdu))
+					rc = 0;
+				break;
 			}
 	}
 	return rc;
@@ -505,10 +505,10 @@
 			rc = 0;
 		else if (!LLC_PDU_TYPE_IS_U(pdu))
 			switch (LLC_U_PDU_CMD(pdu)) {
-				case LLC_2_PDU_CMD_SABME:
-				case LLC_2_PDU_CMD_DISC:
-					rc = 0;
-					break;
+			case LLC_2_PDU_CMD_SABME:
+			case LLC_2_PDU_CMD_DISC:
+				rc = 0;
+				break;
 			}
 	}
 	return rc;
@@ -525,12 +525,12 @@
 				rc = 0;
 		} else if (!LLC_PDU_TYPE_IS_U(pdu))
 			switch (LLC_U_PDU_RSP(pdu)) {
-				case LLC_2_PDU_RSP_UA:
-				case LLC_2_PDU_RSP_DM:
-				case LLC_2_PDU_RSP_FRMR:
-					if (!LLC_U_PF_IS_1(pdu))
-						rc = 0;
-					break;
+			case LLC_2_PDU_RSP_UA:
+			case LLC_2_PDU_RSP_DM:
+			case LLC_2_PDU_RSP_FRMR:
+				if (!LLC_U_PF_IS_1(pdu))
+					rc = 0;
+				break;
 			}
 	}
 	return rc;
@@ -546,11 +546,11 @@
 			rc = 0;
 		else if (!LLC_PDU_TYPE_IS_U(pdu))
 			switch (LLC_U_PDU_RSP(pdu)) {
-				case LLC_2_PDU_RSP_UA:
-				case LLC_2_PDU_RSP_DM:
-				case LLC_2_PDU_RSP_FRMR:
-					rc = 0;
-					break;
+			case LLC_2_PDU_RSP_UA:
+			case LLC_2_PDU_RSP_DM:
+			case LLC_2_PDU_RSP_FRMR:
+				rc = 0;
+				break;
 			}
 	}
 
@@ -566,13 +566,13 @@
 		rc = 0;
 	else if (!LLC_PDU_TYPE_IS_U(pdu))
 		switch (LLC_U_PDU_CMD(pdu)) {
-			case LLC_2_PDU_CMD_SABME:
-			case LLC_2_PDU_CMD_DISC:
-			case LLC_2_PDU_RSP_UA:
-			case LLC_2_PDU_RSP_DM:
-			case LLC_2_PDU_RSP_FRMR:
-				rc = 0;
-				break;
+		case LLC_2_PDU_CMD_SABME:
+		case LLC_2_PDU_CMD_DISC:
+		case LLC_2_PDU_RSP_UA:
+		case LLC_2_PDU_RSP_DM:
+		case LLC_2_PDU_RSP_FRMR:
+			rc = 0;
+			break;
 		}
 	return rc;
 }
diff -urN linux-2.5.68-bk10/net/llc/llc_c_st.c linux-2.5.68-bk11/net/llc/llc_c_st.c
--- linux-2.5.68-bk10/net/llc/llc_c_st.c	2003-04-19 19:49:20.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_c_st.c	2003-05-01 04:40:40.000000000 -0700
@@ -5,7 +5,7 @@
  * or in "llc_c_ac.c" and "llc_c_ev.c" modules.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001, 2002 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_conn.c linux-2.5.68-bk11/net/llc/llc_conn.c
--- linux-2.5.68-bk10/net/llc/llc_conn.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_conn.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_conn.c - Driver routines for connection component.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- *		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -84,7 +84,8 @@
 		goto out_kfree_skb;
 	}
 
-	if (!ev->ind_prim && !ev->cfm_prim) {   /* indicate or confirm not required */
+	if (!ev->ind_prim && !ev->cfm_prim) {
+		/* indicate or confirm not required */
 		if (!skb->list)
 			goto out_kfree_skb;
 		goto out_skb_put;
@@ -625,17 +626,17 @@
 	 * init_pf_cycle and I don't know what is it.
 	 */
 	switch (ev_type) {
-		case LLC_CONN_EV_TYPE_PRIM:
-			rc = llc_offset_table[state][0]; break;
-		case LLC_CONN_EV_TYPE_PDU:
-			rc = llc_offset_table[state][4]; break;
-		case LLC_CONN_EV_TYPE_SIMPLE:
-			rc = llc_offset_table[state][1]; break;
-		case LLC_CONN_EV_TYPE_P_TMR:
-		case LLC_CONN_EV_TYPE_ACK_TMR:
-		case LLC_CONN_EV_TYPE_REJ_TMR:
-		case LLC_CONN_EV_TYPE_BUSY_TMR:
-			rc = llc_offset_table[state][3]; break;
+	case LLC_CONN_EV_TYPE_PRIM:
+		rc = llc_offset_table[state][0]; break;
+	case LLC_CONN_EV_TYPE_PDU:
+		rc = llc_offset_table[state][4]; break;
+	case LLC_CONN_EV_TYPE_SIMPLE:
+		rc = llc_offset_table[state][1]; break;
+	case LLC_CONN_EV_TYPE_P_TMR:
+	case LLC_CONN_EV_TYPE_ACK_TMR:
+	case LLC_CONN_EV_TYPE_REJ_TMR:
+	case LLC_CONN_EV_TYPE_BUSY_TMR:
+		rc = llc_offset_table[state][3]; break;
 	}
 	return rc;
 }
diff -urN linux-2.5.68-bk10/net/llc/llc_evnt.c linux-2.5.68-bk11/net/llc/llc_evnt.c
--- linux-2.5.68-bk10/net/llc/llc_evnt.c	2003-04-19 19:48:54.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_evnt.c	2003-05-01 04:40:40.000000000 -0700
@@ -7,7 +7,7 @@
  *   them return 0 On success and 1 otherwise.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_if.c linux-2.5.68-bk11/net/llc/llc_if.c
--- linux-2.5.68-bk10/net/llc/llc_if.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_if.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_if.c - Defines LLC interface to upper layer
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_mac.c linux-2.5.68-bk11/net/llc/llc_mac.c
--- linux-2.5.68-bk10/net/llc/llc_mac.c	2003-04-19 19:50:38.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_mac.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_mac.c - Manages interface between LLC and MAC
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -78,7 +78,8 @@
 	}
 	sap = llc_sap_find(pdu->dsap);
 	if (!sap) {/* unknown SAP */
-		dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__, pdu->dsap);
+		dprintk("%s: llc_sap_find(%02X) failed!\n", __FUNCTION__,
+		        pdu->dsap);
 		goto drop;
 	}
 	llc_decode_pdu_type(skb, &dest);
@@ -255,41 +256,41 @@
 
 	switch (skb->dev->type) {
 #ifdef CONFIG_TR
-		case ARPHRD_IEEE802_TR: {
-			struct trh_hdr *trh;
-			struct net_device *dev = skb->dev;
-
-			trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh));
-			trh->ac = AC;
-			trh->fc = LLC_FRAME;
-			if (sa)
-				memcpy(trh->saddr, sa, dev->addr_len);
-			else
-				memset(trh->saddr, 0, dev->addr_len);
-			if (da) {
-				memcpy(trh->daddr, da, dev->addr_len);
-				tr_source_route(skb, trh, dev);
-			}
-			skb->mac.raw = skb->data;
-			break;
+	case ARPHRD_IEEE802_TR: {
+		struct trh_hdr *trh;
+		struct net_device *dev = skb->dev;
+
+		trh = (struct trh_hdr *)skb_push(skb, sizeof(*trh));
+		trh->ac = AC;
+		trh->fc = LLC_FRAME;
+		if (sa)
+			memcpy(trh->saddr, sa, dev->addr_len);
+		else
+			memset(trh->saddr, 0, dev->addr_len);
+		if (da) {
+			memcpy(trh->daddr, da, dev->addr_len);
+			tr_source_route(skb, trh, dev);
 		}
+		skb->mac.raw = skb->data;
+		break;
+	}
 #endif
-		case ARPHRD_ETHER:
-		case ARPHRD_LOOPBACK: {
-			unsigned short len = skb->len;
-			struct ethhdr *eth;
-
-			skb->mac.raw = skb_push(skb, sizeof(*eth));
-			eth = (struct ethhdr *)skb->mac.raw;
-			eth->h_proto = htons(len);
-			memcpy(eth->h_dest, da, ETH_ALEN);
-			memcpy(eth->h_source, sa, ETH_ALEN);
-			break;
-		}
-		default:
-			printk(KERN_WARNING "Unknown DEVICE type : %d\n",
-			       skb->dev->type);
-			rc = 1;
+	case ARPHRD_ETHER:
+	case ARPHRD_LOOPBACK: {
+		unsigned short len = skb->len;
+		struct ethhdr *eth;
+
+		skb->mac.raw = skb_push(skb, sizeof(*eth));
+		eth = (struct ethhdr *)skb->mac.raw;
+		eth->h_proto = htons(len);
+		memcpy(eth->h_dest, da, ETH_ALEN);
+		memcpy(eth->h_source, sa, ETH_ALEN);
+		break;
+	}
+	default:
+		printk(KERN_WARNING "Unknown DEVICE type : %d\n",
+		       skb->dev->type);
+		rc = 1;
 	}
 	return rc;
 }
diff -urN linux-2.5.68-bk10/net/llc/llc_main.c linux-2.5.68-bk11/net/llc/llc_main.c
--- linux-2.5.68-bk10/net/llc/llc_main.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_main.c	2003-05-01 04:40:40.000000000 -0700
@@ -3,7 +3,7 @@
  * 	and connections of the LLC.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001, 2002 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -600,5 +600,5 @@
 module_exit(llc_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Procom, 1997, Arnaldo C. Melo, Jay Schullist, 2001, 2002");
+MODULE_AUTHOR("Procom, 1997, Arnaldo C. Melo, Jay Schullist, 2001-2003");
 MODULE_DESCRIPTION("LLC 2.0, NET4.0 IEEE 802.2 extended support");
diff -urN linux-2.5.68-bk10/net/llc/llc_pdu.c linux-2.5.68-bk11/net/llc/llc_pdu.c
--- linux-2.5.68-bk10/net/llc/llc_pdu.c	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_pdu.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_pdu.c - access to PDU internals
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- *		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
@@ -63,13 +63,13 @@
 	pdu = llc_pdu_sn_hdr(skb);
 	
 	switch (pdu_type) {
-		case LLC_PDU_TYPE_I:
-		case LLC_PDU_TYPE_S:
-			pdu->ctrl_2 = (pdu->ctrl_2 & 0xFE) | bit_value;
-			break;
-		case LLC_PDU_TYPE_U:
-			pdu->ctrl_1 |= (pdu->ctrl_1 & 0xEF) | (bit_value << 4);
-			break;
+	case LLC_PDU_TYPE_I:
+	case LLC_PDU_TYPE_S:
+		pdu->ctrl_2 = (pdu->ctrl_2 & 0xFE) | bit_value;
+		break;
+	case LLC_PDU_TYPE_U:
+		pdu->ctrl_1 |= (pdu->ctrl_1 & 0xEF) | (bit_value << 4);
+		break;
 	}
 }
 
@@ -91,13 +91,13 @@
 	pdu = llc_pdu_sn_hdr(skb);
 
 	switch (pdu_type) {
-		case LLC_PDU_TYPE_I:
-		case LLC_PDU_TYPE_S:
-			*pf_bit = pdu->ctrl_2 & LLC_S_PF_BIT_MASK;
-			break;
-		case LLC_PDU_TYPE_U:
-			*pf_bit = (pdu->ctrl_1 & LLC_U_PF_BIT_MASK) >> 4;
-			break;
+	case LLC_PDU_TYPE_I:
+	case LLC_PDU_TYPE_S:
+		*pf_bit = pdu->ctrl_2 & LLC_S_PF_BIT_MASK;
+		break;
+	case LLC_PDU_TYPE_U:
+		*pf_bit = (pdu->ctrl_1 & LLC_U_PF_BIT_MASK) >> 4;
+		break;
 	}
 }
 
@@ -547,20 +547,20 @@
 	if ((pdu->ctrl_1 & LLC_PDU_TYPE_MASK) != LLC_PDU_TYPE_U)
 		goto out;
 	switch (LLC_U_PDU_CMD(pdu)) {
-		case LLC_1_PDU_CMD_XID:
-		case LLC_1_PDU_CMD_UI:
-		case LLC_1_PDU_CMD_TEST:
-			type = LLC_DEST_SAP;
-			break;
-		case LLC_2_PDU_CMD_SABME:
-		case LLC_2_PDU_CMD_DISC:
-		case LLC_2_PDU_RSP_UA:
-		case LLC_2_PDU_RSP_DM:
-		case LLC_2_PDU_RSP_FRMR:
-			break;
-		default:
-			type = LLC_DEST_INVALID;
-			break;
+	case LLC_1_PDU_CMD_XID:
+	case LLC_1_PDU_CMD_UI:
+	case LLC_1_PDU_CMD_TEST:
+		type = LLC_DEST_SAP;
+		break;
+	case LLC_2_PDU_CMD_SABME:
+	case LLC_2_PDU_CMD_DISC:
+	case LLC_2_PDU_RSP_UA:
+	case LLC_2_PDU_RSP_DM:
+	case LLC_2_PDU_RSP_FRMR:
+		break;
+	default:
+		type = LLC_DEST_INVALID;
+		break;
 	}
 out:
 	*dest = type;
@@ -604,13 +604,13 @@
 	} else
 		pdu_type = LLC_PDU_TYPE_I;
 	switch (pdu_type) {
-		case LLC_PDU_TYPE_I:
-		case LLC_PDU_TYPE_S:
-			pf_bit = pdu->ctrl_2 & LLC_S_PF_BIT_MASK;
-			break;
-		case LLC_PDU_TYPE_U:
-			pf_bit = (pdu->ctrl_1 & LLC_U_PF_BIT_MASK) >> 4;
-			break;
+	case LLC_PDU_TYPE_I:
+	case LLC_PDU_TYPE_S:
+		pf_bit = pdu->ctrl_2 & LLC_S_PF_BIT_MASK;
+		break;
+	case LLC_PDU_TYPE_U:
+		pf_bit = (pdu->ctrl_1 & LLC_U_PF_BIT_MASK) >> 4;
+		break;
 	}
 	return pf_bit;
 }
diff -urN linux-2.5.68-bk10/net/llc/llc_proc.c linux-2.5.68-bk11/net/llc/llc_proc.c
--- linux-2.5.68-bk10/net/llc/llc_proc.c	2003-04-19 19:48:51.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_proc.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * proc_llc.c - proc interface for LLC
  *
  * Copyright (c) 2001 by Jay Schulist <jschlst@samba.org>
- *		 2002 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2002-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_s_ac.c linux-2.5.68-bk11/net/llc/llc_s_ac.c
--- linux-2.5.68-bk10/net/llc/llc_s_ac.c	2003-04-19 19:50:45.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_s_ac.c	2003-05-01 04:40:40.000000000 -0700
@@ -8,7 +8,7 @@
  *   them return 0 On success and 1 otherwise.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- *		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_s_ev.c linux-2.5.68-bk11/net/llc/llc_s_ev.c
--- linux-2.5.68-bk10/net/llc/llc_s_ev.c	2003-04-19 19:50:29.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_s_ev.c	2003-05-01 04:40:40.000000000 -0700
@@ -5,7 +5,7 @@
  * in 802.2 LLC protocol standard document.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- *		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_s_st.c linux-2.5.68-bk11/net/llc/llc_s_st.c
--- linux-2.5.68-bk10/net/llc/llc_s_st.c	2003-04-19 19:48:50.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_s_st.c	2003-05-01 04:40:40.000000000 -0700
@@ -5,7 +5,7 @@
  * which are described in 802.2 LLC protocol standard document.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- *		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ *		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_sap.c linux-2.5.68-bk11/net/llc/llc_sap.c
--- linux-2.5.68-bk10/net/llc/llc_sap.c	2003-04-19 19:50:35.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_sap.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_sap.c - driver routines for SAP component.
  *
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/llc/llc_stat.c linux-2.5.68-bk11/net/llc/llc_stat.c
--- linux-2.5.68-bk10/net/llc/llc_stat.c	2003-04-19 19:48:52.000000000 -0700
+++ linux-2.5.68-bk11/net/llc/llc_stat.c	2003-05-01 04:40:40.000000000 -0700
@@ -2,7 +2,7 @@
  * llc_stat.c - Implementation of LLC station component state machine
  * 		transitions
  * Copyright (c) 1997 by Procom Technology, Inc.
- * 		 2001 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+ * 		 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
  *
  * This program can be redistributed or modified under the terms of the
  * GNU General Public License as published by the Free Software Foundation.
diff -urN linux-2.5.68-bk10/net/sched/cls_api.c linux-2.5.68-bk11/net/sched/cls_api.c
--- linux-2.5.68-bk10/net/sched/cls_api.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/sched/cls_api.c	2003-05-01 04:40:40.000000000 -0700
@@ -65,37 +65,38 @@
 int register_tcf_proto_ops(struct tcf_proto_ops *ops)
 {
 	struct tcf_proto_ops *t, **tp;
+	int rc = -EEXIST;
 
 	write_lock(&cls_mod_lock);
-	for (tp = &tcf_proto_base; (t=*tp) != NULL; tp = &t->next) {
-		if (strcmp(ops->kind, t->kind) == 0) {
-			write_unlock(&cls_mod_lock);
-			return -EEXIST;
-		}
-	}
+	for (tp = &tcf_proto_base; (t = *tp) != NULL; tp = &t->next)
+		if (!strcmp(ops->kind, t->kind))
+			goto out;
 
 	ops->next = NULL;
 	*tp = ops;
+	rc = 0;
+out:
 	write_unlock(&cls_mod_lock);
-	return 0;
+	return rc;
 }
 
 int unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
 {
 	struct tcf_proto_ops *t, **tp;
+	int rc = -ENOENT;
 
 	write_lock(&cls_mod_lock);
 	for (tp = &tcf_proto_base; (t=*tp) != NULL; tp = &t->next)
 		if (t == ops)
 			break;
 
-	if (!t) {
-		write_unlock(&cls_mod_lock);
-		return -ENOENT;
-	}
+	if (!t)
+		goto out;
 	*tp = t->next;
+	rc = 0;
+out:
 	write_unlock(&cls_mod_lock);
-	return 0;
+	return rc;
 }
 
 static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n,
@@ -371,11 +372,8 @@
 		q = dev->qdisc_sleeping;
 	else
 		q = qdisc_lookup(dev, TC_H_MAJ(tcm->tcm_parent));
-	if (q == NULL) {
-		read_unlock(&qdisc_tree_lock);
-		dev_put(dev);
-		return skb->len;
-	}
+	if (!q)
+		goto out;
 	if ((cops = q->ops->cl_ops) == NULL)
 		goto errout;
 	if (TC_H_MIN(tcm->tcm_parent)) {
@@ -425,7 +423,7 @@
 errout:
 	if (cl)
 		cops->put(q, cl);
-
+out:
 	read_unlock(&qdisc_tree_lock);
 	dev_put(dev);
 	return skb->len;
diff -urN linux-2.5.68-bk10/net/sched/cls_fw.c linux-2.5.68-bk11/net/sched/cls_fw.c
--- linux-2.5.68-bk10/net/sched/cls_fw.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/sched/cls_fw.c	2003-05-01 04:40:40.000000000 -0700
@@ -152,7 +152,7 @@
 	struct fw_filter **fp;
 
 	if (head == NULL || f == NULL)
-		return -EINVAL;
+		goto out;
 
 	for (fp=&head->ht[fw_hash(f->id)]; *fp; fp = &(*fp)->next) {
 		if (*fp == f) {
@@ -171,6 +171,7 @@
 			return 0;
 		}
 	}
+out:
 	return -EINVAL;
 }
 
diff -urN linux-2.5.68-bk10/net/sched/cls_u32.c linux-2.5.68-bk11/net/sched/cls_u32.c
--- linux-2.5.68-bk10/net/sched/cls_u32.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/sched/cls_u32.c	2003-05-01 04:40:40.000000000 -0700
@@ -203,17 +203,17 @@
 u32_lookup_key(struct tc_u_hnode *ht, u32 handle)
 {
 	unsigned sel;
-	struct tc_u_knode *n;
+	struct tc_u_knode *n = NULL;
 
 	sel = TC_U32_HASH(handle);
 	if (sel > ht->divisor)
-		return 0;
+		goto out;
 
 	for (n = ht->ht[sel]; n; n = n->next)
 		if (n->handle == handle)
-			return n;
-
-	return NULL;
+			break;
+out:
+	return n;
 }
 
 
diff -urN linux-2.5.68-bk10/net/sched/sch_api.c linux-2.5.68-bk11/net/sched/sch_api.c
--- linux-2.5.68-bk10/net/sched/sch_api.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/sched/sch_api.c	2003-05-01 04:40:40.000000000 -0700
@@ -139,21 +139,19 @@
 
 /* The list of all installed queueing disciplines. */
 
-static struct Qdisc_ops *qdisc_base = NULL;
+static struct Qdisc_ops *qdisc_base;
 
 /* Register/uregister queueing discipline */
 
 int register_qdisc(struct Qdisc_ops *qops)
 {
 	struct Qdisc_ops *q, **qp;
+	int rc = -EEXIST;
 
 	write_lock(&qdisc_mod_lock);
-	for (qp = &qdisc_base; (q=*qp)!=NULL; qp = &q->next) {
-		if (strcmp(qops->id, q->id) == 0) {
-			write_unlock(&qdisc_mod_lock);
-			return -EEXIST;
-		}
-	}
+	for (qp = &qdisc_base; (q = *qp) != NULL; qp = &q->next)
+		if (!strcmp(qops->id, q->id))
+			goto out;
 
 	if (qops->enqueue == NULL)
 		qops->enqueue = noop_qdisc_ops.enqueue;
@@ -164,8 +162,10 @@
 
 	qops->next = NULL;
 	*qp = qops;
+	rc = 0;
+out:
 	write_unlock(&qdisc_mod_lock);
-	return 0;
+	return rc;
 }
 
 int unregister_qdisc(struct Qdisc_ops *qops)
diff -urN linux-2.5.68-bk10/net/sched/sch_ingress.c linux-2.5.68-bk11/net/sched/sch_ingress.c
--- linux-2.5.68-bk10/net/sched/sch_ingress.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/net/sched/sch_ingress.c	2003-05-01 04:40:40.000000000 -0700
@@ -45,7 +45,7 @@
 
 /* Thanks to Doron Oz for this hack
 */
-static int nf_registered = 0; 
+static int nf_registered; 
 
 struct ingress_qdisc_data {
 	struct Qdisc		*q;
@@ -237,14 +237,12 @@
 }
 
 /* after ipt_filter */
-static struct nf_hook_ops ing_ops =
-{
-	{ NULL, NULL},
-	ing_hook,
-	THIS_MODULE,
-	PF_INET,
-	NF_IP_PRE_ROUTING,
-	NF_IP_PRI_FILTER + 1
+static struct nf_hook_ops ing_ops = {
+	.hook           = ing_hook,
+	.owner		= THIS_MODULE,
+	.pf             = PF_INET,
+	.hooknum        = NF_IP_PRE_ROUTING,
+	.priority       = NF_IP_PRI_FILTER + 1,
 };
 
 int ingress_init(struct Qdisc *sch,struct rtattr *opt)
@@ -255,7 +253,7 @@
 		if (nf_register_hook(&ing_ops) < 0) {
 			printk("ingress qdisc registration error \n");
 			goto error;
-			}
+		}
 		nf_registered++;
 	}
 
diff -urN linux-2.5.68-bk10/scripts/modpost.c linux-2.5.68-bk11/scripts/modpost.c
--- linux-2.5.68-bk10/scripts/modpost.c	2003-04-19 19:48:53.000000000 -0700
+++ linux-2.5.68-bk11/scripts/modpost.c	2003-05-01 04:40:40.000000000 -0700
@@ -404,9 +404,7 @@
 	buf_printf(b, "#include <linux/vermagic.h>\n");
 	buf_printf(b, "#include <linux/compiler.h>\n");
 	buf_printf(b, "\n");
-	buf_printf(b, "const char vermagic[]\n");
-	buf_printf(b, "__attribute__((section(\"__vermagic\"))) =\n");
-	buf_printf(b, "VERMAGIC_STRING;\n");
+	buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
 }
 
 /* Record CRCs for unresolved symbols */
diff -urN linux-2.5.68-bk10/sound/oss/cs46xx.c linux-2.5.68-bk11/sound/oss/cs46xx.c
--- linux-2.5.68-bk10/sound/oss/cs46xx.c	2003-05-01 04:40:09.000000000 -0700
+++ linux-2.5.68-bk11/sound/oss/cs46xx.c	2003-05-01 04:40:40.000000000 -0700
@@ -1247,7 +1247,7 @@
 		mapend = virt_to_page(dmabuf->rawbuf + 
 				(PAGE_SIZE << dmabuf->buforder) - 1);
 		for (map = virt_to_page(dmabuf->rawbuf); map <= mapend; map++)
-			cs4x_ClearPageReserved(map);
+			ClearPageReserved(map);
 		free_dmabuf(state->card, dmabuf);
 	}
 
@@ -1256,7 +1256,7 @@
 		mapend = virt_to_page(dmabuf->tmpbuff +
 				(PAGE_SIZE << dmabuf->buforder_tmpbuff) - 1);
 		for (map = virt_to_page(dmabuf->tmpbuff); map <= mapend; map++)
-			cs4x_ClearPageReserved(map);
+			ClearPageReserved(map);
 		free_dmabuf2(state->card, dmabuf);
 	}
 
