diff -Nru a/CREDITS b/CREDITS
--- a/CREDITS	Sun Dec 15 18:08:29 2002
+++ b/CREDITS	Sun Dec 15 18:08:29 2002
@@ -1272,11 +1272,13 @@
 
 N: Christoph Hellwig
 E: hch@infradead.org
-D: misc driver & makefile hacking
+E: hch@sgi.com
+D: all kinds of driver, filesystem & core kernel hacking
 D: freevxfs driver
 D: sysvfs maintainer
-S: Triftstraße 26
-S: 38644 Goslar
+D: chief codingstyle nitpicker
+S: Auweg 38
+S: 85748 Garching
 S: Germany
 
 N: Richard Henderson
diff -Nru a/Documentation/devices.txt b/Documentation/devices.txt
--- a/Documentation/devices.txt	Sun Dec 15 18:08:29 2002
+++ b/Documentation/devices.txt	Sun Dec 15 18:08:29 2002
@@ -97,6 +97,7 @@
 		  8 = /dev/random	Nondeterministic random number gen.
 		  9 = /dev/urandom	Faster, less secure random number gen.
 		 10 = /dev/aio		Asyncronous I/O notification interface
+		 11 = /dev/kmsg		Writes to this come out as printk's
     block	RAM disk
 		  0 = /dev/ram0		First RAM disk
 		  1 = /dev/ram1		Second RAM disk
diff -Nru a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
--- a/Documentation/filesystems/Locking	Sun Dec 15 18:08:32 2002
+++ b/Documentation/filesystems/Locking	Sun Dec 15 18:08:32 2002
@@ -92,6 +92,7 @@
 	void (*delete_inode) (struct inode *);
 	void (*put_super) (struct super_block *);
 	void (*write_super) (struct super_block *);
+	void (*sync_fs) (struct super_block *sb, int wait);
 	int (*statfs) (struct super_block *, struct statfs *);
 	int (*remount_fs) (struct super_block *, int *, char *);
 	void (*clear_inode) (struct inode *);
@@ -108,6 +109,7 @@
 clear_inode:	no	
 put_super:	yes	yes	maybe		(see below)
 write_super:	no	yes	maybe		(see below)
+sync_fs:	no	no	maybe		(see below)
 statfs:		no	no	no
 remount_fs:	yes	yes	maybe		(see below)
 umount_begin:	yes	no	maybe		(see below)
@@ -131,10 +133,10 @@
 
 --------------------------- address_space_operations --------------------------
 prototypes:
-	int (*writepage)(struct page *);
+	int (*writepage)(struct page *page, struct writeback_control *wbc);
 	int (*readpage)(struct file *, struct page *);
 	int (*sync_page)(struct page *);
-	int (*writepages)(struct address_space *, int *nr_to_write);
+	int (*writepages)(struct address_space *, struct writeback_control *);
 	int (*set_page_dirty)(struct page *page);
 	int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
 	int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
@@ -147,7 +149,7 @@
 	All except set_page_dirty may block
 
 			BKL	PageLocked(page)
-writepage:		no	yes, unlocks
+writepage:		no	yes, unlocks (see below)
 readpage:		no	yes, unlocks
 readpages:		no
 sync_page:		no	maybe
@@ -165,16 +167,38 @@
 	->readpage() unlocks the page, either synchronously or via I/O
 completion.
 
-	->readpages() populates the pagecache with the passed pages and starts I/O against them.  They come unlocked upon I/O completion.
+	->readpages() populates the pagecache with the passed pages and starts
+I/O against them.  They come unlocked upon I/O completion.
 
-	->writepage() unlocks the page synchronously, before returning to
-the caller.  If the page has write I/O underway against it, writepage()
-should run SetPageWriteback() against the page prior to unlocking it.
-The write I/O completion handler should run ClearPageWriteback against
-the page.
+	->writepage() is used for two purposes: for "memory cleansing" and for
+"sync".  These are quite different operations and the behaviour may differ
+depending upon the mode.
+
+If writepage is called for sync (wbc->sync_mode != WBC_SYNC_NONE) then
+it *must* start I/O against the page, even if that would involve
+blocking on in-progress I/O.
+
+If writepage is called for memory cleansing (sync_mode ==
+WBC_SYNC_NONE) then its role is to get as much writeout underway as
+possible.  So writepage should try to avoid blocking against
+currently-in-progress I/O.
+
+If the filesystem is not called for "sync" and it determines that it
+would need to block against in-progress I/O to be able to start new I/O
+against the page the filesystem shoud redirty the page (usually with
+__set_page_dirty_nobuffers()), then unlock the page and return zero. 
+This may also be done to avoid internal deadlocks, but rarely.
+
+If the filesytem is called for sync then it must wait on any
+in-progress I/O and then start new I/O.
+
+The filesystem should unlock the page synchronously, before returning
+to the caller.  If the page has write I/O underway against it,
+writepage() should run SetPageWriteback() against the page prior to
+unlocking it.  The write I/O completion handler should run
+end_page_writeback() against the page.
 
-	That is: after 2.5.12, pages which are under writeout are *not*
-locked.
+That is: after 2.5.12, pages which are under writeout are *not* locked.
 
 	->sync_page() locking rules are not well-defined - usually it is called
 with lock on page, but that is not guaranteed. Considering the currently
@@ -187,6 +211,9 @@
 written.  The address_space implementation may write more (or less) pages
 than *nr_to_write asks for, but it should try to be reasonably close.  If
 nr_to_write is NULL, all dirty pages must be written.
+
+writepages should _only_ write pages which are present on
+mapping->io_pages.
 
 	->set_page_dirty() is called from various places in the kernel
 when the target page is marked as needing writeback.  It may be called
diff -Nru a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
--- a/Documentation/filesystems/proc.txt	Sun Dec 15 18:08:28 2002
+++ b/Documentation/filesystems/proc.txt	Sun Dec 15 18:08:28 2002
@@ -989,42 +989,58 @@
 Data which has been dirty in-memory for longer than this interval will be
 written out next time a pdflush daemon wakes up.
 
+lower_zone_protection
+---------------------
 
-kswapd
-------
+For some specialised workloads on highmem machines it is dangerous for
+the kernel to allow process memory to be allocated from the "lowmem"
+zone.  This is because that memory could then be pinned via the mlock()
+system call, or by unavailability of swapspace.
+
+And on large highmem machines this lack of reclaimable lowmem memory
+can be fatal.
+
+So the Linux page allocator has a mechanism which prevents allocations
+which _could_ use highmem from using too much lowmem.  This means that
+a certain amount of lowmem is defended from the possibility of being
+captured into pinned user memory.
+
+(The same argument applies to the old 16 megabyte ISA DMA region.  This
+mechanism will also defend that region from allocations which could use
+highmem or lowmem).
+
+The `lower_zone_protection' tunable determines how aggressive the kernel is
+in defending these lower zones.  The default value is zero - no
+protection at all.
+
+If you have a machine which uses highmem or ISA DMA and your
+applications are using mlock(), or if you are running with no swap then
+you probably should increase the lower_zone_protection setting.
+
+The units of this tunable are fairly vague.  It is approximately equal
+to "megabytes".  So setting lower_zone_protection=100 will protect around 100
+megabytes of the lowmem zone from user allocations.  It will also make
+those 100 megabytes unavaliable for use by applications and by
+pagecache, so there is a cost.
+
+The effects of this tunable may be observed by monitoring
+/proc/meminfo:LowFree.  Write a single huge file and observe the point
+at which LowFree ceases to fall.
 
-Kswapd is  the  kernel  swap  out daemon. That is, kswapd is that piece of the
-kernel that  frees  memory when it gets fragmented or full. Since every system
-is different, you'll probably want some control over this piece of the system.
+A reasonable value for lower_zone_protection is 100.
 
-The file contains three numbers:
-
-tries_base
-----------
-
-The maximum  number  of  pages kswapd tries to free in one round is calculated
-from this  number.  Usually  this  number  will  be  divided  by  4  or 8 (see
-mm/vmscan.c), so it isn't as big as it looks.
-
-When you  need to increase the bandwidth to/from swap, you'll want to increase
-this number.
-
-tries_min
----------
-
-This is  the  minimum number of times kswapd tries to free a page each time it
-is called. Basically it's just there to make sure that kswapd frees some pages
-even when it's being called with minimum priority.
-
-swap_cluster
+page-cluster
 ------------
 
-This is probably the greatest influence on system performance.
+page-cluster controls the number of pages which are written to swap in
+a single attempt.  The swap I/O size.
+
+It is a logarithmic value - setting it to zero means "1 page", setting
+it to 1 means "2 pages", setting it to 2 means "4 pages", etc.
 
-swap_cluster is  the  number  of  pages kswapd writes in one turn. You'll want
-this value  to  be  large  so that kswapd does its I/O in large chunks and the
-disk doesn't  have  to  seek  as  often, but you don't want it to be too large
-since that would flood the request queue.
+The default value is three (eight pages at a time).  There may be some
+small benefits in tuning this to a different value if your workload is
+swap-intensive.
 
 overcommit_memory
 -----------------
diff -Nru a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
--- a/Documentation/filesystems/vfs.txt	Sun Dec 15 18:08:29 2002
+++ b/Documentation/filesystems/vfs.txt	Sun Dec 15 18:08:29 2002
@@ -264,7 +264,7 @@
 	int (*readlink) (struct dentry *, char *,int);
 	struct dentry * (*follow_link) (struct dentry *, struct dentry *);
 	int (*readpage) (struct file *, struct page *);
-	int (*writepage) (struct file *, struct page *);
+	int (*writepage) (struct page *page, struct writeback_control *wbc);
 	int (*bmap) (struct inode *,int);
 	void (*truncate) (struct inode *);
 	int (*permission) (struct inode *, int);
diff -Nru a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
--- a/Documentation/scsi/st.txt	Sun Dec 15 18:08:28 2002
+++ b/Documentation/scsi/st.txt	Sun Dec 15 18:08:28 2002
@@ -1,8 +1,8 @@
 This file contains brief information about the SCSI tape driver.
-The driver is currently maintained by Kai M{kisara (email
+The driver is currently maintained by Kai Mäkisara (email
 Kai.Makisara@metla.fi)
 
-Last modified: Fri Jul 26 16:01:39 2002 by makisara
+Last modified: Sat Dec 14 14:35:30 2002 by makisara
 
 
 BASICS
@@ -89,7 +89,10 @@
 4. If the open option O_NONBLOCK is used, open succeeds even if the
 drive is not ready. If O_NONBLOCK is not used, the driver waits for
 the drive to become ready. If this does not happen in ST_BLOCK_SECONDS
-seconds, open fails with the errno value EIO.
+seconds, open fails with the errno value EIO. With O_NONBLOCK the
+device can be opened for writing even if there is a write protected
+tape in the drive (commands trying to write something return error if
+attempted).
 
 
 BSD AND SYS V SEMANTICS
diff -Nru a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt
--- a/Documentation/sysctl/kernel.txt	Sun Dec 15 18:08:29 2002
+++ b/Documentation/sysctl/kernel.txt	Sun Dec 15 18:08:29 2002
@@ -237,11 +237,6 @@
   console_loglevel can be set
 - default_console_loglevel: default value for console_loglevel
 
-Note: a quick look in linux/kernel/printk.c will reveal that
-these variables aren't put inside a structure, so their order
-in-core isn't formally guaranteed and garbage values _might_
-occur when the compiler changes. (???)
-
 ==============================================================
 
 reboot-cmd: (Sparc only)
diff -Nru a/Makefile b/Makefile
--- a/Makefile	Sun Dec 15 18:08:28 2002
+++ b/Makefile	Sun Dec 15 18:08:28 2002
@@ -1,6 +1,6 @@
 VERSION = 2
 PATCHLEVEL = 5
-SUBLEVEL = 51
+SUBLEVEL = 52
 EXTRAVERSION =
 
 # *DOCUMENTATION*
@@ -157,6 +157,7 @@
 OBJDUMP		= $(CROSS_COMPILE)objdump
 AWK		= awk
 GENKSYMS	= /sbin/genksyms
+DEPMOD		= /sbin/depmod
 KALLSYMS	= scripts/kallsyms
 PERL		= perl
 MODFLAGS	= -DMODULE
@@ -534,7 +535,7 @@
 #	Install modules
 
 .PHONY: modules_install
-modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS))
+modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
 
 .PHONY: _modinst_
 _modinst_:
@@ -542,6 +543,20 @@
 	@rm -f $(MODLIB)/build
 	@mkdir -p $(MODLIB)/kernel
 	@ln -s $(TOPDIR) $(MODLIB)/build
+
+# If System.map exists, run depmod.  This deliberately does not have a
+# dependency on System.map since that would run the dependency tree on
+# vmlinux.  This depmod is only for convenience to give the initial
+# boot a modules.dep even before / is mounted read-write.  However the
+# boot script depmod is the master version.
+ifeq "$(strip $(INSTALL_MOD_PATH))" ""
+depmod_opts	:=
+else
+depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
+endif
+.PHONY: _modinst_post
+_modinst_post:
+	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
 
 .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS))
 $(patsubst %, _modinst_%, $(SUBDIRS)) :
diff -Nru a/Rules.make b/Rules.make
--- a/Rules.make	Sun Dec 15 18:08:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1 +0,0 @@
-
diff -Nru a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
--- a/arch/alpha/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/alpha/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -92,5 +92,3 @@
 endif
 
 endif # GENERIC
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/alpha/lib/Makefile b/arch/alpha/lib/Makefile
--- a/arch/alpha/lib/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/alpha/lib/Makefile	Sun Dec 15 18:08:32 2002
@@ -49,8 +49,6 @@
 
 obj-$(CONFIG_SMP) += dec_and_lock.o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/__divqu.o: $(obj)/$(ev6)divide.S
 	$(CC) $(AFLAGS) -DDIV -c -o $(obj)/__divqu.o $(obj)/$(ev6)divide.S
 
diff -Nru a/arch/alpha/math-emu/Makefile b/arch/alpha/math-emu/Makefile
--- a/arch/alpha/math-emu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/alpha/math-emu/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 CFLAGS += -I. -I$(TOPDIR)/include/math-emu -w
 
 obj-$(CONFIG_MATHEMU) += math.o qrnnd.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/alpha/mm/Makefile b/arch/alpha/mm/Makefile
--- a/arch/alpha/mm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/alpha/mm/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,5 +5,3 @@
 obj-y	:= init.o fault.o extable.o
 
 obj-$(CONFIG_DISCONTIGMEM) += numa.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
--- a/arch/arm/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -40,8 +40,6 @@
 
 EXTRA_TARGETS := $(head-y) init_task.o
 
-include $(TOPDIR)/Rules.make
-
 # Spell out some dependencies that `make dep' doesn't spot
 $(obj)/entry-armv.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
 $(obj)/entry-armo.o: 	$(obj)/entry-header.S include/asm-arm/constants.h
diff -Nru a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
--- a/arch/arm/lib/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/lib/Makefile	Sun Dec 15 18:08:29 2002
@@ -41,8 +41,6 @@
 
 obj-$(CONFIG_CPU_26) += uaccess-armo.o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/csumpartialcopy.o:	$(obj)/csumpartialcopygeneric.S
 $(obj)/csumpartialcopyuser.o:	$(obj)/csumpartialcopygeneric.S
 
diff -Nru a/arch/arm/mach-adifcc/Makefile b/arch/arm/mach-adifcc/Makefile
--- a/arch/arm/mach-adifcc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-adifcc/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,5 +10,3 @@
 obj-			:=
 
 export-objs		:=
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-anakin/Makefile b/arch/arm/mach-anakin/Makefile
--- a/arch/arm/mach-anakin/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-anakin/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-arc/Makefile b/arch/arm/mach-arc/Makefile
--- a/arch/arm/mach-arc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-arc/Makefile	Sun Dec 15 18:08:28 2002
@@ -17,5 +17,3 @@
 EXTRA_TARGETS 		:= head.o
 
 AFLAGS_head.o		:= -DTEXTADDR=$(TEXTADDR)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-clps711x/Makefile b/arch/arm/mach-clps711x/Makefile
--- a/arch/arm/mach-clps711x/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-clps711x/Makefile	Sun Dec 15 18:08:32 2002
@@ -18,5 +18,3 @@
 obj-$(CONFIG_ARCH_P720T)    += p720t.o
 leds-$(CONFIG_ARCH_P720T)   += p720t-leds.o
 obj-$(CONFIG_LEDS)          += $(leds-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-clps7500/Makefile b/arch/arm/mach-clps7500/Makefile
--- a/arch/arm/mach-clps7500/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-clps7500/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-ebsa110/Makefile b/arch/arm/mach-ebsa110/Makefile
--- a/arch/arm/mach-ebsa110/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-ebsa110/Makefile	Sun Dec 15 18:08:29 2002
@@ -12,5 +12,3 @@
 export-objs		:= io.o
 
 obj-$(CONFIG_LEDS)	+= leds.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-epxa10db/Makefile b/arch/arm/mach-epxa10db/Makefile
--- a/arch/arm/mach-epxa10db/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-epxa10db/Makefile	Sun Dec 15 18:08:32 2002
@@ -10,6 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-footbridge/Makefile b/arch/arm/mach-footbridge/Makefile
--- a/arch/arm/mach-footbridge/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-footbridge/Makefile	Sun Dec 15 18:08:29 2002
@@ -25,5 +25,3 @@
 
 obj-$(CONFIG_PCI)	+=$(pci-y)
 obj-$(CONFIG_LEDS)	+=$(leds-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-ftvpci/Makefile b/arch/arm/mach-ftvpci/Makefile
--- a/arch/arm/mach-ftvpci/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-ftvpci/Makefile	Sun Dec 15 18:08:32 2002
@@ -13,5 +13,3 @@
 
 obj-$(CONFIG_PCI)	+= pci.o
 obj-$(CONFIG_LEDS)	+= leds.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile
--- a/arch/arm/mach-integrator/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-integrator/Makefile	Sun Dec 15 18:08:32 2002
@@ -11,5 +11,3 @@
 
 obj-$(CONFIG_LEDS)	+= leds.o
 obj-$(CONFIG_PCI)	+= pci_v3.o pci.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c
--- a/arch/arm/mach-integrator/cpu.c	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-integrator/cpu.c	Sun Dec 15 18:08:29 2002
@@ -77,8 +77,8 @@
 {
 	struct vco vco;
 
-	if (policy->max > policy->max_cpu_freq)
-		policy->max = policy->max_cpu_freq;
+	if (policy->max > policy->cpuinfo.max_freq)
+		policy->max = policy->cpuinfo.max_freq;
 
 	if (policy->max < 12000)
 		policy->max = 12000;
@@ -148,7 +148,9 @@
 static struct cpufreq_policy integrator_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.max_cpu_freq	= 160000,
+	.cpuinfo.max_cpu_freq	= 160000,
+	.cpuinfo.min_cpu_freq   = 12000,
+	.cpuinfo.transition_latency  = CPUFREQ_ETERNAL,
 };
 
 static struct cpufreq_driver integrator_driver = {
@@ -197,7 +199,9 @@
 
 		policies[cpu].cpu = cpu;
 		policies[cpu].policy = CPUFREQ_POLICY_POWERSAVE,
-		policies[cpu].max_cpu_freq = 160000;
+		policies[cpu].cpuinfo.max_freq = 160000;
+		policies[cpu].cpuinfo.min_freq = 12000;
+		policies[cpu].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 		policies[cpu].min =
 		policies[cpu].max = vco_to_freq(vco, 1);
 	}
@@ -205,8 +209,6 @@
 	set_cpus_allowed(current, cpus_allowed);
 
 #ifdef CONFIG_CPU_FREQ
-	for (cpu=0; cpu<NR_CPUS; cpu++)
-		integrator_driver.cpu_min_freq[cpu] = 12000;
 	integrator_driver.policy = policies;
 	cpufreq_register(&integrator_driver);
 #else
diff -Nru a/arch/arm/mach-iop310/Makefile b/arch/arm/mach-iop310/Makefile
--- a/arch/arm/mach-iop310/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-iop310/Makefile	Sun Dec 15 18:08:32 2002
@@ -22,5 +22,3 @@
 obj-$(CONFIG_IOP310_DMA) += dma.o
 obj-$(CONFIG_IOP310_MU) += message.o
 obj-$(CONFIG_IOP310_PMON) += pmon.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-l7200/Makefile b/arch/arm/mach-l7200/Makefile
--- a/arch/arm/mach-l7200/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/arm/mach-l7200/Makefile	Sun Dec 15 18:08:32 2002
@@ -10,5 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
--- a/arch/arm/mach-pxa/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-pxa/Makefile	Sun Dec 15 18:08:29 2002
@@ -21,5 +21,3 @@
 
 # Misc features
 obj-$(CONFIG_PM) += pm.o sleep.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-rpc/Makefile b/arch/arm/mach-rpc/Makefile
--- a/arch/arm/mach-rpc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/arm/mach-rpc/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,6 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-sa1100/Makefile b/arch/arm/mach-sa1100/Makefile
--- a/arch/arm/mach-sa1100/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/arm/mach-sa1100/Makefile	Sun Dec 15 18:08:33 2002
@@ -108,5 +108,3 @@
 
 # Miscelaneous functions
 obj-$(CONFIG_PM) += pm.o sleep.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c
--- a/arch/arm/mach-sa1100/cpu-sa1100.c	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-sa1100/cpu-sa1100.c	Sun Dec 15 18:08:28 2002
@@ -203,14 +203,15 @@
 static struct cpufreq_policy sa1100_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.max_cpu_freq	= 287000,
+	.cpuinfo.max_freq	= 287000,
+	.cpuinfo.min_freq	= 59000,
+	.cpuinfo.transition_latency	= CPUFREQ_ETERNAL,
 };
 
 static struct cpufreq_driver sa1100_driver = {
 	.verify		= sa11x0_verify_speed,
 	.setpolicy	= sa1100_setspeed,
 	.policy		= &sa1100_policy,
-	.cpu_min_freq[0]= 59000,
 };
 
 static int __init sa1100_dram_init(void)
diff -Nru a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
--- a/arch/arm/mach-sa1100/cpu-sa1110.c	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c	Sun Dec 15 18:08:28 2002
@@ -298,14 +298,15 @@
 static struct cpufreq_policy sa1110_policy = {
 	.cpu		= 0,
 	.policy		= CPUFREQ_POLICY_POWERSAVE,
-	.max_cpu_freq	= 287000,
+	.cpuinfo.max_freq	= 287000,
+	.cpuinfo.min_freq	= 59000,
+	.cpuinfo.transition_latency	= CPUFREQ_ETERNAL,
 };
 
 static struct cpufreq_driver sa1110_driver = {
 	.verify		 = sa11x0_verify_speed,
 	.setpolicy	 = sa1110_setspeed,
 	.policy		 = &sa1110_policy,
-	.cpu_min_freq	 = { 59000, },
 };
 
 static int __init sa1110_clk_init(void)
diff -Nru a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
--- a/arch/arm/mach-sa1100/generic.c	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-sa1100/generic.c	Sun Dec 15 18:08:28 2002
@@ -69,8 +69,8 @@
  */
 int sa11x0_verify_speed(struct cpufreq_policy *policy)
 {
-	if (policy->max > policy->max_cpu_freq)
-		policy->max = policy->max_cpu_freq;
+	if (policy->max > policy->cpuinfo.max_freq)
+		policy->max = policy->cpuinfo.max_freq;
 
 	policy->max = cclk_frequency_100khz[sa11x0_freq_to_ppcr(policy->max)] * 100;
 	policy->min = policy->max;
diff -Nru a/arch/arm/mach-shark/Makefile b/arch/arm/mach-shark/Makefile
--- a/arch/arm/mach-shark/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-shark/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 export-objs		:= 
 
 obj-$(CONFIG_LEDS)	+= leds.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mach-tbox/Makefile b/arch/arm/mach-tbox/Makefile
--- a/arch/arm/mach-tbox/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/mach-tbox/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,5 +10,3 @@
 obj-			:=
 
 export-objs		:= 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
--- a/arch/arm/mm/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/arm/mm/Makefile	Sun Dec 15 18:08:33 2002
@@ -38,5 +38,3 @@
 p-$(CONFIG_CPU_XSCALE)	+= proc-xscale.o  tlb-v4wbi.o copypage-xscale.o abort-xscale.o minicache.o
 
 obj-y		+= $(sort $(p-y))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/arm/nwfpe/Makefile b/arch/arm/nwfpe/Makefile
--- a/arch/arm/nwfpe/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/arm/nwfpe/Makefile	Sun Dec 15 18:08:28 2002
@@ -17,5 +17,3 @@
 else
 nwfpe-objs		+= entry.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/cris/drivers/Makefile b/arch/cris/drivers/Makefile
--- a/arch/cris/drivers/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/cris/drivers/Makefile	Sun Dec 15 18:08:28 2002
@@ -14,6 +14,3 @@
 obj-$(CONFIG_ETRAX_PARPORT)             += parport.o
 obj-$(CONFIG_ETRAX_DS1302)              += ds1302.o
 obj-$(CONFIG_ETRAX_ETHERNET_LPSLAVE)    += lpslave
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/cris/drivers/lpslave/Makefile b/arch/cris/drivers/lpslave/Makefile
--- a/arch/cris/drivers/lpslave/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/cris/drivers/lpslave/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,8 +4,6 @@
 
 obj-y = e100lpslavenet.o e100lpslave_code.o
 
-include $(TOPDIR)/Rules.make
-
 e100lpslave_code.o:	e100lpslave.o e100lpslaveld 
 	$(CROSS_COMPILE)ld -qmagic -Te100lpslaveld e100lpslave.o -o e100lpslave
 	$(CROSS_COMPILE)objcopy -O binary --remove-section=.data --remove-section=.bss e100lpslave e100lpslave.text
diff -Nru a/arch/cris/kernel/Makefile b/arch/cris/kernel/Makefile
--- a/arch/cris/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/cris/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -21,5 +21,3 @@
 	$(CC) $(CFLAGS) -S -c $<
 
 clean:
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/cris/lib/Makefile b/arch/cris/lib/Makefile
--- a/arch/cris/lib/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/cris/lib/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 EXTRA_AFLAGS := -traditional
 
 obj-y  = checksum.o checksumcopy.o string.o usercopy.o memset.o csumcpfruser.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/cris/mm/Makefile b/arch/cris/mm/Makefile
--- a/arch/cris/mm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/cris/mm/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y	 := init.o fault.o tlb.o extable.o ioremap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/Kconfig	Sun Dec 15 18:08:28 2002
@@ -465,104 +465,6 @@
 	  Enabling this feature will cause a message to be printed when the P4
 	  enters thermal throttling.
 
-config CPU_FREQ
-	bool "CPU Frequency scaling"
-	help
-	  Clock scaling allows you to change the clock speed of CPUs on the
-	  fly. This is a nice method to save battery power on notebooks,
-	  because the lower the clock speed, the less power the CPU consumes.
-
-	  For more information, take a look at linux/Documentation/cpufreq or
-	  at <http://www.brodo.de/cpufreq/>
-
-	  If in doubt, say N.
-
-config CPU_FREQ_24_API
-	bool "/proc/sys/cpu/ interface (2.4. / OLD)"
-	depends on CPU_FREQ
-	help
-	  This enables the /proc/sys/cpu/ sysctl interface for controlling
-	  CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. 2.5
-	  uses /proc/cpufreq instead. Please note that some drivers do not 
-	  work well with the 2.4. /proc/sys/cpu sysctl interface, so if in
-	  doubt, say N here.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config X86_POWERNOW_K6
-	tristate "AMD Mobile K6-2/K6-3 PowerNow!"
-	depends on CPU_FREQ
-	help
-	  This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
-	  AMD K6-3+ processors.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config ELAN_CPUFREQ
-	tristate "AMD Elan"
-	depends on CPU_FREQ && MELAN
-	---help---
-	  This adds the CPUFreq driver for AMD Elan SC400 and SC410
-	  processors.
-
-	  You need to specify the processor maximum speed as boot
-	  parameter: elanfreq=maxspeed (in kHz) or as module
-	  parameter "max_freq".
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config X86_LONGHAUL
-	tristate "VIA Cyrix III Longhaul"
-	depends on CPU_FREQ
-	help
-	  This adds the CPUFreq driver for VIA Samuel/CyrixIII, 
-	  VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T 
-	  processors.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config X86_SPEEDSTEP
-	tristate "Intel Speedstep"
-	depends on CPU_FREQ
-	help
-	  This adds the CPUFreq driver for certain mobile Intel Pentium III
-	  (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all
-	  mobile Intel Pentium 4 P4-Ms.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config X86_P4_CLOCKMOD
-	tristate "Intel Pentium 4 clock modulation"
-	depends on CPU_FREQ
-	help
-	  This adds the CPUFreq driver for Intel Pentium 4 / XEON
-	  processors.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
-config X86_LONGRUN
-	tristate "Transmeta LongRun"
-	depends on CPU_FREQ
-	help
-	  This adds the CPUFreq driver for Transmeta Crusoe processors which
-	  support LongRun.
-
-	  For details, take a look at linux/Documentation/cpufreq. 
-
-	  If in doubt, say N.
-
 config TOSHIBA
 	tristate "Toshiba Laptop support"
 	---help---
@@ -984,6 +886,104 @@
 	  Use real mode APM BIOS calls to switch off the computer. This is
 	  a work-around for a number of buggy BIOSes. Switch this option on if
 	  your computer crashes instead of powering off properly.
+
+config CPU_FREQ
+	bool "CPU Frequency scaling"
+	help
+	  Clock scaling allows you to change the clock speed of CPUs on the
+	  fly. This is a nice method to save battery power on notebooks,
+	  because the lower the clock speed, the less power the CPU consumes.
+
+	  For more information, take a look at linux/Documentation/cpufreq or
+	  at <http://www.brodo.de/cpufreq/>
+
+	  If in doubt, say N.
+
+config CPU_FREQ_24_API
+	bool "/proc/sys/cpu/ interface (2.4. / OLD)"
+	depends on CPU_FREQ
+	help
+	  This enables the /proc/sys/cpu/ sysctl interface for controlling
+	  CPUFreq, as known from the 2.4.-kernel patches for CPUFreq. 2.5
+	  uses /proc/cpufreq instead. Please note that some drivers do not 
+	  work well with the 2.4. /proc/sys/cpu sysctl interface, so if in
+	  doubt, say N here.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_POWERNOW_K6
+	tristate "AMD Mobile K6-2/K6-3 PowerNow!"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for mobile AMD K6-2+ and mobile
+	  AMD K6-3+ processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config ELAN_CPUFREQ
+	tristate "AMD Elan"
+	depends on CPU_FREQ && MELAN
+	---help---
+	  This adds the CPUFreq driver for AMD Elan SC400 and SC410
+	  processors.
+
+	  You need to specify the processor maximum speed as boot
+	  parameter: elanfreq=maxspeed (in kHz) or as module
+	  parameter "max_freq".
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_LONGHAUL
+	tristate "VIA Cyrix III Longhaul"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for VIA Samuel/CyrixIII, 
+	  VIA Cyrix Samuel/C3, VIA Cyrix Ezra and VIA Cyrix Ezra-T 
+	  processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_SPEEDSTEP
+	tristate "Intel Speedstep"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for certain mobile Intel Pentium III
+	  (Coppermine), all mobile Intel Pentium III-M (Tulatin) and all
+	  mobile Intel Pentium 4 P4-Ms.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_P4_CLOCKMOD
+	tristate "Intel Pentium 4 clock modulation"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for Intel Pentium 4 / XEON
+	  processors.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
+
+config X86_LONGRUN
+	tristate "Transmeta LongRun"
+	depends on CPU_FREQ
+	help
+	  This adds the CPUFreq driver for Transmeta Crusoe processors which
+	  support LongRun.
+
+	  For details, take a look at linux/Documentation/cpufreq. 
+
+	  If in doubt, say N.
 
 endmenu
 
diff -Nru a/arch/i386/boot/compressed/Makefile b/arch/i386/boot/compressed/Makefile
--- a/arch/i386/boot/compressed/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/i386/boot/compressed/Makefile	Sun Dec 15 18:08:30 2002
@@ -7,8 +7,6 @@
 EXTRA_TARGETS	:= vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o
 EXTRA_AFLAGS	:= -traditional
 
-include $(TOPDIR)/Rules.make
-
 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32
 
 $(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
--- a/arch/i386/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -34,5 +34,3 @@
 
 export-objs += scx200.o
 obj-$(CONFIG_SCx200)		+= scx200.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/kernel/acpi.c b/arch/i386/kernel/acpi.c
--- a/arch/i386/kernel/acpi.c	Sun Dec 15 18:08:31 2002
+++ b/arch/i386/kernel/acpi.c	Sun Dec 15 18:08:31 2002
@@ -448,10 +448,11 @@
 
 /* address in low memory of the wakeup routine. */
 unsigned long acpi_wakeup_address = 0;
+extern char wakeup_start, wakeup_end;
 
 extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
 
-static void init_low_mapping(pgd_t *pgd, int pgd_ofs, int pgd_limit)
+static void init_low_mapping(pgd_t *pgd, int pgd_limit)
 {
 	int pgd_ofs = 0;
 
@@ -473,7 +474,8 @@
 	panic("S3 and PAE do not like each other for now.");
 	return 1;
 #endif
-	init_low_mapping(swapper_pg_dir, 0, USER_PTRS_PER_PGD);
+	init_low_mapping(swapper_pg_dir, USER_PTRS_PER_PGD);
+	memcpy((void *) acpi_wakeup_address, &wakeup_start, &wakeup_end - &wakeup_start);
 	acpi_copy_wakeup_routine(acpi_wakeup_address);
 
 	return 0;
@@ -506,7 +508,6 @@
  */
 void __init acpi_reserve_bootmem(void)
 {
-	extern char wakeup_start, wakeup_end;
 	acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
 	if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
 		printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
diff -Nru a/arch/i386/kernel/acpi_wakeup.S b/arch/i386/kernel/acpi_wakeup.S
--- a/arch/i386/kernel/acpi_wakeup.S	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/acpi_wakeup.S	Sun Dec 15 18:08:28 2002
@@ -239,20 +239,11 @@
 #
 ENTRY(acpi_copy_wakeup_routine)
 
-	pushl	%esi
-	pushl	%edi
-
 	sgdt	saved_gdt
 	sidt	saved_idt
 	sldt	saved_ldt
 	str	saved_tss
 
-	movl	%eax, %edi
-	leal	wakeup_start, %esi
-	movl	$(wakeup_end - wakeup_start + 3) >> 2, %ecx
-
-	rep ;  movsl
-
 	movl    %cr3, %edx
 	movl    %edx, real_save_cr3 - wakeup_start (%eax)
 	movl    %cr4, %edx
@@ -265,10 +256,6 @@
 	movl	%edx, video_mode - wakeup_start (%eax)
 	movl	$0x12345678, real_magic - wakeup_start (%eax)
 	movl	$0x12345678, saved_magic
-
-	# restore the regs we used
-	popl	%edi
-	popl	%esi
 	ret
 
 .data
diff -Nru a/arch/i386/kernel/cpu/Makefile b/arch/i386/kernel/cpu/Makefile
--- a/arch/i386/kernel/cpu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/kernel/cpu/Makefile	Sun Dec 15 18:08:29 2002
@@ -17,6 +17,3 @@
 
 obj-$(CONFIG_MTRR)	+= 	mtrr/
 obj-$(CONFIG_CPU_FREQ)	+=	cpufreq/
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile
--- a/arch/i386/kernel/cpu/cpufreq/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/kernel/cpu/cpufreq/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,5 +4,3 @@
 obj-$(CONFIG_X86_P4_CLOCKMOD)	+= p4-clockmod.o
 obj-$(CONFIG_ELAN_CPUFREQ)	+= elanfreq.o
 obj-$(CONFIG_X86_LONGRUN)	+= longrun.o  
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/kernel/cpu/cpufreq/elanfreq.c b/arch/i386/kernel/cpu/cpufreq/elanfreq.c
--- a/arch/i386/kernel/cpu/cpufreq/elanfreq.c	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/kernel/cpu/cpufreq/elanfreq.c	Sun Dec 15 18:08:29 2002
@@ -296,7 +296,6 @@
 		max_freq = elanfreq_get_cpu_frequency();
 
 #ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_min_freq[0] = 1000;
 	driver->cpu_cur_freq[0] = elanfreq_get_cpu_frequency();
 #endif
 
@@ -307,7 +306,9 @@
 	driver->policy[0].min    = 1000;
 	driver->policy[0].max    = max_freq;
 	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
-	driver->policy[0].max_cpu_freq  = max_freq;
+	driver->policy[0].cpuinfo.max_freq = max_freq;
+	driver->policy[0].cpuinfo.min_freq = min_freq;
+	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	elanfreq_driver = driver;
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c	Sun Dec 15 18:08:28 2002
@@ -779,7 +779,6 @@
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
 #ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_min_freq[0] = (unsigned int) lowest_speed;
 	driver->cpu_cur_freq[0] = currentspeed;
 #endif
 
@@ -790,7 +789,9 @@
 	driver->policy[0].min = (unsigned int) lowest_speed;
 	driver->policy[0].max = (unsigned int) highest_speed;
 	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
-	driver->policy[0].max_cpu_freq = (unsigned int) highest_speed;
+	driver->policy[0].cpuinfo.min_freq = (unsigned int) lowest_speed;
+	driver->policy[0].cpuinfo.max_freq = (unsigned int) highest_speed;
+	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	longhaul_driver = driver;
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/longrun.c b/arch/i386/kernel/cpu/cpufreq/longrun.c
--- a/arch/i386/kernel/cpu/cpufreq/longrun.c	Sun Dec 15 18:08:30 2002
+++ b/arch/i386/kernel/cpu/cpufreq/longrun.c	Sun Dec 15 18:08:30 2002
@@ -121,8 +121,9 @@
 		return -EINVAL;
 
 	policy->cpu = 0;
-	cpufreq_verify_within_limits(policy, 0, 
-		longrun_driver->policy[0].max_cpu_freq);
+	cpufreq_verify_within_limits(policy, 
+		longrun_driver->policy[0].cpuinfo.min_freq, 
+		longrun_driver->policy[0].cpuinfo.max_freq);
 
 	return 0;
 }
@@ -247,12 +248,13 @@
 		kfree(driver);
 		return -EIO;
 	}
-	driver->policy[0].max_cpu_freq  = longrun_high_freq;
+	driver->policy[0].cpuinfo.min_freq = longrun_low_freq;
+	driver->policy[0].cpuinfo.max_freq = longrun_high_freq;
+	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	longrun_get_policy(&driver->policy[0]);
 
 #ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_min_freq[0] = longrun_low_freq;
 	driver->cpu_cur_freq[0] = longrun_high_freq; /* dummy value */
 #endif
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	Sun Dec 15 18:08:32 2002
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c	Sun Dec 15 18:08:32 2002
@@ -257,7 +257,6 @@
 
 #ifdef CONFIG_CPU_FREQ_24_API
 	for (i=0;i<NR_CPUS;i++) {
-		driver->cpu_min_freq[i] = stock_freq / 8;
 		driver->cpu_cur_freq[i] = stock_freq;
 	}
 #endif
@@ -272,7 +271,10 @@
 			driver->policy[i].min    = stock_freq / 8;
 		driver->policy[i].max    = stock_freq;
 		driver->policy[i].policy = CPUFREQ_POLICY_PERFORMANCE;
-		driver->policy[i].max_cpu_freq  = stock_freq;
+		driver->policy[i].cpuinfo.min_freq  = driver->policy[i].min;
+		driver->policy[i].cpuinfo.max_freq  = stock_freq;
+		driver->policy[i].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+
 		driver->policy[i].cpu    = i;
 	}
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k6.c	Sun Dec 15 18:08:28 2002
@@ -242,7 +242,6 @@
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
 #ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_min_freq[0]  = busfreq * 20;
 	driver->cpu_cur_freq[0]  = busfreq * max_multiplier;
 #endif
 
@@ -253,7 +252,9 @@
 	driver->policy[0].min    = busfreq * 20;
 	driver->policy[0].max    = busfreq * max_multiplier;
 	driver->policy[0].policy = CPUFREQ_POLICY_PERFORMANCE;
-	driver->policy[0].max_cpu_freq  = busfreq * max_multiplier;
+	driver->policy[0].cpuinfo.max_freq = busfreq * max_multiplier;
+	driver->policy[0].cpuinfo.min_freq = busfreq * 20;
+	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
 
 	powernow_driver = driver;
 
diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep.c b/arch/i386/kernel/cpu/cpufreq/speedstep.c
--- a/arch/i386/kernel/cpu/cpufreq/speedstep.c	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep.c	Sun Dec 15 18:08:28 2002
@@ -693,7 +693,6 @@
 	driver->policy = (struct cpufreq_policy *) (driver + 1);
 
 #ifdef CONFIG_CPU_FREQ_24_API
-	driver->cpu_min_freq[0] = speedstep_low_freq;
 	driver->cpu_cur_freq[0] = speed;
 #endif
 
@@ -703,7 +702,10 @@
 	driver->policy[0].cpu    = 0;
 	driver->policy[0].min    = speedstep_low_freq;
 	driver->policy[0].max    = speedstep_high_freq;
-	driver->policy[0].max_cpu_freq = speedstep_high_freq;
+	driver->policy[0].cpuinfo.min_freq = speedstep_low_freq;
+	driver->policy[0].cpuinfo.max_freq = speedstep_high_freq;
+	driver->policy[0].cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+
 	driver->policy[0].policy = (speed == speedstep_low_freq) ? 
 	    CPUFREQ_POLICY_POWERSAVE : CPUFREQ_POLICY_PERFORMANCE;
 
diff -Nru a/arch/i386/kernel/cpu/mcheck/Makefile b/arch/i386/kernel/cpu/mcheck/Makefile
--- a/arch/i386/kernel/cpu/mcheck/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/kernel/cpu/mcheck/Makefile	Sun Dec 15 18:08:29 2002
@@ -1,5 +1,2 @@
 obj-y	=	mce.o k7.o p4.o p5.o p6.o winchip.o
 obj-$(CONFIG_X86_MCE_NONFATAL)	+=	non-fatal.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/i386/kernel/cpu/mtrr/Makefile b/arch/i386/kernel/cpu/mtrr/Makefile
--- a/arch/i386/kernel/cpu/mtrr/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/cpu/mtrr/Makefile	Sun Dec 15 18:08:28 2002
@@ -4,5 +4,3 @@
 obj-y		+= centaur.o
 
 export-objs	:= main.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/kernel/suspend_asm.S b/arch/i386/kernel/suspend_asm.S
--- a/arch/i386/kernel/suspend_asm.S	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/kernel/suspend_asm.S	Sun Dec 15 18:08:29 2002
@@ -6,7 +6,7 @@
 #include <asm/segment.h>
 #include <asm/page.h>
 
-ENTRY(do_magic):
+ENTRY(do_magic)
 	pushl %ebx
 	cmpl $0,8(%esp)
 	jne .L1450
@@ -66,7 +66,7 @@
 .L1453:
 	movl $104,%eax
 
-	movw %eax, %ds
+	movw %ax, %ds
 	movl saved_context_esp, %esp
 	movl saved_context_ebp, %ebp
 	movl saved_context_eax, %eax
diff -Nru a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c
--- a/arch/i386/kernel/sys_i386.c	Sun Dec 15 18:08:32 2002
+++ b/arch/i386/kernel/sys_i386.c	Sun Dec 15 18:08:32 2002
@@ -140,7 +140,11 @@
 
 	switch (call) {
 	case SEMOP:
-		return sys_semop (first, (struct sembuf *)ptr, second);
+		return sys_semtimedop (first, (struct sembuf *)ptr, second, NULL);
+	case SEMTIMEDOP:
+		return sys_semtimedop(first, (struct sembuf *)ptr, second,
+					(const struct timespec *)fifth);
+
 	case SEMGET:
 		return sys_semget (first, second, third);
 	case SEMCTL: {
diff -Nru a/arch/i386/kernel/timers/Makefile b/arch/i386/kernel/timers/Makefile
--- a/arch/i386/kernel/timers/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/kernel/timers/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-y += timer_tsc.o
 obj-y += timer_pit.o
 obj-$(CONFIG_X86_CYCLONE)   += timer_cyclone.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/lib/Makefile b/arch/i386/lib/Makefile
--- a/arch/i386/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_X86_USE_3DNOW) += mmx.o
 obj-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
 obj-$(CONFIG_DEBUG_IOVIRT)  += iodebug.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/mach-generic/Makefile b/arch/i386/mach-generic/Makefile
--- a/arch/i386/mach-generic/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/mach-generic/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 EXTRA_CFLAGS	+= -I../kernel
 
 obj-y				:= setup.o topology.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/mach-visws/Makefile b/arch/i386/mach-visws/Makefile
--- a/arch/i386/mach-visws/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/i386/mach-visws/Makefile	Sun Dec 15 18:08:31 2002
@@ -9,5 +9,3 @@
 obj-$(CONFIG_PCI)		+= pci-visws.o
 obj-$(CONFIG_X86_VISWS_APIC)	+= visws_apic.o
 obj-$(CONFIG_X86_LOCAL_APIC)	+= mpparse.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/mach-voyager/Makefile b/arch/i386/mach-voyager/Makefile
--- a/arch/i386/mach-voyager/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/mach-voyager/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,5 +13,3 @@
 obj-y			:= setup.o voyager_basic.o voyager_thread.o
 
 obj-$(CONFIG_SMP)	+= voyager_smp.o voyager_cat.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/math-emu/Makefile b/arch/i386/math-emu/Makefile
--- a/arch/i386/math-emu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/math-emu/Makefile	Sun Dec 15 18:08:29 2002
@@ -26,7 +26,5 @@
 
 obj-y =$(C_OBJS) $(A_OBJS)
 
-include $(TOPDIR)/Rules.make
-
 proto:
 	cproto -e -DMAKING_PROTO *.c >fpu_proto.h
diff -Nru a/arch/i386/mm/Makefile b/arch/i386/mm/Makefile
--- a/arch/i386/mm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/mm/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,5 +9,3 @@
 obj-$(CONFIG_DISCONTIGMEM)	+= discontig.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_HIGHMEM) += highmem.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
--- a/arch/i386/mm/fault.c	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/mm/fault.c	Sun Dec 15 18:08:28 2002
@@ -28,8 +28,6 @@
 
 extern void die(const char *,struct pt_regs *,long);
 
-extern int console_loglevel;
-
 #ifndef CONFIG_X86_WP_WORKS_OK
 /*
  * Ugly, ugly, but the goto's result in better assembly..
diff -Nru a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
--- a/arch/i386/mm/hugetlbpage.c	Sun Dec 15 18:08:32 2002
+++ b/arch/i386/mm/hugetlbpage.c	Sun Dec 15 18:08:32 2002
@@ -20,6 +20,8 @@
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 
+#include <linux/sysctl.h>
+
 static long    htlbpagemem;
 int     htlbpage_max;
 static long    htlbzone_pages;
@@ -555,6 +557,53 @@
 		return alloc_shared_hugetlb_pages(key, addr, len, prot, flag);
 	return alloc_private_hugetlb_pages(key, addr, len, prot, flag);
 }
+void update_and_free_page(struct page *page)
+{
+	int j;
+	struct page *map;
+
+	map = page;
+	htlbzone_pages--;
+	for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {
+		map->flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
+				1 << PG_dirty | 1 << PG_active | 1 << PG_reserved |
+				1 << PG_private | 1<< PG_writeback);
+		set_page_count(map, 0);
+		map++;
+	}
+	set_page_count(page, 1);
+	__free_pages(page, HUGETLB_PAGE_ORDER);
+}
+
+int try_to_free_low(int count)
+{
+	struct list_head *p;
+	struct page *page, *map;
+
+	map = NULL;
+	spin_lock(&htlbpage_lock);
+	list_for_each(p, &htlbpage_freelist) {
+		if (map) {
+			list_del(&map->list);
+			update_and_free_page(map);
+			htlbpagemem--;
+			map = NULL;
+			if (++count == 0)
+				break;
+		}
+		page = list_entry(p, struct page, list);
+		if ((page_zone(page))->name[0] != 'H') // Look for non-Highmem
+				map = page;
+	}
+	if (map) {
+		list_del(&map->list);
+		update_and_free_page(map);
+		htlbpagemem--;
+		count++;
+	}
+	spin_unlock(&htlbpage_lock);
+	return count;
+}
 
 int set_hugetlb_mem_size(int count)
 {
@@ -568,6 +617,8 @@
 	else
 		lcount = count - htlbzone_pages;
 
+	if (lcount == 0)
+		return (int)htlbzone_pages;
 	if (lcount > 0) {	/* Increase the mem size. */
 		while (lcount--) {
 			page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
@@ -587,23 +638,14 @@
 		return (int) htlbzone_pages;
 	}
 	/* Shrink the memory size. */
+	lcount = try_to_free_low(lcount);
 	while (lcount++) {
 		page = alloc_hugetlb_page();
 		if (page == NULL)
 			break;
 		spin_lock(&htlbpage_lock);
-		htlbzone_pages--;
+		update_and_free_page(page);
 		spin_unlock(&htlbpage_lock);
-		map = page;
-		for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {
-			map->flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
-					1 << PG_dirty | 1 << PG_active | 1 << PG_reserved |
-					1 << PG_private | 1<< PG_writeback);
-			set_page_count(map, 0);
-			map++;
-		}
-		set_page_count(page, 1);
-		__free_pages(page, HUGETLB_PAGE_ORDER);
 	}
 	return (int) htlbzone_pages;
 }
@@ -657,6 +699,13 @@
 			htlbzone_pages,
 			htlbpagemem,
 			HPAGE_SIZE/1024);
+}
+
+int is_hugepage_mem_enough(size_t size)
+{
+	if (size > (htlbpagemem << HPAGE_SHIFT))
+		return 0;
+	return 1;
 }
 
 static struct page * hugetlb_nopage(struct vm_area_struct * area, unsigned long address, int unused)
diff -Nru a/arch/i386/mm/init.c b/arch/i386/mm/init.c
--- a/arch/i386/mm/init.c	Sun Dec 15 18:08:30 2002
+++ b/arch/i386/mm/init.c	Sun Dec 15 18:08:30 2002
@@ -134,8 +134,10 @@
 	pgd = pgd_base + pgd_ofs;
 	pfn = 0;
 
-	for (; pgd_ofs < PTRS_PER_PGD && pfn < max_low_pfn; pgd++, pgd_ofs++) {
+	for (; pgd_ofs < PTRS_PER_PGD; pgd++, pgd_ofs++) {
 		pmd = one_md_table_init(pgd);
+		if (pfn >= max_low_pfn)
+			continue;
 		for (pmd_ofs = 0; pmd_ofs < PTRS_PER_PMD && pfn < max_low_pfn; pmd++, pmd_ofs++) {
 			/* Map with big pages if possible, otherwise create normal page tables. */
 			if (cpu_has_pse) {
diff -Nru a/arch/i386/pci/Makefile b/arch/i386/pci/Makefile
--- a/arch/i386/pci/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/i386/pci/Makefile	Sun Dec 15 18:08:29 2002
@@ -16,5 +16,3 @@
 
 endif		# CONFIG_X86_NUMAQ
 obj-y		+= irq.o common.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/vmlinux.lds.S b/arch/i386/vmlinux.lds.S
--- a/arch/i386/vmlinux.lds.S	Sun Dec 15 18:08:28 2002
+++ b/arch/i386/vmlinux.lds.S	Sun Dec 15 18:08:28 2002
@@ -67,6 +67,9 @@
   __setup_start = .;
   .init.setup : { *(.init.setup) }
   __setup_end = .;
+  __start___param = .;
+  __param : { *(__param) }
+  __stop___param = .;
   __initcall_start = .;
   .initcall.init : {
 	*(.initcall1.init) 
diff -Nru a/arch/ia64/dig/Makefile b/arch/ia64/dig/Makefile
--- a/arch/ia64/dig/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/ia64/dig/Makefile	Sun Dec 15 18:08:30 2002
@@ -7,5 +7,3 @@
 
 obj-y := setup.o
 obj-$(CONFIG_IA64_GENERIC) += machvec.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/hp/common/Makefile b/arch/ia64/hp/common/Makefile
--- a/arch/ia64/hp/common/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/ia64/hp/common/Makefile	Sun Dec 15 18:08:31 2002
@@ -8,5 +8,3 @@
 export-objs := sba_iommu.o
 
 obj-y := sba_iommu.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/hp/sim/Makefile b/arch/ia64/hp/sim/Makefile
--- a/arch/ia64/hp/sim/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/hp/sim/Makefile	Sun Dec 15 18:08:29 2002
@@ -13,5 +13,3 @@
 obj-$(CONFIG_HP_SIMETH)	+= simeth.o
 obj-$(CONFIG_HP_SIMSERIAL) += simserial.o
 obj-$(CONFIG_HP_SIMSCSI) += simscsi.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/hp/zx1/Makefile b/arch/ia64/hp/zx1/Makefile
--- a/arch/ia64/hp/zx1/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/hp/zx1/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 
 obj-y := hpzx1_misc.o
 obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/ia32/Makefile b/arch/ia64/ia32/Makefile
--- a/arch/ia64/ia32/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/ia32/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,5 +4,3 @@
 
 obj-y := ia32_entry.o sys_ia32.o ia32_ioctl.o ia32_signal.o ia32_support.o ia32_traps.o \
 	 binfmt_elf32.o ia32_ldt.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
--- a/arch/ia64/ia32/sys_ia32.c	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/ia32/sys_ia32.c	Sun Dec 15 18:08:29 2002
@@ -2124,6 +2124,7 @@
 #define SEMOP		 1
 #define SEMGET		 2
 #define SEMCTL		 3
+#define SEMTIMEDOP	 4
 #define MSGSND		11
 #define MSGRCV		12
 #define MSGGET		13
diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
--- a/arch/ia64/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_SMP) += smp.o smpboot.o
 obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o
 obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
--- a/arch/ia64/kernel/entry.S	Sun Dec 15 18:08:28 2002
+++ b/arch/ia64/kernel/entry.S	Sun Dec 15 18:08:28 2002
@@ -1254,7 +1254,7 @@
 	data8 sys_epoll_create
 	data8 sys_epoll_ctl
 	data8 sys_epoll_wait			// 1245
-	data8 ia64_ni_syscall
+	data8 sys_semtimedop
 	data8 ia64_ni_syscall
 	data8 ia64_ni_syscall
 	data8 ia64_ni_syscall
diff -Nru a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
--- a/arch/ia64/kernel/perfmon.c	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/kernel/perfmon.c	Sun Dec 15 18:08:32 2002
@@ -783,7 +783,6 @@
 	vma->vm_ops	     = &pfm_vm_ops; /* necesarry to get the close() callback */
 	vma->vm_pgoff	     = 0;
 	vma->vm_file	     = NULL;
-	vma->vm_raend	     = 0;
 	vma->vm_private_data = psb;	/* information needed by the pfm_vm_close() function */
 
 	/*
diff -Nru a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
--- a/arch/ia64/lib/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/lib/Makefile	Sun Dec 15 18:08:32 2002
@@ -20,8 +20,6 @@
 IGNORE_FLAGS_OBJS =	__divsi3.o __udivsi3.o __modsi3.o __umodsi3.o \
 			__divdi3.o __udivdi3.o __moddi3.o __umoddi3.o
 
-include $(TOPDIR)/Rules.make
-
 AFLAGS___divdi3.o	=
 AFLAGS___udivdi3.o	= -DUNSIGNED
 AFLAGS___moddi3.o	= 	     -DMODULO
diff -Nru a/arch/ia64/mm/Makefile b/arch/ia64/mm/Makefile
--- a/arch/ia64/mm/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/mm/Makefile	Sun Dec 15 18:08:29 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_DISCONTIGMEM) += discontig.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/pci/Makefile b/arch/ia64/pci/Makefile
--- a/arch/ia64/pci/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/pci/Makefile	Sun Dec 15 18:08:29 2002
@@ -1,3 +1 @@
 obj-y		:= pci.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/sn/fakeprom/Makefile b/arch/ia64/sn/fakeprom/Makefile
--- a/arch/ia64/sn/fakeprom/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/sn/fakeprom/Makefile	Sun Dec 15 18:08:32 2002
@@ -18,7 +18,3 @@
 
 clean:
 	rm -f *.o fprom
-
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/ia64/sn/io/Makefile b/arch/ia64/sn/io/Makefile
--- a/arch/ia64/sn/io/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ia64/sn/io/Makefile	Sun Dec 15 18:08:28 2002
@@ -37,5 +37,3 @@
 				sn2/pcibr/pcibr_rrb.o sn2/pcibr/pcibr_slot.o 
 
 obj-$(CONFIG_PCIBA) += pciba.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/sn/kernel/Makefile b/arch/ia64/sn/kernel/Makefile
--- a/arch/ia64/sn/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ia64/sn/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -41,6 +41,3 @@
 obj-$(CONFIG_IA64_SGI_AUTOTEST) += llsc4.o misctest.o
 obj-$(CONFIG_IA64_GENERIC)      += machvec.o
 obj-$(CONFIG_MODULES)           += sn_ksyms.o
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/sn/kernel/sn1/Makefile b/arch/ia64/sn/kernel/sn1/Makefile
--- a/arch/ia64/sn/kernel/sn1/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ia64/sn/kernel/sn1/Makefile	Sun Dec 15 18:08:29 2002
@@ -35,5 +35,3 @@
 obj-y := cache.o error.o iomv.o synergy.o sn1_smp.o
 
 EXTRA_CFLAGS := -DLITTLE_ENDIAN
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ia64/sn/kernel/sn2/Makefile b/arch/ia64/sn/kernel/sn2/Makefile
--- a/arch/ia64/sn/kernel/sn2/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ia64/sn/kernel/sn2/Makefile	Sun Dec 15 18:08:32 2002
@@ -35,6 +35,3 @@
 obj-y := cache.o iomv.o sn2_smp.o
 
 EXTRA_CFLAGS    := -DLITTLE_ENDIAN
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/ia64/vmlinux.lds.S b/arch/ia64/vmlinux.lds.S
--- a/arch/ia64/vmlinux.lds.S	Sun Dec 15 18:08:31 2002
+++ b/arch/ia64/vmlinux.lds.S	Sun Dec 15 18:08:31 2002
@@ -102,6 +102,10 @@
   .init.setup : AT(ADDR(.init.setup) - PAGE_OFFSET)
         { *(.init.setup) }
   __setup_end = .;
+  __start___param = .;
+  __param : AT(ADDR(__param) - PAGE_OFFSET)
+        { *(__param) }
+  __stop___param = .;
   __initcall_start = .;
   .initcall.init : AT(ADDR(.initcall.init) - PAGE_OFFSET)
 	{
diff -Nru a/arch/m68k/amiga/Makefile b/arch/m68k/amiga/Makefile
--- a/arch/m68k/amiga/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/m68k/amiga/Makefile	Sun Dec 15 18:08:33 2002
@@ -7,5 +7,3 @@
 obj-y		:= config.o amiints.o cia.o chipram.o amisound.o amiga_ksyms.o
 
 obj-$(CONFIG_AMIGA_PCMCIA)	+= pcmcia.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/apollo/Makefile b/arch/m68k/apollo/Makefile
--- a/arch/m68k/apollo/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/apollo/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y		:= config.o dn_ints.o dma.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/atari/Makefile b/arch/m68k/atari/Makefile
--- a/arch/m68k/atari/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/atari/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 ifeq ($(CONFIG_PCI),y)
 obj-$(CONFIG_HADES)	+= hades-pci.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/bvme6000/Makefile b/arch/m68k/bvme6000/Makefile
--- a/arch/m68k/bvme6000/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/bvme6000/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y		:= config.o bvmeints.o rtc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/fpsp040/Makefile b/arch/m68k/fpsp040/Makefile
--- a/arch/m68k/fpsp040/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/m68k/fpsp040/Makefile	Sun Dec 15 18:08:32 2002
@@ -13,6 +13,4 @@
 EXTRA_AFLAGS := -traditional
 EXTRA_LDFLAGS := -x
 
-include $(TOPDIR)/Rules.make
-
 $(OS_OBJS): fpsp.h
diff -Nru a/arch/m68k/hp300/Makefile b/arch/m68k/hp300/Makefile
--- a/arch/m68k/hp300/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/hp300/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y		:= ksyms.o config.o ints.o time.o reboot.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/ifpsp060/Makefile b/arch/m68k/ifpsp060/Makefile
--- a/arch/m68k/ifpsp060/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/ifpsp060/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,5 +8,3 @@
 
 EXTRA_AFLAGS := -traditional
 EXTRA_LDFLAGS := -x
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
--- a/arch/m68k/kernel/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/m68k/kernel/Makefile	Sun Dec 15 18:08:30 2002
@@ -17,8 +17,6 @@
 
 EXTRA_AFLAGS := -traditional
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/head.o: $(obj)/head.S $(obj)/m68k_defs.h
 
 $(obj)/entry.o: $(obj)/entry.S $(obj)/m68k_defs.h
diff -Nru a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile
--- a/arch/m68k/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,5 +8,3 @@
 
 obj-y		:= ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \
 			checksum.o memcmp.o memcpy.o memset.o semaphore.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/mac/Makefile b/arch/m68k/mac/Makefile
--- a/arch/m68k/mac/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/m68k/mac/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,5 +6,3 @@
 
 obj-y		:= config.o bootparse.o macints.o iop.o via.o oss.o psc.o \
 			baboon.o macboing.o debug.o misc.o mac_ksyms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/math-emu/Makefile b/arch/m68k/math-emu/Makefile
--- a/arch/m68k/math-emu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/math-emu/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 
 obj-y		:= fp_entry.o fp_scan.o fp_util.o fp_move.o fp_movem.o \
 			fp_cond.o fp_arith.o fp_log.o fp_trig.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/mm/Makefile b/arch/m68k/mm/Makefile
--- a/arch/m68k/mm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/mm/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,6 +9,3 @@
 else
 obj-y		+= sun3kmap.o sun3mmu.o
 endif
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/mvme147/Makefile b/arch/m68k/mvme147/Makefile
--- a/arch/m68k/mvme147/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/mvme147/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,6 +3,3 @@
 #
 
 obj-y		:= config.o 147ints.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68k/mvme16x/Makefile b/arch/m68k/mvme16x/Makefile
--- a/arch/m68k/mvme16x/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/mvme16x/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 export-objs	:= mvme16x_ksyms.o
 
 obj-y		:= config.o 16xints.o rtc.o mvme16x_ksyms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/q40/Makefile b/arch/m68k/q40/Makefile
--- a/arch/m68k/q40/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/q40/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y		:= config.o q40ints.o 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/sun3/Makefile b/arch/m68k/sun3/Makefile
--- a/arch/m68k/sun3/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68k/sun3/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,5 +8,3 @@
 
 obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o \
 			intersil.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/sun3/prom/Makefile b/arch/m68k/sun3/prom/Makefile
--- a/arch/m68k/sun3/prom/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/m68k/sun3/prom/Makefile	Sun Dec 15 18:08:30 2002
@@ -5,5 +5,3 @@
 
 obj-y := init.o console.o printf.o  misc.o
 #bootstr.o init.o misc.o segment.o console.o printf.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68k/sun3x/Makefile b/arch/m68k/sun3x/Makefile
--- a/arch/m68k/sun3x/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68k/sun3x/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 export-objs	:= sun3x_ksyms.o
 
 obj-y		:= config.o time.o dvma.o prom.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68knommu/Makefile b/arch/m68knommu/Makefile
--- a/arch/m68knommu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/Makefile	Sun Dec 15 18:08:29 2002
@@ -96,8 +96,6 @@
 	   arch/m68knommu/platform/$(PLATFORM)/
 libs-y	+= arch/m68knommu/lib/
 
-include $(TOPDIR)/Rules.make
-
 prepare: include/asm-$(ARCH)/asm-offsets.h
 
 archmrproper:
diff -Nru a/arch/m68knommu/kernel/Makefile b/arch/m68knommu/kernel/Makefile
--- a/arch/m68knommu/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,6 +8,3 @@
 	 setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
 
 obj-$(CONFIG_COMEMPCI)	+= comempci.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/kernel/ints.c b/arch/m68knommu/kernel/ints.c
--- a/arch/m68knommu/kernel/ints.c	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/kernel/ints.c	Sun Dec 15 18:08:28 2002
@@ -33,7 +33,6 @@
  *	This table stores the address info for each vector handler.
  */
 irq_handler_t irq_list[SYS_IRQS];
-unsigned int *mach_kstat_irqs;
 
 #define NUM_IRQ_NODES 16
 static irq_node_t nodes[NUM_IRQ_NODES];
@@ -82,8 +81,6 @@
 
 	if (mach_init_IRQ)
 		mach_init_IRQ();
-
-	mach_kstat_irqs = &kstat.irqs[0][0];
 }
 
 irq_node_t *new_irq_node(void)
@@ -233,7 +230,7 @@
 {
 	if (vec >= VEC_INT1 && vec <= VEC_INT7) {
 		vec -= VEC_SPUR;
-		kstat.irqs[0][vec]++;
+		kstat_cpu(0).irqs[vec]++;
 		irq_list[vec].handler(vec, irq_list[vec].dev_id, fp);
 	} else {
 		if (mach_process_int)
@@ -254,7 +251,7 @@
 			continue;
 
 		seq_printf(p, "%3d: %10u ", i,
-			(i ? kstat.irqs[0][i] : num_spurious));
+			(i ? kstat_cpu(0).irqs[i] : num_spurious));
 		if (irq_list[i].flags & IRQ_FLG_LOCK)
 			seq_printf(p, "L ");
 		else
diff -Nru a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
--- a/arch/m68knommu/kernel/process.c	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/kernel/process.c	Sun Dec 15 18:08:28 2002
@@ -168,7 +168,7 @@
 asmlinkage int m68k_vfork(struct pt_regs *regs)
 {
 	struct task_struct *p;
-	p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL);
+	p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(), regs, 0, NULL, NULL);
 	return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
@@ -183,7 +183,7 @@
 	newsp = regs->d2;
 	if (!newsp)
 		newsp = rdusp();
-        p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL);
+        p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, regs, 0, NULL, NULL);
         return IS_ERR(p) ? PTR_ERR(p) : p->pid;
 }
 
diff -Nru a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
--- a/arch/m68knommu/kernel/signal.c	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/kernel/signal.c	Sun Dec 15 18:08:29 2002
@@ -63,9 +63,11 @@
 	sigset_t saveset;
 
 	mask &= _BLOCKABLE;
+	spin_lock_irq(&current->sig->siglock);
 	saveset = current->blocked;
 	siginitset(&current->blocked, mask);
 	recalc_sigpending();
+	spin_unlock_irq(&current->sig->siglock);
 
 	regs->d0 = -EINTR;
 	while (1) {
@@ -91,9 +93,11 @@
 		return -EFAULT;
 	sigdelsetmask(&newset, ~_BLOCKABLE);
 
+	spin_lock_irq(&current->sig->siglock);
 	saveset = current->blocked;
 	current->blocked = newset;
 	recalc_sigpending();
+	spin_unlock_irq(&current->sig->siglock);
 
 	regs->d0 = -EINTR;
 	while (1) {
@@ -366,8 +370,10 @@
 		goto badframe;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
+	spin_lock_irq(&current->sig->siglock);
 	current->blocked = set;
 	recalc_sigpending();
+	spin_unlock_irq(&current->sig->siglock);
 	
 	if (restore_sigcontext(regs, &frame->sc, frame + 1, &d0))
 		goto badframe;
@@ -393,8 +399,10 @@
 		goto badframe;
 
 	sigdelsetmask(&set, ~_BLOCKABLE);
+	spin_lock_irq(&current->sig->siglock);
 	current->blocked = set;
 	recalc_sigpending();
+	spin_unlock_irq(&current->sig->siglock);
 	
 	if (rt_restore_ucontext(regs, sw, &frame->uc, &d0))
 		goto badframe;
@@ -729,10 +737,13 @@
 	if (ka->sa.sa_flags & SA_ONESHOT)
 		ka->sa.sa_handler = SIG_DFL;
 
-	sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-	if (!(ka->sa.sa_flags & SA_NODEFER))
+	if (!(ka->sa.sa_flags & SA_NODEFER)) {
+		spin_lock_irq(&current->sig->siglock);
+		sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
 		sigaddset(&current->blocked,sig);
-	recalc_sigpending();
+		recalc_sigpending();
+		spin_unlock_irq(&current->sig->siglock);
+	}
 }
 
 /*
diff -Nru a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
--- a/arch/m68knommu/kernel/syscalltable.S	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/kernel/syscalltable.S	Sun Dec 15 18:08:28 2002
@@ -241,7 +241,7 @@
 	.long sys_getdents64	/* 220 */
 	.long sys_fcntl64
 	.long sys_ni_syscall	/* reserved for TUX */
-	.long sys_security	/* reserved for Security */
+	.long sys_ni_syscall
 	.long sys_gettid
 	.long sys_ni_syscall	/* 225 */ /* sys_readahead */
 	.long sys_setxattr
diff -Nru a/arch/m68knommu/lib/Makefile b/arch/m68knommu/lib/Makefile
--- a/arch/m68knommu/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 obj-y	:= ashldi3.o ashrdi3.o lshrdi3.o \
 	   muldi3.o mulsi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \
 	   checksum.o semaphore.o memcpy.o memset.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68knommu/mm/Makefile b/arch/m68knommu/mm/Makefile
--- a/arch/m68knommu/mm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/m68knommu/mm/Makefile	Sun Dec 15 18:08:32 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y += init.o fault.o memory.o kmap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/m68knommu/platform/5206/Makefile b/arch/m68knommu/platform/5206/Makefile
--- a/arch/m68knommu/platform/5206/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/m68knommu/platform/5206/Makefile	Sun Dec 15 18:08:32 2002
@@ -19,6 +19,3 @@
 obj-y := config.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/5206e/Makefile b/arch/m68knommu/platform/5206e/Makefile
--- a/arch/m68knommu/platform/5206e/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/platform/5206e/Makefile	Sun Dec 15 18:08:29 2002
@@ -19,6 +19,3 @@
 obj-y := config.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/5249/Makefile b/arch/m68knommu/platform/5249/Makefile
--- a/arch/m68knommu/platform/5249/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/m68knommu/platform/5249/Makefile	Sun Dec 15 18:08:32 2002
@@ -19,6 +19,3 @@
 obj-y := config.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/5272/Makefile b/arch/m68knommu/platform/5272/Makefile
--- a/arch/m68knommu/platform/5272/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/platform/5272/Makefile	Sun Dec 15 18:08:28 2002
@@ -19,6 +19,3 @@
 obj-y := config.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/5307/Makefile b/arch/m68knommu/platform/5307/Makefile
--- a/arch/m68knommu/platform/5307/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/m68knommu/platform/5307/Makefile	Sun Dec 15 18:08:31 2002
@@ -22,6 +22,3 @@
 ifeq ($(CONFIG_M5307),y)
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
 endif
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/5407/Makefile b/arch/m68knommu/platform/5407/Makefile
--- a/arch/m68knommu/platform/5407/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/platform/5407/Makefile	Sun Dec 15 18:08:28 2002
@@ -19,6 +19,3 @@
 obj-y := config.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/68328/Makefile b/arch/m68knommu/platform/68328/Makefile
--- a/arch/m68knommu/platform/68328/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/platform/68328/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,8 +10,6 @@
 EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o
 endif
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/$(BOARD)/bootlogo.rh: $(src)/bootlogo.h
 	perl $(src)/bootlogo.pl < $(src)/bootlogo.h > $(obj)/$(BOARD)/bootlogo.rh
 
diff -Nru a/arch/m68knommu/platform/68360/Makefile b/arch/m68knommu/platform/68360/Makefile
--- a/arch/m68knommu/platform/68360/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/platform/68360/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,6 +5,3 @@
 obj-y := config.o commproc.o entry.o ints.o
 
 EXTRA_TARGETS := $(BOARD)/crt0_$(MODEL).o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/m68knommu/platform/68EZ328/Makefile b/arch/m68knommu/platform/68EZ328/Makefile
--- a/arch/m68knommu/platform/68EZ328/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/platform/68EZ328/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,8 +6,6 @@
 
 EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/$(BOARD)/bootlogo.rh: $(src)/bootlogo.h
 	perl $(src)/../68328/bootlogo.pl < $(src)/bootlogo.h \
 		> $(obj)/$(BOARD)/bootlogo.rh
diff -Nru a/arch/m68knommu/platform/68VZ328/Makefile b/arch/m68knommu/platform/68VZ328/Makefile
--- a/arch/m68knommu/platform/68VZ328/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/m68knommu/platform/68VZ328/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,8 +6,6 @@
 
 EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/$(BOARD)/bootlogo.rh: $(src)/../68EZ328/bootlogo.h
 	perl $(src)/../68328/bootlogo.pl < $(src)/../68EZ328/bootlogo.h \
 		> $(obj)/$(BOARD)/bootlogo.rh
diff -Nru a/arch/m68knommu/platform/Makefile b/arch/m68knommu/platform/Makefile
--- a/arch/m68knommu/platform/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/m68knommu/platform/Makefile	Sun Dec 15 18:08:29 2002
@@ -1,6 +1,3 @@
 #
 # Makefile for the arch/m68knommu/platform.
 #
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/mips/arc/Makefile b/arch/mips/arc/Makefile
--- a/arch/mips/arc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/arc/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,5 +9,3 @@
 		   time.o file.o identify.o
 
 obj-$(CONFIG_ARC_CONSOLE)   += arc_con.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/au1000/common/Makefile b/arch/mips/au1000/common/Makefile
--- a/arch/mips/au1000/common/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips/au1000/common/Makefile	Sun Dec 15 18:08:32 2002
@@ -16,7 +16,5 @@
 
 EXTRA_AFLAGS := $(CFLAGS)
 
-include $(TOPDIR)/Rules.make
-
 ramdisk.o: 
 	mkramobj ramdisk ramdisk.o
diff -Nru a/arch/mips/au1000/pb1000/Makefile b/arch/mips/au1000/pb1000/Makefile
--- a/arch/mips/au1000/pb1000/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/mips/au1000/pb1000/Makefile	Sun Dec 15 18:08:31 2002
@@ -7,5 +7,3 @@
 #
 
 obj-y := init.o setup.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/baget/Makefile b/arch/mips/baget/Makefile
--- a/arch/mips/baget/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/mips/baget/Makefile	Sun Dec 15 18:08:33 2002
@@ -9,8 +9,6 @@
 obj-$(CONFIG_SERIAL)	+= vacserial.o
 obj-$(CONFIG_VAC_RTC)	+= vacrtc.o
 
-include $(TOPDIR)/Rules.make
-
 bagetIRQ.o : bagetIRQ.S
 	$(CC) $(CFLAGS) -c -o $@ $<
 
diff -Nru a/arch/mips/baget/prom/Makefile b/arch/mips/baget/prom/Makefile
--- a/arch/mips/baget/prom/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/baget/prom/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 L_TARGET := lib.a
 
 obj-y	:= init.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
--- a/arch/mips/boot/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/mips/boot/Makefile	Sun Dec 15 18:08:31 2002
@@ -43,5 +43,3 @@
 	rm -f vmlinux.ecoff
 	rm -f addinitrd
 	rm -f elf2ecoff
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ddb5074/Makefile b/arch/mips/ddb5074/Makefile
--- a/arch/mips/ddb5074/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/ddb5074/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 EXTRA_AFLAGS := $(CFLAGS)
 
 obj-y	:= setup.o irq.o time.o prom.o pci.o int-handler.o nile4.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ddb5476/Makefile b/arch/mips/ddb5476/Makefile
--- a/arch/mips/ddb5476/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/mips/ddb5476/Makefile	Sun Dec 15 18:08:30 2002
@@ -8,5 +8,3 @@
 obj-y				+= setup.o irq.o time.o prom.o pci.o \
 				   int-handler.o nile4.o
 obj-$(CONFIG_REMOTE_DEBUG)	+= dbg_io.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ddb5xxx/common/Makefile b/arch/mips/ddb5xxx/common/Makefile
--- a/arch/mips/ddb5xxx/common/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips/ddb5xxx/common/Makefile	Sun Dec 15 18:08:32 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y	 += irq.o irq_cpu.o nile4.o prom.o pci.o pci_auto.o rtc_ds1386.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ddb5xxx/ddb5477/Makefile b/arch/mips/ddb5xxx/ddb5477/Makefile
--- a/arch/mips/ddb5xxx/ddb5477/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/ddb5xxx/ddb5477/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,5 +9,3 @@
 obj-$(CONFIG_LL_DEBUG) 		+= debug.o
 obj-$(CONFIG_REMOTE_DEBUG)	+= kgdb_io.o
 obj-$(CONFIG_BLK_DEV_INITRD)	+= ramdisk.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/dec/Makefile b/arch/mips/dec/Makefile
--- a/arch/mips/dec/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/dec/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 obj-y	 := int-handler.o setup.o irq.o time.o reset.o rtc-dec.o wbflush.o
 
 obj-$(CONFIG_PROM_CONSOLE)	+= promcon.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/dec/boot/Makefile b/arch/mips/dec/boot/Makefile
--- a/arch/mips/dec/boot/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/dec/boot/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 
 clean:
 	rm -f nbImage
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/dec/prom/Makefile b/arch/mips/dec/prom/Makefile
--- a/arch/mips/dec/prom/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/dec/prom/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,7 +9,5 @@
 
 EXTRA_AFLAGS := $(CFLAGS)
 
-include $(TOPDIR)/Rules.make
-
 dep:
 	$(CPP) $(CPPFLAGS) -M *.c > .depend
diff -Nru a/arch/mips/gt64120/common/Makefile b/arch/mips/gt64120/common/Makefile
--- a/arch/mips/gt64120/common/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/gt64120/common/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y	 := gt_irq.o pci.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/gt64120/momenco_ocelot/Makefile b/arch/mips/gt64120/momenco_ocelot/Makefile
--- a/arch/mips/gt64120/momenco_ocelot/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/gt64120/momenco_ocelot/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-y	 += int-handler.o irq.o pci.o prom.o reset.o setup.o
 
 obj-$(CONFIG_REMOTE_DEBUG) += dbg_io.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ite-boards/generic/Makefile b/arch/mips/ite-boards/generic/Makefile
--- a/arch/mips/ite-boards/generic/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/ite-boards/generic/Makefile	Sun Dec 15 18:08:28 2002
@@ -21,5 +21,3 @@
 endif
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ite-boards/ivr/Makefile b/arch/mips/ite-boards/ivr/Makefile
--- a/arch/mips/ite-boards/ivr/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips/ite-boards/ivr/Makefile	Sun Dec 15 18:08:32 2002
@@ -11,5 +11,3 @@
 
 obj-$(CONFIG_PCI) += pci_fixup.o
 obj-$(CONFIG_BLK_DEV_INITRD) += le_ramdisk.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/ite-boards/qed-4n-s01b/Makefile b/arch/mips/ite-boards/qed-4n-s01b/Makefile
--- a/arch/mips/ite-boards/qed-4n-s01b/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/mips/ite-boards/qed-4n-s01b/Makefile	Sun Dec 15 18:08:30 2002
@@ -10,5 +10,3 @@
 obj-y := init.o 
 obj-$(CONFIG_PCI) += pci_fixup.o
 obj-$(CONFIG_BLK_DEV_INITRD) += le_ramdisk.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/jazz/Makefile b/arch/mips/jazz/Makefile
--- a/arch/mips/jazz/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/jazz/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 	    floppy-jazz.o kbd-jazz.o
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
--- a/arch/mips/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -46,5 +46,3 @@
 obj-$(CONFIG_NEW_PCI)          += pci.o
 obj-$(CONFIG_PCI_AUTO)         += pci_auto.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
--- a/arch/mips/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -20,5 +20,3 @@
 obj-$(CONFIG_BLK_DEV_FD)	+= floppy-no.o floppy-std.o
 obj-$(CONFIG_IDE)		+= ide-std.o ide-no.o
 obj-$(CONFIG_PC_KEYB)		+= kbd-std.o kbd-no.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/math-emu/Makefile b/arch/mips/math-emu/Makefile
--- a/arch/mips/math-emu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/math-emu/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 	   sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_logb.o \
 	   sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \
 	   dp_sqrt.o sp_sqrt.o kernel_linkage.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/mips-boards/atlas/Makefile b/arch/mips/mips-boards/atlas/Makefile
--- a/arch/mips/mips-boards/atlas/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips/mips-boards/atlas/Makefile	Sun Dec 15 18:08:32 2002
@@ -24,5 +24,3 @@
 #
 
 obj-y	:= atlas_int.o atlas_rtc.o atlas_setup.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/mips-boards/generic/Makefile b/arch/mips/mips-boards/generic/Makefile
--- a/arch/mips/mips-boards/generic/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/mips/mips-boards/generic/Makefile	Sun Dec 15 18:08:31 2002
@@ -27,5 +27,3 @@
 obj-y				:= mipsIRQ.o pci.o reset.o display.o init.o \
 				   memory.o printf.o cmdline.o time.o
 obj-$(CONFIG_REMOTE_DEBUG)	+= gdb_hook.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/mips-boards/malta/Makefile b/arch/mips/mips-boards/malta/Makefile
--- a/arch/mips/mips-boards/malta/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/mips-boards/malta/Makefile	Sun Dec 15 18:08:28 2002
@@ -24,5 +24,3 @@
 #
 
 obj-y := malta_int.o malta_rtc.o malta_setup.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile
--- a/arch/mips/mm/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/mm/Makefile	Sun Dec 15 18:08:29 2002
@@ -17,5 +17,3 @@
 obj-$(CONFIG_CPU_MIPS64)	+= mips32.o
 obj-$(CONFIG_SGI_IP22)		+= umap.o
 obj-$(CONFIG_BAGET_MIPS)	+= umap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/philips/nino/Makefile b/arch/mips/philips/nino/Makefile
--- a/arch/mips/philips/nino/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/philips/nino/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,8 +8,6 @@
 
 obj-$(CONFIG_BLK_DEV_INITRD)	+= ramdisk.o
 
-include $(TOPDIR)/Rules.make
-
 ramdisk.o:
 		$(MAKE) -C ramdisk
 		mv ramdisk/ramdisk.o ramdisk.o
diff -Nru a/arch/mips/philips/nino/ramdisk/Makefile b/arch/mips/philips/nino/ramdisk/Makefile
--- a/arch/mips/philips/nino/ramdisk/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips/philips/nino/ramdisk/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,5 +8,3 @@
 
 ramdisk.o: ramdisk.gz ld.script
 	$(LD) $(LDFLAGS) -T ld.script -b binary -o $@ ramdisk.gz
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/sgi/kernel/Makefile b/arch/mips/sgi/kernel/Makefile
--- a/arch/mips/sgi/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/sgi/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 	   indyIRQ.o reset.o setup.o time.o
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/sni/Makefile b/arch/mips/sni/Makefile
--- a/arch/mips/sni/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/sni/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-y	 := int-handler.o io.o irq.o pci.o pcimt_scache.o reset.o setup.o
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips/tools/Makefile b/arch/mips/tools/Makefile
--- a/arch/mips/tools/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips/tools/Makefile	Sun Dec 15 18:08:28 2002
@@ -21,5 +21,3 @@
 mrproper:	
 	rm -f offset.[hs] $(TARGET).new
 	rm -f $(TARGET)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/Kconfig b/arch/mips64/Kconfig
--- a/arch/mips64/Kconfig	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/Kconfig	Sun Dec 15 18:08:28 2002
@@ -371,6 +371,11 @@
 	  compatibility. Since all software available for Linux/MIPS is
 	  currently 32-bit you should say Y here.
 
+config COMPAT
+	bool
+	depends on MIPS32_COMPAT
+	default y
+
 config BINFMT_ELF32
 	bool
 	depends on MIPS32_COMPAT
diff -Nru a/arch/mips64/arc/Makefile b/arch/mips64/arc/Makefile
--- a/arch/mips64/arc/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips64/arc/Makefile	Sun Dec 15 18:08:32 2002
@@ -8,5 +8,3 @@
 
 obj-$(CONFIG_ARC_MEMORY) += memory.o
 obj-$(CONFIG_ARC_CONSOLE) += arc_con.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/boot/Makefile b/arch/mips64/boot/Makefile
--- a/arch/mips64/boot/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips64/boot/Makefile	Sun Dec 15 18:08:32 2002
@@ -31,5 +31,3 @@
 
 mrproper:
 	rm -f vmlinux.ecoff addinitrd elf2ecoff
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/kernel/Makefile b/arch/mips64/kernel/Makefile
--- a/arch/mips64/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -19,5 +19,3 @@
 AFLAGS_r4k_genex.o := -P
 AFLAGS_r4k_tlb_glue.o := -P
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/kernel/ioctl32.c b/arch/mips64/kernel/ioctl32.c
--- a/arch/mips64/kernel/ioctl32.c	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/kernel/ioctl32.c	Sun Dec 15 18:08:29 2002
@@ -9,6 +9,7 @@
  */
 #include <linux/config.h>
 #include <linux/types.h>
+#include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/fs.h>
 #include <linux/sched.h>
@@ -65,14 +66,9 @@
 
 #define A(__x) ((unsigned long)(__x))
 
-struct timeval32 {
-	int tv_sec;
-	int tv_usec;
-};
-
 static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-	struct timeval32 *up = (struct timeval32 *)arg;
+	struct compat_timeval *up = (struct compat_timeval *)arg;
 	struct timeval ktv;
 	mm_segment_t old_fs = get_fs();
 	int err;
diff -Nru a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c
--- a/arch/mips64/kernel/linux32.c	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/kernel/linux32.c	Sun Dec 15 18:08:29 2002
@@ -22,11 +22,11 @@
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/sysctl.h>
-#include <linux/utime.h>
 #include <linux/utsname.h>
 #include <linux/personality.h>
 #include <linux/timex.h>
 #include <linux/dnotify.h>
+#include <linux/compat.h>
 #include <net/sock.h>
 
 #include <asm/uaccess.h>
@@ -116,36 +116,6 @@
 	return sys_ftruncate(fd, ((long) high << 32) | low);
 }
 
-extern asmlinkage int sys_utime(char * filename, struct utimbuf * times);
-
-struct utimbuf32 {
-	__kernel_time_t32 actime, modtime;
-};
-
-asmlinkage int sys32_utime(char * filename, struct utimbuf32 *times)
-{
-	struct utimbuf t;
-	mm_segment_t old_fs;
-	int ret;
-	char *filenam;
-	
-	if (!times)
-		return sys_utime(filename, NULL);
-	if (get_user (t.actime, &times->actime) ||
-	    __get_user (t.modtime, &times->modtime))
-		return -EFAULT;
-	filenam = getname (filename);
-	ret = PTR_ERR(filenam);
-	if (!IS_ERR(filenam)) {
-		old_fs = get_fs();
-		set_fs (KERNEL_DS); 
-		ret = sys_utime(filenam, &t);
-		set_fs (old_fs);
-		putname (filenam);
-	}
-	return ret;
-}
-
 #if 0
 /*
  * count32() counts the number of arguments/envelopes
@@ -463,20 +433,9 @@
 	return(n);
 }
 
-struct timeval32
-{
-    int tv_sec, tv_usec;
-};
-
-struct itimerval32
-{
-    struct timeval32 it_interval;
-    struct timeval32 it_value;
-};
-
 struct rusage32 {
-        struct timeval32 ru_utime;
-        struct timeval32 ru_stime;
+        struct compat_timeval ru_utime;
+        struct compat_timeval ru_stime;
         int    ru_maxrss;
         int    ru_ixrss;
         int    ru_idrss;
@@ -683,7 +642,7 @@
 }
 
 static inline long
-get_tv32(struct timeval *o, struct timeval32 *i)
+get_tv32(struct timeval *o, struct compat_timeval *i)
 {
 	return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
 		(__get_user(o->tv_sec, &i->tv_sec) |
@@ -691,72 +650,13 @@
 }
 
 static inline long
-get_it32(struct itimerval *o, struct itimerval32 *i)
-{
-	return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
-		(__get_user(o->it_interval.tv_sec, &i->it_interval.tv_sec) |
-		 __get_user(o->it_interval.tv_usec, &i->it_interval.tv_usec) |
-		 __get_user(o->it_value.tv_sec, &i->it_value.tv_sec) |
-		 __get_user(o->it_value.tv_usec, &i->it_value.tv_usec)));
-}
-
-static inline long
-put_tv32(struct timeval32 *o, struct timeval *i)
+put_tv32(struct compat_timeval *o, struct timeval *i)
 {
 	return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
 		(__put_user(i->tv_sec, &o->tv_sec) |
 		 __put_user(i->tv_usec, &o->tv_usec)));
 }
 
-static inline long
-put_it32(struct itimerval32 *o, struct itimerval *i)
-{
-	return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
-		(__put_user(i->it_interval.tv_sec, &o->it_interval.tv_sec) |
-		 __put_user(i->it_interval.tv_usec, &o->it_interval.tv_usec) |
-		 __put_user(i->it_value.tv_sec, &o->it_value.tv_sec) |
-		 __put_user(i->it_value.tv_usec, &o->it_value.tv_usec)));
-}
-
-extern int do_getitimer(int which, struct itimerval *value);
-
-asmlinkage int
-sys32_getitimer(int which, struct itimerval32 *it)
-{
-	struct itimerval kit;
-	int error;
-
-	error = do_getitimer(which, &kit);
-	if (!error && put_it32(it, &kit))
-		error = -EFAULT;
-
-	return error;
-}
-
-extern int do_setitimer(int which, struct itimerval *, struct itimerval *);
-
-
-asmlinkage int
-sys32_setitimer(int which, struct itimerval32 *in, struct itimerval32 *out)
-{
-	struct itimerval kin, kout;
-	int error;
-
-	if (in) {
-		if (get_it32(&kin, in))
-			return -EFAULT;
-	} else
-		memset(&kin, 0, sizeof(kin));
-
-	error = do_setitimer(which, &kin, out ? &kout : NULL);
-	if (error || !out)
-		return error;
-	if (put_it32(out, &kout))
-		return -EFAULT;
-
-	return 0;
-
-}
 asmlinkage unsigned long 
 sys32_alarm(unsigned int seconds)
 {
@@ -784,7 +684,7 @@
 extern int do_sys_settimeofday(struct timeval *tv, struct timezone *tz);
 
 asmlinkage int
-sys32_gettimeofday(struct timeval32 *tv, struct timezone *tz)
+sys32_gettimeofday(struct compat_timeval *tv, struct timezone *tz)
 {
 	if (tv) {
 		struct timeval ktv;
@@ -800,7 +700,7 @@
 }
 
 asmlinkage int
-sys32_settimeofday(struct timeval32 *tv, struct timezone *tz)
+sys32_settimeofday(struct compat_timeval *tv, struct timezone *tz)
 {
 	struct timeval ktv;
 	struct timezone ktz;
@@ -1112,7 +1012,7 @@
 #define MAX_SELECT_SECONDS \
 	((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1)
 
-asmlinkage int sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, struct timeval32 *tvp)
+asmlinkage int sys32_select(int n, u32 *inp, u32 *outp, u32 *exp, struct compat_timeval *tvp)
 {
 	fd_set_bits fds;
 	char *bits;
@@ -1205,16 +1105,11 @@
 
 
 
-struct timespec32 {
-	int 	tv_sec;
-	int	tv_nsec;
-};
-
 extern asmlinkage int sys_sched_rr_get_interval(pid_t pid,
 						struct timespec *interval);
 
 asmlinkage int
-sys32_sched_rr_get_interval(__kernel_pid_t32 pid, struct timespec32 *interval)
+sys32_sched_rr_get_interval(__kernel_pid_t32 pid, struct compat_timespec *interval)
 {
 	struct timespec t;
 	int ret;
@@ -1230,31 +1125,6 @@
 }
 
 
-extern asmlinkage int sys_nanosleep(struct timespec *rqtp,
-				    struct timespec *rmtp); 
-
-asmlinkage int
-sys32_nanosleep(struct timespec32 *rqtp, struct timespec32 *rmtp)
-{
-	struct timespec t;
-	int ret;
-	mm_segment_t old_fs = get_fs ();
-
-	if (get_user (t.tv_sec, &rqtp->tv_sec) ||
-	    __get_user (t.tv_nsec, &rqtp->tv_nsec))
-		return -EFAULT;
-	
-	set_fs (KERNEL_DS);
-	ret = sys_nanosleep(&t, rmtp ? &t : NULL);
-	set_fs (old_fs);
-	if (rmtp && ret == -EINTR) {
-		if (__put_user (t.tv_sec, &rmtp->tv_sec) ||
-	    	    __put_user (t.tv_nsec, &rmtp->tv_nsec))
-			return -EFAULT;
-	}
-	return ret;
-}
-
 struct tms32 {
 	int tms_utime;
 	int tms_stime;
@@ -1418,8 +1288,8 @@
 
 struct semid_ds32 {
         struct ipc_perm32 sem_perm;               /* permissions .. see ipc.h */
-        __kernel_time_t32 sem_otime;              /* last semop time */
-        __kernel_time_t32 sem_ctime;              /* last change time */
+        compat_time_t   sem_otime;              /* last semop time */
+        compat_time_t   sem_ctime;              /* last change time */
         u32 sem_base;              /* ptr to first semaphore in array */
         u32 sem_pending;          /* pending operations to be processed */
         u32 sem_pending_last;    /* last pending operation */
@@ -1432,9 +1302,9 @@
         struct ipc_perm32 msg_perm;
         u32 msg_first;
         u32 msg_last;
-        __kernel_time_t32 msg_stime;
-        __kernel_time_t32 msg_rtime;
-        __kernel_time_t32 msg_ctime;
+        compat_time_t   msg_stime;
+        compat_time_t   msg_rtime;
+        compat_time_t   msg_ctime;
         u32 wwait;
         u32 rwait;
         unsigned short msg_cbytes;
@@ -1447,9 +1317,9 @@
 struct shmid_ds32 {
         struct ipc_perm32       shm_perm;
         int                     shm_segsz;
-        __kernel_time_t32       shm_atime;
-        __kernel_time_t32       shm_dtime;
-        __kernel_time_t32       shm_ctime;
+        compat_time_t         shm_atime;
+        compat_time_t         shm_dtime;
+        compat_time_t         shm_ctime;
         __kernel_ipc_pid_t32    shm_cpid; 
         __kernel_ipc_pid_t32    shm_lpid; 
         unsigned short          shm_nattch;
@@ -1819,7 +1689,7 @@
 	__kernel_caddr_t32 oldval;
 	__kernel_caddr_t32 oldlenp;
 	__kernel_caddr_t32 newval;
-	__kernel_size_t32 newlen;
+	compat_size_t newlen;
 	unsigned int __unused[4];
 };
 
@@ -1935,7 +1805,7 @@
 	u32 modes;
 	s32 offset, freq, maxerror, esterror;
 	s32 status, constant, precision, tolerance;
-	struct timeval32 time;
+	struct compat_timeval time;
 	s32 tick;
 	s32 ppsfreq, jitter, shift, stabil;
 	s32 jitcnt, calcnt, errcnt, stbcnt;
diff -Nru a/arch/mips64/kernel/scall_o32.S b/arch/mips64/kernel/scall_o32.S
--- a/arch/mips64/kernel/scall_o32.S	Sun Dec 15 18:08:30 2002
+++ b/arch/mips64/kernel/scall_o32.S	Sun Dec 15 18:08:30 2002
@@ -263,7 +263,7 @@
 	sys	sys32_alarm	1
 	sys	sys_fstat	2
 	sys	sys_pause	0
-	sys	sys32_utime	2			/* 4030 */
+	sys	compat_sys_utime	2			/* 4030 */
 	sys	sys_ni_syscall	0
 	sys	sys_ni_syscall	0
 	sys	sys_access	2
@@ -337,8 +337,8 @@
 	sys	sys_ni_syscall	0	/* sys_ioperm */
 	sys	sys_socketcall	2
 	sys	sys_syslog	3
-	sys	sys32_setitimer	3
-	sys	sys32_getitimer	2			/* 4105 */
+	sys	compat_sys_setitimer	3
+	sys	compat_sys_getitimer	2			/* 4105 */
 	sys	sys32_newstat	2
 	sys	sys32_newlstat	2
 	sys	sys32_newfstat	2
@@ -399,7 +399,7 @@
 	sys	sys_sched_get_priority_max 1
 	sys	sys_sched_get_priority_min 1
 	sys	sys32_sched_rr_get_interval 2		/* 4165 */
-	sys	sys32_nanosleep	2
+	sys	compat_sys_nanosleep	2
 	sys	sys_mremap	4
 	sys	sys_accept	3
 	sys	sys_bind	3
diff -Nru a/arch/mips64/kernel/signal32.c b/arch/mips64/kernel/signal32.c
--- a/arch/mips64/kernel/signal32.c	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/kernel/signal32.c	Sun Dec 15 18:08:29 2002
@@ -17,6 +17,7 @@
 #include <linux/wait.h>
 #include <linux/ptrace.h>
 #include <linux/unistd.h>
+#include <linux/compat.h>
 
 #include <asm/asm.h>
 #include <asm/bitops.h>
@@ -59,7 +60,7 @@
 /* IRIX compatible stack_t  */
 typedef struct sigaltstack32 {
 	s32 ss_sp;
-	__kernel_size_t32 ss_size;
+	compat_size_t ss_size;
 	int ss_flags;
 } stack32_t;
 
diff -Nru a/arch/mips64/lib/Makefile b/arch/mips64/lib/Makefile
--- a/arch/mips64/lib/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/mips64/lib/Makefile	Sun Dec 15 18:08:31 2002
@@ -10,5 +10,3 @@
 	  floppy-no.o ide-std.o ide-no.o kbd-std.o kbd-no.o rtc-std.o \
 	  rtc-no.o memset.o memcpy.o strlen_user.o strncpy_user.o \
 	  strnlen_user.o watch.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/math-emu/Makefile b/arch/mips64/math-emu/Makefile
--- a/arch/mips64/math-emu/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/math-emu/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,5 +9,3 @@
 	   sp_div.o sp_mul.o sp_sub.o sp_add.o sp_fdp.o sp_cmp.o sp_logb.o \
 	   sp_scalb.o sp_simple.o sp_tint.o sp_fint.o sp_tlong.o sp_flong.o \
 	   dp_sqrt.o sp_sqrt.o kernel_linkage.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/mips-boards/atlas/Makefile b/arch/mips64/mips-boards/atlas/Makefile
--- a/arch/mips64/mips-boards/atlas/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/mips64/mips-boards/atlas/Makefile	Sun Dec 15 18:08:31 2002
@@ -24,5 +24,3 @@
 #
 
 obj-y   := atlas_int.o atlas_rtc.o atlas_setup.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/mips-boards/generic/Makefile b/arch/mips64/mips-boards/generic/Makefile
--- a/arch/mips64/mips-boards/generic/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/mips-boards/generic/Makefile	Sun Dec 15 18:08:28 2002
@@ -27,5 +27,3 @@
 obj-$(CONFIG_REMOTE_DEBUG)      += gdb_hook.o
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/mips-boards/malta/Makefile b/arch/mips64/mips-boards/malta/Makefile
--- a/arch/mips64/mips-boards/malta/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/mips-boards/malta/Makefile	Sun Dec 15 18:08:29 2002
@@ -24,5 +24,3 @@
 #
 
 obj-y := malta_int.o malta_rtc.o malta_setup.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/mm/Makefile b/arch/mips64/mm/Makefile
--- a/arch/mips64/mm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/mm/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 obj-$(CONFIG_CPU_NEVADA)	+= r4xx0.o
 obj-$(CONFIG_CPU_R10000)	+= andes.o
 obj-$(CONFIG_SGI_IP22)		+= umap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/sgi-ip22/Makefile b/arch/mips64/sgi-ip22/Makefile
--- a/arch/mips64/sgi-ip22/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/sgi-ip22/Makefile	Sun Dec 15 18:08:28 2002
@@ -9,5 +9,3 @@
 
 obj-y	+= ip22-berr.o ip22-mc.o ip22-sc.o ip22-hpc.o ip22-int.o ip22-rtc.o \
 	   ip22-setup.o system.o ip22-timer.o ip22-irq.o ip22-reset.o time.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/sgi-ip27/Makefile b/arch/mips64/sgi-ip27/Makefile
--- a/arch/mips64/sgi-ip27/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/mips64/sgi-ip27/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 obj-y	:= ip27-berr.o ip27-console.o ip27-irq.o ip27-init.o ip27-irq-glue.o \
 	   ip27-klconfig.o ip27-klnuma.o ip27-memory.o ip27-nmi.o ip27-pci.o \
 	   ip27-pci-dma.o ip27-reset.o ip27-setup.o ip27-timer.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/sgi-ip32/Makefile b/arch/mips64/sgi-ip32/Makefile
--- a/arch/mips64/sgi-ip32/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/mips64/sgi-ip32/Makefile	Sun Dec 15 18:08:29 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_PCI) += ip32-pci.o ip32-pci-dma.o
 
 EXTRA_AFLAGS := $(CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/mips64/tools/Makefile b/arch/mips64/tools/Makefile
--- a/arch/mips64/tools/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/mips64/tools/Makefile	Sun Dec 15 18:08:28 2002
@@ -21,5 +21,3 @@
 mrproper:	
 	rm -f offset.[hs] $(TARGET).new
 	rm -f $(TARGET)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/4xx_io/Makefile b/arch/ppc/4xx_io/Makefile
--- a/arch/ppc/4xx_io/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/ppc/4xx_io/Makefile	Sun Dec 15 18:08:31 2002
@@ -4,5 +4,3 @@
 
 
 obj-$(CONFIG_SERIAL_SICC)		+= serial_sicc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/8260_io/Makefile b/arch/ppc/8260_io/Makefile
--- a/arch/ppc/8260_io/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ppc/8260_io/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 
 obj-$(CONFIG_FEC_ENET)	+= fcc_enet.o
 obj-$(CONFIG_SCC_ENET)	+= enet.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/8xx_io/Makefile b/arch/ppc/8xx_io/Makefile
--- a/arch/ppc/8xx_io/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ppc/8xx_io/Makefile	Sun Dec 15 18:08:32 2002
@@ -10,5 +10,3 @@
 obj-$(CONFIG_SCC_ENET)	+= enet.o
 obj-$(CONFIG_UCODE_PATCH) += micropatch.o
 obj-$(CONFIG_HTDMSOUND) += cs4218_tdm.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/amiga/Makefile b/arch/ppc/amiga/Makefile
--- a/arch/ppc/amiga/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/ppc/amiga/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,5 +8,3 @@
 			chipram.o amiga_ksyms.o
 
 obj-$(CONFIG_AMIGA_PCMCIA) += pcmcia.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/boot/utils/Makefile b/arch/ppc/boot/utils/Makefile
--- a/arch/ppc/boot/utils/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/ppc/boot/utils/Makefile	Sun Dec 15 18:08:31 2002
@@ -18,5 +18,3 @@
 
 clean:
 	rm -f $(UTILS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/iSeries/Makefile b/arch/ppc/iSeries/Makefile
--- a/arch/ppc/iSeries/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc/iSeries/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,8 +7,6 @@
 
 obj-$(CONFIG_PCI) += XmPciLpEvent.o iSeries_FlightRecorder.o iSeries_IoMmTable.o iSeries_VpdInfo.o iSeries_fixup.o iSeries_irq.o iSeries_pci.o iSeries_pci_proc.o iSeries_reset_device.o
 
-include $(TOPDIR)/Rules.make
-
 LparData.c:: ReleaseData.h
 
 ReleaseData.h: $(TOPDIR)/Makefile
diff -Nru a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile
--- a/arch/ppc/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ppc/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -40,7 +40,5 @@
 endif
 obj-$(CONFIG_PPC_ISERIES)	+= iSeries_misc.o
 
-include $(TOPDIR)/Rules.make
-
 find_name : find_name.c
 	$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
diff -Nru a/arch/ppc/lib/Makefile b/arch/ppc/lib/Makefile
--- a/arch/ppc/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-y			:= checksum.o string.o strcase.o dec_and_lock.o div64.o
 
 obj-$(CONFIG_SMP)	+= locks.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/math-emu/Makefile b/arch/ppc/math-emu/Makefile
--- a/arch/ppc/math-emu/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/ppc/math-emu/Makefile	Sun Dec 15 18:08:31 2002
@@ -11,5 +11,3 @@
 					mcrfs.o mffs.o mtfsb0.o mtfsb1.o \
 					mtfsf.o mtfsfi.o stfiwx.o stfs.o \
 					udivmodti4.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/mm/Makefile b/arch/ppc/mm/Makefile
--- a/arch/ppc/mm/Makefile	Sun Dec 15 18:08:31 2002
+++ b/arch/ppc/mm/Makefile	Sun Dec 15 18:08:31 2002
@@ -13,5 +13,3 @@
 obj-$(CONFIG_PPC_ISERIES)	+= iSeries_hashtable.o iSeries_mmu.o tlb.o
 obj-$(CONFIG_40x)		+= 4xx_mmu.o
 obj-$(CONFIG_NOT_COHERENT_CACHE)	+= cachemap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile
--- a/arch/ppc/platforms/4xx/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ppc/platforms/4xx/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_REDWOOD_4)		+= ibmstb3.o
 obj-$(CONFIG_REDWOOD_5)		+= ibmstb4.o
 obj-$(CONFIG_NP405H)		+= ibmnp405h.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile
--- a/arch/ppc/platforms/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/ppc/platforms/Makefile	Sun Dec 15 18:08:33 2002
@@ -53,5 +53,3 @@
 obj-$(CONFIG_ALL_PPC)		+= pmac_smp.o chrp_smp.o
 obj-$(CONFIG_PPC_ISERIES)	+= iSeries_smp.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
--- a/arch/ppc/syslib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc/syslib/Makefile	Sun Dec 15 18:08:28 2002
@@ -62,7 +62,5 @@
 obj-$(CONFIG_8260)		+= m8260_setup.o ppc8260_pic.o
 obj-$(CONFIG_BOOTX_TEXT)	+= btext.o
 
-include $(TOPDIR)/Rules.make
-
 find_name : find_name.c
 	$(HOSTCC) $(HOSTCFLAGS) -o find_name find_name.c
diff -Nru a/arch/ppc/vmlinux.lds.S b/arch/ppc/vmlinux.lds.S
--- a/arch/ppc/vmlinux.lds.S	Sun Dec 15 18:08:33 2002
+++ b/arch/ppc/vmlinux.lds.S	Sun Dec 15 18:08:33 2002
@@ -103,6 +103,9 @@
   __setup_start = .;
   .init.setup : { *(.init.setup) }
   __setup_end = .;
+  __start___param = .;
+  __param : { *(__param) }
+  __stop___param = .;
   __initcall_start = .;
   .initcall.init : {
 	*(.initcall1.init) 
diff -Nru a/arch/ppc/xmon/Makefile b/arch/ppc/xmon/Makefile
--- a/arch/ppc/xmon/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc/xmon/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 obj-y		:= start.o
 endif
 obj-y		+= xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
--- a/arch/ppc64/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ppc64/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -38,6 +38,3 @@
 obj-$(CONFIG_PROFILING)	+= profile.o
 
 obj-y += prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/ppc64/lib/Makefile b/arch/ppc64/lib/Makefile
--- a/arch/ppc64/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc64/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 
 obj-y           := checksum.o dec_and_lock.o string.o strcase.o copypage.o \
 		   memcpy.o copyuser.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc64/mm/Makefile b/arch/ppc64/mm/Makefile
--- a/arch/ppc64/mm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/ppc64/mm/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 
 obj-y           := fault.o init.o extable.o imalloc.o
 obj-$(CONFIG_DISCONTIGMEM) += numa.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/ppc64/vmlinux.lds.S b/arch/ppc64/vmlinux.lds.S
--- a/arch/ppc64/vmlinux.lds.S	Sun Dec 15 18:08:30 2002
+++ b/arch/ppc64/vmlinux.lds.S	Sun Dec 15 18:08:30 2002
@@ -91,6 +91,9 @@
   __setup_start = .;
   .init.setup : { *(.init.setup) }
   __setup_end = .;
+  __start___param = .;
+  __param : { *(__param) }
+  __stop___param = .;
   __initcall_start = .;
   .initcall.init : {
 	*(.initcall1.init) 
diff -Nru a/arch/ppc64/xmon/Makefile b/arch/ppc64/xmon/Makefile
--- a/arch/ppc64/xmon/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/ppc64/xmon/Makefile	Sun Dec 15 18:08:32 2002
@@ -3,5 +3,3 @@
 EXTRA_CFLAGS = -mno-minimal-toc
 
 obj-y       := start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/s390/Makefile b/arch/s390/Makefile
--- a/arch/s390/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/s390/Makefile	Sun Dec 15 18:08:28 2002
@@ -20,36 +20,37 @@
 
 CFLAGS += -pipe -fno-strength-reduce
 
-HEAD := arch/s390/kernel/head.o arch/s390/kernel/init_task.o
+HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
 
-core-y				+= arch/s390/mm/ arch/s390/kernel/
-drivers-y			+= drivers/s390/
-drivers-$(CONFIG_MATHEMU)	+= arch/s390/math-emu/
-libs-y				+= arch/s390/lib/
+core-y		+= arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
+libs-y		+= arch/$(ARCH)/lib/
+drivers-y	+= drivers/s390/
+drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
+
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
 
 all: image listing
 
-makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
-BOOTIMAGE= arch/$(ARCH)/boot/image
+listing image: vmlinux
+	$(call makeboot,arch/$(ARCH)/boot/$@)
 
-listing install image: vmlinux
-	+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
+install: vmlinux
+	$(call makeboot, $@)
 
+archmrproper:
 archclean:
-	+@$(call makeboot,clean)
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
 
-archmrproper:
 
 prepare: include/asm-$(ARCH)/offsets.h
 
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
 
-include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
-	@$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
+	@$(generate-asm-offsets.h) < $< > $@.tmp
 	@$(update-if-changed)
 
 CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
diff -Nru a/arch/s390/boot/Makefile b/arch/s390/boot/Makefile
--- a/arch/s390/boot/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/s390/boot/Makefile	Sun Dec 15 18:08:33 2002
@@ -2,26 +2,19 @@
 # Makefile for the linux s390-specific parts of the memory manager.
 #
 
-EXTRA_AFLAGS := -traditional
+EXTRA_TARGETS := image listing
+EXTRA_AFLAGS  := -traditional
+quiet_cmd_listing = OBJDUMP $@
+      cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
+			       --disassemble-zeroes --reloc vmlinux > $@
 
-include $(TOPDIR)/Rules.make
-
-quiet_cmd_listing = OBJDUMP $(echo_target)
-cmd_listing	  = $(OBJDUMP) --disassemble --disassemble-all \
-			--disassemble-zeroes --reloc vmlinux > $@
-
-$(obj)/image: vmlinux
+$(obj)/image: vmlinux FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/listing: vmlinux
+$(obj)/listing: vmlinux FORCE
 	$(call if_changed,listing)
 
-image: $(obj)/image
-
-listing: $(obj)/listing
-
-clean:
-	rm -f $(obj)/image $(obj)/listing
 
-install: $(CONFIGURE) $(BOOTIMAGE)
-	sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
+install: $(CONFIGURE) $(obj)/image
+	sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
+	      System.map Kerntypes "$(INSTALL_PATH)"
diff -Nru a/arch/s390/defconfig b/arch/s390/defconfig
--- a/arch/s390/defconfig	Sun Dec 15 18:08:31 2002
+++ b/arch/s390/defconfig	Sun Dec 15 18:08:31 2002
@@ -321,6 +321,8 @@
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_DES is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
 # CONFIG_CRYPTO_TEST is not set
 
 #
diff -Nru a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
--- a/arch/s390/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/s390/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -17,5 +17,3 @@
 # Kernel debugging
 #
 obj-$(CONFIG_REMOTE_DEBUG)	+= gdb-stub.o #gdb-low.o 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
--- a/arch/s390/kernel/entry.S	Sun Dec 15 18:08:28 2002
+++ b/arch/s390/kernel/entry.S	Sun Dec 15 18:08:28 2002
@@ -47,7 +47,8 @@
 SP_TRAP      =  (SP_ORIG_R2+GPR_SIZE)
 SP_SIZE      =  (SP_TRAP+4)
 
-_TIF_WORK_MASK = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
+_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC)
+_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
 
 /*
  * Base Address of this Module --- saved in __LC_ENTRY_BASE
@@ -181,6 +182,7 @@
         GET_THREAD_INFO           # load pointer to task_struct to R9
 	sll	%r7,2
         stosm   24(%r15),0x03     # reenable interrupts
+sysc_do_restart:
         l       %r8,sys_call_table-entry_base(%r7,%r13) # get system call addr.
 	tm	__TI_flags+3(%r9),_TIF_SYSCALL_TRACE
         bo      BASED(sysc_tracesys)
@@ -191,7 +193,7 @@
 
 sysc_return:
 	stnsm   24(%r15),0xfc     # disable I/O and ext. interrupts
-	tm	__TI_flags+3(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+3(%r9),_TIF_WORK_SVC
 	bnz	BASED(sysc_work)  # there is work to do (signals etc.)
 sysc_leave:
         RESTORE_ALL 1
@@ -202,7 +204,7 @@
 sysc_work_loop:
 	stnsm   24(%r15),0xfc     # disable I/O and ext. interrupts
         GET_THREAD_INFO           # load pointer to task_struct to R9
-	tm	__TI_flags+3(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+3(%r9),_TIF_WORK_SVC
 	bz	BASED(sysc_leave)      # there is no work to do
 #
 # One of the work bits is on. Find out which one.
@@ -213,6 +215,8 @@
 	bo	BASED(sysc_reschedule)
 	tm	__TI_flags+3(%r9),_TIF_SIGPENDING
 	bo	BASED(sysc_sigpending)
+	tm	__TI_flags+3(%r9),_TIF_RESTART_SVC
+	bo	BASED(sysc_restart)
 	b	BASED(sysc_leave)
 
 #
@@ -237,14 +241,26 @@
 	b	BASED(sysc_leave)      # out of here, do NOT recheck
 
 #
+# _TIF_RESTART_SVC is set, set up registers and restart svc
+#
+sysc_restart:
+	ni	__TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
+	stosm	24(%r15),0x03          # reenable interrupts
+	l	%r7,SP_R2(%r15)        # load new svc number
+	sll	%r7,2
+	mvc	SP_R2(4,%r15),SP_ORIG_R2(%r15) # restore first argument
+	lm	%r2,%r6,SP_R2(%r15)    # load svc arguments
+	b	BASED(sysc_do_restart) # restart svc
+
+#
 # call trace before and after sys_call
 #
 sysc_tracesys:
         l       %r1,BASED(.Ltrace)
 	srl	%r7,2
-	st	%r7,SP_R2(4,%r15)
+	st	%r7,SP_R2(%r15)
 	basr	%r14,%r1
-	l	%r7,SP_R2(4,%r15)      # strace might have changed the 
+	l	%r7,SP_R2(%r15)        # strace might have changed the 
 	n	%r7,BASED(.Lc256)      #  system call
 	sll	%r7,2
 	l	%r8,sys_call_table-entry_base(%r7,%r13)
@@ -354,7 +370,7 @@
         .long  sys_write
         .long  sys_open                  /* 5 */
         .long  sys_close
-        .long  sys_ni_syscall           /* old waitpid syscall holder */
+        .long  sys_restart_syscall
         .long  sys_creat
         .long  sys_link
         .long  sys_unlink                /* 10 */
@@ -752,7 +768,7 @@
 #else
         bno     BASED(io_leave)        # no-> skip resched & signal
 #endif
-	tm	__TI_flags+3(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+3(%r9),_TIF_WORK_INT
 	bnz	BASED(io_work)         # there is work to do (signals etc.)
 io_leave:
         RESTORE_ALL 0
@@ -788,7 +804,7 @@
 io_work_loop:
         stnsm   24(%r15),0xfc          # disable I/O and ext. interrupts
         GET_THREAD_INFO                # load pointer to task_struct to R9
-	tm	__TI_flags+3(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+3(%r9),_TIF_WORK_INT
 	bz	BASED(io_leave)        # there is no work to do
 #
 # One of the work bits is on. Find out which one.
diff -Nru a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c
--- a/arch/s390/kernel/s390_ksyms.c	Sun Dec 15 18:08:29 2002
+++ b/arch/s390/kernel/s390_ksyms.c	Sun Dec 15 18:08:29 2002
@@ -59,3 +59,4 @@
 EXPORT_SYMBOL(console_mode);
 EXPORT_SYMBOL(console_device);
 EXPORT_SYMBOL_NOVERS(do_call_softirq);
+EXPORT_SYMBOL(sys_wait4);
diff -Nru a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
--- a/arch/s390/kernel/signal.c	Sun Dec 15 18:08:31 2002
+++ b/arch/s390/kernel/signal.c	Sun Dec 15 18:08:31 2002
@@ -397,6 +397,10 @@
 	if (regs->trap == __LC_SVC_OLD_PSW) {
 		/* If so, check system call restarting.. */
 		switch (regs->gprs[2]) {
+			case -ERESTART_RESTARTBLOCK:
+				current_thread_info()->restart_block.fn =
+					do_no_restart_syscall;
+				clear_thread_flag(TIF_RESTART_SVC);
 			case -ERESTARTNOHAND:
 				regs->gprs[2] = -EINTR;
 				break;
@@ -472,6 +476,11 @@
 		    regs->gprs[2] == -ERESTARTNOINTR) {
 			regs->gprs[2] = regs->orig_gpr2;
 			regs->psw.addr -= 2;
+		}
+		/* Restart the system call with a new system call number */
+		if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
+			regs->gprs[2] = __NR_restart_syscall;
+			set_thread_flag(TIF_RESTART_SVC);
 		}
 	}
 	return 0;
diff -Nru a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
--- a/arch/s390/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/s390/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,6 +7,3 @@
 EXTRA_AFLAGS := -traditional
 
 obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/s390/math-emu/Makefile b/arch/s390/math-emu/Makefile
--- a/arch/s390/math-emu/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/s390/math-emu/Makefile	Sun Dec 15 18:08:28 2002
@@ -4,9 +4,5 @@
 
 obj-$(CONFIG_MATHEMU) := math.o qrnnd.o
 
-EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
-EXTRA_AFLAGS	:= -traditional
-
-include $(TOPDIR)/Rules.make
-
-
+EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w
+EXTRA_AFLAGS := -traditional
diff -Nru a/arch/s390/mm/Makefile b/arch/s390/mm/Makefile
--- a/arch/s390/mm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/s390/mm/Makefile	Sun Dec 15 18:08:32 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y	 := init.o fault.o ioremap.o extable.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/s390x/Makefile b/arch/s390x/Makefile
--- a/arch/s390x/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/Makefile	Sun Dec 15 18:08:29 2002
@@ -21,35 +21,36 @@
 
 CFLAGS += -pipe -fno-strength-reduce
 
-HEAD := arch/s390x/kernel/head.o arch/s390x/kernel/init_task.o
+HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
 
-core-y		+= arch/s390x/mm/ arch/s390x/kernel/
+core-y		+= arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
+libs-y		+= arch/$(ARCH)/lib/
 drivers-y	+= drivers/s390/
-libs-y		+= arch/s390x/lib/
+
+
+makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
 
 all: image listing
 
-makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
-BOOTIMAGE= arch/$(ARCH)/boot/image
+listing image: vmlinux
+	$(call makeboot,arch/$(ARCH)/boot/$@)
 
-listing install image: vmlinux
-	+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
+install: vmlinux
+	$(call makeboot, $@)
 
+archmrproper:
 archclean:
-	+@$(call makeboot,clean)
+	$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
 
-archmrproper:
 
 prepare: include/asm-$(ARCH)/offsets.h
 
 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
 				   include/config/MARKER
 
-include/asm-$(ARCH)/offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
-	@$(generate-asm-offsets.h) < $< > $@
-
-include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
 	@echo -n '  Generating $@'
+	@$(generate-asm-offsets.h) < $< > $@.tmp
 	@$(update-if-changed)
 
 CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
diff -Nru a/arch/s390x/boot/Makefile b/arch/s390x/boot/Makefile
--- a/arch/s390x/boot/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/boot/Makefile	Sun Dec 15 18:08:29 2002
@@ -2,26 +2,20 @@
 # Makefile for the linux s390-specific parts of the memory manager.
 #
 
-EXTRA_AFLAGS := -traditional
+EXTRA_TARGETS := image listing
+EXTRA_AFLAGS  := -traditional
 
-include $(TOPDIR)/Rules.make
+quiet_cmd_listing = OBJDUMP $@
+      cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
+			       --disassemble-zeroes --reloc vmlinux > $@
 
-quiet_cmd_listing = OBJDUMP $(echo_target)
-cmd_listing	  = $(OBJDUMP) --disassemble --disassemble-all \
-			--disassemble-zeroes --reloc vmlinux > $@
-
-$(obj)/image: vmlinux
+$(obj)/image: vmlinux FORCE
 	$(call if_changed,objcopy)
 
-$(obj)/listing: vmlinux
+$(obj)/listing: vmlinux FORCE
 	$(call if_changed,listing)
 
-image: $(obj)/image
-
-listing: $(obj)/listing
-
-clean:
-	rm -f $(obj)/image $(obj)/listing
 
-install: $(CONFIGURE) $(BOOTIMAGE)
-	sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
+install: $(CONFIGURE) $(obj)/image
+	sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
+	      System.map Kerntypes "$(INSTALL_PATH)"
diff -Nru a/arch/s390x/defconfig b/arch/s390x/defconfig
--- a/arch/s390x/defconfig	Sun Dec 15 18:08:28 2002
+++ b/arch/s390x/defconfig	Sun Dec 15 18:08:28 2002
@@ -382,6 +382,8 @@
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_DES is not set
 # CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
 # CONFIG_CRYPTO_TEST is not set
 
 #
diff -Nru a/arch/s390x/kernel/Makefile b/arch/s390x/kernel/Makefile
--- a/arch/s390x/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -24,8 +24,6 @@
 					 exec32.o exec_domain32.o
 obj-$(CONFIG_BINFMT_ELF32)	+= binfmt_elf32.o
 
-include $(TOPDIR)/Rules.make
-
 #
 # This is just to get the dependencies...
 #
diff -Nru a/arch/s390x/kernel/entry.S b/arch/s390x/kernel/entry.S
--- a/arch/s390x/kernel/entry.S	Sun Dec 15 18:08:28 2002
+++ b/arch/s390x/kernel/entry.S	Sun Dec 15 18:08:28 2002
@@ -47,7 +47,8 @@
 SP_TRAP      =  (SP_ORIG_R2+GPR_SIZE)
 SP_SIZE      =  (SP_TRAP+4)
 
-_TIF_WORK_MASK = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
+_TIF_WORK_SVC = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_RESTART_SVC)
+_TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED)
 
 /*
  * Register usage in interrupt handlers:
@@ -161,6 +162,7 @@
 	llgh    %r7,__LC_SVC_INT_CODE # get svc number from lowcore
         GET_THREAD_INFO           # load pointer to task_struct to R9
 	stosm   48(%r15),0x03     # reenable interrupts
+sysc_do_restart:
 	larl    %r10,sys_call_table
         sll     %r7,3
         tm      SP_PSW+3(%r15),0x01  # are we running in 31 bit mode ?
@@ -177,7 +179,7 @@
 
 sysc_return:
 	stnsm   48(%r15),0xfc     # disable I/O and ext. interrupts
-	tm	__TI_flags+7(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+7(%r9),_TIF_WORK_SVC
 	jnz	sysc_work         # there is work to do (signals etc.)
 sysc_leave:
         RESTORE_ALL 1
@@ -188,7 +190,7 @@
 sysc_work_loop:
 	stnsm   48(%r15),0xfc     # disable I/O and ext. interrupts
         GET_THREAD_INFO           # load pointer to task_struct to R9
-	tm	__TI_flags+7(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+7(%r9),_TIF_WORK_SVC
 	jz	sysc_leave        # there is no work to do
 #
 # One of the work bits is on. Find out which one.
@@ -199,6 +201,8 @@
 	jo	sysc_reschedule
 	tm	__TI_flags+7(%r9),_TIF_SIGPENDING
 	jo	sysc_sigpending
+	tm	__TI_flags+7(%r9),_TIF_RESTART_SVC
+	jo	sysc_restart
 	j	sysc_leave
 
 #
@@ -221,6 +225,17 @@
 	j	sysc_leave        # out of here, do NOT recheck
 
 #
+# _TIF_RESTART_SVC is set, set up registers and restart svc
+#
+sysc_restart:
+	ni	__TI_flags+3(%r9),255-_TIF_RESTART_SVC # clear TIF_RESTART_SVC
+	stosm	48(%r15),0x03          # reenable interrupts
+	lg	%r7,SP_R2(%r15)        # load new svc number
+	mvc	SP_R2(8,%r15),SP_ORIG_R2(%r15) # restore first argument
+	lmg	%r2,%r6,SP_R2(%r15)    # load svc arguments
+	j	sysc_do_restart        # restart svc
+
+#
 # call syscall_trace before and after system call
 # special linkage: %r12 contains the return address for trace_svc
 #
@@ -383,7 +398,7 @@
         .long  SYSCALL(sys_write,sys32_write_wrapper)
         .long  SYSCALL(sys_open,sys32_open_wrapper)             /* 5 */
         .long  SYSCALL(sys_close,sys32_close_wrapper)
-        .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* old waitpid syscall */
+        .long  SYSCALL(sys_restart_syscall,sys_ni_syscall)
         .long  SYSCALL(sys_creat,sys32_creat_wrapper)
         .long  SYSCALL(sys_link,sys32_link_wrapper)
         .long  SYSCALL(sys_unlink,sys32_unlink_wrapper)         /* 10 */
@@ -777,7 +792,7 @@
 #else
         jno     io_leave               # no-> skip resched & signal
 #endif
-	tm	__TI_flags+7(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+7(%r9),_TIF_WORK_INT
 	jnz	io_work                # there is work to do (signals etc.)
 io_leave:
         RESTORE_ALL 0
@@ -813,7 +828,7 @@
 io_work_loop:
         stnsm   48(%r15),0xfc          # disable I/O and ext. interrupts
         GET_THREAD_INFO                # load pointer to task_struct to R9
-	tm	__TI_flags+7(%r9),_TIF_WORK_MASK
+	tm	__TI_flags+7(%r9),_TIF_WORK_INT
 	jz	io_leave               # there is no work to do
 #
 # One of the work bits is on. Find out which one.
diff -Nru a/arch/s390x/kernel/s390_ksyms.c b/arch/s390x/kernel/s390_ksyms.c
--- a/arch/s390x/kernel/s390_ksyms.c	Sun Dec 15 18:08:31 2002
+++ b/arch/s390x/kernel/s390_ksyms.c	Sun Dec 15 18:08:31 2002
@@ -83,3 +83,4 @@
 EXPORT_SYMBOL(console_mode);
 EXPORT_SYMBOL(console_device);
 EXPORT_SYMBOL_NOVERS(do_call_softirq);
+EXPORT_SYMBOL(sys_wait4);
diff -Nru a/arch/s390x/kernel/signal.c b/arch/s390x/kernel/signal.c
--- a/arch/s390x/kernel/signal.c	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/kernel/signal.c	Sun Dec 15 18:08:29 2002
@@ -391,6 +391,10 @@
 	if (regs->trap == __LC_SVC_OLD_PSW) {
 		/* If so, check system call restarting.. */
 		switch (regs->gprs[2]) {
+			case -ERESTART_RESTARTBLOCK:
+				current_thread_info()->restart_block.fn =
+					do_no_restart_syscall;
+				clear_thread_flag(TIF_RESTART_SVC);
 			case -ERESTARTNOHAND:
 				regs->gprs[2] = -EINTR;
 				break;
@@ -472,6 +476,11 @@
 		    regs->gprs[2] == -ERESTARTNOINTR) {
 			regs->gprs[2] = regs->orig_gpr2;
 			regs->psw.addr -= 2;
+		}
+		/* Restart the system call with a new system call number */
+		if (regs->gprs[2] == -ERESTART_RESTARTBLOCK) {
+			regs->gprs[2] = __NR_restart_syscall;
+			set_thread_flag(TIF_RESTART_SVC);
 		}
 	}
 	return 0;
diff -Nru a/arch/s390x/lib/Makefile b/arch/s390x/lib/Makefile
--- a/arch/s390x/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/s390x/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,6 +7,3 @@
 EXTRA_AFLAGS := -traditional
 
 obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/s390x/mm/Makefile b/arch/s390x/mm/Makefile
--- a/arch/s390x/mm/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/mm/Makefile	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,5 @@
 #
-# Makefile for the linux i386-specific parts of the memory manager.
+# Makefile for the linux s390-specific parts of the memory manager.
 #
 
 obj-y	 := init.o fault.o ioremap.o extable.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/s390x/mm/extable.c b/arch/s390x/mm/extable.c
--- a/arch/s390x/mm/extable.c	Sun Dec 15 18:08:29 2002
+++ b/arch/s390x/mm/extable.c	Sun Dec 15 18:08:29 2002
@@ -40,7 +40,6 @@
 unsigned long
 search_exception_table(unsigned long addr)
 {
-	struct list_head *i;
 	unsigned long ret = 0;
 	
 #ifndef CONFIG_MODULES
diff -Nru a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
--- a/arch/sh/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/sh/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -72,5 +72,3 @@
 ifeq ($(CONFIG_SH_GENERIC),y)
 obj-y		+= $(machine-specific-objs)
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile
--- a/arch/sh/lib/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/sh/lib/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 L_TARGET = lib.a
 obj-y  = delay.o memcpy.o memset.o memmove.o memchr.o \
 	 checksum.o strcasecmp.o strlen.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
--- a/arch/sh/mm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/sh/mm/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,5 +6,3 @@
 
 obj-$(CONFIG_CPU_SH3) += cache-sh3.o
 obj-$(CONFIG_CPU_SH4) += cache-sh4.o __clear_user_page-sh4.o __copy_user_page-sh4.o ioremap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sh/stboards/Makefile b/arch/sh/stboards/Makefile
--- a/arch/sh/stboards/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/sh/stboards/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y := irq.o setup.o mach.o led.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile
--- a/arch/sparc/boot/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/sparc/boot/Makefile	Sun Dec 15 18:08:32 2002
@@ -39,5 +39,3 @@
 
 btfix.o: btfix.s
 	$(CC) -c -o btfix.o btfix.s
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile
--- a/arch/sparc/kernel/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/sparc/kernel/Makefile	Sun Dec 15 18:08:32 2002
@@ -27,5 +27,3 @@
 ifdef CONFIG_SUNOS_EMUL
 obj-y += sys_sunos.o sunos_ioctl.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/lib/Makefile b/arch/sparc/lib/Makefile
--- a/arch/sparc/lib/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/sparc/lib/Makefile	Sun Dec 15 18:08:32 2002
@@ -11,5 +11,3 @@
 	 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
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/math-emu/Makefile b/arch/sparc/math-emu/Makefile
--- a/arch/sparc/math-emu/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/sparc/math-emu/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 
 EXTRA_AFLAGS := -ansi
 EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/mm/Makefile b/arch/sparc/mm/Makefile
--- a/arch/sparc/mm/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/sparc/mm/Makefile	Sun Dec 15 18:08:29 2002
@@ -21,5 +21,3 @@
 else
 obj-y   += sun4c.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc/prom/Makefile b/arch/sparc/prom/Makefile
--- a/arch/sparc/prom/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/sparc/prom/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 	 palloc.o ranges.o segment.o console.o printf.o tree.o
 
 obj-$(CONFIG_SUN4) += sun4prom.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/sparc64/kernel/Makefile b/arch/sparc64/kernel/Makefile
--- a/arch/sparc64/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/sparc64/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -36,7 +36,5 @@
   CMODEL_CFLAG := -m64 -mcmodel=medlow
 endif
 
-include $(TOPDIR)/Rules.make
-
 head.o: head.S ttable.S itlb_base.S dtlb_base.S dtlb_backend.S dtlb_prot.S \
 	etrap.S rtrap.S winfixup.S entry.S
diff -Nru a/arch/sparc64/vmlinux.lds.S b/arch/sparc64/vmlinux.lds.S
--- a/arch/sparc64/vmlinux.lds.S	Sun Dec 15 18:08:31 2002
+++ b/arch/sparc64/vmlinux.lds.S	Sun Dec 15 18:08:31 2002
@@ -51,6 +51,9 @@
   __setup_start = .;
   .init.setup : { *(.init.setup) }
   __setup_end = .;
+  __start___param = .;
+  __param : { *(__param) }
+  __stop___param = .;
   __initcall_start = .;
   .initcall.init : {
 	*(.initcall1.init) 
diff -Nru a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
--- a/arch/um/drivers/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/drivers/Makefile	Sun Dec 15 18:08:29 2002
@@ -60,8 +60,6 @@
 	null.o pty.o tty.o xterm.o
 USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/drivers/$(file))
 
-include $(TOPDIR)/Rules.make
-
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
 
diff -Nru a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
--- a/arch/um/kernel/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/kernel/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,7 +10,7 @@
 
 obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o
 
-# user_syms.o not included here because Rules.make has its own ideas about
+# user_syms.o not included here because kbuild has its own ideas about
 # building anything in export-objs
 
 USER_OBJS := $(filter %_user.o,$(obj-y)) config.o helper.o process.o \
@@ -38,8 +38,6 @@
 	-I/usr/include -I../include
 
 CFLAGS_frame.o := $(patsubst -fomit-frame-pointer,,$(USER_CFLAGS))
-
-include $(TOPDIR)/Rules.make
 
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
diff -Nru a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
--- a/arch/um/os-Linux/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/os-Linux/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,8 +7,6 @@
 
 USER_OBJS := $(foreach file,$(obj-y),arch/um/os-Linux/$(file))
 
-include $(TOPDIR)/Rules.make
-
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
 
diff -Nru a/arch/um/os-Linux/drivers/Makefile b/arch/um/os-Linux/drivers/Makefile
--- a/arch/um/os-Linux/drivers/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/os-Linux/drivers/Makefile	Sun Dec 15 18:08:29 2002
@@ -14,7 +14,5 @@
 
 USER_OBJS = $(filter %_user.o,$(obj-y) $(USER_SINGLE_OBJS))
 
-include $(TOPDIR)/Rules.make
-
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
diff -Nru a/arch/um/ptproxy/Makefile b/arch/um/ptproxy/Makefile
--- a/arch/um/ptproxy/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/ptproxy/Makefile	Sun Dec 15 18:08:29 2002
@@ -2,8 +2,6 @@
 
 USER_OBJS := $(foreach file,$(obj-y),arch/um/ptproxy/$(file))
 
-include $(TOPDIR)/Rules.make
-
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
 
diff -Nru a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile
--- a/arch/um/sys-i386/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/um/sys-i386/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,8 +10,6 @@
 
 SYMLINKS = semaphore.c checksum.S extable.c highmem.c
 
-include $(TOPDIR)/Rules.make
-
 $(USER_OBJS) : %.o: %.c
 	$(CC) $(CFLAGS_$@) $(USER_CFLAGS) -c -o $@ $<
 
diff -Nru a/arch/um/sys-i386/util/Makefile b/arch/um/sys-i386/util/Makefile
--- a/arch/um/sys-i386/util/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/um/sys-i386/util/Makefile	Sun Dec 15 18:08:32 2002
@@ -4,8 +4,6 @@
 
 mk_sc-objs	:= mk_sc.o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/mk_thread : $(obj)/mk_thread_kern.o $(obj)/mk_thread_user.o
 	$(CC) $(CFLAGS) -o $@ $^
 
diff -Nru a/arch/um/sys-ia64/Makefile b/arch/um/sys-ia64/Makefile
--- a/arch/um/sys-ia64/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/um/sys-ia64/Makefile	Sun Dec 15 18:08:28 2002
@@ -22,5 +22,3 @@
 	@$(MAKEBOOT) dep
 
 modules:
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/um/sys-ppc/Makefile b/arch/um/sys-ppc/Makefile
--- a/arch/um/sys-ppc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/um/sys-ppc/Makefile	Sun Dec 15 18:08:29 2002
@@ -76,5 +76,3 @@
 dep:
 
 modules:
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/um/util/Makefile b/arch/um/util/Makefile
--- a/arch/um/util/Makefile	Sun Dec 15 18:08:32 2002
+++ b/arch/um/util/Makefile	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,5 @@
 EXTRA_TARGETS := mk_task mk_task_kern.o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/mk_task: $(obj)/mk_task_user.o $(obj)/mk_task_kern.o
 	$(CC) -o $@ $^
 
diff -Nru a/arch/v850/Makefile b/arch/v850/Makefile
--- a/arch/v850/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/v850/Makefile	Sun Dec 15 18:08:33 2002
@@ -31,9 +31,6 @@
 libs-y += $(arch_dir)/lib/
 
 
-include $(TOPDIR)/Rules.make
-
-
 # Deal with the initial contents of the root device
 ifdef ROOT_FS_IMAGE
 core-y += root_fs_image.o
diff -Nru a/arch/v850/kernel/Makefile b/arch/v850/kernel/Makefile
--- a/arch/v850/kernel/Makefile	Sun Dec 15 18:08:33 2002
+++ b/arch/v850/kernel/Makefile	Sun Dec 15 18:08:33 2002
@@ -34,6 +34,3 @@
 # feature-specific code
 obj-$(CONFIG_V850E_MA1_HIGHRES_TIMER)	+= highres_timer.o
 obj-$(CONFIG_PROC_FS)		+= procfs.o
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/v850/lib/Makefile b/arch/v850/lib/Makefile
--- a/arch/v850/lib/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/v850/lib/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 L_TARGET = lib.a
 obj-y  = ashrdi3.o ashldi3.o lshrdi3.o muldi3.o negdi2.o \
 	 checksum.o memcpy.o memset.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
--- a/arch/x86_64/boot/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/x86_64/boot/Makefile	Sun Dec 15 18:08:29 2002
@@ -36,8 +36,6 @@
 
 boot: bzImage
 
-include $(TOPDIR)/Rules.make
-
 # ---------------------------------------------------------------------------
 
 $(obj)/zImage:  IMAGE_OFFSET := 0x1000
diff -Nru a/arch/x86_64/boot/compressed/Makefile b/arch/x86_64/boot/compressed/Makefile
--- a/arch/x86_64/boot/compressed/Makefile	Sun Dec 15 18:08:29 2002
+++ b/arch/x86_64/boot/compressed/Makefile	Sun Dec 15 18:08:29 2002
@@ -14,8 +14,6 @@
 CFLAGS := -m32 -D__KERNEL__ -I$(TOPDIR)/include -O2  
 LDFLAGS := -m elf_i386
 
-include $(TOPDIR)/Rules.make
-
 LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 -m elf_i386
 
 $(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE
diff -Nru a/arch/x86_64/ia32/Makefile b/arch/x86_64/ia32/Makefile
--- a/arch/x86_64/ia32/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/x86_64/ia32/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
 	ia32_signal.o \
 	ia32_binfmt.o fpu32.o socket32.o ptrace32.o ipc32.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
--- a/arch/x86_64/kernel/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/x86_64/kernel/Makefile	Sun Dec 15 18:08:30 2002
@@ -24,6 +24,3 @@
 obj-$(CONFIG_DUMMY_IOMMU) += pci-nommu.o
 
 EXTRA_AFLAGS := -traditional
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/arch/x86_64/lib/Makefile b/arch/x86_64/lib/Makefile
--- a/arch/x86_64/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/x86_64/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -17,5 +17,3 @@
 
 obj-$(CONFIG_IO_DEBUG) += iodebug.o
 obj-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/x86_64/mm/Makefile b/arch/x86_64/mm/Makefile
--- a/arch/x86_64/mm/Makefile	Sun Dec 15 18:08:30 2002
+++ b/arch/x86_64/mm/Makefile	Sun Dec 15 18:08:30 2002
@@ -5,5 +5,3 @@
 export-objs := pageattr.o
 
 obj-y	 := init.o fault.o ioremap.o extable.o modutil.o pageattr.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/arch/x86_64/pci/Makefile b/arch/x86_64/pci/Makefile
--- a/arch/x86_64/pci/Makefile	Sun Dec 15 18:08:28 2002
+++ b/arch/x86_64/pci/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 
 
 obj-y		+= irq.o common.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/crypto/Makefile b/crypto/Makefile
--- a/crypto/Makefile	Sun Dec 15 18:08:32 2002
+++ b/crypto/Makefile	Sun Dec 15 18:08:32 2002
@@ -22,5 +22,3 @@
 obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
 
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/Makefile b/drivers/Makefile
--- a/drivers/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/Makefile	Sun Dec 15 18:08:31 2002
@@ -44,5 +44,3 @@
 obj-$(CONFIG_HOTPLUG_PCI)	+= hotplug/
 obj-$(CONFIG_ISDN_BOOL)		+= isdn/
 obj-$(CONFIG_MCA)		+= mca/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acorn/block/Makefile b/drivers/acorn/block/Makefile
--- a/drivers/acorn/block/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/acorn/block/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 obj-$(CONFIG_BLK_DEV_FD1772)	+= fd1772_mod.o
 obj-$(CONFIG_BLK_DEV_MFM)	+= mfmhd_mod.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acorn/char/Makefile b/drivers/acorn/char/Makefile
--- a/drivers/acorn/char/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acorn/char/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,8 +8,6 @@
 obj-$(CONFIG_L7200_KEYB)	+= defkeymap-l7200.o keyb_l7200.o
 obj-y				+= $(obj-$(MACHINE))
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/defkeymap-acorn.o: $(obj)/defkeymap-acorn.c
 
 # Uncomment if you're changing the keymap and have an appropriate
diff -Nru a/drivers/acorn/net/Makefile b/drivers/acorn/net/Makefile
--- a/drivers/acorn/net/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/acorn/net/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 obj-$(CONFIG_ARM_ETHERH)	+= etherh.o
 obj-$(CONFIG_ARM_ETHER3)	+= ether3.o
 obj-$(CONFIG_ARM_ETHER1)	+= ether1.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acorn/scsi/Makefile b/drivers/acorn/scsi/Makefile
--- a/drivers/acorn/scsi/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acorn/scsi/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,5 +13,3 @@
 obj-$(CONFIG_SCSI_OAK1)		+= oak.o
 obj-$(CONFIG_SCSI_POWERTECSCSI)	+= powertec.o fas216.o queue.o msgqueue.o
 obj-$(CONFIG_SCSI_EESOXSCSI)	+= eesox.o fas216.o queue.o msgqueue.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/Makefile b/drivers/acpi/Makefile
--- a/drivers/acpi/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/Makefile	Sun Dec 15 18:08:32 2002
@@ -48,5 +48,3 @@
 obj-$(CONFIG_ACPI_NUMA)		+= numa.o
 obj-$(CONFIG_ACPI_TOSHIBA)	+= toshiba_acpi.o
 obj-$(CONFIG_ACPI_BUS)		+= scan.o 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/dispatcher/Makefile b/drivers/acpi/dispatcher/Makefile
--- a/drivers/acpi/dispatcher/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/dispatcher/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 	 dsinit.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/dispatcher/dsfield.c b/drivers/acpi/dispatcher/dsfield.c
--- a/drivers/acpi/dispatcher/dsfield.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/dispatcher/dsfield.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsfield - Dispatcher field routines
- *              $Revision: 69 $
+ *              $Revision: 70 $
  *
  *****************************************************************************/
 
@@ -242,7 +242,7 @@
 			/* Lookup the name */
 
 			status = acpi_ns_lookup (walk_state->scope_info,
-					  (NATIVE_CHAR *) &arg->named.name,
+					  (char *) &arg->named.name,
 					  info->field_type, ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
 					  walk_state, &info->field_node);
 			if (ACPI_FAILURE (status)) {
@@ -409,7 +409,7 @@
 
 		if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) {
 			status = acpi_ns_lookup (walk_state->scope_info,
-					  (NATIVE_CHAR *) &arg->named.name,
+					  (char *) &arg->named.name,
 					  type, ACPI_IMODE_LOAD_PASS1,
 					  ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_ERROR_IF_FOUND,
 					  walk_state, &node);
diff -Nru a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c
--- a/drivers/acpi/dispatcher/dsinit.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/dispatcher/dsinit.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsinit - Object initialization namespace walk
- *              $Revision: 2 $
+ *              $Revision: 4 $
  *
  *****************************************************************************/
 
@@ -106,7 +106,7 @@
 		/* Print a dot for each method unless we are going to print the entire pathname */
 
 		if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
-			acpi_os_printf (".");
+			ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
 		}
 
 		/*
diff -Nru a/drivers/acpi/dispatcher/dsmthdat.c b/drivers/acpi/dispatcher/dsmthdat.c
--- a/drivers/acpi/dispatcher/dsmthdat.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/dispatcher/dsmthdat.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dsmthdat - control method arguments and local variables
- *              $Revision: 67 $
+ *              $Revision: 68 $
  *
  ******************************************************************************/
 
diff -Nru a/drivers/acpi/dispatcher/dsobject.c b/drivers/acpi/dispatcher/dsobject.c
--- a/drivers/acpi/dispatcher/dsobject.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/dispatcher/dsobject.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dsobject - Dispatcher object management routines
- *              $Revision: 111 $
+ *              $Revision: 112 $
  *
  *****************************************************************************/
 
@@ -187,21 +187,21 @@
 	if (obj_desc->buffer.length == 0) {
 		obj_desc->buffer.pointer = NULL;
 		ACPI_REPORT_WARNING (("Buffer created with zero length in AML\n"));
-		return_ACPI_STATUS (AE_OK);
-	}
-
-	obj_desc->buffer.pointer = ACPI_MEM_CALLOCATE (
-			   obj_desc->buffer.length);
-	if (!obj_desc->buffer.pointer) {
-		acpi_ut_delete_object_desc (obj_desc);
-		return_ACPI_STATUS (AE_NO_MEMORY);
 	}
+	else {
+		obj_desc->buffer.pointer = ACPI_MEM_CALLOCATE (
+				   obj_desc->buffer.length);
+		if (!obj_desc->buffer.pointer) {
+			acpi_ut_delete_object_desc (obj_desc);
+			return_ACPI_STATUS (AE_NO_MEMORY);
+		}
 
-	/* Initialize buffer from the Byte_list (if present) */
+		/* Initialize buffer from the Byte_list (if present) */
 
-	if (byte_list) {
-		ACPI_MEMCPY (obj_desc->buffer.pointer, byte_list->named.data,
-				  byte_list_length);
+		if (byte_list) {
+			ACPI_MEMCPY (obj_desc->buffer.pointer, byte_list->named.data,
+					  byte_list_length);
+		}
 	}
 
 	obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;
diff -Nru a/drivers/acpi/dispatcher/dsutils.c b/drivers/acpi/dispatcher/dsutils.c
--- a/drivers/acpi/dispatcher/dsutils.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/dispatcher/dsutils.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: dsutils - Dispatcher utilities
- *              $Revision: 97 $
+ *              $Revision: 98 $
  *
  ******************************************************************************/
 
@@ -339,7 +339,7 @@
 	u32                     arg_index)
 {
 	acpi_status             status = AE_OK;
-	NATIVE_CHAR             *name_string;
+	char                    *name_string;
 	u32                     name_length;
 	acpi_operand_object     *obj_desc;
 	acpi_parse_object       *parent_op;
diff -Nru a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
--- a/drivers/acpi/dispatcher/dswexec.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/dispatcher/dswexec.c	Sun Dec 15 18:08:32 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: dswexec - Dispatcher method execution callbacks;
  *                        dispatch to interpreter.
- *              $Revision: 96 $
+ *              $Revision: 97 $
  *
  *****************************************************************************/
 
@@ -628,6 +628,13 @@
 		 */
 		acpi_ds_delete_result_if_not_used (op, walk_state->result_obj, walk_state);
 	}
+
+#if _UNDER_DEVELOPMENT
+
+	if (walk_state->parser_state.aml == walk_state->parser_state.aml_end) {
+		acpi_db_method_end (walk_state);
+	}
+#endif
 
 	/* Always clear the object stack */
 
diff -Nru a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
--- a/drivers/acpi/dispatcher/dswload.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/dispatcher/dswload.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dswload - Dispatcher namespace load callbacks
- *              $Revision: 80 $
+ *              $Revision: 82 $
  *
  *****************************************************************************/
 
@@ -108,7 +108,7 @@
 	acpi_namespace_node     *node;
 	acpi_status             status;
 	acpi_object_type        object_type;
-	NATIVE_CHAR             *path;
+	char                    *path;
 	u32                     flags;
 
 
@@ -423,7 +423,7 @@
 	acpi_namespace_node     *node;
 	acpi_status             status;
 	acpi_object_type        object_type;
-	NATIVE_CHAR             *buffer_ptr;
+	char                    *buffer_ptr;
 
 
 	ACPI_FUNCTION_TRACE ("Ds_load2_begin_op");
@@ -456,7 +456,7 @@
 		else {
 			/* Get name from the op */
 
-			buffer_ptr = (NATIVE_CHAR *) &op->named.name;
+			buffer_ptr = (char *) &op->named.name;
 		}
 	}
 	else {
diff -Nru a/drivers/acpi/dispatcher/dswstate.c b/drivers/acpi/dispatcher/dswstate.c
--- a/drivers/acpi/dispatcher/dswstate.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/acpi/dispatcher/dswstate.c	Sun Dec 15 18:08:31 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: dswstate - Dispatcher parse tree walk management routines
- *              $Revision: 71 $
+ *              $Revision: 73 $
  *
  *****************************************************************************/
 
@@ -719,7 +719,7 @@
 		return (NULL);
 	}
 
-	ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Ds_get_current_walk_state, =%p\n",
+	ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Current Walk_state %p\n",
 		thread->walk_state_list));
 
 	return (thread->walk_state_list);
diff -Nru a/drivers/acpi/events/Makefile b/drivers/acpi/events/Makefile
--- a/drivers/acpi/events/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/events/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 	 evgpe.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
--- a/drivers/acpi/events/evgpe.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/events/evgpe.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evgpe - General Purpose Event handling and dispatch
- *              $Revision: 1 $
+ *              $Revision: 3 $
  *
  *****************************************************************************/
 
@@ -92,14 +92,14 @@
 	 * If EITHER the register length OR the block address are zero, then that
 	 * particular block is not supported.
 	 */
-	if (acpi_gbl_FADT->Xgpe0_blk.register_bit_width && ACPI_GET_ADDRESS (acpi_gbl_FADT->Xgpe0_blk.address)) {
+	if (acpi_gbl_FADT->Xgpe0_blk.register_bit_width && acpi_gbl_FADT->Xgpe0_blk.address) {
 		/* GPE block 0 exists (has both length and address > 0) */
 
 		acpi_gbl_gpe_block_info[0].register_count = (u16) (acpi_gbl_FADT->Xgpe0_blk.register_bit_width / (ACPI_GPE_REGISTER_WIDTH * 2));
 		acpi_gbl_gpe_number_max               = (acpi_gbl_gpe_block_info[0].register_count * ACPI_GPE_REGISTER_WIDTH) - 1;
 	}
 
-	if (acpi_gbl_FADT->Xgpe1_blk.register_bit_width && ACPI_GET_ADDRESS (acpi_gbl_FADT->Xgpe1_blk.address)) {
+	if (acpi_gbl_FADT->Xgpe1_blk.register_bit_width && acpi_gbl_FADT->Xgpe1_blk.address) {
 		/* GPE block 1 exists (has both length and address > 0) */
 
 		acpi_gbl_gpe_block_info[1].register_count = (u16) (acpi_gbl_FADT->Xgpe1_blk.register_bit_width / (ACPI_GPE_REGISTER_WIDTH * 2));
@@ -205,11 +205,11 @@
 					   + (i * ACPI_GPE_REGISTER_WIDTH));
 
 			ACPI_STORE_ADDRESS (gpe_register_info->status_address.address,
-					   (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address)
+					   (acpi_gbl_gpe_block_info[gpe_block].block_address->address
 							  + i));
 
 			ACPI_STORE_ADDRESS (gpe_register_info->enable_address.address,
-					   (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address)
+					   (acpi_gbl_gpe_block_info[gpe_block].block_address->address
 							  + i
 							  + acpi_gbl_gpe_block_info[gpe_block].register_count));
 
@@ -253,8 +253,8 @@
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "GPE Block%d: %X registers at %8.8X%8.8X\n",
 				(s32) gpe_block, acpi_gbl_gpe_block_info[0].register_count,
-				ACPI_HIDWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address)),
-				ACPI_LODWORD (ACPI_GET_ADDRESS (acpi_gbl_gpe_block_info[gpe_block].block_address->address))));
+				ACPI_HIDWORD (acpi_gbl_gpe_block_info[gpe_block].block_address->address),
+				ACPI_LODWORD (acpi_gbl_gpe_block_info[gpe_block].block_address->address)));
 
 			ACPI_REPORT_INFO (("GPE Block%d defined as GPE%d to GPE%d\n",
 				(s32) gpe_block,
@@ -309,7 +309,7 @@
 {
 	u32                     gpe_number;
 	u32                     gpe_number_index;
-	NATIVE_CHAR             name[ACPI_NAME_SIZE + 1];
+	char                    name[ACPI_NAME_SIZE + 1];
 	u8                      type;
 	acpi_status             status;
 
@@ -476,8 +476,8 @@
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
 			"GPE block at %8.8X%8.8X - Values: Enable %02X Status %02X\n",
-			ACPI_HIDWORD (ACPI_GET_ADDRESS (gpe_register_info->enable_address.address)),
-			ACPI_LODWORD (ACPI_GET_ADDRESS (gpe_register_info->enable_address.address)),
+			ACPI_HIDWORD (gpe_register_info->enable_address.address),
+			ACPI_LODWORD (gpe_register_info->enable_address.address),
 			gpe_register_info->enable,
 			gpe_register_info->status));
 
diff -Nru a/drivers/acpi/events/evmisc.c b/drivers/acpi/events/evmisc.c
--- a/drivers/acpi/events/evmisc.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/events/evmisc.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: evmisc - Miscellaneous event manager support functions
- *              $Revision: 59 $
+ *              $Revision: 60 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/Makefile b/drivers/acpi/executer/Makefile
--- a/drivers/acpi/executer/Makefile	Sun Dec 15 18:08:30 2002
+++ b/drivers/acpi/executer/Makefile	Sun Dec 15 18:08:30 2002
@@ -8,5 +8,3 @@
 	 exdump.o    exmutex.o  exoparg3.o  exresnte.o  exstoren.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/executer/exconvrt.c b/drivers/acpi/executer/exconvrt.c
--- a/drivers/acpi/executer/exconvrt.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/executer/exconvrt.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exconvrt - Object conversion routines
- *              $Revision: 45 $
+ *              $Revision: 47 $
  *
  *****************************************************************************/
 
@@ -274,6 +274,7 @@
  * PARAMETERS:  Integer         - Value to be converted
  *              Base            - 10 or 16
  *              String          - Where the string is returned
+ *              Data_width      - Size of data item to be converted
  *
  * RETURN:      Actual string length
  *
@@ -285,7 +286,8 @@
 acpi_ex_convert_to_ascii (
 	acpi_integer            integer,
 	u32                     base,
-	u8                      *string)
+	u8                      *string,
+	u8                      data_width)
 {
 	u32                     i;
 	u32                     j;
@@ -293,12 +295,21 @@
 	char                    hex_digit;
 	acpi_integer            digit;
 	u32                     remainder;
-	u32                     length = sizeof (acpi_integer);
-	u8                      leading_zero = TRUE;
+	u32                     length;
+	u8                      leading_zero;
 
 
 	ACPI_FUNCTION_ENTRY ();
 
+	if (data_width < sizeof (acpi_integer)) {
+		leading_zero = FALSE;
+		length = data_width;
+	}
+	else {
+		leading_zero = TRUE;
+		length = sizeof (acpi_integer);
+	}
+
 
 	switch (base) {
 	case 10:
@@ -357,8 +368,8 @@
 		string [0] = ACPI_ASCII_ZERO;
 		k = 1;
 	}
-	string [k] = 0;
 
+	string [k] = 0;
 	return (k);
 }
 
@@ -437,7 +448,7 @@
 
 		/* Convert */
 
-		i = acpi_ex_convert_to_ascii (obj_desc->integer.value, base, new_buf);
+		i = acpi_ex_convert_to_ascii (obj_desc->integer.value, base, new_buf, sizeof (acpi_integer));
 
 		/* Null terminate at the correct place */
 
@@ -495,7 +506,7 @@
 		pointer = obj_desc->buffer.pointer;
 		index = 0;
 		for (i = 0, index = 0; i < obj_desc->buffer.length; i++) {
-			index = acpi_ex_convert_to_ascii ((acpi_integer) pointer[i], base, &new_buf[index]);
+			index += acpi_ex_convert_to_ascii ((acpi_integer) pointer[i], base, &new_buf[index], 1);
 
 			new_buf[index] = ' ';
 			index++;
diff -Nru a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
--- a/drivers/acpi/executer/excreate.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/executer/excreate.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: excreate - Named object creation
- *              $Revision: 97 $
+ *              $Revision: 98 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
--- a/drivers/acpi/executer/exdump.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/executer/exdump.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exdump - Interpreter debug output routines
- *              $Revision: 163 $
+ *              $Revision: 164 $
  *
  *****************************************************************************/
 
@@ -386,10 +386,10 @@
 acpi_ex_dump_operands (
 	acpi_operand_object     **operands,
 	acpi_interpreter_mode   interpreter_mode,
-	NATIVE_CHAR             *ident,
+	char                    *ident,
 	u32                     num_levels,
-	NATIVE_CHAR             *note,
-	NATIVE_CHAR             *module_name,
+	char                    *note,
+	char                    *module_name,
 	u32                     line_number)
 {
 	NATIVE_UINT             i;
diff -Nru a/drivers/acpi/executer/exfield.c b/drivers/acpi/executer/exfield.c
--- a/drivers/acpi/executer/exfield.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/executer/exfield.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exfield - ACPI AML (p-code) execution - field manipulation
- *              $Revision: 116 $
+ *              $Revision: 117 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
--- a/drivers/acpi/executer/exfldio.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/executer/exfldio.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exfldio - Aml Field I/O
- *              $Revision: 90 $
+ *              $Revision: 91 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exmisc.c b/drivers/acpi/executer/exmisc.c
--- a/drivers/acpi/executer/exmisc.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/acpi/executer/exmisc.c	Sun Dec 15 18:08:31 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
- *              $Revision: 113 $
+ *              $Revision: 114 $
  *
  *****************************************************************************/
 
@@ -225,7 +225,7 @@
 	u32                     i;
 	acpi_integer            this_integer;
 	acpi_operand_object     *return_desc;
-	NATIVE_CHAR             *new_buf;
+	char                    *new_buf;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -249,13 +249,13 @@
 			return (AE_NO_MEMORY);
 		}
 
-		new_buf = (NATIVE_CHAR *) return_desc->buffer.pointer;
+		new_buf = (char *) return_desc->buffer.pointer;
 
 		/* Convert the first integer */
 
 		this_integer = obj_desc1->integer.value;
 		for (i = 0; i < acpi_gbl_integer_byte_width; i++) {
-			new_buf[i] = (NATIVE_CHAR) this_integer;
+			new_buf[i] = (char) this_integer;
 			this_integer >>= 8;
 		}
 
@@ -263,7 +263,7 @@
 
 		this_integer = obj_desc2->integer.value;
 		for (; i < (ACPI_MUL_2 (acpi_gbl_integer_byte_width)); i++) {
-			new_buf[i] = (NATIVE_CHAR) this_integer;
+			new_buf[i] = (char) this_integer;
 			this_integer >>= 8;
 		}
 
@@ -315,7 +315,7 @@
 			return (AE_NO_MEMORY);
 		}
 
-		new_buf = (NATIVE_CHAR *) return_desc->buffer.pointer;
+		new_buf = (char *) return_desc->buffer.pointer;
 
 		/* Concatenate the buffers */
 
diff -Nru a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
--- a/drivers/acpi/executer/exmutex.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/acpi/executer/exmutex.c	Sun Dec 15 18:08:31 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exmutex - ASL Mutex Acquire/Release functions
- *              $Revision: 16 $
+ *              $Revision: 17 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exnames.c b/drivers/acpi/executer/exnames.c
--- a/drivers/acpi/executer/exnames.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/executer/exnames.c	Sun Dec 15 18:08:29 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exnames - interpreter/scanner name load/execute
- *              $Revision: 92 $
+ *              $Revision: 93 $
  *
  *****************************************************************************/
 
@@ -57,13 +57,13 @@
  *
  ******************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ex_allocate_name_string (
 	u32                     prefix_count,
 	u32                     num_name_segs)
 {
-	NATIVE_CHAR             *temp_ptr;
-	NATIVE_CHAR             *name_string;
+	char                    *temp_ptr;
+	char                    *name_string;
 	u32                      size_needed;
 
 	ACPI_FUNCTION_TRACE ("Ex_allocate_name_string");
@@ -145,7 +145,7 @@
 acpi_status
 acpi_ex_name_segment (
 	u8                      **in_aml_address,
-	NATIVE_CHAR             *name_string)
+	char                    *name_string)
 {
 	char                    *aml_address = (void *) *in_aml_address;
 	acpi_status             status = AE_OK;
@@ -233,12 +233,12 @@
 acpi_ex_get_name_string (
 	acpi_object_type        data_type,
 	u8                      *in_aml_address,
-	NATIVE_CHAR             **out_name_string,
+	char                    **out_name_string,
 	u32                     *out_name_length)
 {
 	acpi_status             status = AE_OK;
 	u8                      *aml_address = in_aml_address;
-	NATIVE_CHAR             *name_string = NULL;
+	char                    *name_string = NULL;
 	u32                     num_segments;
 	u32                     prefix_count = 0;
 	u8                      has_prefix = FALSE;
diff -Nru a/drivers/acpi/executer/exoparg2.c b/drivers/acpi/executer/exoparg2.c
--- a/drivers/acpi/executer/exoparg2.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/executer/exoparg2.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: exoparg2 - AML execution - opcodes with 2 arguments
- *              $Revision: 115 $
+ *              $Revision: 116 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exresolv.c b/drivers/acpi/executer/exresolv.c
--- a/drivers/acpi/executer/exresolv.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/executer/exresolv.c	Sun Dec 15 18:08:29 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exresolv - AML Interpreter object resolution
- *              $Revision: 117 $
+ *              $Revision: 118 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/executer/exstoren.c b/drivers/acpi/executer/exstoren.c
--- a/drivers/acpi/executer/exstoren.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/executer/exstoren.c	Sun Dec 15 18:08:28 2002
@@ -3,7 +3,7 @@
  *
  * Module Name: exstoren - AML Interpreter object store support,
  *                        Store to Node (namespace object)
- *              $Revision: 52 $
+ *              $Revision: 54 $
  *
  *****************************************************************************/
 
@@ -181,7 +181,7 @@
 	acpi_status             status = AE_OK;
 
 
-	ACPI_FUNCTION_TRACE_PTR ("Acpi_ex_store_object_to_object", source_desc);
+	ACPI_FUNCTION_TRACE_PTR ("Ex_store_object_to_object", source_desc);
 
 
 	actual_src_desc = source_desc;
diff -Nru a/drivers/acpi/executer/exstorob.c b/drivers/acpi/executer/exstorob.c
--- a/drivers/acpi/executer/exstorob.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/executer/exstorob.c	Sun Dec 15 18:08:32 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exstorob - AML Interpreter object store support, store to object
- *              $Revision: 47 $
+ *              $Revision: 49 $
  *
  *****************************************************************************/
 
@@ -55,7 +55,7 @@
 	u8                      *buffer;
 
 
-	ACPI_FUNCTION_NAME ("Ex_store_buffer_to_buffer");
+	ACPI_FUNCTION_TRACE_PTR ("Ex_store_buffer_to_buffer", source_desc);
 
 
 	/*
@@ -72,7 +72,7 @@
 		(target_desc->common.flags & AOPOBJ_STATIC_POINTER)) {
 		target_desc->buffer.pointer = ACPI_MEM_ALLOCATE (length);
 		if (!target_desc->buffer.pointer) {
-			return (AE_NO_MEMORY);
+			return_ACPI_STATUS (AE_NO_MEMORY);
 		}
 
 		target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
@@ -103,7 +103,7 @@
 	/* Copy flags */
 
 	target_desc->buffer.flags = source_desc->buffer.flags;
-	return (AE_OK);
+	return_ACPI_STATUS (AE_OK);
 }
 
 
@@ -129,7 +129,7 @@
 	u8                      *buffer;
 
 
-	ACPI_FUNCTION_ENTRY ();
+	ACPI_FUNCTION_TRACE_PTR ("Ex_store_string_to_string", source_desc);
 
 
 	/*
@@ -166,7 +166,7 @@
 
 		target_desc->string.pointer = ACPI_MEM_CALLOCATE ((ACPI_SIZE) length + 1);
 		if (!target_desc->string.pointer) {
-			return (AE_NO_MEMORY);
+			return_ACPI_STATUS (AE_NO_MEMORY);
 		}
 
 		target_desc->common.flags &= ~AOPOBJ_STATIC_POINTER;
@@ -176,7 +176,7 @@
 	/* Set the new target length */
 
 	target_desc->string.length = length;
-	return (AE_OK);
+	return_ACPI_STATUS (AE_OK);
 }
 
 
diff -Nru a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c
--- a/drivers/acpi/executer/exutils.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/executer/exutils.c	Sun Dec 15 18:08:28 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: exutils - interpreter/scanner utilities
- *              $Revision: 106 $
+ *              $Revision: 107 $
  *
  *****************************************************************************/
 
@@ -298,7 +298,7 @@
 void
 acpi_ex_eisa_id_to_string (
 	u32                     numeric_id,
-	NATIVE_CHAR             *out_string)
+	char                    *out_string)
 {
 	u32                     eisa_id;
 
@@ -335,7 +335,7 @@
 void
 acpi_ex_unsigned_integer_to_string (
 	acpi_integer            value,
-	NATIVE_CHAR             *out_string)
+	char                    *out_string)
 {
 	u32                     count;
 	u32                     digits_needed;
@@ -351,7 +351,7 @@
 
 	for (count = digits_needed; count > 0; count--) {
 		(void) acpi_ut_short_divide (&value, 10, &quotient, &remainder);
-		out_string[count-1] = (NATIVE_CHAR) ('0' + remainder);\
+		out_string[count-1] = (char) ('0' + remainder);\
 		value = quotient;
 	}
 }
diff -Nru a/drivers/acpi/hardware/Makefile b/drivers/acpi/hardware/Makefile
--- a/drivers/acpi/hardware/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/hardware/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,5 +5,3 @@
 obj-y := hwacpi.o  hwgpe.o  hwregs.o  hwsleep.o  hwtimer.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c
--- a/drivers/acpi/hardware/hwacpi.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/hardware/hwacpi.c	Sun Dec 15 18:08:28 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
- *              $Revision: 60 $
+ *              $Revision: 61 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
--- a/drivers/acpi/hardware/hwregs.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/acpi/hardware/hwregs.c	Sun Dec 15 18:08:31 2002
@@ -3,7 +3,7 @@
  *
  * Module Name: hwregs - Read/write access functions for the various ACPI
  *                       control and status registers.
- *              $Revision: 137 $
+ *              $Revision: 138 $
  *
  ******************************************************************************/
 
@@ -58,7 +58,7 @@
 
 	ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %04X\n",
 		ACPI_BITMASK_ALL_FIXED_STATUS,
-		(u16) ACPI_GET_ADDRESS (acpi_gbl_FADT->Xpm1a_evt_blk.address)));
+		(u16) acpi_gbl_FADT->Xpm1a_evt_blk.address));
 
 
 	status = acpi_ut_acquire_mutex (ACPI_MTX_HARDWARE);
@@ -74,7 +74,7 @@
 
 	/* Clear the fixed events */
 
-	if (ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xpm1b_evt_blk.address)) {
+	if (acpi_gbl_FADT->Xpm1b_evt_blk.address) {
 		status = acpi_hw_low_level_write (16, ACPI_BITMASK_ALL_FIXED_STATUS,
 				 &acpi_gbl_FADT->Xpm1b_evt_blk, 0);
 		if (ACPI_FAILURE (status)) {
@@ -139,7 +139,7 @@
 	/*
 	 * Evaluate the namespace object containing the values for this state
 	 */
-	status = acpi_ns_evaluate_by_name ((NATIVE_CHAR *) acpi_gbl_db_sleep_states[sleep_state],
+	status = acpi_ns_evaluate_by_name ((char *) acpi_gbl_db_sleep_states[sleep_state],
 			  NULL, &obj_desc);
 	if (ACPI_FAILURE (status)) {
 		ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating Sleep_state [%s]\n",
@@ -403,16 +403,16 @@
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
 			register_value,
-			ACPI_HIDWORD (ACPI_GET_ADDRESS (acpi_gbl_FADT->Xpm2_cnt_blk.address)),
-			ACPI_LODWORD (ACPI_GET_ADDRESS (acpi_gbl_FADT->Xpm2_cnt_blk.address))));
+			ACPI_HIDWORD (acpi_gbl_FADT->Xpm2_cnt_blk.address),
+			ACPI_LODWORD (acpi_gbl_FADT->Xpm2_cnt_blk.address)));
 
 		ACPI_REGISTER_INSERT_VALUE (register_value, bit_reg_info->bit_position,
 				bit_reg_info->access_bit_mask, value);
 
 		ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
 			register_value,
-			ACPI_HIDWORD (ACPI_GET_ADDRESS (acpi_gbl_FADT->Xpm2_cnt_blk.address)),
-			ACPI_LODWORD (ACPI_GET_ADDRESS (acpi_gbl_FADT->Xpm2_cnt_blk.address))));
+			ACPI_HIDWORD (acpi_gbl_FADT->Xpm2_cnt_blk.address),
+			ACPI_LODWORD (acpi_gbl_FADT->Xpm2_cnt_blk.address)));
 
 		status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,
 				   ACPI_REGISTER_PM2_CONTROL, (u8) (register_value));
@@ -700,7 +700,7 @@
 	 * because the PM1A/B code must not fail if B isn't present.
 	 */
 	if ((!reg) ||
-		(!ACPI_VALID_ADDRESS (reg->address))) {
+		(!reg->address)) {
 		return (AE_OK);
 	}
 	*value = 0;
@@ -712,7 +712,7 @@
 	switch (reg->address_space_id) {
 	case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 
-		mem_address = (ACPI_GET_ADDRESS (reg->address)
+		mem_address = (reg->address
 				  + (ACPI_PHYSICAL_ADDRESS) offset);
 
 		status = acpi_os_read_memory (mem_address, value, width);
@@ -721,7 +721,7 @@
 
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 
-		io_address = (ACPI_IO_ADDRESS) (ACPI_GET_ADDRESS (reg->address)
+		io_address = (ACPI_IO_ADDRESS) (reg->address
 				   + (ACPI_PHYSICAL_ADDRESS) offset);
 
 		status = acpi_os_read_port (io_address, value, width);
@@ -732,9 +732,9 @@
 
 		pci_id.segment = 0;
 		pci_id.bus     = 0;
-		pci_id.device  = ACPI_PCI_DEVICE (ACPI_GET_ADDRESS (reg->address));
-		pci_id.function = ACPI_PCI_FUNCTION (ACPI_GET_ADDRESS (reg->address));
-		pci_register   = (u16) (ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (reg->address))
+		pci_id.device  = ACPI_PCI_DEVICE (reg->address);
+		pci_id.function = ACPI_PCI_FUNCTION (reg->address);
+		pci_register   = (u16) (ACPI_PCI_REGISTER (reg->address)
 				  + offset);
 
 		status = acpi_os_read_pci_configuration (&pci_id, pci_register, value, width);
@@ -790,7 +790,7 @@
 	 * because the PM1A/B code must not fail if B isn't present.
 	 */
 	if ((!reg) ||
-		(!ACPI_VALID_ADDRESS (reg->address))) {
+		(!reg->address)) {
 		return (AE_OK);
 	}
 	/*
@@ -800,7 +800,7 @@
 	switch (reg->address_space_id) {
 	case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 
-		mem_address = (ACPI_GET_ADDRESS (reg->address)
+		mem_address = (reg->address
 				  + (ACPI_PHYSICAL_ADDRESS) offset);
 
 		status = acpi_os_write_memory (mem_address, (acpi_integer) value, width);
@@ -809,7 +809,7 @@
 
 	case ACPI_ADR_SPACE_SYSTEM_IO:
 
-		io_address = (ACPI_IO_ADDRESS) (ACPI_GET_ADDRESS (reg->address)
+		io_address = (ACPI_IO_ADDRESS) (reg->address
 				   + (ACPI_PHYSICAL_ADDRESS) offset);
 
 		status = acpi_os_write_port (io_address, (acpi_integer) value, width);
@@ -820,9 +820,9 @@
 
 		pci_id.segment = 0;
 		pci_id.bus     = 0;
-		pci_id.device  = ACPI_PCI_DEVICE (ACPI_GET_ADDRESS (reg->address));
-		pci_id.function = ACPI_PCI_FUNCTION (ACPI_GET_ADDRESS (reg->address));
-		pci_register   = (u16) (ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (reg->address))
+		pci_id.device  = ACPI_PCI_DEVICE (reg->address);
+		pci_id.function = ACPI_PCI_FUNCTION (reg->address);
+		pci_register   = (u16) (ACPI_PCI_REGISTER (reg->address)
 				  + offset);
 
 		status = acpi_os_write_pci_configuration (&pci_id, pci_register, (acpi_integer) value, width);
diff -Nru a/drivers/acpi/include/acconfig.h b/drivers/acpi/include/acconfig.h
--- a/drivers/acpi/include/acconfig.h	Sun Dec 15 18:08:30 2002
+++ b/drivers/acpi/include/acconfig.h	Sun Dec 15 18:08:30 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acconfig.h - Global configuration constants
- *       $Revision: 122 $
+ *       $Revision: 123 $
  *
  *****************************************************************************/
 
@@ -54,7 +54,7 @@
 
 /* Version string */
 
-#define ACPI_CA_VERSION                 0x20021205
+#define ACPI_CA_VERSION                 0x20021212
 
 /* Version of ACPI supported */
 
diff -Nru a/drivers/acpi/include/acdebug.h b/drivers/acpi/include/acdebug.h
--- a/drivers/acpi/include/acdebug.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acdebug.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acdebug.h - ACPI/AML debugger
- *       $Revision: 64 $
+ *       $Revision: 65 $
  *
  *****************************************************************************/
 
@@ -31,7 +31,7 @@
 
 typedef struct command_info
 {
-	NATIVE_CHAR             *name;          /* Command Name */
+	char                    *name;          /* Command Name */
 	u8                      min_args;       /* Minimum arguments required */
 
 } COMMAND_INFO;
@@ -39,7 +39,7 @@
 
 typedef struct argument_info
 {
-	NATIVE_CHAR             *name;          /* Argument Name */
+	char                    *name;          /* Argument Name */
 
 } ARGUMENT_INFO;
 
@@ -83,16 +83,16 @@
 
 void
 acpi_db_display_table_info (
-	NATIVE_CHAR             *table_arg);
+	char                    *table_arg);
 
 void
 acpi_db_unload_acpi_table (
-	NATIVE_CHAR             *table_arg,
-	NATIVE_CHAR             *instance_arg);
+	char                    *table_arg,
+	char                    *instance_arg);
 
 void
 acpi_db_set_method_breakpoint (
-	NATIVE_CHAR             *location,
+	char                    *location,
 	acpi_walk_state         *walk_state,
 	acpi_parse_object       *op);
 
@@ -102,46 +102,46 @@
 
 void
 acpi_db_disassemble_aml (
-	NATIVE_CHAR             *statements,
+	char                    *statements,
 	acpi_parse_object       *op);
 
 void
 acpi_db_dump_namespace (
-	NATIVE_CHAR             *start_arg,
-	NATIVE_CHAR             *depth_arg);
+	char                    *start_arg,
+	char                    *depth_arg);
 
 void
 acpi_db_dump_namespace_by_owner (
-	NATIVE_CHAR             *owner_arg,
-	NATIVE_CHAR             *depth_arg);
+	char                    *owner_arg,
+	char                    *depth_arg);
 
 void
 acpi_db_send_notify (
-	NATIVE_CHAR             *name,
+	char                    *name,
 	u32                     value);
 
 void
 acpi_db_set_method_data (
-	NATIVE_CHAR             *type_arg,
-	NATIVE_CHAR             *index_arg,
-	NATIVE_CHAR             *value_arg);
+	char                    *type_arg,
+	char                    *index_arg,
+	char                    *value_arg);
 
 acpi_status
 acpi_db_display_objects (
-	NATIVE_CHAR             *obj_type_arg,
-	NATIVE_CHAR             *display_count_arg);
+	char                    *obj_type_arg,
+	char                    *display_count_arg);
 
 acpi_status
 acpi_db_find_name_in_namespace (
-	NATIVE_CHAR             *name_arg);
+	char                    *name_arg);
 
 void
 acpi_db_set_scope (
-	NATIVE_CHAR             *name);
+	char                    *name);
 
 void
 acpi_db_find_references (
-	NATIVE_CHAR             *object_arg);
+	char                    *object_arg);
 
 void
 acpi_db_display_locks (void);
@@ -149,7 +149,7 @@
 
 void
 acpi_db_display_resources (
-	NATIVE_CHAR             *object_arg);
+	char                    *object_arg);
 
 void
 acpi_db_check_integrity (
@@ -194,8 +194,8 @@
 
 void
 acpi_db_decode_and_display_object (
-	NATIVE_CHAR             *target,
-	NATIVE_CHAR             *output_type);
+	char                    *target,
+	char                    *output_type);
 
 void
 acpi_db_decode_node (
@@ -208,7 +208,7 @@
 
 acpi_status
 acpi_db_display_all_methods (
-	NATIVE_CHAR             *display_count_arg);
+	char                    *display_count_arg);
 
 void
 acpi_db_display_internal_object (
@@ -255,15 +255,15 @@
 
 void
 acpi_db_execute (
-	NATIVE_CHAR             *name,
-	NATIVE_CHAR             **args,
+	char                    *name,
+	char                    **args,
 	u32                     flags);
 
 void
 acpi_db_create_execution_threads (
-	NATIVE_CHAR             *num_threads_arg,
-	NATIVE_CHAR             *num_loops_arg,
-	NATIVE_CHAR             *method_name_arg);
+	char                    *num_threads_arg,
+	char                    *num_loops_arg,
+	char                    *method_name_arg);
 
 acpi_status
 acpi_db_execute_method (
@@ -289,7 +289,7 @@
 
 acpi_object_type
 acpi_db_match_argument (
-	NATIVE_CHAR             *user_argument,
+	char                    *user_argument,
 	ARGUMENT_INFO           *arguments);
 
 acpi_status
@@ -302,15 +302,15 @@
 
 void
 acpi_db_open_debug_file (
-	NATIVE_CHAR             *name);
+	char                    *name);
 
 acpi_status
 acpi_db_load_acpi_table (
-	NATIVE_CHAR             *filename);
+	char                    *filename);
 
 acpi_status
 acpi_db_get_acpi_table (
-	NATIVE_CHAR             *filename);
+	char                    *filename);
 
 /*
  * dbhistry - debugger HISTORY command
@@ -318,14 +318,14 @@
 
 void
 acpi_db_add_to_history (
-	NATIVE_CHAR             *command_line);
+	char                    *command_line);
 
 void
 acpi_db_display_history (void);
 
-NATIVE_CHAR *
+char *
 acpi_db_get_from_history (
-	NATIVE_CHAR             *command_num_arg);
+	char                    *command_num_arg);
 
 
 /*
@@ -334,7 +334,7 @@
 
 acpi_status
 acpi_db_command_dispatch (
-	NATIVE_CHAR             *input_buffer,
+	char                    *input_buffer,
 	acpi_walk_state         *walk_state,
 	acpi_parse_object       *op);
 
@@ -344,25 +344,25 @@
 
 acpi_status
 acpi_db_user_commands (
-	NATIVE_CHAR             prompt,
+	char                    prompt,
 	acpi_parse_object       *op);
 
 void
 acpi_db_display_help (
-	NATIVE_CHAR             *help_type);
+	char                    *help_type);
 
-NATIVE_CHAR *
+char *
 acpi_db_get_next_token (
-	NATIVE_CHAR             *string,
-	NATIVE_CHAR             **next);
+	char                    *string,
+	char                    **next);
 
 u32
 acpi_db_get_line (
-	NATIVE_CHAR             *input_buffer);
+	char                    *input_buffer);
 
 u32
 acpi_db_match_command (
-	NATIVE_CHAR             *user_command);
+	char                    *user_command);
 
 void
 acpi_db_single_thread (
@@ -381,7 +381,7 @@
 
 acpi_status
 acpi_db_display_statistics (
-	NATIVE_CHAR             *type_arg);
+	char                    *type_arg);
 
 acpi_status
 acpi_db_classify_one_object (
@@ -418,7 +418,7 @@
 
 void
 acpi_db_prep_namestring (
-	NATIVE_CHAR             *name);
+	char                    *name);
 
 
 acpi_status
@@ -427,7 +427,7 @@
 
 acpi_namespace_node *
 acpi_db_local_ns_lookup (
-	NATIVE_CHAR             *name);
+	char                    *name);
 
 
 #endif  /* __ACDEBUG_H__ */
diff -Nru a/drivers/acpi/include/acexcep.h b/drivers/acpi/include/acexcep.h
--- a/drivers/acpi/include/acexcep.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acexcep.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acexcep.h - Exception codes returned by the ACPI subsystem
- *       $Revision: 65 $
+ *       $Revision: 66 $
  *
  *****************************************************************************/
 
@@ -171,7 +171,7 @@
  * String versions of the exception codes above
  * These strings must match the corresponding defines exactly
  */
-NATIVE_CHAR const   *acpi_gbl_exception_names_env[] =
+char const   *acpi_gbl_exception_names_env[] =
 {
 	"AE_OK",
 	"AE_ERROR",
@@ -204,7 +204,7 @@
 	"AE_ABORT_METHOD"
 };
 
-NATIVE_CHAR const   *acpi_gbl_exception_names_pgm[] =
+char const   *acpi_gbl_exception_names_pgm[] =
 {
 	"AE_BAD_PARAMETER",
 	"AE_BAD_CHARACTER",
@@ -217,7 +217,7 @@
 	"AE_BAD_DECIMAL_CONSTANT"
 };
 
-NATIVE_CHAR const   *acpi_gbl_exception_names_tbl[] =
+char const   *acpi_gbl_exception_names_tbl[] =
 {
 	"AE_BAD_SIGNATURE",
 	"AE_BAD_HEADER",
@@ -227,7 +227,7 @@
 	"AE_INVALID_TABLE_LENGTH"
 };
 
-NATIVE_CHAR const   *acpi_gbl_exception_names_aml[] =
+char const   *acpi_gbl_exception_names_aml[] =
 {
 	"AE_AML_ERROR",
 	"AE_AML_PARSE",
@@ -263,7 +263,7 @@
 	"AE_AML_CIRCULAR_REFERENCE"
 };
 
-NATIVE_CHAR const   *acpi_gbl_exception_names_ctrl[] =
+char const   *acpi_gbl_exception_names_ctrl[] =
 {
 	"AE_CTRL_RETURN_VALUE",
 	"AE_CTRL_PENDING",
diff -Nru a/drivers/acpi/include/acglobal.h b/drivers/acpi/include/acglobal.h
--- a/drivers/acpi/include/acglobal.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acglobal.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acglobal.h - Declarations for global variables
- *       $Revision: 134 $
+ *       $Revision: 135 $
  *
  *****************************************************************************/
 
@@ -141,9 +141,9 @@
 extern u8                               acpi_gbl_shutdown;
 extern u32                              acpi_gbl_startup_flags;
 extern const u8                         acpi_gbl_decode_to8bit[8];
-extern const NATIVE_CHAR               *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
+extern const char                      *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT];
 extern const acpi_opcode_info           acpi_gbl_aml_op_info[AML_NUM_OPCODES];
-extern const NATIVE_CHAR               *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char                      *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS];
 
 
 /*****************************************************************************
@@ -257,21 +257,21 @@
 extern      u8                          acpi_gbl_db_terminate_threads;
 
 ACPI_EXTERN int                         optind;
-ACPI_EXTERN NATIVE_CHAR                *optarg;
+ACPI_EXTERN char                       *optarg;
 
 ACPI_EXTERN u8                          acpi_gbl_db_opt_tables;
 ACPI_EXTERN u8                          acpi_gbl_db_opt_stats;
 ACPI_EXTERN u8                          acpi_gbl_db_opt_ini_methods;
 
 
-ACPI_EXTERN NATIVE_CHAR                *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
-ACPI_EXTERN NATIVE_CHAR                 acpi_gbl_db_line_buf[80];
-ACPI_EXTERN NATIVE_CHAR                 acpi_gbl_db_parsed_buf[80];
-ACPI_EXTERN NATIVE_CHAR                 acpi_gbl_db_scope_buf[40];
-ACPI_EXTERN NATIVE_CHAR                 acpi_gbl_db_debug_filename[40];
+ACPI_EXTERN char                       *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS];
+ACPI_EXTERN char                        acpi_gbl_db_line_buf[80];
+ACPI_EXTERN char                        acpi_gbl_db_parsed_buf[80];
+ACPI_EXTERN char                        acpi_gbl_db_scope_buf[40];
+ACPI_EXTERN char                        acpi_gbl_db_debug_filename[40];
 ACPI_EXTERN u8                          acpi_gbl_db_output_to_file;
-ACPI_EXTERN NATIVE_CHAR                *acpi_gbl_db_buffer;
-ACPI_EXTERN NATIVE_CHAR                *acpi_gbl_db_filename;
+ACPI_EXTERN char                       *acpi_gbl_db_buffer;
+ACPI_EXTERN char                       *acpi_gbl_db_filename;
 ACPI_EXTERN u32                         acpi_gbl_db_debug_level;
 ACPI_EXTERN u32                         acpi_gbl_db_console_debug_level;
 ACPI_EXTERN acpi_table_header          *acpi_gbl_db_table_ptr;
diff -Nru a/drivers/acpi/include/acinterp.h b/drivers/acpi/include/acinterp.h
--- a/drivers/acpi/include/acinterp.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/include/acinterp.h	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acinterp.h - Interpreter subcomponent prototypes and defines
- *       $Revision: 142 $
+ *       $Revision: 144 $
  *
  *****************************************************************************/
 
@@ -92,7 +92,8 @@
 acpi_ex_convert_to_ascii (
 	acpi_integer            integer,
 	u32                     base,
-	u8                      *string);
+	u8                      *string,
+	u8                      max_length);
 
 /*
  * exfield - ACPI AML (p-code) execution - field manipulation
@@ -454,10 +455,10 @@
 acpi_ex_dump_operands (
 	acpi_operand_object     **operands,
 	acpi_interpreter_mode   interpreter_mode,
-	NATIVE_CHAR             *ident,
+	char                    *ident,
 	u32                     num_levels,
-	NATIVE_CHAR             *note,
-	NATIVE_CHAR             *module_name,
+	char                    *note,
+	char                    *module_name,
 	u32                     line_number);
 
 void
@@ -495,7 +496,7 @@
  * exnames - interpreter/scanner name load/execute
  */
 
-NATIVE_CHAR *
+char *
 acpi_ex_allocate_name_string (
 	u32                     prefix_count,
 	u32                     num_name_segs);
@@ -507,13 +508,13 @@
 acpi_status
 acpi_ex_name_segment (
 	u8                      **in_aml_address,
-	NATIVE_CHAR             *name_string);
+	char                    *name_string);
 
 acpi_status
 acpi_ex_get_name_string (
 	acpi_object_type        data_type,
 	u8                      *in_aml_address,
-	NATIVE_CHAR             **out_name_string,
+	char                    **out_name_string,
 	u32                     *out_name_length);
 
 acpi_status
@@ -629,12 +630,12 @@
 void
 acpi_ex_eisa_id_to_string (
 	u32                     numeric_id,
-	NATIVE_CHAR             *out_string);
+	char                    *out_string);
 
 void
 acpi_ex_unsigned_integer_to_string (
 	acpi_integer            value,
-	NATIVE_CHAR             *out_string);
+	char                    *out_string);
 
 
 /*
diff -Nru a/drivers/acpi/include/aclocal.h b/drivers/acpi/include/aclocal.h
--- a/drivers/acpi/include/aclocal.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/aclocal.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: aclocal.h - Internal data types used across the ACPI subsystem
- *       $Revision: 182 $
+ *       $Revision: 183 $
  *
  *****************************************************************************/
 
@@ -78,7 +78,7 @@
 
 /* Names for the mutexes used in the subsystem */
 
-static NATIVE_CHAR          *acpi_gbl_mutex_names[] =
+static char                 *acpi_gbl_mutex_names[] =
 {
 	"ACPI_MTX_Execute",
 	"ACPI_MTX_Interpreter",
@@ -227,7 +227,7 @@
 
 typedef struct
 {
-	NATIVE_CHAR             *search_for;
+	char                    *search_for;
 	acpi_handle             *list;
 	u32                     *count;
 
@@ -245,9 +245,9 @@
  */
 typedef struct
 {
-	NATIVE_CHAR             *name;
+	char                    *name;
 	u8                      type;
-	NATIVE_CHAR             *val;
+	char                    *val;
 
 } acpi_predefined_names;
 
@@ -262,9 +262,9 @@
 
 typedef struct acpi_namestring_info
 {
-	NATIVE_CHAR             *external_name;
-	NATIVE_CHAR             *next_external_char;
-	NATIVE_CHAR             *internal_name;
+	char                    *external_name;
+	char                    *next_external_char;
+	char                    *internal_name;
 	u32                     length;
 	u32                     num_segments;
 	u32                     num_carats;
@@ -566,7 +566,7 @@
 typedef struct acpi_opcode_info
 {
 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
-	NATIVE_CHAR             *name;          /* Opcode name (disassembler/debug only) */
+	char                    *name;          /* Opcode name (disassembler/debug only) */
 #endif
 	u32                     parse_args;     /* Grammar/Parse time arguments */
 	u32                     runtime_args;   /* Interpret time arguments */
@@ -586,9 +586,9 @@
 	u16                     integer16;      /* integer constant, 16 bits only */
 	u8                      integer8;       /* integer constant, 8 bits only */
 	u32                     size;           /* bytelist or field size */
-	NATIVE_CHAR             *string;        /* NULL terminated string */
+	char                    *string;        /* NULL terminated string */
 	u8                      *buffer;        /* buffer or string */
-	NATIVE_CHAR             *name;          /* NULL terminated string */
+	char                    *name;          /* NULL terminated string */
 	union acpi_parse_obj    *arg;           /* arguments and contained ops */
 
 } acpi_parse_value;
@@ -604,7 +604,7 @@
 	ACPI_DISASM_ONLY_MEMBERS (\
 	u8                      disasm_flags;   /* Used during AML disassembly */\
 	u8                      disasm_opcode;  /* Subtype used for disassembly */\
-	NATIVE_CHAR             aml_op_name[16]) /* op name (debug only) */\
+	char                    aml_op_name[16]) /* op name (debug only) */\
 			  /* NON-DEBUG members below: */\
 	acpi_namespace_node     *node;          /* for use by interpreter */\
 	acpi_parse_value        value;          /* Value or args associated with the opcode */\
@@ -890,11 +890,11 @@
 typedef struct dbmethodinfo
 {
 	acpi_handle             thread_gate;
-	NATIVE_CHAR             *name;
-	NATIVE_CHAR             **args;
+	char                    *name;
+	char                    **args;
 	u32                     flags;
 	u32                     num_loops;
-	NATIVE_CHAR             pathname[128];
+	char                    pathname[128];
 
 } acpi_db_method_info;
 
@@ -913,8 +913,8 @@
 typedef struct
 {
 	u32                     component_id;
-	NATIVE_CHAR             *proc_name;
-	NATIVE_CHAR             *module_name;
+	char                    *proc_name;
+	char                    *module_name;
 
 } acpi_debug_print_info;
 
@@ -931,7 +931,7 @@
 	u32                         size; \
 	u32                         component; \
 	u32                         line; \
-	NATIVE_CHAR                 module[ACPI_MAX_MODULE_NAME]; \
+	char                        module[ACPI_MAX_MODULE_NAME]; \
 	u8                          alloc_type;
 
 typedef struct
diff -Nru a/drivers/acpi/include/acmacros.h b/drivers/acpi/include/acmacros.h
--- a/drivers/acpi/include/acmacros.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/acmacros.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acmacros.h - C macros for the entire subsystem.
- *       $Revision: 133 $
+ *       $Revision: 135 $
  *
  *****************************************************************************/
 
@@ -334,11 +334,11 @@
  * 4) Reserved field is zero
  * 5) Expand address to 64 bits
  */
-#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d)   {a.address_space_id = (u8) d;\
+#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d)   do {a.address_space_id = (u8) d;\
 											 a.register_bit_width = (u8) ACPI_MUL_8 (b);\
 											 a.register_bit_offset = 0;\
 											 a.reserved = 0;\
-											 ACPI_STORE_ADDRESS (a.address,(ACPI_PHYSICAL_ADDRESS) c);}
+											 ACPI_STORE_ADDRESS (a.address,(ACPI_PHYSICAL_ADDRESS) c);} while (0)
 
 /* ACPI V1.0 entries -- address space is always I/O */
 
@@ -418,7 +418,7 @@
 #define ACPI_FUNCTION_TRACE_U32(a,b)    ACPI_FUNCTION_NAME(a)\
 											acpi_ut_trace_u32(__LINE__,&_dbg,(u32)b)
 #define ACPI_FUNCTION_TRACE_STR(a,b)    ACPI_FUNCTION_NAME(a)\
-											acpi_ut_trace_str(__LINE__,&_dbg,(NATIVE_CHAR *)b)
+											acpi_ut_trace_str(__LINE__,&_dbg,(char *)b)
 
 #define ACPI_FUNCTION_ENTRY()           acpi_ut_track_stack_ptr()
 
diff -Nru a/drivers/acpi/include/acnamesp.h b/drivers/acpi/include/acnamesp.h
--- a/drivers/acpi/include/acnamesp.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acnamesp.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acnamesp.h - Namespace subcomponent prototypes and defines
- *       $Revision: 131 $
+ *       $Revision: 132 $
  *
  *****************************************************************************/
 
@@ -146,7 +146,7 @@
 acpi_status
 acpi_ns_lookup (
 	acpi_generic_state      *scope_info,
-	NATIVE_CHAR             *name,
+	char                    *name,
 	acpi_object_type        type,
 	acpi_interpreter_mode   interpreter_mode,
 	u32                     flags,
@@ -213,7 +213,7 @@
 void
 acpi_ns_dump_pathname (
 	acpi_handle             handle,
-	NATIVE_CHAR             *msg,
+	char                    *msg,
 	u32                     level,
 	u32                     component);
 
@@ -261,14 +261,14 @@
 
 acpi_status
 acpi_ns_evaluate_by_name (
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_operand_object     **params,
 	acpi_operand_object     **return_object);
 
 acpi_status
 acpi_ns_evaluate_relative (
 	acpi_namespace_node     *prefix_node,
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_operand_object     **params,
 	acpi_operand_object     **return_object);
 
@@ -305,13 +305,13 @@
 acpi_ns_build_external_path (
 	acpi_namespace_node     *node,
 	ACPI_SIZE               size,
-	NATIVE_CHAR             *name_buffer);
+	char                    *name_buffer);
 
-NATIVE_CHAR *
+char *
 acpi_ns_get_external_pathname (
 	acpi_namespace_node     *node);
 
-NATIVE_CHAR *
+char *
 acpi_ns_name_of_current_scope (
 	acpi_walk_state         *walk_state);
 
@@ -323,11 +323,11 @@
 u8
 acpi_ns_pattern_match (
 	acpi_namespace_node     *obj_node,
-	NATIVE_CHAR             *search_for);
+	char                    *search_for);
 
 acpi_status
 acpi_ns_get_node_by_path (
-	NATIVE_CHAR             *external_pathname,
+	char                    *external_pathname,
 	acpi_namespace_node     *in_prefix_node,
 	u32                     flags,
 	acpi_namespace_node     **out_node);
@@ -408,11 +408,11 @@
 
 u8
 acpi_ns_valid_root_prefix (
-	NATIVE_CHAR             prefix);
+	char                    prefix);
 
 u8
 acpi_ns_valid_path_separator (
-	NATIVE_CHAR             sep);
+	char                    sep);
 
 acpi_object_type
 acpi_ns_get_type (
@@ -424,7 +424,7 @@
 
 void
 acpi_ns_report_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	char                    *internal_name,
@@ -432,7 +432,7 @@
 
 void
 acpi_ns_report_method_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	char                    *message,
@@ -443,7 +443,7 @@
 void
 acpi_ns_print_node_pathname (
 	acpi_namespace_node     *node,
-	NATIVE_CHAR             *msg);
+	char                    *msg);
 
 acpi_status
 acpi_ns_build_internal_name (
@@ -455,15 +455,15 @@
 
 acpi_status
 acpi_ns_internalize_name (
-	NATIVE_CHAR             *dotted_name,
-	NATIVE_CHAR             **converted_name);
+	char                    *dotted_name,
+	char                    **converted_name);
 
 acpi_status
 acpi_ns_externalize_name (
 	u32                     internal_name_length,
-	NATIVE_CHAR             *internal_name,
+	char                    *internal_name,
 	u32                     *converted_name_length,
-	NATIVE_CHAR             **converted_name);
+	char                    **converted_name);
 
 acpi_namespace_node *
 acpi_ns_map_handle_to_node (
diff -Nru a/drivers/acpi/include/acobject.h b/drivers/acpi/include/acobject.h
--- a/drivers/acpi/include/acobject.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acobject.h	Sun Dec 15 18:08:28 2002
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: acobject.h - Definition of acpi_operand_object  (Internal object only)
- *       $Revision: 114 $
+ *       $Revision: 115 $
  *
  *****************************************************************************/
 
@@ -125,7 +125,7 @@
 {
 	ACPI_OBJECT_COMMON_HEADER
 	ACPI_COMMON_BUFFER_INFO
-	NATIVE_CHAR                 *pointer;           /* String in AML stream or allocated string */
+	char                        *pointer;           /* String in AML stream or allocated string */
 
 } ACPI_OBJECT_STRING;
 
diff -Nru a/drivers/acpi/include/acparser.h b/drivers/acpi/include/acparser.h
--- a/drivers/acpi/include/acparser.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/acparser.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- *       $Revision: 63 $
+ *       $Revision: 64 $
  *
  *****************************************************************************/
 
@@ -77,7 +77,7 @@
 acpi_ps_get_next_package_length (
 	acpi_parse_state        *parser_state);
 
-NATIVE_CHAR *
+char *
 acpi_ps_get_next_namestring (
 	acpi_parse_state        *parser_state);
 
@@ -125,7 +125,7 @@
 acpi_ps_get_opcode_info (
 	u16                     opcode);
 
-NATIVE_CHAR *
+char *
 acpi_ps_get_opcode_name (
 	u16                     opcode);
 
@@ -222,7 +222,7 @@
 acpi_parse_object*
 acpi_ps_find (
 	acpi_parse_object       *scope,
-	NATIVE_CHAR             *path,
+	char                    *path,
 	u16                     opcode,
 	u32                     create);
 
@@ -311,13 +311,13 @@
 
 u32
 acpi_ps_sprint_path (
-	NATIVE_CHAR             *buffer_start,
+	char                    *buffer_start,
 	u32                     buffer_size,
 	acpi_parse_object       *op);
 
 u32
 acpi_ps_sprint_op (
-	NATIVE_CHAR             *buffer_start,
+	char                    *buffer_start,
 	u32                     buffer_size,
 	acpi_parse_object       *op);
 
diff -Nru a/drivers/acpi/include/acpiosxf.h b/drivers/acpi/include/acpiosxf.h
--- a/drivers/acpi/include/acpiosxf.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acpiosxf.h	Sun Dec 15 18:08:28 2002
@@ -251,9 +251,9 @@
  */
 void
 acpi_os_derive_pci_id(
-	acpi_handle	            rhandle,
+	acpi_handle             rhandle,
 	acpi_handle             chandle,
-	acpi_pci_id	            **pci_id);
+	acpi_pci_id             **pci_id);
 
 /*
  * Miscellaneous
@@ -284,12 +284,12 @@
 
 void ACPI_INTERNAL_VAR_XFACE
 acpi_os_printf (
-	const NATIVE_CHAR       *format,
+	const char              *format,
 	...);
 
 void
 acpi_os_vprintf (
-	const NATIVE_CHAR       *format,
+	const char              *format,
 	va_list                 args);
 
 void
@@ -303,7 +303,7 @@
 
 u32
 acpi_os_get_line (
-	NATIVE_CHAR             *buffer);
+	char                    *buffer);
 
 
 /*
@@ -315,7 +315,7 @@
 	void                    *failed_assertion,
 	void                    *file_name,
 	u32                     line_number,
-	NATIVE_CHAR             *message);
+	char                    *message);
 
 
 #endif /* __ACPIOSXF_H__ */
diff -Nru a/drivers/acpi/include/acpixf.h b/drivers/acpi/include/acpixf.h
--- a/drivers/acpi/include/acpixf.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acpixf.h	Sun Dec 15 18:08:28 2002
@@ -153,7 +153,7 @@
 
 acpi_status
 acpi_get_devices (
-	NATIVE_CHAR             *HID,
+	char                    *HID,
 	acpi_walk_callback      user_function,
 	void                    *context,
 	void                    **return_value);
diff -Nru a/drivers/acpi/include/acstruct.h b/drivers/acpi/include/acstruct.h
--- a/drivers/acpi/include/acstruct.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acstruct.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acstruct.h - Internal structs
- *       $Revision: 21 $
+ *       $Revision: 22 $
  *
  *****************************************************************************/
 
@@ -152,7 +152,7 @@
 {
 	acpi_walk_callback      user_function;
 	void                    *context;
-	NATIVE_CHAR             *hid;
+	char                    *hid;
 
 } acpi_get_devices_info;
 
diff -Nru a/drivers/acpi/include/actables.h b/drivers/acpi/include/actables.h
--- a/drivers/acpi/include/actables.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/actables.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actables.h - ACPI table management
- *       $Revision: 42 $
+ *       $Revision: 43 $
  *
  *****************************************************************************/
 
@@ -132,7 +132,7 @@
 
 acpi_status
 acpi_tb_match_signature (
-	NATIVE_CHAR             *signature,
+	char                    *signature,
 	acpi_table_desc         *table_info,
 	u8                      search_type);
 
@@ -197,9 +197,9 @@
 
 acpi_status
 acpi_tb_find_table (
-	NATIVE_CHAR             *signature,
-	NATIVE_CHAR             *oem_id,
-	NATIVE_CHAR             *oem_table_id,
+	char                    *signature,
+	char                    *oem_id,
+	char                    *oem_table_id,
 	acpi_table_header       **table_ptr);
 
 acpi_status
diff -Nru a/drivers/acpi/include/actbl.h b/drivers/acpi/include/actbl.h
--- a/drivers/acpi/include/actbl.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/actbl.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actbl.h - Table data structures defined in ACPI specification
- *       $Revision: 53 $
+ *       $Revision: 54 $
  *
  *****************************************************************************/
 
@@ -76,29 +76,29 @@
  */
 typedef struct  /* Root System Descriptor Pointer */
 {
-	NATIVE_CHAR             signature [8];          /* ACPI signature, contains "RSD PTR " */
+	char                    signature [8];          /* ACPI signature, contains "RSD PTR " */
 	u8                      checksum;               /* To make sum of struct == 0 */
-	NATIVE_CHAR             oem_id [6];             /* OEM identification */
+	char                    oem_id [6];             /* OEM identification */
 	u8                      revision;               /* Must be 0 for 1.0, 2 for 2.0 */
 	u32                     rsdt_physical_address;  /* 32-bit physical address of RSDT */
 	u32                     length;                 /* XSDT Length in bytes including hdr */
 	u64                     xsdt_physical_address;  /* 64-bit physical address of XSDT */
 	u8                      extended_checksum;      /* Checksum of entire table */
-	NATIVE_CHAR             reserved [3];           /* Reserved field must be 0 */
+	char                    reserved [3];           /* Reserved field must be 0 */
 
 } RSDP_DESCRIPTOR;
 
 
 typedef struct  /* ACPI common table header */
 {
-	NATIVE_CHAR             signature [4];          /* ACPI signature (4 ASCII characters) */
+	char                    signature [4];          /* ACPI signature (4 ASCII characters) */
 	u32                     length;                 /* Length of table, in bytes, including header */
 	u8                      revision;               /* ACPI Specification minor version # */
 	u8                      checksum;               /* To make sum of entire table == 0 */
-	NATIVE_CHAR             oem_id [6];             /* OEM identification */
-	NATIVE_CHAR             oem_table_id [8];       /* OEM table identification */
+	char                    oem_id [6];             /* OEM identification */
+	char                    oem_table_id [8];       /* OEM table identification */
 	u32                     oem_revision;           /* OEM revision number */
-	NATIVE_CHAR             asl_compiler_id [4];    /* ASL compiler vendor ID */
+	char                    asl_compiler_id [4];    /* ASL compiler vendor ID */
 	u32                     asl_compiler_revision;  /* ASL compiler revision number */
 
 } acpi_table_header;
@@ -199,8 +199,8 @@
 
 typedef struct _acpi_table_support
 {
-	NATIVE_CHAR             *name;
-	NATIVE_CHAR             *signature;
+	char                    *name;
+	char                    *signature;
 	void                    **global_ptr;
 	u8                      sig_length;
 	u8                      flags;
diff -Nru a/drivers/acpi/include/actbl1.h b/drivers/acpi/include/actbl1.h
--- a/drivers/acpi/include/actbl1.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/actbl1.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actbl1.h - ACPI 1.0 tables
- *       $Revision: 21 $
+ *       $Revision: 22 $
  *
  *****************************************************************************/
 
@@ -44,7 +44,7 @@
  */
 typedef struct
 {
-	NATIVE_CHAR             signature[4];           /* ACPI Signature */
+	char                    signature[4];           /* ACPI Signature */
 	u32                     length;                 /* Length of structure, in bytes */
 	u32                     hardware_signature;     /* Hardware configuration signature */
 	u32                     firmware_waking_vector; /* ACPI OS waking vector */
diff -Nru a/drivers/acpi/include/actbl2.h b/drivers/acpi/include/actbl2.h
--- a/drivers/acpi/include/actbl2.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/actbl2.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- *       $Revision: 28 $
+ *       $Revision: 29 $
  *
  *****************************************************************************/
 
@@ -75,7 +75,7 @@
  */
 typedef struct
 {
-	NATIVE_CHAR             signature[4];           /* ACPI signature */
+	char                    signature[4];           /* ACPI signature */
 	u32                     length;                 /* Length of structure, in bytes */
 	u32                     hardware_signature;     /* Hardware configuration signature */
 	u32                     firmware_waking_vector; /* 32bit physical address of the Firmware Waking Vector. */
diff -Nru a/drivers/acpi/include/actypes.h b/drivers/acpi/include/actypes.h
--- a/drivers/acpi/include/actypes.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/include/actypes.h	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actypes.h - Common data types for the entire ACPI subsystem
- *       $Revision: 242 $
+ *       $Revision: 244 $
  *
  *****************************************************************************/
 
@@ -629,7 +629,7 @@
 	{
 		acpi_object_type            type;
 		u32                         length;     /* # of bytes in string, excluding trailing null */
-		NATIVE_CHAR                 *pointer;   /* points to the string value */
+		char                        *pointer;   /* points to the string value */
 	} string;
 
 	struct
@@ -835,8 +835,8 @@
 	ACPI_COMMON_OBJ_INFO;
 
 	u32                         valid;              /*  Are the next bits legit? */
-	NATIVE_CHAR                 hardware_id[9];     /*  _HID value if any */
-	NATIVE_CHAR                 unique_id[9];       /*  _UID value if any */
+	char                        hardware_id[9];     /*  _HID value if any */
+	char                        unique_id[9];       /*  _UID value if any */
 	acpi_integer                address;            /*  _ADR value if any */
 	u32                         current_status;     /*  _STA value */
 } acpi_device_info;
@@ -1070,7 +1070,7 @@
 {
 	u32                         index;
 	u32                         string_length;
-	NATIVE_CHAR                 *string_ptr;
+	char                        *string_ptr;
 
 } acpi_resource_source;
 
@@ -1209,7 +1209,7 @@
 	u32                         pin;
 	acpi_integer                address;        /* here for 64-bit alignment */
 	u32                         source_index;
-	NATIVE_CHAR                 source[4];      /* pad to 64 bits so sizeof() works in all cases */
+	char                        source[4];      /* pad to 64 bits so sizeof() works in all cases */
 
 } acpi_pci_routing_table;
 
diff -Nru a/drivers/acpi/include/acutils.h b/drivers/acpi/include/acutils.h
--- a/drivers/acpi/include/acutils.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/include/acutils.h	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- *       $Revision: 149 $
+ *       $Revision: 150 $
  *
  *****************************************************************************/
 
@@ -96,25 +96,25 @@
 
 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_mutex_name (
 	u32                     mutex_id);
 
 #endif
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_type_name (
 	acpi_object_type        type);
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_object_type_name (
 	acpi_operand_object     *obj_desc);
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_region_name (
 	u8                      space_id);
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_event_name (
 	u32                     event_id);
 
@@ -140,51 +140,51 @@
 
 ACPI_SIZE
 acpi_ut_strlen (
-	const NATIVE_CHAR       *string);
+	const char              *string);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strcpy (
-	NATIVE_CHAR             *dst_string,
-	const NATIVE_CHAR       *src_string);
+	char                    *dst_string,
+	const char              *src_string);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strncpy (
-	NATIVE_CHAR             *dst_string,
-	const NATIVE_CHAR       *src_string,
+	char                    *dst_string,
+	const char              *src_string,
 	ACPI_SIZE               count);
 
 int
 acpi_ut_strncmp (
-	const NATIVE_CHAR       *string1,
-	const NATIVE_CHAR       *string2,
+	const char              *string1,
+	const char              *string2,
 	ACPI_SIZE               count);
 
 int
 acpi_ut_strcmp (
-	const NATIVE_CHAR       *string1,
-	const NATIVE_CHAR       *string2);
+	const char              *string1,
+	const char              *string2);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strcat (
-	NATIVE_CHAR             *dst_string,
-	const NATIVE_CHAR       *src_string);
+	char                    *dst_string,
+	const char              *src_string);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strncat (
-	NATIVE_CHAR             *dst_string,
-	const NATIVE_CHAR       *src_string,
+	char                    *dst_string,
+	const char              *src_string,
 	ACPI_SIZE               count);
 
 u32
 acpi_ut_strtoul (
-	const NATIVE_CHAR       *string,
-	NATIVE_CHAR             **terminator,
+	const char              *string,
+	char                    **terminator,
 	u32                     base);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strstr (
-	NATIVE_CHAR             *string1,
-	NATIVE_CHAR             *string2);
+	char                    *string1,
+	char                    *string2);
 
 void *
 acpi_ut_memcpy (
@@ -342,7 +342,7 @@
 acpi_ut_trace_str (
 	u32                     line_number,
 	acpi_debug_print_info   *dbg_info,
-	NATIVE_CHAR             *string);
+	char                    *string);
 
 void
 acpi_ut_exit (
@@ -369,19 +369,19 @@
 
 void
 acpi_ut_report_info (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id);
 
 void
 acpi_ut_report_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id);
 
 void
 acpi_ut_report_warning (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id);
 
@@ -450,13 +450,13 @@
 acpi_status
 acpi_ut_evaluate_object (
 	acpi_namespace_node     *prefix_node,
-	NATIVE_CHAR             *path,
+	char                    *path,
 	u32                     expected_return_btypes,
 	acpi_operand_object     **return_desc);
 
 acpi_status
 acpi_ut_evaluate_numeric_object (
-	NATIVE_CHAR             *object_name,
+	char                    *object_name,
 	acpi_namespace_node     *device_node,
 	acpi_integer            *address);
 
@@ -516,14 +516,14 @@
 
 acpi_operand_object  *
 acpi_ut_create_internal_object_dbg (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	acpi_object_type        type);
 
 void *
 acpi_ut_allocate_object_desc_dbg (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id);
 
@@ -673,17 +673,17 @@
 
 u8
 acpi_ut_valid_acpi_character (
-	NATIVE_CHAR             character);
+	char                    character);
 
 acpi_status
 acpi_ut_strtoul64 (
-	NATIVE_CHAR             *string,
+	char                    *string,
 	u32                     base,
 	acpi_integer            *ret_integer);
 
-NATIVE_CHAR *
+char *
 acpi_ut_strupr (
-	NATIVE_CHAR             *src_string);
+	char                    *src_string);
 
 u8 *
 acpi_ut_get_resource_end_tag (
@@ -745,14 +745,14 @@
 acpi_ut_allocate (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 void *
 acpi_ut_callocate (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 
@@ -762,21 +762,21 @@
 acpi_ut_allocate_and_track (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 void *
 acpi_ut_callocate_and_track (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 void
 acpi_ut_free_and_track (
 	void                    *address,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 acpi_debug_mem_block *
@@ -791,7 +791,7 @@
 	ACPI_SIZE               size,
 	u8                      alloc_type,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 acpi_status
@@ -799,7 +799,7 @@
 	u32                     list_id,
 	acpi_debug_mem_block    *address,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line);
 
 void
@@ -809,7 +809,7 @@
 void
 acpi_ut_dump_allocations (
 	u32                     component,
-	NATIVE_CHAR             *module);
+	char                    *module);
 #endif
 
 
diff -Nru a/drivers/acpi/include/platform/aclinux.h b/drivers/acpi/include/platform/aclinux.h
--- a/drivers/acpi/include/platform/aclinux.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/acpi/include/platform/aclinux.h	Sun Dec 15 18:08:31 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: aclinux.h - OS specific defines, etc.
- *       $Revision: 27 $
+ *       $Revision: 29 $
  *
  *****************************************************************************/
 
@@ -43,7 +43,7 @@
 
 #define strtoul simple_strtoul
 
-#define ACPI_MACHINE_WIDTH	BITS_PER_LONG
+#define ACPI_MACHINE_WIDTH  BITS_PER_LONG
 
 #else /* !__KERNEL__ */
 
@@ -54,13 +54,13 @@
 #include <unistd.h>
 
 #if defined(__ia64__) || defined(__x86_64__)
-#define ACPI_MACHINE_WIDTH		64
-#define COMPILER_DEPENDENT_INT64	long
-#define COMPILER_DEPENDENT_UINT64	unsigned long
+#define ACPI_MACHINE_WIDTH	    64
+#define COMPILER_DEPENDENT_INT64    long
+#define COMPILER_DEPENDENT_UINT64   unsigned long
 #else
-#define ACPI_MACHINE_WIDTH		32
-#define COMPILER_DEPENDENT_INT64	long long
-#define COMPILER_DEPENDENT_UINT64	unsigned long long
+#define ACPI_MACHINE_WIDTH	    32
+#define COMPILER_DEPENDENT_INT64    long long
+#define COMPILER_DEPENDENT_UINT64   unsigned long long
 #define ACPI_USE_NATIVE_DIVIDE
 #endif
 
diff -Nru a/drivers/acpi/namespace/Makefile b/drivers/acpi/namespace/Makefile
--- a/drivers/acpi/namespace/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,5 +8,3 @@
 	 nsparse.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
--- a/drivers/acpi/namespace/nsaccess.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/namespace/nsaccess.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- *              $Revision: 165 $
+ *              $Revision: 167 $
  *
  ******************************************************************************/
 
@@ -234,7 +234,7 @@
 acpi_status
 acpi_ns_lookup (
 	acpi_generic_state      *scope_info,
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_object_type        type,
 	acpi_interpreter_mode   interpreter_mode,
 	u32                     flags,
@@ -242,7 +242,7 @@
 	acpi_namespace_node     **return_node)
 {
 	acpi_status             status;
-	NATIVE_CHAR             *path = pathname;
+	char                    *path = pathname;
 	acpi_namespace_node     *prefix_node;
 	acpi_namespace_node     *current_node = NULL;
 	acpi_namespace_node     *this_node = NULL;
diff -Nru a/drivers/acpi/namespace/nsalloc.c b/drivers/acpi/namespace/nsalloc.c
--- a/drivers/acpi/namespace/nsalloc.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/nsalloc.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsalloc - Namespace allocation and deletion utilities
- *              $Revision: 77 $
+ *              $Revision: 78 $
  *
  ******************************************************************************/
 
diff -Nru a/drivers/acpi/namespace/nsdump.c b/drivers/acpi/namespace/nsdump.c
--- a/drivers/acpi/namespace/nsdump.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/namespace/nsdump.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: nsdump - table dumping routines for debug
- *              $Revision: 149 $
+ *              $Revision: 150 $
  *
  *****************************************************************************/
 
@@ -93,7 +93,7 @@
 void
 acpi_ns_dump_pathname (
 	acpi_handle             handle,
-	NATIVE_CHAR             *msg,
+	char                    *msg,
 	u32                     level,
 	u32                     component)
 {
diff -Nru a/drivers/acpi/namespace/nseval.c b/drivers/acpi/namespace/nseval.c
--- a/drivers/acpi/namespace/nseval.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/nseval.c	Sun Dec 15 18:08:29 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nseval - Object evaluation interfaces -- includes control
  *                       method lookup and execution.
- *              $Revision: 119 $
+ *              $Revision: 120 $
  *
  ******************************************************************************/
 
@@ -60,14 +60,14 @@
 acpi_status
 acpi_ns_evaluate_relative (
 	acpi_namespace_node     *handle,
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_operand_object     **params,
 	acpi_operand_object     **return_object)
 {
 	acpi_namespace_node     *prefix_node;
 	acpi_status             status;
 	acpi_namespace_node     *node = NULL;
-	NATIVE_CHAR             *internal_path = NULL;
+	char                    *internal_path = NULL;
 	acpi_generic_state      scope_info;
 
 
@@ -158,13 +158,13 @@
 
 acpi_status
 acpi_ns_evaluate_by_name (
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_operand_object     **params,
 	acpi_operand_object     **return_object)
 {
 	acpi_status             status;
 	acpi_namespace_node     *node = NULL;
-	NATIVE_CHAR             *internal_path = NULL;
+	char                    *internal_path = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("Ns_evaluate_by_name");
diff -Nru a/drivers/acpi/namespace/nsinit.c b/drivers/acpi/namespace/nsinit.c
--- a/drivers/acpi/namespace/nsinit.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/nsinit.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: nsinit - namespace initialization
- *              $Revision: 52 $
+ *              $Revision: 54 $
  *
  *****************************************************************************/
 
@@ -278,7 +278,7 @@
 	/* Print a dot for each object unless we are going to print the entire pathname */
 
 	if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
-		acpi_os_printf (".");
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
 	}
 
 	/*
@@ -321,7 +321,7 @@
 
 
 	if ((acpi_dbg_level <= ACPI_LV_ALL_EXCEPTIONS) && (!(acpi_dbg_level & ACPI_LV_INFO))) {
-		acpi_os_printf (".");
+		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "."));
 	}
 
 	info->device_count++;
@@ -373,7 +373,7 @@
 			/* Ignore error and move on to next device */
 
 	#ifdef ACPI_DEBUG_OUTPUT
-			NATIVE_CHAR *scope_name = acpi_ns_get_external_pathname (obj_handle);
+			char        *scope_name = acpi_ns_get_external_pathname (obj_handle);
 
 			ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "%s._INI failed: %s\n",
 					scope_name, acpi_format_exception (status)));
diff -Nru a/drivers/acpi/namespace/nsnames.c b/drivers/acpi/namespace/nsnames.c
--- a/drivers/acpi/namespace/nsnames.c	Sun Dec 15 18:08:33 2002
+++ b/drivers/acpi/namespace/nsnames.c	Sun Dec 15 18:08:33 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nsnames - Name manipulation and search
- *              $Revision: 80 $
+ *              $Revision: 81 $
  *
  ******************************************************************************/
 
@@ -52,7 +52,7 @@
 acpi_ns_build_external_path (
 	acpi_namespace_node     *node,
 	ACPI_SIZE               size,
-	NATIVE_CHAR             *name_buffer)
+	char                    *name_buffer)
 {
 	ACPI_SIZE               index;
 	acpi_namespace_node     *parent_node;
@@ -118,11 +118,11 @@
  *
  ******************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ns_get_external_pathname (
 	acpi_namespace_node     *node)
 {
-	NATIVE_CHAR             *name_buffer;
+	char                    *name_buffer;
 	ACPI_SIZE               size;
 
 
diff -Nru a/drivers/acpi/namespace/nsobject.c b/drivers/acpi/namespace/nsobject.c
--- a/drivers/acpi/namespace/nsobject.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/nsobject.c	Sun Dec 15 18:08:29 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsobject - Utilities for objects attached to namespace
  *                         table entries
- *              $Revision: 85 $
+ *              $Revision: 86 $
  *
  ******************************************************************************/
 
diff -Nru a/drivers/acpi/namespace/nsparse.c b/drivers/acpi/namespace/nsparse.c
--- a/drivers/acpi/namespace/nsparse.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/namespace/nsparse.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: nsparse - namespace interface to AML parser
- *              $Revision: 1 $
+ *              $Revision: 2 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c
--- a/drivers/acpi/namespace/nssearch.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/namespace/nssearch.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: nssearch - Namespace search
- *              $Revision: 92 $
+ *              $Revision: 94 $
  *
  ******************************************************************************/
 
@@ -74,7 +74,7 @@
 
 #ifdef ACPI_DEBUG_OUTPUT
 	if (ACPI_LV_NAMES & acpi_dbg_level) {
-		NATIVE_CHAR         *scope_name;
+		char                *scope_name;
 
 		scope_name = acpi_ns_get_external_pathname (node);
 		if (scope_name) {
diff -Nru a/drivers/acpi/namespace/nsutils.c b/drivers/acpi/namespace/nsutils.c
--- a/drivers/acpi/namespace/nsutils.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/namespace/nsutils.c	Sun Dec 15 18:08:29 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
  *                        parents and siblings and Scope manipulation
- *              $Revision: 118 $
+ *              $Revision: 120 $
  *
  *****************************************************************************/
 
@@ -51,7 +51,7 @@
 
 void
 acpi_ns_report_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	char                    *internal_name,
@@ -103,7 +103,7 @@
 
 void
 acpi_ns_report_method_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	char                    *message,
@@ -144,7 +144,7 @@
 void
 acpi_ns_print_node_pathname (
 	acpi_namespace_node     *node,
-	NATIVE_CHAR             *msg)
+	char                    *msg)
 {
 	acpi_buffer             buffer;
 	acpi_status             status;
@@ -176,7 +176,7 @@
 
 u8
 acpi_ns_valid_root_prefix (
-	NATIVE_CHAR             prefix)
+	char                    prefix)
 {
 
 	return ((u8) (prefix == '\\'));
@@ -197,7 +197,7 @@
 
 u8
 acpi_ns_valid_path_separator (
-	NATIVE_CHAR             sep)
+	char                    sep)
 {
 
 	return ((u8) (sep == '.'));
@@ -277,7 +277,7 @@
 acpi_ns_get_internal_name_length (
 	acpi_namestring_info    *info)
 {
-	NATIVE_CHAR             *next_external_char;
+	char                    *next_external_char;
 	u32                     i;
 
 
@@ -352,9 +352,9 @@
 	acpi_namestring_info    *info)
 {
 	u32                     num_segments = info->num_segments;
-	NATIVE_CHAR             *internal_name = info->internal_name;
-	NATIVE_CHAR             *external_name = info->next_external_char;
-	NATIVE_CHAR             *result = NULL;
+	char                    *internal_name = info->internal_name;
+	char                    *external_name = info->next_external_char;
+	char                    *result = NULL;
 	NATIVE_UINT             i;
 
 
@@ -470,10 +470,10 @@
 
 acpi_status
 acpi_ns_internalize_name (
-	NATIVE_CHAR             *external_name,
-	NATIVE_CHAR             **converted_name)
+	char                    *external_name,
+	char                    **converted_name)
 {
-	NATIVE_CHAR             *internal_name;
+	char                    *internal_name;
 	acpi_namestring_info    info;
 	acpi_status             status;
 
@@ -865,14 +865,14 @@
 
 acpi_status
 acpi_ns_get_node_by_path (
-	NATIVE_CHAR             *pathname,
+	char                    *pathname,
 	acpi_namespace_node     *start_node,
 	u32                     flags,
 	acpi_namespace_node     **return_node)
 {
 	acpi_generic_state      scope_info;
 	acpi_status             status;
-	NATIVE_CHAR             *internal_path = NULL;
+	char                    *internal_path = NULL;
 
 
 	ACPI_FUNCTION_TRACE_PTR ("Ns_get_node_by_path", pathname);
diff -Nru a/drivers/acpi/namespace/nsxfeval.c b/drivers/acpi/namespace/nsxfeval.c
--- a/drivers/acpi/namespace/nsxfeval.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/namespace/nsxfeval.c	Sun Dec 15 18:08:32 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsxfeval - Public interfaces to the ACPI subsystem
  *                         ACPI Object evaluation interfaces
- *              $Revision: 4 $
+ *              $Revision: 6 $
  *
  ******************************************************************************/
 
@@ -518,7 +518,7 @@
 
 acpi_status
 acpi_get_devices (
-	NATIVE_CHAR             *HID,
+	char                    *HID,
 	acpi_walk_callback      user_function,
 	void                    *context,
 	void                    **return_value)
diff -Nru a/drivers/acpi/namespace/nsxfname.c b/drivers/acpi/namespace/nsxfname.c
--- a/drivers/acpi/namespace/nsxfname.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/namespace/nsxfname.c	Sun Dec 15 18:08:28 2002
@@ -2,7 +2,7 @@
  *
  * Module Name: nsxfname - Public interfaces to the ACPI subsystem
  *                         ACPI Namespace oriented interfaces
- *              $Revision: 92 $
+ *              $Revision: 93 $
  *
  *****************************************************************************/
 
@@ -182,7 +182,7 @@
 
 	ACPI_STRNCPY (buffer->pointer, node->name.ascii,
 			 ACPI_NAME_SIZE);
-	((NATIVE_CHAR *) buffer->pointer) [ACPI_NAME_SIZE] = 0;
+	((char *) buffer->pointer) [ACPI_NAME_SIZE] = 0;
 	status = AE_OK;
 
 
diff -Nru a/drivers/acpi/parser/Makefile b/drivers/acpi/parser/Makefile
--- a/drivers/acpi/parser/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/parser/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 	 psopcode.o  psscope.o  psutils.o  psxface.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/parser/psargs.c b/drivers/acpi/parser/psargs.c
--- a/drivers/acpi/parser/psargs.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/parser/psargs.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: psargs - Parse AML opcode arguments
- *              $Revision: 65 $
+ *              $Revision: 67 $
  *
  *****************************************************************************/
 
@@ -151,7 +151,7 @@
  *
  ******************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ps_get_next_namestring (
 	acpi_parse_state        *parser_state)
 {
@@ -206,7 +206,7 @@
 	}
 
 	parser_state->aml = (u8*) end;
-	return_PTR ((NATIVE_CHAR *) start);
+	return_PTR ((char *) start);
 }
 
 
@@ -238,7 +238,7 @@
 	acpi_parse_object       *arg,
 	u8                      method_call)
 {
-	NATIVE_CHAR             *path;
+	char                    *path;
 	acpi_parse_object       *name_op;
 	acpi_status             status = AE_OK;
 	acpi_operand_object     *method_desc;
diff -Nru a/drivers/acpi/parser/psopcode.c b/drivers/acpi/parser/psopcode.c
--- a/drivers/acpi/parser/psopcode.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/parser/psopcode.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: psopcode - Parser/Interpreter opcode information table
- *              $Revision: 74 $
+ *              $Revision: 75 $
  *
  *****************************************************************************/
 
@@ -730,7 +730,7 @@
  *
  ******************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ps_get_opcode_name (
 	u16                     opcode)
 {
diff -Nru a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
--- a/drivers/acpi/parser/psparse.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/parser/psparse.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: psparse - Parser top level AML parse routines
- *              $Revision: 137 $
+ *              $Revision: 138 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c
--- a/drivers/acpi/processor.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/processor.c	Sun Dec 15 18:08:29 2002
@@ -1849,10 +1849,15 @@
 #ifdef CONFIG_CPU_FREQ_24_API
 	for (i=0;i<NR_CPUS;i++) {
 		driver->cpu_cur_freq[0] = pr->performance.states[current_state].core_frequency * 1000;
-		driver->cpu_min_freq[0] = pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000;
 	}
 #endif
 
+	/* detect highest transition latency */
+	for (i=0;i<pr->performance.state_count;i++) {
+		if (pr->performance.states[i].transition_latency > driver->policy[0].cpuinfo.transition_latency)
+			driver->policy[0].cpuinfo.transition_latency = pr->performance.states[i].transition_latency;
+	}
+
 	driver->verify      = &acpi_cpufreq_verify;
 	driver->setpolicy   = &acpi_cpufreq_setpolicy;
 
@@ -1860,7 +1865,9 @@
 		driver->policy[i].cpu    = pr->id;
 		driver->policy[i].min    = pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000;
 		driver->policy[i].max    = pr->performance.states[pr->limit.state.px].core_frequency * 1000;
-		driver->policy[i].max_cpu_freq = pr->performance.states[0].core_frequency * 1000;
+		driver->policy[i].cpuinfo.max_freq = pr->performance.states[0].core_frequency * 1000;
+		driver->policy[i].cpuinfo.min_freq = pr->performance.states[pr->performance.state_count - 1].core_frequency * 1000;
+		driver->policy[i].cpuinfo.transition_latency = driver->policy[0].cpuinfo.transition_latency;
 		driver->policy[i].policy = ( pr->performance.states[current_state].core_frequency * 1000 == driver->policy[i].max) ? 
 			CPUFREQ_POLICY_PERFORMANCE : CPUFREQ_POLICY_POWERSAVE;
 	}
diff -Nru a/drivers/acpi/resources/Makefile b/drivers/acpi/resources/Makefile
--- a/drivers/acpi/resources/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/resources/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 	 rscalc.o  rsdump.o    rsirq.o  rsmemory.o  rsutils.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/resources/rsaddr.c b/drivers/acpi/resources/rsaddr.c
--- a/drivers/acpi/resources/rsaddr.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/resources/rsaddr.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: rsaddr - Address resource descriptors (16/32/64)
- *              $Revision: 26 $
+ *              $Revision: 27 $
  *
  ******************************************************************************/
 
@@ -198,7 +198,7 @@
 		/* Point the String pointer to the end of this structure */
 
 		output_struct->data.address16.resource_source.string_ptr =
-				(NATIVE_CHAR *)((u8 * )output_struct + struct_size);
+				(char *)((u8 * )output_struct + struct_size);
 
 		temp_ptr = (u8 *) output_struct->data.address16.resource_source.string_ptr;
 
@@ -273,7 +273,7 @@
 	u8                      *buffer = *output_buffer;
 	u8                      *length_field;
 	u8                      temp8;
-	NATIVE_CHAR             *temp_pointer = NULL;
+	char                    *temp_pointer = NULL;
 	ACPI_SIZE               actual_bytes;
 
 
@@ -378,7 +378,7 @@
 		*buffer = temp8;
 		buffer += 1;
 
-		temp_pointer = (NATIVE_CHAR *) buffer;
+		temp_pointer = (char *) buffer;
 
 		/*
 		 * Copy the string
@@ -583,7 +583,7 @@
 		/* Point the String pointer to the end of this structure */
 
 		output_struct->data.address32.resource_source.string_ptr =
-				(NATIVE_CHAR *)((u8 *)output_struct + struct_size);
+				(char *)((u8 *)output_struct + struct_size);
 
 		temp_ptr = (u8 *) output_struct->data.address32.resource_source.string_ptr;
 
@@ -656,7 +656,7 @@
 	u8                      *buffer;
 	u16                     *length_field;
 	u8                      temp8;
-	NATIVE_CHAR             *temp_pointer;
+	char                    *temp_pointer;
 
 
 	ACPI_FUNCTION_TRACE ("Rs_address32_stream");
@@ -762,7 +762,7 @@
 		*buffer = temp8;
 		buffer += 1;
 
-		temp_pointer = (NATIVE_CHAR *) buffer;
+		temp_pointer = (char *) buffer;
 
 		/*
 		 * Copy the string
@@ -968,7 +968,7 @@
 		/* Point the String pointer to the end of this structure */
 
 		output_struct->data.address64.resource_source.string_ptr =
-				(NATIVE_CHAR *)((u8 *)output_struct + struct_size);
+				(char *)((u8 *)output_struct + struct_size);
 
 		temp_ptr = (u8 *) output_struct->data.address64.resource_source.string_ptr;
 
@@ -1042,7 +1042,7 @@
 	u8                      *buffer;
 	u16                     *length_field;
 	u8                      temp8;
-	NATIVE_CHAR             *temp_pointer;
+	char                    *temp_pointer;
 
 
 	ACPI_FUNCTION_TRACE ("Rs_address64_stream");
@@ -1149,7 +1149,7 @@
 		*buffer = temp8;
 		buffer += 1;
 
-		temp_pointer = (NATIVE_CHAR *) buffer;
+		temp_pointer = (char *) buffer;
 
 		/*
 		 * Copy the string
diff -Nru a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
--- a/drivers/acpi/resources/rscreate.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/resources/rscreate.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: rscreate - Create resource lists/tables
- *              $Revision: 62 $
+ *              $Revision: 63 $
  *
  ******************************************************************************/
 
diff -Nru a/drivers/acpi/resources/rsirq.c b/drivers/acpi/resources/rsirq.c
--- a/drivers/acpi/resources/rsirq.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/acpi/resources/rsirq.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: rsirq - IRQ resource descriptors
- *              $Revision: 30 $
+ *              $Revision: 31 $
  *
  ******************************************************************************/
 
@@ -386,7 +386,7 @@
 		 * Point the String pointer to the end of this structure.
 		 */
 		output_struct->data.extended_irq.resource_source.string_ptr =
-				(NATIVE_CHAR *)(output_struct + struct_size);
+				(char *)(output_struct + struct_size);
 
 		temp_ptr = (u8 *) output_struct->data.extended_irq.resource_source.string_ptr;
 
@@ -460,7 +460,7 @@
 	u16                     *length_field;
 	u8                      temp8 = 0;
 	u8                      index;
-	NATIVE_CHAR             *temp_pointer = NULL;
+	char                    *temp_pointer = NULL;
 
 
 	ACPI_FUNCTION_TRACE ("Rs_extended_irq_stream");
@@ -527,7 +527,7 @@
 		*buffer = (u8) linked_list->data.extended_irq.resource_source.index;
 		buffer += 1;
 
-		temp_pointer = (NATIVE_CHAR *) buffer;
+		temp_pointer = (char *) buffer;
 
 		/*
 		 * Copy the string
diff -Nru a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
--- a/drivers/acpi/sleep.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/sleep.c	Sun Dec 15 18:08:28 2002
@@ -314,8 +314,8 @@
 acpi_system_write_sleep (
 	struct file		*file,
 	const char		*buffer,
-	unsigned long		count,
-	void			*data)
+	size_t			count,
+	loff_t			*ppos)
 {
 	acpi_status		status = AE_OK;
 	char			state_string[12] = {'\0'};
@@ -465,8 +465,8 @@
 acpi_system_write_alarm (
 	struct file		*file,
 	const char		*buffer,
-	unsigned long		count,
-	void			*data)
+	size_t			count,
+	loff_t			*ppos)
 {
 	int			result = 0;
 	char			alarm_string[30] = {'\0'};
@@ -674,7 +674,7 @@
 			ACPI_SYSTEM_FILE_SLEEP));
 	else {
 		entry->proc_fops = &acpi_system_sleep_fops;
-		entry->write_proc = acpi_system_write_sleep;
+		entry->proc_fops->write = acpi_system_write_sleep;
 	}
 
 	/* 'alarm' [R/W] */
@@ -686,7 +686,7 @@
 			ACPI_SYSTEM_FILE_ALARM));
 	else {
 		entry->proc_fops = &acpi_system_alarm_fops;
-		entry->write_proc = acpi_system_write_alarm;
+		entry->proc_fops->write = acpi_system_write_alarm;
 	}
 
 	/* Install the soft-off (S5) handler. */
diff -Nru a/drivers/acpi/tables/Makefile b/drivers/acpi/tables/Makefile
--- a/drivers/acpi/tables/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/tables/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 	 tbgetall.o  tbinstal.o  tbutils.o  tbxfroot.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
--- a/drivers/acpi/tables/tbconvrt.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/tables/tbconvrt.c	Sun Dec 15 18:08:29 2002
@@ -256,50 +256,50 @@
 	 * we must selectively expand V1.0 fields if the corresponding X field
 	 * is zero.
 	 */
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xfirmware_ctrl))) {
+	if (!(local_fadt->Xfirmware_ctrl)) {
 		ACPI_STORE_ADDRESS (local_fadt->Xfirmware_ctrl, local_fadt->V1_firmware_ctrl);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xdsdt))) {
+	if (!(local_fadt->Xdsdt)) {
 		ACPI_STORE_ADDRESS (local_fadt->Xdsdt, local_fadt->V1_dsdt);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm1a_evt_blk.address))) {
+	if (!(local_fadt->Xpm1a_evt_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm1a_evt_blk,
 			local_fadt->pm1_evt_len, local_fadt->V1_pm1a_evt_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm1b_evt_blk.address))) {
+	if (!(local_fadt->Xpm1b_evt_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm1b_evt_blk,
 			local_fadt->pm1_evt_len, local_fadt->V1_pm1b_evt_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm1a_cnt_blk.address))) {
+	if (!(local_fadt->Xpm1a_cnt_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm1a_cnt_blk,
 			local_fadt->pm1_cnt_len, local_fadt->V1_pm1a_cnt_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm1b_cnt_blk.address))) {
+	if (!(local_fadt->Xpm1b_cnt_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm1b_cnt_blk,
 			local_fadt->pm1_cnt_len, local_fadt->V1_pm1b_cnt_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm2_cnt_blk.address))) {
+	if (!(local_fadt->Xpm2_cnt_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm2_cnt_blk,
 			local_fadt->pm2_cnt_len, local_fadt->V1_pm2_cnt_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xpm_tmr_blk.address))) {
+	if (!(local_fadt->Xpm_tmr_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xpm_tmr_blk,
 			local_fadt->pm_tm_len, local_fadt->V1_pm_tmr_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xgpe0_blk.address))) {
+	if (!(local_fadt->Xgpe0_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xgpe0_blk,
 			local_fadt->gpe0_blk_len, local_fadt->V1_gpe0_blk);
 	}
 
-	if (!(ACPI_GET_ADDRESS (local_fadt->Xgpe1_blk.address))) {
+	if (!(local_fadt->Xgpe1_blk.address)) {
 		ASL_BUILD_GAS_FROM_V1_ENTRY (local_fadt->Xgpe1_blk,
 			local_fadt->gpe1_blk_len, local_fadt->V1_gpe1_blk);
 	}
@@ -437,7 +437,7 @@
 
 	if ((acpi_gbl_RSDP->revision < 2) ||
 		(acpi_gbl_FACS->length < 32) ||
-		(!(ACPI_GET_ADDRESS (acpi_gbl_FACS->Xfirmware_waking_vector)))) {
+		(!(acpi_gbl_FACS->Xfirmware_waking_vector))) {
 		/* ACPI 1.0 FACS or short table or optional X_ field is zero */
 
 		acpi_gbl_common_fACS.firmware_waking_vector = ACPI_CAST_PTR (u64, &(acpi_gbl_FACS->firmware_waking_vector));
diff -Nru a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c
--- a/drivers/acpi/tables/tbget.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/tables/tbget.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbget - ACPI Table get* routines
- *              $Revision: 81 $
+ *              $Revision: 82 $
  *
  *****************************************************************************/
 
diff -Nru a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c
--- a/drivers/acpi/tables/tbgetall.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/acpi/tables/tbgetall.c	Sun Dec 15 18:08:30 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbgetall - Get all required ACPI tables
- *              $Revision: 3 $
+ *              $Revision: 4 $
  *
  *****************************************************************************/
 
@@ -212,7 +212,7 @@
 	for (i = 0; i < acpi_gbl_rsdt_table_count; i++) {
 		/* Get the table addresss from the common internal XSDT */
 
-		address.pointer.value = ACPI_GET_ADDRESS (acpi_gbl_XSDT->table_offset_entry[i]);
+		address.pointer.value = acpi_gbl_XSDT->table_offset_entry[i];
 
 		/*
 		 * Get the tables needed by this subsystem (FADT and any SSDTs).
@@ -247,7 +247,7 @@
 	/*
 	 * Get the FACS (Pointed to by the FADT)
 	 */
-	address.pointer.value = ACPI_GET_ADDRESS (acpi_gbl_FADT->Xfirmware_ctrl);
+	address.pointer.value = acpi_gbl_FADT->Xfirmware_ctrl;
 
 	status = acpi_tb_get_secondary_table (&address, FACS_SIG, &table_info);
 	if (ACPI_FAILURE (status)) {
@@ -268,7 +268,7 @@
 	/*
 	 * Get/install the DSDT (Pointed to by the FADT)
 	 */
-	address.pointer.value = ACPI_GET_ADDRESS (acpi_gbl_FADT->Xdsdt);
+	address.pointer.value = acpi_gbl_FADT->Xdsdt;
 
 	status = acpi_tb_get_secondary_table (&address, DSDT_SIG, &table_info);
 	if (ACPI_FAILURE (status)) {
diff -Nru a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
--- a/drivers/acpi/tables/tbinstal.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/tables/tbinstal.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbinstal - ACPI table installation and removal
- *              $Revision: 64 $
+ *              $Revision: 65 $
  *
  *****************************************************************************/
 
@@ -48,7 +48,7 @@
 
 acpi_status
 acpi_tb_match_signature (
-	NATIVE_CHAR             *signature,
+	char                    *signature,
 	acpi_table_desc         *table_info,
 	u8                      search_type)
 {
diff -Nru a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c
--- a/drivers/acpi/tables/tbrsdt.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/tables/tbrsdt.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbrsdt - ACPI RSDT table utilities
- *              $Revision: 4 $
+ *              $Revision: 5 $
  *
  *****************************************************************************/
 
@@ -80,7 +80,7 @@
 	/*
 	 *  The signature and checksum must both be correct
 	 */
-	if (ACPI_STRNCMP ((NATIVE_CHAR *) rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) {
+	if (ACPI_STRNCMP ((char *) rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) {
 		/* Nope, BAD Signature */
 
 		status = AE_BAD_SIGNATURE;
@@ -163,7 +163,7 @@
 		out_address->pointer.value = acpi_gbl_RSDP->rsdt_physical_address;
 	}
 	else {
-		out_address->pointer.value = ACPI_GET_ADDRESS (acpi_gbl_RSDP->xsdt_physical_address);
+		out_address->pointer.value = acpi_gbl_RSDP->xsdt_physical_address;
 	}
 }
 
diff -Nru a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c
--- a/drivers/acpi/tables/tbxfroot.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/acpi/tables/tbxfroot.c	Sun Dec 15 18:08:30 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: tbxfroot - Find the root ACPI table (RSDT)
- *              $Revision: 66 $
+ *              $Revision: 67 $
  *
  *****************************************************************************/
 
@@ -49,9 +49,9 @@
 
 acpi_status
 acpi_tb_find_table (
-	NATIVE_CHAR             *signature,
-	NATIVE_CHAR             *oem_id,
-	NATIVE_CHAR             *oem_table_id,
+	char                    *signature,
+	char                    *oem_id,
+	char                    *oem_table_id,
 	acpi_table_header       **table_ptr)
 {
 	acpi_status             status;
@@ -173,7 +173,7 @@
 		/*
 		 *  The signature and checksum must both be correct
 		 */
-		if (ACPI_STRNCMP ((NATIVE_CHAR *) acpi_gbl_RSDP, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) {
+		if (ACPI_STRNCMP ((char *) acpi_gbl_RSDP, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0) {
 			/* Nope, BAD Signature */
 
 			return_ACPI_STATUS (AE_BAD_SIGNATURE);
@@ -227,8 +227,8 @@
 			address.pointer.value = ((RSDT_DESCRIPTOR *) rsdt_info.pointer)->table_offset_entry[i];
 		}
 		else {
-			address.pointer.value = ACPI_GET_ADDRESS (
-				((xsdt_descriptor *) rsdt_info.pointer)->table_offset_entry[i]);
+			address.pointer.value =
+				((xsdt_descriptor *) rsdt_info.pointer)->table_offset_entry[i];
 		}
 
 		/* Get the table header */
@@ -346,7 +346,7 @@
 
 		/* The signature and checksum must both be correct */
 
-		if (ACPI_STRNCMP ((NATIVE_CHAR *) mem_rover,
+		if (ACPI_STRNCMP ((char *) mem_rover,
 				RSDP_SIG, sizeof (RSDP_SIG)-1) == 0 &&
 			acpi_tb_checksum (mem_rover, ACPI_RSDP_CHECKSUM_LENGTH) == 0) {
 			/* If so, we have found the RSDP */
diff -Nru a/drivers/acpi/utilities/Makefile b/drivers/acpi/utilities/Makefile
--- a/drivers/acpi/utilities/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 	 utcopy.o   utdelete.o  utglobal.o  utmath.o  utobject.o
 
 EXTRA_CFLAGS += $(ACPI_CFLAGS)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/acpi/utilities/utalloc.c b/drivers/acpi/utilities/utalloc.c
--- a/drivers/acpi/utilities/utalloc.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/utilities/utalloc.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utalloc - local cache and memory allocation routines
- *              $Revision: 128 $
+ *              $Revision: 130 $
  *
  *****************************************************************************/
 
@@ -305,10 +305,6 @@
 		if (buffer->length < required_length) {
 			status = AE_BUFFER_OVERFLOW;
 		}
-
-		/* Clear the buffer */
-
-		ACPI_MEMSET (buffer->pointer, 0, required_length);
 		break;
 	}
 
@@ -336,7 +332,7 @@
 acpi_ut_allocate (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	void                    *allocation;
@@ -386,7 +382,7 @@
 acpi_ut_callocate (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	void                    *allocation;
@@ -451,7 +447,7 @@
 acpi_ut_allocate_and_track (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	acpi_debug_mem_block    *allocation;
@@ -497,7 +493,7 @@
 acpi_ut_callocate_and_track (
 	ACPI_SIZE               size,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	acpi_debug_mem_block    *allocation;
@@ -547,7 +543,7 @@
 acpi_ut_free_and_track (
 	void                    *allocation,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	acpi_debug_mem_block    *debug_block;
@@ -652,7 +648,7 @@
 	ACPI_SIZE               size,
 	u8                      alloc_type,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	ACPI_MEMORY_LIST        *mem_list;
@@ -735,7 +731,7 @@
 	u32                     list_id,
 	acpi_debug_mem_block    *allocation,
 	u32                     component,
-	NATIVE_CHAR             *module,
+	char                    *module,
 	u32                     line)
 {
 	ACPI_MEMORY_LIST        *mem_list;
@@ -863,7 +859,7 @@
 void
 acpi_ut_dump_allocations (
 	u32                     component,
-	NATIVE_CHAR             *module)
+	char                    *module)
 {
 	acpi_debug_mem_block    *element;
 	ACPI_DESCRIPTOR         *descriptor;
diff -Nru a/drivers/acpi/utilities/utcopy.c b/drivers/acpi/utilities/utcopy.c
--- a/drivers/acpi/utilities/utcopy.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/utcopy.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utcopy - Internal to external object translation utilities
- *              $Revision: 107 $
+ *              $Revision: 109 $
  *
  *****************************************************************************/
 
@@ -87,7 +87,7 @@
 	switch (ACPI_GET_OBJECT_TYPE (internal_object)) {
 	case ACPI_TYPE_STRING:
 
-		external_object->string.pointer = (NATIVE_CHAR *) data_space;
+		external_object->string.pointer = (char *) data_space;
 		external_object->string.length = internal_object->string.length;
 		*buffer_space_used = ACPI_ROUND_UP_TO_NATIVE_WORD ((ACPI_SIZE) internal_object->string.length + 1);
 
diff -Nru a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c
--- a/drivers/acpi/utilities/utdebug.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/utdebug.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utdebug - Debug print routines
- *              $Revision: 105 $
+ *              $Revision: 106 $
  *
  *****************************************************************************/
 
@@ -288,7 +288,7 @@
 acpi_ut_trace_str (
 	u32                     line_number,
 	acpi_debug_print_info   *dbg_info,
-	NATIVE_CHAR             *string)
+	char                    *string)
 {
 
 	acpi_gbl_nesting_level++;
diff -Nru a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
--- a/drivers/acpi/utilities/utdelete.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/utdelete.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: utdelete - object deletion and reference count utilities
- *              $Revision: 93 $
+ *              $Revision: 94 $
  *
  ******************************************************************************/
 
@@ -74,6 +74,8 @@
 		/* Free the actual string buffer */
 
 		if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
+			/* But only if it is NOT a pointer into an ACPI table */
+
 			obj_pointer = object->string.pointer;
 		}
 		break;
@@ -86,7 +88,11 @@
 
 		/* Free the actual buffer */
 
-		obj_pointer = object->buffer.pointer;
+		if (!(object->common.flags & AOPOBJ_STATIC_POINTER)) {
+			/* But only if it is NOT a pointer into an ACPI table */
+
+			obj_pointer = object->buffer.pointer;
+		}
 		break;
 
 
diff -Nru a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
--- a/drivers/acpi/utilities/uteval.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/utilities/uteval.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: uteval - Object evaluation
- *              $Revision: 42 $
+ *              $Revision: 44 $
  *
  *****************************************************************************/
 
@@ -55,7 +55,7 @@
 acpi_status
 acpi_ut_evaluate_object (
 	acpi_namespace_node     *prefix_node,
-	NATIVE_CHAR             *path,
+	char                    *path,
 	u32                     expected_return_btypes,
 	acpi_operand_object     **return_desc)
 {
@@ -162,7 +162,7 @@
 
 acpi_status
 acpi_ut_evaluate_numeric_object (
-	NATIVE_CHAR             *object_name,
+	char                    *object_name,
 	acpi_namespace_node     *device_node,
 	acpi_integer            *address)
 {
diff -Nru a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
--- a/drivers/acpi/utilities/utglobal.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/utilities/utglobal.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utglobal - Global variables for the ACPI subsystem
- *              $Revision: 176 $
+ *              $Revision: 177 $
  *
  *****************************************************************************/
 
@@ -153,7 +153,7 @@
 
 const u8                    acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128};
 
-const NATIVE_CHAR           *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
+const char                  *acpi_gbl_db_sleep_states[ACPI_S_STATE_COUNT] = {
 			  "\\_S0_",
 			  "\\_S1_",
 			  "\\_S2_",
@@ -239,7 +239,7 @@
 
 /* Hex to ASCII conversion table */
 
-static const NATIVE_CHAR    acpi_gbl_hex_to_ascii[] =
+static const char           acpi_gbl_hex_to_ascii[] =
 			  {'0','1','2','3','4','5','6','7',
 					 '8','9','A','B','C','D','E','F'};
 
@@ -357,7 +357,7 @@
 
 /* Region type decoding */
 
-const NATIVE_CHAR *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
+const char        *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] =
 {
 	"System_memory",
 	"System_iO",
@@ -370,7 +370,7 @@
 };
 
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_region_name (
 	u8                      space_id)
 {
@@ -385,7 +385,7 @@
 		return ("Invalid_space_iD");
 	}
 
-	return ((NATIVE_CHAR *) acpi_gbl_region_types[space_id]);
+	return ((char *) acpi_gbl_region_types[space_id]);
 }
 
 
@@ -403,7 +403,7 @@
 
 /* Event type decoding */
 
-static const NATIVE_CHAR *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
+static const char        *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] =
 {
 	"PM_Timer",
 	"Global_lock",
@@ -413,7 +413,7 @@
 };
 
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_event_name (
 	u32                     event_id)
 {
@@ -423,7 +423,7 @@
 		return ("Invalid_event_iD");
 	}
 
-	return ((NATIVE_CHAR *) acpi_gbl_event_types[event_id]);
+	return ((char *) acpi_gbl_event_types[event_id]);
 }
 
 
@@ -448,10 +448,10 @@
  * indicatewhat type is actually going to be stored for this entry.
  */
 
-static const NATIVE_CHAR    acpi_gbl_bad_type[] = "UNDEFINED";
+static const char           acpi_gbl_bad_type[] = "UNDEFINED";
 #define TYPE_NAME_LENGTH    12                           /* Maximum length of each string */
 
-static const NATIVE_CHAR    *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
+static const char           *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */
 {
 	/* 00 */ "Untyped",
 	/* 01 */ "Integer",
@@ -486,21 +486,21 @@
 };
 
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_type_name (
 	acpi_object_type        type)
 {
 
 	if (type > ACPI_TYPE_INVALID)
 	{
-		return ((NATIVE_CHAR *) acpi_gbl_bad_type);
+		return ((char *) acpi_gbl_bad_type);
 	}
 
-	return ((NATIVE_CHAR *) acpi_gbl_ns_type_names[type]);
+	return ((char *) acpi_gbl_ns_type_names[type]);
 }
 
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_object_type_name (
 	acpi_operand_object     *obj_desc)
 {
@@ -533,7 +533,7 @@
  *
  ****************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ut_get_mutex_name (
 	u32                     mutex_id)
 {
diff -Nru a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
--- a/drivers/acpi/utilities/utinit.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/utinit.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utinit - Common ACPI subsystem initialization
- *              $Revision: 114 $
+ *              $Revision: 115 $
  *
  *****************************************************************************/
 
@@ -49,7 +49,7 @@
 
 static void
 acpi_ut_fadt_register_error (
-	NATIVE_CHAR             *register_name,
+	char                    *register_name,
 	u32                     value,
 	ACPI_SIZE               offset)
 {
@@ -92,22 +92,22 @@
 				  ACPI_FADT_OFFSET (pm1_cnt_len));
 	}
 
-	if (!ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xpm1a_evt_blk.address)) {
+	if (!acpi_gbl_FADT->Xpm1a_evt_blk.address) {
 		acpi_ut_fadt_register_error ("X_PM1a_EVT_BLK", 0,
 				  ACPI_FADT_OFFSET (Xpm1a_evt_blk.address));
 	}
 
-	if (!ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xpm1a_cnt_blk.address)) {
+	if (!acpi_gbl_FADT->Xpm1a_cnt_blk.address) {
 		acpi_ut_fadt_register_error ("X_PM1a_CNT_BLK", 0,
 				  ACPI_FADT_OFFSET (Xpm1a_cnt_blk.address));
 	}
 
-	if (!ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xpm_tmr_blk.address)) {
+	if (!acpi_gbl_FADT->Xpm_tmr_blk.address) {
 		acpi_ut_fadt_register_error ("X_PM_TMR_BLK", 0,
 				  ACPI_FADT_OFFSET (Xpm_tmr_blk.address));
 	}
 
-	if ((ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xpm2_cnt_blk.address) &&
+	if ((acpi_gbl_FADT->Xpm2_cnt_blk.address &&
 		!acpi_gbl_FADT->pm2_cnt_len)) {
 		acpi_ut_fadt_register_error ("PM2_CNT_LEN",
 				  (u32) acpi_gbl_FADT->pm2_cnt_len,
@@ -122,14 +122,14 @@
 
 	/* Length of GPE blocks must be a multiple of 2 */
 
-	if (ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xgpe0_blk.address) &&
+	if (acpi_gbl_FADT->Xgpe0_blk.address &&
 		(acpi_gbl_FADT->gpe0_blk_len & 1)) {
 		acpi_ut_fadt_register_error ("(x)GPE0_BLK_LEN",
 				  (u32) acpi_gbl_FADT->gpe0_blk_len,
 				  ACPI_FADT_OFFSET (gpe0_blk_len));
 	}
 
-	if (ACPI_VALID_ADDRESS (acpi_gbl_FADT->Xgpe1_blk.address) &&
+	if (acpi_gbl_FADT->Xgpe1_blk.address &&
 		(acpi_gbl_FADT->gpe1_blk_len & 1)) {
 		acpi_ut_fadt_register_error ("(x)GPE1_BLK_LEN",
 				  (u32) acpi_gbl_FADT->gpe1_blk_len,
diff -Nru a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
--- a/drivers/acpi/utilities/utmisc.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/acpi/utilities/utmisc.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Module Name: utmisc - common utility procedures
- *              $Revision: 90 $
+ *              $Revision: 92 $
  *
  ******************************************************************************/
 
@@ -283,7 +283,7 @@
 acpi_ut_valid_acpi_name (
 	u32                     name)
 {
-	NATIVE_CHAR             *name_ptr = (NATIVE_CHAR *) &name;
+	char                    *name_ptr = (char *) &name;
 	u32                     i;
 
 
@@ -316,7 +316,7 @@
 
 u8
 acpi_ut_valid_acpi_character (
-	NATIVE_CHAR             character)
+	char                    character)
 {
 
 	ACPI_FUNCTION_ENTRY ();
@@ -345,7 +345,7 @@
 
 acpi_status
 acpi_ut_strtoul64 (
-	NATIVE_CHAR             *string,
+	char                    *string,
 	u32                     base,
 	acpi_integer            *ret_integer)
 {
@@ -485,11 +485,11 @@
  *
  ******************************************************************************/
 
-NATIVE_CHAR *
+char *
 acpi_ut_strupr (
-	NATIVE_CHAR             *src_string)
+	char                    *src_string)
 {
-	NATIVE_CHAR             *string;
+	char                    *string;
 
 
 	ACPI_FUNCTION_ENTRY ();
@@ -1420,7 +1420,7 @@
 
 void
 acpi_ut_report_error (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id)
 {
@@ -1447,7 +1447,7 @@
 
 void
 acpi_ut_report_warning (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id)
 {
@@ -1473,7 +1473,7 @@
 
 void
 acpi_ut_report_info (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id)
 {
diff -Nru a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c
--- a/drivers/acpi/utilities/utobject.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/acpi/utilities/utobject.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: utobject - ACPI object create/delete/size/cache routines
- *              $Revision: 79 $
+ *              $Revision: 81 $
  *
  *****************************************************************************/
 
@@ -56,7 +56,7 @@
 
 acpi_operand_object  *
 acpi_ut_create_internal_object_dbg (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id,
 	acpi_object_type        type)
@@ -248,7 +248,7 @@
 
 void *
 acpi_ut_allocate_object_desc_dbg (
-	NATIVE_CHAR             *module_name,
+	char                    *module_name,
 	u32                     line_number,
 	u32                     component_id)
 {
diff -Nru a/drivers/atm/Makefile b/drivers/atm/Makefile
--- a/drivers/atm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/atm/Makefile	Sun Dec 15 18:08:28 2002
@@ -51,8 +51,6 @@
   endif
 endif
 
-include $(TOPDIR)/Rules.make
-
 # FORE Systems 200E-series firmware magic
 $(obj)/fore200e_pca_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_PCA_FW)) \
 			  $(obj)/fore200e_mkfirm
diff -Nru a/drivers/atm/atmdev_init.c b/drivers/atm/atmdev_init.c
--- a/drivers/atm/atmdev_init.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/atm/atmdev_init.c	Sun Dec 15 18:08:29 2002
@@ -19,9 +19,6 @@
 #ifdef CONFIG_ATM_HORIZON
 extern int hrz_detect(void);
 #endif
-#ifdef CONFIG_ATM_IA
-extern int ia_detect(void);
-#endif
 #ifdef CONFIG_ATM_FORE200E
 extern int fore200e_detect(void);
 #endif
@@ -52,9 +49,6 @@
 #endif
 #ifdef CONFIG_ATM_HORIZON
 	devs += hrz_detect();
-#endif
-#ifdef CONFIG_ATM_IA
-	devs += ia_detect();
 #endif
 #ifdef CONFIG_ATM_FORE200E
 	devs += fore200e_detect();
diff -Nru a/drivers/base/Makefile b/drivers/base/Makefile
--- a/drivers/base/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/base/Makefile	Sun Dec 15 18:08:31 2002
@@ -12,5 +12,3 @@
 
 export-objs	:= core.o power.o sys.o bus.o driver.o \
 			class.o intf.o platform.o firmware.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/base/class.c	Sun Dec 15 18:08:32 2002
@@ -42,8 +42,8 @@
 }
 
 static struct sysfs_ops class_sysfs_ops = {
-	show:	devclass_attr_show,
-	store:	devclass_attr_store,
+	.show	= devclass_attr_show,
+	.store	= devclass_attr_store,
 };
 
 static struct subsystem class_subsys = {
diff -Nru a/drivers/base/fs/Makefile b/drivers/base/fs/Makefile
--- a/drivers/base/fs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/base/fs/Makefile	Sun Dec 15 18:08:29 2002
@@ -1,5 +1,3 @@
 obj-y		:= device.o
 
 export-objs	:= device.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/base/hotplug.c b/drivers/base/hotplug.c
--- a/drivers/base/hotplug.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/base/hotplug.c	Sun Dec 15 18:08:28 2002
@@ -149,6 +149,7 @@
 int class_hotplug (struct device *dev, const char *action)
 {
 	struct device_class * cls;
+	int retval;
 
 	pr_debug ("%s\n", __FUNCTION__);
 
@@ -162,5 +163,9 @@
 	if (!cls)
 		return -ENODEV;
 
-	return do_hotplug (dev, cls->name, action, cls->hotplug);
+	retval = do_hotplug (dev, cls->name, action, cls->hotplug);
+
+	put_devclass(cls);
+
+	return retval;
 }
diff -Nru a/drivers/base/memblk.c b/drivers/base/memblk.c
--- a/drivers/base/memblk.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/base/memblk.c	Sun Dec 15 18:08:32 2002
@@ -49,7 +49,7 @@
 
 static int __init register_memblk_type(void)
 {
-	driver_register(&memblk_driver);
-	return devclass_register(&memblk_devclass);
+	int error = devclass_register(&memblk_devclass);
+	return error ? error : driver_register(&memblk_driver);
 }
 postcore_initcall(register_memblk_type);
diff -Nru a/drivers/base/node.c b/drivers/base/node.c
--- a/drivers/base/node.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/base/node.c	Sun Dec 15 18:08:28 2002
@@ -93,7 +93,7 @@
 
 static int __init register_node_type(void)
 {
-	devclass_register(&node_devclass);
-	return driver_register(&node_driver);
+	int error = devclass_register(&node_devclass);
+	return error ? error : driver_register(&node_driver);
 }
 postcore_initcall(register_node_type);
diff -Nru a/drivers/block/Makefile b/drivers/block/Makefile
--- a/drivers/block/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/block/Makefile	Sun Dec 15 18:08:31 2002
@@ -31,5 +31,3 @@
 
 obj-$(CONFIG_BLK_DEV_UMEM)	+= umem.o
 obj-$(CONFIG_BLK_DEV_NBD)	+= nbd.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/block/paride/Makefile b/drivers/block/paride/Makefile
--- a/drivers/block/paride/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/block/paride/Makefile	Sun Dec 15 18:08:32 2002
@@ -28,5 +28,3 @@
 obj-$(CONFIG_PARIDE_PF)		+= pf.o
 obj-$(CONFIG_PARIDE_PT)		+= pt.o
 obj-$(CONFIG_PARIDE_PG)		+= pg.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/block/rd.c b/drivers/block/rd.c
--- a/drivers/block/rd.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/block/rd.c	Sun Dec 15 18:08:29 2002
@@ -132,7 +132,6 @@
 
 static struct address_space_operations ramdisk_aops = {
 	.readpage = ramdisk_readpage,
-	.writepage = fail_writepage,
 	.prepare_write = ramdisk_prepare_write,
 	.commit_write = ramdisk_commit_write,
 };
diff -Nru a/drivers/bluetooth/Makefile b/drivers/bluetooth/Makefile
--- a/drivers/bluetooth/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/bluetooth/Makefile	Sun Dec 15 18:08:32 2002
@@ -13,5 +13,3 @@
 hci_uart-$(CONFIG_BT_HCIUART_H4)	+= hci_h4.o
 hci_uart-$(CONFIG_BT_HCIUART_BCSP)	+= hci_bcsp.o
 hci_uart-objs				:= $(hci_uart-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/cdrom/Makefile b/drivers/cdrom/Makefile
--- a/drivers/cdrom/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/cdrom/Makefile	Sun Dec 15 18:08:29 2002
@@ -36,7 +36,3 @@
 obj-$(CONFIG_SBPCD)		+= sbpcd.o      cdrom.o
 obj-$(CONFIG_SJCD)		+= sjcd.o
 obj-$(CONFIG_CDU535)		+= sonycd535.o
-
-# Hand off to Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/Makefile b/drivers/char/Makefile
--- a/drivers/char/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/char/Makefile	Sun Dec 15 18:08:32 2002
@@ -87,8 +87,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE)
 	$(call do_cmd,CONMK  $@,$(objtree)/scripts/conmakehash $< > $@)
 
diff -Nru a/drivers/char/drm/Makefile b/drivers/char/drm/Makefile
--- a/drivers/char/drm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/char/drm/Makefile	Sun Dec 15 18:08:32 2002
@@ -19,5 +19,3 @@
 obj-$(CONFIG_DRM_I810)	+= i810.o
 obj-$(CONFIG_DRM_I830)	+= i830.o
 obj-$(CONFIG_DRM_FFB)   += ffb.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c
--- a/drivers/char/drm/ffb_drv.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/drm/ffb_drv.c	Sun Dec 15 18:08:29 2002
@@ -28,16 +28,16 @@
 
 #define DRIVER_FOPS						\
 static struct file_operations	DRM(fops) = {			\
-	owner:   		THIS_MODULE,			\
-	open:	 		DRM(open),			\
-	flush:	 		DRM(flush),			\
-	release: 		DRM(release),			\
-	ioctl:	 		DRM(ioctl),			\
-	mmap:	 		DRM(mmap),			\
-	read:	 		DRM(read),			\
-	fasync:	 		DRM(fasync),			\
-	poll:	 		DRM(poll),			\
-	get_unmapped_area:	ffb_get_unmapped_area,		\
+	.owner   		= THIS_MODULE,			\
+	.open	 		= DRM(open),			\
+	.flush	 		= DRM(flush),			\
+	.release 		= DRM(release),			\
+	.ioctl	 		= DRM(ioctl),			\
+	.mmap	 		= DRM(mmap),			\
+	.read	 		= DRM(read),			\
+	.fasync	 		= DRM(fasync),			\
+	.poll	 		= DRM(poll),			\
+	.get_unmapped_area	= ffb_get_unmapped_area,		\
 }
 
 #define DRIVER_COUNT_CARDS()	ffb_count_card_instances()
diff -Nru a/drivers/char/ftape/Makefile b/drivers/char/ftape/Makefile
--- a/drivers/char/ftape/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/char/ftape/Makefile	Sun Dec 15 18:08:32 2002
@@ -26,5 +26,3 @@
 obj-$(CONFIG_FTAPE)		+= lowlevel/
 obj-$(CONFIG_ZFTAPE)		+= zftape/
 obj-$(CONFIG_ZFT_COMPRESSOR)	+= compressor/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/ftape/compressor/Makefile b/drivers/char/ftape/compressor/Makefile
--- a/drivers/char/ftape/compressor/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/ftape/compressor/Makefile	Sun Dec 15 18:08:29 2002
@@ -29,5 +29,3 @@
 zft-compressor-objs := zftape-compress.o lzrw3.o
 
 CFLAGS_lzrw3.o	:= -O6 -funroll-all-loops
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/ftape/lowlevel/Makefile b/drivers/char/ftape/lowlevel/Makefile
--- a/drivers/char/ftape/lowlevel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/char/ftape/lowlevel/Makefile	Sun Dec 15 18:08:28 2002
@@ -43,6 +43,3 @@
 ifeq ($(CONFIG_FT_PROC_FS),y)
 ftape-objs += ftape-proc.o
 endif
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/char/ftape/zftape/Makefile b/drivers/char/ftape/zftape/Makefile
--- a/drivers/char/ftape/zftape/Makefile	Sun Dec 15 18:08:30 2002
+++ b/drivers/char/ftape/zftape/Makefile	Sun Dec 15 18:08:30 2002
@@ -36,6 +36,3 @@
 	       zftape-init.o zftape-buffers.o zftape_syms.o
 
 EXTRA_CFLAGS := -DZFT_OBSOLETE
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
--- a/drivers/char/ftape/zftape/zftape-init.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/ftape/zftape/zftape-init.c	Sun Dec 15 18:08:29 2002
@@ -96,13 +96,13 @@
 
 static struct file_operations zft_cdev =
 {
-	owner:		THIS_MODULE,
-	read:		zft_read,
-	write:		zft_write,
-	ioctl:		zft_ioctl,
-	mmap:		zft_mmap,
-	open:		zft_open,
-	release:	zft_close,
+	.owner		= THIS_MODULE,
+	.read		= zft_read,
+	.write		= zft_write,
+	.ioctl		= zft_ioctl,
+	.mmap		= zft_mmap,
+	.open		= zft_open,
+	.release	= zft_close,
 };
 
 /*      Open floppy tape device
diff -Nru a/drivers/char/mem.c b/drivers/char/mem.c
--- a/drivers/char/mem.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/mem.c	Sun Dec 15 18:08:29 2002
@@ -475,17 +475,19 @@
 static ssize_t read_zero(struct file * file, char * buf, 
 			 size_t count, loff_t *ppos)
 {
-	unsigned long left;
+	size_t todo = count;
 
-	if (!count)
-		return 0;
+	while (todo) {
+		size_t chunk = todo;
 
-	for (left = count; left > 0; left--, buf++) {
-		if (put_user(0, buf))
+		if (chunk > 4096)
+			chunk = 4096;	/* Just for latency reasons */
+		if (clear_user(buf, chunk))
 			return -EFAULT;
+		buf += chunk;
+		todo -= chunk;
 		cond_resched();
 	}
-
 	return count;
 }
 
@@ -598,6 +600,28 @@
 	.write		= write_full,
 };
 
+static ssize_t kmsg_write(struct file * file, const char * buf,
+			  size_t count, loff_t *ppos)
+{
+	char *tmp;
+	int ret;
+
+	tmp = kmalloc(count + 1, GFP_KERNEL);
+	if (tmp == NULL)
+		return -ENOMEM;
+	ret = -EFAULT;
+	if (!copy_from_user(tmp, buf, count)) {
+		tmp[count] = 0;
+		ret = printk("%s", tmp);
+	}
+	kfree(tmp);
+	return ret;
+}
+
+static struct file_operations kmsg_fops = {
+	write:		kmsg_write,
+};
+
 static int memory_open(struct inode * inode, struct file * filp)
 {
 	switch (minor(inode->i_rdev)) {
@@ -627,6 +651,9 @@
 		case 9:
 			filp->f_op = &urandom_fops;
 			break;
+		case 11:
+			filp->f_op = &kmsg_fops;
+			break;
 		default:
 			return -ENXIO;
 	}
@@ -653,7 +680,8 @@
 	{5, "zero",    S_IRUGO | S_IWUGO,           &zero_fops},
 	{7, "full",    S_IRUGO | S_IWUGO,           &full_fops},
 	{8, "random",  S_IRUGO | S_IWUSR,           &random_fops},
-	{9, "urandom", S_IRUGO | S_IWUSR,           &urandom_fops}
+	{9, "urandom", S_IRUGO | S_IWUSR,           &urandom_fops},
+	{11,"kmsg",    S_IRUGO | S_IWUSR,           &kmsg_fops},
     };
     int i;
 
diff -Nru a/drivers/char/mwave/Makefile b/drivers/char/mwave/Makefile
--- a/drivers/char/mwave/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/char/mwave/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,5 +13,3 @@
 
 # To compile in lots (~20 KiB) of run-time enablable printk()s for debugging:
 EXTRA_CFLAGS += -DMW_TRACE
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/mwave/mwavedd.c b/drivers/char/mwave/mwavedd.c
--- a/drivers/char/mwave/mwavedd.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/char/mwave/mwavedd.c	Sun Dec 15 18:08:28 2002
@@ -429,12 +429,12 @@
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static struct file_operations mwave_fops = {
-	owner:THIS_MODULE,
-	read:mwave_read,
-	write:mwave_write,
-	ioctl:mwave_ioctl,
-	open:mwave_open,
-	release:mwave_close
+	.owner		= THIS_MODULE,
+	.read		= mwave_read,
+	.write		= mwave_write,
+	.ioctl		= mwave_ioctl,
+	.open		= mwave_open,
+	.release	= mwave_close
 };
 #else
 static struct file_operations mwave_fops = {
diff -Nru a/drivers/char/pcmcia/Makefile b/drivers/char/pcmcia/Makefile
--- a/drivers/char/pcmcia/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/pcmcia/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 #
 
 obj-$(CONFIG_SYNCLINK_CS) += synclink_cs.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/rio/Makefile b/drivers/char/rio/Makefile
--- a/drivers/char/rio/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/rio/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 
 rio-objs := rio_linux.o rioinit.o rioboot.o riocmd.o rioctrl.o riointr.o \
             rioparam.o riopcicopy.o rioroute.o riotable.o riotty.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
--- a/drivers/char/rio/rio_linux.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/rio/rio_linux.c	Sun Dec 15 18:08:29 2002
@@ -276,8 +276,8 @@
  */
 
 static struct file_operations rio_fw_fops = {
-	owner:		THIS_MODULE,
-	ioctl:		rio_fw_ioctl,
+	.owner		= THIS_MODULE,
+	.ioctl		= rio_fw_ioctl,
 };
 
 struct miscdevice rio_fw_device = {
diff -Nru a/drivers/char/sonypi.c b/drivers/char/sonypi.c
--- a/drivers/char/sonypi.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/char/sonypi.c	Sun Dec 15 18:08:30 2002
@@ -714,11 +714,11 @@
 	       SONYPI_DRIVER_MAJORVERSION,
 	       SONYPI_DRIVER_MINORVERSION);
 	printk(KERN_INFO "sonypi: detected %s model, "
-	       "verbose = %s, fnkeyinit = %s, camera = %s, "
+	       "verbose = %d, fnkeyinit = %s, camera = %s, "
 	       "compat = %s, mask = 0x%08lx\n",
 	       (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE1) ?
 			"type1" : "type2",
-	       verbose ? "on" : "off",
+	       verbose,
 	       fnkeyinit ? "on" : "off",
 	       camera ? "on" : "off",
 	       compat ? "on" : "off",
diff -Nru a/drivers/char/sonypi.h b/drivers/char/sonypi.h
--- a/drivers/char/sonypi.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/sonypi.h	Sun Dec 15 18:08:29 2002
@@ -37,7 +37,7 @@
 #ifdef __KERNEL__
 
 #define SONYPI_DRIVER_MAJORVERSION	 1
-#define SONYPI_DRIVER_MINORVERSION	16
+#define SONYPI_DRIVER_MINORVERSION	17
 
 #define SONYPI_DEVICE_MODEL_TYPE1	1
 #define SONYPI_DEVICE_MODEL_TYPE2	2
@@ -171,6 +171,13 @@
 	u8	data;
 	u8	event;
 };
+
+/* The set of possible button release events */
+static struct sonypi_event sonypi_releaseev[] = {
+	{ 0x00, SONYPI_EVENT_ANYBUTTON_RELEASED },
+	{ 0, 0 }
+};
+
 /* The set of possible jogger events  */
 static struct sonypi_event sonypi_joggerev[] = {
 	{ 0x1f, SONYPI_EVENT_JOGDIAL_UP },
@@ -186,7 +193,6 @@
 	{ 0x5d, SONYPI_EVENT_JOGDIAL_VFAST_UP_PRESSED },
 	{ 0x43, SONYPI_EVENT_JOGDIAL_VFAST_DOWN_PRESSED },
 	{ 0x40, SONYPI_EVENT_JOGDIAL_PRESSED },
-	{ 0x00, SONYPI_EVENT_JOGDIAL_RELEASED },
 	{ 0, 0 }
 };
 
@@ -195,7 +201,6 @@
 	{ 0x05, SONYPI_EVENT_CAPTURE_PARTIALPRESSED },
 	{ 0x07, SONYPI_EVENT_CAPTURE_PRESSED },
 	{ 0x01, SONYPI_EVENT_CAPTURE_PARTIALRELEASED },
-	{ 0x00, SONYPI_EVENT_CAPTURE_RELEASED },
 	{ 0, 0 }
 };
 
@@ -293,6 +298,7 @@
 	unsigned long		mask;
 	struct sonypi_event *	events;
 } sonypi_eventtypes[] = {
+	{ SONYPI_DEVICE_MODEL_TYPE1, 0, 0xffffffff, sonypi_releaseev },
 	{ SONYPI_DEVICE_MODEL_TYPE1, 0x70, SONYPI_MEYE_MASK, sonypi_meyeev },
 	{ SONYPI_DEVICE_MODEL_TYPE1, 0x30, SONYPI_LID_MASK, sonypi_lidev },
 	{ SONYPI_DEVICE_MODEL_TYPE1, 0x60, SONYPI_CAPTURE_MASK, sonypi_captureev },
@@ -301,6 +307,7 @@
 	{ SONYPI_DEVICE_MODEL_TYPE1, 0x30, SONYPI_BLUETOOTH_MASK, sonypi_blueev },
 	{ SONYPI_DEVICE_MODEL_TYPE1, 0x40, SONYPI_PKEY_MASK, sonypi_pkeyev },
 
+	{ SONYPI_DEVICE_MODEL_TYPE2, 0, 0xffffffff, sonypi_releaseev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x38, SONYPI_LID_MASK, sonypi_lidev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_JOGGER_MASK, sonypi_joggerev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_CAPTURE_MASK, sonypi_captureev },
diff -Nru a/drivers/char/sysrq.c b/drivers/char/sysrq.c
--- a/drivers/char/sysrq.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/char/sysrq.c	Sun Dec 15 18:08:31 2002
@@ -26,6 +26,7 @@
 #include <linux/kbd_kern.h>
 #include <linux/quotaops.h>
 #include <linux/smp_lock.h>
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/suspend.h>
 #include <linux/writeback.h>
diff -Nru a/drivers/char/vt.c b/drivers/char/vt.c
--- a/drivers/char/vt.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/char/vt.c	Sun Dec 15 18:08:31 2002
@@ -262,7 +262,7 @@
 		return;
 	d = (unsigned short *) (origin+video_size_row*t);
 	s = (unsigned short *) (origin+video_size_row*(t+nr));
-	scr_memcpyw(d, s, (b-t-nr) * video_size_row);
+	scr_memmovew(d, s, (b-t-nr) * video_size_row);
 	scr_memsetw(d + (b-t-nr) * video_num_columns, video_erase_char, video_size_row*nr);
 }
 
diff -Nru a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile
--- a/drivers/char/watchdog/Makefile	Sun Dec 15 18:08:30 2002
+++ b/drivers/char/watchdog/Makefile	Sun Dec 15 18:08:30 2002
@@ -23,5 +23,3 @@
 obj-$(CONFIG_SH_WDT) += shwdt.o
 obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
 obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c
--- a/drivers/char/watchdog/softdog.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/char/watchdog/softdog.c	Sun Dec 15 18:08:29 2002
@@ -139,7 +139,7 @@
 	unsigned int cmd, unsigned long arg)
 {
 	static struct watchdog_info ident = {
-		identity: "Software Watchdog",
+		.identity = "Software Watchdog",
 	};
 	switch (cmd) {
 		default:
@@ -158,17 +158,17 @@
 }
 
 static struct file_operations softdog_fops = {
-	owner:		THIS_MODULE,
-	write:		softdog_write,
-	ioctl:		softdog_ioctl,
-	open:		softdog_open,
-	release:	softdog_release,
+	.owner		= THIS_MODULE,
+	.write		= softdog_write,
+	.ioctl		= softdog_ioctl,
+	.open		= softdog_open,
+	.release	= softdog_release,
 };
 
 static struct miscdevice softdog_miscdev = {
-	minor:		WATCHDOG_MINOR,
-	name:		"watchdog",
-	fops:		&softdog_fops,
+	.minor		= WATCHDOG_MINOR,
+	.name		= "watchdog",
+	.fops		= &softdog_fops,
 };
 
 static char banner[] __initdata = KERN_INFO "Software Watchdog Timer: 0.06, soft_margin: %d sec, nowayout: %d\n";
diff -Nru a/drivers/dio/Makefile b/drivers/dio/Makefile
--- a/drivers/dio/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/dio/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y := dio.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/fc4/Makefile b/drivers/fc4/Makefile
--- a/drivers/fc4/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/fc4/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 obj-$(CONFIG_FC4) += fc4.o
 obj-$(CONFIG_FC4_SOC) += soc.o
 obj-$(CONFIG_FC4_SOCAL) += socal.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/hotplug/Makefile b/drivers/hotplug/Makefile
--- a/drivers/hotplug/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/hotplug/Makefile	Sun Dec 15 18:08:29 2002
@@ -45,6 +45,3 @@
 ifeq ($(CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM),y)
 	cpqphp-objs += cpqphp_nvram.o
 endif
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
--- a/drivers/i2c/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/i2c/Makefile	Sun Dec 15 18:08:28 2002
@@ -21,6 +21,3 @@
 
 # This is needed for automatic patch generation: sensors code starts here
 # This is needed for automatic patch generation: sensors code ends here
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/ide/Makefile b/drivers/ide/Makefile
--- a/drivers/ide/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/ide/Makefile	Sun Dec 15 18:08:29 2002
@@ -30,5 +30,3 @@
 endif
 
 obj-$(CONFIG_BLK_DEV_IDE)		+= legacy/ ppc/ arm/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/ide/arm/Makefile b/drivers/ide/arm/Makefile
--- a/drivers/ide/arm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/ide/arm/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 obj-$(CONFIG_BLK_DEV_IDE_RAPIDE)	+= rapide.o
 
 EXTRA_CFLAGS	:= -Idrivers/ide
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/ide/legacy/Makefile b/drivers/ide/legacy/Makefile
--- a/drivers/ide/legacy/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/ide/legacy/Makefile	Sun Dec 15 18:08:28 2002
@@ -18,5 +18,3 @@
 obj-$(CONFIG_BLK_DEV_HD)		+= hd.o
 
 EXTRA_CFLAGS	:= -Idrivers/ide
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/ide/pci/Makefile b/drivers/ide/pci/Makefile
--- a/drivers/ide/pci/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/ide/pci/Makefile	Sun Dec 15 18:08:28 2002
@@ -34,5 +34,3 @@
 obj-$(CONFIG_BLK_DEV_GENERIC)          += generic.o
 
 EXTRA_CFLAGS	:= -Idrivers/ide
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/ide/pci/cs5520.h b/drivers/ide/pci/cs5520.h
--- a/drivers/ide/pci/cs5520.h	Sun Dec 15 18:08:33 2002
+++ b/drivers/ide/pci/cs5520.h	Sun Dec 15 18:08:33 2002
@@ -17,10 +17,10 @@
 
 static ide_pci_host_proc_t cs5520_procs[] __initdata = {
 	{
-		name:		"cs5520",
-		set:		1,
-		get_info:	cs5520_get_info,
-		parent:		NULL,
+		.name		= "cs5520",
+		.set		= 1,
+		.get_info	= cs5520_get_info,
+		.parent		= NULL,
 	},
 };
 #endif  /* defined(DISPLAY_CS5520_TIMINGS) && defined(CONFIG_PROC_FS) */
@@ -31,32 +31,32 @@
 
 static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
 	{
-		vendor:		PCI_VENDOR_ID_CYRIX,
-		device:		PCI_DEVICE_ID_CYRIX_5510,
-		name:		"Cyrix 5510",
-		init_chipset:	init_chipset_cs5520,
-		init_setup_dma: cs5520_init_setup_dma,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_cs5520,
-		isa_ports:	1,
-		channels:	2,
-		autodma:	AUTODMA,
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_CYRIX,
+		.device		= PCI_DEVICE_ID_CYRIX_5510,
+		.name		= "Cyrix 5510",
+		.init_chipset	= init_chipset_cs5520,
+		.init_setup_dma = cs5520_init_setup_dma,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_cs5520,
+		.isa_ports	= 1,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},
 	{
-		vendor:		PCI_VENDOR_ID_CYRIX,
-		device:		PCI_DEVICE_ID_CYRIX_5520,
-		name:		"Cyrix 5520",
-		init_chipset:	init_chipset_cs5520,
-		init_setup_dma: cs5520_init_setup_dma,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_cs5520,
-		isa_ports:	1,
-		channels:	2,
-		autodma:	AUTODMA,
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_CYRIX,
+		.device		= PCI_DEVICE_ID_CYRIX_5520,
+		.name		= "Cyrix 5520",
+		.init_chipset	= init_chipset_cs5520,
+		.init_setup_dma = cs5520_init_setup_dma,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_cs5520,
+		.isa_ports	= 1,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	}
 };
 
diff -Nru a/drivers/ide/pci/sc1200.h b/drivers/ide/pci/sc1200.h
--- a/drivers/ide/pci/sc1200.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ide/pci/sc1200.h	Sun Dec 15 18:08:28 2002
@@ -17,10 +17,10 @@
 
 static ide_pci_host_proc_t sc1200_procs[] __initdata = {
 	{
-		name:		"sc1200",
-		set:		1,
-		get_info:	sc1200_get_info,
-		parent:		NULL,
+		.name		= "sc1200",
+		.set		= 1,
+		.get_info	= sc1200_get_info,
+		.parent		= NULL,
 	},
 };
 #endif /* DISPLAY_SC1200_TIMINGS && CONFIG_PROC_FS */
@@ -31,23 +31,23 @@
 
 static ide_pci_device_t sc1200_chipsets[] __devinitdata = {
 	{	/* 0 */
-		vendor:		PCI_VENDOR_ID_NS,
-		device:		PCI_DEVICE_ID_NS_SCx200_IDE,
-		name:		"SC1200",
-		init_chipset:	init_chipset_sc1200,
-		init_iops:	NULL,
-		init_hwif:	init_hwif_sc1200,
-		init_dma:	init_dma_sc1200,
-		channels:	2,
-		autodma:	AUTODMA,
-		enablebits:	{{0x00,0x00,0x00}, {0x00,0x00,0x00}},
-		bootable:	ON_BOARD,
-		extra:		0,
+		.vendor		= PCI_VENDOR_ID_NS,
+		.device		= PCI_DEVICE_ID_NS_SCx200_IDE,
+		.name		= "SC1200",
+		.init_chipset	= init_chipset_sc1200,
+		.init_iops	= NULL,
+		.init_hwif	= init_hwif_sc1200,
+		.init_dma	= init_dma_sc1200,
+		.channels	= 2,
+		.autodma	= AUTODMA,
+		.enablebits	= {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
+		.bootable	= ON_BOARD,
+		.extra		= 0,
 	},{
-		vendor:		0,
-		device:		0,
-		channels:	0,
-		bootable:	EOL,
+		.vendor		= 0,
+		.device		= 0,
+		.channels	= 0,
+		.bootable	= EOL,
 	}
 };
 
diff -Nru a/drivers/ide/ppc/Makefile b/drivers/ide/ppc/Makefile
--- a/drivers/ide/ppc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/ide/ppc/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,5 +4,3 @@
 obj-$(CONFIG_BLK_DEV_IDE_SWARM)		+= swarm.o
 
 EXTRA_CFLAGS	:= -Idrivers/ide
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig
--- a/drivers/ieee1394/Kconfig	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/Kconfig	Sun Dec 15 18:08:28 2002
@@ -5,7 +5,7 @@
 
 config IEEE1394
 	tristate "IEEE 1394 (FireWire) support (EXPERIMENTAL)"
-	---help---
+	help
 	  IEEE 1394 describes a high performance serial bus, which is also
 	  known as FireWire(tm) or i.Link(tm) and is used for connecting all
 	  sorts of devices (most notably digital video cameras) to your
@@ -20,6 +20,36 @@
 	  say M here and read <file:Documentation/modules.txt>.  The module
 	  will be called ieee1394.o.
 
+comment "Subsystem Options"
+	depends on IEEE1394
+
+config IEEE1394_VERBOSEDEBUG
+	bool "Excessive debugging output"
+	depends on IEEE1394
+	help
+	  If you say Y here, you will get very verbose debugging logs from
+	  the subsystem which includes a dump of the header of every sent
+	  and received packet.  This can amount to a high amount of data
+	  collected in a very short time which is usually also saved to
+	  disk by the system logging daemons.
+
+	  Say Y if you really want or need the debugging output, everyone
+	  else says N.
+
+config IEEE1394_OUI_DB
+	bool "OUI Database built-in"
+	depends on IEEE1394
+	help
+	  If you say Y here, then an OUI list (vendor unique ID's) will be
+	  compiled into the ieee1394 module. This doesn't really do much
+	  accept being able to display the vendor of a hardware node. The
+	  downside is that it adds about 300k to the size of the module,
+	  or kernel (depending on whether you compile ieee1394 as a
+	  module, or static in the kernel).
+
+	  This option is not needed for userspace programs like gscanbus
+	  to show this information.
+
 comment "Device Drivers"
 	depends on IEEE1394
 
@@ -47,7 +77,7 @@
 config IEEE1394_OHCI1394
 	tristate "OHCI-1394 support"
 	depends on IEEE1394
-	---help---
+	help
 	  Enable this driver if you have an IEEE 1394 controller based on the
 	  OHCI-1394 specification. The current driver is only tested with OHCI
 	  chipsets made by Texas Instruments and NEC. Most third-party vendors
@@ -64,7 +94,7 @@
 
 config IEEE1394_VIDEO1394
 	tristate "OHCI-1394 Video support"
-	depends on IEEE1394_OHCI1394
+	depends on IEEE1394 && IEEE1394_OHCI1394
 	help
 	  This option enables video device usage for OHCI-1394 cards.  Enable
 	  this option only if you have an IEEE 1394 video device connected to
@@ -72,14 +102,14 @@
 
 config IEEE1394_SBP2
 	tristate "SBP-2 support (Harddisks etc.)"
-	depends on SCSI && IEEE1394
+	depends on IEEE1394 && SCSI
 	help
 	  This option enables you to use SBP-2 devices connected to your IEEE
 	  1394 bus.  SBP-2 devices include harddrives and DVD devices.
 
 config IEEE1394_SBP2_PHYS_DMA
 	bool "Enable Phys DMA support for SBP2 (Debug)"
-	depends on IEEE1394_SBP2
+	depends on IEEE1394 && IEEE1394_SBP2
 
 config IEEE1394_ETH1394
 	tristate "Ethernet over 1394"
@@ -90,8 +120,8 @@
 
 config IEEE1394_DV1394
 	tristate "OHCI-DV I/O support"
-	depends on IEEE1394_OHCI1394
-	---help---
+	depends on IEEE1394 && IEEE1394_OHCI1394
+	help
 	  This driver allows you to transmit and receive DV (digital video)
 	  streams on an OHCI-1394 card using a simple frame-oriented
 	  interface.
@@ -131,8 +161,8 @@
 
 config IEEE1394_AMDTP
 	tristate "IEC61883-6 (Audio transmission) support"
-	depends on IEEE1394_OHCI1394 && IEEE1394_CMP
-	---help---
+	depends on IEEE1394 && IEEE1394_OHCI1394 && IEEE1394_CMP
+	help
 	  This option enables the Audio & Music Data Transmission Protocol
 	  (IEC61883-6) driver, which implements audio transmission over
 	  IEEE1394.
@@ -144,18 +174,4 @@
 	  say M here and read <file:Documentation/modules.txt>.  The module
 	  will be called amdtp.o.
 
-config IEEE1394_VERBOSEDEBUG
-	bool "Excessive debugging output"
-	depends on IEEE1394
-	help
-	  If you say Y here, you will get very verbose debugging logs from the
-	  subsystem which includes a dump of the header of every sent and
-	  received packet.  This can amount to a high amount of data collected
-	  in a very short time which is usually also saved to disk by the
-	  system logging daemons.
-
-	  Say Y if you really want or need the debugging output, everyone else
-	  says N.
-
 endmenu
-
diff -Nru a/drivers/ieee1394/Makefile b/drivers/ieee1394/Makefile
--- a/drivers/ieee1394/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/ieee1394/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,7 +5,7 @@
 export-objs := ieee1394_core.o ohci1394.o cmp.o
 
 ieee1394-objs := ieee1394_core.o ieee1394_transactions.o hosts.o \
-		 highlevel.o csr.o nodemgr.o
+		 highlevel.o csr.o nodemgr.o oui.o dma.o iso.o
 
 obj-$(CONFIG_IEEE1394) += ieee1394.o
 obj-$(CONFIG_IEEE1394_PCILYNX) += pcilynx.o
@@ -18,4 +18,13 @@
 obj-$(CONFIG_IEEE1394_AMDTP) += amdtp.o
 obj-$(CONFIG_IEEE1394_CMP) += cmp.o
 
-include $(TOPDIR)/Rules.make
+clean-files := oui.c
+
+
+ifeq ($(obj),)
+obj = .
+endif
+
+$(obj)/oui.o: $(obj)/oui.c
+$(obj)/oui.c: $(obj)/oui.db $(obj)/oui2c.sh
+	$(CONFIG_SHELL) $(obj)/oui2c.sh < $(obj)/oui.db > $(obj)/oui.c
diff -Nru a/drivers/ieee1394/amdtp.c b/drivers/ieee1394/amdtp.c
--- a/drivers/ieee1394/amdtp.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/amdtp.c	Sun Dec 15 18:08:29 2002
@@ -688,7 +688,7 @@
 		return get_iec958_header_bits(s, sub_frame, sample);
 		
 	case AMDTP_FORMAT_RAW:
-		return 0x40000000;
+		return 0x40;
 
 	default:
 		return 0;
@@ -833,8 +833,9 @@
 		max_nevents = fraction_ceil(&s->samples_per_cycle);
 
 	max_packet_size = max_nevents * s->dimension * 4 + 8;
-	s->packet_pool = pci_pool_create("packet pool", s->host->ohci->dev,
-					 max_packet_size, 0, 0);
+	s->packet_pool = hpsb_pci_pool_create("packet pool", s->host->ohci->dev,
+					 max_packet_size, 0, 0 ,SLAB_KERNEL);
+
 	if (s->packet_pool == NULL)
 		return -1;
 
@@ -1018,9 +1019,10 @@
 		return NULL;
 	}
 
-	s->descriptor_pool = pci_pool_create("descriptor pool", host->ohci->dev,
+	s->descriptor_pool = hpsb_pci_pool_create("descriptor pool", host->ohci->dev,
 					     sizeof(struct descriptor_block),
-					     16, 0);
+					     16, 0 ,SLAB_KERNEL);
+
 	if (s->descriptor_pool == NULL) {
 		kfree(s->input);
 		kfree(s);
@@ -1107,7 +1109,7 @@
 	 */
 
 	for (i = 0; i < count; i += length) {
-		p = buffer_put_bytes(s->input, count, &length);
+		p = buffer_put_bytes(s->input, count - i, &length);
 		copy_from_user(p, buffer + i, length);
 		if (s->input->length < s->input->size)
 			continue;
@@ -1210,7 +1212,7 @@
 	if (strcmp(host->driver->name, OHCI1394_DRIVER_NAME) != 0)
 		return;
 
-	ah = kmalloc(sizeof *ah, SLAB_KERNEL);
+	ah = kmalloc(sizeof *ah, in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
 	ah->host = host;
 	ah->ohci = host->hostdata;
 	INIT_LIST_HEAD(&ah->stream_list);
diff -Nru a/drivers/ieee1394/cmp.c b/drivers/ieee1394/cmp.c
--- a/drivers/ieee1394/cmp.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/ieee1394/cmp.c	Sun Dec 15 18:08:30 2002
@@ -34,6 +34,7 @@
 #include <linux/sched.h>
 #include <linux/types.h>
 #include <linux/wait.h>
+#include <linux/interrupt.h>
 
 #include "hosts.h"
 #include "highlevel.h"
@@ -158,7 +159,7 @@
 {
 	struct cmp_host *ch;
 
-	ch = kmalloc(sizeof *ch, SLAB_KERNEL);
+	ch = kmalloc(sizeof *ch, in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
 	if (ch == NULL) {
 		HPSB_ERR("Failed to allocate cmp_host");
 		return;
diff -Nru a/drivers/ieee1394/csr.c b/drivers/ieee1394/csr.c
--- a/drivers/ieee1394/csr.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/csr.c	Sun Dec 15 18:08:28 2002
@@ -28,7 +28,7 @@
 /* Module Parameters */
 /* this module parameter can be used to disable mapping of the FCP registers */
 MODULE_PARM(fcp,"i");
-MODULE_PARM_DESC(fcp, "FCP-registers");
+MODULE_PARM_DESC(fcp, "Map FCP registers (default = 1, disable = 0).");
 static int fcp = 1;
 
 static u16 csr_crc16(unsigned *data, int length)
@@ -54,8 +54,15 @@
 
         host->csr.bus_manager_id = 0x3f;
         host->csr.bandwidth_available = 4915;
-        host->csr.channels_available_hi = ~0;
+	host->csr.channels_available_hi = 0xfffffffe;	/* pre-alloc ch 31 per 1394a-2000 */
         host->csr.channels_available_lo = ~0;
+	host->csr.broadcast_channel = 0x80000000 | 31;
+
+	if (host->is_irm) {
+		if (host->driver->hw_csr_reg) {
+			host->driver->hw_csr_reg(host, 2, 0xfffffffe, ~0);
+		}
+	}
 
         host->csr.node_ids = host->node_id << 16;
 
@@ -95,8 +102,15 @@
         host->csr.bus_time              = 0;
         host->csr.bus_manager_id        = 0x3f;
         host->csr.bandwidth_available   = 4915;
-        host->csr.channels_available_hi = ~0;
+	host->csr.channels_available_hi = 0xfffffffe;	/* pre-alloc ch 31 per 1394a-2000 */
         host->csr.channels_available_lo = ~0;
+	host->csr.broadcast_channel = 0x80000000 | 31;
+
+	if (host->is_irm) {
+		if (host->driver->hw_csr_reg) {
+			host->driver->hw_csr_reg(host, 2, 0xfffffffe, ~0);
+		}
+	}
 }
 
 int hpsb_update_config_rom(struct hpsb_host *host, const quadlet_t *new_rom, 
@@ -268,6 +282,10 @@
                 *(buf++) = cpu_to_be32(ret);
                 out;
 
+	case CSR_BROADCAST_CHANNEL:
+		*(buf++) = cpu_to_be32(host->csr.broadcast_channel);
+		out;
+
                 /* address gap to end - fall through to default */
         default:
                 return RCODE_ADDRESS_ERROR;
@@ -345,6 +363,12 @@
                 /* these are not writable, only lockable */
                 return RCODE_TYPE_ERROR;
 
+	case CSR_BROADCAST_CHANNEL:
+		/* only the valid bit can be written */
+		host->csr.broadcast_channel = (host->csr.broadcast_channel & ~0x40000000)
+                        | (be32_to_cpu(*data) & 0x40000000);
+		out;
+
                 /* address gap to end - fall through */
         default:
                 return RCODE_ADDRESS_ERROR;
@@ -373,6 +397,18 @@
         data = be32_to_cpu(data);
         arg = be32_to_cpu(arg);
 
+	/* Is somebody releasing the broadcast_channel on us? */
+	if (csraddr == CSR_CHANNELS_AVAILABLE_HI && (data & 0x1)) {
+		/* Note: this is may not be the right way to handle
+		 * the problem, so we should look into the proper way
+		 * eventually. */
+		HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release "
+			  "broadcast channel 31.  Ignoring.",
+			  NODE_BUS_ARGS(nodeid));
+
+		data &= ~0x1;	/* keep broadcast channel allocated */
+	}
+
         if (host->driver->hw_csr_reg) {
                 quadlet_t old;
 
@@ -389,23 +425,84 @@
         switch (csraddr) {
         case CSR_BUS_MANAGER_ID:
                 regptr = &host->csr.bus_manager_id;
+		*store = cpu_to_be32(*regptr);
+		if (*regptr == arg)
+			*regptr = data;
                 break;
 
         case CSR_BANDWIDTH_AVAILABLE:
+        {
+                quadlet_t bandwidth;
+                quadlet_t old;
+                quadlet_t new;
+
                 regptr = &host->csr.bandwidth_available;
+                old = *regptr;
+
+                /* bandwidth available algorithm adapted from IEEE 1394a-2000 spec */
+                if (arg > 0x1fff) {
+                        *store = cpu_to_be32(old);	/* change nothing */
+                        break;
+                }
+                data &= 0x1fff;
+                if (arg >= data) {
+                        /* allocate bandwidth */
+                        bandwidth = arg - data;
+                        if (old >= bandwidth) {
+                                new = old - bandwidth;
+                                *store = cpu_to_be32(arg);
+                                *regptr = new;
+                        } else {
+                                *store = cpu_to_be32(old);
+                        }
+                } else {
+                        /* deallocate bandwidth */
+                        bandwidth = data - arg;
+                        if (old + bandwidth < 0x2000) {
+                                new = old + bandwidth;
+                                *store = cpu_to_be32(arg);
+                                *regptr = new;
+                        } else {
+                                *store = cpu_to_be32(old);
+                        }
+                }
                 break;
+        }
 
         case CSR_CHANNELS_AVAILABLE_HI:
+        {
+                /* Lock algorithm for CHANNELS_AVAILABLE as recommended by 1394a-2000 */
+                quadlet_t affected_channels = arg ^ data;
+
                 regptr = &host->csr.channels_available_hi;
+
+                if ((arg & affected_channels) == (*regptr & affected_channels)) {
+                        *regptr ^= affected_channels;
+                        *store = cpu_to_be32(arg);
+                } else {
+                        *store = cpu_to_be32(*regptr);
+                }
+
                 break;
+        }
 
         case CSR_CHANNELS_AVAILABLE_LO:
+        {
+                /* Lock algorithm for CHANNELS_AVAILABLE as recommended by 1394a-2000 */
+                quadlet_t affected_channels = arg ^ data;
+
                 regptr = &host->csr.channels_available_lo;
+
+                if ((arg & affected_channels) == (*regptr & affected_channels)) {
+                        *regptr ^= affected_channels;
+                        *store = cpu_to_be32(arg);
+                } else {
+                        *store = cpu_to_be32(*regptr);
+                }
                 break;
         }
+        }
 
-        *store = cpu_to_be32(*regptr);
-        if (*regptr == arg) *regptr = data;
         spin_unlock_irqrestore(&host->csr.lock, flags);
 
         return RCODE_COMPLETE;
@@ -420,10 +517,7 @@
         case CSR_SPLIT_TIMEOUT_LO:
         case CSR_CYCLE_TIME:
         case CSR_BUS_TIME:
-        case CSR_BUS_MANAGER_ID:
-        case CSR_BANDWIDTH_AVAILABLE:
-        case CSR_CHANNELS_AVAILABLE_HI:
-        case CSR_CHANNELS_AVAILABLE_LO:
+	case CSR_BROADCAST_CHANNEL:
                 return RCODE_TYPE_ERROR;
 
         case CSR_BUSY_TIMEOUT:
@@ -433,6 +527,97 @@
         }
 }
 
+static int lock64_regs(struct hpsb_host *host, int nodeid, octlet_t * store,
+		       u64 addr, octlet_t data, octlet_t arg, int extcode, u16 fl)
+{
+	int csraddr = addr - CSR_REGISTER_BASE;
+	unsigned long flags;
+
+	data = be64_to_cpu(data);
+	arg = be64_to_cpu(arg);
+
+	if (csraddr & 0x3)
+		return RCODE_TYPE_ERROR;
+
+	if (csraddr != CSR_CHANNELS_AVAILABLE
+	    || extcode != EXTCODE_COMPARE_SWAP)
+		goto unsupported_lock64req;
+
+	/* Is somebody releasing the broadcast_channel on us? */
+	if (csraddr == CSR_CHANNELS_AVAILABLE_HI && (data & 0x100000000ULL)) {
+		/* Note: this is may not be the right way to handle
+		 * the problem, so we should look into the proper way
+                 * eventually. */
+		HPSB_WARN("Node [" NODE_BUS_FMT "] wants to release "
+			  "broadcast channel 31.  Ignoring.",
+			  NODE_BUS_ARGS(nodeid));
+
+		data &= ~0x100000000ULL;	/* keep broadcast channel allocated */
+	}
+
+	if (host->driver->hw_csr_reg) {
+		quadlet_t data_hi, data_lo;
+		quadlet_t arg_hi, arg_lo;
+		quadlet_t old_hi, old_lo;
+
+		data_hi = data >> 32;
+		data_lo = data & 0xFFFFFFFF;
+		arg_hi = arg >> 32;
+		arg_lo = arg & 0xFFFFFFFF;
+
+		old_hi = host->driver->hw_csr_reg(host, (csraddr - CSR_BUS_MANAGER_ID) >> 2,
+                                                  data_hi, arg_hi);
+
+		old_lo = host->driver->hw_csr_reg(host, ((csraddr + 4) - CSR_BUS_MANAGER_ID) >> 2,
+                                                  data_lo, arg_lo);
+
+		*store = cpu_to_be64(((octlet_t)old_hi << 32) | old_lo);
+	} else {
+		octlet_t old;
+		octlet_t affected_channels = arg ^ data;
+
+		spin_lock_irqsave(&host->csr.lock, flags);
+
+		old = ((octlet_t)host->csr.channels_available_hi << 32) | host->csr.channels_available_lo;
+
+		if ((arg & affected_channels) == (old & affected_channels)) {
+			host->csr.channels_available_hi ^= (affected_channels >> 32);
+			host->csr.channels_available_lo ^= (affected_channels & 0xffffffff);
+			*store = cpu_to_be64(arg);
+		} else {
+			*store = cpu_to_be64(old);
+		}
+
+		spin_unlock_irqrestore(&host->csr.lock, flags);
+	}
+
+	/* Is somebody erroneously releasing the broadcast_channel on us? */
+	if (host->csr.channels_available_hi & 0x1)
+		host->csr.channels_available_hi &= ~0x1;
+
+	return RCODE_COMPLETE;
+
+ unsupported_lock64req:
+	switch (csraddr) {
+	case CSR_STATE_CLEAR:
+	case CSR_STATE_SET:
+	case CSR_RESET_START:
+	case CSR_NODE_IDS:
+	case CSR_SPLIT_TIMEOUT_HI:
+	case CSR_SPLIT_TIMEOUT_LO:
+	case CSR_CYCLE_TIME:
+	case CSR_BUS_TIME:
+	case CSR_BUS_MANAGER_ID:
+	case CSR_BROADCAST_CHANNEL:
+	case CSR_BUSY_TIMEOUT:
+	case CSR_BANDWIDTH_AVAILABLE:
+		return RCODE_TYPE_ERROR;
+
+	default:
+		return RCODE_ADDRESS_ERROR;
+	}
+}
+
 static int write_fcp(struct hpsb_host *host, int nodeid, int dest,
 		     quadlet_t *data, u64 addr, unsigned int length, u16 flags)
 {
@@ -474,6 +659,7 @@
         .read = read_regs,
         .write = write_regs,
         .lock = lock_regs,
+	.lock64 = lock64_regs,
 };
 
 static struct hpsb_highlevel *hl;
diff -Nru a/drivers/ieee1394/csr.h b/drivers/ieee1394/csr.h
--- a/drivers/ieee1394/csr.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/csr.h	Sun Dec 15 18:08:28 2002
@@ -16,8 +16,10 @@
 #define CSR_BUSY_TIMEOUT          0x210
 #define CSR_BUS_MANAGER_ID        0x21c
 #define CSR_BANDWIDTH_AVAILABLE   0x220
+#define CSR_CHANNELS_AVAILABLE    0x224
 #define CSR_CHANNELS_AVAILABLE_HI 0x224
 #define CSR_CHANNELS_AVAILABLE_LO 0x228
+#define CSR_BROADCAST_CHANNEL     0x234
 #define CSR_CONFIG_ROM            0x400
 #define CSR_CONFIG_ROM_END        0x800
 #define CSR_FCP_COMMAND           0xB00
@@ -40,6 +42,7 @@
         quadlet_t bus_manager_id;
         quadlet_t bandwidth_available;
         quadlet_t channels_available_hi, channels_available_lo;
+	quadlet_t broadcast_channel;
 
         quadlet_t *rom;
         size_t rom_size;
diff -Nru a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/dma.c	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,238 @@
+/*
+ * DMA region bookkeeping routines
+ *
+ * Copyright (C) 2002 Maas Digital LLC
+ *
+ * This code is licensed under the GPL.  See the file COPYING in the root
+ * directory of the kernel sources for details.
+ */
+
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/slab.h>
+#include "dma.h"
+
+/* dma_prog_region */
+
+void dma_prog_region_init(struct dma_prog_region *prog)
+{
+	prog->kvirt = NULL;
+	prog->dev = NULL;
+	prog->n_pages = 0;
+	prog->bus_addr = 0;
+}
+
+int  dma_prog_region_alloc(struct dma_prog_region *prog, unsigned long n_bytes, struct pci_dev *dev)
+{
+	/* round up to page size */
+	if(n_bytes % PAGE_SIZE)
+		n_bytes += PAGE_SIZE - (n_bytes & PAGE_SIZE);
+	
+	prog->n_pages = n_bytes / PAGE_SIZE;
+
+	prog->kvirt = pci_alloc_consistent(dev, prog->n_pages * PAGE_SIZE, &prog->bus_addr);
+	if(!prog->kvirt) {
+		printk(KERN_ERR "dma_prog_region_alloc: pci_alloc_consistent() failed\n");
+		dma_prog_region_free(prog);
+		return -ENOMEM;
+	}
+
+	prog->dev = dev;
+
+	return 0;
+}
+
+void dma_prog_region_free(struct dma_prog_region *prog)
+{
+	if(prog->kvirt) {
+		pci_free_consistent(prog->dev, prog->n_pages * PAGE_SIZE, prog->kvirt, prog->bus_addr);
+	}
+	
+	prog->kvirt = NULL;
+	prog->dev = NULL;
+	prog->n_pages = 0;
+	prog->bus_addr = 0;
+}
+
+/* dma_region */
+
+void dma_region_init(struct dma_region *dma)
+{
+	dma->kvirt = NULL;
+	dma->dev = NULL;
+	dma->n_pages = 0;
+	dma->n_dma_pages = 0;
+	dma->sglist = NULL;
+}
+
+int dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, struct pci_dev *dev, int direction)
+{
+	unsigned int i, n_pages;
+
+	/* round up to page size */
+	if(n_bytes % PAGE_SIZE)
+		n_bytes += PAGE_SIZE - (n_bytes & PAGE_SIZE);
+	
+	n_pages = n_bytes / PAGE_SIZE;
+	
+	dma->kvirt = vmalloc_32(n_pages * PAGE_SIZE);
+	if(!dma->kvirt) {
+		printk(KERN_ERR "dma_region_alloc: vmalloc_32() failed\n");
+		goto err;
+	}
+
+	dma->n_pages = n_pages;
+	
+	/* Clear the ram out, no junk to the user */
+	memset(dma->kvirt, 0, n_pages * PAGE_SIZE);
+
+	/* allocate scatter/gather list */
+	dma->sglist = kmalloc(dma->n_pages * sizeof(struct scatterlist), GFP_KERNEL);
+	if(!dma->sglist) {
+		printk(KERN_ERR "dma_region_alloc: kmalloc(sglist) failed\n");
+		goto err;
+	}
+
+	/* just to be safe - this will become unnecessary once sglist->address goes away */
+	memset(dma->sglist, 0, dma->n_pages * sizeof(struct scatterlist));
+
+	/* fill scatter/gather list with pages */
+	for(i = 0; i < dma->n_pages; i++) {
+		unsigned long va = (unsigned long) dma->kvirt + i * PAGE_SIZE;
+			
+		dma->sglist[i].page = vmalloc_to_page((void *)va);
+		dma->sglist[i].length = PAGE_SIZE;
+	}
+
+	/* map sglist to the IOMMU */
+	dma->n_dma_pages = pci_map_sg(dev, &dma->sglist[0], dma->n_pages, direction);
+
+	if(dma->n_dma_pages == 0) {
+		printk(KERN_ERR "dma_region_alloc: pci_map_sg() failed\n");
+		goto err;
+	}
+
+	dma->dev = dev;
+	dma->direction = direction;
+	
+	return 0;
+
+err:
+	dma_region_free(dma);
+	return -ENOMEM;
+}
+
+void dma_region_free(struct dma_region *dma)
+{
+	if(dma->n_dma_pages) {
+		pci_unmap_sg(dma->dev, dma->sglist, dma->n_pages, dma->direction);
+		dma->n_dma_pages = 0;
+		dma->dev = NULL;
+	}
+
+	if(dma->sglist) {
+		kfree(dma->sglist);
+		dma->sglist = NULL;
+	}
+
+	if(dma->kvirt) {
+		vfree(dma->kvirt);
+		dma->kvirt = NULL;
+		dma->n_pages = 0;
+	}
+}
+
+/* find the scatterlist index and remaining offset corresponding to a
+   given offset from the beginning of the buffer */
+static inline int dma_region_find(struct dma_region *dma, unsigned long offset, unsigned long *rem)
+{
+	int i;
+	unsigned long off = offset;
+	
+	for(i = 0; i < dma->n_dma_pages; i++) {
+		if(off < sg_dma_len(&dma->sglist[i])) {
+			*rem = off;
+			return i;
+		}
+
+		off -= sg_dma_len(&dma->sglist[i]);
+	}
+	
+	panic("dma_region_find: offset %lu beyond end of DMA mapping\n", offset);
+}
+
+dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset)
+{
+	unsigned long rem;
+	
+	struct scatterlist *sg = &dma->sglist[dma_region_find(dma, offset, &rem)];
+	return sg_dma_address(sg) + rem;
+}
+
+void dma_region_sync(struct dma_region *dma, unsigned long offset, unsigned long len)
+{
+	int first, last;
+	unsigned long rem;
+
+	if(!len)
+		len = 1;
+	
+	first = dma_region_find(dma, offset, &rem);
+	last = dma_region_find(dma, offset + len - 1, &rem);
+	
+	pci_dma_sync_sg(dma->dev, &dma->sglist[first], last - first + 1, dma->direction);
+}
+
+/* nopage() handler for mmap access */
+
+static struct page*
+dma_region_pagefault(struct vm_area_struct *area, unsigned long address, int write_access)
+{
+	unsigned long offset;
+	unsigned long kernel_virt_addr;
+	struct page *ret = NOPAGE_SIGBUS;
+
+	struct dma_region *dma = (struct dma_region*) area->vm_private_data;
+
+	if(!dma->kvirt)
+		goto out;
+
+	if( (address < (unsigned long) area->vm_start) ||
+	    (address > (unsigned long) area->vm_start + (PAGE_SIZE * dma->n_pages)) )
+		goto out;
+
+	offset = address - area->vm_start;
+	kernel_virt_addr = (unsigned long) dma->kvirt + offset;
+	ret = vmalloc_to_page((void*) kernel_virt_addr);
+	get_page(ret);
+out:
+	return ret;
+}
+
+static struct vm_operations_struct dma_region_vm_ops = {
+	nopage: dma_region_pagefault,
+};
+
+int dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma)
+{
+	unsigned long size;
+	
+	if(!dma->kvirt)
+		return -EINVAL;
+
+	/* must be page-aligned */
+	if(vma->vm_pgoff != 0)
+		return -EINVAL;
+
+	/* check the length */
+	size = vma->vm_end - vma->vm_start;
+	if(size > (PAGE_SIZE * dma->n_pages))
+		return -EINVAL;
+
+	vma->vm_ops = &dma_region_vm_ops;
+	vma->vm_private_data = dma;
+	vma->vm_file = file;
+	vma->vm_flags |= VM_RESERVED;
+	
+	return 0;
+}
diff -Nru a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/dma.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,76 @@
+/*
+ * DMA region bookkeeping routines
+ *
+ * Copyright (C) 2002 Maas Digital LLC
+ *
+ * This code is licensed under the GPL.  See the file COPYING in the root
+ * directory of the kernel sources for details.
+ */
+
+#ifndef IEEE1394_DMA_H
+#define IEEE1394_DMA_H
+
+#include <linux/pci.h>
+#include <asm/scatterlist.h>
+
+/* struct dma_prog_region
+   
+   a small, physically-contiguous DMA buffer with random-access,
+   synchronous usage characteristics
+*/
+
+struct dma_prog_region {
+	unsigned char    *kvirt;     /* kernel virtual address */
+	struct pci_dev   *dev;       /* PCI device */
+	unsigned int      n_pages;   /* # of kernel pages */
+	dma_addr_t        bus_addr;  /* base bus address */
+};
+
+/* clear out all fields but do not allocate any memory */
+void dma_prog_region_init(struct dma_prog_region *prog);
+int  dma_prog_region_alloc(struct dma_prog_region *prog, unsigned long n_bytes, struct pci_dev *dev);
+void dma_prog_region_free(struct dma_prog_region *prog);
+
+static inline dma_addr_t dma_prog_region_offset_to_bus(struct dma_prog_region *prog, unsigned long offset)
+{
+	return prog->bus_addr + offset;
+}
+
+/* struct dma_region
+   
+   a large, non-physically-contiguous DMA buffer with streaming,
+   asynchronous usage characteristics
+*/
+
+struct dma_region {
+	unsigned char      *kvirt;       /* kernel virtual address */
+	struct pci_dev     *dev;         /* PCI device */
+	unsigned int        n_pages;     /* # of kernel pages */
+	unsigned int        n_dma_pages; /* # of IOMMU pages */
+	struct scatterlist *sglist;      /* IOMMU mapping */
+	int                 direction;   /* PCI_DMA_TODEVICE, etc */
+};
+
+/* clear out all fields but do not allocate anything */
+void dma_region_init(struct dma_region *dma);
+
+/* allocate the buffer and map it to the IOMMU */
+int  dma_region_alloc(struct dma_region *dma, unsigned long n_bytes, struct pci_dev *dev, int direction);
+
+/* unmap and free the buffer */
+void dma_region_free(struct dma_region *dma);
+
+/* sync the IO bus' view of the buffer with the CPU's view */
+void dma_region_sync(struct dma_region *dma, unsigned long offset, unsigned long len);
+
+/* map the buffer into a user space process */
+int  dma_region_mmap(struct dma_region *dma, struct file *file, struct vm_area_struct *vma);
+
+/* macro to index into a DMA region (or dma_prog_region) */
+#define dma_region_i(_dma, _type, _index) ( ((_type*) ((_dma)->kvirt)) + (_index) )
+
+/* return the DMA bus address of the byte with the given offset
+   relative to the beginning of the dma_region */
+dma_addr_t dma_region_offset_to_bus(struct dma_region *dma, unsigned long offset);
+
+#endif /* IEEE1394_DMA_H */
diff -Nru a/drivers/ieee1394/dv1394-private.h b/drivers/ieee1394/dv1394-private.h
--- a/drivers/ieee1394/dv1394-private.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/dv1394-private.h	Sun Dec 15 18:08:29 2002
@@ -28,8 +28,7 @@
 
 #include "ieee1394.h"
 #include "ohci1394.h"
-#include <linux/pci.h>
-#include <asm/scatterlist.h>
+#include "dma.h"
 
 /* data structures private to the dv1394 driver */
 /* none of this is exposed to user-space */
@@ -167,12 +166,14 @@
 }
  
 static inline void fill_input_last(struct input_last *il,
+				    int want_interrupt,
 				    unsigned int data_size,
 				    unsigned long data_phys_addr)
 {
 	u32 temp =  3 << 28; /* INPUT_LAST */
 	temp |= 8 << 24; /* s = 1, update xferStatus and resCount */
-	temp |= 3 << 20; /* enable interrupts */
+	if (want_interrupt)
+		temp |= 3 << 20; /* enable interrupts */
 	temp |= 0xC << 16; /* enable branch to address */
 	                       /* disable wait on sync field, not used in DV :-( */
 	temp |= data_size;
@@ -301,8 +302,7 @@
 	unsigned long data; 
 
 	/* Max # of packets per frame */
-	/* 320 is enough for NTSC, need to check what PAL is */
-        #define MAX_PACKETS 500
+#define MAX_PACKETS 500
 
 
 	/* a PAGE_SIZE memory pool for allocating CIP headers
@@ -383,35 +383,6 @@
 /* reset f so that it can be used again */
 static void frame_reset(struct frame *f);
 
-
-/* structure for bookkeeping of a large non-physically-contiguous DMA buffer */
-
-struct dma_region {
-	unsigned int n_pages;
-	unsigned int n_dma_pages;
-	struct scatterlist *sglist;
-};
-
-/* return the DMA bus address of the byte with the given offset
-   relative to the beginning of the dma_region */
-
-static inline dma_addr_t dma_offset_to_bus(struct dma_region *dma, unsigned long offset)
-{
-	int i;
-	struct scatterlist *sg;
-	
-	for(i = 0, sg = &dma->sglist[0]; i < dma->n_dma_pages; i++, sg++) {
-		if(offset < sg_dma_len(sg)) {
-			return sg_dma_address(sg) + offset;
-		} 
-		offset -= sg_dma_len(sg);
-	}
-	
-	printk(KERN_ERR "dv1394: dma_offset_to_bus failed for offset %lu!\n", offset);
-	return 0;
-}
-
-
 /* struct video_card contains all data associated with one instance
    of the dv1394 driver 
 */
@@ -508,9 +479,8 @@
 	
 	/* the large, non-contiguous (rvmalloc()) ringbuffer for DV
            data, exposed to user-space via mmap() */
-	unsigned char     *user_buf;
-	unsigned long      user_buf_size;
-	struct dma_region  user_dma;
+	unsigned long      dv_buf_size;
+	struct dma_region  dv_buf;
 	
 	/* next byte in the ringbuffer that a write() call will fill */
 	size_t write_off;
@@ -579,10 +549,8 @@
 
 	
 	/* physically contiguous packet ringbuffer for receive */
-#define MAX_PACKET_BUFFER 30
-	struct packet *packet_buffer;
-	dma_addr_t     packet_buffer_dma;
-	unsigned long  packet_buffer_size;
+	struct dma_region packet_buf;
+	unsigned long  packet_buf_size;
 	
 	unsigned int current_packet;
 	int first_frame; 	/* received first start frame marker? */
diff -Nru a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
--- a/drivers/ieee1394/dv1394.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/ieee1394/dv1394.c	Sun Dec 15 18:08:30 2002
@@ -53,6 +53,12 @@
     via pci_alloc_consistent()
     
   DONE:
+  - during reception, better handling of dropped frames and continuity errors
+  - during reception, prevent DMA from bypassing the irq tasklets
+  - reduce irq rate during reception (1/250 packets).
+  - add many more internal buffers during reception with scatter/gather dma.
+  - add dbc (continuity) checking on receive, increment status.dropped_frames
+    if not continuous.
   - restart IT DMA after a bus reset
   - safely obtain and release ISO Tx channels in cooperation with OHCI driver
   - map received DIF blocks to their proper location in DV frame (ensure
@@ -91,9 +97,9 @@
 #include <linux/fs.h>
 #include <linux/poll.h>
 #include <linux/smp_lock.h>
+#include <linux/bitops.h>
 #include <asm/byteorder.h>
 #include <asm/atomic.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <linux/proc_fs.h>
@@ -132,7 +138,7 @@
        (will cause undeflows if your machine is too slow!)
 */
 
-#define DV1394_DEBUG_LEVEL 0
+#define DV1394_DEBUG_LEVEL 1
 
 /* for debugging use ONLY: allow more than one open() of the device */
 /* #define DV1394_ALLOW_MORE_THAN_ONE_OPEN 1 */
@@ -169,6 +175,15 @@
 
 static struct hpsb_highlevel *hl_handle; /* = NULL; */
 
+static LIST_HEAD(dv1394_devfs);
+struct dv1394_devfs_entry {
+	struct list_head list;
+    devfs_handle_t devfs;
+	char name[32];
+	struct dv1394_devfs_entry *parent;
+};
+static spinlock_t dv1394_devfs_lock = SPIN_LOCK_UNLOCKED;
+
 /* translate from a struct file* to the corresponding struct video_card* */
 
 static inline struct video_card* file_to_video_card(struct file *file)
@@ -176,39 +191,6 @@
 	return (struct video_card*) file->private_data;
 }
 
-
-/*******************************/
-/* Memory management functions */
-/*******************************/
-
-/* note: we no longer use mem_map_reserve, because it causes a memory
-   leak, and setting vma->vm_flags to VM_RESERVED should be sufficient
-   to pin the pages in memory anyway. */
-
-static void * rvmalloc(unsigned long size)
-{
-	void * mem;
-
-	mem = vmalloc_32(size);
-
-	if(mem)
-		memset(mem, 0, size); /* Clear the ram out, 
-					 no junk to the user */
-	return mem;
-}
-
-static void rvfree(void * mem, unsigned long size)
-{
-	if (mem) {
-		vfree(mem);
-	}
-}
-
-/***********************************/
-/* END Memory management functions */
-/***********************************/
-
-
 /*** FRAME METHODS *********************************************************/
 
 static void frame_reset(struct frame *f)
@@ -437,11 +419,7 @@
 		/******************************/
 
 		/* first descriptor - OUTPUT_MORE_IMMEDIATE, for the controller's IT header */
-		fill_output_more_immediate( &(block->u.out.omi),
-					    /* tag - what is this??? */ 1,
-					    video->channel,
-					    /* sync tag - what is this??? */ 0,
-					    payload_size);
+		fill_output_more_immediate( &(block->u.out.omi), 1, video->channel, 0, payload_size);
 
 		if(empty_packet) {
 			/* second descriptor - OUTPUT_LAST for CIP header */
@@ -492,8 +470,8 @@
 						  PAGE_SIZE - (data_p % PAGE_SIZE),
 
 						  /* DMA address of data_p */
-						  dma_offset_to_bus(&f->video->user_dma,
-								    data_p - (unsigned long) f->video->user_buf));
+						  dma_region_offset_to_bus(&video->dv_buf,
+									   data_p - (unsigned long) video->dv_buf.kvirt));
 
 				fill_output_last( &(block->u.out.u.full.u.cross.ol),
 					  
@@ -507,8 +485,8 @@
 						  480 - (PAGE_SIZE - (data_p % PAGE_SIZE)),
 
 						  /* DMA address of data_p + PAGE_SIZE - (data_p % PAGE_SIZE) */
-						  dma_offset_to_bus(&f->video->user_dma,
-								    data_p + PAGE_SIZE - (data_p % PAGE_SIZE) - (unsigned long) f->video->user_buf));
+						  dma_region_offset_to_bus(&video->dv_buf,
+									   data_p + PAGE_SIZE - (data_p % PAGE_SIZE) - (unsigned long) video->dv_buf.kvirt));
 
 				if(first_packet)
 					f->frame_begin_timestamp = &(block->u.out.u.full.u.cross.ol.q[3]);
@@ -542,8 +520,8 @@
 
 						  
 						  /* DMA address of data_p */
-						  dma_offset_to_bus(&f->video->user_dma,
-								    data_p - (unsigned long) f->video->user_buf));
+						  dma_region_offset_to_bus(&video->dv_buf,
+									   data_p - (unsigned long) video->dv_buf.kvirt));
 				
 				if(first_packet)
 					f->frame_begin_timestamp = &(block->u.out.u.full.u.nocross.ol.q[3]);
@@ -584,13 +562,8 @@
 	   to loop back up to the top */
 	*(f->frame_end_branch) = cpu_to_le32(f->descriptor_pool_dma | f->first_n_descriptors);
 
-
-	/* make the latest version of the frame buffer visible to the PCI card */
-	/* could optimize this by only syncing the pages associated with this frame */
-	pci_dma_sync_sg(video->ohci->dev,
-			&video->user_dma.sglist[0],
-			video->user_dma.n_dma_pages,
-			PCI_DMA_TODEVICE);
+	/* make the latest version of this frame visible to the PCI card */
+	dma_region_sync(&video->dv_buf, f->data - (unsigned long) video->dv_buf.kvirt, video->frame_size);
 
 	/* lock against DMA interrupt */
 	spin_lock_irqsave(&video->spinlock, irq_flags);
@@ -789,6 +762,9 @@
 	int dif_sequence = p->data[1] >> 4;           /* dif sequence number is in bits 4 - 7 */
 	int dif_block = p->data[2];
 
+	/* sanity check */
+	if (dif_sequence > 11 || dif_block > 149) return;
+		
 	switch (section_type) {
 	case 0:           /* 1 Header block */
 	        memcpy( (void *) f->data + dif_sequence * 150 * 80, p->data, 480);
@@ -816,47 +792,64 @@
 }
 
 
-static void start_dma_receive(struct video_card *video, struct frame *frame)
+static void start_dma_receive(struct video_card *video)
 {
-	/* reset iso recv control register */
-	reg_write(video->ohci, video->ohci_IsoRcvContextControlClear, 0xFFFFFFFF);
-	wmb();
-	
-	/* clear bufferFill, set isochHeader and speed (0=100) */
-	reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, 0x40000000);
-
-	/* match on all tags, listen on channel */
-	reg_write(video->ohci, video->ohci_IsoRcvContextMatch, 0xf0000000 | video->channel);
-	
-	/* address and first descriptor block + Z=1 */
-	reg_write(video->ohci, video->ohci_IsoRcvCommandPtr,             
-		  frame->descriptor_pool_dma | 1); /* Z=1 */
-	wmb();
+	if (video->first_run == 1) {
+		video->first_run = 0;
+		
+		/* start DMA once all of the frames are READY */
+		video->n_clear_frames = 0;
+		video->first_clear_frame = -1;
+		video->current_packet = 0;
+		video->active_frame = 0;
+		
+		/* reset iso recv control register */
+		reg_write(video->ohci, video->ohci_IsoRcvContextControlClear, 0xFFFFFFFF);
+		wmb();
+		
+		/* clear bufferFill, set isochHeader and speed (0=100) */
+		reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, 0x40000000);
 	
-	/* run */
-	reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, 0x8000);
-	flush_pci_write(video->ohci);
+		/* match on all tags, listen on channel */
+		reg_write(video->ohci, video->ohci_IsoRcvContextMatch, 0xf0000000 | video->channel);
+		
+		/* address and first descriptor block + Z=1 */
+		reg_write(video->ohci, video->ohci_IsoRcvCommandPtr,             
+			  video->frames[0]->descriptor_pool_dma | 1); /* Z=1 */
+		wmb();
+		
+		/* run */
+		reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, 0x8000);
+		flush_pci_write(video->ohci);
+		
+		debug_printk("dv1394: DMA started\n");
 	
-	debug_printk("dv1394: DMA started\n");
-
 #if DV1394_DEBUG_LEVEL >= 2
-	{
-		int i;
-	
-		for(i = 0; i < 1000; ++i) {
-			mdelay(1);
-			if(reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & (1 << 10)) {
-				printk("DMA ACTIVE after %d msec\n", i);
-				break;
+		{
+			int i;
+		
+			for(i = 0; i < 1000; ++i) {
+				mdelay(1);
+				if(reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & (1 << 10)) {
+					printk("DMA ACTIVE after %d msec\n", i);
+					break;
+				}
 			}
+			if( reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) &  (1 << 11) ) {
+				printk("DEAD, event = %x\n", 
+					   reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & 0x1F);
+			} else
+				printk("RUNNING!\n");
 		}
-		if( reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) &  (1 << 11) ) {
-			printk("DEAD, event = %x\n", 
-			       reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & 0x1F);
-		} else
-			printk("RUNNING!\n");
-	}
 #endif
+	} 
+	else if( reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) &  (1 << 11) ) {
+		debug_printk("DEAD, event = %x\n", 
+			     reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & 0x1F);
+
+		/* wake */
+		reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, (1 << 12));
+	}
 }
 
 
@@ -864,7 +857,7 @@
    receive_packets() - build the DMA program for receiving
 */
 
-static void receive_packets(struct video_card *video, struct frame *f)
+static void receive_packets(struct video_card *video)
 {
 	struct DMA_descriptor_block *block = NULL;
 	dma_addr_t block_dma = 0;
@@ -872,52 +865,46 @@
 	dma_addr_t data_dma = 0;
 	u32 *last_branch_address = NULL;
 	unsigned long irq_flags;
+	int want_interrupt = 0;
+	struct frame *f = NULL;
+	int i, j;
 
 	spin_lock_irqsave(&video->spinlock, irq_flags);
 
-	video->n_clear_frames = 0;
-	video->first_clear_frame = -1;
-
-	for (video->current_packet = 0; video->current_packet < MAX_PACKET_BUFFER; ++video->current_packet) {
-		/* locate a descriptor block and packet from the buffer */
-		block = &(f->descriptor_pool[video->current_packet]);
-		block_dma = ((unsigned long) block - (unsigned long) f->descriptor_pool) + f->descriptor_pool_dma;
-		
-		data = &(video->packet_buffer[video->current_packet]);
-		data_dma = ((unsigned long) data - (unsigned long) video->packet_buffer) + video->packet_buffer_dma;
-		
-		/* setup DMA descriptor block */
-		fill_input_last( &(block->u.in.il), 512, data_dma);
+	for (j = 0; j < video->n_frames; j++) {
 
-		/* link descriptors */
-		last_branch_address = f->frame_end_branch;
+		/* connect frames */
+		if (j > 0 && f != NULL && f->frame_end_branch != NULL)
+			*(f->frame_end_branch) = cpu_to_le32(video->frames[j]->descriptor_pool_dma | 1); /* set Z=1 */
 
-		if (last_branch_address)
-			*(last_branch_address) = cpu_to_le32(block_dma | 1); /* set Z=1 */
+		f = video->frames[j];
 
-		f->frame_end_branch = &(block->u.in.il.q[2]);
-	}
+		for (i = 0; i < MAX_PACKETS; i++) {
+			/* locate a descriptor block and packet from the buffer */
+			block = &(f->descriptor_pool[i]);
+			block_dma = ((unsigned long) block - (unsigned long) f->descriptor_pool) + f->descriptor_pool_dma;
+			
+			data = ((struct packet*)video->packet_buf.kvirt) + f->frame_num * MAX_PACKETS + i;
+			data_dma = dma_region_offset_to_bus( &video->packet_buf, 
+							     ((unsigned long) data - (unsigned long) video->packet_buf.kvirt) );
+			
+			/* setup DMA descriptor block */
+			want_interrupt = ((i % (MAX_PACKETS/2)) == 0 || i == (MAX_PACKETS-1));
+			fill_input_last( &(block->u.in.il), want_interrupt, 512, data_dma);
+	
+			/* link descriptors */
+			last_branch_address = f->frame_end_branch;
 	
-	/* loop tail to head */
-	if (f->frame_end_branch)
-		*(f->frame_end_branch) = cpu_to_le32(f->descriptor_pool_dma | 1); /* set Z=1 */
+			if (last_branch_address != NULL)
+				*(last_branch_address) = cpu_to_le32(block_dma | 1); /* set Z=1 */
+	
+			f->frame_end_branch = &(block->u.in.il.q[2]);
+		}
+	
+	} /* next j */
 
 	spin_unlock_irqrestore(&video->spinlock, irq_flags);
 
-	if (video->first_run) {
-		/* start DMA once all of the frames are READY */
-		video->first_run = 0;
-		video->current_packet = 0;
-		video->active_frame = f->frame_num;
-		start_dma_receive(video, f);
-	} 
-	else if( reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) &  (1 << 11) ) {
-		debug_printk("DEAD, event = %x\n", 
-			     reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & 0x1F);
-
-		/* wake */
-		reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, (1 << 12));
-	}
 }
 
 
@@ -960,10 +947,8 @@
 	if(new_buf_size % PAGE_SIZE) new_buf_size += PAGE_SIZE - (new_buf_size % PAGE_SIZE);
 
 	/* don't allow the user to allocate the DMA buffer more than once */
-	if( (video->user_buf) &&
-	    (video->user_buf_size != new_buf_size) ) {
+	if(video->dv_buf.kvirt && video->dv_buf_size != new_buf_size)
 		goto err;
-	}
 	
 	/* shutdown the card if it's currently active */
 	/* (the card should not be reset if the parameters are screwy) */
@@ -1067,93 +1052,39 @@
 		}
 	}
 
-	
-
-	if(video->user_buf == NULL) {
-		unsigned int i;
-		
+	if(!video->dv_buf.kvirt) {
 		/* allocate the ringbuffer */
-		video->user_buf = rvmalloc(new_buf_size);
-		if(!video->user_buf) {
-			printk(KERN_ERR "dv1394: Cannot allocate frame buffers\n");
+		retval = dma_region_alloc(&video->dv_buf, new_buf_size, video->ohci->dev, PCI_DMA_TODEVICE);
+		if(retval)
 			goto err_frames;
-		}
-		video->user_buf_size = new_buf_size;
-
-		/* allocate the sglist to hold the DMA addresses */
-		video->user_dma.n_pages = video->user_buf_size / PAGE_SIZE;
-		video->user_dma.sglist = kmalloc(video->user_dma.n_pages * sizeof(struct scatterlist), GFP_KERNEL);
-		if(!video->user_dma.sglist) {
-			printk(KERN_ERR "dv1394: Cannot allocate sglist for user buffer\n");
-			goto err_user_buf;
-		}
-
-		/* initialize all fields of all sglist entries to zero
-		   (new requirement due to PCI changes in 2.4.13) */
-
-		memset(video->user_dma.sglist, 0, video->user_dma.n_pages * sizeof(struct scatterlist));
+					  
+		video->dv_buf_size = new_buf_size;
 
-		
-		/* fill the sglist with the kernel addresses of pages in the non-contiguous buffer */
-		for(i = 0; i < video->user_dma.n_pages; i++) {
-			unsigned long va = (unsigned long) video->user_buf + i * PAGE_SIZE;
-			
-			video->user_dma.sglist[i].page = vmalloc_to_page((void *)va);
-			video->user_dma.sglist[i].length = PAGE_SIZE;
-		}
-		
-		/* map the buffer in the IOMMU */
-		/* the user_data buffer only allows DMA *to* the card for transmission;
-		   incoming DV data comes through the packet_buffer first, and then is copied to user_data */
-		video->user_dma.n_dma_pages = pci_map_sg(video->ohci->dev,
-							 &video->user_dma.sglist[0],
-							 video->user_dma.n_pages,
-							 PCI_DMA_TODEVICE);
-		if(video->user_dma.n_dma_pages == 0) {
-			printk(KERN_ERR "dv1394: Error mapping user buffer to the IOMMU\n");
-			goto err_user_buf;
-		}
-		
 		debug_printk("dv1394: Allocated %d frame buffers, total %u pages (%u DMA pages), %lu bytes\n", 
-			     video->n_frames, video->user_dma.n_pages,
-			     video->user_dma.n_dma_pages, video->user_buf_size);
+			     video->n_frames, video->dv_buf.n_pages,
+			     video->dv_buf.n_dma_pages, video->dv_buf_size);
 	}
 	
 	/* set up the frame->data pointers */
 	for(i = 0; i < video->n_frames; i++)
-		video->frames[i]->data = (unsigned long) video->user_buf + i * video->frame_size;
+		video->frames[i]->data = (unsigned long) video->dv_buf.kvirt + i * video->frame_size;
 
-	/* allocate packet buffers */
-	video->packet_buffer_size = sizeof(struct packet) * MAX_PACKET_BUFFER;
-	if (video->packet_buffer_size % PAGE_SIZE)
-		video->packet_buffer_size += PAGE_SIZE - (video->packet_buffer_size % PAGE_SIZE);
-
-	
-	video->packet_buffer = kmalloc(video->packet_buffer_size, GFP_KERNEL);
-	
-	if(!video->packet_buffer) {
-		printk(KERN_ERR "dv1394: Cannot allocate packet buffers");
-		retval = -ENOMEM;
-		goto err_user_buf;
-	}
-
-	/* map the packet buffer into the IOMMU */
-	video->packet_buffer_dma = pci_map_single(video->ohci->dev,
-						  video->packet_buffer,
-						  video->packet_buffer_size,
-						  PCI_DMA_FROMDEVICE);
-	if(!video->packet_buffer_dma) {
-		printk(KERN_ERR "dv1394: Cannot map packet buffer to IOMMU");
-		kfree(video->packet_buffer);
-		video->packet_buffer = NULL;
-		retval = -ENOMEM;
-		goto err_user_buf;
+	if(!video->packet_buf.kvirt) {
+		/* allocate packet buffer */
+		video->packet_buf_size = sizeof(struct packet) * video->n_frames * MAX_PACKETS;
+		if (video->packet_buf_size % PAGE_SIZE)
+			video->packet_buf_size += PAGE_SIZE - (video->packet_buf_size % PAGE_SIZE);
+		
+		retval = dma_region_alloc(&video->packet_buf, video->packet_buf_size,
+					  video->ohci->dev, PCI_DMA_FROMDEVICE);
+		if(retval)
+			goto err_dv_buf;
+		
+		debug_printk("dv1394: Allocated %d packets in buffer, total %u pages (%u DMA pages), %lu bytes\n", 
+				 video->n_frames*MAX_PACKETS, video->packet_buf.n_pages,
+				 video->packet_buf.n_dma_pages, video->packet_buf_size);
 	}
-
-	debug_printk("dv1394: Allocated %d packet buffers for receive, total %lu bytes\n", 
-		     MAX_PACKET_BUFFER, video->packet_buffer_size);
-
-
+	
 	/* set up register offsets for IT context */
 	/* IT DMA context registers are spaced 16 bytes apart */
 	video->ohci_IsoXmitContextControlSet = OHCI1394_IsoXmitContextControlSet+16*video->ohci_it_ctx;
@@ -1177,26 +1108,9 @@
 	
 	return 0;
 
- err_user_buf:
-	if(video->user_buf) {
-		if(video->user_dma.sglist) {
-			if(video->user_dma.n_dma_pages > 0) {
-				/* unmap it from the IOMMU */
-				pci_unmap_sg(video->ohci->dev,
-					     video->user_dma.sglist,
-					     video->user_dma.n_pages,
-					     PCI_DMA_TODEVICE);
-				video->user_dma.n_dma_pages = 0;
-			}
-			kfree(video->user_dma.sglist);
-			video->user_dma.sglist = NULL;
-			video->user_dma.n_pages = 0;
-		}
-		rvfree(video->user_buf, video->user_buf_size);
-		video->user_buf = NULL;
-		video->user_buf_size = 0;
-	}
-		
+ err_dv_buf:
+	dma_region_free(&video->dv_buf);
+	
  err_frames:
 	for(i = 0; i < DV1394_MAX_FRAMES; i++) {
 		if(video->frames[i])
@@ -1229,7 +1143,7 @@
 	struct dv1394_init init;
 
 	init.api_version = DV1394_API_VERSION;
-	init.n_frames = 2;
+	init.n_frames = DV1394_MAX_FRAMES / 4;
 	/* the following are now set via proc_fs or devfs */
 	init.channel = video->channel;
 	init.format = video->pal_or_ntsc;
@@ -1261,7 +1175,6 @@
 		
 		video->active_frame = -1;
 		video->first_run = 1;
-
 		
 		/* wait until DMA really stops */
 		i = 0;
@@ -1292,7 +1205,7 @@
 
 
 
-static int do_dv1394_shutdown(struct video_card *video, int free_user_buf)
+static int do_dv1394_shutdown(struct video_card *video, int free_dv_buf)
 {
 	int i;
 	unsigned long flags;
@@ -1333,6 +1246,16 @@
 	}
 
 	spin_unlock_irqrestore(&video->spinlock, flags);
+
+	/* remove tasklets */
+	if(video->ohci_it_ctx != -1) {
+		ohci1394_unregister_iso_tasklet(video->ohci, &video->it_tasklet);
+		video->ohci_it_ctx = -1;
+	}
+	if(video->ohci_ir_ctx != -1) {
+		ohci1394_unregister_iso_tasklet(video->ohci, &video->ir_tasklet);
+		video->ohci_ir_ctx = -1;
+	}
 	
 	/* release the ISO channel */
 	if(video->channel != -1) {
@@ -1360,42 +1283,20 @@
 	/* we can't free the DMA buffer unless it is guaranteed that
 	   no more user-space mappings exist */
 	
-	if(free_user_buf && video->user_buf) {
-		if(video->user_dma.sglist) {
-			if(video->user_dma.n_dma_pages > 0) {
-				/* unmap it from the IOMMU */
-				pci_unmap_sg(video->ohci->dev,
-					     video->user_dma.sglist,
-					     video->user_dma.n_pages,
-					     PCI_DMA_TODEVICE);
-				video->user_dma.n_dma_pages = 0;
-			}
-			kfree(video->user_dma.sglist);
-			video->user_dma.sglist = NULL;
-			video->user_dma.n_pages = 0;
-		}
-		rvfree(video->user_buf, video->user_buf_size);
-		video->user_buf = NULL;
-		video->user_buf_size = 0;
-	}
-	
-	if (video->packet_buffer) {
-		pci_unmap_single(video->ohci->dev,
-				 video->packet_buffer_dma,
-				 video->packet_buffer_size,
-				 PCI_DMA_FROMDEVICE);
-		kfree(video->packet_buffer);
-		video->packet_buffer = NULL;
-		video->packet_buffer_size = 0;
+	if(free_dv_buf) {
+		dma_region_free(&video->dv_buf);
+		video->dv_buf_size = 0;
 	}
 
+	/* free packet buffer */
+	dma_region_free(&video->packet_buf);
+	video->packet_buf_size = 0;
+
 	debug_printk("dv1394: shutdown complete\n");
 
 	return 0;
 }
 
-
-
 /*
        **********************************
        *** MMAP() THEORY OF OPERATION ***
@@ -1418,96 +1319,28 @@
 	force the user to choose one buffer size and stick with
 	it. This small sacrifice is worth the huge reduction in
 	error-prone code in dv1394.
-
-	Note: dv1394_mmap does no page table manipulation. The page
-	table entries are created by the dv1394_nopage() handler as
-	page faults are taken by the user.
-*/
-
-static struct page * dv1394_nopage(struct vm_area_struct * area, unsigned long address, int write_access)
-{
-	unsigned long offset;
-	unsigned long kernel_virt_addr;
-	struct page *ret = NOPAGE_SIGBUS;
-
-	struct video_card *video = (struct video_card*) area->vm_private_data;
-	
-	/* guard against process-context operations and the interrupt */
-	/* (by definition page faults are taken in interrupt context) */
-	spin_lock(&video->spinlock);
-
-	if(!video->user_buf)
-		goto out;
-
-	if( (address < (unsigned long) area->vm_start) ||
-	    (address > (unsigned long) area->vm_start + video->user_buf_size) )
-		goto out;
-
-	offset = address - area->vm_start;
-	kernel_virt_addr = (unsigned long) video->user_buf + offset;
-	ret = vmalloc_to_page((void *)kernel_virt_addr);
-	get_page(ret);
-
- out:
-	spin_unlock(&video->spinlock);
-	return ret;
-}
-
-static struct vm_operations_struct dv1394_vm_ops = {
-	.nopage = dv1394_nopage
-};
-
-/*
-  dv1394_mmap does no page table manipulation. The page table entries
-  are created by the dv1394_nopage() handler as page faults are taken
-  by the user.
 */
 
 int dv1394_mmap(struct file *file, struct vm_area_struct *vma)
 {
 	struct video_card *video = file_to_video_card(file);
-	unsigned long size;
-	int res = -EINVAL;
+	int retval = -EINVAL;
 
 	/* serialize mmap */
 	down(&video->sem);
 
 	if( ! video_card_initialized(video) ) {
-		res = do_dv1394_init_default(video);
-		if(res)
-			goto err;
+		retval = do_dv1394_init_default(video);
+		if(retval)
+			goto out;
 	}
 
-	/* region must be page-aligned */
-	if(vma->vm_pgoff != 0)
-		goto err;
-	
-	/* check the size the user is trying to map */
-	size = vma->vm_end - vma->vm_start;
-	if(size > video->user_buf_size)
-		goto err;
-
-	/* 
-	   we don't actually mess with the page tables here.
-	   (nopage() takes care of that from the page fault handler)
-	   Just set up the vma->vm_ops.
-	*/
-
-        vma->vm_ops = &dv1394_vm_ops;
-	vma->vm_private_data = video;
-	vma->vm_file = file;
-
-	/* don't try to swap this out =) */
-	vma->vm_flags |= VM_RESERVED;
-
+	retval = dma_region_mmap(&video->dv_buf, file, vma);
+out:
 	up(&video->sem);
-	return 0;
- err:
-	up(&video->sem);
-	return res;
+	return retval;
 }
 
-
 /*** DEVICE FILE INTERFACE *************************************************/
 
 /* no need to serialize, multiple threads OK */
@@ -1623,7 +1456,7 @@
 			continue; /* start over from 'while(count > 0)...' */
 		}
 
-		if(copy_from_user(video->user_buf + video->write_off, buffer, cnt)) {
+		if(copy_from_user(video->dv_buf.kvirt + video->write_off, buffer, cnt)) {
 			if(!ret)
 				ret = -EFAULT;
 			break;
@@ -1670,7 +1503,11 @@
 			up(&video->sem);
 			return ret;
 		}
-		receive_packets(video, video->frames[video->first_clear_frame]);
+		video->continuity_counter = -1;
+		
+		receive_packets(video);
+		
+		start_dma_receive(video);
 	}
 
 	ret = 0;
@@ -1723,7 +1560,7 @@
 			continue; /* start over from 'while(count > 0)...' */
 		}
 
-		if(copy_to_user(buffer, video->user_buf + video->write_off, cnt)) {
+		if(copy_to_user(buffer, video->dv_buf.kvirt + video->write_off, cnt)) {
 				if(!ret)
 					ret = -EFAULT;
 				break;
@@ -1912,14 +1749,17 @@
 	}
 
 	case DV1394_START_RECEIVE: {
-
 		if( !video_card_initialized(video) ) {
 			ret = do_dv1394_init_default(video);
 			if(ret)
 				goto out;
 		}
 	
-		receive_packets(video, video->frames[video->first_clear_frame]);
+		video->continuity_counter = -1;
+		
+		receive_packets(video);
+		
+		start_dma_receive(video);
 
 		ret = 0;
 		break;
@@ -2017,7 +1857,7 @@
 			struct video_card *p;
 			list_for_each(lh, &dv1394_cards) {
 				p = list_entry(lh, struct video_card, list);
-				if((p->id >> 2) == ieee1394_file_to_instance(file)) {
+				if((p->id) == ieee1394_file_to_instance(file)) {
 					video = p;
 					break;
 				}
@@ -2309,9 +2149,7 @@
 	struct video_card *video = (struct video_card*) data;
 
 	spin_lock(&video->spinlock);
-	
-	irq_printk("INTERRUPT! Video = %08lx Iso event Recv: %08x Xmit: %08x\n",
-		   (unsigned long) video, isoRecvIntEvent, isoXmitIntEvent);
+
 	irq_printk("ContextControl = %08x, CommandPtr = %08x\n", 
 	       reg_read(video->ohci, video->ohci_IsoXmitContextControlSet),
 	       reg_read(video->ohci, video->ohci_IsoXmitCommandPtr)
@@ -2453,82 +2291,150 @@
 	int wake = 0;
 	struct video_card *video = (struct video_card*) data;
 
-	if( (video->ohci_ir_ctx != -1) &&
-	    (reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & (1 << 10)) ) { 
+	spin_lock(&video->spinlock);
+
+	if( (video->ohci_ir_ctx != -1) 
+	    && (reg_read(video->ohci, video->ohci_IsoRcvContextControlSet) & (1 << 10)) ) 
+	{ 
 
 		int sof=0; /* start-of-frame flag */
 		struct frame *f;
 		u16 packet_length, packet_time;
-
-		packet_length = le16_to_cpu(video->packet_buffer[video->current_packet].data_length);
-		packet_time   = le16_to_cpu(video->packet_buffer[video->current_packet].timestamp);
-
-		irq_printk("received packet %02d, timestamp=%04x, length=%04x, sof=%02x%02x\n", video->current_packet,
-			   packet_time, packet_length, 
-			   video->packet_buffer[video->current_packet].data[0], video->packet_buffer[video->current_packet].data[1]);
-		
-		f = video->frames[video->active_frame];
-
-		/* exclude empty packet */
-		if (packet_length > 8) {
-		
-			/* check for start of frame */
-			sof = (video->packet_buffer[video->current_packet].data[0] == 0x1f &&
-				video->packet_buffer[video->current_packet].data[1] == 0x07);
-
-			if (!video->first_frame) {
-				if (sof) {
-					video->first_frame = 1;
-				}
-
-			} else if (sof) {
-				/* close current frame */
-				frame_reset(f);  /* f->state = STATE_CLEAR */
-				video->n_clear_frames++;
-				if (video->n_clear_frames > video->n_frames) {
-					video->n_clear_frames = video->n_frames;
-					video->dropped_frames++;
-				}
-				if (video->first_clear_frame == -1)
-					video->first_clear_frame = video->active_frame;
-
-				/* get the next frame */
-				video->active_frame = (video->active_frame + 1) % video->n_frames;
-				f = video->frames[video->active_frame];
-			
-				irq_printk("   frame received, active_frame = %d, n_clear_frames = %d, first_clear_frame = %d\n",
-					   video->active_frame, video->n_clear_frames, video->first_clear_frame);
- 			}
-			if (video->first_frame) {
-				if (sof) {
-					/* open next frame */
-					f->state = FRAME_READY;
+		int i, dbc=0;
+		struct DMA_descriptor_block *block = NULL;
+		u16 xferstatus;
+
+		int next_i, prev_i;
+		struct DMA_descriptor_block *next = NULL;
+		dma_addr_t next_dma = 0;
+		struct DMA_descriptor_block *prev = NULL;
+
+		/* loop over all descriptors in all frames */
+		for (i = 0; i < video->n_frames*MAX_PACKETS; i++) {
+			struct packet *p = dma_region_i(&video->packet_buf, struct packet, video->current_packet);
+
+			/* make sure we are seeing the latest changes to p */
+			dma_region_sync(&video->packet_buf,
+					(unsigned long) p - (unsigned long) video->packet_buf.kvirt,
+					sizeof(struct packet));
+					
+			packet_length = le16_to_cpu(p->data_length);
+			packet_time   = le16_to_cpu(p->timestamp);
+	
+			irq_printk("received packet %02d, timestamp=%04x, length=%04x, sof=%02x%02x\n", video->current_packet,
+				   packet_time, packet_length, 
+				   p->data[0], p->data[1]);
+			
+			/* get the descriptor based on packet_buffer cursor */
+			f = video->frames[video->current_packet / MAX_PACKETS];
+			block = &(f->descriptor_pool[video->current_packet % MAX_PACKETS]);
+			xferstatus = le16_to_cpu(block->u.in.il.q[3] >> 16);
+			xferstatus &= 0x1F;
+
+			/* get the current frame */
+			f = video->frames[video->active_frame];
+		
+			/* exclude empty packet */
+			if (packet_length > 8 && xferstatus == 0x11) {
+				irq_printk("ir_tasklet_func: xferStatus/resCount [%d] = 0x%08x\n", i, le32_to_cpu(block->u.in.il.q[3]) );
+			
+				/* check for start of frame */
+				/* DRD> Changed to check section type ([0]>>5==0) 
+				   and dif sequence ([1]>>4==0) */
+				sof = ( (p->data[0] >> 5) == 0 && (p->data[1] >> 4) == 0);
+	
+				dbc = (int) (p->cip_h1 >> 24);
+				if ( video->continuity_counter != -1 && dbc > ((video->continuity_counter + 1) % 256) )
+				{
+					video->dropped_frames += video->n_clear_frames + 1;
+					video->first_frame = 0;
+					video->n_clear_frames = 0;
+					video->first_clear_frame = -1;
 				}
+				video->continuity_counter = dbc;
+				
+				if (!video->first_frame) {
+					if (sof) {
+						video->first_frame = 1;
+					}
+	
+				} else if (sof) {
+					/* close current frame */
+					frame_reset(f);  /* f->state = STATE_CLEAR */
+					video->n_clear_frames++;
+					if (video->n_clear_frames > video->n_frames) {
+						video->dropped_frames++;
+						video->n_clear_frames--;
+						if (video->n_clear_frames < 0)
+							video->n_clear_frames = 0;
+						video->first_clear_frame = (video->first_clear_frame + 1) % video->n_frames;
+					}
+					if (video->first_clear_frame == -1)
+						video->first_clear_frame = video->active_frame;
+	
+					/* get the next frame */
+					video->active_frame = (video->active_frame + 1) % video->n_frames;
+					f = video->frames[video->active_frame];
 				
-				/* copy to buffer */
-				if (f->n_packets > (video->frame_size / 480)) {
-					printk(KERN_ERR "frame buffer overflow during receive\n");
+					irq_printk("   frame received, active_frame = %d, n_clear_frames = %d, first_clear_frame = %d\n",
+						   video->active_frame, video->n_clear_frames, video->first_clear_frame);
 				}
+				if (video->first_frame) {
+					if (sof) {
+						/* open next frame */
+						f->state = FRAME_READY;
+					}
+					
+					/* copy to buffer */
+					if (f->n_packets > (video->frame_size / 480)) {
+						printk(KERN_ERR "frame buffer overflow during receive\n");
+					}
+					
+					frame_put_packet(f, p);
+					
+				} /* first_frame */
+			}
+			
+			/* stop, end of ready packets */
+			else if (xferstatus == 0) {
+				break;
+			}
+	 
+			/* reset xferStatus & resCount */
+			block->u.in.il.q[3] = cpu_to_le32(512);
 
-				/* make sure we are seeing the latest changes to packet_buffer */
-				pci_dma_sync_single(video->ohci->dev,
-						    video->packet_buffer_dma,
-						    video->packet_buffer_size,
-						    PCI_DMA_FROMDEVICE);
-				
-				frame_put_packet( f, &video->packet_buffer[video->current_packet]);
-				
-			} /* first_frame */
- 
-		} /* not empty packet */
- 
-		/* advance packet_buffer cursor */
-		video->current_packet = (video->current_packet + 1) % MAX_PACKET_BUFFER;
+			/* terminate dma chain at this (next) packet */
+			next_i = video->current_packet;
+			f = video->frames[next_i / MAX_PACKETS];
+			next = &(f->descriptor_pool[next_i % MAX_PACKETS]);
+			next_dma = ((unsigned long) block - (unsigned long) f->descriptor_pool) + f->descriptor_pool_dma;
+			next->u.in.il.q[0] |= 3 << 20; /* enable interrupt */
+			next->u.in.il.q[2] = 0; /* disable branch */
+			
+			/* link previous to next */
+			prev_i = (next_i == 0) ? (MAX_PACKETS * video->n_frames - 1) : (next_i - 1);
+			f = video->frames[prev_i / MAX_PACKETS];
+			prev = &(f->descriptor_pool[prev_i % MAX_PACKETS]);
+			if(prev_i % (MAX_PACKETS/2)) {
+				prev->u.in.il.q[0] &= ~(3 << 20); /* no interrupt */
+			} else {
+				prev->u.in.il.q[0] |= 3 << 20; /* enable interrupt */
+			}
+			prev->u.in.il.q[2] =  (cpu_to_le32(next_dma) | 1); /* set Z=1 */
+			wmb();
+
+			/* wake up DMA in case it fell asleep */
+			reg_write(video->ohci, video->ohci_IsoRcvContextControlSet, (1 << 12));
+
+			/* advance packet_buffer cursor */
+			video->current_packet = (video->current_packet + 1) % (MAX_PACKETS * video->n_frames);
+			
+		} /* for all packets */
  
 		wake = 1; /* why the hell not? */
-
+		
 	} /* receive interrupt */
-
+	
 	spin_unlock(&video->spinlock);
 	
 	if(wake) {
@@ -2555,40 +2461,135 @@
 
 /*** DEVFS HELPERS *********************************************************/
 
+struct dv1394_devfs_entry *
+dv1394_devfs_find( char *name)
+{
+	struct list_head *lh;
+	struct dv1394_devfs_entry *p;
+
+	spin_lock( &dv1394_devfs_lock);
+	if(!list_empty(&dv1394_devfs)) {
+		list_for_each(lh, &dv1394_devfs) {
+			p = list_entry(lh, struct dv1394_devfs_entry, list);
+			if(!strncmp(p->name, name, sizeof(p->name))) {
+				goto found;
+			}
+		}
+	}
+	p = NULL;
+	
+found:
+	spin_unlock( &dv1394_devfs_lock);
+	return p;
+}
+
 #ifdef CONFIG_DEVFS_FS
 static int dv1394_devfs_add_entry(struct video_card *video)
 {
-	char buf[64];
-	snprintf(buf, sizeof(buf), "ieee1394/dv/host%d/%s/%s",
-		(video->id>>2),
-		(video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"),
-		(video->mode == MODE_RECEIVE ? "in" : "out"));
+	char buf[32];
+	struct dv1394_devfs_entry *p;
+	struct dv1394_devfs_entry *parent;
 
-	video->devfs_handle = devfs_register(NULL, buf, DEVFS_FL_NONE,
+	p = kmalloc(sizeof(struct dv1394_devfs_entry), GFP_KERNEL);
+	if(!p) {
+		printk(KERN_ERR "dv1394: cannot allocate dv1394_devfs_entry\n");
+		goto err;
+	}
+	memset(p, 0, sizeof(struct dv1394_devfs_entry));
+	
+	snprintf(buf, sizeof(buf), "dv/host%d/%s", (video->id>>2),
+						(video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"));
+		
+	parent = dv1394_devfs_find(buf);
+	if (parent == NULL) {
+		printk(KERN_ERR "dv1394: unable to locate parent devfs of %s\n", buf);
+		goto err_free;
+	}
+	
+	video->devfs_handle = devfs_register(
+						 parent->devfs,
+					     (video->mode == MODE_RECEIVE ? "in" : "out"),
+						 DEVFS_FL_NONE,
 					     IEEE1394_MAJOR,
 					     IEEE1394_MINOR_BLOCK_DV1394*16 + video->id,
 					     S_IFCHR | S_IRUGO | S_IWUGO,
 					     &dv1394_fops,
 					     (void*) video);
-	if (video->devfs_handle == NULL) {
-		printk(KERN_ERR "dv1394: unable to create /dev/%s\n", buf);
-		return -ENOMEM;
+	p->devfs = video->devfs_handle;
+
+	if (p->devfs == NULL) {
+		printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/%s/%s\n",
+			parent->name,
+			(video->mode == MODE_RECEIVE ? "in" : "out"));
+		goto err_free;
 	}
+	
+	spin_lock( &dv1394_devfs_lock);
+	INIT_LIST_HEAD(&p->list);
+	list_add_tail(&p->list, &dv1394_devfs);
+	spin_unlock( &dv1394_devfs_lock);
+	
 	return 0;
+	
+ err_free:
+	kfree(p);
+ err:
+	return -ENOMEM;
 }
 
-static int dv1394_devfs_add_dir(char *name)
+static int
+dv1394_devfs_add_dir( char *name,
+					struct dv1394_devfs_entry *parent, 
+					struct dv1394_devfs_entry **out)
 {
-	if (!devfs_mk_dir(NULL, name, NULL)) {
-		printk(KERN_ERR "dv1394: unable to create /dev/%s\n", name);
-		return -ENOMEM;
+	struct dv1394_devfs_entry *p;
+
+	p = kmalloc(sizeof(struct dv1394_devfs_entry), GFP_KERNEL);
+	if(!p) {
+		printk(KERN_ERR "dv1394: cannot allocate dv1394_devfs_entry\n");
+		goto err;
 	}
+	memset(p, 0, sizeof(struct dv1394_devfs_entry));
+	
+	if (parent == NULL) {
+		snprintf(p->name, sizeof(p->name), "%s", name);
+		p->devfs = devfs_mk_dir(ieee1394_devfs_handle, name, NULL);
+	} else {
+		snprintf(p->name, sizeof(p->name), "%s/%s", parent->name, name);
+		p->devfs = devfs_mk_dir(parent->devfs, name, NULL);
+	}
+	if (p->devfs == NULL) {
+		printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/%s\n", p->name);
+		goto err_free;
+	}
+
+	p->parent = parent;
+	if (out != NULL) *out = p;
+
+	spin_lock( &dv1394_devfs_lock);
+	INIT_LIST_HEAD(&p->list);
+	list_add_tail(&p->list, &dv1394_devfs);
+	spin_unlock( &dv1394_devfs_lock);
+
 	return 0;
+	
+ err_free:
+	kfree(p);
+ err:
+	return -ENOMEM;
 }
 
-void dv1394_devfs_del(char *name)
+void dv1394_devfs_del( char *name)
 {
-	devfs_remove("ieee1394/%s", name);
+	struct dv1394_devfs_entry *p = dv1394_devfs_find(name);
+	if (p != NULL) {
+		devfs_unregister(p->devfs);
+		
+		spin_lock( &dv1394_devfs_lock);
+		list_del(&p->list);
+		spin_unlock( &dv1394_devfs_lock);
+		kfree(p);
+	}
 }
 #endif /* CONFIG_DEVFS_FS */
 
@@ -2612,6 +2613,10 @@
 	/* lower 2 bits of id indicate which of four "plugs"
 	   per host */
 	video->id = ohci->id << 2; 
+	if (format == DV1394_NTSC)
+		video->id |= mode;
+	else
+		video->id |= 2 + mode;
 
 	video->ohci_it_ctx = -1;
 	video->ohci_ir_ctx = -1;
@@ -2644,8 +2649,10 @@
 	for(i = 0; i < DV1394_MAX_FRAMES; i++)
 		video->frames[i] = NULL;
 
-	video->user_buf = NULL;
-	video->user_buf_size = 0;
+	dma_region_init(&video->dv_buf);
+	video->dv_buf_size = 0;
+	dma_region_init(&video->packet_buf);
+	video->packet_buf_size = 0;
 
 	clear_bit(0, &video->open);
 	spin_lock_init(&video->spinlock);
@@ -2658,10 +2665,6 @@
 	list_add_tail(&video->list, &dv1394_cards);
 	spin_unlock_irqrestore(&dv1394_cards_lock, flags);
 	
-	if (format == DV1394_NTSC)
-		video->id |= mode;
-	else video->id |= 2 + mode;
-
 #ifdef CONFIG_DEVFS_FS
 	if (dv1394_devfs_add_entry(video) < 0)
 			goto err_free;
@@ -2770,12 +2773,15 @@
 #endif
 
 #ifdef CONFIG_DEVFS_FS
-	snprintf(buf, sizeof(buf), "ieee1394/dv/host%d", ohci->id);
-	dv1394_devfs_add_dir(buf);
-	snprintf(buf, sizeof(buf), "ieee1394/dv/host%d/NTSC", ohci->id);
-	dv1394_devfs_add_dir(buf);
-	snprintf(buf, sizeof(buf), "ieee1394/dv/host%d/PAL", ohci->id);
-	dv1394_devfs_add_dir(buf);
+{
+	struct dv1394_devfs_entry *devfs_entry = dv1394_devfs_find("dv");
+	if (devfs_entry != NULL) {
+		snprintf(buf, sizeof(buf), "host%d", ohci->id);
+		dv1394_devfs_add_dir(buf, devfs_entry, &devfs_entry);
+		dv1394_devfs_add_dir("NTSC", devfs_entry, NULL);
+		dv1394_devfs_add_dir("PAL", devfs_entry, NULL);
+	}
+}
 #endif
 	
 	dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE);
@@ -2935,7 +2941,7 @@
 	}
 
 #ifdef CONFIG_DEVFS_FS
-	if (dv1394_devfs_add_dir("ieee1394/dv") < 0) {
+	if (dv1394_devfs_add_dir("dv", NULL, NULL) < 0) {
 		printk(KERN_ERR "dv1394: unable to create /dev/ieee1394/dv\n");
 		ieee1394_unregister_chardev(IEEE1394_MINOR_BLOCK_DV1394);
 		return -ENOMEM;
diff -Nru a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
--- a/drivers/ieee1394/eth1394.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/eth1394.c	Sun Dec 15 18:08:29 2002
@@ -55,9 +55,9 @@
 #include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/skbuff.h>
+#include <linux/bitops.h>
 #include <asm/delay.h>
 #include <asm/semaphore.h>
-#include <asm/bitops.h>
 #include <net/arp.h>
 
 #include "ieee1394_types.h"
@@ -77,7 +77,7 @@
 	printk(KERN_ERR fmt, ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 601 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 641 $ Ben Collins <bcollins@debian.org>";
 
 /* Our ieee1394 highlevel driver */
 #define ETHER1394_DRIVER_NAME "ether1394"
@@ -360,7 +360,7 @@
 	priv->host = host;
 
 	hi = (struct host_info *)kmalloc (sizeof (struct host_info),
-					  GFP_KERNEL);
+					  in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
 
 	if (hi == NULL)
 		goto out;
@@ -682,6 +682,8 @@
 	ptask->skb = skb;
 	ptask->addr = addr;
 	ptask->dest_node = dest_node;
+	/* TODO: When 2.4 is out of the way, give each of our ethernet
+	 * dev's a workqueue to handle these.  */
 	HPSB_INIT_WORK(&ptask->tq, hpsb_write_sched, ptask);
 	hpsb_schedule_work(&ptask->tq);
 
diff -Nru a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
--- a/drivers/ieee1394/highlevel.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/ieee1394/highlevel.c	Sun Dec 15 18:08:31 2002
@@ -28,7 +28,7 @@
 
 
 LIST_HEAD(hl_drivers);
-rwlock_t hl_drivers_lock = RW_LOCK_UNLOCKED;
+static DECLARE_MUTEX(hl_drivers_lock);
 
 LIST_HEAD(addr_space);
 rwlock_t addr_space_lock = RW_LOCK_UNLOCKED;
@@ -53,11 +53,11 @@
         hl->name = name;
         hl->op = ops;
 
-        write_lock_irq(&hl_drivers_lock);
+	down(&hl_drivers_lock);
         list_add_tail(&hl->hl_list, &hl_drivers);
-        write_unlock_irq(&hl_drivers_lock);
+	up(&hl_drivers_lock);
 
-        hl_all_hosts(hl->op->add_host);
+	hl_all_hosts(hl->op->add_host);
 
         return hl;
 }
@@ -82,9 +82,9 @@
         }
         write_unlock_irq(&addr_space_lock);
 
-        write_lock_irq(&hl_drivers_lock);
+	down(&hl_drivers_lock);
         list_del(&hl->hl_list);
-        write_unlock_irq(&hl_drivers_lock);
+	up(&hl_drivers_lock);
 
         if (hl->op->remove_host)
 		hl_all_hosts(hl->op->remove_host);
@@ -119,10 +119,8 @@
         write_lock_irq(&addr_space_lock);
         entry = addr_space.next;
 
-        while (list_entry(entry, struct hpsb_address_serve, as_list)->end
-               <= start) {
-                if (list_entry(entry->next, struct hpsb_address_serve, as_list)
-                    ->start >= end) {
+        while (list_entry(entry, struct hpsb_address_serve, as_list)->end <= start) {
+                if (list_entry(entry->next, struct hpsb_address_serve, as_list)->start >= end) {
                         list_add(&as->as_list, entry);
                         list_add_tail(&as->addr_list, &hl->addr_list);
                         retval = 1;
@@ -198,13 +196,13 @@
         struct list_head *entry;
         struct hpsb_highlevel *hl;
 
-        read_lock(&hl_drivers_lock);
+	down(&hl_drivers_lock);
         list_for_each(entry, &hl_drivers) {
                 hl = list_entry(entry, struct hpsb_highlevel, hl_list);
 
 		hl->op->add_host(host);
         }
-        read_unlock(&hl_drivers_lock);
+        up(&hl_drivers_lock);
 }
 
 void highlevel_remove_host(struct hpsb_host *host)
@@ -212,14 +210,14 @@
         struct list_head *entry;
         struct hpsb_highlevel *hl;
 
-        write_lock_irq(&hl_drivers_lock);
+        down(&hl_drivers_lock);
 	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);
         }
-        write_unlock_irq(&hl_drivers_lock);
+        up(&hl_drivers_lock);
 }
 
 void highlevel_host_reset(struct hpsb_host *host)
@@ -227,14 +225,14 @@
         struct list_head *entry;
         struct hpsb_highlevel *hl;
 
-	read_lock(&hl_drivers_lock);
+	down(&hl_drivers_lock);
 	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);
         }
-	read_unlock(&hl_drivers_lock);
+	up(&hl_drivers_lock);
 }
 
 void highlevel_iso_receive(struct hpsb_host *host, quadlet_t *data,
@@ -244,7 +242,7 @@
         struct hpsb_highlevel *hl;
         int channel = (data[0] >> 8) & 0x3f;
 
-        read_lock(&hl_drivers_lock);
+        down(&hl_drivers_lock);
         entry = hl_drivers.next;
 
         while (entry != &hl_drivers) {
@@ -254,7 +252,7 @@
                 }
                 entry = entry->next;
         }
-        read_unlock(&hl_drivers_lock);
+        up(&hl_drivers_lock);
 }
 
 void highlevel_fcp_request(struct hpsb_host *host, int nodeid, int direction,
@@ -264,7 +262,7 @@
         struct hpsb_highlevel *hl;
         int cts = data[0] >> 4;
 
-        read_lock(&hl_drivers_lock);
+        down(&hl_drivers_lock);
         entry = hl_drivers.next;
 
         while (entry != &hl_drivers) {
@@ -275,7 +273,7 @@
                 }
                 entry = entry->next;
         }
-        read_unlock(&hl_drivers_lock);
+        up(&hl_drivers_lock);
 }
 
 int highlevel_read(struct hpsb_host *host, int nodeid, quadlet_t *buffer,
diff -Nru a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c
--- a/drivers/ieee1394/hosts.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/hosts.c	Sun Dec 15 18:08:29 2002
@@ -121,6 +121,7 @@
 struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra)
 {
         struct hpsb_host *h;
+	int i;
 
         h = kmalloc(sizeof(struct hpsb_host) + extra, SLAB_KERNEL);
         if (!h) return NULL;
@@ -133,8 +134,8 @@
         INIT_LIST_HEAD(&h->pending_packets);
         spin_lock_init(&h->pending_pkt_lock);
 
-        sema_init(&h->tlabel_count, 64);
-        spin_lock_init(&h->tlabel_lock);
+	for (i = 0; i < ARRAY_SIZE(h->tpool); i++)
+		HPSB_TPOOL_INIT(&h->tpool[i]);
 
 	atomic_set(&h->generation, 0);
 
diff -Nru a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h
--- a/drivers/ieee1394/hosts.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/hosts.h	Sun Dec 15 18:08:28 2002
@@ -18,6 +18,7 @@
 #define CSR_CONFIG_ROM_SIZE       0x100
 
 struct hpsb_packet;
+struct hpsb_iso;
 
 struct hpsb_host {
         struct list_head host_list;
@@ -32,13 +33,6 @@
         spinlock_t pending_pkt_lock;
         struct hpsb_queue_struct timeout_tq;
 
-        /* A bitmask where a set bit means that this tlabel is in use.
-         * FIXME - should be handled per node instead of per bus. */
-        u32 tlabel_pool[2];
-        struct semaphore tlabel_count;
-        spinlock_t tlabel_lock;
-	u32 tlabel_current;
-
         unsigned char iso_listen_count[64];
 
         int node_count; /* number of identified nodes on this bus */
@@ -64,6 +58,9 @@
         u8 *speed_map;
         struct csr_control csr;
 
+	/* Per node tlabel pool allocation */
+	struct hpsb_tlabel_pool tpool[64];
+
         struct hpsb_host_driver *driver;
 
 	struct pci_dev *pdev;
@@ -108,6 +105,28 @@
         ISO_UNLISTEN_CHANNEL
 };
 
+enum isoctl_cmd {
+	/* rawiso API - see iso.h for the meanings of these commands
+	 * INIT = allocate resources
+	 * START = begin transmission/reception (arg: cycle to start on)
+	 * STOP = halt transmission/reception
+	 * QUEUE/RELEASE = produce/consume packets (arg: # of packets)
+	 * SHUTDOWN = deallocate resources
+	 */
+	
+	XMIT_INIT,
+	XMIT_START,
+	XMIT_STOP,
+	XMIT_QUEUE,
+	XMIT_SHUTDOWN,
+	
+	RECV_INIT,
+	RECV_START,
+	RECV_STOP,
+	RECV_RELEASE,
+	RECV_SHUTDOWN,
+};
+
 enum reset_types {
         /* 166 microsecond reset -- only type of reset available on
            non-1394a capable IEEE 1394 controllers */
@@ -115,7 +134,13 @@
 
         /* Short (arbitrated) reset -- only available on 1394a capable
            IEEE 1394 capable controllers */
-        SHORT_RESET
+        SHORT_RESET,
+
+	/* Variants, that set force_root before issueing the bus reset */
+	LONG_RESET_FORCE_ROOT, SHORT_RESET_FORCE_ROOT,
+
+	/* Variants, that clear force_root before issueing the bus reset */
+	LONG_RESET_NO_FORCE_ROOT, SHORT_RESET_NO_FORCE_ROOT
 };
 
 struct hpsb_host_driver {
@@ -145,6 +170,11 @@
          */
         int (*devctl) (struct hpsb_host *host, enum devctl_cmd command, int arg);
 
+	 /* ISO transmission/reception functions. Return 0 on success, -1 on failure.
+	  * If the low-level driver does not support the new ISO API, set isoctl to NULL.
+	  */
+	int (*isoctl) (struct hpsb_iso *iso, enum isoctl_cmd command, int arg);
+	
         /* This function is mainly to redirect local CSR reads/locks to the iso
          * management registers (bus manager id, bandwidth available, channels
          * available) to the hardware registers in OHCI.  reg is 0,1,2,3 for bus
@@ -155,9 +185,6 @@
         quadlet_t (*hw_csr_reg) (struct hpsb_host *host, int reg,
                                  quadlet_t data, quadlet_t compare);
 };
-
-/* core internal use */
-void register_builtin_lowlevels(void);
 
 /* high level internal use */
 struct hpsb_highlevel;
diff -Nru a/drivers/ieee1394/ieee1394.h b/drivers/ieee1394/ieee1394.h
--- a/drivers/ieee1394/ieee1394.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/ieee1394.h	Sun Dec 15 18:08:28 2002
@@ -15,6 +15,7 @@
 #define TCODE_CYCLE_START        0x8
 #define TCODE_LOCK_REQUEST       0x9
 #define TCODE_ISO_DATA           0xa
+#define TCODE_STREAM_DATA        0xa
 #define TCODE_LOCK_RESPONSE      0xb
 
 #define RCODE_COMPLETE           0x0
diff -Nru a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
--- a/drivers/ieee1394/ieee1394_core.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/ieee1394_core.c	Sun Dec 15 18:08:28 2002
@@ -29,7 +29,7 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/proc_fs.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/byteorder.h>
 #include <asm/semaphore.h>
 
@@ -42,6 +42,8 @@
 #include "csr.h"
 #include "nodemgr.h"
 #include "ieee1394_hotplug.h"
+#include "dma.h"
+#include "iso.h"
 
 /*
  * Disable the nodemgr detection and config rom reading functionality.
@@ -76,28 +78,31 @@
         printk("\n");
 }
 
-static void process_complete_tasks(struct hpsb_packet *packet)
+static void run_packet_complete(struct hpsb_packet *packet)
 {
-	struct list_head *lh, *next;
-
-	list_for_each_safe(lh, next, &packet->complete_tq) {
-		struct hpsb_queue_struct *tq =
-			list_entry(lh, struct hpsb_queue_struct, hpsb_queue_list);
-		list_del(&tq->hpsb_queue_list);
-		hpsb_schedule_work(tq);
+	if (packet->complete_routine != NULL) {
+		packet->complete_routine(packet->complete_data);
+		packet->complete_routine = NULL;
+		packet->complete_data = NULL;
 	}
-
 	return;
 }
 
 /**
- * hpsb_add_packet_complete_task - add a new task for when a packet completes
+ * hpsb_set_packet_complete_task - set the task that runs when a packet
+ * completes. You cannot call this more than once on a single packet
+ * before it is sent.
+ *
  * @packet: the packet whose completion we want the task added to
- * @tq: the hpsb_queue_struct describing the task to add
+ * @routine: function to call
+ * @data: data (if any) to pass to the above function
  */
-void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq)
+void hpsb_set_packet_complete_task(struct hpsb_packet *packet,
+				   void (*routine)(void *), void *data)
 {
-	list_add_tail(&tq->hpsb_queue_list, &packet->complete_tq);
+	BUG_ON(packet->complete_routine != NULL);
+	packet->complete_routine = routine;
+	packet->complete_data = data;
 	return;
 }
 
@@ -145,9 +150,10 @@
                 packet->data_size = data_size;
         }
 
-        INIT_LIST_HEAD(&packet->complete_tq);
         INIT_LIST_HEAD(&packet->list);
         sema_init(&packet->state_change, 0);
+	packet->complete_routine = NULL;
+	packet->complete_data = NULL;
         packet->state = hpsb_unused;
         packet->generation = -1;
         packet->data_be = 1;
@@ -372,6 +378,7 @@
                         /* selfid stage did not complete without error */
                         HPSB_NOTICE("Error in SelfID stage, resetting");
 			host->in_bus_reset = 0;
+			/* this should work from ohci1394 now... */
                         hpsb_reset_bus(host, LONG_RESET);
                         return;
                 } else {
@@ -397,7 +404,6 @@
                 host->is_irm = 0;
         }
 
-        host->reset_retries = 0;
         if (isroot) {
 		host->driver->devctl(host, ACT_CYCLE_MASTER, 1);
 		host->is_cycmst = 1;
@@ -405,6 +411,29 @@
 	atomic_inc(&host->generation);
 	host->in_bus_reset = 0;
         highlevel_host_reset(host);
+
+        /* check for common cycle master error */
+        hpsb_check_cycle_master(host);
+}
+
+
+void hpsb_check_cycle_master(struct hpsb_host *host)
+{
+	/* check if host is IRM and not ROOT */
+	if (host->is_irm && !host->is_root) {
+		HPSB_NOTICE("Host is IRM but not root, resetting");
+		if (host->reset_retries++ < 4) {
+			/* selfid stage did not yield valid cycle master */
+			hpsb_reset_bus(host, LONG_RESET_FORCE_ROOT);
+		} else {
+			host->reset_retries = 0;
+			HPSB_NOTICE("Stopping out-of-control reset loop");
+			HPSB_NOTICE("Warning - Cycle Master not set correctly");
+		}
+		return;
+	}
+
+	host->reset_retries = 0;
 }
 
 
@@ -425,7 +454,7 @@
                 packet->state = hpsb_complete;
                 up(&packet->state_change);
                 up(&packet->state_change);
-                process_complete_tasks(packet);
+                run_packet_complete(packet);
                 return;
         }
 
@@ -614,7 +643,7 @@
 
         packet->state = hpsb_complete;
         up(&packet->state_change);
-	process_complete_tasks(packet);
+	run_packet_complete(packet);
 }
 
 
@@ -647,6 +676,54 @@
         return p;
 }
 
+#define PREP_ASYNC_HEAD_RCODE(tc) \
+	packet->tcode = tc; \
+	packet->header[0] = (packet->node_id << 16) | (packet->tlabel << 10) \
+		| (1 << 8) | (tc << 4); \
+	packet->header[1] = (packet->host->node_id << 16) | (rcode << 12); \
+	packet->header[2] = 0
+
+static void fill_async_readquad_resp(struct hpsb_packet *packet, int rcode,
+                              quadlet_t data)
+{
+	PREP_ASYNC_HEAD_RCODE(TCODE_READQ_RESPONSE);
+	packet->header[3] = data;
+	packet->header_size = 16;
+	packet->data_size = 0;
+}
+
+static void fill_async_readblock_resp(struct hpsb_packet *packet, int rcode,
+                               int length)
+{
+	if (rcode != RCODE_COMPLETE)
+		length = 0;
+
+	PREP_ASYNC_HEAD_RCODE(TCODE_READB_RESPONSE);
+	packet->header[3] = length << 16;
+	packet->header_size = 16;
+	packet->data_size = length + (length % 4 ? 4 - (length % 4) : 0);
+}
+
+static void fill_async_write_resp(struct hpsb_packet *packet, int rcode)
+{
+	PREP_ASYNC_HEAD_RCODE(TCODE_WRITE_RESPONSE);
+	packet->header[2] = 0;
+	packet->header_size = 12;
+	packet->data_size = 0;
+}
+
+static void fill_async_lock_resp(struct hpsb_packet *packet, int rcode, int extcode,
+                          int length)
+{
+	if (rcode != RCODE_COMPLETE)
+		length = 0;
+
+	PREP_ASYNC_HEAD_RCODE(TCODE_LOCK_RESPONSE);
+	packet->header[3] = (length << 16) | extcode;
+	packet->header_size = 16;
+	packet->data_size = length;
+}
+
 #define PREP_REPLY_PACKET(length) \
                 packet = create_reply_packet(host, data, length); \
                 if (packet == NULL) break
@@ -848,7 +925,7 @@
                 packet->state = hpsb_complete;
                 packet->ack_code = ACKX_ABORTED;
                 up(&packet->state_change);
-		process_complete_tasks(packet);
+		run_packet_complete(packet);
         }
 }
 
@@ -890,7 +967,7 @@
                 packet->state = hpsb_complete;
                 packet->ack_code = ACKX_TIMEOUT;
                 up(&packet->state_change);
-		process_complete_tasks(packet);
+		run_packet_complete(packet);
         }
 }
 
@@ -1143,14 +1220,17 @@
 module_exit(ieee1394_cleanup);
 
 /* Exported symbols */
+
+/** hosts.c **/
 EXPORT_SYMBOL(hpsb_alloc_host);
 EXPORT_SYMBOL(hpsb_add_host);
 EXPORT_SYMBOL(hpsb_remove_host);
 EXPORT_SYMBOL(hpsb_ref_host);
 EXPORT_SYMBOL(hpsb_unref_host);
-EXPORT_SYMBOL(hpsb_speedto_str);
-EXPORT_SYMBOL(hpsb_add_packet_complete_task);
 
+/** ieee1394_core.c **/
+EXPORT_SYMBOL(hpsb_speedto_str);
+EXPORT_SYMBOL(hpsb_set_packet_complete_task);
 EXPORT_SYMBOL(alloc_hpsb_packet);
 EXPORT_SYMBOL(free_hpsb_packet);
 EXPORT_SYMBOL(hpsb_send_packet);
@@ -1158,35 +1238,30 @@
 EXPORT_SYMBOL(hpsb_bus_reset);
 EXPORT_SYMBOL(hpsb_selfid_received);
 EXPORT_SYMBOL(hpsb_selfid_complete);
+EXPORT_SYMBOL(hpsb_check_cycle_master);
 EXPORT_SYMBOL(hpsb_packet_sent);
 EXPORT_SYMBOL(hpsb_packet_received);
+EXPORT_SYMBOL(ieee1394_register_chardev);
+EXPORT_SYMBOL(ieee1394_unregister_chardev);
+EXPORT_SYMBOL(ieee1394_devfs_handle);
+EXPORT_SYMBOL(ieee1394_procfs_entry);
 
-EXPORT_SYMBOL(get_tlabel);
-EXPORT_SYMBOL(free_tlabel);
-EXPORT_SYMBOL(fill_async_readquad);
-EXPORT_SYMBOL(fill_async_readquad_resp);
-EXPORT_SYMBOL(fill_async_readblock);
-EXPORT_SYMBOL(fill_async_readblock_resp);
-EXPORT_SYMBOL(fill_async_writequad);
-EXPORT_SYMBOL(fill_async_writeblock);
-EXPORT_SYMBOL(fill_async_write_resp);
-EXPORT_SYMBOL(fill_async_lock);
-EXPORT_SYMBOL(fill_async_lock_resp);
-EXPORT_SYMBOL(fill_iso_packet);
-EXPORT_SYMBOL(fill_phy_packet);
-EXPORT_SYMBOL(hpsb_make_readqpacket);
-EXPORT_SYMBOL(hpsb_make_readbpacket);
-EXPORT_SYMBOL(hpsb_make_writeqpacket);
-EXPORT_SYMBOL(hpsb_make_writebpacket);
+/** ieee1394_transactions.c **/
+EXPORT_SYMBOL(hpsb_get_tlabel);
+EXPORT_SYMBOL(hpsb_free_tlabel);
+EXPORT_SYMBOL(hpsb_make_readpacket);
+EXPORT_SYMBOL(hpsb_make_writepacket);
 EXPORT_SYMBOL(hpsb_make_lockpacket);
 EXPORT_SYMBOL(hpsb_make_lock64packet);
 EXPORT_SYMBOL(hpsb_make_phypacket);
-EXPORT_SYMBOL(hpsb_packet_success);
-EXPORT_SYMBOL(hpsb_make_packet);
+EXPORT_SYMBOL(hpsb_make_isopacket);
 EXPORT_SYMBOL(hpsb_read);
 EXPORT_SYMBOL(hpsb_write);
 EXPORT_SYMBOL(hpsb_lock);
+EXPORT_SYMBOL(hpsb_lock64);
+EXPORT_SYMBOL(hpsb_packet_success);
 
+/** highlevel.c **/
 EXPORT_SYMBOL(hpsb_register_highlevel);
 EXPORT_SYMBOL(hpsb_unregister_highlevel);
 EXPORT_SYMBOL(hpsb_register_addrspace);
@@ -1201,20 +1276,42 @@
 EXPORT_SYMBOL(highlevel_remove_host);
 EXPORT_SYMBOL(highlevel_host_reset);
 
+/** nodemgr.c **/
 EXPORT_SYMBOL(hpsb_guid_get_entry);
 EXPORT_SYMBOL(hpsb_nodeid_get_entry);
+EXPORT_SYMBOL(hpsb_check_nodeid);
 EXPORT_SYMBOL(hpsb_node_fill_packet);
 EXPORT_SYMBOL(hpsb_node_read);
 EXPORT_SYMBOL(hpsb_node_write);
 EXPORT_SYMBOL(hpsb_node_lock);
-EXPORT_SYMBOL(hpsb_update_config_rom);
-EXPORT_SYMBOL(hpsb_get_config_rom);
 EXPORT_SYMBOL(hpsb_register_protocol);
 EXPORT_SYMBOL(hpsb_unregister_protocol);
 EXPORT_SYMBOL(hpsb_release_unit_directory);
 
-EXPORT_SYMBOL(ieee1394_register_chardev);
-EXPORT_SYMBOL(ieee1394_unregister_chardev);
-EXPORT_SYMBOL(ieee1394_devfs_handle);
+/** csr.c **/
+EXPORT_SYMBOL(hpsb_update_config_rom);
+EXPORT_SYMBOL(hpsb_get_config_rom);
 
-EXPORT_SYMBOL(ieee1394_procfs_entry);
+/** dma.c **/
+EXPORT_SYMBOL(dma_prog_region_init);
+EXPORT_SYMBOL(dma_prog_region_alloc);
+EXPORT_SYMBOL(dma_prog_region_free);
+EXPORT_SYMBOL(dma_region_init);
+EXPORT_SYMBOL(dma_region_alloc);
+EXPORT_SYMBOL(dma_region_free);
+EXPORT_SYMBOL(dma_region_sync);
+EXPORT_SYMBOL(dma_region_mmap);
+EXPORT_SYMBOL(dma_region_offset_to_bus);
+
+/** iso.c **/
+EXPORT_SYMBOL(hpsb_iso_xmit_init);
+EXPORT_SYMBOL(hpsb_iso_recv_init);
+EXPORT_SYMBOL(hpsb_iso_xmit_start);
+EXPORT_SYMBOL(hpsb_iso_recv_start);
+EXPORT_SYMBOL(hpsb_iso_stop);
+EXPORT_SYMBOL(hpsb_iso_shutdown);
+EXPORT_SYMBOL(hpsb_iso_xmit_queue_packets);
+EXPORT_SYMBOL(hpsb_iso_recv_release_packets);
+EXPORT_SYMBOL(hpsb_iso_n_ready);
+EXPORT_SYMBOL(hpsb_iso_packet_data);
+EXPORT_SYMBOL(hpsb_iso_packet_info);
diff -Nru a/drivers/ieee1394/ieee1394_core.h b/drivers/ieee1394/ieee1394_core.h
--- a/drivers/ieee1394/ieee1394_core.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/ieee1394_core.h	Sun Dec 15 18:08:28 2002
@@ -68,7 +68,10 @@
         /* Very core internal, don't care. */
         struct semaphore state_change;
 
-	struct list_head complete_tq;
+	/* Function (and possible data to pass to it) to call when this
+	 * packet is completed.  */
+	void (*complete_routine)(void *);
+	void *complete_data;
 
         /* Store jiffies for implementing bus timeouts. */
         unsigned long sendtime;
@@ -76,8 +79,9 @@
         quadlet_t embedded_header[5];
 };
 
-/* add a new task for when a packet completes */
-void hpsb_add_packet_complete_task(struct hpsb_packet *packet, struct hpsb_queue_struct *tq);
+/* Set a task for when a packet completes */
+void hpsb_set_packet_complete_task(struct hpsb_packet *packet,
+		void (*routine)(void *), void *data);
 
 static inline struct hpsb_packet *driver_packet(struct list_head *l)
 {
@@ -135,6 +139,12 @@
  * and whether host is root now.
  */
 void hpsb_selfid_complete(struct hpsb_host *host, int phyid, int isroot);
+
+/* 
+ * Check bus reset results to find cycle master
+ */
+void hpsb_check_cycle_master(struct hpsb_host *host);
+
 
 /*
  * Notify core of sending a packet.  Ackcode is the ack code returned for async
diff -Nru a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c
--- a/drivers/ieee1394/ieee1394_transactions.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/ieee1394_transactions.c	Sun Dec 15 18:08:29 2002
@@ -10,14 +10,16 @@
  */
 
 #include <linux/sched.h>
+#include <linux/bitops.h>
 #include <asm/errno.h>
-#include <asm/bitops.h>
+#include <linux/interrupt.h>
 
 #include "ieee1394.h"
 #include "ieee1394_types.h"
 #include "hosts.h"
 #include "ieee1394_core.h"
 #include "highlevel.h"
+#include "nodemgr.h"
 
 
 #define PREP_ASYNC_HEAD_ADDRESS(tc) \
@@ -27,15 +29,8 @@
         packet->header[1] = (packet->host->node_id << 16) | (addr >> 32); \
         packet->header[2] = addr & 0xffffffff
 
-#define PREP_ASYNC_HEAD_RCODE(tc) \
-        packet->tcode = tc; \
-        packet->header[0] = (packet->node_id << 16) | (packet->tlabel << 10) \
-                | (1 << 8) | (tc << 4); \
-        packet->header[1] = (packet->host->node_id << 16) | (rcode << 12); \
-        packet->header[2] = 0
-
 
-void fill_async_readquad(struct hpsb_packet *packet, u64 addr)
+static void fill_async_readquad(struct hpsb_packet *packet, u64 addr)
 {
         PREP_ASYNC_HEAD_ADDRESS(TCODE_READQ);
         packet->header_size = 12;
@@ -43,16 +38,7 @@
         packet->expect_response = 1;
 }
 
-void fill_async_readquad_resp(struct hpsb_packet *packet, int rcode, 
-                              quadlet_t data)
-{
-        PREP_ASYNC_HEAD_RCODE(TCODE_READQ_RESPONSE);
-        packet->header[3] = data;
-        packet->header_size = 16;
-        packet->data_size = 0;
-}
-
-void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length)
+static void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length)
 {
         PREP_ASYNC_HEAD_ADDRESS(TCODE_READB);
         packet->header[3] = length << 16;
@@ -61,20 +47,7 @@
         packet->expect_response = 1;
 }
 
-void fill_async_readblock_resp(struct hpsb_packet *packet, int rcode, 
-                               int length)
-{
-        if (rcode != RCODE_COMPLETE) {
-                length = 0;
-        }
-
-        PREP_ASYNC_HEAD_RCODE(TCODE_READB_RESPONSE);
-        packet->header[3] = length << 16;
-        packet->header_size = 16;
-        packet->data_size = length + (length % 4 ? 4 - (length % 4) : 0);
-}
-
-void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data)
+static void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data)
 {
         PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEQ);
         packet->header[3] = data;
@@ -83,7 +56,7 @@
         packet->expect_response = 1;
 }
 
-void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length)
+static void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length)
 {
         PREP_ASYNC_HEAD_ADDRESS(TCODE_WRITEB);
         packet->header[3] = length << 16;
@@ -92,15 +65,7 @@
         packet->data_size = length + (length % 4 ? 4 - (length % 4) : 0);
 }
 
-void fill_async_write_resp(struct hpsb_packet *packet, int rcode)
-{
-        PREP_ASYNC_HEAD_RCODE(TCODE_WRITE_RESPONSE);
-        packet->header[2] = 0;
-        packet->header_size = 12;
-        packet->data_size = 0;
-}
-
-void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode, 
+static void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode, 
                      int length)
 {
         PREP_ASYNC_HEAD_ADDRESS(TCODE_LOCK_REQUEST);
@@ -110,20 +75,7 @@
         packet->expect_response = 1;
 }
 
-void fill_async_lock_resp(struct hpsb_packet *packet, int rcode, int extcode, 
-                          int length)
-{
-        if (rcode != RCODE_COMPLETE) {
-                length = 0;
-        }
-
-        PREP_ASYNC_HEAD_RCODE(TCODE_LOCK_RESPONSE);
-        packet->header[3] = (length << 16) | extcode;
-        packet->header_size = 16;
-        packet->data_size = length;
-}
-
-void fill_iso_packet(struct hpsb_packet *packet, int length, int channel,
+static void fill_iso_packet(struct hpsb_packet *packet, int length, int channel,
                      int tag, int sync)
 {
         packet->header[0] = (length << 16) | (tag << 14) | (channel << 8)
@@ -135,7 +87,7 @@
         packet->tcode = TCODE_ISO_DATA;
 }
 
-void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data) 
+static void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data) 
 { 
         packet->header[0] = data;
         packet->header[1] = ~data; 
@@ -148,9 +100,8 @@
 
 
 /**
- * get_tlabel - allocate a transaction label
- * @host: host to be used for transmission
- * @nodeid: the node ID of the transmission target
+ * hpsb_get_tlabel - allocate a transaction label
+ * @packet: the packet who's tlabel/tpool we set
  * @wait: whether to sleep if no tlabel is available
  *
  * Every asynchronous transaction on the 1394 bus needs a transaction label to
@@ -159,72 +110,66 @@
  * matching possible without ambiguity.
  *
  * There are 64 different tlabels, so an allocated tlabel has to be freed with
- * free_tlabel() after the transaction is complete (unless it's reused again for
+ * hpsb_free_tlabel() after the transaction is complete (unless it's reused again for
  * the same target node).
  *
- * @wait must not be set to true if you are calling from interrupt context.
+ * @wait cannot be set if in_interrupt()
  *
- * Return value: The allocated transaction label or -1 if there was no free
- * tlabel and @wait is false.
+ * Return value: Zero on success, otherwise non-zero. A non-zero return
+ * generally means there are no available tlabels.
  */
-int get_tlabel(struct hpsb_host *host, nodeid_t nodeid, int wait)
+int hpsb_get_tlabel(struct hpsb_packet *packet, int wait)
 {
-	int tlabel = 0;
 	unsigned long flags;
-	int found_tlabel = 0;
+	struct hpsb_tlabel_pool *tp;
+
+	tp = &packet->host->tpool[packet->node_id & NODE_MASK];
 
 	if (wait) {
-		down(&host->tlabel_count);
+		BUG_ON(in_interrupt());
+		down(&tp->count);
 	} else {
-		if (down_trylock(&host->tlabel_count)) return -1;
+		if (down_trylock(&tp->count))
+			return 1;
 	}
 
-	spin_lock_irqsave(&host->tlabel_lock, flags);
-
-	while (!found_tlabel) {
-		tlabel = host->tlabel_current;
-		if (tlabel < 32 && !(host->tlabel_pool[0] & 1 << tlabel)) {
-			host->tlabel_pool[0] |= 1 << tlabel;
-			found_tlabel = 1;
-		} else if (!(host->tlabel_pool[1] & 1 << (tlabel - 32))) {
-			host->tlabel_pool[1] |= 1 << (tlabel - 32);
-			found_tlabel = 1;
-		}
-		host->tlabel_current = (host->tlabel_current + 1) % 64;
-	}
+	spin_lock_irqsave(&tp->lock, flags);
 	
-	spin_unlock_irqrestore(&host->tlabel_lock, flags);
-
-	return tlabel;
+	packet->tlabel = find_next_zero_bit(&tp->pool, 64, tp->next);
+	tp->next = (packet->tlabel + 1) % 64;
+	/* Should _never_ happen */
+	BUG_ON(test_and_set_bit(packet->tlabel, &tp->pool));
+	tp->allocations++;
+	spin_unlock_irqrestore(&tp->lock, flags);
+
+	return 0;
 }
 
-/**
- * free_tlabel - free an allocated transaction label
- * @host: host to be used for transmission
- * @nodeid: the node ID of the transmission target
- * @tlabel: the transaction label to free
+/** 
+ * hpsb_free_tlabel - free an allocated transaction label
+ * @packet: packet whos tlabel/tpool needs to be cleared
  *
- * Frees the transaction label allocated with get_tlabel().  The tlabel has to
- * be freed after the transaction is complete (i.e. response was received for a
- * split transaction or packet was sent for a unified transaction).
+ * Frees the transaction label allocated with hpsb_get_tlabel().  The
+ * tlabel has to be freed after the transaction is complete (i.e. response
+ * was received for a split transaction or packet was sent for a unified
+ * transaction).
  *
  * A tlabel must not be freed twice.
  */
-void free_tlabel(struct hpsb_host *host, nodeid_t nodeid, int tlabel)
+void hpsb_free_tlabel(struct hpsb_packet *packet)
 {
         unsigned long flags;
+	struct hpsb_tlabel_pool *tp;
+	
+	tp = &packet->host->tpool[packet->node_id & NODE_MASK];
 
-        spin_lock_irqsave(&host->tlabel_lock, flags);
+	BUG_ON(packet->tlabel > 63 || packet->tlabel < 0);
 
-        if (tlabel < 32) {
-                host->tlabel_pool[0] &= ~(1 << tlabel);
-        } else {
-                host->tlabel_pool[1] &= ~(1 << (tlabel-32));
-        }
+        spin_lock_irqsave(&tp->lock, flags);
+	BUG_ON(!test_and_clear_bit(packet->tlabel, &tp->pool));
+        spin_unlock_irqrestore(&tp->lock, flags);
 
-        spin_unlock_irqrestore(&host->tlabel_lock, flags);
-
-        up(&host->tlabel_count);
+	up(&tp->count);
 }
 
 
@@ -297,124 +242,144 @@
         HPSB_PANIC("reached unreachable code 2 in %s", __FUNCTION__);
 }
 
-struct hpsb_packet *hpsb_make_readqpacket(struct hpsb_host *host, nodeid_t node,
-                                          u64 addr)
+struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
+					 u64 addr, size_t length)
 {
-        struct hpsb_packet *p;
-
-        p = alloc_hpsb_packet(0);
-        if (!p) return NULL;
+        struct hpsb_packet *packet;
 
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-        fill_async_readquad(p, addr);
+	if (length == 0)
+		return NULL;
 
-        return p;
-}
+	packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
+	if (!packet)
+		return NULL;
 
-struct hpsb_packet *hpsb_make_readbpacket(struct hpsb_host *host, nodeid_t node,
-                                          u64 addr, size_t length)
-{
-        struct hpsb_packet *p;
+	packet->host = host;
+	packet->node_id = node;
 
-        p = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
-        if (!p) return NULL;
+	if (hpsb_get_tlabel(packet, in_interrupt() ? 0 : 1)) {
+		free_hpsb_packet(packet);
+		return NULL;
+	}
 
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-        fill_async_readblock(p, addr, length);
+	if (length == 4)
+		fill_async_readquad(packet, addr);
+	else
+		fill_async_readblock(packet, addr, length);
 
-        return p;
+	return packet;
 }
 
-struct hpsb_packet *hpsb_make_writeqpacket(struct hpsb_host *host,
-                                           nodeid_t node, u64 addr,
-                                           quadlet_t data)
+struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node,
+					   u64 addr, quadlet_t *buffer, size_t length)
 {
-        struct hpsb_packet *p;
-
-        p = alloc_hpsb_packet(0);
-        if (!p) return NULL;
-
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-        fill_async_writequad(p, addr, data);
+	struct hpsb_packet *packet;
 
-        return p;
-}
+	if (length == 0)
+		return NULL;
 
-struct hpsb_packet *hpsb_make_writebpacket(struct hpsb_host *host,
-                                           nodeid_t node, u64 addr,
-                                           size_t length)
-{
-        struct hpsb_packet *p;
+	packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
+	if (!packet)
+		return NULL;
 
-        p = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
-        if (!p) return NULL;
+	if (length % 4) { /* zero padding bytes */
+		packet->data[length >> 2] = 0;
+	}
+	packet->host = host;
+	packet->node_id = node;
 
-        if (length % 4) {
-                p->data[length / 4] = 0;
-        }
+	if (hpsb_get_tlabel(packet, in_interrupt() ? 0 : 1)) {
+		free_hpsb_packet(packet);
+		return NULL;
+	}
 
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-        fill_async_writeblock(p, addr, length);
+	if (length == 4) {
+		fill_async_writequad(packet, addr, buffer ? *buffer : 0);
+	} else {
+		fill_async_writeblock(packet, addr, length);
+		if (buffer)
+			memcpy(packet->data, buffer, length);
+	}
 
-        return p;
+	return packet;
 }
 
 struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
-                                         u64 addr, int extcode)
+                                         u64 addr, int extcode, quadlet_t *data,
+					 quadlet_t arg)
 {
-        struct hpsb_packet *p;
+	struct hpsb_packet *p;
+	u32 length;
 
-        p = alloc_hpsb_packet(8);
-        if (!p) return NULL;
+	p = alloc_hpsb_packet(8);
+	if (!p) return NULL;
 
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-
-        switch (extcode) {
-        case EXTCODE_FETCH_ADD:
-        case EXTCODE_LITTLE_ADD:
-                fill_async_lock(p, addr, extcode, 4);
-                break;
-        default:
-                fill_async_lock(p, addr, extcode, 8);
-                break;
-        }
+	p->host = host;
+	p->node_id = node;
+	if (hpsb_get_tlabel(p, in_interrupt() ? 0 : 1)) {
+		free_hpsb_packet(p);
+		return NULL;
+	}
+
+	switch (extcode) {
+	case EXTCODE_FETCH_ADD:
+	case EXTCODE_LITTLE_ADD:
+		length = 4;
+		if (data)
+			p->data[0] = *data;
+		break;
+	default:
+		length = 8;
+		if (data) {
+			p->data[0] = arg;
+			p->data[1] = *data;
+		}
+		break;
+	}
+	fill_async_lock(p, addr, extcode, length);
 
-        return p;
+	return p;
 }
 
 struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node,
-                                           u64 addr, int extcode)
+                                           u64 addr, int extcode, octlet_t *data,
+					   octlet_t arg)
 {
-        struct hpsb_packet *p;
+	struct hpsb_packet *p;
+	u32 length;
 
-        p = alloc_hpsb_packet(16);
-        if (!p) return NULL;
+	p = alloc_hpsb_packet(16);
+	if (!p) return NULL;
 
-        p->host = host;
-        p->tlabel = get_tlabel(host, node, 1);
-        p->node_id = node;
-
-        switch (extcode) {
-        case EXTCODE_FETCH_ADD:
-        case EXTCODE_LITTLE_ADD:
-                fill_async_lock(p, addr, extcode, 8);
-                break;
-        default:
-                fill_async_lock(p, addr, extcode, 16);
-                break;
-        }
+	p->host = host;
+	p->node_id = node;
+	if (hpsb_get_tlabel(p, in_interrupt() ? 0 : 1)) {
+		free_hpsb_packet(p);
+		return NULL;
+	}
+
+	switch (extcode) {
+	case EXTCODE_FETCH_ADD:
+	case EXTCODE_LITTLE_ADD:
+		length = 8;
+		if (data) {
+			p->data[0] = *data >> 32;
+			p->data[1] = *data & 0xffffffff;
+		}
+		break;
+	default:
+		length = 16;
+		if (data) {
+			p->data[0] = arg >> 32;
+			p->data[1] = arg & 0xffffffff;
+			p->data[2] = *data >> 32;
+			p->data[3] = *data & 0xffffffff;
+		}
+		break;
+	}
+	fill_async_lock(p, addr, extcode, length);
 
-        return p;
+	return p;
 }
 
 struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host,
@@ -431,6 +396,23 @@
         return p; 
 }
 
+struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host,
+					int length, int channel,
+					int tag, int sync)
+{
+	struct hpsb_packet *p;
+
+	p = alloc_hpsb_packet(length);
+	if (!p) return NULL;
+
+	p->host = host;
+	fill_iso_packet(p, length, channel, tag, sync);
+
+	p->generation = get_hpsb_generation(host);
+
+	return p;
+}
+
 /*
  * FIXME - these functions should probably read from / write to user space to
  * avoid in kernel buffers for user space callers
@@ -442,15 +424,12 @@
         struct hpsb_packet *packet;
         int retval = 0;
         
-        if (length == 0) {
+        if (length == 0)
                 return -EINVAL;
-        }
 
-        if (length == 4) {
-                packet = hpsb_make_readqpacket(host, node, addr);
-        } else {
-                packet = hpsb_make_readbpacket(host, node, addr, length);
-        }
+	BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet
+
+	packet = hpsb_make_readpacket(host, node, addr, length);
 
         if (!packet) {
                 return -ENOMEM;
@@ -475,35 +454,12 @@
         }
 
 hpsb_read_fail:
-        free_tlabel(host, node, packet->tlabel);
+        hpsb_free_tlabel(packet);
         free_hpsb_packet(packet);
 
         return retval;
 }
 
-struct hpsb_packet *hpsb_make_packet (struct hpsb_host *host, nodeid_t node,
-				      u64 addr, quadlet_t *buffer, size_t length)
-{
-        struct hpsb_packet *packet;
-        
-        if (length == 0)
-                return NULL;
-
-        if (length == 4)
-                packet = hpsb_make_writeqpacket(host, node, addr, *buffer);
-        else
-                packet = hpsb_make_writebpacket(host, node, addr, length);
-
-        if (!packet)
-                return NULL;
-
-	/* Sometimes this may be called without data, just to allocate the
-	 * packet. */
-        if (length != 4 && buffer)
-                memcpy(packet->data, buffer, length);
-
-	return packet;
-}
 
 int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 	       u64 addr, quadlet_t *buffer, size_t length)
@@ -514,7 +470,9 @@
 	if (length == 0)
 		return -EINVAL;
 
-	packet = hpsb_make_packet (host, node, addr, buffer, length);
+	BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet
+
+	packet = hpsb_make_writepacket (host, node, addr, buffer, length);
 
 	if (!packet)
 		return -ENOMEM;
@@ -530,7 +488,7 @@
         retval = hpsb_packet_success(packet);
 
 hpsb_write_fail:
-        free_tlabel(host, node, packet->tlabel);
+        hpsb_free_tlabel(packet);
         free_hpsb_packet(packet);
 
         return retval;
@@ -542,35 +500,13 @@
 	      u64 addr, int extcode, quadlet_t *data, quadlet_t arg)
 {
         struct hpsb_packet *packet;
-        int retval = 0, length;
-        
-        packet = alloc_hpsb_packet(8);
-        if (!packet) {
-                return -ENOMEM;
-        }
+        int retval = 0;
 
-        packet->host = host;
-        packet->tlabel = get_tlabel(host, node, 1);
-        packet->node_id = node;
-
-        switch (extcode) {
-        case EXTCODE_MASK_SWAP:
-        case EXTCODE_COMPARE_SWAP:
-        case EXTCODE_BOUNDED_ADD:
-        case EXTCODE_WRAP_ADD:
-                length = 8;
-                packet->data[0] = arg;
-                packet->data[1] = *data;
-                break;
-        case EXTCODE_FETCH_ADD:
-        case EXTCODE_LITTLE_ADD:
-                length = 4;
-                packet->data[0] = *data;
-                break;
-        default:
-                return -EINVAL;
-        }
-        fill_async_lock(packet, addr, extcode, length);
+	BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet
+
+	packet = hpsb_make_lockpacket(host, node, addr, extcode, data, arg);        
+        if (!packet)
+                return -ENOMEM;
 
 	packet->generation = generation;
         if (!hpsb_send_packet(packet)) {
@@ -586,8 +522,39 @@
         }
 
 hpsb_lock_fail:
-        free_tlabel(host, node, packet->tlabel);
+        hpsb_free_tlabel(packet);
         free_hpsb_packet(packet);
+
+        return retval;
+}
+
+int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation,
+		u64 addr, int extcode, octlet_t *data, octlet_t arg)
+{
+	struct hpsb_packet *packet;
+	int retval = 0;
+
+	BUG_ON(in_interrupt()); // We can't be called in an interrupt, yet
+
+	packet = hpsb_make_lock64packet(host, node, addr, extcode, data, arg);
+	if (!packet)
+		return -ENOMEM;
+
+	packet->generation = generation;
+	if (!hpsb_send_packet(packet)) {
+		retval = -EINVAL;
+		goto hpsb_lock64_fail;
+	}
+	down(&packet->state_change);
+	down(&packet->state_change);
+	retval = hpsb_packet_success(packet);
+
+	if (retval == 0)
+		*data = (u64)packet->data[1] << 32 | packet->data[0];
+
+hpsb_lock64_fail:
+	hpsb_free_tlabel(packet);
+	free_hpsb_packet(packet);
 
         return retval;
 }
diff -Nru a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h
--- a/drivers/ieee1394/ieee1394_transactions.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/ieee1394_transactions.h	Sun Dec 15 18:08:29 2002
@@ -5,48 +5,26 @@
 
 
 /*
- * Utility functions to fill out packet headers.
- */
-void fill_async_readquad(struct hpsb_packet *packet, u64 addr);
-void fill_async_readquad_resp(struct hpsb_packet *packet, int rcode, 
-                              quadlet_t data);
-void fill_async_readblock(struct hpsb_packet *packet, u64 addr, int length);
-void fill_async_readblock_resp(struct hpsb_packet *packet, int rcode, 
-                               int length);
-void fill_async_writequad(struct hpsb_packet *packet, u64 addr, quadlet_t data);
-void fill_async_writeblock(struct hpsb_packet *packet, u64 addr, int length);
-void fill_async_write_resp(struct hpsb_packet *packet, int rcode);
-void fill_async_lock(struct hpsb_packet *packet, u64 addr, int extcode, 
-                     int length);
-void fill_async_lock_resp(struct hpsb_packet *packet, int rcode, int extcode, 
-                          int length);
-void fill_iso_packet(struct hpsb_packet *packet, int length, int channel,
-                     int tag, int sync);
-void fill_phy_packet(struct hpsb_packet *packet, quadlet_t data);
-
-/*
  * Get and free transaction labels.
  */
-int get_tlabel(struct hpsb_host *host, nodeid_t nodeid, int wait);
-void free_tlabel(struct hpsb_host *host, nodeid_t nodeid, int tlabel);
+int hpsb_get_tlabel(struct hpsb_packet *packet, int wait);
+void hpsb_free_tlabel(struct hpsb_packet *packet);
 
-struct hpsb_packet *hpsb_make_readqpacket(struct hpsb_host *host, nodeid_t node,
-                                          u64 addr);
-struct hpsb_packet *hpsb_make_readbpacket(struct hpsb_host *host, nodeid_t node,
-                                          u64 addr, size_t length);
-struct hpsb_packet *hpsb_make_writeqpacket(struct hpsb_host *host,
-                                           nodeid_t node, u64 addr,
-                                           quadlet_t data);
-struct hpsb_packet *hpsb_make_writebpacket(struct hpsb_host *host,
-                                           nodeid_t node, u64 addr,
-                                           size_t length);
+struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
+					 u64 addr, size_t length);
 struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
-                                         u64 addr, int extcode);
+                                         u64 addr, int extcode, quadlet_t *data,
+					 quadlet_t arg);
 struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node,
-                                          u64 addr, int extcode);
+                                          u64 addr, int extcode, octlet_t *data,
+					  octlet_t arg);
 struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host,
                                         quadlet_t data) ;
-
+struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host,
+					int length, int channel,
+					int tag, int sync);
+struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node,
+					   u64 addr, quadlet_t *buffer, size_t length);
 
 /*
  * hpsb_packet_success - Make sense of the ack and reply codes and
@@ -75,10 +53,7 @@
 	       u64 addr, quadlet_t *buffer, size_t length);
 int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 	      u64 addr, int extcode, quadlet_t *data, quadlet_t arg);
-
-/* Generic packet creation. Used by hpsb_write. Also useful for protocol
- * drivers that want to implement their own hpsb_write replacement.  */
-struct hpsb_packet *hpsb_make_packet (struct hpsb_host *host, nodeid_t node,
-				      u64 addr, quadlet_t *buffer, size_t length);
+int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation,
+		u64 addr, int extcode, octlet_t *data, octlet_t arg);
 
 #endif /* _IEEE1394_TRANSACTIONS_H */
diff -Nru a/drivers/ieee1394/ieee1394_types.h b/drivers/ieee1394/ieee1394_types.h
--- a/drivers/ieee1394/ieee1394_types.h	Sun Dec 15 18:08:30 2002
+++ b/drivers/ieee1394/ieee1394_types.h	Sun Dec 15 18:08:30 2002
@@ -8,6 +8,7 @@
 #include <linux/list.h>
 #include <linux/init.h>
 #include <linux/string.h>
+#include <asm/semaphore.h>
 #include <asm/byteorder.h>
 
 
@@ -61,6 +62,30 @@
 #define HPSB_INIT_WORK(x,y,z) INIT_WORK(x,y,z)
 #define HPSB_PREPARE_WORK(x,y,z) PREPARE_WORK(x,y,z)
 #endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,44)
+/* pci_pool_create changed. does not take the flags arg any longer */
+#define hpsb_pci_pool_create(a,b,c,d,e,f) pci_pool_create(a,b,c,d,e,f)
+#else
+#define hpsb_pci_pool_create(a,b,c,d,e,f) pci_pool_create(a,b,c,d,e)
+#endif
+
+/* Transaction Label handling */
+struct hpsb_tlabel_pool {
+	u64 pool;
+	spinlock_t lock;
+	u8 next;
+	u32 allocations;
+	struct semaphore count;
+};
+
+#define HPSB_TPOOL_INIT(_tp)            \
+do {                                    \
+	sema_init(&(_tp)->count, 63);   \
+	spin_lock_init(&(_tp)->lock);   \
+	(_tp)->next = 0;                \
+	(_tp)->pool = 0;                \
+} while(0)
 
 
 typedef u32 quadlet_t;
diff -Nru a/drivers/ieee1394/iso.c b/drivers/ieee1394/iso.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/iso.c	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,306 @@
+/*
+ * IEEE 1394 for Linux
+ *
+ * kernel ISO transmission/reception
+ *
+ * Copyright (C) 2002 Maas Digital LLC
+ *
+ * This code is licensed under the GPL.  See the file COPYING in the root
+ * directory of the kernel sources for details.
+ */
+
+#include <linux/slab.h>
+#include "iso.h"
+
+void hpsb_iso_stop(struct hpsb_iso *iso)
+{
+	if(!iso->flags & HPSB_ISO_DRIVER_STARTED)
+		return;
+
+	iso->host->driver->isoctl(iso, iso->type == HPSB_ISO_XMIT ? XMIT_STOP : RECV_STOP, 0);
+	iso->flags &= ~HPSB_ISO_DRIVER_STARTED;
+}
+
+void hpsb_iso_shutdown(struct hpsb_iso *iso)
+{
+	if(iso->flags & HPSB_ISO_DRIVER_INIT) {
+		hpsb_iso_stop(iso);
+		iso->host->driver->isoctl(iso, iso->type == HPSB_ISO_XMIT ? XMIT_SHUTDOWN : RECV_SHUTDOWN, 0);
+		iso->flags &= ~HPSB_ISO_DRIVER_INIT;
+	}
+	
+	dma_region_free(&iso->buf);
+	kfree(iso);
+}
+
+static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_iso_type type,
+					     unsigned int buf_packets,
+					     unsigned int max_packet_size,
+					     int channel,
+					     int irq_interval,
+					     void (*callback)(struct hpsb_iso*))
+{
+	struct hpsb_iso *iso;
+	unsigned int packet_plus_info;
+	int dma_direction;
+	int iso_header_bytes;
+	const int info_bytes = sizeof(struct hpsb_iso_packet_info);
+	
+	/* make sure driver supports the ISO API */
+	if(!host->driver->isoctl)
+		return NULL;
+
+	if(type == HPSB_ISO_RECV) {
+		/* when receiving, leave 8 extra bytes in front
+		   of the data payload for the iso header */
+		iso_header_bytes = 8;
+	} else {
+		iso_header_bytes = 0;
+	}
+	
+	/* sanitize parameters */
+	
+	if(buf_packets < 2)
+		buf_packets = 2;
+	
+	if(irq_interval < 1 || irq_interval > buf_packets / 2)
+		irq_interval = buf_packets / 2;
+	
+	if(max_packet_size + info_bytes + iso_header_bytes > PAGE_SIZE)
+		return NULL;
+	
+	/* size of packet payload plus the per-packet info must be a power of 2
+	   and at most equal to the page size */
+	
+	for(packet_plus_info = 256; packet_plus_info < PAGE_SIZE; packet_plus_info *= 2) {
+		if(packet_plus_info >= (max_packet_size + info_bytes + iso_header_bytes)) {
+			break;
+		}
+	}
+
+	/* allocate and write the struct hpsb_iso */
+	
+	iso = kmalloc(sizeof(*iso), SLAB_KERNEL);
+	if(!iso)
+		return NULL;
+	
+	iso->type = type;
+	iso->host = host;
+	iso->hostdata = NULL;
+	iso->callback = callback;
+	iso->channel = channel;
+	iso->irq_interval = irq_interval;
+	dma_region_init(&iso->buf);
+	iso->buf_packets = buf_packets;
+	iso->buf_stride = packet_plus_info;
+	iso->max_packet_size = max_packet_size;
+	iso->packet_data_offset = iso_header_bytes;
+	iso->packet_info_offset = iso_header_bytes + max_packet_size;
+	iso->first_packet = 0;
+
+	if(iso->type == HPSB_ISO_XMIT) {
+		atomic_set(&iso->n_dma_packets, 0);
+		dma_direction = PCI_DMA_TODEVICE;
+	} else {
+		atomic_set(&iso->n_dma_packets, iso->buf_packets);
+		dma_direction = PCI_DMA_FROMDEVICE;
+	}
+	
+	atomic_set(&iso->overflows, 0);
+	iso->flags = 0;
+	iso->prebuffer = 0;
+	
+	/* allocate the packet buffer */
+	if(dma_region_alloc(&iso->buf, iso->buf_packets * iso->buf_stride,
+			    host->pdev, dma_direction))
+		goto err;
+
+	return iso;
+
+err:
+	hpsb_iso_shutdown(iso);
+	return NULL;
+}
+
+int hpsb_iso_n_ready(struct hpsb_iso* iso)
+{
+	return iso->buf_packets - atomic_read(&iso->n_dma_packets);
+}
+	
+
+struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host,
+				    unsigned int buf_packets,
+				    unsigned int max_packet_size,
+				    int channel,
+				    int speed,
+				    int irq_interval,
+				    void (*callback)(struct hpsb_iso*))
+{
+	struct hpsb_iso *iso = hpsb_iso_common_init(host, HPSB_ISO_XMIT,
+						    buf_packets, max_packet_size,
+						    channel, irq_interval, callback);
+	if(!iso)
+		return NULL;
+
+	iso->speed = speed;
+	
+	/* tell the driver to start working */
+	if(host->driver->isoctl(iso, XMIT_INIT, 0))
+		goto err;
+
+	iso->flags |= HPSB_ISO_DRIVER_INIT;
+	return iso;
+
+err:
+	hpsb_iso_shutdown(iso);
+	return NULL;
+}
+
+struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
+				    unsigned int buf_packets,
+				    unsigned int max_packet_size,
+				    int channel,
+				    int irq_interval,
+				    void (*callback)(struct hpsb_iso*))
+{
+	struct hpsb_iso *iso = hpsb_iso_common_init(host, HPSB_ISO_RECV,
+						    buf_packets, max_packet_size,
+						    channel, irq_interval, callback);
+	if(!iso)
+		return NULL;
+
+	/* tell the driver to start working */
+	if(host->driver->isoctl(iso, RECV_INIT, 0))
+		goto err;
+
+	iso->flags |= HPSB_ISO_DRIVER_INIT;
+	return iso;
+
+err:
+	hpsb_iso_shutdown(iso);
+	return NULL;
+}
+
+static int do_iso_xmit_start(struct hpsb_iso *iso, int cycle)
+{
+	int retval = iso->host->driver->isoctl(iso, XMIT_START, cycle);
+	if(retval)
+		return retval;
+
+	iso->flags |= HPSB_ISO_DRIVER_STARTED;
+	return retval;
+}
+
+int hpsb_iso_xmit_start(struct hpsb_iso *iso, int cycle, int prebuffer)
+{
+	if(iso->type != HPSB_ISO_XMIT)
+		return -1;
+	
+	if(iso->flags & HPSB_ISO_DRIVER_STARTED)
+		return 0;
+
+	if(prebuffer < 1)
+		prebuffer = 1;
+
+	if(prebuffer > iso->buf_packets)
+		prebuffer = iso->buf_packets;
+
+	iso->prebuffer = prebuffer;
+
+	if(cycle != -1) {
+		/* pre-fill info->cycle */
+		int pkt = iso->first_packet;
+		int c, i;
+
+		cycle %= 8000;
+
+		c = cycle;
+		for(i = 0; i < iso->buf_packets; i++) {
+			struct hpsb_iso_packet_info *info = hpsb_iso_packet_info(iso, pkt);
+
+			info->cycle = c;
+			
+			c = (c+1) % 8000;
+			pkt = (pkt+1) % iso->buf_packets;
+		}
+	}
+	
+	/* remember the starting cycle; DMA will commence from xmit_queue_packets() */
+	iso->start_cycle = cycle;
+
+	return 0;
+}
+
+int hpsb_iso_recv_start(struct hpsb_iso *iso, int cycle)
+{
+	int retval = 0;
+
+	if(iso->type != HPSB_ISO_RECV)
+		return -1;
+	
+	if(iso->flags & HPSB_ISO_DRIVER_STARTED)
+		return 0;
+
+	retval = iso->host->driver->isoctl(iso, RECV_START, cycle);
+	if(retval)
+		return retval;
+
+	iso->flags |= HPSB_ISO_DRIVER_STARTED;
+	return retval;
+}
+
+int hpsb_iso_xmit_queue_packets(struct hpsb_iso *iso, unsigned int n_packets)
+{
+	int i, retval;
+	int pkt = iso->first_packet;
+
+	if(iso->type != HPSB_ISO_XMIT)
+		return -1;
+	
+	/* check packet sizes for sanity */
+	for(i = 0; i < n_packets; i++) {
+		struct hpsb_iso_packet_info *info = hpsb_iso_packet_info(iso, pkt);
+		if(info->len > iso->max_packet_size) {
+			printk(KERN_ERR "hpsb_iso_xmit_queue_packets: packet too long (%u, max is %u)\n",
+			       info->len, iso->max_packet_size);
+			return -EINVAL;
+		}
+							     
+		pkt = (pkt+1) % iso->buf_packets;
+	}
+
+	retval = iso->host->driver->isoctl(iso, XMIT_QUEUE, n_packets);
+	if(retval)
+		return retval;
+
+	if(iso->prebuffer != 0) {
+		iso->prebuffer -= n_packets;
+		if(iso->prebuffer <= 0) {
+			iso->prebuffer = 0;
+			return do_iso_xmit_start(iso,
+						 iso->start_cycle);
+		}
+	}
+
+	return 0;
+}
+
+int hpsb_iso_recv_release_packets(struct hpsb_iso *iso, unsigned int n_packets)
+{
+	if(iso->type != HPSB_ISO_RECV)
+		return -1;
+	
+	return iso->host->driver->isoctl(iso, RECV_RELEASE, n_packets);
+}
+
+unsigned char* hpsb_iso_packet_data(struct hpsb_iso *iso, unsigned int pkt)
+{
+	return (iso->buf.kvirt + pkt * iso->buf_stride)
+		+ iso->packet_data_offset;
+}
+
+struct hpsb_iso_packet_info* hpsb_iso_packet_info(struct hpsb_iso *iso, unsigned int pkt)
+{
+	return (struct hpsb_iso_packet_info*) ((iso->buf.kvirt + pkt * iso->buf_stride)
+					       + iso->packet_info_offset);
+}
diff -Nru a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/iso.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,148 @@
+/*
+ * IEEE 1394 for Linux
+ *
+ * kernel ISO transmission/reception
+ *
+ * Copyright (C) 2002 Maas Digital LLC
+ *
+ * This code is licensed under the GPL.  See the file COPYING in the root
+ * directory of the kernel sources for details.
+ */
+
+#ifndef IEEE1394_ISO_H
+#define IEEE1394_ISO_H
+
+#include "hosts.h"
+#include "dma.h"
+
+/* high-level ISO interface */
+
+/* per-packet data embedded in the ringbuffer */
+struct hpsb_iso_packet_info {
+	unsigned short len;
+	unsigned short cycle;
+	unsigned char channel; /* recv only */
+	unsigned char tag;
+	unsigned char sy;
+};
+
+/*
+ * each packet in the ringbuffer consists of three things:
+ * 1. the packet's data payload (no isochronous header)
+ * 2. a struct hpsb_iso_packet_info
+ * 3. some empty space before the next packet
+ *
+ * packets are separated by hpsb_iso.buf_stride bytes
+ * an even number of packets fit on one page
+ * no packet can be larger than one page
+ */
+
+enum hpsb_iso_type { HPSB_ISO_RECV = 0, HPSB_ISO_XMIT = 1 };
+
+struct hpsb_iso {
+	enum hpsb_iso_type type;
+
+	/* pointer to low-level driver and its private data */
+	struct hpsb_host *host;
+	void *hostdata;
+	
+	/* function to be called (from interrupt context) when the iso status changes */
+	void (*callback)(struct hpsb_iso*);
+
+	int speed; /* SPEED_100, 200, or 400 */
+	int channel;
+
+	/* greatest # of packets between interrupts - controls
+	   the maximum latency of the buffer */
+	int irq_interval;
+	
+	/* the packet ringbuffer */
+	struct dma_region buf;
+
+	/* # of packets in the ringbuffer */
+	unsigned int buf_packets;
+
+	/* offset between successive packets, in bytes -
+	   you can assume that this is a power of 2,
+	   and less than or equal to the page size */	
+	int buf_stride;
+	
+	/* largest possible packet size, in bytes */
+	unsigned int max_packet_size;
+
+	/* offset relative to (buf.kvirt + N*buf_stride) at which
+	   the data payload begins for packet N */
+	int packet_data_offset;
+	
+	/* offset relative to (buf.kvirt + N*buf_stride) at which the
+	   struct hpsb_iso_packet_info is stored for packet N */
+	int packet_info_offset;
+
+	/* the index of the next packet that will be produced
+	   or consumed by the user */
+	int first_packet;
+
+	/* number of packets owned by the low-level driver and
+	   queued for transmission or reception.
+	   this is related to the number of packets available
+	   to the user process: n_ready = buf_packets - n_dma_packets */	
+	atomic_t n_dma_packets;
+
+	/* how many times the buffer has overflowed or underflowed */
+	atomic_t overflows;
+
+	/* private flags to track initialization progress */
+#define HPSB_ISO_DRIVER_INIT     (1<<0)
+#define HPSB_ISO_DRIVER_STARTED  (1<<1)
+	unsigned int flags;
+
+	/* # of packets left to prebuffer (xmit only) */
+	int prebuffer;
+
+	/* starting cycle (xmit only) */
+	int start_cycle;
+};
+
+/* functions available to high-level drivers (e.g. raw1394) */
+
+/* allocate the buffer and DMA context */
+
+struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host,
+				    unsigned int buf_packets,
+				    unsigned int max_packet_size,
+				    int channel,
+				    int speed,
+				    int irq_interval,
+				    void (*callback)(struct hpsb_iso*));
+
+struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
+				    unsigned int buf_packets,
+				    unsigned int max_packet_size,
+				    int channel,
+				    int irq_interval,
+				    void (*callback)(struct hpsb_iso*));
+
+/* start/stop DMA */
+int hpsb_iso_xmit_start(struct hpsb_iso *iso, int start_on_cycle, int prebuffer);
+int hpsb_iso_recv_start(struct hpsb_iso *iso, int start_on_cycle);
+void hpsb_iso_stop(struct hpsb_iso *iso);
+
+/* deallocate buffer and DMA context */
+void hpsb_iso_shutdown(struct hpsb_iso *iso);
+
+/* N packets have been written to the buffer; queue them for transmission */
+int  hpsb_iso_xmit_queue_packets(struct hpsb_iso *xmit, unsigned int n_packets);
+
+/* N packets have been read out of the buffer, re-use the buffer space */
+int  hpsb_iso_recv_release_packets(struct hpsb_iso *recv, unsigned int n_packets);
+
+/* returns # of packets ready to send or receive */
+int hpsb_iso_n_ready(struct hpsb_iso *iso);
+
+/* returns a pointer to the payload of packet 'pkt' */
+unsigned char* hpsb_iso_packet_data(struct hpsb_iso *iso, unsigned int pkt);
+
+/* returns a pointer to the info struct of packet 'pkt' */
+struct hpsb_iso_packet_info* hpsb_iso_packet_info(struct hpsb_iso *iso, unsigned int pkt);
+
+#endif /* IEEE1394_ISO_H */
diff -Nru a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
--- a/drivers/ieee1394/nodemgr.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/nodemgr.c	Sun Dec 15 18:08:29 2002
@@ -9,9 +9,9 @@
  */
 
 #include <linux/kernel.h>
+#include <linux/config.h>
 #include <linux/list.h>
 #include <linux/slab.h>
-#include <asm/byteorder.h>
 #include <linux/smp_lock.h>
 #include <linux/interrupt.h>
 #include <linux/kmod.h>
@@ -20,6 +20,8 @@
 #ifdef CONFIG_PROC_FS
 #include <linux/proc_fs.h>
 #endif
+#include <asm/atomic.h>
+#include <asm/byteorder.h>
 
 #include "ieee1394_types.h"
 #include "ieee1394.h"
@@ -30,6 +32,24 @@
 #include "csr.h"
 #include "nodemgr.h"
 
+#ifdef CONFIG_IEEE1394_OUI_DB
+struct oui_list_struct {
+	int oui;
+	char *name;
+};
+
+extern struct oui_list_struct oui_list[];
+
+static char *nodemgr_find_oui_name(int oui) {
+	int i;
+
+	for (i = 0; oui_list[i].name; i++)
+		if (oui_list[i].oui == oui)
+			return oui_list[i].name;
+
+	return NULL;
+}
+#endif
 
 /* 
  * Basically what we do here is start off retrieving the bus_info block.
@@ -86,6 +106,7 @@
 	struct node_entry *ne;
 	int len;
 	char *out = page;
+	unsigned long flags;
 
 	if (down_interruptible(&nodemgr_serialize))
 		return -EINTR;
@@ -102,10 +123,17 @@
 		     NODE_BUS_ARGS(ne->nodeid), (unsigned long long)ne->guid);
 
 		/* Generic Node information */
-		PUTF("  Vendor ID: `%s' [0x%06x]\n",
-		     ne->vendor_name ?: "Unknown", ne->vendor_id);
+		PUTF("  Vendor ID   : `%s' [0x%06x]\n", ne->oui_name, ne->vendor_id);
+		if (ne->vendor_name)
+			PUTF("  Vendor text : `%s'\n", ne->vendor_name);
 		PUTF("  Capabilities: 0x%06x\n", ne->capabilities);
-		PUTF("  Bus Options:\n");
+		PUTF("  Tlabel stats:\n");
+		spin_lock_irqsave(&ne->tpool->lock, flags);
+		PUTF("    Free  : %d\n", atomic_read(&ne->tpool->count.count) + 1);
+		PUTF("    Total : %u\n", ne->tpool->allocations);
+		PUTF("    Mask  : %016Lx\n", (unsigned long long)ne->tpool->pool);
+		spin_unlock_irqrestore(&ne->tpool->lock, flags);
+		PUTF("  Bus Options :\n");
 		PUTF("    IRMC(%d) CMC(%d) ISC(%d) BMC(%d) PMC(%d) GEN(%d)\n"
 		     "    LSPD(%d) MAX_REC(%d) CYC_CLK_ACC(%d)\n",
 		     ne->busopt.irmc, ne->busopt.cmc, ne->busopt.isc, ne->busopt.bmc,
@@ -136,15 +164,21 @@
 			int printed = 0; // small hack
 
 			PUTF("  Unit Directory %d:\n", ud_count++);
+
+			if (ud->flags & UNIT_DIRECTORY_VENDOR_ID ||
+			    ud->flags & UNIT_DIRECTORY_MODEL_ID) {
+				PUTF("    Vendor/Model ID  : ");
+			}
 			if (ud->flags & UNIT_DIRECTORY_VENDOR_ID) {
-				PUTF("    Vendor/Model ID: %s [%06x]",
-				     ud->vendor_name ?: "Unknown", ud->vendor_id);
+				PUTF("%s [%06x]", ud->vendor_name ?: "Unknown",
+				     ud->vendor_id);
 				printed = 1;
 			}
 			if (ud->flags & UNIT_DIRECTORY_MODEL_ID) {
-				if (!printed)
-					PUTF("    Vendor/Model ID: %s [%06x]",
-					     ne->vendor_name ?: "Unknown", ne->vendor_id);
+				if (!printed) {
+					PUTF("%s [%06x]", ne->vendor_name ?: "Unknown",
+					     ne->vendor_id);
+				}
 				PUTF(" / %s [%06x]", ud->model_name ?: "Unknown", ud->model_id);
 				printed = 1;
 			}
@@ -152,11 +186,11 @@
 				PUTF("\n");
 
 			if (ud->flags & UNIT_DIRECTORY_SPECIFIER_ID)
-				PUTF("    Software Specifier ID: %06x\n", ud->specifier_id);
+				PUTF("    Software Spec ID : %06x\n", ud->specifier_id);
 			if (ud->flags & UNIT_DIRECTORY_VERSION)
-				PUTF("    Software Version: %06x\n", ud->version);
+				PUTF("    Software Version : %06x\n", ud->version);
 			if (ud->driver)
-				PUTF("    Driver: %s\n", ud->driver->name);
+				PUTF("    Driver           : %s\n", ud->driver->name);
 			PUTF("    Length (in quads): %d\n", ud->count);
 		}
 
@@ -297,6 +331,7 @@
 		code = CONFIG_ROM_KEY(quad);
 
 		if (code == CONFIG_ROM_VENDOR_ID && length > 0) {
+
 			/* Check if there is a text descriptor leaf
 			   immediately after this.  */
 			size = nodemgr_size_text_leaf(host, nodeid, generation,
@@ -305,22 +340,23 @@
 				address += 4;
 				length--;
 				total_size += (size + 1) * sizeof (quadlet_t);
-			}
-			else if (size < 0)
+			} else if (size < 0)
 				return NULL;
 		}
 	}
-	ne = kmalloc(total_size, SLAB_ATOMIC);
-	if (ne != NULL) {
-		if (size != 0) {
-			ne->vendor_name
-				= (const char *) &(ne->quadlets[2]);
-			ne->quadlets[size] = 0;
-		}
-		else {
-			ne->vendor_name = NULL;
-		}
+	ne = kmalloc(total_size, GFP_KERNEL);
+
+	if (!ne)
+		return NULL;
+
+	if (size != 0) {
+		ne->vendor_name
+			= (const char *) &(ne->quadlets[2]);
+		ne->quadlets[size] = 0;
+	} else {
+		ne->vendor_name = NULL;
 	}
+
 	return ne; 
 }
 
@@ -335,6 +371,9 @@
 
         INIT_LIST_HEAD(&ne->list);
 	INIT_LIST_HEAD(&ne->unit_directories);
+
+	ne->tpool = &host->tpool[nodeid & NODE_MASK];
+
         ne->host = host;
         ne->nodeid = nodeid;
         ne->guid = guid;
@@ -344,9 +383,10 @@
 
 	nodemgr_process_config_rom (ne, busoptions);
 
-	HPSB_DEBUG("%s added: Node[" NODE_BUS_FMT "]  GUID[%016Lx]  [%s]",
-		   (host->node_id == nodeid) ? "Host" : "Device",
+	HPSB_DEBUG("%s added: ID:BUS[" NODE_BUS_FMT "]  GUID[%016Lx]  [%s] (%s)",
+		   (host->node_id == nodeid) ? "Host" : "Node",
 		   NODE_BUS_ARGS(nodeid), (unsigned long long)guid,
+		   ne->oui_name,
 		   ne->vendor_name ?: "Unknown");
 
         return ne;
@@ -648,6 +688,11 @@
 		switch (code) {
 		case CONFIG_ROM_VENDOR_ID:
 			ne->vendor_id = value;
+#ifdef CONFIG_IEEE1394_OUI_DB
+			ne->oui_name = nodemgr_find_oui_name(value);
+#else
+			ne->oui_name = "Unknown";
+#endif
 			/* Now check if there is a vendor name text
 			   string.  */
 			if (ne->vendor_name != NULL) {
@@ -1211,6 +1256,18 @@
 	return ne;
 }
 
+struct node_entry *hpsb_check_nodeid(nodeid_t nodeid)
+{
+	struct node_entry *ne;
+
+	if (down_trylock(&nodemgr_serialize))
+		return NULL;
+	ne = find_entry_by_nodeid(nodeid);
+	up(&nodemgr_serialize);
+
+	return ne;
+}
+
 /* The following four convenience functions use a struct node_entry
  * for addressing a node on the bus.  They are intended for use by any
  * process context, not just the nodemgr thread, so we need to be a
@@ -1266,8 +1323,10 @@
 
 static void nodemgr_add_host(struct hpsb_host *host)
 {
-	struct host_info *hi = kmalloc (sizeof (struct host_info), GFP_KERNEL);
+	struct host_info *hi;
 	unsigned long flags;
+
+	hi = kmalloc(sizeof (struct host_info), in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
 
 	if (!hi) {
 		HPSB_ERR ("NodeMgr: out of memory in add host");
diff -Nru a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h
--- a/drivers/ieee1394/nodemgr.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/nodemgr.h	Sun Dec 15 18:08:29 2002
@@ -132,7 +132,11 @@
 	u32 capabilities;	
 	struct list_head unit_directories;
 
+	struct hpsb_tlabel_pool *tpool;
+
 	const char *vendor_name;
+	char *oui_name;
+
 	quadlet_t quadlets[0];
 };
 
@@ -151,6 +155,10 @@
 /* Same as above, but use the nodeid to get an node entry. This is not
  * fool-proof by itself, since the nodeid can change.  */
 struct node_entry *hpsb_nodeid_get_entry(nodeid_t nodeid);
+
+/* Same as above except that it will not block waiting for the nodemgr
+ * serialize semaphore.  */
+struct node_entry *hpsb_check_nodeid(nodeid_t nodeid);
 
 /*
  * If the entry refers to a local host, this function will return the pointer
diff -Nru a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
--- a/drivers/ieee1394/ohci1394.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/ieee1394/ohci1394.c	Sun Dec 15 18:08:31 2002
@@ -38,6 +38,7 @@
  *
  * Known bugs:
  * . devctl BUS_RESET arg confusion (reset type or root holdoff?)
+ *   added LONG_RESET_ROOT and SHORT_RESET_ROOT for root holdoff --kk
  */
 
 /* 
@@ -75,6 +76,10 @@
  *  . Updated to 2.4.x module scheme (PCI aswell)
  *  . Removed procfs support since it trashes random mem
  *  . Config ROM generation
+ *
+ * Manfred Weihs <weihs@ict.tuwien.ac.at>
+ *  . Reworked code for initiating bus resets
+ *    (long, short, with or without hold-off)
  */
 
 #include <linux/config.h>
@@ -112,6 +117,8 @@
 #include "ieee1394.h"
 #include "ieee1394_types.h"
 #include "hosts.h"
+#include "dma.h"
+#include "iso.h"
 #include "ieee1394_core.h"
 #include "highlevel.h"
 #include "ohci1394.h"
@@ -153,13 +160,9 @@
 printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 
 static char version[] __devinitdata =
-	"$Rev: 601 $ Ben Collins <bcollins@debian.org>";
+	"$Rev: 675 $ Ben Collins <bcollins@debian.org>";
 
 /* Module Parameters */
-MODULE_PARM(attempt_root,"i");
-MODULE_PARM_DESC(attempt_root, "Attempt to make the host root (default = 0).");
-static int attempt_root = 0;
-
 MODULE_PARM(phys_dma,"i");
 MODULE_PARM_DESC(phys_dma, "Enable physical dma (default = 1).");
 static int phys_dma = 1;
@@ -170,12 +173,6 @@
 static void ohci1394_pci_remove(struct pci_dev *pdev);
 
 #ifndef __LITTLE_ENDIAN
-/* Swap a series of quads inplace. */
-static __inline__ void block_swab32(quadlet_t *data, size_t size) {
-	while (size--)
-		data[size] = swab32(data[size]);
-}
-
 static unsigned hdr_sizes[] = 
 {
 	3,	/* TCODE_WRITEQ */
@@ -193,16 +190,19 @@
 };
 
 /* Swap headers */
-static inline void packet_swab(quadlet_t *data, int tcode, int len)
+static inline void packet_swab(quadlet_t *data, int tcode)
 {
+	size_t size = hdr_sizes[tcode];
+
 	if (tcode > TCODE_LOCK_RESPONSE || hdr_sizes[tcode] == 0)
 		return;
-	block_swab32(data, hdr_sizes[tcode]);
+
+	while (size--)
+		data[size] = swab32(data[size]);
 }
 #else
 /* Don't waste cycles on same sex byte swaps */
-#define packet_swab(w,x,y)
-#define block_swab32(x,y)
+#define packet_swab(w,x)
 #endif /* !LITTLE_ENDIAN */
 
 /***********************************
@@ -339,8 +339,6 @@
 
 	DBGMSG(ohci->id, "SelfID complete");
 
-	hpsb_selfid_complete(host, phyid, isroot);
-
 	return;
 }
 
@@ -398,7 +396,7 @@
 		c = DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | DMA_CTL_BRANCH;
 		if (generate_irq)
 			c |= DMA_CTL_IRQ;
-				
+
 		d->prg_cpu[i]->control = cpu_to_le32(c | d->buf_size);
 
 		/* End of descriptor list? */
@@ -573,7 +571,8 @@
 	reg_write(ohci, OHCI1394_HCControlClear, 0x40000000);
 
 	/* Enable interrupts */
-	reg_write(ohci, OHCI1394_IntMaskSet, 
+	reg_write(ohci, OHCI1394_IntMaskSet,
+		  OHCI1394_unrecoverableError |
 		  OHCI1394_masterIntEnable | 
 		  OHCI1394_busReset | 
 		  OHCI1394_selfIDComplete |
@@ -646,8 +645,7 @@
                                 (packet->header[0] & 0xFFFF0000);
                         d->prg_cpu[idx]->data[2] = packet->header[2];
                         d->prg_cpu[idx]->data[3] = packet->header[3];
-			packet_swab(d->prg_cpu[idx]->data, packet->tcode,
-					packet->header_size>>2);
+			packet_swab(d->prg_cpu[idx]->data, packet->tcode);
                 }
 
                 if (packet->data_size) { /* block transmit */
@@ -712,7 +710,7 @@
                 d->prg_cpu[idx]->data[0] = packet->speed_code<<16 |
                         (packet->header[0] & 0xFFFF);
                 d->prg_cpu[idx]->data[1] = packet->header[0] & 0xFFFF0000;
-		packet_swab(d->prg_cpu[idx]->data, packet->tcode, packet->header_size>>2);
+		packet_swab(d->prg_cpu[idx]->data, packet->tcode);
   
                 d->prg_cpu[idx]->begin.control = 
 			cpu_to_le32(DMA_CTL_OUTPUT_MORE | 
@@ -844,12 +842,57 @@
 	struct ti_ohci *ohci = host->hostdata;
 	int retval = 0;
 	unsigned long flags;
+	int phy_reg;
 
 	switch (cmd) {
 	case RESET_BUS:
-		DBGMSG(ohci->id, "devctl: Bus reset requested%s",
-		       attempt_root ? " and attempting to become root" : "");
-		set_phy_reg_mask (ohci, 1, 0x40 | (attempt_root ? 0x80 : 0));
+		switch (arg) {
+		case SHORT_RESET:
+			phy_reg = get_phy_reg(ohci, 5);
+			phy_reg |= 0x40;
+			set_phy_reg(ohci, 5, phy_reg); /* set ISBR */
+			break;
+		case LONG_RESET:
+			phy_reg = get_phy_reg(ohci, 1);
+			phy_reg |= 0x40;
+			set_phy_reg(ohci, 1, phy_reg); /* set IBR */
+			break;
+		case SHORT_RESET_NO_FORCE_ROOT:
+			phy_reg = get_phy_reg(ohci, 1);
+			if (phy_reg & 0x80) {
+				phy_reg &= ~0x80;
+				set_phy_reg(ohci, 1, phy_reg); /* clear RHB */
+			}
+
+			phy_reg = get_phy_reg(ohci, 5);
+			phy_reg |= 0x40;
+			set_phy_reg(ohci, 5, phy_reg); /* set ISBR */
+			break;
+		case LONG_RESET_NO_FORCE_ROOT:
+			phy_reg = get_phy_reg(ohci, 1);
+			phy_reg &= ~0x80;
+			phy_reg |= 0x40;
+			set_phy_reg(ohci, 1, phy_reg); /* clear RHB, set IBR */
+			break;
+		case SHORT_RESET_FORCE_ROOT:
+			phy_reg = get_phy_reg(ohci, 1);
+			if (!(phy_reg & 0x80)) {
+				phy_reg |= 0x80;
+				set_phy_reg(ohci, 1, phy_reg); /* set RHB */
+			}
+
+			phy_reg = get_phy_reg(ohci, 5);
+			phy_reg |= 0x40;
+			set_phy_reg(ohci, 5, phy_reg); /* set ISBR */
+			break;
+		case LONG_RESET_FORCE_ROOT:
+			phy_reg = get_phy_reg(ohci, 1);
+			phy_reg |= 0xc0;
+			set_phy_reg(ohci, 1, phy_reg); /* set RHB and IBR */
+			break;
+		default:
+			retval = -1;
+		}
 		break;
 
 	case GET_CYCLE_COUNTER:
@@ -977,6 +1020,705 @@
 	return retval;
 }
 
+/***********************************
+ * rawiso ISO reception            *
+ ***********************************/
+
+struct ohci_iso_recv {
+	struct ti_ohci *ohci;
+
+	/* memory and PCI mapping for the DMA descriptors */
+	struct dma_prog_region prog;
+	
+	struct ohci1394_iso_tasklet task;
+	int task_active;
+
+	/* index of next packet to arrive */
+	int pkt_dma;
+	
+	u32 ContextControlSet;
+	u32 ContextControlClear;
+	u32 CommandPtr;
+	u32 ContextMatch;
+};
+
+static void ohci_iso_recv_task(unsigned long data);
+static void ohci_iso_recv_stop(struct hpsb_iso *iso);
+static void ohci_iso_recv_shutdown(struct hpsb_iso *iso);
+static void ohci_iso_recv_program(struct hpsb_iso *iso);
+static int  ohci_iso_recv_start(struct hpsb_iso *iso, int cycle);
+
+
+static int ohci_iso_recv_init(struct hpsb_iso *iso)
+{
+	struct ohci_iso_recv *recv;
+	unsigned int prog_size;
+	int ctx;
+	int ret = -ENOMEM;
+	
+	recv = kmalloc(sizeof(*recv), SLAB_KERNEL);
+	if(!recv)
+		return -ENOMEM;
+
+	iso->hostdata = recv;
+	recv->ohci = iso->host->hostdata;
+	recv->task_active = 0;
+	recv->pkt_dma = iso->first_packet;
+	
+	dma_prog_region_init(&recv->prog);
+
+	/* size of DMA program = one INPUT_LAST per packet in the buffer */
+	prog_size = sizeof(struct dma_cmd) * iso->buf_packets;
+	
+	if(dma_prog_region_alloc(&recv->prog, prog_size, recv->ohci->dev))
+		goto err;
+
+	ohci1394_init_iso_tasklet(&recv->task, OHCI_ISO_RECEIVE,
+				  ohci_iso_recv_task, (unsigned long) iso);
+	
+	if(ohci1394_register_iso_tasklet(recv->ohci, &recv->task) < 0)
+		goto err;
+	
+	recv->task_active = 1;
+
+	/* recv context registers are spaced 32 bytes apart */
+	ctx = recv->task.context;
+	recv->ContextControlSet = OHCI1394_IsoRcvContextControlSet + 32 * ctx;
+	recv->ContextControlClear = OHCI1394_IsoRcvContextControlClear + 32 * ctx;
+	recv->CommandPtr = OHCI1394_IsoRcvCommandPtr + 32 * ctx;
+	recv->ContextMatch = OHCI1394_IsoRcvContextMatch + 32 * ctx;
+
+	/* enable interrupts */
+	reg_write(recv->ohci, OHCI1394_IsoRecvIntMaskSet, 1 << ctx);
+
+	/* write the DMA program */
+	ohci_iso_recv_program(iso);
+	
+	return 0;
+
+err:
+	ohci_iso_recv_shutdown(iso);
+	return ret;
+}
+
+static void ohci_iso_recv_stop(struct hpsb_iso *iso)
+{
+	struct ohci_iso_recv *recv = iso->hostdata;
+	
+	/* halt DMA */
+	ohci1394_stop_context(recv->ohci, recv->ContextControlClear, NULL);
+}
+
+static void ohci_iso_recv_shutdown(struct hpsb_iso *iso)
+{
+	struct ohci_iso_recv *recv = iso->hostdata;
+
+	if(recv->task_active) {
+		/* halt DMA */
+		ohci1394_stop_context(recv->ohci, recv->ContextControlClear, NULL);
+		
+		/* disable interrupts */
+		reg_write(recv->ohci, OHCI1394_IsoRecvIntMaskClear, 1 << recv->task.context);
+		
+		ohci1394_unregister_iso_tasklet(recv->ohci, &recv->task);
+		recv->task_active = 0;
+	}
+	
+	dma_prog_region_free(&recv->prog);
+	kfree(recv);
+	iso->hostdata = NULL;
+}
+
+static void ohci_iso_recv_program(struct hpsb_iso *iso)
+{
+	struct ohci_iso_recv *recv = iso->hostdata;
+	
+	/* address of 'branch' field in previous DMA descriptor */
+	u32 *prev_branch = NULL;
+
+	/* start at pkt_dma and go around the whole buffer */
+	int pkt = recv->pkt_dma;
+	int i;
+	
+	for(i = 0; i < iso->buf_packets; i++) {
+		int want_interrupt;
+		unsigned int data_size;
+		
+		/* pointer to the DMA descriptor */
+		struct dma_cmd *il = ((struct dma_cmd*) recv->prog.kvirt) + pkt;
+
+		/* offset of the DMA descriptor relative to the DMA prog buffer */
+		unsigned long prog_offset = pkt * sizeof(struct dma_cmd);
+
+		/* offset of this bus_cycle within the DMA buffer */
+		unsigned long buf_offset = hpsb_iso_packet_data(iso, pkt) - iso->buf.kvirt;
+
+		/* back up 8 bytes for the iso header */
+		buf_offset -= 8;
+		data_size = iso->max_packet_size + 8;
+
+		/* ask for an interrupt every now and then, and
+		   always interrupt on the final descriptor */
+		
+		if( ((i % iso->irq_interval) == 0) ||
+		    (i == (iso->buf_packets - 1)) ) {
+			want_interrupt = 1;
+		} else {
+			want_interrupt = 0;
+		}
+		
+		/* write the DMA descriptor */
+		
+		il->control = 3 << 28; /* INPUT_LAST */
+		il->control |= 8 << 24; /* s = 1, update xferStatus and resCount */
+		if(want_interrupt)
+			il->control |= 3 << 20;
+		il->control |= 0xC << 16; /* enable branch to address */
+		il->control |= data_size;
+
+		il->address = dma_region_offset_to_bus(&iso->buf, buf_offset);
+		il->branchAddress = 0; /* filled in on next loop */
+		il->status = data_size;
+
+		/* link the previous descriptor to this one */
+		if(prev_branch) {
+			*prev_branch = dma_prog_region_offset_to_bus(&recv->prog, prog_offset);
+			*prev_branch |= 1; /* set Z=1 */
+		}
+
+		prev_branch = &il->branchAddress;
+
+		pkt = (pkt + 1) % iso->buf_packets;
+	}
+
+	/* the final descriptor's branch address and Z should be left at 0 */
+}
+
+static int ohci_iso_recv_start(struct hpsb_iso *iso, int cycle)
+{
+	struct ohci_iso_recv *recv = iso->hostdata;
+	u32 command, contextMatch;
+	
+	reg_write(recv->ohci, recv->ContextControlClear, 0xFFFFFFFF);
+	wmb();
+
+	/* use packet-per-buffer mode, and keep ISO headers */
+	reg_write(recv->ohci, recv->ContextControlSet, (1 << 30));
+
+	/* match on all tags, listen on channel */
+	contextMatch = 0xF0000000 | iso->channel;
+	
+	if(cycle != -1) {
+		u32 seconds;
+		
+		/* enable cycleMatch */
+		reg_write(recv->ohci, recv->ContextControlSet, (1 << 29));
+
+		/* set starting cycle */
+		cycle &= 0x1FFF;
+		
+		/* 'cycle' is only mod 8000, but we also need two 'seconds' bits -
+		   just snarf them from the current time */
+		seconds = reg_read(recv->ohci, OHCI1394_IsochronousCycleTimer) >> 25;
+
+		/* advance one second to give some extra time for DMA to start */
+		seconds += 1;
+		
+		cycle |= (seconds & 3) << 13;
+
+		contextMatch |= cycle << 12;
+	}
+
+	reg_write(recv->ohci, recv->ContextMatch, contextMatch);
+	
+	/* address of first descriptor block */
+	command = dma_prog_region_offset_to_bus(&recv->prog, recv->pkt_dma * sizeof(struct dma_cmd));
+	command |= 1; /* Z=1 */
+	
+	reg_write(recv->ohci, recv->CommandPtr, command);
+	wmb();
+	
+	/* run */
+	reg_write(recv->ohci, recv->ContextControlSet, 0x8000);
+
+	/* issue a dummy read of the cycle timer register to force
+	   all PCI writes to be posted immediately */
+	mb();
+	reg_read(recv->ohci, OHCI1394_IsochronousCycleTimer);
+
+	/* check RUN */
+	if(!(reg_read(recv->ohci, recv->ContextControlSet) & 0x8000)) {
+		PRINT(KERN_ERR, recv->ohci->id, "Error starting IR DMA (ContextControl 0x%08x)\n",
+		      reg_read(recv->ohci, recv->ContextControlSet));
+		return -1;
+	}
+
+	return 0;
+}
+
+static void ohci_iso_recv_release_one(struct hpsb_iso *iso)
+{
+	struct ohci_iso_recv *recv = iso->hostdata;
+
+	/* re-use the DMA descriptor for first_packet */
+	/* by linking the previous descriptor to it */
+
+	int next_i = iso->first_packet;
+	int prev_i = (next_i == 0) ? (iso->buf_packets - 1) : (next_i - 1);
+	
+	struct dma_cmd *next = dma_region_i(&recv->prog, struct dma_cmd, next_i);
+	struct dma_cmd *prev = dma_region_i(&recv->prog, struct dma_cmd, prev_i);
+
+	/* 'next' becomes the new end of the DMA chain */
+	next->control |= 3 << 20; /* enable interrupt */
+	next->branchAddress = 0; /* disable branch */
+
+	/* link prev to next */	
+	if(prev_i % iso->irq_interval) {
+		prev->control &= ~(3 << 20); /* no interrupt */
+	} else {
+		prev->control |= 3 << 20; /* enable interrupt */
+	}
+	prev->branchAddress = dma_prog_region_offset_to_bus(&recv->prog,
+							    sizeof(struct dma_cmd) * next_i) | 1;
+	wmb();
+	
+	/* wake up DMA in case it fell asleep */
+	reg_write(recv->ohci, recv->ContextControlSet, (1 << 12));
+
+	/* advance packet cursors */
+	iso->first_packet = (iso->first_packet+1) % iso->buf_packets;
+	atomic_inc(&iso->n_dma_packets);
+}
+
+static void ohci_iso_recv_release(struct hpsb_iso *iso, int n_packets)
+{
+	int i;
+	for(i = 0; i < n_packets; i++)
+		ohci_iso_recv_release_one(iso);
+}
+
+static void ohci_iso_recv_task(unsigned long data)
+{
+	struct hpsb_iso *iso = (struct hpsb_iso*) data;
+	struct ohci_iso_recv *recv = iso->hostdata;
+
+	int count;
+	int wake = 0;
+	
+	/* loop over the entire buffer */
+	for(count = 0; count < iso->buf_packets; count++) {
+		u32 packet_len = 0;
+		
+		/* pointer to the DMA descriptor */
+		struct dma_cmd *il = ((struct dma_cmd*) recv->prog.kvirt) + recv->pkt_dma;
+
+		/* check the DMA descriptor for new writes to xferStatus */
+		u16 xferstatus = il->status >> 16;
+		u16 rescount = il->status & 0xFFFF;
+
+		unsigned char event = xferstatus & 0x1F;
+
+		if(!event) {
+			/* this packet hasn't come in yet; we are done for now */
+			goto out;
+		}
+		
+		if(event == 0x11) {
+			/* packet received successfully! */
+			
+			/* rescount is the number of bytes *remaining* in the packet buffer,
+			   after the packet was written */
+			packet_len = iso->max_packet_size - rescount;
+
+		} else if(event == 0x02) {
+			PRINT(KERN_ERR, recv->ohci->id, "IR DMA error - packet too long for buffer\n");
+		} else if(event) {
+			PRINT(KERN_ERR, recv->ohci->id, "IR DMA error - OHCI error code 0x%02x\n", event);
+		}
+
+		/* sync our view of the buffer */
+		dma_region_sync(&iso->buf, recv->pkt_dma * iso->buf_stride, iso->buf_stride);
+			
+		/* record the per-packet info */
+		{
+			/* iso header is 8 bytes ahead of the data payload */
+			unsigned char *hdr = hpsb_iso_packet_data(iso, recv->pkt_dma) - 8;
+			
+			struct hpsb_iso_packet_info *info = hpsb_iso_packet_info(iso, recv->pkt_dma);
+			
+			info->len = packet_len;
+			info->cycle = (hdr[0] | (hdr[1] << 8)) & 0x1FFF;
+			info->channel = hdr[5] & 0x3F;
+			info->tag = hdr[5] >> 6;
+			info->sy = hdr[4] & 0xF;
+		}
+		
+		/* at least one packet came in, so wake up the reader */
+		wake = 1;
+
+		/* reset the DMA descriptor */
+		il->status = iso->max_packet_size;
+
+		/* advance DMA packet cursor */
+		recv->pkt_dma = (recv->pkt_dma + 1) % iso->buf_packets;
+
+		/* one more packet for the user, one less for us */
+		if(atomic_dec_and_test(&iso->n_dma_packets)) {
+			/* if n_dma_packets reaches zero, we have an overflow */
+			atomic_inc(&iso->overflows);
+		}
+	}
+
+out:
+	if(wake && iso->callback) {
+		iso->callback(iso);
+	}
+}
+
+
+/***********************************
+ * rawiso ISO transmission         *
+ ***********************************/
+
+struct ohci_iso_xmit {
+	struct ti_ohci *ohci;
+	struct dma_prog_region prog;
+	struct ohci1394_iso_tasklet task;
+	int task_active;
+	int pkt_dma;
+
+	u32 ContextControlSet;
+	u32 ContextControlClear;
+	u32 CommandPtr;
+};
+
+/* transmission DMA program:
+   one OUTPUT_MORE_IMMEDIATE for the IT header
+   one OUTPUT_LAST for the buffer data */
+
+struct iso_xmit_cmd {
+	struct dma_cmd output_more_immediate;
+	u8 iso_hdr[8];
+	u32 unused[2];
+	struct dma_cmd output_last;
+};
+
+static int ohci_iso_xmit_init(struct hpsb_iso *iso);
+static int ohci_iso_xmit_start(struct hpsb_iso *iso, int cycle);
+static void ohci_iso_xmit_shutdown(struct hpsb_iso *iso);
+static void ohci_iso_xmit_task(unsigned long data);
+
+static int ohci_iso_xmit_init(struct hpsb_iso *iso)
+{
+	struct ohci_iso_xmit *xmit;
+	unsigned int prog_size;
+	int ctx;
+	int ret = -ENOMEM;
+	
+	xmit = kmalloc(sizeof(*xmit), SLAB_KERNEL);
+	if(!xmit)
+		return -ENOMEM;
+
+	iso->hostdata = xmit;
+	xmit->ohci = iso->host->hostdata;
+	xmit->task_active = 0;
+	xmit->pkt_dma = iso->first_packet;
+	
+	dma_prog_region_init(&xmit->prog);
+	
+	prog_size = sizeof(struct iso_xmit_cmd) * iso->buf_packets;
+	
+	if(dma_prog_region_alloc(&xmit->prog, prog_size, xmit->ohci->dev))
+		goto err;
+
+	ohci1394_init_iso_tasklet(&xmit->task, OHCI_ISO_TRANSMIT,
+				  ohci_iso_xmit_task, (unsigned long) iso);
+	
+	if(ohci1394_register_iso_tasklet(xmit->ohci, &xmit->task) < 0)
+		goto err;
+	
+	xmit->task_active = 1;
+
+	/* xmit context registers are spaced 16 bytes apart */
+	ctx = xmit->task.context;
+	xmit->ContextControlSet = OHCI1394_IsoXmitContextControlSet + 16 * ctx;
+	xmit->ContextControlClear = OHCI1394_IsoXmitContextControlClear + 16 * ctx;
+	xmit->CommandPtr = OHCI1394_IsoXmitCommandPtr + 16 * ctx;
+
+	reg_write(xmit->ohci, xmit->ContextControlClear, 0xFFFFFFFF);
+	
+	/* enable interrupts */
+	reg_write(xmit->ohci, OHCI1394_IsoXmitIntMaskSet, 1 << ctx);
+
+	return 0;
+
+err:
+	ohci_iso_xmit_shutdown(iso);
+	return ret;
+}
+
+static void ohci_iso_xmit_stop(struct hpsb_iso *iso)
+{
+	struct ohci_iso_xmit *xmit = iso->hostdata;
+	ohci1394_stop_context(xmit->ohci, xmit->ContextControlClear, NULL);
+}
+
+static void ohci_iso_xmit_shutdown(struct hpsb_iso *iso)
+{
+	struct ohci_iso_xmit *xmit = iso->hostdata;
+
+	if(xmit->task_active) {
+		/* halt DMA */
+		ohci1394_stop_context(xmit->ohci, xmit->ContextControlClear, NULL);
+		
+		/* disable interrupts */
+		reg_write(xmit->ohci, OHCI1394_IsoXmitIntMaskClear, 1 << xmit->task.context);
+		
+		ohci1394_unregister_iso_tasklet(xmit->ohci, &xmit->task);
+		xmit->task_active = 0;
+	}
+	
+	dma_prog_region_free(&xmit->prog);
+	kfree(xmit);
+	iso->hostdata = NULL;
+}
+
+static void ohci_iso_xmit_task(unsigned long data)
+{
+	struct hpsb_iso *iso = (struct hpsb_iso*) data;
+	struct ohci_iso_xmit *xmit = iso->hostdata;
+	int wake = 0;
+	int count;
+
+	/* check the whole buffer if necessary, starting at pkt_dma */
+	for(count = 0; count < iso->buf_packets; count++) {
+		
+		/* DMA descriptor */
+		struct iso_xmit_cmd *cmd = dma_region_i(&xmit->prog, struct iso_xmit_cmd, xmit->pkt_dma);
+		
+		/* check for new writes to xferStatus */
+		u16 xferstatus = cmd->output_last.status >> 16;
+		u8  event = xferstatus & 0x1F;
+
+		if(!event) {
+			/* packet hasn't been sent yet; we are done for now */
+			goto out;
+		}
+
+		if(event != 0x11) {
+			PRINT(KERN_ERR, xmit->ohci->id, "IT DMA error - OHCI error code 0x%02x\n", event);
+		}
+		
+		/* at least one packet went out, so wake up the writer */
+		wake = 1;
+		
+		/* predict the timestamp pkt_dma will have next time around the buffer */
+		{
+			struct hpsb_iso_packet_info* info = hpsb_iso_packet_info(iso, xmit->pkt_dma);
+			unsigned int cycle = cmd->output_last.status & 0x1FFF;
+
+			cycle += iso->buf_packets;
+			while(cycle > 8000)
+				cycle -= 8000;
+			
+			info->cycle = cycle;
+		}
+		
+		/* reset the DMA descriptor for next time */
+		cmd->output_last.status = 0;
+		
+		/* advance packet cursor */
+		xmit->pkt_dma = (xmit->pkt_dma + 1) % iso->buf_packets;
+
+		/* one less packet for us */
+		if(atomic_dec_and_test(&iso->n_dma_packets)) {
+			/* underflow */
+			atomic_inc(&iso->overflows);
+		}
+	}
+
+out:
+	if(wake && iso->callback) {
+		iso->callback(iso);
+	}
+}
+
+static void ohci_iso_xmit_queue_one(struct hpsb_iso *iso)
+{
+	struct ohci_iso_xmit *xmit = iso->hostdata;
+	struct hpsb_iso_packet_info *info;
+	int next_i, prev_i;
+	struct iso_xmit_cmd *next, *prev;
+	
+	/* sync up the card's view of the buffer */
+	dma_region_sync(&iso->buf, iso->first_packet * iso->buf_stride, iso->buf_stride);
+
+	/* append first_packet to the DMA chain */
+	/* by linking the previous descriptor to it */
+	/* (next will become the new end of the DMA chain) */
+	
+	next_i = iso->first_packet;
+	prev_i = (next_i == 0) ? (iso->buf_packets - 1) : (next_i - 1);
+	
+	next = dma_region_i(&xmit->prog, struct iso_xmit_cmd, next_i);
+	prev = dma_region_i(&xmit->prog, struct iso_xmit_cmd, prev_i);
+
+	/* retrieve the packet info stashed in the buffer */
+	info = hpsb_iso_packet_info(iso, iso->first_packet);
+	
+	/* set up the OUTPUT_MORE_IMMEDIATE descriptor */
+	memset(next, 0, sizeof(struct iso_xmit_cmd));
+	next->output_more_immediate.control = 0x02000008;
+
+	/* ISO packet header is embedded in the OUTPUT_MORE_IMMEDIATE */
+
+	/* tcode = 0xA, and sy */
+	next->iso_hdr[0] = 0xA0 | (info->sy & 0xF);
+
+	/* tag and channel number */
+	next->iso_hdr[1] = (info->tag << 6) | (iso->channel & 0x3F);
+
+	/* transmission speed */
+	next->iso_hdr[2] = iso->speed & 0x7;
+
+	/* payload size */
+	next->iso_hdr[6] = info->len & 0xFF;
+	next->iso_hdr[7] = info->len >> 8;
+
+	/* set up the OUTPUT_LAST */
+	next->output_last.control = 1 << 28;
+	next->output_last.control |= 1 << 27; /* update timeStamp */
+	next->output_last.control |= 3 << 20; /* want interrupt */
+	next->output_last.control |= 3 << 18; /* enable branch */
+	next->output_last.control |= info->len;
+
+	/* payload bus address */
+	next->output_last.address = dma_region_offset_to_bus(&iso->buf,
+				      hpsb_iso_packet_data(iso, iso->first_packet) - iso->buf.kvirt);
+	
+	/* leave branchAddress at zero for now */
+
+	/* re-write the previous DMA descriptor to chain to this one */
+
+	/* set prev branch address to point to next (Z=3) */
+	prev->output_last.branchAddress =
+		dma_prog_region_offset_to_bus(&xmit->prog, sizeof(struct iso_xmit_cmd) * next_i) | 3;
+	
+	/* disable interrupt, unless required by the IRQ interval */
+	if(prev_i % iso->irq_interval) {
+		prev->output_last.control &= ~(3 << 20); /* no interrupt */
+	} else {
+		prev->output_last.control |= 3 << 20; /* enable interrupt */
+	}
+
+	wmb();
+
+	/* wake DMA in case it is sleeping */
+	reg_write(xmit->ohci, xmit->ContextControlSet, 1 << 12);
+
+	/* issue a dummy read of the cycle timer to force all PCI
+	   writes to be posted immediately */
+	mb();
+	reg_read(xmit->ohci, OHCI1394_IsochronousCycleTimer);
+
+	/* increment cursors */
+	iso->first_packet = (iso->first_packet+1) % iso->buf_packets;
+	atomic_inc(&iso->n_dma_packets);
+}
+
+static void ohci_iso_xmit_queue(struct hpsb_iso *iso, int n_packets)
+{
+	int i;
+	for(i = 0; i < n_packets; i++)
+		ohci_iso_xmit_queue_one(iso);
+}
+
+static int ohci_iso_xmit_start(struct hpsb_iso *iso, int cycle)
+{
+	struct ohci_iso_xmit *xmit = iso->hostdata;
+
+	/* clear out the control register */
+	reg_write(xmit->ohci, xmit->ContextControlClear, 0xFFFFFFFF);
+	wmb();
+
+	/* address and length of first descriptor block (Z=3) */
+	reg_write(xmit->ohci, xmit->CommandPtr,
+		  dma_prog_region_offset_to_bus(&xmit->prog, xmit->pkt_dma * sizeof(struct iso_xmit_cmd)) | 3);
+
+	/* cycle match */
+	if(cycle != -1) {
+		u32 start = cycle & 0x1FFF;
+		
+		/* 'cycle' is only mod 8000, but we also need two 'seconds' bits -
+		   just snarf them from the current time */
+		u32 seconds = reg_read(xmit->ohci, OHCI1394_IsochronousCycleTimer) >> 25;
+
+		/* advance one second to give some extra time for DMA to start */
+		seconds += 1;
+		
+		start |= (seconds & 3) << 13;
+
+		reg_write(xmit->ohci, xmit->ContextControlSet, 0x80000000 | (start << 16));
+	}
+
+	/* run */
+	reg_write(xmit->ohci, xmit->ContextControlSet, 0x8000);
+	mb();
+	
+	/* wait 100 usec to give the card time to go active */
+	udelay(100);
+	
+	/* check the RUN bit */
+	if(!(reg_read(xmit->ohci, xmit->ContextControlSet) & 0x8000)) {
+		PRINT(KERN_ERR, xmit->ohci->id, "Error starting IT DMA (ContextControl 0x%08x)\n",
+		      reg_read(xmit->ohci, xmit->ContextControlSet));
+		return -1;
+	}
+	
+	return 0;
+}
+
+static int ohci_isoctl(struct hpsb_iso *iso, enum isoctl_cmd cmd, int arg)
+{
+	
+	switch(cmd) {
+	case XMIT_INIT:
+		return ohci_iso_xmit_init(iso);
+	case XMIT_START:
+		return ohci_iso_xmit_start(iso, arg);
+	case XMIT_STOP:
+		ohci_iso_xmit_stop(iso);
+		return 0;
+	case XMIT_QUEUE:
+		ohci_iso_xmit_queue(iso, arg);
+		return 0;
+	case XMIT_SHUTDOWN:
+		ohci_iso_xmit_shutdown(iso);
+		return 0;
+
+	case RECV_INIT:
+		return ohci_iso_recv_init(iso);
+	case RECV_START:
+		return ohci_iso_recv_start(iso, arg);
+	case RECV_STOP:
+		ohci_iso_recv_stop(iso);
+		return 0;
+	case RECV_RELEASE:
+		ohci_iso_recv_release(iso, arg);
+		return 0;
+	case RECV_SHUTDOWN:
+		ohci_iso_recv_shutdown(iso);
+		return 0;
+		
+	default:
+		PRINT_G(KERN_ERR, "ohci_isoctl cmd %d not implemented yet",
+			cmd);
+		break;
+	}
+	return -EINVAL;
+}
+
 /***************************************
  * IEEE-1394 functionality section END *
  ***************************************/
@@ -1056,7 +1798,7 @@
 	unsigned long flags;
 
 	/* Read and clear the interrupt event register.  Don't clear
-	 * the busReset event, though, this is done when we get the
+	 * the busReset event, though. This is done when we get the
 	 * selfIDComplete interrupt. */
 	spin_lock_irqsave(&ohci->event_lock, flags);
 	event = reg_read(ohci, OHCI1394_IntEventClear);
@@ -1067,10 +1809,52 @@
 
 	DBGMSG(ohci->id, "IntEvent: %08x", event);
 
-	/* Die right here an now */
 	if (event & OHCI1394_unrecoverableError) {
-		PRINT(KERN_ERR, ohci->id, "Unrecoverable error, shutting down card!");
-		return;
+		int ctx;
+		PRINT(KERN_ERR, ohci->id, "Unrecoverable error!");
+
+		if (reg_read(ohci, OHCI1394_AsReqTrContextControlSet) & 0x800)
+			PRINT(KERN_ERR, ohci->id, "Async Req Tx Context died: "
+				"ctrl[%08x] cmdptr[%08x]",
+				reg_read(ohci, OHCI1394_AsReqTrContextControlSet),
+				reg_read(ohci, OHCI1394_AsReqTrCommandPtr));
+
+		if (reg_read(ohci, OHCI1394_AsRspTrContextControlSet) & 0x800)
+			PRINT(KERN_ERR, ohci->id, "Async Rsp Tx Context died: "
+				"ctrl[%08x] cmdptr[%08x]",
+				reg_read(ohci, OHCI1394_AsRspTrContextControlSet),
+				reg_read(ohci, OHCI1394_AsRspTrCommandPtr));
+
+		if (reg_read(ohci, OHCI1394_AsReqRcvContextControlSet) & 0x800)
+			PRINT(KERN_ERR, ohci->id, "Async Req Rcv Context died: "
+				"ctrl[%08x] cmdptr[%08x]",
+				reg_read(ohci, OHCI1394_AsReqRcvContextControlSet),
+				reg_read(ohci, OHCI1394_AsReqRcvCommandPtr));
+
+		if (reg_read(ohci, OHCI1394_AsRspRcvContextControlSet) & 0x800)
+			PRINT(KERN_ERR, ohci->id, "Async Rsp Rcv Context died: "
+				"ctrl[%08x] cmdptr[%08x]",
+				reg_read(ohci, OHCI1394_AsRspRcvContextControlSet),
+				reg_read(ohci, OHCI1394_AsRspRcvCommandPtr));
+
+		for (ctx = 0; ctx < ohci->nb_iso_xmit_ctx; ctx++) {
+			if (reg_read(ohci, OHCI1394_IsoXmitContextControlSet + (16 * ctx)) & 0x800)
+				PRINT(KERN_ERR, ohci->id, "Async Iso Xmit %d Context died: "
+					"ctrl[%08x] cmdptr[%08x]", ctx,
+					reg_read(ohci, OHCI1394_IsoXmitContextControlSet + (16 * ctx)),
+					reg_read(ohci, OHCI1394_IsoXmitCommandPtr + (16 * ctx)));
+		}
+
+		for (ctx = 0; ctx < ohci->nb_iso_rcv_ctx; ctx++) {
+			if (reg_read(ohci, OHCI1394_IsoRcvContextControlSet + (32 * ctx)) & 0x800)
+				PRINT(KERN_ERR, ohci->id, "Async Iso Recv %d Context died: "
+					"ctrl[%08x] cmdptr[%08x] match[%08x]", ctx,
+					reg_read(ohci, OHCI1394_IsoRcvContextControlSet + (32 * ctx)),
+					reg_read(ohci, OHCI1394_IsoRcvCommandPtr + (32 * ctx)),
+					reg_read(ohci, OHCI1394_IsoRcvContextMatch + (32 * ctx)));
+		}
+
+		event &= ~OHCI1394_unrecoverableError;
 	}
 
 	if (event & OHCI1394_cycleInconsistent) {
@@ -1099,9 +1883,7 @@
   		}
 		spin_unlock_irqrestore(&ohci->event_lock, flags);
 		if (!host->in_bus_reset) {
-			DBGMSG(ohci->id, "irq_handler: Bus reset requested%s",
-			      (attempt_root) ? " and attempting to become root"
-			       : "");
+			DBGMSG(ohci->id, "irq_handler: Bus reset requested");
 
 			/* Subsystem call */
 			hpsb_bus_reset(ohci->host);
@@ -1173,74 +1955,61 @@
 	}
 	if (event & OHCI1394_selfIDComplete) {
 		if (host->in_bus_reset) {
-			node_id = reg_read(ohci, OHCI1394_NodeID); 
+			node_id = reg_read(ohci, OHCI1394_NodeID);
 
-			/* If our nodeid is not valid, give a msec delay
-			 * to let it settle in and try again.  */
 			if (!(node_id & 0x80000000)) {
-				mdelay(1);
-				node_id = reg_read(ohci, OHCI1394_NodeID);
+				PRINT(KERN_ERR, ohci->id,
+				      "SelfID received, but NodeID invalid "
+				      "(probably new bus reset occured): %08X",
+				      node_id);
+				goto selfid_not_valid;
 			}
 
-			if (node_id & 0x80000000) { /* NodeID valid */
-				phyid =  node_id & 0x0000003f;
-				isroot = (node_id & 0x40000000) != 0;
-
-				DBGMSG(ohci->id,
-				      "SelfID interrupt received "
-				      "(phyid %d, %s)", phyid, 
-				      (isroot ? "root" : "not root"));
+			phyid =  node_id & 0x0000003f;
+			isroot = (node_id & 0x40000000) != 0;
 
-				handle_selfid(ohci, host, 
-					      phyid, isroot);
+			DBGMSG(ohci->id,
+			      "SelfID interrupt received "
+			      "(phyid %d, %s)", phyid, 
+			      (isroot ? "root" : "not root"));
+
+			handle_selfid(ohci, host, phyid, isroot);
+
+			/* Clear the bus reset event and re-enable the
+			 * busReset interrupt.  */
+			spin_lock_irqsave(&ohci->event_lock, flags);
+			reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
+			reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
+			spin_unlock_irqrestore(&ohci->event_lock, flags);
+
+			/* Accept Physical requests from all nodes. */
+			reg_write(ohci,OHCI1394_AsReqFilterHiSet, 0xffffffff);
+			reg_write(ohci,OHCI1394_AsReqFilterLoSet, 0xffffffff);
+
+			/* Turn on phys dma reception.
+			 *
+			 * TODO: Enable some sort of filtering management.
+			 */
+			if (phys_dma) {
+				reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0xffffffff);
+				reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0xffffffff);
+				reg_write(ohci,OHCI1394_PhyUpperBound, 0xffff0000);
 			} else {
-				PRINT(KERN_ERR, ohci->id, 
-				      "SelfID interrupt received, but "
-				      "NodeID is not valid: %08X",
-				      node_id);
+				reg_write(ohci,OHCI1394_PhyReqFilterHiSet, 0x00000000);
+				reg_write(ohci,OHCI1394_PhyReqFilterLoSet, 0x00000000);
 			}
 
-			/* Accept Physical requests from all nodes. */
-			reg_write(ohci,OHCI1394_AsReqFilterHiSet, 
-				  0xffffffff);
-			reg_write(ohci,OHCI1394_AsReqFilterLoSet, 
-				  0xffffffff);
+			DBGMSG(ohci->id, "PhyReqFilter=%08x%08x\n",
+			       reg_read(ohci,OHCI1394_PhyReqFilterHiSet),
+			       reg_read(ohci,OHCI1394_PhyReqFilterLoSet));
+
+			hpsb_selfid_complete(host, phyid, isroot);
 		} else
 			PRINT(KERN_ERR, ohci->id, 
 			      "SelfID received outside of bus reset sequence");
 
-		/* Finally, we clear the busReset event and reenable
-		 * the busReset interrupt. */
-		spin_lock_irqsave(&ohci->event_lock, flags);
-		reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
-		reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset); 
-		spin_unlock_irqrestore(&ohci->event_lock, flags);
-		event &= ~OHCI1394_selfIDComplete;	
-
-		/* Turn on phys dma reception. We should
-		 * probably manage the filtering somehow, 
-		 * instead of blindly turning it on.  */
-
-		/*
-		 * CAUTION!
-		 * Some chips (TI TSB43AB22) won't take a value in
-		 * the PhyReqFilter register until after the IntEvent
-		 * is cleared for bus reset, and even then a short
-		 * delay is required.
-		 */
-		if (phys_dma) {
-			mdelay(1);
-			reg_write(ohci,OHCI1394_PhyReqFilterHiSet,
-				  0xffffffff);
-			reg_write(ohci,OHCI1394_PhyReqFilterLoSet,
-				  0xffffffff);
-			reg_write(ohci,OHCI1394_PhyUpperBound,
-				  0xffff0000);
-		}
-
-		DBGMSG(ohci->id, "PhyReqFilter=%08x%08x\n",
-		       reg_read(ohci,OHCI1394_PhyReqFilterHiSet),
-		       reg_read(ohci,OHCI1394_PhyReqFilterLoSet));
+		event &= ~OHCI1394_selfIDComplete;
+selfid_not_valid:
 	}
 
 	/* Make sure we handle everything, just in case we accidentally
@@ -1412,7 +2181,7 @@
 		 * bus reset. We always ignore it.  */
 		if (tcode != OHCI1394_TCODE_PHY) {
 			if (!ohci->no_swap_incoming)
-				packet_swab(d->spb, tcode, (length - 4) >> 2);
+				packet_swab(d->spb, tcode);
 			DBGMSG(ohci->id, "Packet received from node"
 				" %d ack=0x%02X spd=%d tcode=0x%X"
 				" length=%d ctx=%d tlabel=%d",
@@ -1560,11 +2329,11 @@
 	if (d->prg_cpu) {
 		for (i=0; i<d->num_desc; i++) 
 			if (d->prg_cpu[i] && d->prg_bus[i]) {
-				pci_free_consistent(
-					d->ohci->dev, sizeof(struct dma_cmd), 
-					d->prg_cpu[i], d->prg_bus[i]);
+				pci_pool_free(d->prg_pool, d->prg_cpu[i], d->prg_bus[i]);
 				OHCI_DMA_FREE("consistent dma_rcv prg[%d]", i);
 			}
+		pci_pool_destroy(d->prg_pool);
+		OHCI_DMA_FREE("dma_rcv prg pool");
 		kfree(d->prg_cpu);
 		kfree(d->prg_bus);
 	}
@@ -1624,6 +2393,10 @@
 		return -ENOMEM;
 	}
 
+	d->prg_pool = hpsb_pci_pool_create("ohci1394 rcv prg", ohci->dev,
+				sizeof(struct dma_cmd), 4, 0, SLAB_KERNEL);
+	OHCI_DMA_ALLOC("dma_rcv prg pool");
+
 	for (i=0; i<d->num_desc; i++) {
 		d->buf_cpu[i] = pci_alloc_consistent(ohci->dev, 
 						     d->buf_size,
@@ -1639,11 +2412,8 @@
 			return -ENOMEM;
 		}
 
-		
-                d->prg_cpu[i] = pci_alloc_consistent(ohci->dev, 
-						     sizeof(struct dma_cmd),
-						     d->prg_bus+i);
-		OHCI_DMA_ALLOC("consistent dma_rcv prg[%d]", i);
+		d->prg_cpu[i] = pci_pool_alloc(d->prg_pool, SLAB_KERNEL, d->prg_bus+i);
+		OHCI_DMA_ALLOC("pool dma_rcv prg[%d]", i);
 
                 if (d->prg_cpu[i] != NULL) {
                         memset(d->prg_cpu[i], 0, sizeof(struct dma_cmd));
@@ -1692,11 +2462,11 @@
 	if (d->prg_cpu) {
 		for (i=0; i<d->num_desc; i++) 
 			if (d->prg_cpu[i] && d->prg_bus[i]) {
-				pci_free_consistent(
-					d->ohci->dev, sizeof(struct at_dma_prg), 
-					d->prg_cpu[i], d->prg_bus[i]);
-				OHCI_DMA_FREE("consistent dma_trm prg[%d]", i);
+				pci_pool_free(d->prg_pool, d->prg_cpu[i], d->prg_bus[i]);
+				OHCI_DMA_FREE("pool dma_trm prg[%d]", i);
 			}
+		pci_pool_destroy(d->prg_pool);
+		OHCI_DMA_FREE("dma_trm prg pool");
 		kfree(d->prg_cpu);
 		kfree(d->prg_bus);
 	}
@@ -1732,11 +2502,13 @@
 	memset(d->prg_cpu, 0, d->num_desc * sizeof(struct at_dma_prg*));
 	memset(d->prg_bus, 0, d->num_desc * sizeof(dma_addr_t));
 
+	d->prg_pool = hpsb_pci_pool_create("ohci1394 trm prg", ohci->dev,
+				sizeof(struct at_dma_prg), 4, 0, SLAB_KERNEL);
+	OHCI_DMA_ALLOC("dma_rcv prg pool");
+
 	for (i = 0; i < d->num_desc; i++) {
-                d->prg_cpu[i] = pci_alloc_consistent(ohci->dev, 
-						     sizeof(struct at_dma_prg),
-						     d->prg_bus+i);
-		OHCI_DMA_ALLOC("consistent dma_trm prg[%d]", i);
+		d->prg_cpu[i] = pci_pool_alloc(d->prg_pool, SLAB_KERNEL, d->prg_bus+i);
+		OHCI_DMA_ALLOC("pool dma_trm prg[%d]", i);
 
                 if (d->prg_cpu[i] != NULL) {
                         memset(d->prg_cpu[i], 0, sizeof(struct at_dma_prg));
@@ -1941,6 +2713,7 @@
 	.get_rom =		ohci_get_rom,
 	.transmit_packet =	ohci_transmit,
 	.devctl =		ohci_devctl,
+	.isoctl =               ohci_isoctl,
 	.hw_csr_reg =		ohci_hw_csr_reg,
 };
 
diff -Nru a/drivers/ieee1394/ohci1394.h b/drivers/ieee1394/ohci1394.h
--- a/drivers/ieee1394/ohci1394.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/ohci1394.h	Sun Dec 15 18:08:28 2002
@@ -95,6 +95,7 @@
 	/* dma block descriptors */
         struct dma_cmd **prg_cpu;
         dma_addr_t *prg_bus;
+	struct pci_pool *prg_pool;
 
 	/* dma buffers */
         quadlet_t **buf_cpu;
@@ -120,6 +121,7 @@
 	/* dma block descriptors */
         struct at_dma_prg **prg_cpu;
 	dma_addr_t *prg_bus;
+	struct pci_pool *prg_pool;
 
         unsigned int prg_ind;
         unsigned int sent_ind;
@@ -292,6 +294,9 @@
 #define OHCI1394_IsoRecvIntEventClear         0x0A4
 #define OHCI1394_IsoRecvIntMaskSet            0x0A8
 #define OHCI1394_IsoRecvIntMaskClear          0x0AC
+#define OHCI1394_InitialBandwidthAvailable    0x0B0
+#define OHCI1394_InitialChannelsAvailableHi   0x0B4
+#define OHCI1394_InitialChannelsAvailableLo   0x0B8
 #define OHCI1394_FairnessControl              0x0DC
 #define OHCI1394_LinkControlSet               0x0E0
 #define OHCI1394_LinkControlClear             0x0E4
diff -Nru a/drivers/ieee1394/oui.db b/drivers/ieee1394/oui.db
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/oui.db	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,4931 @@
+000000 XEROX CORPORATION
+000001 XEROX CORPORATION
+000002 XEROX CORPORATION
+000003 XEROX CORPORATION
+000004 XEROX CORPORATION
+000005 XEROX CORPORATION
+000006 XEROX CORPORATION
+000007 XEROX CORPORATION
+000008 XEROX CORPORATION
+000009 XEROX CORPORATION
+00000A OMRON TATEISI ELECTRONICS CO.
+00000B MATRIX CORPORATION
+00000C CISCO SYSTEMS, INC.
+00000D FIBRONICS LTD.
+00000E FUJITSU LIMITED
+00000F NEXT, INC.
+000010 SYTEK INC.
+000011 NORMEREL SYSTEMES
+000012 INFORMATION TECHNOLOGY LIMITED
+000013 CAMEX
+000014 NETRONIX
+000015 DATAPOINT CORPORATION
+000016 DU PONT PIXEL SYSTEMS     .
+000017 TEKELEC
+000018 WEBSTER COMPUTER CORPORATION
+000019 APPLIED DYNAMICS INTERNATIONAL
+00001A ADVANCED MICRO DEVICES
+00001B NOVELL INC.
+00001C BELL TECHNOLOGIES
+00001D CABLETRON SYSTEMS, INC.
+00001E TELSIST INDUSTRIA ELECTRONICA
+00001F Telco Systems, Inc.
+000020 DATAINDUSTRIER DIAB AB
+000021 SUREMAN COMP. & COMMUN. CORP.
+000022 VISUAL TECHNOLOGY INC.
+000023 ABB INDUSTRIAL SYSTEMS AB
+000024 CONNECT AS
+000025 RAMTEK CORP.
+000026 SHA-KEN CO., LTD.
+000027 JAPAN RADIO COMPANY
+000028 PRODIGY SYSTEMS CORPORATION
+000029 IMC NETWORKS CORP.
+00002A TRW - SEDD/INP
+00002B CRISP AUTOMATION, INC
+00002C AUTOTOTE LIMITED
+00002D CHROMATICS INC
+00002E SOCIETE EVIRA
+00002F TIMEPLEX INC.
+000030 VG LABORATORY SYSTEMS LTD
+000031 QPSX COMMUNICATIONS PTY LTD
+000032 Marconi plc
+000033 EGAN MACHINERY COMPANY
+000034 NETWORK RESOURCES CORPORATION
+000035 SPECTRAGRAPHICS CORPORATION
+000036 ATARI CORPORATION
+000037 OXFORD METRICS LIMITED
+000038 CSS LABS
+000039 TOSHIBA CORPORATION
+00003A CHYRON CORPORATION
+00003B i Controls, Inc.
+00003C AUSPEX SYSTEMS INC.
+00003D UNISYS
+00003E SIMPACT
+00003F SYNTREX, INC.
+000040 APPLICON, INC.
+000041 ICE CORPORATION
+000042 METIER MANAGEMENT SYSTEMS LTD.
+000043 MICRO TECHNOLOGY
+000044 CASTELLE CORPORATION
+000045 FORD AEROSPACE & COMM. CORP.
+000046 OLIVETTI NORTH AMERICA
+000047 NICOLET INSTRUMENTS CORP.
+000048 SEIKO EPSON CORPORATION
+000049 APRICOT COMPUTERS, LTD
+00004A ADC CODENOLL TECHNOLOGY CORP.
+00004B ICL DATA OY
+00004C NEC CORPORATION
+00004D DCI CORPORATION
+00004E AMPEX CORPORATION
+00004F LOGICRAFT, INC.
+000050 RADISYS CORPORATION
+000051 HOB ELECTRONIC GMBH & CO. KG
+000052 Intrusion.com, Inc.
+000053 COMPUCORP
+000054 MODICON, INC.
+000055 COMMISSARIAT A L`ENERGIE ATOM.
+000056 DR. B. STRUCK
+000057 SCITEX CORPORATION LTD.
+000058 RACORE COMPUTER PRODUCTS INC.
+000059 HELLIGE GMBH
+00005A SysKonnect GmbH
+00005B ELTEC ELEKTRONIK AG
+00005C TELEMATICS INTERNATIONAL INC.
+00005D CS TELECOM
+00005E USC INFORMATION SCIENCES INST
+00005F SUMITOMO ELECTRIC IND., LTD.
+000060 KONTRON ELEKTRONIK GMBH
+000061 GATEWAY COMMUNICATIONS
+000062 BULL HN INFORMATION SYSTEMS
+000063 DR.ING.SEUFERT GMBH
+000064 YOKOGAWA DIGITAL COMPUTER CORP
+000065 NETWORK ASSOCIATES, INC.
+000066 TALARIS SYSTEMS, INC.
+000067 SOFT * RITE, INC.
+000068 ROSEMOUNT CONTROLS
+000069 CONCORD COMMUNICATIONS INC
+00006A COMPUTER CONSOLES INC.
+00006B SILICON GRAPHICS INC./MIPS
+00006D CRAY COMMUNICATIONS, LTD.
+00006E ARTISOFT, INC.
+00006F MADGE NETWORKS LTD.
+000070 HCL LIMITED
+000071 ADRA SYSTEMS INC.
+000072 MINIWARE TECHNOLOGY
+000073 SIECOR CORPORATION
+000074 RICOH COMPANY LTD.
+000075 Nortel Networks
+000076 ABEKAS VIDEO SYSTEM
+000077 INTERPHASE CORPORATION
+000078 LABTAM LIMITED
+000079 NETWORTH INCORPORATED
+00007A DANA COMPUTER INC.
+00007B RESEARCH MACHINES
+00007C AMPERE INCORPORATED
+00007D SUN MICROSYSTEMS, INC.
+00007E CLUSTRIX CORPORATION
+00007F LINOTYPE-HELL AG
+000080 CRAY COMMUNICATIONS A/S
+000081 BAY NETWORKS
+000082 LECTRA SYSTEMES SA
+000083 TADPOLE TECHNOLOGY PLC
+000084 SUPERNET
+000085 CANON INC.
+000086 MEGAHERTZ CORPORATION
+000087 HITACHI, LTD.
+000088 COMPUTER NETWORK TECH. CORP.
+000089 CAYMAN SYSTEMS INC.
+00008A DATAHOUSE INFORMATION SYSTEMS
+00008B INFOTRON
+00008C ALLOY COMPUTER PRODUCTS, INC.
+00008D VERDIX CORPORATION
+00008E SOLBOURNE COMPUTER, INC.
+00008F RAYTHEON COMPANY
+000090 MICROCOM
+000091 ANRITSU CORPORATION
+000092 COGENT DATA TECHNOLOGIES
+000093 PROTEON INC.
+000094 ASANTE TECHNOLOGIES
+000095 SONY TEKTRONIX CORP.
+000096 MARCONI ELECTRONICS LTD.
+000097 EPOCH SYSTEMS
+000098 CROSSCOMM CORPORATION
+000099 MTX, INC.
+00009A RC COMPUTER A/S
+00009B INFORMATION INTERNATIONAL, INC
+00009C ROLM MIL-SPEC COMPUTERS
+00009D LOCUS COMPUTING CORPORATION
+00009E MARLI S.A.
+00009F AMERISTAR TECHNOLOGIES INC.
+0000A0 TOKYO SANYO ELECTRIC CO. LTD.
+0000A1 MARQUETTE ELECTRIC CO.
+0000A2 BAY NETWORKS
+0000A3 NETWORK APPLICATION TECHNOLOGY
+0000A4 ACORN COMPUTERS LIMITED
+0000A5 COMPATIBLE SYSTEMS CORP.
+0000A6 NETWORK GENERAL CORPORATION
+0000A7 NETWORK COMPUTING DEVICES INC.
+0000A8 STRATUS COMPUTER INC.
+0000A9 NETWORK SYSTEMS CORP.
+0000AA XEROX CORPORATION
+0000AB LOGIC MODELING CORPORATION
+0000AC CONWARE COMPUTER CONSULTING
+0000AD BRUKER INSTRUMENTS INC.
+0000AE DASSAULT ELECTRONIQUE
+0000AF NUCLEAR DATA INSTRUMENTATION
+0000B0 RND-RAD NETWORK DEVICES
+0000B1 ALPHA MICROSYSTEMS INC.
+0000B2 TELEVIDEO SYSTEMS, INC.
+0000B3 CIMLINC INCORPORATED
+0000B4 EDIMAX COMPUTER COMPANY
+0000B5 DATABILITY SOFTWARE SYS. INC.
+0000B6 MICRO-MATIC RESEARCH
+0000B7 DOVE COMPUTER CORPORATION
+0000B8 SEIKOSHA CO., LTD.
+0000B9 MCDONNELL DOUGLAS COMPUTER SYS
+0000BA SIIG, INC.
+0000BB TRI-DATA
+0000BC ALLEN-BRADLEY CO. INC.
+0000BD MITSUBISHI CABLE COMPANY
+0000BE THE NTI GROUP
+0000BF SYMMETRIC COMPUTER SYSTEMS
+0000C0 WESTERN DIGITAL CORPORATION
+0000C1 Madge Networks Ltd.
+0000C2 INFORMATION PRESENTATION TECH.
+0000C3 HARRIS CORP COMPUTER SYS DIV
+0000C4 WATERS DIV. OF MILLIPORE
+0000C5 FARALLON COMPUTING/NETOPIA
+0000C6 EON SYSTEMS
+0000C7 ARIX CORPORATION
+0000C8 ALTOS COMPUTER SYSTEMS
+0000C9 EMULEX CORPORATION
+0000CA APPLITEK
+0000CB COMPU-SHACK ELECTRONIC GMBH
+0000CC DENSAN CO., LTD.
+0000CD Centrecom Systems, Ltd.
+0000CE MEGADATA CORP.
+0000CF HAYES MICROCOMPUTER PRODUCTS
+0000D0 DEVELCON ELECTRONICS LTD.
+0000D1 ADAPTEC INCORPORATED
+0000D2 SBE, INC.
+0000D3 WANG LABORATORIES INC.
+0000D4 PURE DATA LTD.
+0000D5 MICROGNOSIS INTERNATIONAL
+0000D6 PUNCH LINE HOLDING
+0000D7 DARTMOUTH COLLEGE
+0000D8 NOVELL, INC.
+0000D9 NIPPON TELEGRAPH & TELEPHONE
+0000DA ATEX
+0000DB BRITISH TELECOMMUNICATIONS PLC
+0000DC HAYES MICROCOMPUTER PRODUCTS
+0000DD TCL INCORPORATED
+0000DE CETIA
+0000DF BELL & HOWELL PUB SYS DIV
+0000E0 QUADRAM CORP.
+0000E1 GRID SYSTEMS
+0000E2 ACER TECHNOLOGIES CORP.
+0000E3 INTEGRATED MICRO PRODUCTS LTD
+0000E4 IN2 GROUPE INTERTECHNIQUE
+0000E5 SIGMEX LTD.
+0000E6 APTOR PRODUITS DE COMM INDUST
+0000E7 STAR GATE TECHNOLOGIES
+0000E8 ACCTON TECHNOLOGY CORP.
+0000E9 ISICAD, INC.
+0000EA UPNOD AB
+0000EB MATSUSHITA COMM. IND. CO. LTD.
+0000EC MICROPROCESS
+0000ED APRIL
+0000EE NETWORK DESIGNERS, LTD.
+0000EF KTI
+0000F0 SAMSUNG ELECTRONICS CO., LTD.
+0000F1 MAGNA COMPUTER CORPORATION
+0000F2 SPIDER COMMUNICATIONS
+0000F3 GANDALF DATA LIMITED
+0000F4 ALLIED TELESYN INTERNATIONAL
+0000F5 DIAMOND SALES LIMITED
+0000F6 APPLIED MICROSYSTEMS CORP.
+0000F7 YOUTH KEEP ENTERPRISE CO LTD
+0000F8 DIGITAL EQUIPMENT CORPORATION
+0000F9 QUOTRON SYSTEMS INC.
+0000FA MICROSAGE COMPUTER SYSTEMS INC
+0000FB RECHNER ZUR KOMMUNIKATION
+0000FC MEIKO
+0000FD HIGH LEVEL HARDWARE
+0000FE ANNAPOLIS MICRO SYSTEMS
+0000FF CAMTEC ELECTRONICS LTD.
+000100 EQUIP'TRANS
+000102 3COM CORPORATION
+000103 3COM CORPORATION
+000104 DVICO Co., Ltd.
+000105 BECKHOFF GmbH
+000106 Tews Datentechnik GmbH
+000107 Leiser GmbH
+000108 AVLAB Technology, Inc.
+000109 Nagano Japan Radio Co., Ltd.
+00010A CIS TECHNOLOGY INC.
+00010B Space CyberLink, Inc.
+00010C System Talks Inc.
+00010D CORECO, INC.
+00010E Bri-Link Technologies Co., Ltd
+00010F Nishan Systems, Inc.
+000110 Gotham Networks
+000111 iDigm Inc.
+000112 Shark Multimedia Inc.
+000113 OLYMPUS OPTICAL CO., LTD.
+000114 KANDA TSUSHIN KOGYO CO., LTD.
+000115 EXTRATECH CORPORATION
+000116 Netspect Technologies, Inc.
+000117 CANAL +
+000118 EZ Digital Co., Ltd.
+000119 Action Controls Pty. Ltd.
+00011A EEH DataLink GmbH
+00011B Unizone Technologies, Inc.
+00011C Universal Talkware Corporation
+00011D Centillium Communications
+00011E Precidia Technologies, Inc.
+00011F RC Networks, Inc.
+000120 OSCILLOQUARTZ S.A.
+000121 RapidStream Inc.
+000122 Trend Communications, Ltd.
+000123 DIGITAL ELECTRONICS CORP.
+000124 Acer Incorporated
+000125 YAESU MUSEN CO., LTD.
+000126 PAC Labs
+000127 The OPEN Group Limited
+000128 EnjoyWeb, Inc.
+000129 DFI Inc.
+00012A Telematica Sistems Inteligente
+00012B TELENET Co., Ltd.
+00012C Aravox Technologies, Inc.
+00012D Komodo Technology
+00012E PC Partner Ltd.
+00012F Twinhead International Corp
+000130 Extreme Networks
+000131 Detection Systems, Inc.
+000132 Dranetz - BMI
+000133 KYOWA Electronic Instruments C
+000134 SIG Positec Systems AG
+000135 KDC Corp.
+000136 CyberTAN Technology, Inc.
+000137 IT Farm Corporation
+000138 XAVi Technologies Corp.
+000139 Point Multimedia Systems
+00013A SHELCAD COMMUNICATIONS, LTD.
+00013B BNA SYSTEMS
+00013C TIW SYSTEMS
+00013D RiscStation Ltd.
+00013E Ascom Tateco AB
+00013F Neighbor World Co., Ltd.
+000140 Sendtek Corporation
+000141 CABLE PRINT
+000142 Cisco Systems, Inc.
+000143 Cisco Systems, Inc.
+000144 Cereva Networks, Inc.
+000145 WINSYSTEMS, INC.
+000146 Tesco Controls, Inc.
+000147 Zhone Technologies
+000148 X-traWeb Inc.
+000149 T.D.T. Transfer Data Test GmbH
+00014A SONY COMPUTER SCIENCE LABS., I
+00014B Ennovate Networks, Inc.
+00014C Berkeley Process Control
+00014D Shin Kin Enterprises Co., Ltd
+00014E WIN Enterprises, Inc.
+00014F LUMINOUS Networks, Inc.
+000150 GILAT COMMUNICATIONS, LTD.
+000151 Ensemble Communications
+000152 CHROMATEK INC.
+000153 ARCHTEK TELECOM CORPORATION
+000154 G3M Corporation
+000155 Promise Technology, Inc.
+000156 FIREWIREDIRECT.COM, INC.
+000157 SYSWAVE CO., LTD
+000158 Electro Industries/Gauge Tech
+000159 S1 Corporation
+00015A Digital Video Broadcasting
+00015B ITALTEL S.p.A/RF-UP-I
+00015C CADANT INC.
+00015D Pirus Networks
+00015E BEST TECHNOLOGY CO., LTD.
+00015F DIGITAL DESIGN GmbH
+000160 ELMEX Co., LTD.
+000161 Meta Machine Technology
+000162 Cygnet Technologies, Inc.
+000163 Cisco Systems, Inc.
+000164 Cisco Systems, Inc.
+000165 AirSwitch Corporation
+000166 TC GROUP A/S
+000167 HIOKI E.E. CORPORATION
+000168 VITANA CORPORATION
+000169 Celestix Networks Pte Ltd.
+00016A ALITEC
+00016B LightChip, Inc.
+00016C FOXCONN
+00016D Triton Network Systems
+00016E Conklin Corporation
+00016F HAITAI ELECTRONICS CO., LTD.
+000170 ESE Embedded System Engineer'g
+000171 Allied Data Technologies
+000172 TechnoLand Co., LTD.
+000173 JNI Corporation
+000174 CyberOptics Corporation
+000175 Radiant Communications Corp.
+000176 Orient Silver Enterprises
+000177 EDSL
+000178 MARGI Systems, Inc.
+000179 WIRELESS TECHNOLOGY, INC.
+00017A Chengdu Maipu Electric Industrial Co., Ltd.
+00017B Heidelberger Druckmaschinen AG
+00017C AG-E GmbH
+00017D ThermoQuest
+00017E ADTEK System Science Co., Ltd.
+00017F Experience Music Project
+000180 AOpen, Inc.
+000181 Nortel Networks
+000182 DICA TECHNOLOGIES AG
+000183 ANITE TELECOMS
+000184 SIEB & MEYER AG
+000185 Aloka Co., Ltd.
+000186 DISCH GmbH
+000187 i2SE GmbH
+000188 LXCO Technologies ag
+000189 Refraction Technology, Inc.
+00018A ROI COMPUTER AG
+00018B NetLinks Co., Ltd.
+00018C Mega Vision
+00018D AudeSi Technologies
+00018E Logitec Corporation
+00018F Kenetec, Inc.
+000190 SMK-M
+000191 SYRED Data Systems
+000192 Texas Digital Systems
+000193 Hanbyul Telecom Co., Ltd.
+000194 Capital Equipment Corporation
+000195 Sena Technologies, Inc.
+000196 Cisco Systems, Inc.
+000197 Cisco Systems, Inc.
+000198 Darim Vision
+000199 HeiSei Electronics
+00019A LEUNIG GmbH
+00019B Kyoto Microcomputer Co., Ltd.
+00019C JDS Uniphase Inc.
+00019D E-Control Systems, Inc.
+00019E ESS Technology, Inc.
+00019F Phonex Broadband
+0001A0 Infinilink Corporation
+0001A1 Mag-Tek, Inc.
+0001A2 Logical Co., Ltd.
+0001A3 GENESYS LOGIC, INC.
+0001A4 Microlink Corporation
+0001A5 Nextcomm, Inc.
+0001A6 Scientific-Atlanta Arcodan A/S
+0001A7 UNEX TECHNOLOGY CORPORATION
+0001A8 Welltech Computer Co., Ltd.
+0001A9 BMW AG
+0001AA Airspan Communications, Ltd.
+0001AB Main Street Networks
+0001AC Sitara Networks, Inc.
+0001AD Coach Master International  d.b.a. CMI Worldwide, Inc.
+0001AE Trex Enterprises
+0001AF Motorola Computer Group
+0001B0 Fulltek Technology Co., Ltd.
+0001B1 General Bandwidth
+0001B2 Digital Processing Systems, Inc.
+0001B3 Precision Electronic Manufacturing
+0001B4 Wayport, Inc.
+0001B5 Turin Networks, Inc.
+0001B6 SAEJIN T&M Co., Ltd.
+0001B7 Centos, Inc.
+0001B8 Netsensity, Inc.
+0001B9 SKF Condition Monitoring
+0001BA IC-Net, Inc.
+0001BB Frequentis
+0001BC Brains Corporation
+0001BD Peterson Electro-Musical Products, Inc.
+0001BE Gigalink Co., Ltd.
+0001BF Teleforce Co., Ltd.
+0001C0 CompuLab, Ltd.
+0001C1 Exbit Technology
+0001C2 ARK Research Corp.
+0001C3 Acromag, Inc.
+0001C4 NeoWave, Inc.
+0001C5 Simpler Networks
+0001C6 Quarry Technologies
+0001C7 Cisco Systems, Inc.
+0001C8 THOMAS CONRAD CORP.
+0001C8 CONRAD CORP.
+0001C9 Cisco Systems, Inc.
+0001CA Geocast Network Systems, Inc.
+0001CB NetGame, Ltd.
+0001CC Japan Total Design Communication Co., Ltd.
+0001CD ARtem
+0001CE Custom Micro Products, Ltd.
+0001CF Alpha Data Parallel Systems, Ltd.
+0001D0 VitalPoint, Inc.
+0001D1 CoNet Communications, Inc.
+0001D2 MacPower Peripherals, Ltd.
+0001D3 PAXCOMM, Inc.
+0001D4 Leisure Time, Inc.
+0001D5 HAEDONG INFO & COMM CO., LTD
+0001D6 MAN Roland Druckmaschinen AG
+0001D7 F5 Networks, Inc.
+0001D8 Teltronics, Inc.
+0001D9 Sigma, Inc.
+0001DA WINCOMM Corporation
+0001DB Freecom Technologies GmbH
+0001DC Activetelco
+0001DD Avail Networks
+0001DE Trango Systems, Inc.
+0001DF ISDN Communications, Ltd.
+0001E0 Fast Systems, Inc.
+0001E1 Kinpo Electronics, Inc.
+0001E2 Ando Electric Corporation
+0001E3 Siemens AG
+0001E4 Sitera, Inc.
+0001E5 Supernet, Inc.
+0001E6 Hewlett-Packard Company
+0001E7 Hewlett-Packard Company
+0001E8 Force10 Networks, Inc.
+0001E9 Litton Marine Systems B.V.
+0001EA Cirilium Corp.
+0001EB C-COM Corporation
+0001EC Ericsson Group
+0001ED SETA Corp.
+0001EE Comtrol Europe, Ltd.
+0001EF Camtel Technology Corp.
+0001F0 Tridium, Inc.
+0001F1 Innovative Concepts, Inc.
+0001F3 QPS, Inc.
+0001F4 Enterasys Networks
+0001F5 ERIM S.A.
+0001F6 Association of Musical Electronics Industry
+0001F7 Image Display Systems, Inc.
+0001F8 Adherent Systems, Ltd.
+0001F9 TeraGlobal Communications Corp.
+0001FA HOROSCAS
+0001FB DoTop Technology, Inc.
+0001FC Keyence Corporation
+0001FD Digital Voice Systems, Inc.
+0001FE DIGITAL EQUIPMENT CORPORATION
+0001FF Data Direct Networks, Inc.
+000200 Net & Sys Co., Ltd.
+000201 IFM Electronic gmbh
+000202 Amino Communications, Ltd.
+000203 Woonsang Telecom, Inc.
+000204 Bodmann Industries Elektronik GmbH
+000205 Hitachi Denshi, Ltd.
+000206 Telital R&D Denmark A/S
+000208 Unify Networks, Inc.
+000209 Shenzhen SED Information Technology Co., Ltd.
+00020A Gefran Spa
+00020B Native Networks, Inc.
+00020C Metro-Optix
+00020D Micronpc.com
+00020E Laurel Networks, Inc.
+00020F AATR
+000210 Fenecom
+000211 Nature Worldwide Technology Corp.
+000212 SierraCom
+000213 S.D.E.L.
+000214 DTVRO
+000215 Cotas Computer Technology A/B
+000216 Cisco Systems, Inc.
+000217 Cisco Systems, Inc.
+000218 Advanced Scientific Corp
+000219 Paralon Technologies
+00021A Zuma Networks
+00021B Kollmorgen-Servotronix
+00021C Network Elements, Inc.
+00021D Data General Communication Ltd.
+00021E SIMTEL S.R.L.
+00021F Aculab PLC
+000220 Canon Aptex, Inc.
+000221 DSP Application, Ltd.
+000222 Chromisys, Inc.
+000223 ClickTV
+000224 Lantern Communications, Inc.
+000225 Certus Technology, Inc.
+000226 XESystems, Inc.
+000227 ESD GmbH
+000228 Necsom, Ltd.
+000229 Adtec Corporation
+00022A Asound Electronic
+00022B Tamura Electric Works, Ltd.
+00022C ABB Bomem, Inc.
+00022D Agere Systems
+00022E TEAC Corp. R& D
+00022F P-Cube, Ltd.
+000230 Intersoft Electronics
+000231 Ingersoll-Rand
+000232 Avision, Inc.
+000233 Mantra Communications, Inc.
+000234 Imperial Technology, Inc.
+000235 Paragon Networks International
+000236 INIT GmbH
+000237 Cosmo Research Corp.
+000238 Serome Technology, Inc.
+000239 Visicom
+00023A ZSK Stickmaschinen GmbH
+00023B Redback Networks
+00023C Creative Technology, Ltd.
+00023D NuSpeed, Inc.
+00023E Selta Telematica S.p.a
+00023F Compal Electronics, Inc.
+000240 Seedek Co., Ltd.
+000241 Amer.com
+000242 Videoframe Systems
+000243 Raysis Co., Ltd.
+000244 SURECOM Technology Co.
+000245 Lampus Co, Ltd.
+000246 All-Win Tech Co., Ltd.
+000247 Great Dragon Information Technology (Group) Co., Ltd.
+000248 Pila GmbH & Co.
+000249 Aviv Infocom Co, Ltd.
+00024A Cisco Systems, Inc.
+00024B Cisco Systems, Inc.
+00024C SiByte, Inc.
+00024D Mannesman Dematic Colby Pty. Ltd.
+00024E Datacard Group
+00024F IPM Datacom S.R.L.
+000250 Geyser Networks, Inc.
+000251 Soma Networks
+000252 Carrier Corporation
+000253 Televideo, Inc.
+000254 WorldGate
+000255 IBM Corporation
+000256 Alpha Processor, Inc.
+000257 Microcom Corp.
+000258 Flying Packets Communications
+000259 Tsann Kuen China (Shanghai)Enterprise Co., Ltd. IT Group
+00025A Catena Networks
+00025B Cambridge Silicon Radio
+00025C SCI Systems (Kunshan) Co., Ltd.
+00025E High Technology Ltd
+00025F Nortel Networks
+000260 Accordion Networks, Inc.
+000261 i3 Micro Technology AB
+000262 Soyo Group Soyo Com Tech Co., Ltd
+000263 UPS Manufacturing SRL
+000264 AudioRamp.com
+000265 Virditech Co. Ltd.
+000266 Thermalogic Corporation
+000267 NODE RUNNER, INC.
+000268 Harris Government Communications
+000269 Nadatel Co., Ltd
+00026A Cocess Telecom Co., Ltd.
+00026B BCM Computers Co., Ltd.
+00026C Philips CFT
+00026D Adept Telecom
+00026E NeGeN Access, Inc.
+00026F Senao International Co., Ltd.
+000270 Crewave Co., Ltd.
+000271 Vpacket Communications
+000272 CC&C Technologies, Inc.
+000273 Coriolis Networks
+000274 Tommy Technologies Corp.
+000275 SMART Technologies, Inc.
+000276 Primax Electronics Ltd.
+000277 Cash Systemes Industrie
+000278 Samsung Electro-Mechanics Co., Ltd.
+000279 Control Applications, Ltd.
+00027A IOI Technology Corporation
+00027B Amplify Net, Inc.
+00027C Trilithic, Inc.
+00027D Cisco Systems, Inc.
+00027E Cisco Systems, Inc.
+00027F ask-technologies.com
+000280 Mu Net, Inc.
+000281 Red-M (Communications) Ltd.
+000282 ViaClix, Inc.
+000283 Spectrum Controls, Inc.
+000284 Alstom T&D P&C
+000285 Riverstone Networks
+000286 Occam Networks
+000287 Adapcom
+000288 GLOBAL VILLAGE COMMUNICATION
+000289 DNE Technologies
+00028A Ambit Microsystems Corporation
+00028B VDSL Systems OY
+00028C Micrel-Synergy Semiconductor
+00028D Movita Technologies, Inc.
+00028E Rapid 5 Networks, Inc.
+00028F Globetek, Inc.
+000290 Woorigisool, Inc.
+000291 Open Network Co., Ltd.
+000292 Logic Innovations, Inc.
+000293 Solid Data Systems
+000294 Tokyo Sokushin Co., Ltd.
+000295 IP.Access Limited
+000296 Lectron Co,. Ltd.
+000297 C-COR.net
+000298 Broadframe Corporation
+000299 Apex, Inc.
+00029A Storage Apps
+00029B Kreatel Communications AB
+00029D Merix Corp.
+00029E Information Equipment Co., Ltd.
+00029F L-3 Communication Aviation Recorders
+0002A0 Flatstack Ltd.
+0002A1 World Wide Packets
+0002A2 Hilscher GmbH
+0002A3 ABB Power Automation
+0002A4 AddPac Technology Co., Ltd.
+0002A5 Compaq Computer Corporation
+0002A6 Effinet Systems Co., Ltd.
+0002A7 Vivace Networks
+0002A8 Air Link Technology
+0002A9 RACOM, s.r.o.
+0002AA PLcom Co., Ltd.
+0002AB CTC Union Technologies Co., Ltd.
+0002AC 3PAR data
+0002AD Asahi Optical Co., Ltd.
+0002AE Scannex Electronics Ltd.
+0002AF TeleCruz Technology, Inc.
+0002B0 Hokubu Communication & Industrial Co., Ltd.
+0002B1 Anritsu, Ltd.
+0002B2 Cablevision
+0002B3 Intel Corporation
+0002B4 DAPHNE
+0002B5 Avnet, Inc.
+0002B6 Acrosser Technology Co., Ltd.
+0002B7 Watanabe Electric Industry Co., Ltd.
+0002B8 WHI KONSULT AB
+0002B9 Cisco Systems, Inc.
+0002BA Cisco Systems, Inc.
+0002BB Continuous Computing
+0002BC LVL 7 Systems, Inc.
+0002BD Bionet Co., Ltd.
+0002BE Totsu Engineering, Inc.
+0002BF dotRocket, Inc.
+0002C0 Bencent Tzeng Industry Co., Ltd.
+0002C1 Innovative Electronic Designs, Inc.
+0002C2 Net Vision Telecom
+0002C3 Arelnet Ltd.
+0002C4 Vector International BUBA
+0002C5 Evertz Microsystems Ltd.
+0002C6 Data Track Technology PLC
+0002C7 ALPS ELECTRIC Co., Ltd.
+0002C8 Technocom Communications Technology (pte) Ltd
+0002C9 Mellanox Technologies
+0002CA EndPoints, Inc.
+0002CB TriState Ltd.
+0002CC M.C.C.I
+0002CD TeleDream, Inc.
+0002CE FoxJet, Inc.
+0002CF ZyGate Communications, Inc.
+0002D0 Comdial Corporation
+0002D1 Vivotek, Inc.
+0002D2 Workstation AG
+0002D3 NetBotz, Inc.
+0002D4 PDA Peripherals, Inc.
+0002D5 ACR
+0002D6 NICE Systems
+0002D7 EMPEG Ltd
+0002D8 BRECIS Communications Corporation
+0002D9 Reliable Controls
+0002DA ExiO Communications, Inc.
+0002DB NETSEC
+0002DC Fujitsu General Limited
+0002DD Bromax Communications, Ltd.
+0002DE Astrodesign, Inc.
+0002DF Net Com Systems, Inc.
+0002E0 ETAS GmbH
+0002E1 Integrated Network Corporation
+0002E2 NDC Infared Engineering
+0002E3 LITE-ON Communications, Inc.
+0002E4 JC HYUN Systems, Inc.
+0002E5 Timeware Ltd.
+0002E6 Gould Instrument Systems, Inc.
+0002E7 CAB GmbH & Co KG
+0002E8 E.D.&A.
+0002E9 CS Systemes De Securite - C3S
+0002EA Videonics, Inc.
+0002EB Easent Communications
+0002EC Maschoff Design Engineering
+0002ED DXO Telecom Co., Ltd.
+0002EE Nokia Danmark A/S
+0002EF CCC Network Systems Group Ltd.
+0002F0 AME Optimedia Technology Co., Ltd.
+0002F1 Pinetron Co., Ltd.
+0002F2 eDevice, Inc.
+0002F3 Media Serve Co., Ltd.
+0002F4 PCTEL, Inc.
+0002F5 VIVE Synergies, Inc.
+0002F6 Equipe Communications
+0002F7 ARM
+0002F8 SEAKR Engineering, Inc.
+0002F9 Mimos Semiconductor SDN BHD
+0002FA DX Antenna Co., Ltd.
+0002FB Baumuller Aulugen-Systemtechnik GmbH
+0002FC Cisco Systems, Inc.
+0002FD Cisco Systems, Inc.
+0002FE Viditec, Inc.
+0002FF Handan Broad InfoCom
+000300 NetContinuum, Inc.
+000301 Avantas Networks Corporation
+000302 Oasys Telecom, Inc.
+000303 JAMA Electronics Co., Ltd.
+000304 Pacific Broadband Communications
+000305 Smart Network Devices GmbH
+000306 Fusion In Tech Co., Ltd.
+000307 Secure Works, Inc.
+000308 AM Communications, Inc.
+000309 Texcel Technology PLC
+00030A Argus Technologies
+00030B Hunter Technology, Inc.
+00030C Telesoft Technologies Ltd.
+00030D Uniwill Computer Corp.
+00030E Core Communications Co., Ltd.
+00030F Legend Digital China Ltd.
+000310 Link Evolution Corp.
+000311 Micro Technology Co., Ltd.
+000312 TR-Systemtechnik GmbH
+000313 Access Media SPA
+000314 Teleware Network Systems
+000315 Cidco Incorporated
+000316 Nobell Communications, Inc.
+000317 Merlin Systems, Inc.
+000318 Cyras Systems, Inc.
+000319 Infineon AG
+00031A Beijing Broad Telecom Ltd., China
+00031B Cellvision Systems, Inc.
+00031C Svenska Hardvarufabriken AB
+00031D Taiwan Commate Computer, Inc.
+00031E Optranet, Inc.
+00031F Condev Ltd.
+000320 Xpeed, Inc.
+000321 Reco Research Co., Ltd.
+000322 IDIS Co., Ltd.
+000323 Cornet Technology, Inc.
+000324 Tottori SANYO Electric Co., Ltd.
+000325 Arima Computer Corp.
+000326 Iwasaki Information Systems Co., Ltd.
+000327 ACT'L
+000328 Mace Group, Inc.
+000329 F3, Inc.
+00032A UniData Communication Systems, Inc.
+00032B GAI Datenfunksysteme GmbH
+00032C ABB Industrie AG
+00032D IBASE Technology, Inc.
+00032E Scope Information Management, Ltd.
+00032F Global Sun Technology, Inc.
+000330 Imagenics, Co., Ltd.
+000331 Cisco Systems, Inc.
+000332 Cisco Systems, Inc.
+000333 Digitel Co., Ltd.
+000334 Newport Electronics
+000335 Mirae Technology
+000336 Zetes Technologies
+000337 Vaone, Inc.
+000338 Oak Technology
+000339 Eurologic Systems, Ltd.
+00033A Silicon Wave, Inc.
+00033B TAMI Tech Co., Ltd.
+00033C Daiden Co., Ltd.
+00033D ILSHin Lab
+00033E Tateyama System Laboratory Co., Ltd.
+00033F BigBand Networks, Ltd.
+000340 Floware Wireless Systems, Ltd.
+000341 Axon Digital Design
+000342 Nortel Networks
+000343 Martin Professional A/S
+000344 Tietech.Co., Ltd.
+000345 Routrek Networks Corporation
+000346 Hitachi Kokusai Electric, Inc.
+000347 Intel Corporation
+000348 Norscan Instruments, Ltd.
+000349 Vidicode Datacommunicatie B.V.
+00034A RIAS Corporation
+00034B Nortel Networks
+00034C Shanghai DigiVision Technology Co., Ltd.
+00034D Chiaro Networks, Ltd.
+00034E Pos Data Company, Ltd.
+00034F Sur-Gard Security
+000350 BTICINO SPA
+000351 Diebold, Inc.
+000352 Colubris Networks
+000353 Mitac, Inc.
+000354 Fiber Logic Communications
+000355 TeraBeam Internet Systems
+000356 Wincor Nixdorf GmbH & Co KG
+000357 Intervoice-Brite, Inc.
+000358 iCable System Co., Ltd.
+000359 DigitalSis
+00035A Phototron Limited
+00035B BridgeWave Communications
+00035C Saint Song Corp.
+00035D Bosung Hi-Net Co., Ltd.
+00035E Metropolitan Area Networks, Inc.
+00035F Schuehle Mess - und. Kontrollsysteme
+000360 PAC Interactive Technology, Inc.
+000361 Widcomm, Inc.
+000362 Vodtel Communications, Inc.
+000363 Miraesys Co., Ltd.
+000364 Scenix Semiconductor, Inc.
+000365 Kira Information & Communications, Ltd.
+000366 ASM Pacific Technology
+000367 Jasmine Networks, Inc.
+000368 Embedone Co., Ltd.
+000369 Nippon Antenna Co., Ltd.
+00036A Mainnet, Ltd.
+00036B Cisco Systems, Inc.
+00036C Cisco Systems, Inc.
+00036D Runtop, Inc.
+00036E Nicon Systems (Pty) Limited
+00036F Telsey SPA
+000370 NXTV, Inc.
+000371 Acomz Networks Corp.
+000372 ULAN
+000373 Aselsan A.S
+000374 Hunter Watertech
+000375 NetMedia, Inc.
+000376 Graphtec Technology, Inc.
+000377 Gigabit Wireless
+000378 HUMAX Co., Ltd.
+000379 Proscend Communications, Inc.
+00037A Taiyo Yuden Co., Ltd.
+00037B IDEC IZUMI Corporation
+00037C Coax Media
+00037D Stellcom
+00037E PORTech Communications, Inc.
+00037F Atheros Communications, Inc.
+000381 Ingenico International
+000382 A-One Co., Ltd.
+000383 Metera Networks, Inc.
+000384 AETA
+000385 Actelis Networks, Inc.
+000386 Ho Net, Inc.
+000387 Blaze Network Products
+000388 Fastfame Technology Co., Ltd.
+000389 Plantronics
+00038A America Online, Inc.
+00038B PLUS-ONE I&T, Inc.
+00038C Total Impact
+00038D PCS Revenue Control Systems, Inc.
+00038E Atoga Systems, Inc.
+00038F Weinschel Corporation
+000390 Digital Video Communications, Inc.
+000392 Hyundai Teletek Co., Ltd.
+000393 Apple Computer, Inc.
+000394 Connect One
+000395 California Amplifier
+000396 EZ Cast Co., Ltd.
+000397 Watchfront Electronics
+000398 WISI
+000399 Dongju Informations & Communications Co., Ltd.
+00039A nSine, Ltd.
+00039B NetChip Technology, Inc.
+00039C OptiMight Communications, Inc.
+00039D Acer Communications & Multimedia, Inc.
+00039E Tera System Co., Ltd.
+00039F Cisco Systems, Inc.
+0003A0 Cisco Systems, Inc.
+0003A1 HIPER Information & Communication, Inc.
+0003A2 Catapult Communications
+0003A3 MAVIX, Ltd.
+0003A4 Data Storage and Information Management
+0003A5 Medea Corporation
+0003A7 Unixtar Technology, Inc.
+0003A8 IDOT Computers, Inc.
+0003A9 AXCENT Media AG
+0003AA Watlow
+0003AB Bridge Information Systems
+0003AC Fronius Schweissmaschinen
+0003AD Emerson Energy Systems AB
+0003AE Allied Advanced Manufacturing Pte, Ltd.
+0003AF Paragea Communications
+0003B0 Xsense Technology Corp.
+0003B1 Abbott Laboratories HPD
+0003B2 Radware
+0003B3 IA Link Systems Co., Ltd.
+0003B4 Macrotek International Corp.
+0003B5 Entra Technology Co.
+0003B6 QSI Corporation
+0003B7 ZACCESS Systems
+0003B8 NetKit Solutions, LLC
+0003B9 Hualong Telecom Co., Ltd.
+0003BA Sun Microsystems
+0003BB Signal Communications Limited
+0003BC COT GmbH
+0003BD OmniCluster Technologies, Inc.
+0003BE Netility
+0003BF Centerpoint Broadband Technologies, Inc.
+0003C0 RFTNC Co., Ltd.
+0003C1 Packet Dynamics Ltd
+0003C2 Solphone K.K.
+0003C3 Micronik Multimedia
+0003C4 Tomra Systems ASA
+0003C5 Mobotix AG
+0003C6 ICUE Systems, Inc.
+0003C7 hopf Elektronik GmbH
+0003C8 CML Emergency Services
+0003C9 TECOM Co., Ltd.
+0003CA MTS Systems Corp.
+0003CB Nippon Systems Development Co., Ltd.
+0003CC Momentum Computer, Inc.
+0003CD Clovertech, Inc.
+0003CE ETEN Technologies, Inc.
+0003CF Muxcom, Inc.
+0003D0 KOANKEISO Co., Ltd.
+0003D1 Takaya Corporation
+0003D2 Crossbeam Systems, Inc.
+0003D3 Internet Energy Systems, Inc.
+0003D4 Alloptic, Inc.
+0003D5 Advanced Communications Co., Ltd.
+0003D6 RADVision, Ltd.
+0003D7 NextNet Wireless, Inc.
+0003D8 iMPath Networks, Inc.
+0003D9 Secheron SA
+0003DA Takamisawa Cybernetics Co., Ltd.
+0003DB Apogee Electronics Corp.
+0003DC Lexar Media, Inc.
+0003DD Comark Corp.
+0003DE OTC Wireless
+0003DF Desana Systems
+0003E0 RadioFrame Networks, Inc.
+0003E1 Winmate Communication, Inc.
+0003E2 Comspace Corporation
+0003E3 Cisco Systems, Inc.
+0003E4 Cisco Systems, Inc.
+0003E5 Hermstedt SG
+0003E6 Entone Technologies, Inc.
+0003E7 Logostek Co. Ltd.
+0003E8 Wavelength Digital Limited
+0003E9 Akara Canada, Inc.
+0003EA Mega System Technologies, Inc.
+0003EB Atrica
+0003EC ICG Research, Inc.
+0003ED Shinkawa Electric Co., Ltd.
+0003EE MKNet Corporation
+0003EF Oneline AG
+0003F0 Redfern Broadband Networks
+0003F1 Cicada Semiconductor, Inc.
+0003F2 Seneca Networks
+0003F3 Dazzle Multimedia, Inc.
+0003F4 NetBurner
+0003F5 Chip2Chip
+0003F6 Allegro Networks, Inc.
+0003F7 Plast-Control GmbH
+0003F8 SanCastle Technologies, Inc.
+0003F9 Pleiades Communications, Inc.
+0003FA TiMetra Networks
+0003FB Toko Seiki Company, Ltd.
+0003FC Intertex Data AB
+0003FD Cisco Systems, Inc.
+0003FE Cisco Systems, Inc.
+0003FF Connectix
+000400 LEXMARK INTERNATIONAL, INC.
+000401 Osaki Electric Co., Ltd.
+000402 Nexsan Technologies, Ltd.
+000403 Nexsi Corporation
+000404 Makino Milling Machine Co., Ltd.
+000405 ACN Technologies
+000406 Fa. Metabox AG
+000407 Topcon Positioning Systems, Inc.
+000408 Sanko Electronics Co., Ltd.
+000409 Cratos Networks
+00040A Sage Systems
+00040B 3com Europe Ltd.
+00040C KANNO Work's Ltd.
+00040D Avaya, Inc.
+00040E AVM GmbH
+00040F Asus Network Technologies, Inc.
+000410 Spinnaker Networks, Inc.
+000411 Inkra Networks, Inc.
+000412 WaveSmith Networks, Inc.
+000413 SNOM Technology AG
+000414 Umezawa Musen Denki Co., Ltd.
+000415 Rasteme Systems Co., Ltd.
+000416 Parks S/A Comunicacoes Digitais
+000417 ELAU AG
+000418 Teltronic S.A.U.
+000419 Fibercycle Networks, Inc.
+00041A ines GmbH
+00041B Digital Interfaces Ltd.
+00041C ipDialog, Inc.
+00041D Corega of America
+00041E Shikoku Instrumentation Co., Ltd.
+00041F Sony Computer Entertainment, Inc.
+000420 Slim Devices, Inc.
+000421 Ocular Networks
+000422 Gordon Kapes, Inc.
+000423 Intel Corporation
+000424 TMC s.r.l.
+000425 Atmel Corporation
+000426 Autosys
+000427 Cisco Systems, Inc.
+000428 Cisco Systems, Inc.
+000429 Pixord Corporation
+00042A Wireless Networks, Inc.
+00042B IT Access Co., Ltd.
+00042C Minet, Inc.
+00042D Sarian Systems, Ltd.
+00042E Netous Technologies, Ltd.
+00042F International Communications Products, Inc.
+000430 Netgem
+000431 Play Industries
+000432 Voyetra Turtle Beach, Inc.
+000433 Cyberboard A/S
+000434 Accelent Systems, Inc.
+000435 Comptek International, Inc.
+000436 ELANsat Technologies, Inc.
+000437 Powin Information Technology, Inc.
+000438 Nortel Networks
+000439 Rosco Entertainment Technology, Inc.
+00043A Intelligent Telecommunications, Inc.
+00043B Lava Computer Mfg., Inc.
+00043C SONOS Co., Ltd.
+00043D INDEL AG
+00043E Telencomm
+00043F Electronic Systems Technology, Inc.
+000440 cyberPIXIE, Inc.
+000441 Half Dome Systems, Inc.
+000442 NACT
+000443 Agilent Technologies, Inc.
+000444 Wireless Home
+000445 LMS Skalar Instruments GmbH
+000446 CYZENTECH Co., Ltd.
+000447 Acrowave Systems Co., Ltd.
+000448 Polaroid Professional Imaging
+000449 Mapletree Networks
+00044A iPolicy Networks, Inc.
+00044B NVIDIA
+00044C JENOPTIK
+00044D Cisco Systems, Inc.
+00044E Cisco Systems, Inc.
+00044F Leukhardt Systemelektronik GmbH
+000450 DMD Computers SRL
+000451 Medrad, Inc.
+000452 RocketLogix, Inc.
+000453 Yotta Yotta, Inc.
+000454 Quadriga UK
+000455 ANTARA.net
+000456 PipingHot Networks
+000457 Universal Access Technology, Inc.
+000458 Fusion X Co., Ltd.
+000459 Veristar Corporation
+00045A The Linksys Group, Inc.
+00045B Techsan Electronics Co., Ltd.
+00045C Mobiwave Pte Ltd
+00045D BEKA Elektronik
+00045E Poly Trax Information Technology AG
+00045F Evalue Technology, Inc.
+000460 Knilink Technology, Inc.
+000461 EPOX Computer Co., Ltd.
+000462 DAKOS Data & Communication Co., Ltd.
+000463 Philips Communication Security & Imaging
+000464 Fantasma Networks, Inc.
+000465 ist isdn support tecknik GmbH
+000466 ARMITEL Co.
+000467 Wuhan Research Institute
+000468 Vivity, Inc.
+000469 Innocom, Inc.
+00046A Navini Networks
+00046B Palm Wireless, Inc.
+00046C Cyber Technology Co., Ltd.
+00046D Cisco Systems, Inc.
+00046E Cisco Systems, Inc.
+00046F Digitel S/A Industria Eletronica
+000470 ipUnplugged AB
+000471 IPrad
+000472 Telelynx, Inc.
+000473 Photonex Corporation
+000474 LEGRAND
+000475 3 Com Corporation
+000476 3 Com Corporation
+000477 e-Appliance Corp.
+000478 G. Star Technology Corporation
+000479 Radius Co., Ltd.
+00047A AXXESSIT ASA
+00047B Schlumberger
+00047C Skidata AG
+00047D Pelco
+00047E NKF Electronics
+00047F Chr. Mayr GmbH & Co. KG
+000480 Foundry Networks, Inc.
+000481 Econolite Control Products, Inc.
+000482 MediaLogic Corp.
+000483 Deltron Technology, Inc.
+000484 Amann GmbH
+000485 PicoLight
+000486 ITTC, University of Kansas
+000487 Cogency Semiconductor, Inc.
+000488 Eurotherm Action Incorporated.
+000489 YAFO Networks, Inc.
+00048A Temia Vertriebs GmbH
+00048B Poscon Corporation
+00048C Nayna Networks, Inc.
+00048D Tone Commander Systems, Inc.
+00048E Ohm Tech Labs, Inc.
+00048F TD Systems Corp.
+000490 Optical Access
+000491 Technovision, Inc.
+000492 Hive Internet, Ltd.
+000493 Tsinghua Unisplendour Co., Ltd.
+000494 Breezecom, Ltd.
+000495 Tejas Networks
+000496 Extreme Networks
+000497 MacroSystem Digital Video AG
+000499 Chino Corporation
+00049A Cisco Systems, Inc.
+00049B Cisco Systems, Inc.
+00049C Surgient Networks, Inc.
+00049D Ipanema Technologies
+00049E Wirelink Co., Ltd.
+00049F Metrowerks
+0004A0 Verity Instruments, Inc.
+0004A1 Pathway Connectivity
+0004A2 L.S.I. Japan Co., Ltd.
+0004A3 Microchip Technology, Inc.
+0004A4 NetEnabled, Inc.
+0004A5 Barco Projection Systems NV
+0004A6 SAF Tehnika Ltd.
+0004A7 FabiaTech Corporation
+0004A8 Broadmax Technologies, Inc.
+0004A9 SandStream Technologies, Inc.
+0004AA Jetstream Communications
+0004AB Comverse Network Systems, Inc.
+0004AC IBM CORP.
+0004AD Malibu Networks
+0004AE Liquid Metronics
+0004AF Digital Fountain, Inc.
+0004B0 ELESIGN Co., Ltd.
+0004B1 Signal Technology, Inc.
+0004B2 ESSEGI SRL
+0004B3 Videotek, Inc.
+0004B4 CIAC
+0004B5 Equitrac Corporation
+0004B6 Tellumat (Pty) Ltd.
+0004B7 AMB i.t. Holding
+0004B8 Kumahira Co., Ltd.
+0004B9 S.I. Soubou, Inc.
+0004BA KDD Media Will Corporation
+0004BB Bardac Corporation
+0004BC Giantec, Inc.
+0004BD Motorola BCS
+0004BE OptXCon, Inc.
+0004BF Versa Logic Corp.
+0004C0 Cisco Systems, Inc.
+0004C1 Cisco Systems, Inc.
+0004C2 Magnipix, Inc.
+0004C3 CASTOR Informatique
+0004C4 Allen & Health
+0004C5 ASE Technologies, USA
+0004C6 Yamaha Motor Co., Ltd.
+0004C7 NetMount
+0004C8 LIBA Maschinefabrik GmbH
+0004C9 Micro Electron Co., Ltd.
+0004CA FreeMs Corp.
+0004CB Tdsoft Communication, Ltd.
+0004CC Peek Traffic BV.
+0004CD Informedia Research Group
+0004CE Patria Ailon
+0004CF Seagate Technology
+0004D0 Softlink s.r.o.
+0004D1 Drew Technologies, Inc.
+0004D2 Adcon Telemetry AG
+0004D3 Toyokeiki Co., Ltd.
+0004D4 Proview Electronics Co., Ltd.
+0004D5 Hitachi Communication Systems, Inc.
+0004D6 Takagi Industrial Co., Ltd.
+0004D7 Omitec Instrumentation Ltd.
+0004D8 IPWireless, Inc.
+0004D9 Titan Electronics, Inc.
+0004DA Relax Technology, Inc.
+0004DB Tellus Group Corp.
+0004DC Nortel Networks
+0004DD Cisco Systems, Inc.
+0004DE Cisco Systems, Inc.
+0004DF Teracom Telematica Ltda.
+0004E0 Procket Networks
+0004E1 Infinior Microsystems
+0004E2 SMC Networks, Inc.
+0004E3 Accton Technology Corp.
+0004E4 Daeryung Ind., Inc.
+0004E5 Glonet Systems, Inc.
+0004E6 Banyan Network Private Limited
+0004E7 Lightpointe Communications, Inc
+0004E8 IER, Inc.
+0004E9 Infiniswitch Corporation
+0004EA Hewlett-Packard Company
+0004EB Paxonet Communications, Inc.
+0004EC Memobox SA
+0004ED Billion Electric Co., Ltd.
+0004EE Lincoln Electric Company
+0004EF Polestar Corp.
+0004F0 International Computers, Ltd
+0004F1 WhereNet
+0004F2 Circa Communications, Ltd.
+0004F3 FS FORTH-SYSTEME GmbH
+0004F4 Infinite Electronics Inc.
+0004F5 SnowShore Networks, Inc.
+0004F6 Amphus
+0004F7 Omega Band, Inc.
+0004F8 QUALICABLE TV Industria E Com., Ltda
+0004F9 Xtera Communications, Inc.
+0004FA MIST Inc.
+0004FB Commtech, Inc.
+0004FC Stratus Computer (DE), Inc.
+0004FD Japan Control Engineering Co., Ltd.
+0004FE Pelago Networks
+0004FF Acronet Co., Ltd.
+000500 Cisco Systems, Inc.
+000501 Cisco Systems, Inc.
+000502 APPLE COMPUTER
+000503 ICONAG
+000504 Naray Information & Communication Enterprise
+000505 Systems Integration Solutions, Inc.
+000506 Reddo Networks AB
+000507 Fine Appliance Corp.
+000508 Inetcam, Inc.
+000509 AVOC Nishimura Ltd.
+00050A ICS Spa
+00050B SICOM Systems, Inc.
+00050C Network Photonics, Inc.
+00050D Midstream Technologies, Inc.
+00050E 3ware, Inc.
+00050F Tanaka S/S Ltd.
+000510 Infinite Shanghai Communication Terminals Ltd.
+000511 Complementaty Technologies Ltd
+000512 MeshNetworks, Inc.
+000513 VTLinx Multimedia Systems, Inc.
+000514 KDT Systems Co., Ltd.
+000515 Nuark Co., Ltd.
+000516 SMART Modular Technologies
+000517 Shellcomm, Inc.
+000518 Jupiters Technology
+000519 Siemens Building Technologies AG,
+00051A 3Com Europe Ltd.
+00051B Magic Control Technology Corporation
+00051C Xnet Technology Corp.
+00051D Airocon, Inc.
+00051E Rhapsody Networks
+00051F Taijin Media Co., Ltd.
+000520 Smartronix, Inc.
+000521 Control Microsystems
+000522 LEA*D Corporation, Inc.
+000523 AVL List GmbH
+000524 BTL System (HK) Limited
+000525 Puretek Industrial Co., Ltd.
+000526 IPAS GmbH
+000527 SJ Tek Co. Ltd
+000528 New Focus, Inc.
+000529 Shanghai Broadan Communication Technology Co., Ltd
+00052A Ikegami Tsushinki Co., Ltd.
+00052B HORIBA, Ltd.
+00052C Supreme Magic Corporation
+00052D Zoltrix International Limited
+00052E Cinta Networks
+00052F Leviton Voice and Data
+000530 Andiamo Systems, Inc.
+000531 Cisco Systems, Inc.
+000532 Cisco Systems, Inc.
+000533 Sanera Systems, Inc.
+000534 Northstar Engineering Ltd.
+000535 Chip PC Ltd.
+000536 Danam Communications, Inc.
+000537 Nets Technology Co., Ltd.
+000538 Merilus, Inc.
+000539 A Brand New World in Sweden AB
+00053A Willowglen Services Pte Ltd
+00053B Harbour Networks Ltd., Co. Beijing
+00053C Xircom
+00053D Agere Systems
+00053E KID Systeme GmbH
+00053F VisionTek, Inc.
+000540 FAST Corporation
+000541 Advanced Systems Co., Ltd.
+000542 Otari, Inc.
+000543 IQ Wireless GmbH
+000544 Valley Technologies, Inc.
+000545 Internet Photonics
+000546 KDD Network Systems Co., Ltd.
+000547 Starent Networks
+000548 Disco Corporation
+000549 Salira Optical Network Systems
+00054A Ario Data Networks, Inc.
+00054B Micro Innovation AG
+00054C RF Innovations Pty Ltd
+00054D Brans Technologies, Inc.
+00054E Philips Components
+000550 Digi-Tech Communications Limited
+000551 F & S Elektronik Systeme GmbH
+000552 Xycotec Computer GmbH
+000553 DVC Company, Inc.
+000554 Rangestar Wireless
+000555 Japan Cash Machine Co., Ltd.
+000556 360 Systems
+000557 Agile TV Corporation
+000558 Synchronous, Inc.
+000559 Intracom S.A.
+00055A Power Dsine Ltd.
+00055B Charles Industries, Ltd.
+00055C Kowa Company, Ltd.
+00055D D-Link Systems, Inc.
+00055E Cisco Systems, Inc.
+00055F Cisco Systems, Inc.
+000560 LEADER COMM.CO., LTD
+000561 nac Image Technology, Inc.
+000562 Digital View Limited
+000563 J-Works, Inc.
+000564 Tsinghua Bitway Co., Ltd.
+000565 Tailyn Communication Company Ltd.
+000566 Secui.com Corporation
+000567 Etymonic Design, Inc.
+000568 Piltofish Networks AB
+000569 VMWARE, Inc.
+00056B C.P. Technology Co., Ltd.
+00056C Hung Chang Co., Ltd.
+00056D Pacific Corporation
+00056E National Enhance Technology, Inc.
+00056F Innomedia Technologies Pvt. Ltd.
+000570 Baydel Ltd.
+000571 Seiwa Electronics Co.
+000572 Deonet Co., Ltd.
+000573 Cisco Systems, Inc.
+000574 Cisco Systems, Inc.
+000575 CDS-Electronics BV
+000576 NSM Technology Ltd.
+000577 SM Information & Communication
+000579 Universal Control Solution Corp.
+00057A Hatteras Networks
+00057B Chung Nam Electronic Co., Ltd.
+00057C RCO Security AB
+00057D Sun Communications, Inc.
+00057E Eckelmann Steuerungstechnik GmbH
+00057F Acqis Technology
+000580 Fibrolan Ltd.
+000581 Snell & Wilcox Ltd.
+000582 ClearCube Technology
+000583 ImageCom Limited
+000584 AbsoluteValue Systems, Inc.
+000585 Juniper Networks, Inc.
+000586 Lucent Technologies
+000587 Locus, Incorporated
+000588 Sensoria Corp.
+000589 National Datacomputer
+00058A Netcom Co., Ltd.
+00058B IPmental, Inc.
+00058C Opentech Inc.
+00058D Lynx Photonic Networks, Inc.
+00058E Ahead Communications System GmbH
+00058F CLCsoft co.
+000590 Ascom Business Systems
+000591 Active Silicon Ltd.
+000592 Pultex Corp.
+000593 Grammar Engine Inc.
+000594 IXXAT Automation GmbH
+000595 Alesis Corporation
+000596 Genotech Co., Ltd.
+000597 Eagle Traffic Control Systems
+000598 CRONOS S.r.l.
+000599 PEI Electronics, Inc.
+00059A Cisco Systems, Inc.
+00059B Cisco Systems, Inc.
+00059C Kleinknecht GmbH, Ing. Buero
+00059D Daniel Computing Systems, Inc.
+00059E Zinwell Corporation
+00059F Yotta Networks, Inc.
+0005A0 MOBILINE Kft.
+0005A1 Zenocom
+0005A2 CELOX Networks
+0005A3 QEI, Inc.
+0005A4 Lucid Voice Ltd.
+0005A5 KOTT
+0005A6 Extron Electronics
+0005A7 Hyperchip, Inc.
+0005A8 WYLE ELECTRONICS
+0005A9 Princeton Networks, Inc.
+0005AA Moore Industries Int.
+0005AB Cyber Fone, Inc.
+0005AC Northern Digital, Inc.
+0005AD Topspin Communications, Inc.
+0005AE Mediaport USA
+0005AF InnoScan Computing A/S
+0005B0 Korea Computer Technology Co., Ltd.
+0005B1 ASB Technology BV
+0005B2 Medison Co., Ltd.
+0005B3 Asahi-Engineering Co., Ltd.
+0005B4 Aceex Corporation
+0005B5 Broadcom Technologies
+0005B6 INSYS Microelectronics GmbH
+0005B7 Arbor Technology Corp.
+0005B8 Electronic Design Associates, Inc.
+0005B9 Airvana, Inc.
+0005BA Area Netwoeks, Inc.
+0005BC Resorsys Ltd.
+0005BD ROAX BV
+0005BE Kongsberg Seatex AS
+0005BF JustEzy Technology, Inc.
+0005C0 Digital Network Alacarte Co., Ltd.
+0005C1 A-Kyung Motion, Inc.
+0005C2 Digital Archway, Inc.
+0005C3 Pacific Instruments, Inc.
+0005C4 Telect, Inc.
+0005C5 Flaga HF
+0005C6 Triz Communications
+0005C7 I/F-COM A/S
+0005C8 VERYTECH
+0005C9 LG Innotek
+0005CA Hitron Technology, Inc.
+0005CB ROIS Technologies, Inc.
+0005CC Sumtel Communications, Inc.
+0005CD Nippon Columbia
+0005CE Prolink Microsystems Corporation
+0005CF Thunder River Technologies, Inc.
+0005D0 Solinet Systems
+0005D1 Metavector Technologies
+0005D2 DAP Technologies
+0005D3 CAC, Inc.
+0005D4 FutureSmart Networks, Inc.
+0005D5 Speedcom Wireless
+0005D6 Titan Wireless
+0005D7 Vista Imaging, Inc.
+0005D8 Arescom, Inc.
+0005D9 Techno Valley, Inc.
+0005DA Apex Automationstechnik
+0005DB Nentec GmbH
+0005DC Cisco Systems, Inc.
+0005DD Cisco Systems, Inc.
+0005DE Gi Fone Korea, Inc.
+0005DF Electronic Innovation, Inc.
+0005E0 Empirix Corp.
+0005E1 Trellis Photonics, Ltd.
+0005E2 Creativ Network Technologies
+0005E3 LightSand Communications, Inc.
+0005E4 Red Lion Controls L.P.
+0005E5 Renishaw PLC
+0005E6 Egenera, Inc.
+0005E7 Netrake
+0005E8 TurboWave, Inc.
+0005E9 Unicess Networks, Inc.
+0005EA Viewcast Corporation
+0005EB Blue Ridge Networks, Inc.
+0005EC Mosaic Systems Inc.
+0005ED Technikum Joanneaum GmbH
+0005EE BEWATOR Group
+0005EF ADOIR Digital Technology
+0005F0 SATEC
+0005F1 VRcom, Inc.
+0005F2 Power R, Inc.
+0005F3 Weboyn
+0005F4 SystemBase Co., Ltd.
+0005F5 OYO Geospace Corp.
+0005F6 Young Chang Co. Ltd.
+0005F7 Analog Devices, Inc.
+0005F8 Real Time Access, Inc.
+0005F9 Diva Systems
+0005FA IPOptical, Inc.
+0005FB Sharegate
+0005FC Schenck Pegasus Corp.
+0005FD PacketLight Networks Ltd.
+0005FE Traficon N.V.
+0005FF SNS Solutions, Inc.
+000600 Tokyo Electronic Industry Co., Ltd.
+000601 Otanikeiki Co., Ltd.
+000602 Cirkitech Electronics Co.
+000603 Baker Hughes
+000604 @Track Communications, Inc.
+000605 Inncom International, Inc.
+000606 RapidWan, Inc.
+000607 Omni-Directional Control Technology Inc.
+000608 At-Sky SAS
+000609 Crossport Systems
+00060A Blue2space.com
+00060B Paceline Systems Corporation
+00060C Melco Industries, Inc.
+00060D Wave7 Optics
+00060E IGSYS Systems, Inc.
+00060F Narad Networks Inc
+000610 Abeona Networks Inc
+000611 Zeus Wireless, Inc.
+000612 Accusys, Inc.
+000613 Kawasaki Steel Corporation
+000614 Prism Holdings
+000615 Kimoto Electric Co., Ltd.
+000616 Tel Net Co., Ltd.
+000617 Redswitch Inc.
+000618 DigiPower Manufacturing Inc.
+000619 Connection Technology Systems
+00061A Zetari Inc.
+00061B Portable Systems, IBM Japan Co, Ltd
+00061C Hoshino Metal Industries, Ltd.
+00061D MIP Telecom, Inc.
+00061E Maxan Systems
+00061F Vision Components GmbH
+000620 Serial System Ltd.
+000621 Hinox, Co., Ltd.
+000622 Chung Fu Chen Yeh Enterprise Corp.
+000623 MGE UPS Systems France
+000624 Gentner Communications
+000625 The Linksys Group, Inc.
+000626 MWE GmbH
+000627 Uniwide Technologies, Inc.
+000628 Cisco Systems, Inc.
+000629 IBM CORPORATION
+00062A Cisco Systems, Inc.
+00062B INTRASERVER TECHNOLOGY
+00062C Network Robots, Inc.
+00062D TouchStar Technologies, L.L.C.
+00062E Aristos Logic Corp.
+00062F Pivotech Systems Inc.
+000630 Adtranz Sweden
+000631 Optical Solutions, Inc.
+000632 Mesco Engineering GmbH
+000633 Heimann Biometric Systems GmbH
+000634 GTE Airfone Inc.
+000635 PacketAir Networks, Inc.
+000636 Jedai Broadband Networks
+000637 Toptrend-Meta Information (ShenZhen) Inc.
+000638 Sungjin C&C Co., Ltd.
+000639 Newtec
+00063A Dura Micro, Inc.
+00063B Lineo Canada Corp.
+00063C NMI Electronics Ltd
+00063D Microwave Data Systems Inc.
+00063E Opthos Inc.
+00063F Everex Communications Inc.
+000640 White Rock Networks
+000641 ITCN
+000642 Genetel Systems Inc.
+000643 SONO Computer Co., Ltd.
+000644 NEIX Inc.
+000645 Meisei Electric Co. Ltd.
+000646 ShenZhen XunBao Network Technology Co Ltd
+000647 Etrali S.A.
+000648 Seedsware, Inc.
+000649 Quante
+00064A Honeywell Co., Ltd. (KOREA)
+00064B Alexon Co., Ltd.
+00064C Invicta Networks, Inc.
+00064D Sencore
+00064E Broad Net Technology Inc.
+00064F PRO-NETS Technology Corporation
+000650 Tiburon Networks, Inc.
+000651 Aspen Networks Inc.
+000652 Cisco Systems, Inc.
+000653 Cisco Systems, Inc.
+000654 Maxxio Technologies
+000655 Yipee, Inc.
+000656 Tactel AB
+000657 Market Central, Inc.
+000658 Helmut Fischer GmbH & Co. KG
+000659 EAL (Apeldoorn) B.V.
+00065A Strix Systems
+00065B Dell Computer Corp.
+00065C Malachite Technologies, Inc.
+00065D Heidelberg Web Systems
+00065E Photuris, Inc.
+00065F ECI Telecom - NGTS Ltd.
+000660 NADEX Co., Ltd.
+000661 NIA Home Technologies Corp.
+000662 MBM Technology Ltd.
+000663 Human Technology Co., Ltd.
+000664 Fostex Corporation
+000665 Summy Gikem, Inc.
+000666 Roving Networks
+000667 Tripp Lite
+000668 Vicon Industries Inc.
+000669 Datasound Laboratories Ltd
+00066A InfiniCon Systems, Inc.
+00066B Sysmex Corporation
+00066C Robinson Corporation
+00066D Compuprint S.P.A.
+00066E Delta Electronics, Inc.
+00066F Korea Data Systems
+000670 Upponetti Oy
+000671 Softing AG
+000672 Netezza
+000673 Optelecom, Inc.
+000674 Spectrum Control, Inc.
+000675 Banderacom, Inc.
+000676 Novra Technologies, Inc.
+000677 SICK AG
+000678 Marantz Japan, Inc.
+000679 Konami Corporation
+00067A JMP Systems
+00067B Toplink C&C Corporation
+00067C CISCO SYSTEMS, INC.
+00067D Takasago Ltd.
+0006C1 CISCO SYSTEMS, INC.
+000701 RACAL-DATACOM
+000800 MULTITECH SYSTEMS, INC.
+0008C7 COMPAQ COMPUTER CORPORATION
+000A27 Apple Computer, Inc.
+001000 CABLE TELEVISION
+001001 MCK COMMUNICATIONS
+001002 ACTIA
+001003 IMATRON, INC.
+001004 THE BRANTLEY COILE COMPANY,INC
+001005 UEC COMMERCIAL
+001006 RACAL RECORDERS LTD.
+001007 CISCO SYSTEMS, INC.
+001008 VIENNA SYSTEMS CORPORATION
+001009 HORO QUARTZ
+00100A WILLIAMS COMMUNICATIONS GROUP
+00100B CISCO SYSTEMS, INC.
+00100C ITO CO., LTD.
+00100D CISCO SYSTEMS, INC.
+00100E MICRO LINEAR COPORATION
+00100F INDUSTRIAL CPU SYSTEMS
+001010 INITIO CORPORATION
+001011 CISCO SYSTEMS, INC.
+001012 PROCESSOR SYSTEMS (I) PVT LTD
+001013 INDUSTRIAL COMPUTER SOURCE
+001014 CISCO SYSTEMS, INC.
+001015 OOMON INC.
+001016 T.SQWARE
+001017 MICOS GMBH
+001018 BROADCOM CORPORATION
+001019 SIRONA DENTAL SYSTEMS
+00101A PICTURETEL CORP.
+00101B CORNET TECHNOLOGY, INC.
+00101C OHM TECHNOLOGIES INTL, LLC
+00101D WINBOND ELECTRONICS CORP.
+00101E MATSUSHITA ELECTRONIC
+00101F CISCO SYSTEMS, INC.
+001020 WELCH ALLYN, DATA COLLECTION
+001021 ENCANTO NETWORKS, INC.
+001022 SATCOM MEDIA CORPORATION
+001023 FLOWWISE NETWORKS, INC.
+001024 NAGOYA ELECTRIC WORKS CO., LTD
+001025 GRAYHILL INC.
+001026 ACCELERATED NETWORKS, INC.
+001027 L-3 COMMUNICATIONS EAST
+001028 COMPUTER TECHNICA, INC.
+001029 CISCO SYSTEMS, INC.
+00102A ZF MICROSYSTEMS, INC.
+00102B UMAX DATA SYSTEMS, INC.
+00102C Lasat Networks A/S
+00102D HITACHI SOFTWARE ENGINEERING
+00102E NETWORK SYSTEMS & TECHNOLOGIES
+00102F CISCO SYSTEMS, INC.
+001030 WI-LAN, INC.
+001031 OBJECTIVE COMMUNICATIONS, INC.
+001032 ALTA TECHNOLOGY
+001033 ACCESSLAN COMMUNICATIONS, INC.
+001034 GNP COMPUTERS
+001035 ELITEGROUP COMPUTER
+001036 INTER-TEL INTEGRATED SYSTEMS
+001037 CYQ'VE TECHNOLOGY CO., LTD.
+001038 MICRO RESEARCH INSTITUTE, INC.
+001039 VECTRON SYSTEMS GMBH
+00103A DIAMOND NETWORK TECH
+00103B HIPPI NETWORKING FORUM
+00103C IC ENSEMBLE, INC.
+00103D PHASECOM, LTD.
+00103E NETSCHOOLS CORPORATION
+00103F TOLLGRADE COMMUNICATIONS, INC.
+001040 INTERMEC CORPORATION
+001041 BRISTOL BABCOCK, INC.
+001042 ALACRITECH
+001043 A2 CORPORATION
+001044 INNOLABS CORPORATION
+001045 Nortel Networks
+001046 ALCORN MCBRIDE INC.
+001047 ECHO ELETRIC CO. LTD.
+001048 HTRC AUTOMATION, INC.
+001049 SHORELINE TELEWORKS, INC.
+00104A THE PARVUC CORPORATION
+00104B 3COM CORPORATION
+00104C COMPUTER ACCESS TECHNOLOGY
+00104D SURTEC INDUSTRIES, INC.
+00104E CEOLOGIC
+00104F STORAGE TECHNOLOGY CORPORATION
+001050 RION CO., LTD.
+001051 CMICRO CORPORATION
+001052 METTLER-TOLEDO (ALBSTADT) GMBH
+001053 COMPUTER TECHNOLOGY CORP.
+001054 CISCO SYSTEMS, INC.
+001055 FUJITSU MICROELECTRONICS, INC.
+001056 SODICK CO., LTD.
+001057 Rebel.com, Inc.
+001058 ARROWPOINT COMMUNICATIONS,INC.
+001059 DIABLO RESEARCH CO. LLC
+00105A 3COM CORPORATION
+00105B NET INSIGHT AB
+00105C QUANTUM DESIGNS (H.K.) LTD.
+00105D DRAGER, BUSINESS UNIT
+00105E HEKIMIAN LABORATORIES, INC.
+00105F IN-SNEC
+001060 BILLIONTON SYSTEMS, INC.
+001061 HOSTLINK CORP.
+001062 NX SERVER, ILNC.
+001063 STARGUIDE DIGITAL NETWORKS
+001064 DIGITAL EQUIPMENT CORP.
+001065 RADYNE CORPORATION
+001066 ADVANCED CONTROL SYSTEMS, INC.
+001067 REDBACK NETWORKS, INC.
+001068 COMOS TELECOM
+001069 HELIOSS COMMUNICATIONS, INC.
+00106A DIGITAL MICROWAVE CORPORATION
+00106B SONUS NETWORKS, INC.
+00106C INFRATEC PLUS GMBH
+00106D INTEGRITY COMMUNICATIONS, INC.
+00106E TADIRAN COM. LTD.
+00106F TRENTON TECHNOLOGY INC.
+001070 CARADON TREND LTD.
+001071 ADVANET INC.
+001072 GVN TECHNOLOGIES, INC.
+001073 TECHNOBOX, INC.
+001074 ATEN INTERNATIONAL CO., LTD.
+001075 Maxtor Corporation
+001076 EUREM GMBH
+001077 SAF DRIVE SYSTEMS, LTD.
+001078 NUERA COMMUNICATIONS, INC.
+001079 CISCO SYSTEMS, INC.
+00107A AMBICOM, INC.
+00107B CISCO SYSTEMS, INC.
+00107C P-COM, INC.
+00107D AURORA COMMUNICATIONS, LTD.
+00107E BACHMANN ELECTRONIC GMBH
+00107F CRESTRON ELECTRONICS, INC.
+001080 METAWAVE COMMUNICATIONS
+001081 DPS, INC.
+001082 JNA TELECOMMUNICATIONS LIMITED
+001083 HEWLETT-PACKARD COMPANY
+001084 K-BOT COMMUNICATIONS
+001085 POLARIS COMMUNICATIONS, INC.
+001086 ATTO TECHNOLOGY, INC.
+001087 Xstreamis PLC
+001088 AMERICAN NETWORKS INC.
+001089 WEBSONIC
+00108A TERALOGIC, INC.
+00108B LASERANIMATION SOLLINGER GMBH
+00108C FUJITSU TELECOMMUNICATIONS
+00108D JOHNSON CONTROLS, INC.
+00108E HUGH SYMONS CONCEPT
+00108F RAPTOR SYSTEMS
+001090 CIMETRICS, INC.
+001091 NO WIRES NEEDED BV
+001092 NETCORE INC.
+001093 CMS COMPUTERS, LTD.
+001094 ADTECH, INC.
+001095 THOMSON CONSUMER ELECTRONICS
+001096 TRACEWELL SYSTEMS, INC.
+001097 WINNET METROPOLITAN
+001098 STARNET TECHNOLOGIES, INC.
+001099 INNOMEDIA, INC.
+00109A NETLINE
+00109B VIXEL CORPORATION
+00109C M-SYSTEM CO., LTD.
+00109D CLARINET SYSTEMS, INC.
+00109E AWARE, INC.
+00109F PAVO, INC.
+0010A0 INNOVEX TECHNOLOGIES, INC.
+0010A1 KENDIN SEMICONDUCTOR, INC.
+0010A2 TNS
+0010A3 OMNITRONIX, INC.
+0010A4 XIRCOM
+0010A5 OXFORD INSTRUMENTS
+0010A6 CISCO SYSTEMS, INC.
+0010A7 UNEX TECHNOLOGY CORPORATION
+0010A8 RELIANCE COMPUTER CORP.
+0010A9 ADHOC TECHNOLOGIES
+0010AA MEDIA4, INC.
+0010AB KOITO INDUSTRIES, LTD.
+0010AC IMCI TECHNOLOGIES
+0010AD SOFTRONICS USB, INC.
+0010AE SHINKO ELECTRIC INDUSTRIES CO.
+0010AF TAC SYSTEMS, INC.
+0010B0 MERIDIAN TECHNOLOGY CORP.
+0010B1 FOR-A CO., LTD.
+0010B2 COACTIVE AESTHETICS
+0010B3 NOKIA MULTIMEDIA TERMINALS
+0010B4 ATMOSPHERE NETWORKS
+0010B5 ACCTON TECHNOLOGY CORPORATION
+0010B6 ENTRATA COMMUNICATIONS CORP.
+0010B7 COYOTE TECHNOLOGIES, LLC
+0010B8 ISHIGAKI COMPUTER SYSTEM CO.
+0010B9 MAXTOR CORP.
+0010BA MARTINHO-DAVIS SYSTEMS, INC.
+0010BB DATA & INFORMATION TECHNOLOGY
+0010BC Nortel Networks
+0010BD THE TELECOMMUNICATION
+0010BE TELEXIS CORP.
+0010BF INTER AIR WIRELESS
+0010C0 ARMA, INC.
+0010C1 OI ELECTRIC CO., LTD.
+0010C2 WILLNET, INC.
+0010C3 CSI-CONTROL SYSTEMS
+0010C4 MEDIA LINKS CO., LTD.
+0010C5 PROTOCOL TECHNOLOGIES, INC.
+0010C6 USI
+0010C7 DATA TRANSMISSION NETWORK
+0010C8 COMMUNICATIONS ELECTRONICS
+0010C9 MITSUBISHI ELECTRONICS
+0010CA INTEGRAL ACCESS
+0010CB FACIT K.K.
+0010CC CLP COMPUTER LOGISTIK
+0010CD INTERFACE CONCEPT
+0010CE VOLAMP, LTD.
+0010CF FIBERLANE COMMUNICATIONS
+0010D0 WITCOM, LTD.
+0010D1 Top Layer Networks, Inc.
+0010D2 NITTO TSUSHINKI CO., LTD
+0010D3 GRIPS ELECTRONIC GMBH
+0010D4 STORAGE COMPUTER CORPORATION
+0010D5 IMASDE CANARIAS, S.A.
+0010D6 ITT A/CD
+0010D7 ARGOSY RESEARCH INC.
+0010D8 CALISTA
+0010D9 IBM JAPAN, FUJISAWA MT+D
+0010DA MOTION ENGINEERING, INC.
+0010DB NETSCREEN TECHNOLOGIES, INC.
+0010DC MICRO-STAR INTERNATIONAL
+0010DD ENABLE SEMICONDUCTOR, INC.
+0010DE INTERNATIONAL DATACASTING
+0010DF RISE COMPUTER INC.
+0010E0 COBALT MICROSERVER, INC.
+0010E1 S.I. TECH, INC.
+0010E2 ARRAYCOMM, INC.
+0010E3 COMPAQ COMPUTER CORPORATION
+0010E4 NSI CORPORATION
+0010E5 SOLECTRON TEXAS
+0010E6 APPLIED INTELLIGENT
+0010E7 BREEZECOM
+0010E8 TELOCITY, INCORPORATED
+0010E9 RAIDTEC LTD.
+0010EA ADEPT TECHNOLOGY
+0010EB SELSIUS SYSTEMS, ILNC.
+0010EC RPCG, LLC
+0010ED SUNDANCE TECHNOLOGY, INC.
+0010EE CTI PRODUCTS, INC.
+0010EF DB NETWORKS, INC.
+0010F0 RITTAL-WERK RUDOLF LOH
+0010F1 I-O CORPORATION
+0010F2 ANTEC
+0010F3 NEXCOM INTERNATIONAL CO., LTD.
+0010F4 VERTICAL NETWORKS, INC.
+0010F5 AMHERST SYSTEMS, INC.
+0010F6 CISCO SYSTEMS, INC.
+0010F7 IRIICHI TECHNOLOGIES
+0010F8 KENWOOD TMI CORPORATION
+0010F9 UNIQUE SYSTEMS, INC.
+0010FA ZAYANTE, INC.
+0010FB ZIDA TECHNOLOGIES LIMITED
+0010FC BROADBAND NETWORKS, INC.
+0010FD COCOM A/S
+0010FE DIGITAL EQUIPMENT CORPORATION
+0010FF CISCO SYSTEMS, INC.
+001C7C PERQ SYSTEMS CORPORATION
+002000 LEXMARK INTERNATIONAL, INC.
+002001 DSP SOLUTIONS, INC.
+002002 SERITECH ENTERPRISE CO., LTD.
+002003 PIXEL POWER LTD.
+002004 YAMATAKE-HONEYWELL CO., LTD.
+002005 SIMPLE TECHNOLOGY
+002006 GARRETT COMMUNICATIONS, INC.
+002007 SFA, INC.
+002008 CABLE & COMPUTER TECHNOLOGY
+002009 PACKARD BELL ELEC., INC.
+00200A SOURCE-COMM CORP.
+00200B OCTAGON SYSTEMS CORP.
+00200C ADASTRA SYSTEMS CORP.
+00200D CARL ZEISS
+00200E SATELLITE TECHNOLOGY MGMT, INC
+00200F TANBAC CO., LTD.
+002010 JEOL SYSTEM TECHNOLOGY CO. LTD
+002011 CANOPUS CO., LTD.
+002012 CAMTRONICS MEDICAL SYSTEMS
+002013 DIVERSIFIED TECHNOLOGY, INC.
+002014 GLOBAL VIEW CO., LTD.
+002015 ACTIS COMPUTER SA
+002016 SHOWA ELECTRIC WIRE & CABLE CO
+002017 ORBOTECH
+002018 CIS TECHNOLOGY INC.
+002019 OHLER GMBH
+00201A N-BASE SWITCH COMMUNICATIONS
+00201B NORTHERN TELECOM/NETWORK
+00201C EXCEL, INC.
+00201D KATANA PRODUCTS
+00201E NETQUEST CORPORATION
+00201F BEST POWER TECHNOLOGY, INC.
+002020 MEGATRON COMPUTER INDUSTRIES
+002021 ALGORITHMS SOFTWARE PVT. LTD.
+002022 TEKNIQUE, INC.
+002023 T.C. TECHNOLOGIES PTY. LTD
+002024 PACIFIC COMMUNICATION SCIENCES
+002025 CONTROL TECHNOLOGY, INC.
+002026 AMKLY SYSTEMS, INC.
+002027 MING FORTUNE INDUSTRY CO., LTD
+002028 WEST EGG SYSTEMS, INC.
+002029 TELEPROCESSING PRODUCTS, INC.
+00202A N.V. DZINE
+00202B ADVANCED TELECOMMUNICATIONS
+00202C WELLTRONIX CO., LTD.
+00202D TAIYO CORPORATION
+00202E DAYSTAR DIGITAL
+00202F ZETA COMMUNICATIONS, LTD.
+002030 ANALOG & DIGITAL SYSTEMS
+002031 ERTEC GMBH
+002032 ALCATEL TAISEL
+002033 SYNAPSE TECHNOLOGIES, INC.
+002034 ROTEC INDUSTRIEAUTOMATION GMBH
+002035 IBM CORPORATION
+002036 BMC SOFTWARE
+002037 SEAGATE TECHNOLOGY
+002038 VME MICROSYSTEMS INTERNATIONAL
+002039 SCINETS
+00203A DIGITAL BI0METRICS INC.
+00203B WISDM LTD.
+00203C EUROTIME AB
+00203D NOVAR ELECTRONICS CORPORATION
+00203E LOGICAN TECHNOLOGIES, INC.
+00203F JUKI CORPORATION
+002040 Motorola Broadband Communications Sector
+002041 DATA NET
+002042 DATAMETRICS CORP.
+002043 NEURON COMPANY LIMITED
+002044 GENITECH PTY LTD
+002045 ION Networks, Inc.
+002046 CIPRICO, INC.
+002047 STEINBRECHER CORP.
+002048 Marconi Communications
+002049 COMTRON, INC.
+00204A PRONET GMBH
+00204B AUTOCOMPUTER CO., LTD.
+00204C MITRON COMPUTER PTE LTD.
+00204D INOVIS GMBH
+00204E NETWORK SECURITY SYSTEMS, INC.
+00204F DEUTSCHE AEROSPACE AG
+002050 KOREA COMPUTER INC.
+002051 PHOENIX DATA COMMUNUNICATIONS
+002052 RAGULA SYSTEMS
+002053 HUNTSVILLE MICROSYSTEMS, INC.
+002054 EASTERN RESEARCH, INC.
+002055 ALTECH CO., LTD.
+002056 NEOPRODUCTS
+002057 TITZE DATENTECHNIK GMBH
+002058 ALLIED SIGNAL INC.
+002059 MIRO COMPUTER PRODUCTS AG
+00205A COMPUTER IDENTICS
+00205B SKYLINE TECHNOLOGY
+00205C INTERNET SYSTEMS/ FLORIDA INC.
+00205D NANOMATIC OY
+00205E CASTLE ROCK, INC.
+00205F GAMMADATA COMPUTER GMBH
+002060 ALCATEL ITALIA S.P.A.
+002061 DYNATECH COMMUNICATIONS, INC.
+002062 SCORPION LOGIC, LTD.
+002063 WIPRO INFOTECH LTD.
+002064 PROTEC MICROSYSTEMS, INC.
+002065 SUPERNET NETWORKING INC.
+002066 GENERAL MAGIC, INC.
+002068 ISDYNE
+002069 ISDN SYSTEMS CORPORATION
+00206A OSAKA COMPUTER CORP.
+00206B MINOLTA CO., LTD.
+00206C EVERGREEN TECHNOLOGY CORP.
+00206D DATA RACE, INC.
+00206E XACT, INC.
+00206F FLOWPOINT CORPORATION
+002070 HYNET, LTD.
+002071 IBR GMBH
+002072 WORKLINK INNOVATIONS
+002073 FUSION SYSTEMS CORPORATION
+002074 SUNGWOON SYSTEMS
+002075 MOTOROLA COMMUNICATION ISRAEL
+002076 REUDO CORPORATION
+002077 KARDIOS SYSTEMS CORP.
+002078 RUNTOP, INC.
+002079 MIKRON GMBH
+00207A WISE COMMUNICATIONS, INC.
+00207B LEVEL ONE COMMUNICATIONS
+00207C AUTEC GMBH
+00207D ADVANCED COMPUTER APPLICATIONS
+00207E FINECOM CO., LTD.
+00207F KYOEI SANGYO CO., LTD.
+002080 SYNERGY (UK) LTD.
+002081 TITAN ELECTRONICS
+002082 ONEAC CORPORATION
+002083 PRESTICOM INCORPORATED
+002084 OCE PRINTING SYSTEMS, GMBH
+002085 EXIDE ELECTRONICS
+002086 MICROTECH ELECTRONICS LIMITED
+002087 MEMOTEC COMMUNICATIONS CORP.
+002088 GLOBAL VILLAGE COMMUNICATION
+002089 T3PLUS NETWORKING, INC.
+00208A SONIX COMMUNICATIONS, LTD.
+00208B LAPIS TECHNOLOGIES, INC.
+00208C GALAXY NETWORKS, INC.
+00208D CMD TECHNOLOGY
+00208E CHEVIN SOFTWARE ENG. LTD.
+00208F ECI TELECOM LTD.
+002090 ADVANCED COMPRESSION
+002091 J125, NATIONAL SECURITY AGENCY
+002092 CHESS ENGINEERING B.V.
+002093 LANDINGS TECHNOLOGY CORP.
+002094 CUBIX CORPORATION
+002095 RIVA ELECTRONICS
+002096 SIEBE ENVIRONMENTAL CONTROLS
+002097 APPLIED SIGNAL TECHNOLOGY
+002098 HECTRONIC AB
+002099 BON ELECTRIC CO., LTD.
+00209A THE 3DO COMPANY
+00209B ERSAT ELECTRONIC GMBH
+00209C PRIMARY ACCESS CORP.
+00209D LIPPERT AUTOMATIONSTECHNIK
+00209E BROWN'S OPERATING SYSTEM
+00209F MERCURY COMPUTER SYSTEMS, INC.
+0020A0 OA LABORATORY CO., LTD.
+0020A1 DOVATRON
+0020A2 GALCOM NETWORKING LTD.
+0020A3 DIVICOM INC.
+0020A4 MULTIPOINT NETWORKS
+0020A5 API ENGINEERING
+0020A6 PROXIM, INC.
+0020A7 PAIRGAIN TECHNOLOGIES, INC.
+0020A8 SAST TECHNOLOGY CORP.
+0020A9 WHITE HORSE INDUSTRIAL
+0020AA DIGIMEDIA VISION LTD.
+0020AB MICRO INDUSTRIES CORP.
+0020AC INTERFLEX DATENSYSTEME GMBH
+0020AD LINQ SYSTEMS
+0020AE ORNET DATA COMMUNICATION TECH.
+0020AF 3COM CORPORATION
+0020B0 GATEWAY DEVICES, INC.
+0020B1 COMTECH RESEARCH INC.
+0020B2 GKD GESELLSCHAFT FUR
+0020B3 SCLTEC COMMUNICATIONS SYSTEMS
+0020B4 TERMA ELEKTRONIK AS
+0020B5 YASKAWA ELECTRIC CORPORATION
+0020B6 AGILE NETWORKS, INC.
+0020B7 NAMAQUA COMPUTERWARE
+0020B8 PRIME OPTION, INC.
+0020B9 METRICOM, INC.
+0020BA CENTER FOR HIGH PERFORMANCE
+0020BB ZAX CORPORATION
+0020BC JTEC PTY LTD.
+0020BD NIOBRARA R & D CORPORATION
+0020BE LAN ACCESS CORP.
+0020BF AEHR TEST SYSTEMS
+0020C0 PULSE ELECTRONICS, INC.
+0020C1 TAIKO ELECTRIC WORKS, LTD.
+0020C2 TEXAS MEMORY SYSTEMS, INC.
+0020C3 COUNTER SOLUTIONS LTD.
+0020C4 INET,INC.
+0020C5 EAGLE TECHNOLOGY
+0020C6 NECTEC
+0020C7 AKAI Professional M.I. Corp.
+0020C8 LARSCOM INCORPORATED
+0020C9 VICTRON BV
+0020CA DIGITAL OCEAN
+0020CB PRETEC ELECTRONICS CORP.
+0020CC DIGITAL SERVICES, LTD.
+0020CD HYBRID NETWORKS, INC.
+0020CE LOGICAL DESIGN GROUP, INC.
+0020CF TEST & MEASUREMENT SYSTEMS INC
+0020D0 VERSALYNX CORPORATION
+0020D1 MICROCOMPUTER SYSTEMS (M) SDN.
+0020D2 RAD DATA COMMUNICATIONS, LTD.
+0020D3 OST (OUEST STANDARD TELEMATIQU
+0020D4 CABLETRON - ZEITTNET INC.
+0020D5 VIPA GMBH
+0020D6 BREEZECOM
+0020D7 JAPAN MINICOMPUTER SYSTEMS CO.
+0020D8 NETWAVE TECHNOLOGIES, INC.
+0020D9 PANASONIC TECHNOLOGIES, INC./
+0020DA XYLAN CORPORATION
+0020DB XNET TECHNOLOGY, INC.
+0020DC DENSITRON TAIWAN LTD.
+0020DD AWA LTD.
+0020DE JAPAN DIGITAL LABORAT'Y CO.LTD
+0020DF KYOSAN ELECTRIC MFG. CO., LTD.
+0020E0 PREMAX ELECTRONICS, INC.
+0020E1 ALAMAR ELECTRONICS
+0020E2 INFORMATION RESOURCE
+0020E3 MCD KENCOM CORPORATION
+0020E4 HSING TECH ENTERPRISE CO., LTD
+0020E5 APEX DATA, INC.
+0020E6 LIDKOPING MACHINE TOOLS AB
+0020E7 B&W NUCLEAR SERVICE COMPANY
+0020E8 DATATREK CORPORATION
+0020E9 DANTEL
+0020EA EFFICIENT NETWORKS, INC.
+0020EB CINCINNATI MICROWAVE, INC.
+0020EC TECHWARE SYSTEMS CORP.
+0020ED GIGA-BYTE TECHNOLOGY CO., LTD.
+0020EE GTECH CORPORATION
+0020EF USC CORPORATION
+0020F0 UNIVERSAL MICROELECTRONICS CO.
+0020F1 ALTOS INDIA LIMITED
+0020F2 SUN MICROSYSTEMS, INC.
+0020F3 RAYNET CORPORATION
+0020F4 SPECTRIX CORPORATION
+0020F5 PANDATEL AG
+0020F6 NET TEK  AND KARLNET, INC.
+0020F7 CYBERDATA
+0020F8 CARRERA COMPUTERS, INC.
+0020F9 PARALINK NETWORKS, INC.
+0020FA GDE SYSTEMS, INC.
+0020FB OCTEL COMMUNICATIONS CORP.
+0020FC MATROX
+0020FD ITV TECHNOLOGIES, INC.
+0020FE TOPWARE INC. / GRAND COMPUTER
+0020FF SYMMETRICAL TECHNOLOGIES
+003000 ALLWELL TECHNOLOGY CORP.
+003001 SMP
+003002 Expand Networks
+003003 Phasys Ltd.
+003004 LEADTEK RESEARCH INC.
+003005 Fujitsu Siemens Computers
+003006 SUPERPOWER COMPUTER
+003007 OPTI, INC.
+003008 AVIO DIGITAL, INC.
+003009 Tachion Networks, Inc.
+00300A AZTECH SYSTEMS LTD.
+00300B mPHASE Technologies, Inc.
+00300C CONGRUENCY, LTD.
+00300D MMC Technology, Inc.
+00300E Klotz Digital AG
+00300F IMT - Information Management T
+003010 VISIONETICS INTERNATIONAL
+003011 HMS FIELDBUS SYSTEMS AB
+003012 DIGITAL ENGINEERING LTD.
+003013 NEC Corporation
+003014 DIVIO, INC.
+003015 CP CLARE CORP.
+003016 ISHIDA CO., LTD.
+003017 TERASTACK LTD.
+003018 Jetway Information Co., Ltd.
+003019 CISCO SYSTEMS, INC.
+00301A SMARTBRIDGES PTE. LTD.
+00301B SHUTTLE, INC.
+00301C ALTVATER AIRDATA SYSTEMS
+00301D SKYSTREAM, INC.
+00301E 3COM Europe Ltd.
+00301F OPTICAL NETWORKS, INC.
+003020 TSI, Inc..
+003021 HSING TECH. ENTERPRISE CO.,LTD
+003022 Fong Kai Industrial Co., Ltd.
+003023 COGENT COMPUTER SYSTEMS, INC.
+003024 CISCO SYSTEMS, INC.
+003025 CHECKOUT COMPUTER SYSTEMS, LTD
+003026 HEITEL
+003027 KERBANGO, INC.
+003028 FASE Saldatura srl
+003029 OPICOM
+00302A SOUTHERN INFORMATION
+00302B INALP NETWORKS, INC.
+00302C SYLANTRO SYSTEMS CORPORATION
+00302D QUANTUM BRIDGE COMMUNICATIONS
+00302E Hoft & Wessel AG
+00302F Smiths Industries
+003030 HARMONIX CORPORATION
+003031 LIGHTWAVE COMMUNICATIONS, INC.
+003032 MAGICRAM, INC.
+003033 ORIENT TELECOM CO., LTD.
+003036 RMP ELEKTRONIKSYSTEME GMBH
+003037 Packard Bell Nec Services
+003038 XCP, INC.
+003039 SOFTBOOK PRESS
+00303A MAATEL
+00303B PowerCom Technology
+00303C ONNTO CORP.
+00303D IVA CORPORATION
+00303E Radcom Ltd.
+00303F TurboComm Tech Inc.
+003040 CISCO SYSTEMS, INC.
+003041 SAEJIN T & M CO., LTD.
+003042 DeTeWe-Deutsche Telephonwerke
+003043 IDREAM TECHNOLOGIES, PTE. LTD.
+003044 Portsmith LLC
+003045 Village Networks, Inc. (VNI)
+003046 Controlled Electronic Manageme
+003047 NISSEI ELECTRIC CO., LTD.
+003048 Supermicro Computer, Inc.
+003049 BRYANT TECHNOLOGY, LTD.
+00304A FRAUNHOFER INSTITUTE IMS
+00304B ORBACOM SYSTEMS, INC.
+00304C APPIAN COMMUNICATIONS, INC.
+00304D ESI
+00304E BUSTEC PRODUCTION LTD.
+00304F PLANET Technology Corporation
+003050 Versa Technology
+003051 ORBIT AVIONIC & COMMUNICATION
+003052 ELASTIC NETWORKS
+003053 Basler AG
+003054 CASTLENET TECHNOLOGY, INC.
+003055 Hitachi Semiconductor America,
+003056 Beck IPC GmbH
+003057 E-Tel Corporation
+003058 API MOTION
+003059 DIGITAL-LOGIC AG
+00305A TELGEN CORPORATION
+00305B MODULE DEPARTMENT
+00305C SMAR Laboratories Corp.
+00305D DIGITRA SYSTEMS, INC.
+00305E Abelko Innovation
+00305F IMACON APS
+003060 STARMATIX, INC.
+003061 MobyTEL
+003062 PATH 1 NETWORK TECHNOL'S INC.
+003063 SANTERA SYSTEMS, INC.
+003064 ADLINK TECHNOLOGY, INC.
+003065 APPLE COMPUTER, INC.
+003066 DIGITAL WIRELESS CORPORATION
+003067 BIOSTAR MICROTECH INT'L CORP.
+003068 CYBERNETICS TECH. CO., LTD.
+003069 IMPACCT TECHNOLOGY CORP.
+00306A PENTA MEDIA CO., LTD.
+00306B CMOS SYSTEMS, INC.
+00306C Hitex Holding GmbH
+00306D LUCENT TECHNOLOGIES
+00306E HEWLETT PACKARD
+00306F SEYEON TECH. CO., LTD.
+003070 1Net Corporation
+003071 Cisco Systems, Inc.
+003072 INTELLIBYTE INC.
+003073 International Microsystems, In
+003074 EQUIINET LTD.
+003075 ADTECH
+003076 Akamba Corporation
+003077 ONPREM NETWORKS
+003078 Cisco Systems, Inc.
+003079 CQOS, INC.
+00307A Advanced Technology & Systems
+00307B Cisco Systems, Inc.
+00307C ADID SA
+00307D GRE AMERICA, INC.
+00307E Redflex Communication Systems
+00307F IRLAN LTD.
+003080 CISCO SYSTEMS, INC.
+003081 ALTOS C&C
+003082 TAIHAN ELECTRIC WIRE CO., LTD.
+003083 Ivron Systems
+003084 ALLIED TELESYN INTERNAIONAL
+003085 CISCO SYSTEMS, INC.
+003086 Transistor Devices, Inc.
+003087 VEGA GRIESHABER KG
+003088 Siara Systems, Inc.
+003089 Spectrapoint Wireless, LLC
+00308A NICOTRA SISTEMI S.P.A
+00308B Brix Networks
+00308C ADVANCED DIGITAL INFORMATION
+00308D PINNACLE SYSTEMS, INC.
+00308E CROSS MATCH TECHNOLOGIES, INC.
+00308F MICRILOR, Inc.
+003090 CYRA TECHNOLOGIES, INC.
+003091 TAIWAN FIRST LINE ELEC. CORP.
+003092 ModuNORM GmbH
+003093 SONNET TECHNOLOGIES, INC.
+003094 Cisco Systems, Inc.
+003095 Procomp Informatics, Ltd.
+003096 CISCO SYSTEMS, INC.
+003097 EXOMATIC AB
+003098 Global Converging Technologies
+003099 BOENIG UND KALLENBACH OHG
+00309A ASTRO TERRA CORP.
+00309B Smartware
+00309C Timing Applications, Inc.
+00309D Nimble Microsystems, Inc.
+00309E WORKBIT CORPORATION.
+00309F AMBER NETWORKS
+0030A0 TYCO SUBMARINE SYSTEMS, LTD.
+0030A1 OPTI TECH CO., LTD.
+0030A2 Lightner Engineering
+0030A3 CISCO SYSTEMS, INC.
+0030A4 Woodwind Communications System
+0030A5 ACTIVE POWER
+0030A6 VIANET TECHNOLOGIES, LTD.
+0030A7 SCHWEITZER ENGINEERING
+0030A8 OL'E COMMUNICATIONS, INC.
+0030A9 Netiverse, Inc.
+0030AA AXUS MICROSYSTEMS, INC.
+0030AB DELTA NETWORKS, INC.
+0030AC Systeme Lauer GmbH & Co., Ltd.
+0030AD SHANGHAI COMMUNICATION
+0030AE Times N System, Inc.
+0030AF Honeywell Reqelsysteme GmbH
+0030B0 Convergenet Technologies
+0030B1 GOC GESELLSCHAFT FUR OPTISCHE
+0030B2 WESCAM - HEALDSBURG
+0030B3 San Valley Systems, Inc.
+0030B4 INTERSIL CORP.
+0030B5 Tadiran Microwave Networks
+0030B6 CISCO SYSTEMS, INC.
+0030B7 Teletrol Systems, Inc.
+0030B8 RiverDelta Networks
+0030B9 ECTEL
+0030BA AC&T SYSTEM CO., LTD.
+0030BB CacheFlow, Inc.
+0030BC Optronic AG
+0030BD BELKIN COMPONENTS
+0030BE City-Net Technology, Inc.
+0030BF MULTIDATA GMBH
+0030C0 Lara Technology, Inc.
+0030C1 HEWLETT-PACKARD
+0030C2 COMONE
+0030C3 FLUECKIGER ELEKTRONIK AG
+0030C4 Niigata Canotec Co., Inc.
+0030C5 CADENCE DESIGN SYSTEMS
+0030C6 CONTROL SOLUTIONS, INC.
+0030C7 MACROMATE CORP.
+0030C8 GAD LINE, LTD.
+0030C9 LuxN, N
+0030CA Discovery Com
+0030CB OMNI FLOW COMPUTERS, INC.
+0030CC Tenor Networks, Inc.
+0030CD CONEXANT SYSTEMS, INC.
+0030CE Zaffire
+0030CF TWO TECHNOLOGIES, INC.
+0030D1 INOVA CORPORATION
+0030D2 WIN TECHNOLOGIES, CO., LTD.
+0030D3 Agilent Technologies
+0030D4 COMTIER
+0030D5 DResearch GmbH
+0030D6 MSC VERTRIEBS GMBH
+0030D7 Innovative Systems, L.L.C.
+0030D8 SITEK
+0030D9 DATACORE SOFTWARE CORP.
+0030DA COMTREND CO.
+0030DB Mindready Solutions, Inc.
+0030DC RIGHTECH CORPORATION
+0030DD INDIGITA CORPORATION
+0030DE WAGO Kontakttechnik GmbH
+0030DF KB/TEL TELECOMUNICACIONES
+0030E0 OXFORD SEMICONDUCTOR LTD.
+0030E1 ACROTRON SYSTEMS, INC.
+0030E2 GARNET SYSTEMS CO., LTD.
+0030E3 SEDONA NETWORKS CORP.
+0030E4 CHIYODA SYSTEM RIKEN
+0030E5 Amper Datos S.A.
+0030E6 SIEMENS MEDICAL SYSTEMS
+0030E7 CNF MOBILE SOLUTIONS, INC.
+0030E8 ENSIM CORP.
+0030E9 GMA COMMUNICATION MANUFACT'G
+0030EA TeraForce Technology Corporation
+0030EB TURBONET COMMUNICATIONS, INC.
+0030EC BORGARDT
+0030ED Expert Magnetics Corp.
+0030EE DSG Technology, Inc.
+0030EF NEON TECHNOLOGY, INC.
+0030F0 Uniform Industrial Corp.
+0030F1 Accton Technology Corp.
+0030F2 CISCO SYSTEMS, INC.
+0030F3 At Work Computers
+0030F4 STARDOT TECHNOLOGIES
+0030F5 Wild Lab. Ltd.
+0030F6 SECURELOGIX CORPORATION
+0030F7 RAMIX INC.
+0030F8 Dynapro Systems, Inc.
+0030F9 Sollae Systems Co., Ltd.
+0030FA TELICA, INC.
+0030FB AZS Technology AG
+0030FC Terawave Communications, Inc.
+0030FD INTEGRATED SYSTEMS DESIGN
+0030FE DSA GmbH
+0030FF DATAFAB SYSTEMS, INC.
+004000 PCI COMPONENTES DA AMZONIA LTD
+004001 ZYXEL COMMUNICATIONS, INC.
+004002 PERLE SYSTEMS LIMITED
+004003 WESTINGHOUSE PROCESS CONTROL
+004004 ICM CO. LTD.
+004005 ANI COMMUNICATIONS INC.
+004006 SAMPO TECHNOLOGY CORPORATION
+004007 TELMAT INFORMATIQUE
+004008 A PLUS INFO CORPORATION
+004009 TACHIBANA TECTRON CO., LTD.
+00400A PIVOTAL TECHNOLOGIES, INC.
+00400B CISCO SYSTEMS, INC.
+00400C GENERAL MICRO SYSTEMS, INC.
+00400D LANNET DATA COMMUNICATIONS,LTD
+00400E MEMOTEC COMMUNICATIONS, INC.
+00400F DATACOM TECHNOLOGIES
+004010 SONIC SYSTEMS, INC.
+004011 ANDOVER CONTROLS CORPORATION
+004012 WINDATA, INC.
+004013 NTT DATA COMM. SYSTEMS CORP.
+004014 COMSOFT GMBH
+004015 ASCOM INFRASYS AG
+004016 HADAX ELECTRONICS, INC.
+004017 XCD INC.
+004018 ADOBE SYSTEMS, INC.
+004019 AEON SYSTEMS, INC.
+00401A FUJI ELECTRIC CO., LTD.
+00401B PRINTER SYSTEMS CORP.
+00401C AST RESEARCH, INC.
+00401D INVISIBLE SOFTWARE, INC.
+00401E ICC
+00401F COLORGRAPH LTD
+004020 PINACL COMMUNICATION
+004021 RASTER GRAPHICS
+004022 KLEVER COMPUTERS, INC.
+004023 LOGIC CORPORATION
+004024 COMPAC INC.
+004025 MOLECULAR DYNAMICS
+004026 MELCO, INC.
+004027 SMC MASSACHUSETTS, INC.
+004028 NETCOMM LIMITED
+004029 COMPEX
+00402A CANOGA-PERKINS
+00402B TRIGEM COMPUTER, INC.
+00402C ISIS DISTRIBUTED SYSTEMS, INC.
+00402D HARRIS ADACOM CORPORATION
+00402E PRECISION SOFTWARE, INC.
+00402F XLNT DESIGNS INC.
+004030 GK COMPUTER
+004031 KOKUSAI ELECTRIC CO., LTD
+004032 DIGITAL COMMUNICATIONS
+004033 ADDTRON TECHNOLOGY CO., LTD.
+004034 BUSTEK CORPORATION
+004035 OPCOM
+004036 TRIBE COMPUTER WORKS, INC.
+004037 SEA-ILAN, INC.
+004038 TALENT ELECTRIC INCORPORATED
+004039 OPTEC DAIICHI DENKO CO., LTD.
+00403A IMPACT TECHNOLOGIES
+00403B SYNERJET INTERNATIONAL CORP.
+00403C FORKS, INC.
+00403D TERADATA
+00403E RASTER OPS CORPORATION
+00403F SSANGYONG COMPUTER SYSTEMS
+004040 RING ACCESS, INC.
+004041 FUJIKURA LTD.
+004042 N.A.T. GMBH
+004043 NOKIA TELECOMMUNICATIONS
+004044 QNIX COMPUTER CO., LTD.
+004045 TWINHEAD CORPORATION
+004046 UDC RESEARCH LIMITED
+004047 WIND RIVER SYSTEMS
+004048 SMD INFORMATICA S.A.
+004049 TEGIMENTA AG
+00404A WEST AUSTRALIAN DEPARTMENT
+00404B MAPLE COMPUTER SYSTEMS
+00404C HYPERTEC PTY LTD.
+00404D TELECOMMUNICATIONS TECHNIQUES
+00404E FLUENT, INC.
+00404F SPACE & NAVAL WARFARE SYSTEMS
+004050 IRONICS, INCORPORATED
+004051 GRACILIS, INC.
+004052 STAR TECHNOLOGIES, INC.
+004053 AMPRO COMPUTERS
+004054 CONNECTION MACHINES SERVICES
+004055 METRONIX GMBH
+004056 MCM JAPAN LTD.
+004057 LOCKHEED - SANDERS
+004058 KRONOS, INC.
+004059 YOSHIDA KOGYO K. K.
+00405A GOLDSTAR INFORMATION & COMM.
+00405B FUNASSET LIMITED
+00405C FUTURE SYSTEMS, INC.
+00405D STAR-TEK, INC.
+00405E NORTH HILLS ISRAEL
+00405F AFE COMPUTERS LTD.
+004060 COMENDEC LTD
+004061 DATATECH ENTERPRISES CO., LTD.
+004062 E-SYSTEMS, INC./GARLAND DIV.
+004063 VIA TECHNOLOGIES, INC.
+004064 KLA INSTRUMENTS CORPORATION
+004065 GTE SPACENET
+004066 HITACHI CABLE, LTD.
+004067 OMNIBYTE CORPORATION
+004068 EXTENDED SYSTEMS
+004069 LEMCOM SYSTEMS, INC.
+00406A KENTEK INFORMATION SYSTEMS,INC
+00406B SYSGEN
+00406C COPERNIQUE
+00406D LANCO, INC.
+00406E COROLLARY, INC.
+00406F SYNC RESEARCH INC.
+004070 INTERWARE CO., LTD.
+004071 ATM COMPUTER GMBH
+004072 APPLIED INNOVATION, INC.
+004073 BASS ASSOCIATES
+004074 CABLE AND WIRELESS
+004075 M-TRADE (UK) LTD
+004076 Sun Conversion Technologies
+004077 MAXTON TECHNOLOGY CORPORATION
+004078 WEARNES AUTOMATION PTE LTD
+004079 JUKO MANUFACTURE COMPANY, LTD.
+00407A SOCIETE D'EXPLOITATION DU CNIT
+00407B SCIENTIFIC ATLANTA
+00407C QUME CORPORATION
+00407D EXTENSION TECHNOLOGY CORP.
+00407E EVERGREEN SYSTEMS, INC.
+00407F AGEMA INFRARED SYSTEMS AB
+004080 ATHENIX CORPORATION
+004081 MANNESMANN SCANGRAPHIC GMBH
+004082 LABORATORY EQUIPMENT CORP.
+004083 TDA INDUSTRIA DE PRODUTOS
+004084 HONEYWELL INC.
+004085 SAAB INSTRUMENTS AB
+004086 MICHELS & KLEBERHOFF COMPUTER
+004087 UBITREX CORPORATION
+004088 MOBIUS TECHNOLOGIES, INC.
+004089 MEIDENSHA CORPORATION
+00408A TPS TELEPROCESSING SYS. GMBH
+00408B RAYLAN CORPORATION
+00408C AXIS COMMUNICATIONS AB
+00408D THE GOODYEAR TIRE & RUBBER CO.
+00408E DIGILOG, INC.
+00408F WM-DATA MINFO AB
+004090 ANSEL COMMUNICATIONS
+004091 PROCOMP INDUSTRIA ELETRONICA
+004092 ASP COMPUTER PRODUCTS, INC.
+004093 PAXDATA NETWORKS LTD.
+004094 SHOGRAPHICS, INC.
+004095 R.P.T. INTERGROUPS INT'L LTD.
+004096 Aironet Wireless Communication
+004097 DATEX DIVISION OF
+004098 DRESSLER GMBH & CO.
+004099 NEWGEN SYSTEMS CORP.
+00409A NETWORK EXPRESS, INC.
+00409B HAL COMPUTER SYSTEMS INC.
+00409C TRANSWARE
+00409D DIGIBOARD, INC.
+00409E CONCURRENT TECHNOLOGIES  LTD.
+00409F LANCAST/CASAT TECHNOLOGY, INC.
+0040A0 GOLDSTAR CO., LTD.
+0040A1 ERGO COMPUTING
+0040A2 KINGSTAR TECHNOLOGY INC.
+0040A3 MICROUNITY SYSTEMS ENGINEERING
+0040A4 ROSE ELECTRONICS
+0040A5 CLINICOMP INTL.
+0040A6 Cray, Inc.
+0040A7 ITAUTEC PHILCO S.A.
+0040A8 IMF INTERNATIONAL LTD.
+0040A9 DATACOM INC.
+0040AA VALMET AUTOMATION INC.
+0040AB ROLAND DG CORPORATION
+0040AC SUPER WORKSTATION, INC.
+0040AD SMA REGELSYSTEME GMBH
+0040AE DELTA CONTROLS, INC.
+0040AF DIGITAL PRODUCTS, INC.
+0040B0 BYTEX CORPORATION, ENGINEERING
+0040B1 CODONICS INC.
+0040B2 SYSTEMFORSCHUNG
+0040B3 PAR MICROSYSTEMS CORPORATION
+0040B4 NEXTCOM K.K.
+0040B5 VIDEO TECHNOLOGY COMPUTERS LTD
+0040B6 COMPUTERM  CORPORATION
+0040B7 STEALTH COMPUTER SYSTEMS
+0040B8 IDEA ASSOCIATES
+0040B9 MACQ ELECTRONIQUE SA
+0040BA ALLIANT COMPUTER SYSTEMS CORP.
+0040BB GOLDSTAR CABLE CO., LTD.
+0040BC ALGORITHMICS LTD.
+0040BD STARLIGHT NETWORKS, INC.
+0040BE BOEING DEFENSE & SPACE
+0040BF CHANNEL SYSTEMS INTERN'L INC.
+0040C0 VISTA CONTROLS CORPORATION
+0040C1 BIZERBA-WERKE WILHEIM KRAUT
+0040C2 APPLIED COMPUTING DEVICES
+0040C3 FISCHER AND PORTER CO.
+0040C4 KINKEI SYSTEM CORPORATION
+0040C5 MICOM COMMUNICATIONS INC.
+0040C6 FIBERNET RESEARCH, INC.
+0040C7 RUBY TECH CORPORATION
+0040C8 MILAN TECHNOLOGY CORPORATION
+0040C9 NCUBE
+0040CA FIRST INTERNAT'L COMPUTER, INC
+0040CB LANWAN TECHNOLOGIES
+0040CC SILCOM MANUF'G TECHNOLOGY INC.
+0040CD TERA MICROSYSTEMS, INC.
+0040CE NET-SOURCE, INC.
+0040CF STRAWBERRY TREE, INC.
+0040D0 MITAC INTERNATIONAL CORP.
+0040D1 FUKUDA DENSHI CO., LTD.
+0040D2 PAGINE CORPORATION
+0040D3 KIMPSION INTERNATIONAL CORP.
+0040D4 GAGE TALKER CORP.
+0040D5 SARTORIUS AG
+0040D6 LOCAMATION B.V.
+0040D7 STUDIO GEN INC.
+0040D8 OCEAN OFFICE AUTOMATION LTD.
+0040D9 AMERICAN MEGATRENDS INC.
+0040DA TELSPEC LTD
+0040DB ADVANCED TECHNICAL SOLUTIONS
+0040DC TRITEC ELECTRONIC GMBH
+0040DD HONG TECHNOLOGIES
+0040DE ELETTRONICA SAN GIORGIO
+0040DF DIGALOG SYSTEMS, INC.
+0040E0 ATOMWIDE LTD.
+0040E1 MARNER INTERNATIONAL, INC.
+0040E2 MESA RIDGE TECHNOLOGIES, INC.
+0040E3 QUIN SYSTEMS LTD
+0040E4 E-M TECHNOLOGY, INC.
+0040E5 SYBUS CORPORATION
+0040E6 C.A.E.N.
+0040E7 ARNOS INSTRUMENTS & COMPUTER
+0040E8 CHARLES RIVER DATA SYSTEMS,INC
+0040E9 ACCORD SYSTEMS, INC.
+0040EA PLAIN TREE SYSTEMS INC
+0040EB MARTIN MARIETTA CORPORATION
+0040EC MIKASA SYSTEM ENGINEERING
+0040ED NETWORK CONTROLS INT'NATL INC.
+0040EE OPTIMEM
+0040EF HYPERCOM, INC.
+0040F0 MICRO SYSTEMS, INC.
+0040F1 CHUO ELECTRONICS CO., LTD.
+0040F2 JANICH & KLASS COMPUTERTECHNIK
+0040F3 NETCOR
+0040F4 CAMEO COMMUNICATIONS, INC.
+0040F5 OEM ENGINES
+0040F6 KATRON COMPUTERS INC.
+0040F7 POLAROID MEDICAL IMAGING SYS.
+0040F8 SYSTEMHAUS DISCOM
+0040F9 COMBINET
+0040FA MICROBOARDS, INC.
+0040FB CASCADE COMMUNICATIONS CORP.
+0040FC IBR COMPUTER TECHNIK GMBH
+0040FD LXE
+0040FE SYMPLEX COMMUNICATIONS
+0040FF TELEBIT CORPORATION
+005000 NEXO COMMUNICATIONS, INC.
+005001 YAMASHITA SYSTEMS CORP.
+005002 OMNISEC AG
+005003 GRETAG MACBETH AG
+005004 3COM CORPORATION
+005006 TAC AB
+005007 SIEMENS TELECOMMUNICATION
+005008 TIVA MICROCOMPUTER CORP. (TMC)
+005009 PHILIPS BROADBAND NETWORKS
+00500A IRIS TECHNOLOGIES, INC.
+00500B CISCO SYSTEMS, INC.
+00500C ETEK LABS, INC.
+00500D SATORI ELECTORIC CO., LTD.
+00500E CHROMATIS NETWORKS,INC.
+00500F CISCO SYSTEMS, INC.
+005010 NOVANET LEARNING, INC.
+005012 CBL - GMBH
+005013 Chaparral Technologies, Inc.
+005014 CISCO SYSTEMS, INC.
+005015 BRIGHT STAR ENGINEERING
+005016 SST/WOODHEAD INDUSTRIES
+005017 RSR S.R.L.
+005018 ADVANCED MULTIMEDIA INTERNET
+005019 SPRING TIDE NETWORKS, INC.
+00501A UISIQN
+00501B ABL CANADA, INC.
+00501C JATOM SYSTEMS, INC.
+00501E MIRANDA TECHNOLOGIES, INC.
+00501F MRG SYSTEMS, LTD.
+005020 MEDIASTAR CO., LTD.
+005021 EIS INTERNATIONAL, INC.
+005022 ZONET TECHNOLOGY, INC.
+005023 PG DESIGN ELECTRONICS, INC.
+005024 NAVIC SYSTEMS, INC.
+005026 COSYSTEMS, INC.
+005027 GENICOM CORPORATION
+005028 AVAL COMMUNICATIONS
+005029 1394 PRINTER WORKING GROUP
+00502A CISCO SYSTEMS, INC.
+00502B GENRAD LTD.
+00502C SOYO COMPUTER, INC.
+00502D ACCEL, INC.
+00502E CAMBEX CORPORATION
+00502F TOLLBRIDGE TECHNOLOGIES, INC.
+005030 FUTURE PLUS SYSTEMS
+005031 AEROFLEX LABORATORIES, INC.
+005032 PICAZO COMMUNICATIONS, INC.
+005033 MAYAN NETWORKS
+005036 NETCAM, LTD.
+005037 KOGA ELECTRONICS CO.
+005038 DAIN TELECOM CO., LTD.
+005039 MARINER NETWORKS
+00503A DATONG ELECTRONICS LTD.
+00503B MEDIAFIRE CORPORATION
+00503C TSINGHUA NOVEL ELECTRONICS
+00503E CISCO SYSTEMS, INC.
+00503F ANCHOR GAMES
+005040 EMWARE, INC.
+005041 CTX OPTO ELECTRONIC CORP.
+005042 SCI MANUFACTURING
+005043 MARVELL SEMICONDUCTOR, INC.
+005044 ASACA CORPORATION
+005045 RIOWORKS SOLUTIONS, INC.
+005046 MENICX INTERNATIONAL CO., LTD.
+005048 INFOLIBRIA
+005049 ELLACOYA NETWORKS, INC.
+00504A ELTECO A.S.
+00504B BARCONET N.V.
+00504C GALIL MOTION CONTROL, INC.
+00504D TOKYO ELECTRON DEVICE LTD.
+00504E SIERRA MONITOR CORP.
+00504F OLENCOM ELECTRONICS
+005050 CISCO SYSTEMS, INC.
+005051 IWATSU ELECTRIC CO., LTD.
+005052 TIARA NETWORKS, INC.
+005053 CISCO SYSTEMS, INC.
+005054 CISCO SYSTEMS, INC.
+005055 DOMS A/S
+005056 VMWARE, INC.
+005057 BROADBAND ACCESS SYSTEMS
+005058 VEGASTREAM LIMITED
+005059 SUITE TECHNOLOGY SYSTEMS
+00505A NETWORK ALCHEMY, INC.
+00505B KAWASAKI LSI U.S.A., INC.
+00505C TUNDO CORPORATION
+00505E DIGITEK MICROLOGIC S.A.
+00505F BRAND INNOVATORS
+005060 TANDBERG TELECOM AS
+005062 KOUWELL ELECTRONICS CORP.  **
+005063 OY COMSEL SYSTEM AB
+005064 CAE ELECTRONICS
+005065 DENSEI-LAMBAD Co., Ltd.
+005066 ATECOM GMBH ADVANCED
+005067 AEROCOMM, INC.
+005068 ELECTRONIC INDUSTRIES
+005069 PIXSTREAM INCORPORATED
+00506A EDEVA, INC.
+00506B SPX-ATEG
+00506C G & L BEIJER ELECTRONICS AB
+00506D VIDEOJET SYSTEMS
+00506E CORDER ENGINEERING CORPORATION
+00506F G-CONNECT
+005070 CHAINTECH COMPUTER CO., LTD.
+005071 AIWA CO., LTD.
+005072 CORVIS CORPORATION
+005073 CISCO SYSTEMS, INC.
+005074 ADVANCED HI-TECH CORP.
+005075 KESTREL SOLUTIONS
+005076 IBM
+005077 PROLIFIC TECHNOLOGY, INC.
+005078 MEGATON HOUSE, LTD.
+00507A XPEED, INC.
+00507B MERLOT COMMUNICATIONS
+00507C VIDEOCON AG
+00507D IFP
+00507E NEWER TECHNOLOGY
+00507F DRAYTEK CORP.
+005080 CISCO SYSTEMS, INC.
+005081 MURATA MACHINERY, LTD.
+005082 FORESSON CORPORATION
+005083 GILBARCO, INC.
+005084 ATL PRODUCTS
+005086 TELKOM SA, LTD.
+005087 TERASAKI ELECTRIC CO., LTD.
+005088 AMANO CORPORATION
+005089 SAFETY MANAGEMENT SYSTEMS
+00508B COMPAQ COMPUTER CORPORATION
+00508C RSI SYSTEMS
+00508D ABIT COMPUTER CORPORATION
+00508E OPTIMATION, INC.
+00508F ASITA TECHNOLOGIES INT'L LTD.
+005090 DCTRI
+005091 NETACCESS, INC.
+005092 RIGAKU INDUSTRIAL CORPORATION
+005093 BOEING
+005094 PACE MICRO TECHNOLOGY PLC
+005095 PERACOM NETWORKS
+005096 SALIX TECHNOLOGIES, INC.
+005097 MMC-EMBEDDED
+005098 GLOBALOOP, LTD.
+005099 3COM EUROPE, LTD.
+00509A TAG ELECTRONIC SYSTEMS
+00509B SWITCHCORE AB
+00509C BETA RESEARCH
+00509D THE INDUSTREE B.V.
+00509E LES TECHNOLOGIES
+00509F HORIZON COMPUTER
+0050A0 DELTA COMPUTER SYSTEMS, INC.
+0050A1 CARLO GAVAZZI, INC.
+0050A2 CISCO SYSTEMS, INC.
+0050A3 TRANSMEDIA COMMUNICATIONS, INC
+0050A4 IO TECH, INC.
+0050A5 CAPITOL BUSINESS SYSTEMS, LTD.
+0050A6 OPTRONICS
+0050A7 CISCO SYSTEMS, INC.
+0050A8 OPENCON SYSTEMS, INC.
+0050A9 MOLDAT WIRELESS TECHNOLGIES
+0050AA KONICA CORPORATION
+0050AB NALTEC, INC.
+0050AC MAPLE COMPUTER CORPORATION
+0050AD COMMUNIQUE WIRELESS CORP.
+0050AE IWAKI ELECTRONICS CO., LTD.
+0050AF INTERGON, INC.
+0050B0 TECHNOLOGY ATLANTA CORPORATION
+0050B1 GIDDINGS & LEWIS
+0050B2 BRODEL AUTOMATION
+0050B3 VOICEBOARD CORPORATION
+0050B4 SATCHWELL CONTROL SYSTEMS, LTD
+0050B5 FICHET-BAUCHE
+0050B6 GOOD WAY IND. CO., LTD.
+0050B7 BOSER TECHNOLOGY CO., LTD.
+0050B8 INOVA COMPUTERS GMBH & CO. KG
+0050B9 XITRON TECHNOLOGIES, INC.
+0050BA D-LINK
+0050BB CMS TECHNOLOGIES
+0050BC HAMMER STORAGE SOLUTIONS
+0050BD CISCO SYSTEMS, INC.
+0050BE FAST MULTIMEDIA AG
+0050BF MOTOTECH INC.
+0050C0 GATAN, INC.
+0050C1 GEMFLEX NETWORKS, LTD.
+0050C2 IEEE REGISTRATION AUTHORITY
+0050C4 IMD
+0050C5 ADS TECHNOLOGIES, INC.
+0050C6 LOOP TELECOMMUNICATION
+0050C8 ADDONICS COMMUNICATIONS, INC.
+0050C9 MASPRO DENKOH CORP.
+0050CA NET TO NET TECHNOLOGIES
+0050CB JETTER
+0050CC XYRATEX
+0050CD DIGIANSWER A/S
+0050CE LG INTERNATIONAL CORP.
+0050CF VANLINK COMMUNICATION
+0050D0 MINERVA SYSTEMS
+0050D1 CISCO SYSTEMS, INC.
+0050D2 BAE Systems Canada, Inc.
+0050D3 DIGITAL AUDIO
+0050D4 JOOHONG INFORMATION &
+0050D5 AD SYSTEMS CORP.
+0050D6 ATLAS COPCO TOOLS AB
+0050D7 TELSTRAT
+0050D8 UNICORN COMPUTER CORP.
+0050D9 ENGETRON-ENGENHARIA ELETRONICA
+0050DA 3COM CORPORATION
+0050DB CONTEMPORARY CONTROL
+0050DC TAS TELEFONBAU A. SCHWABE
+0050DD SERRA SOLDADURA, S.A.
+0050DE SIGNUM SYSTEMS CORP.
+0050DF AIRFIBER, INC.
+0050E1 NS TECH ELECTRONICS SDN BHD
+0050E2 CISCO SYSTEMS, INC.
+0050E3 TELEGATE
+0050E4 APPLE COMPUTER, INC.
+0050E6 HAKUSAN CORPORATION
+0050E7 PARADISE INNOVATIONS (ASIA)
+0050E8 NOMADIX INC.
+0050EA XEL COMMUNICTIONS, INC.
+0050EB ALPHA-TOP CORPORATION
+0050EC OLICOM A/S
+0050ED ANDA NETWORKS
+0050EE TEK DIGITEL CORPORATION
+0050EF SPE SYSTEMHAUS GMBH
+0050F0 CISCO SYSTEMS, INC.
+0050F1 LIBIT SIGNAL PROCESSING, LTD.
+0050F2 MICROSOFT CORP.
+0050F3 GLOBAL NET INFORMATION CO.,LTD
+0050F4 SIGMATEK GMBH & CO. KG
+0050F6 PAN-INTERNATIONAL
+0050F7 VENTURE MANUFACTURING
+0050F8 ENTREGA TECHNOLOGIES, INC.
+0050FA OXTEL, LTD.
+0050FB VSK ELECTRONICS
+0050FC EDIMAX TECHNOLOGY CO., LTD.
+0050FD ISIONCOMM CO., LTD.
+0050FE PCTVNET ASA
+0050FF HAKKO ELECTRONICS CO., LTD.
+006000 XYCOM INC.
+006001 INNOSYS, INC.
+006002 SCREEN SUBTITLING SYSTEMS, LTD
+006003 TERAOKA WEIGH SYSTEM PTE, LTD.
+006004 COMPUTADORES MODULARES SA
+006005 FEEDBACK DATA LTD.
+006006 SOTEC CO., LTD
+006007 ACRES GAMING, INC.
+006008 3COM CORPORATION
+006009 CISCO SYSTEMS, INC.
+00600A SORD COMPUTER CORPORATION
+00600B LOGWARE GMBH
+00600C APPLIED DATA SYSTEMS, INC.
+00600D MICRODESIGN GMBH
+00600E WAVENET INTERNATIONAL, INC.
+00600F WESTELL, INC.
+006010 NETWORK MACHINES, INC.
+006011 CRYSTAL SEMICONDUCTOR CORP.
+006012 POWER COMPUTING CORPORATION
+006013 NETSTAL MASCHINEN AG
+006014 EDEC CO., LTD.
+006015 NET2NET CORPORATION
+006016 CLARIION
+006017 TOKIMEC INC.
+006018 STELLAR ONE CORPORATION
+006019 BOEHRINGER MANNHEIM CORP.
+00601A KEITHLEY INSTRUMENTS
+00601B MESA ELECTRONICS
+00601C TELXON CORPORATION
+00601D LUCENT TECHNOLOGIES
+00601E SOFTLAB, INC.
+00601F STALLION TECHNOLOGIES
+006020 PIVOTAL NETWORKING, INC.
+006021 DSC CORPORATION
+006022 VICOM SYSTEMS, INC.
+006023 PERICOM SEMICONDUCTOR CORP.
+006024 GRADIENT TECHNOLOGIES, INC.
+006025 ACTIVE IMAGING PLC
+006026 VIKING COMPONENTS, INC.
+006027 Superior Modular Products
+006028 MACROVISION CORPORATION
+006029 CARY PERIPHERALS INC.
+00602A SYMICRON COMPUTER
+00602B PEAK AUDIO
+00602C LINX DATA TERMINALS, INC.
+00602D ALERTON TECHNOLOGIES, INC.
+00602E CYCLADES CORPORATION
+00602F CISCO SYSTEMS, INC.
+006030 VILLAGE TRONIC
+006031 HRK SYSTEMS
+006032 I-CUBE, INC.
+006033 ACUITY IMAGING, INC.
+006034 ROBERT BOSCH GMBH
+006035 DALLAS SEMICONDUCTOR, INC.
+006036 AUSTRIAN RESEARCH CENTER
+006037 PHILIPS SEMICONDUCTORS
+006038 Nortel Networks
+006039 SANCOM TECHNOLOGY, INC.
+00603A QUICK CONTROLS LTD.
+00603B AMTEC SPA
+00603C HAGIWARA SYS-COM CO., LTD.
+00603D 3CX
+00603E CISCO SYSTEMS, INC.
+00603F PATAPSCO DESIGNS
+006040 NETRO CORP.
+006041 Yokogawa Electric Corporation
+006042 TKS (USA), INC.
+006043 COMSOFT SYSTEMS, INC.
+006044 LITTON/POLY-SCIENTIFIC
+006045 PATHLIGHT TECHNOLOGIES
+006046 VMETRO, INC.
+006047 CISCO SYSTEMS, INC.
+006048 EMC CORPORATION
+006049 VINA TECHNOLOGIES
+00604A SAIC IDEAS GROUP
+00604B BIODATA GMBH
+00604C SAT
+00604D MMC NETWORKS, INC.
+00604E CYCLE COMPUTER CORPORATION, INC.
+00604F SUZUKI MFG. CO., LTD.
+006050 INTERNIX INC.
+006051 QUALITY SEMICONDUCTOR
+006052 PERIPHERALS ENTERPRISE CO., L.
+006053 TOYODA MACHINE WORKS, LTD.
+006054 CONTROLWARE GMBH
+006055 CORNELL UNIVERSITY
+006056 NETWORK TOOLS, INC.
+006057 MURATA MANUFACTURING CO., LTD.
+006058 COPPER MOUNTAIN
+006059 TECHNICAL COMMUNICATIONS CORP.
+00605A CELCORE, INC.
+00605B INTRASERVER TECHNOLOGY INC.
+00605C CISCO SYSTEMS, INC.
+00605D SCANIVALVE CORP.
+00605E LIBERTY TECHNOLOGY NETWORKING
+00605F NIPPON UNISOFT CORPORATION
+006060 DAWNING TECHNOLOGIES, INC.
+006061 WHISTLE COMMUNICATIONS CORP.
+006062 TELESYNC, INC.
+006063 PSION DACOM PLC.
+006064 NETCOMM LIMITED
+006065 BERNECKER & RAINER
+006066 LACROIX TECHNOLGIE
+006067 ACER NETXUS INC.
+006068 EICON TECHNOLOGY CORPORATION
+006069 BROCADE COMMUNICATIONS SYSTEMS
+00606A MITSUBISHI WIRELESS COMM. INC.
+00606B AICHI ELECTRONICS CO.,LTD.
+00606C ARESCOM
+00606D DIGITAL EQUIPMENT CORP.
+00606E DAVICOM SEMICONDUCTOR, INC.
+00606F CLARION CORPORATION OF AMERICA
+006070 CISCO SYSTEMS, INC.
+006071 MIDAS LAB, INC.
+006072 VXL INSTRUMENTS, LIMITED
+006073 REDCREEK COMMUNICATIONS, INC.
+006074 QSC AUDIO PRODUCTS
+006075 PENTEK, INC.
+006076 SCHLUMBERGER TECHNOLOGIES
+006077 PRISA NETWORKS
+006078 POWER MEASUREMENT LTD.
+006079 WAVEPHORE NETWORKS, INC.
+00607A DVS GMBH
+00607B FORE SYSTEMS, INC.
+00607C WAVEACCESS, LTD.
+00607D SENTIENT NETWORKS INC.
+00607E GIGALABS, INC.
+00607F AURORA TECHNOLOGIES, INC.
+006080 MICROTRONIX DATACOM LTD.
+006081 TV/COM INTERNATIONAL
+006082 NOVALINK TECHNOLOGIES, INC.
+006083 CISCO SYSTEMS, INC.
+006084 DIGITAL VIDEO
+006085 STORAGE CONCEPTS
+006086 LOGIC REPLACEMENT TECH. LTD.
+006087 KANSAI ELECTRIC CO., LTD.
+006088 WHITE MOUNTAIN DSP, INC.
+006089 XATA
+00608A CITADEL COMPUTER
+00608B CONFERTECH INTERNATIONAL
+00608C 3COM CORPORATION
+00608D UNIPULSE CORP.
+00608E HE ELECTRONICS, TECHNOLOGIE &
+00608F TEKRAM TECHNOLOGY CO., LTD.
+006090 ABLE COMMUNICATIONS, INC.
+006091 FIRST PACIFIC NETWORKS, INC.
+006092 MICRO/SYS, INC.
+006093 VARIAN
+006094 IBM CORP.
+006095 ACCU-TIME SYSTEMS, INC.
+006096 T.S. MICROTECH INC.
+006097 3COM CORPORATION
+006098 HT COMMUNICATIONS
+006099 LAN MEDIA CORPORATION
+00609A NJK TECHNO CO.
+00609B ASTRO-MED, INC.
+00609C PERKIN-ELMER CORPORATION
+00609D PMI FOOD EQUIPMENT GROUP
+00609E X3 - INFORMATION TECHNOLOGY
+00609F PHAST CORPORATION
+0060A0 SWITCHED NETWORK
+0060A1 VPNET
+0060A2 NIHON UNISYS LIMITED CO.
+0060A3 CONTINUUM TECHNOLOGY CORP.
+0060A4 GRINAKER SYSTEM TECHNOLOGIES
+0060A5 PERFORMANCE TELECOM CORP.
+0060A6 PARTICLE MEASURING SYSTEMS
+0060A7 MICROSENS GMBH & CO. KG
+0060A8 TIDOMAT AB
+0060A9 GESYTEC MBH
+0060AA INTELLIGENT DEVICES INC. (IDI)
+0060AB LARSCOM INCORPORATED
+0060AC RESILIENCE CORPORATION
+0060AD MEGACHIPS CORPORATION
+0060AE TRIO INFORMATION SYSTEMS AB
+0060AF PACIFIC MICRO DATA, INC.
+0060B0 HEWLETT-PACKARD CO.
+0060B1 INPUT/OUTPUT, INC.
+0060B2 PROCESS CONTROL CORP.
+0060B3 Z-COM, INC.
+0060B4 GLENAYRE R&D INC.
+0060B5 KEBA GMBH
+0060B6 LAND COMPUTER CO., LTD.
+0060B7 CHANNELMATIC, INC.
+0060B8 CORELIS INC.
+0060B9 NITSUKO CORPORATION
+0060BA SAHARA NETWORKS, INC.
+0060BB CABLETRON - NETLINK, INC.
+0060BC KEUNYOUNG ELECTRONICS &
+0060BD HUBBELL-PULSECOM
+0060BE WEBTRONICS
+0060BF MACRAIGOR SYSTEMS, INC.
+0060C0 NERA AS
+0060C1 WAVESPAN CORPORATION
+0060C2 MPL AG
+0060C3 NETVISION CORPORATION
+0060C4 SOLITON SYSTEMS K.K.
+0060C5 ANCOT CORP.
+0060C6 DCS AG
+0060C7 AMATI COMMUNICATIONS CORP.
+0060C8 KUKA WELDING SYSTEMS & ROBOTS
+0060C9 CONTROLNET, INC.
+0060CA HARMONIC SYSTEMS INCORPORATED
+0060CB HITACHI ZOSEN CORPORATION
+0060CC EMTRAK, INCORPORATED
+0060CD VIDEOSERVER, INC.
+0060CE ACCLAIM COMMUNICATIONS
+0060CF ALTEON NETWORKS, INC.
+0060D0 SNMP RESEARCH INCORPORATED
+0060D1 CASCADE COMMUNICATIONS
+0060D2 LUCENT TECHNOLOGIES TAIWAN
+0060D3 AT&T
+0060D4 ELDAT COMMUNICATION LTD.
+0060D5 MIYACHI TECHNOS CORP.
+0060D6 NOVATEL WIRELESS TECHNOLOGIES
+0060D7 ECOLE POLYTECHNIQUE FEDERALE
+0060D8 ELMIC SYSTEMS, INC.
+0060D9 TRANSYS NETWORKS INC.
+0060DA JBM ELECTRONICS CO.
+0060DB NTP ELEKTRONIK A/S
+0060DC TOYO COMMUNICATION EQUIPMENT
+0060DD MYRICOM, INC.
+0060DE KAYSER-THREDE GMBH
+0060DF INRANGE TECHNOLOGIES CORP.
+0060E0 AXIOM TECHNOLOGY CO., LTD.
+0060E1 ORCKIT COMMUNICATIONS LTD.
+0060E2 QUEST ENGINEERING & DEV.
+0060E3 ARBIN INSTRUMENTS
+0060E4 COMPUSERVE, INC.
+0060E5 FUJI AUTOMATION CO., LTD.
+0060E6 SHOMITI SYSTEMS INCORPORATED
+0060E7 RANDATA
+0060E8 HITACHI COMPUTER PRODUCTS
+0060E9 ATOP TECHNOLOGIES, INC.
+0060EA STREAMLOGIC
+0060EB FOURTHTRACK SYSTEMS
+0060EC HERMARY OPTO ELECTRONICS INC.
+0060ED RICARDO TEST AUTOMATION LTD.
+0060EE APOLLO
+0060EF FLYTECH TECHNOLOGY CO., LTD.
+0060F0 JOHNSON & JOHNSON MEDICAL, INC
+0060F1 EXP COMPUTER, INC.
+0060F2 LASERGRAPHICS, INC.
+0060F3 NETCOM SYSTEMS, INC.
+0060F4 ADVANCED COMPUTER SOLUTIONS,
+0060F5 ICON WEST, INC.
+0060F6 NEXTEST COMMUNICATION
+0060F7 DATAFUSION SYSTEMS
+0060F8 LORAN INTERNATIONAL TECHN. INC
+0060F9 DIAMOND LANE COMMUNICATIONS
+0060FA EDUCATIONAL TECHNOLOGY
+0060FB PACKETEER, INC.
+0060FC CONSERVATION THROUGH
+0060FD NETICS, INC.
+0060FE LYNX SYSTEM DEVELOPERS, INC.
+0060FF QUVIS, INC.
+0070B0 M/A-COM INC. COMPANIES
+0070B3 DATA RECALL LTD.
+008000 MULTITECH SYSTEMS, INC.
+008001 PERIPHONICS CORPORATION
+008002 SATELCOM (UK) LTD
+008003 HYTEC ELECTRONICS LTD.
+008004 ANTLOW COMMUNICATIONS, LTD.
+008005 CACTUS COMPUTER INC.
+008006 COMPUADD CORPORATION
+008007 DLOG NC-SYSTEME
+008008 DYNATECH COMPUTER SYSTEMS
+008009 JUPITER SYSTEMS, INC.
+00800A JAPAN COMPUTER CORP.
+00800B CSK CORPORATION
+00800C VIDECOM LIMITED
+00800D VOSSWINKEL F.U.
+00800E ATLANTIX CORPORATION
+00800F STANDARD MICROSYSTEMS
+008010 COMMODORE INTERNATIONAL
+008011 DIGITAL SYSTEMS INT'L. INC.
+008012 INTEGRATED MEASUREMENT SYSTEMS
+008013 THOMAS-CONRAD CORPORATION
+008014 ESPRIT SYSTEMS
+008015 SEIKO SYSTEMS, INC.
+008016 WANDEL AND GOLTERMANN
+008017 PFU LIMITED
+008018 KOBE STEEL, LTD.
+008019 DAYNA COMMUNICATIONS, INC.
+00801A BELL ATLANTIC
+00801B KODIAK TECHNOLOGY
+00801C NEWPORT SYSTEMS SOLUTIONS
+00801D INTEGRATED INFERENCE MACHINES
+00801E XINETRON, INC.
+00801F KRUPP ATLAS ELECTRONIK GMBH
+008020 NETWORK PRODUCTS
+008021 NEWBRIDGE RESEARCH CORP.
+008022 SCAN-OPTICS
+008023 INTEGRATED BUSINESS NETWORKS
+008024 KALPANA, INC.
+008025 STOLLMANN GMBH
+008026 NETWORK PRODUCTS CORPORATION
+008027 ADAPTIVE SYSTEMS, INC.
+008028 TRADPOST (HK) LTD
+008029 EAGLE TECHNOLOGY, INC.
+00802A TEST SYSTEMS & SIMULATIONS INC
+00802B INTEGRATED MARKETING CO
+00802C THE SAGE GROUP PLC
+00802D XYLOGICS INC
+00802E CASTLE ROCK COMPUTING
+00802F NATIONAL INSTRUMENTS CORP.
+008030 NEXUS ELECTRONICS
+008031 BASYS, CORP.
+008032 ACCESS CO., LTD.
+008033 FORMATION, INC.
+008034 SMT GOUPIL
+008035 TECHNOLOGY WORKS, INC.
+008036 REFLEX MANUFACTURING SYSTEMS
+008037 Ericsson Group
+008038 DATA RESEARCH & APPLICATIONS
+008039 ALCATEL STC AUSTRALIA
+00803A VARITYPER, INC.
+00803B APT COMMUNICATIONS, INC.
+00803C TVS ELECTRONICS LTD
+00803D SURIGIKEN CO.,  LTD.
+00803E SYNERNETICS
+00803F TATUNG COMPANY
+008040 JOHN FLUKE MANUFACTURING CO.
+008041 VEB KOMBINAT ROBOTRON
+008042 FORCE COMPUTERS
+008043 NETWORLD, INC.
+008044 SYSTECH COMPUTER CORP.
+008045 MATSUSHITA ELECTRIC IND. CO
+008046 UNIVERSITY OF TORONTO
+008047 IN-NET CORP.
+008048 COMPEX INCORPORATED
+008049 NISSIN ELECTRIC CO., LTD.
+00804A PRO-LOG
+00804B EAGLE TECHNOLOGIES PTY.LTD.
+00804C CONTEC CO., LTD.
+00804D CYCLONE MICROSYSTEMS, INC.
+00804E APEX COMPUTER COMPANY
+00804F DAIKIN INDUSTRIES, LTD.
+008050 ZIATECH CORPORATION
+008051 FIBERMUX
+008052 TECHNICALLY ELITE CONCEPTS
+008053 INTELLICOM, INC.
+008054 FRONTIER TECHNOLOGIES CORP.
+008055 FERMILAB
+008056 SPHINX ELEKTRONIK GMBH
+008057 ADSOFT, LTD.
+008058 PRINTER SYSTEMS CORPORATION
+008059 STANLEY ELECTRIC CO., LTD
+00805A TULIP COMPUTERS INTERNAT'L B.V
+00805B CONDOR SYSTEMS, INC.
+00805C AGILIS CORPORATION
+00805D CANSTAR
+00805E LSI LOGIC CORPORATION
+00805F COMPAQ COMPUTER CORPORATION
+008060 NETWORK INTERFACE CORPORATION
+008061 LITTON SYSTEMS, INC.
+008062 INTERFACE  CO.
+008063 RICHARD HIRSCHMANN GMBH & CO.
+008064 WYSE TECHNOLOGY
+008065 CYBERGRAPHIC SYSTEMS PTY LTD.
+008066 ARCOM CONTROL SYSTEMS, LTD.
+008067 SQUARE D COMPANY
+008068 YAMATECH SCIENTIFIC LTD.
+008069 COMPUTONE SYSTEMS
+00806A ERI (EMPAC RESEARCH INC.)
+00806B SCHMID TELECOMMUNICATION
+00806C CEGELEC PROJECTS LTD
+00806D CENTURY SYSTEMS CORP.
+00806E NIPPON STEEL CORPORATION
+00806F ONELAN LTD.
+008070 COMPUTADORAS MICRON
+008071 SAI TECHNOLOGY
+008072 MICROPLEX SYSTEMS LTD.
+008073 DWB ASSOCIATES
+008074 FISHER CONTROLS
+008075 PARSYTEC GMBH
+008076 MCNC
+008077 BROTHER INDUSTRIES, LTD.
+008078 PRACTICAL PERIPHERALS, INC.
+008079 MICROBUS DESIGNS LTD.
+00807A AITECH SYSTEMS LTD.
+00807B ARTEL COMMUNICATIONS CORP.
+00807C FIBERCOM, INC.
+00807D EQUINOX SYSTEMS INC.
+00807E SOUTHERN PACIFIC LTD.
+00807F DY-4 INCORPORATED
+008080 DATAMEDIA CORPORATION
+008081 KENDALL SQUARE RESEARCH CORP.
+008082 PEP MODULAR COMPUTERS GMBH
+008083 AMDAHL
+008084 THE CLOUD INC.
+008085 H-THREE SYSTEMS CORPORATION
+008086 COMPUTER GENERATION INC.
+008087 OKI ELECTRIC INDUSTRY CO., LTD
+008088 VICTOR COMPANY OF JAPAN, LTD.
+008089 TECNETICS (PTY) LTD.
+00808A SUMMIT MICROSYSTEMS CORP.
+00808B DACOLL LIMITED
+00808C NetScout Systems, Inc.
+00808D WESTCOAST TECHNOLOGY B.V.
+00808E RADSTONE TECHNOLOGY
+00808F C. ITOH ELECTRONICS, INC.
+008090 MICROTEK INTERNATIONAL, INC.
+008091 TOKYO ELECTRIC CO.,LTD
+008092 JAPAN COMPUTER INDUSTRY, INC.
+008093 XYRON CORPORATION
+008094 ALFA LAVAL AUTOMATION AB
+008095 BASIC MERTON HANDELSGES.M.B.H.
+008096 HUMAN DESIGNED SYSTEMS, INC.
+008097 CENTRALP AUTOMATISMES
+008098 TDK CORPORATION
+008099 KLOCKNER MOELLER IPC
+00809A NOVUS NETWORKS LTD
+00809B JUSTSYSTEM CORPORATION
+00809C LUXCOM, INC.
+00809D Commscraft Ltd.
+00809E DATUS GMBH
+00809F ALCATEL BUSINESS SYSTEMS
+0080A0 EDISA HEWLETT PACKARD S/A
+0080A1 MICROTEST, INC.
+0080A2 CREATIVE ELECTRONIC SYSTEMS
+0080A3 LANTRONIX
+0080A4 LIBERTY ELECTRONICS
+0080A5 SPEED INTERNATIONAL
+0080A6 REPUBLIC TECHNOLOGY, INC.
+0080A7 MEASUREX CORP.
+0080A8 VITACOM CORPORATION
+0080A9 CLEARPOINT RESEARCH
+0080AA MAXPEED
+0080AB DUKANE NETWORK INTEGRATION
+0080AC IMLOGIX, DIVISION OF GENESYS
+0080AD CNET TECHNOLOGY, INC.
+0080AE HUGHES NETWORK SYSTEMS
+0080AF ALLUMER CO., LTD.
+0080B0 ADVANCED INFORMATION
+0080B1 SOFTCOM A/S
+0080B2 NETWORK EQUIPMENT TECHNOLOGIES
+0080B3 AVAL DATA CORPORATION
+0080B4 SOPHIA SYSTEMS
+0080B5 UNITED NETWORKS INC.
+0080B6 THEMIS COMPUTER
+0080B7 STELLAR COMPUTER
+0080B8 BUG, INCORPORATED
+0080B9 ARCHE TECHNOLIGIES INC.
+0080BA SPECIALIX (ASIA) PTE, LTD
+0080BB HUGHES LAN SYSTEMS
+0080BC HITACHI ENGINEERING CO., LTD
+0080BD THE FURUKAWA ELECTRIC CO., LTD
+0080BE ARIES RESEARCH
+0080BF TAKAOKA ELECTRIC MFG. CO. LTD.
+0080C0 PENRIL DATACOMM
+0080C1 LANEX CORPORATION
+0080C2 IEEE 802 COMMITTEE
+0080C3 BICC INFORMATION SYSTEMS & SVC
+0080C4 DOCUMENT TECHNOLOGIES, INC.
+0080C5 NOVELLCO DE MEXICO
+0080C6 NATIONAL DATACOMM CORPORATION
+0080C7 XIRCOM
+0080C8 D-LINK SYSTEMS, INC.
+0080C9 ALBERTA MICROELECTRONIC CENTRE
+0080CA NETCOM RESEARCH INCORPORATED
+0080CB FALCO DATA PRODUCTS
+0080CC MICROWAVE BYPASS SYSTEMS
+0080CD MICRONICS COMPUTER, INC.
+0080CE BROADCAST TELEVISION SYSTEMS
+0080CF EMBEDDED PERFORMANCE INC.
+0080D0 COMPUTER PERIPHERALS, INC.
+0080D1 KIMTRON CORPORATION
+0080D2 SHINNIHONDENKO CO., LTD.
+0080D3 SHIVA CORP.
+0080D4 CHASE RESEARCH LTD.
+0080D5 CADRE TECHNOLOGIES
+0080D6 NUVOTECH, INC.
+0080D7 FANTUM ENGINEERING, INC.
+0080D8 NETWORK PERIPHERALS INC.
+0080D9 EMK ELEKTRONIK
+0080DA BRUEL & KJAER
+0080DB GRAPHON CORPORATION
+0080DC PICKER INTERNATIONAL
+0080DD GMX INC/GIMIX
+0080DE GIPSI S.A.
+0080DF ADC CODENOLL TECHNOLOGY CORP.
+0080E0 XTP SYSTEMS, INC.
+0080E1 STMICROELECTRONICS
+0080E2 T.D.I. CO., LTD.
+0080E3 CORAL NETWORK CORPORATION
+0080E4 NORTHWEST DIGITAL SYSTEMS, INC
+0080E5 MYLEX CORPORATION
+0080E6 PEER NETWORKS, INC.
+0080E7 LYNWOOD SCIENTIFIC DEV. LTD.
+0080E8 CUMULUS CORPORATIION
+0080E9 MADGE NETWORKS
+0080EA ADVA Optical Networking Ltd.
+0080EB COMPCONTROL B.V.
+0080EC SUPERCOMPUTING SOLUTIONS, INC.
+0080ED IQ TECHNOLOGIES, INC.
+0080EE THOMSON CSF
+0080EF RATIONAL
+0080F0 KYUSHU MATSUSHITA ELECTRIC CO.
+0080F1 OPUS SYSTEMS
+0080F2 RAYCOM SYSTEMS INC
+0080F3 SUN ELECTRONICS CORP.
+0080F4 TELEMECANIQUE ELECTRIQUE
+0080F5 QUANTEL LTD
+0080F6 SYNERGY MICROSYSTEMS
+0080F7 ZENITH ELECTRONICS
+0080F8 MIZAR, INC.
+0080F9 HEURIKON CORPORATION
+0080FA RWT GMBH
+0080FB BVM LIMITED
+0080FC AVATAR CORPORATION
+0080FD EXSCEED CORPRATION
+0080FE AZURE TECHNOLOGIES, INC.
+0080FF SOC. DE TELEINFORMATIQUE RTC
+009000 DIAMOND MULTIMEDIA
+009001 NISHIMU ELCTRONICS INDUSTRIES
+009002 ALLGON AB
+009003 APLIO
+009004 3COM EUROPE LTD.
+009005 PROTECH SYSTEMS CO., LTD.
+009006 HAMAMATSU PHOTONICS K.K.
+009007 DOMEX TECHNOLOGY CORP.
+009008 HAN A SYSTEMS, INC.
+009009 i Controls, Inc.
+00900A PROTON ELECTRONIC INDUSTRIAL
+00900B LANNER ELECTRONICS, INC.
+00900C CISCO SYSTEMS, INC.
+00900D OVERLAND DATA INC.
+00900E HANDLINK TECHNOLOGIES, INC.
+00900F KAWASAKI HEAVY INDUSTRIES, LTD
+009010 SIMULATION LABORATORIES, INC.
+009011 WAVTRACE, INC.
+009012 GLOBESPAN SEMICONDUCTOR, INC.
+009013 SAMSAN CORP.
+009014 ROTORK INSTRUMENTS, LTD.
+009015 CENTIGRAM COMMUNICATIONS CORP.
+009016 ZAC
+009017 ZYPCOM, INC.
+009018 ITO ELECTRIC INDUSTRY CO, LTD.
+009019 HERMES ELECTRONICS CO., LTD.
+00901A UNISPHERE SOLUTIONS
+00901B DIGITAL CONTROLS
+00901C MPS SOFTWARE GMBH
+00901D PEC (NZ) LTD.
+00901E SELESTA INGEGNE RIA S.P.A.
+00901F ADTEC PRODUCTIONS, INC.
+009020 PHILIPS ANALYTICAL X-RAY B.V.
+009021 CISCO SYSTEMS, INC.
+009022 IVEX
+009023 ZILOG INC.
+009024 PIPELINKS, INC.
+009025 VISION SYSTEMS LTD. PTY
+009026 ADVANCED SWITCHING
+009027 INTEL CORPORATION
+009028 NIPPON SIGNAL CO., LTD.
+009029 CRYPTO AG
+00902A COMMUNICATION DEVICES, INC.
+00902B CISCO SYSTEMS, INC.
+00902C DATA & CONTROL EQUIPMENT LTD.
+00902D DATA ELECTRONICS
+00902E NAMCO LIMITED
+00902F NETCORE SYSTEMS, INC.
+009030 HONEYWELL-DATING
+009031 MYSTICOM, LTD.
+009032 PELCOMBE GROUP LTD.
+009033 INNOVAPHONE GMBH
+009034 IMAGIC, INC.
+009035 ALPHA TELECOM, INC.
+009036 ENS, INC.
+009037 ACUCOMM, INC.
+009038 FOUNTAIN TECHNOLOGIES, INC.
+009039 SHASTA NETWORKS
+00903A NIHON MEDIA TOOL INC.
+00903B TRIEMS RESEARCH LAB, INC.
+00903C ATLANTIC NETWORK SYSTEMS
+00903D BIOPAC SYSTEMS, INC.
+00903E N.V. PHILIPS INDUSTRIAL
+00903F AZTEC RADIOMEDIA
+009040 CASTLE NETWORKS, INC.
+009041 APPLIED DIGITAL ACCESS
+009042 ECCS
+009043 NICHIBEI DENSHI CO., LTD.
+009044 ASSURED DIGITAL, INC.
+009045 MARIPOSA TECHNOLOGY
+009046 DEXDYNE, LTD.
+009047 GIGA FAST E. LTD.
+009048 ZEAL CORPORATION
+009049 ENTRIDIA CORPORATION
+00904A CONCUR SYSTEM TECHNOLOGIES
+00904B GEMTEK TECHNOLOGY CO., LTD.
+00904C EPIGRAM, INC.
+00904D SPEC S.A.
+00904E DELEM BV
+00904F ABB POWER T&D COMPANY, INC.
+009050 TELESTE OY
+009051 ULTIMATE TECHNOLOGY CORP.
+009052 SELCOM ELETTRONICA S.R.L.
+009053 DAEWOO ELECTRONICS CO., LTD.
+009054 INNOVATIVE SEMICONDUCTORS, INC
+009055 PARKER HANNIFIN CORPORATION
+009056 TELESTREAM, INC.
+009057 AANETCOM, INC.
+009058 ULTRA ELECTRONICS LTD.
+009059 TELECOM DEVICE K.K.
+00905A DEARBORN GROUP, INC.
+00905B RAYMOND AND LAE ENGINEERING
+00905C EDMI
+00905D NETCOM SICHERHEITSTECHNIK GMBH
+00905E RAULAND-BORG CORPORATION
+00905F CISCO SYSTEMS, INC.
+009060 SYSTEM CREATE CORP.
+009061 PACIFIC RESEARCH & ENGINEERING
+009062 ICP VORTEX COMPUTERSYSTEME
+009063 COHERENT COMMUNICATIONS
+009064 THOMSON BROADCAST SYSTEMS
+009065 FINISAR CORPORATION
+009066 Troika Networks, Inc.
+009067 WALKABOUT COMPUTERS, INC.
+009068 DVT CORP.
+009069 JUNIPER NETWORKS, INC.
+00906A TURNSTONE SYSTEMS, INC.
+00906B APPLIED RESOURCES, INC.
+00906C GWT GLOBAL WEIGHING
+00906D CISCO SYSTEMS, INC.
+00906E PRAXON, INC.
+00906F CISCO SYSTEMS, INC.
+009070 NEO NETWORKS, INC.
+009071 BADGER TECHNOLOGY, INC.
+009072 SIMRAD AS
+009073 GAIO TECHNOLOGY
+009074 ARGON NETWORKS, INC.
+009075 NEC DO BRASIL S.A.
+009076 FMT AIRCRAFT GATE SUPPORT
+009077 ADVANCED FIBRE COMMUNICATIONS
+009078 MER TELEMANAGEMENT
+009079 CLEARONE INC.
+00907A SPECTRALINK CORP.
+00907B E-TECH, INC.
+00907C DIGITALCAST, INC.
+00907D HOME WIRELESS NETWORKS
+00907E VETRONIX CORP.
+00907F WATCHGUARD TECHNOLOGIES, INC.
+009080 NOT LIMITED, INC.
+009081 ALOHA NETWORKS, INC.
+009082 FORCE INSTITUTE
+009083 TURBO COMMUNICATION, INC.
+009084 ATECH SYSTEM
+009085 GOLDEN ENTERPRISES, INC.
+009086 CISCO SYSTEMS, INC.
+009087 ITIS
+009088 BAXALL SECURITY LTD.
+009089 SOFTCOM MICROSYSTEMS, INC.
+00908A BAYLY COMMUNICATIONS, INC.
+00908B CELL COMPUTING, INC.
+00908C ETREND ELECTRONICS, INC.
+00908D VICKERS ELECTRONICS SYSTEMS
+00908E Nortel Networks Broadband Access
+00908F AUDIOCODES LTD.
+009090 I-BUS
+009091 DIGITALSCAPE, INC.
+009092 CISCO SYSTEMS, INC.
+009093 NANAO CORPORATION
+009094 OSPREY TECHNOLOGIES, INC.
+009095 UNIVERSAL AVIONICS
+009096 ASKEY COMPUTER CORP.
+009097 SYCAMORE NETWORKS
+009098 SBC DESIGNS, INC.
+009099 ALLIED TELESIS,K.K.
+00909A ONE WORLD SYSTEMS, INC.
+00909B MARKPOINT AB
+00909C COMBOX, LTD.
+00909D GSE SYSTEMS, INC.
+00909E DELPHI ENGINEERING GROUP
+00909F DIGI-DATA CORPORATION
+0090A0 8X8 INC.
+0090A1 FLYING PIG SYSTEMS, LTD.
+0090A2 CYBERTAN TECHNOLOGY, INC.
+0090A3 MEDIALINCS CO., LTD.
+0090A4 ALTIGA NETWORKS
+0090A5 SPECTRA LOGIC
+0090A6 CISCO SYSTEMS, INC.
+0090A7 CLIENTEC CORPORATION
+0090A8 NINETILES NETWORKS LTD.
+0090A9 WESTERN DIGITAL
+0090AA INDIGO ACTIVE VISION
+0090AB CISCO SYSTEMS, INC.
+0090AC OPTIVISION, INC.
+0090AD ASPECT ELECTRONICS, INC.
+0090AE ITALTEL SPA
+0090AF J. MORITA MFG. CORP.
+0090B0 VADEM
+0090B1 CISCO SYSTEMS, INC.
+0090B2 AVICI SYSTEMS INC.
+0090B3 AGRANAT SYSTEMS
+0090B4 WILLOWBROOK TECHNOLOGIES
+0090B5 NIKON CORPORATION
+0090B6 FIBEX SYSTEMS
+0090B7 DIGITAL LIGHTWAVE, INC.
+0090B8 ROHDE & SCHWARZ GMBH & CO. KG
+0090B9 BERAN INSTRUMENTS LTD.
+0090BA VALID NETWORKS, INC.
+0090BB TAINET COMMUNICATION SYSTEM
+0090BC TELEMANN CO., LTD.
+0090BD OMNIA COMMUNICATIONS, INC.
+0090BE IBC/INTEGRATED BUSINESS
+0090BF CISCO SYSTEMS, INC.
+0090C0 K.J. LAW ENGINEERS, INC.
+0090C1 EDA INDUSTRIES
+0090C2 JK MICROSYSTEMS, INC.
+0090C3 TOPIC SEMICONDUCTOR CORP.
+0090C4 JAVELIN SYSTEMS, INC.
+0090C5 INTERNET MAGIC, INC.
+0090C6 OPTIM SYSTEMS, INC.
+0090C7 ICOM INC.
+0090C8 WAVERIDER COMMUNICATIONS
+0090C9 PRODUCTIVITY ENHANCEMENT
+0090CA ACCORD VIDEO
+0090CB WIRELESS ONLINE, INC.
+0090CC PLANEX COMMUNICATIONS, INC.
+0090CD ENT-EMPRESA NACIONAL
+0090CE TETRA GMBH
+0090CF NORTEL
+0090D0 ALCATEL BELL
+0090D1 LEICHU ENTERPRISE CO., LTD.
+0090D2 ARTEL VIDEO SYSTEMS
+0090D3 GIESECKE & DEVRIENT GMBH
+0090D4 BINDVIEW DEVELOPMENT CORP.
+0090D5 EUPHONIX, INC.
+0090D6 CRYSTAL GROUP
+0090D7 NETBOOST CORP.
+0090D8 WHITECROSS SYSTEMS
+0090D9 CISCO SYSTEMS, INC.
+0090DA DYNARC, INC.
+0090DB NEXT LEVEL COMMUNICATIONS
+0090DC TECO INFORMATION SYSTEMS
+0090DD THE MIHARU COMMUNICATIONS
+0090DE CARDKEY SYSTEMS, INC.
+0090DF MITSUBISHI CHEMICAL
+0090E0 SYSTRAN CORP.
+0090E1 TELENA S.P.A.
+0090E2 DISTRIBUTED PROCESSING
+0090E3 AVEX ELECTRONICS INC.
+0090E4 NEC AMERICA, INC.
+0090E5 TEKNEMA, INC.
+0090E6 ACER LABORATORIES, INC.
+0090E7 HORSCH ELEKTRONIK AG
+0090E8 MOXA TECHNOLOGIES CORP., LTD.
+0090E9 JANZ COMPUTER AG
+0090EA ALPHA TECHNOLOGIES, INC.
+0090EB SENTRY TELECOM SYSTEMS
+0090EC PYRESCOM
+0090ED CENTRAL SYSTEM RESEARCH
+0090EE PERSONAL COMMUNICATIONS
+0090EF INTEGRIX, INC.
+0090F0 HARMONIC LIGHTWAVES, LTD.
+0090F1 DOT HILL SYSTEMS CORPORATION
+0090F2 CISCO SYSTEMS, INC.
+0090F3 ASPECT COMMUNICATIONS
+0090F4 LIGHTNING INSTRUMENTATION
+0090F5 CLEVO CO.
+0090F6 ESCALATE NETWORKS, INC.
+0090F7 NBASE COMMUNICATIONS LTD.
+0090F8 MEDIATRIX TELECOM
+0090F9 LEITCH
+0090FA GIGANET, INC.
+0090FB PORTWELL, INC.
+0090FC NETWORK COMPUTING DEVICES
+0090FD COPPERCOM, INC.
+0090FE ELECOM CO., LTD.  (LANEED DIV.
+0090FF TELLUS TECHNOLOGY INC.
+009D8E CARDIAC RECORDERS, INC.
+00A000 CENTILLION NETWORKS, INC.
+00A001 WATKINS-JOHNSON COMPANY
+00A002 LEEDS & NORTHRUP AUSTRALIA
+00A003 STAEFA CONTROL SYSTEM
+00A004 NETPOWER, INC.
+00A005 DANIEL INSTRUMENTS, LTD.
+00A006 IMAGE DATA PROCESSING
+00A007 APEXX TECHNOLOGY, INC.
+00A008 NETCORP
+00A009 WHITETREE NETWORK
+00A00A R.D.C. COMMUNICATION
+00A00B COMPUTEX CO., LTD.
+00A00C KINGMAX TECHNOLOGY, INC.
+00A00D THE PANDA PROJECT
+00A00E VISUAL NETWORKS, INC.
+00A00F Broadband Technologies
+00A010 SYSLOGIC DATENTECHNIK AG
+00A011 MUTOH INDUSTRIES LTD.
+00A012 B.A.T.M. ADVANCED TECHNOLOGIES
+00A013 TELTREND LTD.
+00A014 CSIR
+00A015 WYLE
+00A016 MICROPOLIS CORP.
+00A017 J B M CORPORATION
+00A018 CREATIVE CONTROLLERS, INC.
+00A019 NEBULA CONSULTANTS, INC.
+00A01A BINAR ELEKTRONIK AB
+00A01B PREMISYS COMMUNICATIONS, INC.
+00A01C NASCENT NETWORKS CORPORATION
+00A01D SIXNET
+00A01E EST CORPORATION
+00A01F TRICORD SYSTEMS, INC.
+00A020 CITICORP/TTI
+00A021 GENERAL DYNAMICS-
+00A022 CENTRE FOR DEVELOPMENT OF
+00A023 APPLIED CREATIVE TECHNOLOGY,
+00A024 3COM CORPORATION
+00A025 REDCOM LABS INC.
+00A026 TELDAT, S.A.
+00A027 FIREPOWER SYSTEMS, INC.
+00A028 CONNER PERIPHERALS
+00A029 COULTER CORPORATION
+00A02A TRANCELL SYSTEMS
+00A02B TRANSITIONS RESEARCH CORP.
+00A02C INTERWAVE COMMUNICATIONS
+00A02D 1394 Trade Association
+00A02E BRAND COMMUNICATIONS, LTD.
+00A02F PIRELLI CAVI
+00A030 CAPTOR NV/SA
+00A031 HAZELTINE CORPORATION, MS 1-17
+00A032 GES SINGAPORE PTE. LTD.
+00A033 IMC MESS-SYSTEME GMBH
+00A034 AXEL
+00A035 CYLINK CORPORATION
+00A036 APPLIED NETWORK TECHNOLOGY
+00A037 DATASCOPE CORPORATION
+00A038 EMAIL ELECTRONICS
+00A039 ROSS TECHNOLOGY, INC.
+00A03A KUBOTEK CORPORATION
+00A03B TOSHIN ELECTRIC CO., LTD.
+00A03C EG&G NUCLEAR INSTRUMENTS
+00A03D OPTO - 22
+00A03E ATM FORUM
+00A03F COMPUTER SOCIETY MICROPROCES'R
+00A040 APPLE COMPUTER
+00A041 LEYBOLD-INFICON
+00A042 SPUR PRODUCTS CORP.
+00A043 AMERICAN TECHNOLOGY LABS, INC.
+00A044 NTT INTELLIGENT TECHNOLOGY
+00A045 PHOENIX CONTACT GMBH & CO.
+00A046 SCITEX CORP. LTD.
+00A047 INTEGRATED FITNESS CORP.
+00A048 QUESTECH, LTD.
+00A049 DIGITECH INDUSTRIES, INC.
+00A04A NISSHIN ELECTRIC CO., LTD.
+00A04B TFL LAN INC.
+00A04C INNOVATIVE SYSTEMS & TECH. INC
+00A04D EDA INSTRUMENTS, INC.
+00A04E VOELKER TECHNOLOGIES, INC.
+00A04F AMERITEC CORP.
+00A050 CYPRESS SEMICONDUCTOR
+00A051 ANGIA COMMUNICATIONS. INC.
+00A052 STANILITE ELECTRONICS PTY. LTD
+00A053 COMPACT DEVICES, INC.
+00A055 LINKTECH, INC.
+00A056 MICROPROSS
+00A057 ELSA AG
+00A058 GLORY, LTD.
+00A059 HAMILTON HALLMARK
+00A05A KOFAX IMAGE PRODUCTS
+00A05B MARQUIP, INC.
+00A05C INVENTORY CONVERSION, INC./
+00A05D CS COMPUTER SYSTEME GMBH
+00A05E MYRIAD LOGIC INC.
+00A05F BTG ENGINEERING BV
+00A060 ACER PERIPHERALS, INC.
+00A061 PURITAN BENNETT
+00A062 AES PRODATA
+00A063 JRL SYSTEMS, INC.
+00A064 KVB/ANALECT
+00A065 NEXLAND, INC.
+00A066 ISA CO., LTD.
+00A067 NETWORK SERVICES GROUP
+00A068 BHP LIMITED
+00A069 TrueTime
+00A06A VERILINK CORP.
+00A06B DMS DORSCH MIKROSYSTEM GMBH
+00A06C SHINDENGEN ELECTRIC MFG.
+00A06D MANNESMANN TALLY CORPORATION
+00A06E AUSTRON, INC.
+00A06F THE APPCON GROUP, INC.
+00A070 COASTCOM
+00A071 VIDEO LOTTERY TECHNOLOGIES,INC
+00A072 OVATION SYSTEMS LTD.
+00A073 COM21, INC.
+00A074 PERCEPTION TECHNOLOGY
+00A075 MICRON TECHNOLOGY, INC.
+00A076 CARDWARE LAB, INC.
+00A077 FUJITSU NEXION, INC.
+00A078 Marconi Communications
+00A079 ALPS ELECTRIC (USA), INC.
+00A07A ADVANCED PERIPHERALS
+00A07B DAWN COMPUTER INCORPORATION
+00A07C TONYANG NYLON CO., LTD.
+00A07D SEEQ TECHNOLOGY, INC.
+00A07E AVID TECHNOLOGY, INC.
+00A07F GSM-SYNTEL, LTD.
+00A080 ANTARES MICROSYSTEMS
+00A081 ALCATEL DATA NETWORKS
+00A082 NKT ELEKTRONIK A/S
+00A083 ASIMMPHONY TURKEY
+00A084 DATAPLEX PTY. LTD.
+00A086 AMBER WAVE SYSTEMS, INC.
+00A087 MITEL SEMICONDUCTOR, LTD.
+00A088 ESSENTIAL COMMUNICATIONS
+00A089 XPOINT TECHNOLOGIES, INC.
+00A08A BROOKTROUT TECHNOLOGY, INC.
+00A08B ASTON ELECTRONIC DESIGNS LTD.
+00A08C MULTIMEDIA LANS, INC.
+00A08D JACOMO CORPORATION
+00A08E Nokia Internet Communications
+00A08F DESKNET SYSTEMS, INC.
+00A090 TIMESTEP CORPORATION
+00A091 APPLICOM INTERNATIONAL
+00A092 H. BOLLMANN MANUFACTURERS, LTD
+00A093 B/E AEROSPACE
+00A094 COMSAT CORPORATION
+00A095 ACACIA NETWORKS, INC.
+00A096 MITSUMI ELECTRIC CO., LTD.
+00A097 JC INFORMATION SYSTEMS
+00A098 NETWORK APPLIANCE CORP.
+00A099 K-NET LTD.
+00A09A NIHON KOHDEN AMERICA
+00A09B QPSX COMMUNICATIONS, LTD.
+00A09C XYPLEX, INC.
+00A09D JOHNATHON FREEMAN TECHNOLOGIES
+00A09E ICTV
+00A09F COMMVISION CORP.
+00A0A0 COMPACT DATA, LTD.
+00A0A1 EPIC DATA INC.
+00A0A2 DIGICOM S.P.A.
+00A0A3 RELIABLE POWER METERS
+00A0A4 MICROS SYSTEMS, INC.
+00A0A5 TEKNOR MICROSYSTEME, INC.
+00A0A6 M.I. SYSTEMS, K.K.
+00A0A7 VORAX CORPORATION
+00A0A8 RENEX CORPORATION
+00A0A9 GN NETTEST (CANADA) INC.
+00A0AA SPACELABS MEDICAL
+00A0AB NETCS INFORMATIONSTECHNIK GMBH
+00A0AC GILAT SATELLITE NETWORKS, LTD.
+00A0AD MARCONI SPA
+00A0AE NUCOM SYSTEMS, INC.
+00A0AF WMS INDUSTRIES
+00A0B0 I-O DATA DEVICE, INC.
+00A0B1 FIRST VIRTUAL CORPORATION
+00A0B2 SHIMA SEIKI
+00A0B3 ZYKRONIX
+00A0B4 TEXAS MICROSYSTEMS, INC.
+00A0B5 3H TECHNOLOGY
+00A0B6 SANRITZ AUTOMATION CO., LTD.
+00A0B7 CORDANT, INC.
+00A0B8 SYMBIOS LOGIC INC.
+00A0B9 EAGLE TECHNOLOGY, INC.
+00A0BA PATTON ELECTRONICS CO.
+00A0BB HILAN GMBH
+00A0BC VIASAT, INCORPORATED
+00A0BD I-TECH CORP.
+00A0BE INTEGRATED CIRCUIT SYSTEMS,INC
+00A0BF WIRELESS DATA GROUP MOTOROLA
+00A0C0 DIGITAL LINK CORP.
+00A0C1 ORTIVUS MEDICAL AB
+00A0C2 R.A. SYSTEMS CO., LTD.
+00A0C3 UNICOMPUTER GMBH
+00A0C4 CRISTIE ELECTRONICS LTD.
+00A0C5 ZYXEL COMMUNICATION
+00A0C6 QUALCOMM INCORPORATED
+00A0C7 TADIRAN TELECOMMUNICATIONS
+00A0C8 ADTRAN INC.
+00A0C9 INTEL CORPORATION - HF1-06
+00A0CA FUJITSU DENSO LTD.
+00A0CB ARK TELECOMMUNICATIONS, INC.
+00A0CC LITE-ON COMMUNICATIONS, INC.
+00A0CD DR. JOHANNES HEIDENHAIN GMBH
+00A0CE ASTROCOM CORPORATION
+00A0CF SOTAS, INC.
+00A0D0 TEN X TECHNOLOGY, INC.
+00A0D1 INVENTEC CORPORATION
+00A0D2 ALLIED TELESIS INTERNATIONAL
+00A0D3 INSTEM COMPUTER SYSTEMS, LTD.
+00A0D4 RADIOLAN,  INC.
+00A0D5 SIERRA WIRELESS INC.
+00A0D6 SBE, INC.
+00A0D7 KASTEN CHASE APPLIED RESEARCH
+00A0D8 SPECTRA - TEK
+00A0D9 CONVEX COMPUTER CORPORATION
+00A0DA INTEGRATED SYSTEMS
+00A0DB FISHER & PAYKEL PRODUCTION
+00A0DC O.N. ELECTRONIC CO., LTD.
+00A0DD AZONIX CORPORATION
+00A0DE YAMAHA CORPORATION
+00A0DF STS TECHNOLOGIES, INC.
+00A0E0 TENNYSON TECHNOLOGIES PTY LTD
+00A0E1 WESTPORT RESEARCH
+00A0E2 KEISOKU GIKEN CORP.
+00A0E3 XKL SYSTEMS CORP.
+00A0E4 OPTIQUEST
+00A0E5 NHC COMMUNICATIONS
+00A0E6 DIALOGIC CORPORATION
+00A0E7 CENTRAL DATA CORPORATION
+00A0E8 REUTERS HOLDINGS PLC
+00A0E9 ELECTRONIC RETAILING SYSTEMS
+00A0EA ETHERCOM CORP.
+00A0EB FASTCOMM COMMUNICATIONS CORP.
+00A0EC TRANSMITTON LTD.
+00A0ED PRI AUTOMATION
+00A0EE NASHOBA NETWORKS
+00A0EF LUCIDATA LTD.
+00A0F0 TORONTO MICROELECTRONICS INC.
+00A0F1 MTI
+00A0F2 INFOTEK COMMUNICATIONS, INC.
+00A0F3 STAUBLI
+00A0F4 GE
+00A0F5 RADGUARD LTD.
+00A0F6 AUTOGAS SYSTEMS, INC.
+00A0F7 V.I COMPUTER CORP.
+00A0F8 SYMBOL TECHNOLOGIES, INC.
+00A0F9 BINTEC COMMUNICATIONS GMBH
+00A0FA Marconi Communication GmbH
+00A0FB TORAY ENGINEERING CO., LTD.
+00A0FC IMAGE SCIENCES, INC.
+00A0FD SCITEX DIGITAL PRINTING, INC.
+00A0FE BOSTON TECHNOLOGY, INC.
+00A0FF TELLABS OPERATIONS, INC.
+00AA00 INTEL CORPORATION
+00AA01 INTEL CORPORATION
+00AA02 INTEL CORPORATION
+00AA3C OLIVETTI TELECOM SPA (OLTECO)
+00B009 Grass Valley Group
+00B017 InfoGear Technology Corp.
+00B019 Casi-Rusco
+00B01C Westport Technologies
+00B01E Rantic Labs, Inc.
+00B02A ORSYS GmbH
+00B02D ViaGate Technologies, Inc.
+00B03B HiQ Networks
+00B048 Marconi Communications Inc.
+00B04A Cisco Systems, Inc.
+00B052 Intellon Corporation
+00B064 Cisco Systems, Inc.
+00B069 Honewell Oy
+00B06D Jones Futurex Inc.
+00B080 Mannesmann Ipulsys B.V.
+00B086 LocSoft Limited
+00B08E Cisco Systems, Inc.
+00B091 Transmeta Corp.
+00B094 Alaris, Inc.
+00B09A Morrow Technologies Corp.
+00B09D Point Grey Research Inc.
+00B0AC SIAE-Microelettronica S.p.A.
+00B0AE Symmetricom
+00B0B3 Xstreamis PLC
+00B0C2 Cisco Systems, Inc.
+00B0C7 Tellabs Operations, Inc.
+00B0CE TECHNOLOGY RESCUE
+00B0D0 Dell Computer Corp.
+00B0DB Nextcell, Inc.
+00B0DF Reliable Data Technology, Inc.
+00B0E7 British Federal Ltd.
+00B0EC EACEM
+00B0EE Ajile Systems, Inc.
+00B0F0 CALY NETWORKS
+00B0F5 NetWorth Technologies, Inc.
+00BB01 OCTOTHORPE CORP.
+00BBF0 UNGERMANN-BASS INC.
+00C000 LANOPTICS, LTD.
+00C001 DIATEK PATIENT MANAGMENT
+00C002 SERCOMM CORPORATION
+00C003 GLOBALNET COMMUNICATIONS
+00C004 JAPAN BUSINESS COMPUTER CO.LTD
+00C005 LIVINGSTON ENTERPRISES, INC.
+00C006 NIPPON AVIONICS CO., LTD.
+00C007 PINNACLE DATA SYSTEMS, INC.
+00C008 SECO SRL
+00C009 KT TECHNOLOGY (S) PTE LTD
+00C00A MICRO CRAFT
+00C00B NORCONTROL A.S.
+00C00C RELIA TECHNOLGIES
+00C00D ADVANCED LOGIC RESEARCH, INC.
+00C00E PSITECH, INC.
+00C00F QUANTUM SOFTWARE SYSTEMS LTD.
+00C010 HIRAKAWA HEWTECH CORP.
+00C011 INTERACTIVE COMPUTING DEVICES
+00C012 NETSPAN CORPORATION
+00C013 NETRIX
+00C014 TELEMATICS CALABASAS INT'L,INC
+00C015 NEW MEDIA CORPORATION
+00C016 ELECTRONIC THEATRE CONTROLS
+00C017 FORTE NETWORKS
+00C018 LANART CORPORATION
+00C019 LEAP TECHNOLOGY, INC.
+00C01A COROMETRICS MEDICAL SYSTEMS
+00C01B SOCKET COMMUNICATIONS, INC.
+00C01C INTERLINK COMMUNICATIONS LTD.
+00C01D GRAND JUNCTION NETWORKS, INC.
+00C01E LA FRANCAISE DES JEUX
+00C01F S.E.R.C.E.L.
+00C020 ARCO ELECTRONIC, CONTROL LTD.
+00C021 NETEXPRESS
+00C022 LASERMASTER TECHNOLOGIES, INC.
+00C023 TUTANKHAMON ELECTRONICS
+00C024 EDEN SISTEMAS DE COMPUTACAO SA
+00C025 DATAPRODUCTS CORPORATION
+00C026 LANS TECHNOLOGY CO., LTD.
+00C027 CIPHER SYSTEMS, INC.
+00C028 JASCO CORPORATION
+00C029 KABEL RHEYDT AG
+00C02A OHKURA ELECTRIC CO., LTD.
+00C02B GERLOFF GESELLSCHAFT FUR
+00C02C CENTRUM COMMUNICATIONS, INC.
+00C02D FUJI PHOTO FILM CO., LTD.
+00C02E NETWIZ
+00C02F OKUMA CORPORATION
+00C030 INTEGRATED ENGINEERING B. V.
+00C031 DESIGN RESEARCH SYSTEMS, INC.
+00C032 I-CUBED LIMITED
+00C033 TELEBIT COMMUNICATIONS APS
+00C034 TRANSACTION NETWORK
+00C035 QUINTAR COMPANY
+00C036 RAYTECH ELECTRONIC CORP.
+00C037 DYNATEM
+00C038 RASTER IMAGE PROCESSING SYSTEM
+00C039 TDK SEMICONDUCTOR CORPORATION
+00C03A MEN-MIKRO ELEKTRONIK GMBH
+00C03B MULTIACCESS COMPUTING CORP.
+00C03C TOWER TECH S.R.L.
+00C03D WIESEMANN & THEIS GMBH
+00C03E FA. GEBR. HELLER GMBH
+00C03F STORES AUTOMATED SYSTEMS, INC.
+00C040 ECCI
+00C041 DIGITAL TRANSMISSION SYSTEMS
+00C042 DATALUX CORP.
+00C043 STRATACOM
+00C044 EMCOM CORPORATION
+00C045 ISOLATION SYSTEMS, LTD.
+00C046 KEMITRON LTD.
+00C047 UNIMICRO SYSTEMS, INC.
+00C048 BAY TECHNICAL ASSOCIATES
+00C049 U.S. ROBOTICS, INC.
+00C04A GROUP 2000 AG
+00C04B CREATIVE MICROSYSTEMS
+00C04C DEPARTMENT OF FOREIGN AFFAIRS
+00C04D MITEC, INC.
+00C04E COMTROL CORPORATION
+00C04F DELL COMPUTER CORPORATION
+00C050 TOYO DENKI SEIZO K.K.
+00C051 ADVANCED INTEGRATION RESEARCH
+00C052 BURR-BROWN
+00C053 DAVOX CORPORATION
+00C054 NETWORK PERIPHERALS, LTD.
+00C055 MODULAR COMPUTING TECHNOLOGIES
+00C056 SOMELEC
+00C057 MYCO ELECTRONICS
+00C058 DATAEXPERT CORP.
+00C059 NIPPON DENSO CO., LTD.
+00C05A SEMAPHORE COMMUNICATIONS CORP.
+00C05B NETWORKS NORTHWEST, INC.
+00C05C ELONEX PLC
+00C05D L&N TECHNOLOGIES
+00C05E VARI-LITE, INC.
+00C05F FINE-PAL COMPANY LIMITED
+00C060 ID SCANDINAVIA AS
+00C061 SOLECTEK CORPORATION
+00C062 IMPULSE TECHNOLOGY
+00C063 MORNING STAR TECHNOLOGIES, INC
+00C064 GENERAL DATACOMM IND. INC.
+00C065 SCOPE COMMUNICATIONS, INC.
+00C066 DOCUPOINT, INC.
+00C067 UNITED BARCODE INDUSTRIES
+00C068 PHILIP DRAKE ELECTRONICS LTD.
+00C069 ADAPTIVE BROADBAND CORPORATION
+00C06A ZAHNER-ELEKTRIK GMBH & CO. KG
+00C06B OSI PLUS CORPORATION
+00C06C SVEC COMPUTER CORP.
+00C06D BOCA RESEARCH, INC.
+00C06E HAFT TECHNOLOGY, INC.
+00C06F KOMATSU LTD.
+00C070 SECTRA SECURE-TRANSMISSION AB
+00C071 AREANEX COMMUNICATIONS, INC.
+00C072 KNX LTD.
+00C073 XEDIA CORPORATION
+00C074 TOYODA AUTOMATIC LOOM
+00C075 XANTE CORPORATION
+00C076 I-DATA INTERNATIONAL A-S
+00C077 DAEWOO TELECOM LTD.
+00C078 COMPUTER SYSTEMS ENGINEERING
+00C079 FONSYS CO.,LTD.
+00C07A PRIVA B.V.
+00C07B ASCEND COMMUNICATIONS, INC.
+00C07C HIGHTECH INFORMATION
+00C07D RISC DEVELOPMENTS LTD.
+00C07E KUBOTA CORPORATION ELECTRONIC
+00C07F NUPON COMPUTING CORP.
+00C080 NETSTAR, INC.
+00C081 METRODATA LTD.
+00C082 MOORE PRODUCTS CO.
+00C083 TRACE MOUNTAIN PRODUCTS, INC.
+00C084 DATA LINK CORP. LTD.
+00C085 ELECTRONICS FOR IMAGING, INC.
+00C086 THE LYNK CORPORATION
+00C087 UUNET TECHNOLOGIES, INC.
+00C088 EKF ELEKTRONIK GMBH
+00C089 TELINDUS DISTRIBUTION
+00C08A LAUTERBACH DATENTECHNIK GMBH
+00C08B RISQ MODULAR SYSTEMS, INC.
+00C08C PERFORMANCE TECHNOLOGIES, INC.
+00C08D TRONIX PRODUCT DEVELOPMENT
+00C08E NETWORK INFORMATION TECHNOLOGY
+00C08F MATSUSHITA ELECTRIC WORKS, LTD
+00C090 PRAIM S.R.L.
+00C091 JABIL CIRCUIT, INC.
+00C092 MENNEN MEDICAL INC.
+00C093 ALTA RESEARCH CORP.
+00C094 VMX INC.
+00C095 ZNYX
+00C096 TAMURA CORPORATION
+00C097 ARCHIPEL SA
+00C098 CHUNTEX ELECTRONIC CO., LTD.
+00C099 YOSHIKI INDUSTRIAL CO.,LTD.
+00C09A PHOTONICS CORPORATION
+00C09B RELIANCE COMM/TEC, R-TEC
+00C09C TOA ELECTRONIC LTD.
+00C09D DISTRIBUTED SYSTEMS INT'L, INC
+00C09E CACHE COMPUTERS, INC.
+00C09F QUANTA COMPUTER, INC.
+00C0A0 ADVANCE MICRO RESEARCH, INC.
+00C0A1 TOKYO DENSHI SEKEI CO.
+00C0A2 INTERMEDIUM A/S
+00C0A3 DUAL ENTERPRISES CORPORATION
+00C0A4 UNIGRAF OY
+00C0A5 DICKENS DATA SYSTEMS
+00C0A6 EXICOM AUSTRALIA PTY. LTD
+00C0A7 SEEL LTD.
+00C0A8 GVC CORPORATION
+00C0A9 BARRON MCCANN LTD.
+00C0AA SILICON VALLEY COMPUTER
+00C0AB Telco Systems, Inc.
+00C0AC GAMBIT COMPUTER COMMUNICATIONS
+00C0AD MARBEN COMMUNICATION SYSTEMS
+00C0AE TOWERCOM CO. INC. DBA PC HOUSE
+00C0AF TEKLOGIX INC.
+00C0B0 GCC TECHNOLOGIES,INC.
+00C0B1 GENIUS NET CO.
+00C0B2 NORAND CORPORATION
+00C0B3 COMSTAT DATACOMM CORPORATION
+00C0B4 MYSON TECHNOLOGY, INC.
+00C0B5 CORPORATE NETWORK SYSTEMS,INC.
+00C0B6 MERIDIAN DATA, INC.
+00C0B7 AMERICAN POWER CONVERSION CORP
+00C0B8 FRASER'S HILL LTD.
+00C0B9 FUNK SOFTWARE, INC.
+00C0BA NETVANTAGE
+00C0BB FORVAL CREATIVE, INC.
+00C0BC TELECOM AUSTRALIA/CSSC
+00C0BD INEX TECHNOLOGIES, INC.
+00C0BE ALCATEL - SEL
+00C0BF TECHNOLOGY CONCEPTS, LTD.
+00C0C0 SHORE MICROSYSTEMS, INC.
+00C0C1 QUAD/GRAPHICS, INC.
+00C0C2 INFINITE NETWORKS LTD.
+00C0C3 ACUSON COMPUTED SONOGRAPHY
+00C0C4 COMPUTER OPERATIONAL
+00C0C5 SID INFORMATICA
+00C0C6 PERSONAL MEDIA CORP.
+00C0C7 SPARKTRUM MICROSYSTEMS, INC.
+00C0C8 MICRO BYTE PTY. LTD.
+00C0C9 ELSAG BAILEY PROCESS
+00C0CA ALFA, INC.
+00C0CB CONTROL TECHNOLOGY CORPORATION
+00C0CC TELESCIENCES CO SYSTEMS, INC.
+00C0CD COMELTA, S.A.
+00C0CE CEI SYSTEMS & ENGINEERING PTE
+00C0CF IMATRAN VOIMA OY
+00C0D0 RATOC SYSTEM INC.
+00C0D1 COMTREE TECHNOLOGY CORPORATION
+00C0D2 SYNTELLECT, INC.
+00C0D3 OLYMPUS IMAGE SYSTEMS, INC.
+00C0D4 AXON NETWORKS, INC.
+00C0D5 QUANCOM ELECTRONIC GMBH
+00C0D6 J1 SYSTEMS, INC.
+00C0D7 TAIWAN TRADING CENTER DBA
+00C0D8 UNIVERSAL DATA SYSTEMS
+00C0D9 QUINTE NETWORK CONFIDENTIALITY
+00C0DA NICE SYSTEMS LTD.
+00C0DB IPC CORPORATION (PTE) LTD.
+00C0DC EOS TECHNOLOGIES, INC.
+00C0DD QLogic Corporation
+00C0DE ZCOMM, INC.
+00C0DF KYE SYSTEMS CORP.
+00C0E0 DSC COMMUNICATION CORP.
+00C0E1 SONIC SOLUTIONS
+00C0E2 CALCOMP, INC.
+00C0E3 OSITECH COMMUNICATIONS, INC.
+00C0E4 SIEMENS BUILDING
+00C0E5 GESPAC, S.A.
+00C0E6 Verilink Corporation
+00C0E7 FIBERDATA AB
+00C0E8 PLEXCOM, INC.
+00C0E9 OAK SOLUTIONS, LTD.
+00C0EA ARRAY TECHNOLOGY LTD.
+00C0EB SEH COMPUTERTECHNIK GMBH
+00C0EC DAUPHIN TECHNOLOGY
+00C0ED US ARMY ELECTRONIC
+00C0EE KYOCERA CORPORATION
+00C0EF ABIT CORPORATION
+00C0F0 KINGSTON TECHNOLOGY CORP.
+00C0F1 SHINKO ELECTRIC CO., LTD.
+00C0F2 TRANSITION NETWORKS
+00C0F3 NETWORK COMMUNICATIONS CORP.
+00C0F4 INTERLINK SYSTEM CO., LTD.
+00C0F5 METACOMP, INC.
+00C0F6 CELAN TECHNOLOGY INC.
+00C0F7 ENGAGE COMMUNICATION, INC.
+00C0F8 ABOUT COMPUTING INC.
+00C0F9 HARRIS AND JEFFRIES, INC.
+00C0FA CANARY COMMUNICATIONS, INC.
+00C0FB ADVANCED TECHNOLOGY LABS
+00C0FC ELASTIC REALITY, INC.
+00C0FD PROSUM
+00C0FE APTEC COMPUTER SYSTEMS, INC.
+00C0FF DOT HILL SYSTEMS CORPORATION
+00CBBD Cambridge Broadband Ltd.
+00CF1C COMMUNICATION MACHINERY CORP.
+00D000 FERRAN SCIENTIFIC, INC.
+00D001 VST TECHNOLOGIES, INC.
+00D002 DITECH CORPORATION
+00D003 COMDA ENTERPRISES CORP.
+00D004 PENTACOM LTD.
+00D005 ZHS ZEITMANAGEMENTSYSTEME
+00D006 CISCO SYSTEMS, INC.
+00D007 MIC ASSOCIATES, INC.
+00D008 MACTELL CORPORATION
+00D009 HSING TECH. ENTERPRISE CO. LTD
+00D00A LANACCESS TELECOM S.A.
+00D00B RHK TECHNOLOGY, INC.
+00D00C SNIJDER MICRO SYSTEMS
+00D00D MICROMERITICS INSTRUMENT
+00D00E PLURIS, INC.
+00D00F SPEECH DESIGN GMBH
+00D010 CONVERGENT NETWORKS, INC.
+00D011 PRISM VIDEO, INC.
+00D012 GATEWORKS CORP.
+00D013 PRIMEX AEROSPACE COMPANY
+00D014 ROOT, INC.
+00D015 UNIVEX MICROTECHNOLOGY CORP.
+00D016 SCM MICROSYSTEMS, INC.
+00D017 SYNTECH INFORMATION CO., LTD.
+00D018 QWES. COM, INC.
+00D019 DAINIPPON SCREEN CORPORATE
+00D01A URMET SUD S.P.A.
+00D01B MIMAKI ENGINEERING CO., LTD.
+00D01C SBS TECHNOLOGIES,
+00D01D FURUNO ELECTRIC CO., LTD.
+00D01E PINGTEL CORP.
+00D01F CTAM PTY. LTD.
+00D020 AIM SYSTEM, INC.
+00D021 REGENT ELECTRONICS CORP.
+00D022 INCREDIBLE TECHNOLOGIES, INC.
+00D023 INFORTREND TECHNOLOGY, INC.
+00D024 Cognex Corporation
+00D025 XROSSTECH, INC.
+00D026 HIRSCHMANN AUSTRIA GMBH
+00D027 APPLIED AUTOMATION, INC.
+00D028 OMNEON VIDEO NETWORKS
+00D029 WAKEFERN FOOD CORPORATION
+00D02A FLEXION SYSTEMS
+00D02B JETCELL, INC.
+00D02C CAMPBELL SCIENTIFIC, INC.
+00D02D ADEMCO
+00D02E COMMUNICATION AUTOMATION CORP.
+00D02F VLSI TECHNOLOGY INC.
+00D030 SAFETRAN SYSTEMS CORP.
+00D031 INDUSTRIAL LOGIC CORPORATION
+00D032 YANO ELECTRIC CO., LTD.
+00D033 DALIAN DAXIAN NETWORK
+00D034 ORMEC SYSTEMS CORP.
+00D035 BEHAVIOR TECH. COMPUTER CORP.
+00D036 TECHNOLOGY ATLANTA CORP.
+00D037 PHILIPS-DVS-LO BDR
+00D038 FIVEMERE, LTD.
+00D039 UTILICOM, INC.
+00D03A ZONEWORX, INC.
+00D03B VISION PRODUCTS PTY. LTD.
+00D03C Vieo, Inc.
+00D03E ROCKETCHIPS, INC.
+00D03F AMERICAN COMMUNICATION
+00D040 SYSMATE CO., LTD.
+00D041 AMIGO TECHNOLOGY CO., LTD.
+00D042 MAHLO GMBH & CO. UG
+00D043 ZONAL RETAIL DATA SYSTEMS
+00D044 ALIDIAN NETWORKS, INC.
+00D045 KVASER AB
+00D046 DOLBY LABORATORIES, INC.
+00D047 XN TECHNOLOGIES
+00D048 ECTON, INC.
+00D049 IMPRESSTEK CO., LTD.
+00D04A PRESENCE TECHNOLOGY GMBH
+00D04B LA CIE GROUP S.A.
+00D04C EUROTEL TELECOM LTD.
+00D04D DIV OF RESEARCH & STATISTICS
+00D04E LOGIBAG
+00D04F BITRONICS, INC.
+00D050 ISKRATEL
+00D051 O2 MICRO, INC.
+00D052 ASCEND COMMUNICATIONS, INC.
+00D053 CONNECTED SYSTEMS
+00D054 SAS INSTITUTE INC.
+00D055 KATHREIN-WERKE KG
+00D056 SOMAT CORPORATION
+00D057 ULTRAK, INC.
+00D058 CISCO SYSTEMS, INC.
+00D059 AMBIT MICROSYSTEMS CORP.
+00D05A SYMBIONICS, LTD.
+00D05B ACROLOOP MOTION CONTROL
+00D05C TECHNOTREND SYSTEMTECHNIK GMBH
+00D05D INTELLIWORXX, INC.
+00D05E STRATABEAM TECHNOLOGY, INC.
+00D05F VALCOM, INC.
+00D060 PANASONIC EUROPEAN
+00D061 TREMON ENTERPRISES CO., LTD.
+00D062 DIGIGRAM
+00D063 CISCO SYSTEMS, INC.
+00D064 MULTITEL
+00D065 TOKO ELECTRIC
+00D066 WINTRISS ENGINEERING CORP.
+00D067 CAMPIO COMMUNICATIONS
+00D068 IWILL CORPORATION
+00D069 TECHNOLOGIC SYSTEMS
+00D06A LINKUP SYSTEMS CORPORATION
+00D06B SR TELECOM INC.
+00D06C SHAREWAVE, INC.
+00D06D ACRISON, INC.
+00D06E TRENDVIEW RECORDERS LTD.
+00D06F KMC CONTROLS
+00D070 LONG WELL ELECTRONICS CORP.
+00D071 ECHELON CORP.
+00D072 BROADLOGIC
+00D073 ACN ADVANCED COMMUNICATIONS
+00D074 TAQUA SYSTEMS, INC.
+00D075 ALARIS MEDICAL SYSTEMS, INC.
+00D076 MERRILL LYNCH & CO., INC.
+00D077 LUCENT TECHNOLOGIES
+00D078 ELTEX OF SWEDEN AB
+00D079 CISCO SYSTEMS, INC.
+00D07A AMAQUEST COMPUTER CORP.
+00D07B COMCAM INTERNATIONAL LTD.
+00D07C KOYO ELECTRONICS INC. CO.,LTD.
+00D07D COSINE COMMUNICATIONS
+00D07E KEYCORP LTD.
+00D07F STRATEGY & TECHNOLOGY, LIMITED
+00D080 EXABYTE CORPORATION
+00D081 REAL TIME DEVICES USA, INC.
+00D082 IOWAVE INC.
+00D083 INVERTEX, INC.
+00D084 NEXCOMM SYSTEMS, INC.
+00D085 OTIS ELEVATOR COMPANY
+00D086 FOVEON, INC.
+00D087 MICROFIRST INC.
+00D088 MAINSAIL NETWORKS, INC.
+00D089 DYNACOLOR, INC.
+00D08A PHOTRON USA
+00D08B ADVA Limited
+00D08C GENOA TECHNOLOGY, INC.
+00D08D PHOENIX GROUP, INC.
+00D08E NVISION INC.
+00D08F ARDENT TECHNOLOGIES, INC.
+00D090 CISCO SYSTEMS, INC.
+00D091 SMARTSAN SYSTEMS, INC.
+00D092 GLENAYRE WESTERN MULTIPLEX
+00D093 TQ - COMPONENTS GMBH
+00D094 TIMELINE VISTA, INC.
+00D095 XYLAN CORPORATION
+00D096 3COM EUROPE LTD.
+00D097 CISCO SYSTEMS, INC.
+00D098 IPS AUTOMATION
+00D099 ELCARD OY
+00D09A FILANET CORPORATION
+00D09B SPECTEL LTD.
+00D09C KAPADIA COMMUNICATIONS
+00D09D VERIS INDUSTRIES
+00D09E 2WIRE, INC.
+00D09F NOVTEK TEST SYSTEMS
+00D0A0 MIPS DENMARK
+00D0A1 OSKAR VIERLING GMBH + CO. KG
+00D0A2 INTEGRATED DEVICE
+00D0A3 VOCAL DATA, INC.
+00D0A4 ALANTRO COMMUNICATIONS
+00D0A5 AMERICAN ARIUM
+00D0A6 LANBIRD TECHNOLOGY CO., LTD.
+00D0A7 TOKYO SOKKI KENKYUJO CO., LTD.
+00D0A8 NETWORK ENGINES, INC.
+00D0A9 SHINANO KENSHI CO., LTD.
+00D0AA CHASE COMMUNICATIONS
+00D0AB DELTAKABEL TELECOM CV
+00D0AC GRAYSON WIRELESS
+00D0AD TL INDUSTRIES
+00D0AE ORESIS COMMUNICATIONS, INC.
+00D0AF CUTLER-HAMMER, INC.
+00D0B0 BITSWITCH LTD.
+00D0B1 OMEGA ELECTRONICS SA
+00D0B2 XIOTECH CORPORATION
+00D0B3 DRS FLIGHT SAFETY AND
+00D0B4 KATSUJIMA CO., LTD.
+00D0B5 DOTCOM
+00D0B6 CRESCENT NETWORKS, INC.
+00D0B7 INTEL CORPOTATION
+00D0B8 IOMEGA CORP.
+00D0B9 MICROTEK INTERNATIONAL, INC.
+00D0BA CISCO SYSTEMS, INC.
+00D0BB CISCO SYSTEMS, INC.
+00D0BC CISCO SYSTEMS, INC.
+00D0BD SICAN GMBH
+00D0BE EMUTEC INC.
+00D0BF PIVOTAL TECHNOLOGIES
+00D0C0 CISCO SYSTEMS, INC.
+00D0C1 HARMONIC DATA SYSTEMS, LTD.
+00D0C2 BALTHAZAR TECHNOLOGY AB
+00D0C3 VIVID TECHNOLOGY PTE, LTD.
+00D0C4 TERATECH CORPORATION
+00D0C5 COMPUTATIONAL SYSTEMS, INC.
+00D0C6 THOMAS & BETTS CORP.
+00D0C7 PATHWAY, INC.
+00D0C8 I/O CONSULTING A/S
+00D0C9 ADVANTECH CO., LTD.
+00D0CA INTRINSYC SOFTWARE INC.
+00D0CB DASAN CO., LTD.
+00D0CC TECHNOLOGIES LYRE INC.
+00D0CD ATAN TECHNOLOGY INC.
+00D0CE ASYST ELECTRONIC
+00D0CF MORETON BAY
+00D0D0 ZHONGXING TELECOM LTD.
+00D0D1 SIROCCO SYSTEMS, INC.
+00D0D2 EPILOG CORPORATION
+00D0D3 CISCO SYSTEMS, INC.
+00D0D4 V-BITS, INC.
+00D0D5 GRUNDIG AG
+00D0D6 AETHRA TELECOMUNICAZIONI
+00D0D7 B2C2, INC.
+00D0D8 3Com Corporation
+00D0D9 DEDICATED MICROCOMPUTERS
+00D0DA TAICOM DATA SYSTEMS CO., LTD.
+00D0DB MCQUAY INTERNATIONAL
+00D0DC MODULAR MINING SYSTEMS, INC.
+00D0DD SUNRISE TELECOM, INC.
+00D0DE PHILIPS MULTIMEDIA NETWORK
+00D0DF KUZUMI ELECTRONICS, INC.
+00D0E0 DOOIN ELECTRONICS CO.
+00D0E1 AVIONITEK ISRAEL INC.
+00D0E2 MRT MICRO, INC.
+00D0E3 ELE-CHEM ENGINEERING CO., LTD.
+00D0E4 CISCO SYSTEMS, INC.
+00D0E5 SOLIDUM SYSTEMS CORP.
+00D0E6 IBOND INC.
+00D0E7 VCON TELECOMMUNICATION LTD.
+00D0E8 MAC SYSTEM CO., LTD.
+00D0E9 ADVANTAGE CENTURY
+00D0EA NEXTONE COMMUNICATIONS, INC.
+00D0EB LIGHTERA NETWORKS, INC.
+00D0EC NAKAYO TELECOMMUNICATIONS, INC
+00D0ED XIOX
+00D0EE DICTAPHONE CORPORATION
+00D0EF IGT
+00D0F0 CONVISION TECHNOLOGY GMBH
+00D0F1 SEGA ENTERPRISES, LTD.
+00D0F2 MONTEREY NETWORKS
+00D0F3 SOLARI DI UDINE SPA
+00D0F4 CARINTHIAN TECH INSTITUTE
+00D0F5 ORANGE MICRO, INC.
+00D0F6 NORTHCHURCH COMMUNICATIONS INC
+00D0F7 NEXT NETS CORPORATION
+00D0F8 FUJIAN STAR TERMINAL
+00D0F9 ACUTE COMMUNICATIONS CORP.
+00D0FA RACAL GUARDATA
+00D0FB TEK MICROSYSTEMS, INCORPORATED
+00D0FC GRANITE MICROSYSTEMS
+00D0FD OPTIMA TELE.COM, INC.
+00D0FE ASTRAL POINT
+00D0FF CISCO SYSTEMS, INC.
+00DD00 UNGERMANN-BASS INC.
+00DD01 UNGERMANN-BASS INC.
+00DD02 UNGERMANN-BASS INC.
+00DD03 UNGERMANN-BASS INC.
+00DD04 UNGERMANN-BASS INC.
+00DD05 UNGERMANN-BASS INC.
+00DD06 UNGERMANN-BASS INC.
+00DD07 UNGERMANN-BASS INC.
+00DD08 UNGERMANN-BASS INC.
+00DD09 UNGERMANN-BASS INC.
+00DD0A UNGERMANN-BASS INC.
+00DD0B UNGERMANN-BASS INC.
+00DD0C UNGERMANN-BASS INC.
+00DD0D UNGERMANN-BASS INC.
+00DD0E UNGERMANN-BASS INC.
+00DD0F UNGERMANN-BASS INC.
+00E000 FUJITSU, LTD
+00E001 STRAND LIGHTING LIMITED
+00E002 CROSSROADS SYSTEMS, INC.
+00E003 NOKIA WIRELESS BUSINESS COMMUN
+00E004 PMC-SIERRA, INC.
+00E005 TECHNICAL CORP.
+00E006 SILICON INTEGRATED SYS. CORP.
+00E007 NETWORK ALCHEMY LTD.
+00E008 AMAZING CONTROLS! INC.
+00E009 MARATHON TECHNOLOGIES CORP.
+00E00A DIBA, INC.
+00E00B ROOFTOP COMMUNICATIONS CORP.
+00E00C MOTOROLA
+00E00D RADIANT SYSTEMS
+00E00E AVALON IMAGING SYSTEMS, INC.
+00E00F SHANGHAI BAUD DATA
+00E010 HESS SB-AUTOMATENBAU GMBH
+00E011 UNIDEN SAN DIEGO
+00E012 PLUTO TECHNOLOGIES
+00E013 EASTERN ELECTRONIC CO., LTD.
+00E014 CISCO SYSTEMS, INC.
+00E015 HEIWA CORPORATION
+00E016 RAPID CITY COMMUNICATIONS
+00E017 EXXACT GMBH
+00E018 ASUSTEK COMPUTER INC.
+00E019 ING. GIORDANO ELETTRONICA
+00E01A COMTEC SYSTEMS. CO., LTD.
+00E01B SPHERE COMMUNICATIONS, INC.
+00E01C MOBILITY ELECTRONICSY
+00E01D WEBTV NETWORKS, INC.
+00E01E CISCO SYSTEMS, INC.
+00E01F AVIDIA SYSTEMS, INC.
+00E020 TECNOMEN OY
+00E021 FREEGATE CORP.
+00E022 MEDIALIGHT INC.
+00E023 TELRAD
+00E024 GADZOOX NETWORKS
+00E025 DIT CO., LTD.
+00E026 EASTMAN KODAK CO.
+00E027 DUX, INC.
+00E028 APTIX CORPORATION
+00E029 STANDARD MICROSYSTEMS CORP.
+00E02A TANDBERG TELEVISION AS
+00E02B EXTREME NETWORKS
+00E02C AST COMPUTER
+00E02D INNOMEDIALOGIC, INC.
+00E02E SPC ELECTRONICS CORPORATION
+00E02F MCNS HOLDINGS, L.P.
+00E030 MELITA INTERNATIONAL CORP.
+00E031 HAGIWARA ELECTRIC CO., LTD.
+00E032 MISYS FINANCIAL SYSTEMS, LTD.
+00E033 E.E.P.D. GMBH
+00E034 CISCO SYSTEMS, INC.
+00E035 LOUGHBOROUGH SOUND IMAGES, PLC
+00E036 PIONEER CORPORATION
+00E037 CENTURY CORPORATION
+00E038 PROXIMA CORPORATION
+00E039 PARADYNE CORP.
+00E03A CABLETRON SYSTEMS, INC.
+00E03B PROMINET CORPORATION
+00E03C ADVANSYS
+00E03D FOCON ELECTRONIC SYSTEMS A/S
+00E03E ALFATECH, INC.
+00E03F JATON CORPORATION
+00E040 DESKSTATION TECHNOLOGY, INC.
+00E041 CSPI
+00E042 PACOM DATA LTD.
+00E043 VITALCOM
+00E044 LSICS CORPORATION
+00E045 TOUCHWAVE, INC.
+00E046 BENTLY NEVADA CORP.
+00E047 INFOCUS SYSTEMS
+00E048 SDL COMMUNICATIONS, INC.
+00E049 MICROWI ELECTRONIC GMBH
+00E04A ENHANCED MESSAGING SYSTEMS,INC
+00E04B JUMP INDUSTRIELLE
+00E04C REALTEK SEMICONDUCTOR CORP.
+00E04D INTERNET INITIATIVE JAPAN, INC
+00E04E SANYO DENKI CO., LTD.
+00E04F CISCO SYSTEMS, INC.
+00E050 EXECUTONE INFORMATION
+00E051 TALX CORPORATION
+00E052 FOUNDRY NETWORKS, INC.
+00E053 CELLPORT LABS, INC.
+00E054 KODAI HITEC CO., LTD.
+00E055 INGENIERIA ELECTRONICA
+00E056 HOLONTECH CORPORATION
+00E057 HAN MICROTELECOM. CO., LTD.
+00E058 PHASE ONE DENMARK A/S
+00E059 CONTROLLED ENVIRONMENTS, LTD.
+00E05A GALEA NETWORK SECURITY
+00E05B WEST END SYSTEMS CORP.
+00E05C MATSUSHITA KOTOBUKI
+00E05D UNITEC CO., LTD.
+00E05E JAPAN AVIATION ELECTRONICS
+00E05F E-NET, INC.
+00E060 SHERWOOD
+00E061 EDGEPOINT NETWORKS, INC.
+00E062 HOST ENGINEERING
+00E063 CABLETRON - YAGO SYSTEMS, INC.
+00E064 SAMSUNG ELECTRONICS
+00E065 OPTICAL ACCESS INTERNATIONAL
+00E066 PROMAX SYSTEMS, INC.
+00E067 EAC AUTOMATION-CONSULTING GMBH
+00E068 MERRIMAC SYSTEMS INC.
+00E069 JAYCOR NETWORKS, INC.
+00E06A KAPSCH AG
+00E06B W&G SPECIAL PRODUCTS
+00E06C BALTIMORE TECHNOLOGIES, LTD.
+00E06D COMPUWARE CORPORATION
+00E06E FAR SYSTEMS SPA
+00E06F TERAYON CORP.
+00E070 DH TECHNOLOGY
+00E071 EPIS MICROCOMPUTER
+00E072 LYNK
+00E073 NATIONAL AMUSEMENT
+00E074 TIERNAN COMMUNICATIONS, INC.
+00E075 ATLAS COMPUTER EQUIPMENT, INC.
+00E076 DEVELOPMENT CONCEPTS, INC.
+00E077 WEBGEAR, INC.
+00E078 BERKELEY NETWORKS
+00E079 A.T.N.R.
+00E07A MIKRODIDAKT AB
+00E07B BAY NETWORKS
+00E07C METTLER-TOLEDO, INC.
+00E07D NETRONIX, INC.
+00E07E WALT DISNEY IMAGINEERING
+00E07F LOGISTISTEM SRL
+00E080 CONTROL RESOURCES CORPORATION
+00E081 TYAN COMPUTER CORP.
+00E082 ANERMA
+00E083 JATO TECHNOLOGIES, INC.
+00E084 COMPULITE R&D
+00E085 GLOBAL MAINTECH, INC.
+00E086 CYBEX COMPUTER PRODUCTS
+00E087 LECROY
+00E088 LTX CORPORATION
+00E089 ION Networks, Inc.
+00E08A GEC AVERY, LTD.
+00E08B QLOGIC CORP.
+00E08C NEOPARADIGM LABS, INC.
+00E08D PRESSURE SYSTEMS, INC.
+00E08E UTSTARCOM
+00E08F CISCO SYSTEMS, INC.
+00E090 BECKMAN LAB. AUTOMATION DIV.
+00E091 LG ELECTRONICS, INC.
+00E092 ADMTEK INCORPORATED
+00E093 ACKFIN NETWORKS
+00E094 OSAI SRL
+00E095 ADVANCED-VISION TECHNOLGIES
+00E096 SHIMADZU CORPORATION
+00E097 CARRIER ACCESS CORPORATION
+00E098 ABOCOM SYSTEMS, INC.
+00E099 SAMSON AG
+00E09A POSITRON INDUSTRIES, INC.
+00E09B ENGAGE NETWORKS, INC.
+00E09C MII
+00E09D SARNOFF CORPORATION
+00E09E QUANTUM CORPORATION
+00E09F PIXEL VISION
+00E0A0 WILTRON CO.
+00E0A1 HIMA PAUL HILDEBRANDT
+00E0A2 MICROSLATE INC.
+00E0A3 CISCO SYSTEMS, INC.
+00E0A4 ESAOTE S.P.A.
+00E0A5 COMCORE SEMICONDUCTOR, INC.
+00E0A6 TELOGY NETWORKS, INC.
+00E0A7 IPC INFORMATION SYSTEMS, INC.
+00E0A8 SAT GMBH&CO
+00E0A9 FUNAI ELECTRIC CO., LTD.
+00E0AA ELECTROSONIC LTD.
+00E0AB DIMAT S.A.
+00E0AC MIDSCO, INC.
+00E0AD EES TECHNOLOGY, LTD.
+00E0AE XAQTI CORPORATION
+00E0AF GENERAL DYNAMICS INFORMATION
+00E0B0 CISCO SYSTEMS, INC.
+00E0B1 PACKET ENGINES, INC.
+00E0B2 TELMAX COMMUNICATIONS CORP.
+00E0B3 ETHERWAN SYSTEMS, INC.
+00E0B4 TECHNO SCOPE CO., LTD.
+00E0B5 ARDENT COMMUNICATIONS CORP.
+00E0B6 Entrada Networks
+00E0B7 PI GROUP, LTD.
+00E0B8 GATEWAY 2000
+00E0B9 BYAS SYSTEMS
+00E0BA BERGHOF AUTOMATIONSTECHNIK
+00E0BB NBX CORPORATION
+00E0BC SYMON COMMUNICATIONS, INC.
+00E0BD INTERFACE SYSTEMS, INC.
+00E0BE GENROCO INTERNATIONAL, INC.
+00E0BF TORRENT NETWORKING
+00E0C0 SEIWA ERECTRIC MFG. CO., LTD.
+00E0C1 MEMOREX TELEX JAPAN, LTD.
+00E0C2 NECSY SPA
+00E0C3 SAKAI SYSTEM DEVELOPMENT CORP.
+00E0C4 HORNER ELECTRIC, INC.
+00E0C5 BCOM ELECTRONICS INC.
+00E0C6 LINK2IT, L.L.C.
+00E0C7 EUROTECH SRL
+00E0C8 VIRTUAL ACCESS, LTD.
+00E0C9 AUTOMATEDLOGIC CORPORATION
+00E0CA BEST DATA PRODUCTS
+00E0CB RESON, INC.
+00E0CC HERO SYSTEMS, LTD.
+00E0CD SENSIS CORPORATION
+00E0CE ARN
+00E0CF INTEGRATED DEVICE
+00E0D0 NETSPEED, INC.
+00E0D1 TELSIS LIMITED
+00E0D2 VERSANET COMMUNICATIONS, INC.
+00E0D3 DATENTECHNIK GMBH
+00E0D4 EXCELLENT COMPUTER
+00E0D5 ARCXEL TECHNOLOGIES, INC.
+00E0D6 COMPUTER & COMMUNICATION
+00E0D7 SUNSHINE ELECTRONICS, INC.
+00E0D8 LANBIT COMPUTER, INC.
+00E0D9 TAZMO CO., LTD.
+00E0DA ASSURED ACCESS
+00E0DB VIAVIDEO COMMUNICATIONS
+00E0DC NEXWARE CORP.
+00E0DD ZENITH ELECTRONICS CORPORATION
+00E0DE DATAX NV
+00E0DF KE KOMMUNIKATIONS-ELECTRONIK
+00E0E0 SI ELECTRONICS, LTD.
+00E0E1 G2 NETWORKS, ILNC.
+00E0E2 INNOVA CORP.
+00E0E3 SK-ELEKTRONIK GMBH
+00E0E4 FANUC ROBOTICS NORTH AMERICA,
+00E0E5 CINCO NETWORKS, INC.
+00E0E6 INCAA DATACOM B.V.
+00E0E7 RAYTHEON E-SYSTEMS, INC.
+00E0E8 GRETACODER DATA SYSTEMS AG
+00E0E9 DATA LABS, INC.
+00E0EA INNOVAT COMMUNICATIONS, INC.
+00E0EB DIGICOM SYSTEMS, INCORPORATED
+00E0EC CELESTICA INC.
+00E0ED SILICOM, LTD.
+00E0EE MAREL HF
+00E0EF DIONEX
+00E0F0 ABLER TECHNOLOGY, INC.
+00E0F1 THAT CORPORATION
+00E0F2 ARLOTTO COMNET, INC.
+00E0F3 WEBSPRINT COMMUNICATIONS, INC.
+00E0F4 INSIDE TECHNOLOGY A/S
+00E0F5 TELES AG
+00E0F6 DECISION EUROPE
+00E0F7 CISCO SYSTEMS, INC.
+00E0F8 DIANA CONTROL AB
+00E0F9 CISCO SYSTEMS, INC.
+00E0FA TRL TECHNOLOGY, LTD.
+00E0FB LEIGHTRONIX, INC.
+00E0FC HUAWEI TECHNOLOGIES CO., LTD.
+00E0FD A-TREND TECHNOLOGY CO., LTD.
+00E0FE CISCO SYSTEMS, INC.
+00E0FF SECURITY DYNAMICS TECHNOLOGIES
+00E6D3 NIXDORF COMPUTER CORP.
+020701 RACAL-DATACOM
+021C7C PERQ SYSTEMS CORPORATION
+026086 LOGIC REPLACEMENT TECH. LTD.
+02608C 3COM CORPORATION
+027001 RACAL-DATACOM
+0270B0 M/A-COM INC. COMPANIES
+0270B3 DATA RECALL LTD
+029D8E CARDIAC RECORDERS INC.
+02AA3C OLIVETTI TELECOMM SPA (OLTECO)
+02BB01 OCTOTHORPE CORP.
+02C08C 3COM CORPORATION
+02CF1C COMMUNICATION MACHINERY CORP.
+02E6D3 NIXDORF COMPUTER CORPORATION
+040AE0 XMIT AG COMPUTER NETWORKS
+04E0C4 TRIUMPH-ADLER AG
+080001 COMPUTERVISION CORPORATION
+080002 BRIDGE COMMUNICATIONS INC.
+080003 ADVANCED COMPUTER COMM.
+080004 CROMEMCO INCORPORATED
+080005 SYMBOLICS INC.
+080006 SIEMENS AG
+080007 APPLE COMPUTER INC.
+080008 BOLT BERANEK AND NEWMAN INC.
+080009 HEWLETT PACKARD
+08000A NESTAR SYSTEMS INCORPORATED
+08000B UNISYS CORPORATION
+08000C MIKLYN DEVELOPMENT CO.
+08000D INTERNATIONAL COMPUTERS LTD.
+08000E NCR CORPORATION
+08000F MITEL CORPORATION
+080011 TEKTRONIX INC.
+080012 BELL ATLANTIC INTEGRATED SYST.
+080013 EXXON
+080014 EXCELAN
+080015 STC BUSINESS SYSTEMS
+080016 BARRISTER INFO SYS CORP
+080017 NATIONAL SEMICONDUCTOR
+080018 PIRELLI FOCOM NETWORKS
+080019 GENERAL ELECTRIC CORPORATION
+08001A TIARA/ 10NET
+08001B DATA GENERAL
+08001C KDD-KOKUSAI DEBNSIN DENWA CO.
+08001D ABLE COMMUNICATIONS INC.
+08001E APOLLO COMPUTER INC.
+08001F SHARP CORPORATION
+080020 SUN MICROSYSTEMS INC.
+080021 3M COMPANY
+080022 NBI INC.
+080023 MATSUHITA GRAPHIC COMM SYS INC
+080024 10NET COMMUNICATIONS/DCA
+080025 CONTROL DATA
+080026 NORSK DATA A.S.
+080027 CADMUS COMPUTER SYSTEMS
+080028 TEXAS INSTRUMENTS
+080029 MEGATEK CORPORATION
+08002A MOSAIC TECHNOLOGIES INC.
+08002B DIGITAL EQUIPMENT CORPORATION
+08002C BRITTON LEE INC.
+08002D LAN-TEC INC.
+08002E METAPHOR COMPUTER SYSTEMS
+08002F PRIME COMPUTER INC.
+080030 NETWORK RESEARCH CORPORATION
+080030 CERN
+080030 ROYAL MELBOURNE INST OF TECH
+080031 LITTLE MACHINES INC.
+080032 TIGAN INCORPORATED
+080033 BAUSCH & LOMB
+080034 FILENET CORPORATION
+080035 MICROFIVE CORPORATION
+080036 INTERGRAPH CORPORATION
+080037 FUJI-XEROX CO. LTD.
+080038 CII HONEYWELL BULL
+080039 SPIDER SYSTEMS LIMITED
+08003A ORCATECH INC.
+08003B TORUS SYSTEMS LIMITED
+08003C SCHLUMBERGER WELL SERVICES
+08003D CADNETIX CORPORATIONS
+08003E CODEX CORPORATION
+08003F FRED KOSCHARA ENTERPRISES
+080040 FERRANTI COMPUTER SYS. LIMITED
+080041 RACAL-MILGO INFORMATION SYS..
+080042 JAPAN MACNICS CORP.
+080043 PIXEL COMPUTER INC.
+080044 DAVID SYSTEMS INC.
+080045 CONCURRENT COMPUTER CORP.
+080046 SONY CORPORATION LTD.
+080047 SEQUENT COMPUTER SYSTEMS INC.
+080048 EUROTHERM GAUGING SYSTEMS
+080049 UNIVATION
+08004A BANYAN SYSTEMS INC.
+08004B PLANNING RESEARCH CORP.
+08004C HYDRA COMPUTER SYSTEMS INC.
+08004D CORVUS SYSTEMS INC.
+08004E 3COM EUROPE LTD.
+08004F CYGNET SYSTEMS
+080050 DAISY SYSTEMS CORP.
+080051 EXPERDATA
+080052 INSYSTEC
+080053 MIDDLE EAST TECH. UNIVERSITY
+080055 STANFORD TELECOMM. INC.
+080056 STANFORD LINEAR ACCEL. CENTER
+080057 EVANS & SUTHERLAND
+080058 SYSTEMS CONCEPTS
+080059 A/S MYCRON
+08005A IBM CORPORATION
+08005B VTA TECHNOLOGIES INC.
+08005C FOUR PHASE SYSTEMS
+08005D GOULD INC.
+08005E COUNTERPOINT COMPUTER INC.
+08005F SABER TECHNOLOGY CORP.
+080060 INDUSTRIAL NETWORKING INC.
+080061 JAROGATE LTD.
+080062 GENERAL DYNAMICS
+080063 PLESSEY
+080064 AUTOPHON AG
+080065 GENRAD INC.
+080066 AGFA CORPORATION
+080067 COMDESIGN
+080068 RIDGE COMPUTERS
+080069 SILICON GRAPHICS INC.
+08006A ATT BELL LABORATORIES
+08006B ACCEL TECHNOLOGIES INC.
+08006C SUNTEK TECHNOLOGY INT'L
+08006D WHITECHAPEL COMPUTER WORKS
+08006E MASSCOMP
+08006F PHILIPS APELDOORN B.V.
+080070 MITSUBISHI ELECTRIC CORP.
+080071 MATRA (DSIE)
+080072 XEROX CORP UNIV GRANT PROGRAM
+080073 TECMAR INC.
+080074 CASIO COMPUTER CO. LTD.
+080075 DANSK DATA ELECTRONIK
+080076 PC LAN TECHNOLOGIES
+080077 TSL COMMUNICATIONS LTD.
+080078 ACCELL CORPORATION
+080079 THE DROID WORKS
+08007A INDATA
+08007B SANYO ELECTRIC CO. LTD.
+08007C VITALINK COMMUNICATIONS CORP.
+08007E AMALGAMATED WIRELESS(AUS) LTD
+08007F CARNEGIE-MELLON UNIVERSITY
+080080 AES DATA INC.
+080081 ,ASTECH INC.
+080082 VERITAS SOFTWARE
+080083 SEIKO INSTRUM. AND ELECTRONICS
+080084 TOMEN ELECTRONICS CORP.
+080085 ELXSI
+080086 IMAGEN CORPORATION
+080087 XYPLEX
+080088 MCDATA CORPORATION
+080089 KINETICS
+08008A PERFORMANCE TECHNOLOGY
+08008B PYRAMID TECHNOLOGY CORP.
+08008C NETWORK RESEARCH CORPORATION
+08008D XYVISION INC.
+08008E TANDEM COMPUTERS
+08008F CHIPCOM CORPORATION
+080090 SONOMA SYSTEMS
+08BBCC AK-NORD EDV VERTRIEBSGES. MBH
+10005A IBM CORPORATION
+1000E8 NATIONAL SEMICONDUCTOR
+800010 ATT BELL LABORATORIES
+A06A00 Verilink Corporation
+AA0000 DIGITAL EQUIPMENT CORPORATION
+AA0001 DIGITAL EQUIPMENT CORPORATION
+AA0002 DIGITAL EQUIPMENT CORPORATION
+AA0003 DIGITAL EQUIPMENT CORPORATION
+AA0004 DIGITAL EQUIPMENT CORPORATION
diff -Nru a/drivers/ieee1394/oui2c.sh b/drivers/ieee1394/oui2c.sh
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/ieee1394/oui2c.sh	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+cat <<EOF
+/* Generated file for OUI database */
+
+#include <linux/config.h>
+
+#ifdef CONFIG_IEEE1394_OUI_DB
+struct oui_list_struct {
+	int oui;
+	char *name;
+} oui_list[] = {
+EOF
+
+while read oui name; do
+	echo "	{ 0x$oui, \"$name\" },"
+done
+
+cat <<EOF
+};
+
+#endif /* CONFIG_IEEE1394_OUI_DB */
+EOF
diff -Nru a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
--- a/drivers/ieee1394/pcilynx.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/ieee1394/pcilynx.c	Sun Dec 15 18:08:29 2002
@@ -19,6 +19,16 @@
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
+/*
+ * Contributions:
+ *
+ * Manfred Weihs <weihs@ict.tuwien.ac.at>
+ *        reading bus info block (containing GUID) from serial 
+ *            eeprom via i2c and storing it in config ROM
+ *        Reworked code for initiating bus resets
+ *            (long, short, with or without hold-off)
+ */
+
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -450,7 +460,7 @@
 
         if (host->in_bus_reset) return; /* in bus reset again */
 
-        if (isroot) reg_set_bits(lynx, LINK_CONTROL, LINK_CONTROL_CYCMASTER);
+        if (isroot) reg_set_bits(lynx, LINK_CONTROL, LINK_CONTROL_CYCMASTER); //FIXME: I do not think, we need this here
         reg_set_bits(lynx, LINK_CONTROL,
                      LINK_CONTROL_RCV_CMP_VALID | LINK_CONTROL_TX_ASYNC_EN
                      | LINK_CONTROL_RX_ASYNC_EN | LINK_CONTROL_CYCTIMEREN);
@@ -563,6 +573,7 @@
         struct hpsb_packet *packet;
 	LIST_HEAD(packet_list);
         unsigned long flags;
+	int phy_reg;
 
         switch (cmd) {
         case RESET_BUS:
@@ -571,21 +582,140 @@
                         break;
                 }
 
-                if (arg) {
-                        arg = 3 << 6;
-                } else {
-                        arg = 1 << 6;
-                }
-
-                retval = get_phy_reg(lynx, 1);
-                arg |= (retval == -1 ? 63 : retval);
-                retval = 0;
-
-                PRINT(KERN_INFO, lynx->id, "resetting bus on request");
+		switch (arg) {
+		case SHORT_RESET:
+			if (lynx->phyic.reg_1394a) {
+				phy_reg = get_phy_reg(lynx, 5);
+				if (phy_reg == -1) {
+					PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+					retval = -1;
+					break;
+				}
+				phy_reg |= 0x40;
+
+				PRINT(KERN_INFO, lynx->id, "resetting bus (short bus reset) on request");
+
+				lynx->selfid_size = -1;
+				lynx->phy_reg0 = -1;
+				set_phy_reg(lynx, 5, phy_reg); /* set ISBR */
+				break;
+			} else {
+				PRINT(KERN_INFO, lynx->id, "cannot do short bus reset, because of old phy");
+				/* fall through to long bus reset */
+			}
+		case LONG_RESET:
+			phy_reg = get_phy_reg(lynx, 1);
+			if (phy_reg == -1) {
+				PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+				retval = -1;
+				break;
+			}
+			phy_reg |= 0x40;
+
+			PRINT(KERN_INFO, lynx->id, "resetting bus (long bus reset) on request");
+
+			lynx->selfid_size = -1;
+			lynx->phy_reg0 = -1;
+			set_phy_reg(lynx, 1, phy_reg); /* clear RHB, set IBR */
+			break;
+		case SHORT_RESET_NO_FORCE_ROOT:
+			if (lynx->phyic.reg_1394a) {
+				phy_reg = get_phy_reg(lynx, 1);
+				if (phy_reg == -1) {
+					PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+					retval = -1;
+					break;
+				}
+				if (phy_reg & 0x80) {
+					phy_reg &= ~0x80;
+					set_phy_reg(lynx, 1, phy_reg); /* clear RHB */
+				}
+
+				phy_reg = get_phy_reg(lynx, 5);
+				if (phy_reg == -1) {
+					PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+					retval = -1;
+					break;
+				}
+				phy_reg |= 0x40;
+
+				PRINT(KERN_INFO, lynx->id, "resetting bus (short bus reset, no force_root) on request");
+
+				lynx->selfid_size = -1;
+				lynx->phy_reg0 = -1;
+				set_phy_reg(lynx, 5, phy_reg); /* set ISBR */
+				break;
+			} else {
+				PRINT(KERN_INFO, lynx->id, "cannot do short bus reset, because of old phy");
+				/* fall through to long bus reset */
+			}
+		case LONG_RESET_NO_FORCE_ROOT:
+			phy_reg = get_phy_reg(lynx, 1);
+			if (phy_reg == -1) {
+				PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+				retval = -1;
+				break;
+			}
+			phy_reg &= ~0x80;
+			phy_reg |= 0x40;
+
+			PRINT(KERN_INFO, lynx->id, "resetting bus (long bus reset, no force_root) on request");
+
+			lynx->selfid_size = -1;
+			lynx->phy_reg0 = -1;
+			set_phy_reg(lynx, 1, phy_reg); /* clear RHB, set IBR */
+			break;
+		case SHORT_RESET_FORCE_ROOT:
+			if (lynx->phyic.reg_1394a) {
+				phy_reg = get_phy_reg(lynx, 1);
+				if (phy_reg == -1) {
+					PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+					retval = -1;
+					break;
+				}
+				if (!(phy_reg & 0x80)) {
+					phy_reg |= 0x80;
+					set_phy_reg(lynx, 1, phy_reg); /* set RHB */
+				}
+
+				phy_reg = get_phy_reg(lynx, 5);
+				if (phy_reg == -1) {
+					PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+					retval = -1;
+					break;
+				}
+				phy_reg |= 0x40;
+
+				PRINT(KERN_INFO, lynx->id, "resetting bus (short bus reset, force_root set) on request");
+
+				lynx->selfid_size = -1;
+				lynx->phy_reg0 = -1;
+				set_phy_reg(lynx, 5, phy_reg); /* set ISBR */
+				break;
+			} else {
+				PRINT(KERN_INFO, lynx->id, "cannot do short bus reset, because of old phy");
+				/* fall through to long bus reset */
+			}
+		case LONG_RESET_FORCE_ROOT:
+			phy_reg = get_phy_reg(lynx, 1);
+			if (phy_reg == -1) {
+				PRINT(KERN_ERR, lynx->id, "cannot reset bus, because read phy reg failed");
+				retval = -1;
+				break;
+			}
+			phy_reg |= 0xc0;
+
+			PRINT(KERN_INFO, lynx->id, "resetting bus (long bus reset, force_root set) on request");
+
+			lynx->selfid_size = -1;
+			lynx->phy_reg0 = -1;
+			set_phy_reg(lynx, 1, phy_reg); /* set IBR and RHB */
+			break;
+		default:
+			PRINT(KERN_ERR, lynx->id, "unknown argument for reset_bus command %d", arg);
+			retval = -1;
+		}
 
-                lynx->selfid_size = -1;
-                lynx->phy_reg0 = -1;
-                set_phy_reg(lynx, 1, arg);
                 break;
 
         case GET_CYCLE_COUNTER:
@@ -1706,6 +1836,7 @@
         .get_rom =         get_lynx_rom,
         .transmit_packet = lynx_transmit,
         .devctl =          lynx_devctl,
+	.isoctl =          NULL,
 };
 
 MODULE_AUTHOR("Andreas E. Bombe <andreas.bombe@munich.netsurf.de>");
diff -Nru a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
--- a/drivers/ieee1394/raw1394.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/raw1394.c	Sun Dec 15 18:08:28 2002
@@ -37,6 +37,7 @@
 #include <linux/init.h>
 #include <linux/version.h>
 #include <linux/smp_lock.h>
+#include <linux/interrupt.h>
 #include <asm/uaccess.h>
 #include <asm/atomic.h>
 #include <linux/devfs_fs_kernel.h>
@@ -46,6 +47,7 @@
 #include "ieee1394_core.h"
 #include "hosts.h"
 #include "highlevel.h"
+#include "iso.h"
 #include "ieee1394_transactions.h"
 #include "raw1394.h"
 
@@ -90,10 +92,10 @@
 static int arm_lock64 (struct hpsb_host *host, int nodeid, octlet_t *store,
                u64 addr, octlet_t data, octlet_t arg, int ext_tcode, u16 flags);
 static struct hpsb_address_ops arm_ops = {
-        .read     = arm_read,
-        .write    = arm_write,
-        .lock     = arm_lock,
-        .lock64   = arm_lock64,
+	.read	= arm_read,
+	.write	= arm_write,
+	.lock	= arm_lock,
+	.lock64	= arm_lock64,
 };
 
 static void queue_complete_cb(struct pending_request *req);
@@ -107,7 +109,6 @@
         if (req != NULL) {
                 memset(req, 0, sizeof(struct pending_request));
                 INIT_LIST_HEAD(&req->list);
-                HPSB_INIT_WORK(&req->tq, (void(*)(void*))queue_complete_cb, NULL);
         }
 
         return req;
@@ -132,18 +133,25 @@
         kfree(req);
 }
 
+/* fi->reqlists_lock must be taken */
+static void __queue_complete_req(struct pending_request *req)
+{
+	struct file_info *fi = req->file_info;
+	list_del(&req->list);
+        list_add_tail(&req->list, &fi->req_complete);
+
+	up(&fi->complete_sem);
+        wake_up_interruptible(&fi->poll_wait_complete);
+}
+
 static void queue_complete_req(struct pending_request *req)
 {
         unsigned long flags;
         struct file_info *fi = req->file_info;
 
         spin_lock_irqsave(&fi->reqlists_lock, flags);
-        list_del(&req->list);
-        list_add_tail(&req->list, &fi->req_complete);
+	__queue_complete_req(req);
         spin_unlock_irqrestore(&fi->reqlists_lock, flags);
-
-        up(&fi->complete_sem);
-        wake_up_interruptible(&fi->poll_wait_complete);
 }
 
 static void queue_complete_cb(struct pending_request *req)
@@ -171,8 +179,11 @@
                 req->req.length = 0;
         }
 
-        if (req->req.type != RAW1394_REQ_PHYPACKET)
-                free_tlabel(packet->host, packet->node_id, packet->tlabel);
+        if ((req->req.type == RAW1394_REQ_ASYNC_READ) ||
+	    (req->req.type == RAW1394_REQ_ASYNC_WRITE) ||
+	    (req->req.type == RAW1394_REQ_LOCK) ||
+	    (req->req.type == RAW1394_REQ_LOCK64))
+                hpsb_free_tlabel(packet);
 
         queue_complete_req(req);
 }
@@ -183,7 +194,8 @@
         struct host_info *hi;
         unsigned long flags;
 
-        hi = (struct host_info *)kmalloc(sizeof(struct host_info), SLAB_KERNEL);
+        hi = (struct host_info *)kmalloc(sizeof(struct host_info),
+		in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
         if (hi != NULL) {
                 INIT_LIST_HEAD(&hi->list);
                 hi->host = host;
@@ -642,47 +654,39 @@
 
         switch (req->req.type) {
         case RAW1394_REQ_ASYNC_READ:
-                if (req->req.length == 4) {
-                        DBGMSG("quadlet_read_request called");        
-                        packet = hpsb_make_readqpacket(fi->host, node, addr);
-                        if (!packet) return -ENOMEM;
+		DBGMSG("read_request called");
+		packet = hpsb_make_readpacket(fi->host, node, addr, req->req.length);
 
-                        req->data = &packet->header[3];
-                } else {
-                        DBGMSG("block_read_request called");
-                        packet = hpsb_make_readbpacket(fi->host, node, addr,
-                                                       req->req.length);
-                        if (!packet) return -ENOMEM;
+		if (!packet)
+			return -ENOMEM;
 
-                        req->data = packet->data;
-                }
+		if (req->req.length == 4)
+			req->data = &packet->header[3];
+		else
+			req->data = packet->data;
+  
                 break;
 
-        case RAW1394_REQ_ASYNC_WRITE:
-                if (req->req.length == 4) {
-                        quadlet_t x;
-
-                        DBGMSG("quadlet_write_request called");
-                        if (copy_from_user(&x, int2ptr(req->req.sendb), 4)) {
-                                req->req.error = RAW1394_ERROR_MEMFAULT;
-                        }
+	case RAW1394_REQ_ASYNC_WRITE:
+		DBGMSG("write_request called");
 
-                        packet = hpsb_make_writeqpacket(fi->host, node, addr,
-                                                        x);
-                        if (!packet) return -ENOMEM;
-                } else {
-                        DBGMSG("block_write_request called");
-                        packet = hpsb_make_writebpacket(fi->host, node, addr,
-                                                        req->req.length);
-                        if (!packet) return -ENOMEM;
-
-                        if (copy_from_user(packet->data, int2ptr(req->req.sendb),
-                                           req->req.length)) {
-                                req->req.error = RAW1394_ERROR_MEMFAULT;
-                        }
-                }
-                req->req.length = 0;
-                break;
+		packet = hpsb_make_writepacket(fi->host, node, addr, NULL,
+					       req->req.length);
+		if (!packet)
+			return -ENOMEM;
+
+		if (req->req.length == 4) {
+			if (copy_from_user(&packet->header[3], int2ptr(req->req.sendb),
+					req->req.length))
+				req->req.error = RAW1394_ERROR_MEMFAULT;
+		} else {
+			if (copy_from_user(packet->data, int2ptr(req->req.sendb),
+					req->req.length))
+				req->req.error = RAW1394_ERROR_MEMFAULT;
+		}
+			
+		req->req.length = 0;
+	    break;
 
         case RAW1394_REQ_LOCK:
                 DBGMSG("lock_request called");
@@ -700,7 +704,7 @@
                 }
 
                 packet = hpsb_make_lockpacket(fi->host, node, addr,
-                                              req->req.misc);
+                                              req->req.misc, NULL, 0);
                 if (!packet) return -ENOMEM;
 
                 if (copy_from_user(packet->data, int2ptr(req->req.sendb),
@@ -728,7 +732,7 @@
                         }
                 }
                 packet = hpsb_make_lock64packet(fi->host, node, addr,
-                                                req->req.misc);
+                                                req->req.misc, NULL, 0);
                 if (!packet) return -ENOMEM;
 
                 if (copy_from_user(packet->data, int2ptr(req->req.sendb),
@@ -753,8 +757,7 @@
                 return sizeof(struct raw1394_request);
         }
 
-        req->tq.data = req;
-        hpsb_add_packet_complete_task(packet, &req->tq);
+	hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req);
 
         spin_lock_irq(&fi->reqlists_lock);
         list_add_tail(&req->list, &fi->req_pending);
@@ -765,7 +768,7 @@
         if (!hpsb_send_packet(packet)) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 req->req.length = 0;
-                free_tlabel(packet->host, packet->node_id, packet->tlabel);
+                hpsb_free_tlabel(packet);
                 queue_complete_req(req);
         }
         return sizeof(struct raw1394_request);
@@ -776,15 +779,14 @@
 {
         struct hpsb_packet *packet;
 
-        packet = alloc_hpsb_packet(req->req.length);
-        if (!packet) return -ENOMEM;
-        req->packet = packet;
+	packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f,
+				     (req->req.misc >> 16) & 0x3, req->req.misc & 0xf);
+	if (!packet)
+		return -ENOMEM;
 
-        fill_iso_packet(packet, req->req.length, channel & 0x3f,
-                        (req->req.misc >> 16) & 0x3, req->req.misc & 0xf);
-        packet->type = hpsb_iso;
         packet->speed_code = req->req.address & 0x3;
-        packet->host = fi->host;
+
+	req->packet = packet;
 
         if (copy_from_user(packet->data, int2ptr(req->req.sendb),
                            req->req.length)) {
@@ -794,16 +796,15 @@
                 return sizeof(struct raw1394_request);
         }
 
-	HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req);
         req->req.length = 0;
-	hpsb_add_packet_complete_task(packet, &req->tq);
+	hpsb_set_packet_complete_task(packet, (void (*)(void*))queue_complete_req, req);
 
         spin_lock_irq(&fi->reqlists_lock);
         list_add_tail(&req->list, &fi->req_pending);
         spin_unlock_irq(&fi->reqlists_lock);
 
 	/* Update the generation of the packet just before sending. */
-	packet->generation = get_hpsb_generation(fi->host);
+	packet->generation = req->req.generation;
 
         if (!hpsb_send_packet(packet)) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
@@ -857,16 +858,15 @@
         packet->header_size=header_length;
         packet->data_size=req->req.length-header_length;
 
-	HPSB_PREPARE_WORK(&req->tq, (void (*)(void*))queue_complete_req, req);
         req->req.length = 0;
-        hpsb_add_packet_complete_task(packet, &req->tq);
+        hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req);
 
         spin_lock_irq(&fi->reqlists_lock);
         list_add_tail(&req->list, &fi->req_pending);
         spin_unlock_irq(&fi->reqlists_lock);
 
         /* Update the generation of the packet just before sending. */
-        packet->generation = get_hpsb_generation(fi->host);
+        packet->generation = req->req.generation;
 
         if (!hpsb_send_packet(packet)) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
@@ -1806,8 +1806,7 @@
         if (!packet) return -ENOMEM;
         req->req.length=0;
         req->packet=packet;
-        req->tq.data=req;
-        hpsb_add_packet_complete_task(packet, &req->tq);
+        hpsb_set_packet_complete_task(packet, (void(*)(void*))queue_complete_cb, req);
         spin_lock_irq(&fi->reqlists_lock);
         list_add_tail(&req->list, &fi->req_pending);
         spin_unlock_irq(&fi->reqlists_lock);
@@ -1997,6 +1996,234 @@
         return retval;
 }
 
+/* rawiso operations */
+
+/* check if any RAW1394_REQ_RAWISO_ACTIVITY event is already in the
+ * completion queue (reqlists_lock must be taken) */
+static inline int __rawiso_event_in_queue(struct file_info *fi)
+{
+	struct list_head *lh;
+	struct pending_request *req;
+	
+	list_for_each(lh, &fi->req_complete) {
+		req = list_entry(lh, struct pending_request, list);
+		if(req->req.type == RAW1394_REQ_RAWISO_ACTIVITY) {
+			return 1;
+		}
+	}
+
+	return 0;
+}
+
+static void rawiso_activity_cb(struct hpsb_iso *iso)
+{
+	unsigned long host_flags;
+        struct list_head *lh;
+        struct host_info *hi;
+
+        spin_lock_irqsave(&host_info_lock, host_flags);
+        hi = find_host_info(iso->host);
+	
+	if (hi != NULL) {
+		list_for_each(lh, &hi->file_info_list) {
+			unsigned long reqlist_flags;
+			struct file_info *fi = list_entry(lh, struct file_info, list);
+			
+			spin_lock_irqsave(&fi->reqlists_lock, reqlist_flags);
+
+			/* only one ISO activity event may be in the queue */
+			if(!__rawiso_event_in_queue(fi)) {
+				struct pending_request *req = __alloc_pending_request(SLAB_ATOMIC);
+
+				if(req) {
+					req->file_info = fi;
+					req->req.type = RAW1394_REQ_RAWISO_ACTIVITY;
+					req->req.generation = get_hpsb_generation(iso->host);
+					__queue_complete_req(req);
+				} else {
+					/* on allocation failure, signal an overflow */
+					if(fi->iso_handle) {
+						atomic_inc(&fi->iso_handle->overflows);
+					}
+				}
+			}
+			spin_unlock_irqrestore(&fi->reqlists_lock, reqlist_flags);
+		}
+	}
+	
+	spin_unlock_irqrestore(&host_info_lock, host_flags);
+}
+
+/* helper function - gather all the kernel iso status bits for returning to user-space */
+static void raw1394_iso_fill_status(struct hpsb_iso *iso, struct raw1394_iso_status *stat)
+{
+	stat->config.buf_packets = iso->buf_packets;
+	stat->config.max_packet_size = iso->max_packet_size;
+	stat->config.channel = iso->channel;
+	stat->config.speed = iso->speed;
+	stat->config.irq_interval = iso->irq_interval;
+	stat->buf_stride = iso->buf_stride;
+	stat->packet_data_offset = iso->packet_data_offset;
+	stat->packet_info_offset = iso->packet_info_offset;
+	stat->first_packet = iso->first_packet;
+	stat->n_packets = hpsb_iso_n_ready(iso);
+	stat->overflows = atomic_read(&iso->overflows);
+}
+
+static int raw1394_iso_xmit_init(struct file_info *fi, void *uaddr)
+{
+	struct raw1394_iso_status stat;
+
+	if(copy_from_user(&stat, uaddr, sizeof(stat)))
+		return -EFAULT;
+	
+	fi->iso_handle = hpsb_iso_xmit_init(fi->host,
+					    stat.config.buf_packets,
+					    stat.config.max_packet_size,
+					    stat.config.channel,
+					    stat.config.speed,
+					    stat.config.irq_interval,
+					    rawiso_activity_cb);
+	if(!fi->iso_handle)
+		return -ENOMEM;
+
+	fi->iso_state = RAW1394_ISO_XMIT;
+	
+	raw1394_iso_fill_status(fi->iso_handle, &stat);
+	if(copy_to_user(uaddr, &stat, sizeof(stat)))
+		return -EFAULT;
+
+	/* queue an event to get things started */
+	rawiso_activity_cb(fi->iso_handle);
+	
+	return 0;
+}
+
+static int raw1394_iso_recv_init(struct file_info *fi, void *uaddr)
+{
+	struct raw1394_iso_status stat;
+
+	if(copy_from_user(&stat, uaddr, sizeof(stat)))
+		return -EFAULT;
+	
+	fi->iso_handle = hpsb_iso_recv_init(fi->host,
+					    stat.config.buf_packets,
+					    stat.config.max_packet_size,
+					    stat.config.channel,
+					    stat.config.irq_interval,
+					    rawiso_activity_cb);
+	if(!fi->iso_handle)
+		return -ENOMEM;
+
+	fi->iso_state = RAW1394_ISO_RECV;
+	
+	raw1394_iso_fill_status(fi->iso_handle, &stat);
+	if(copy_to_user(uaddr, &stat, sizeof(stat)))
+		return -EFAULT;
+	return 0;
+}
+
+static int raw1394_iso_get_status(struct file_info *fi, void *uaddr)
+{
+	struct raw1394_iso_status stat;
+	struct hpsb_iso *iso = fi->iso_handle;
+
+	raw1394_iso_fill_status(fi->iso_handle, &stat);
+	if(copy_to_user(uaddr, &stat, sizeof(stat)))
+		return -EFAULT;
+
+	/* reset overflow counter */
+	atomic_set(&iso->overflows, 0);
+	
+	return 0;
+}
+
+static void raw1394_iso_shutdown(struct file_info *fi)
+{
+	if(fi->iso_handle)
+		hpsb_iso_shutdown(fi->iso_handle);
+	
+	fi->iso_handle = NULL;
+	fi->iso_state = RAW1394_ISO_INACTIVE;
+}
+
+/* mmap the rawiso xmit/recv buffer */
+static int raw1394_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct file_info *fi = file->private_data;
+
+	if(fi->iso_state == RAW1394_ISO_INACTIVE)
+		return -EINVAL;
+
+	return dma_region_mmap(&fi->iso_handle->buf, file, vma);
+}
+
+/* ioctl is only used for rawiso operations */
+static int raw1394_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+{
+	struct file_info *fi = file->private_data;
+	
+	switch(fi->iso_state) {
+	case RAW1394_ISO_INACTIVE:
+		switch(cmd) {
+		case RAW1394_ISO_XMIT_INIT:
+			return raw1394_iso_xmit_init(fi, (void*) arg);
+		case RAW1394_ISO_RECV_INIT:
+			return raw1394_iso_recv_init(fi, (void*) arg);
+		default:
+			break;
+		}
+		break;
+	case RAW1394_ISO_RECV:
+		switch(cmd) {
+		case RAW1394_ISO_RECV_START:
+			return hpsb_iso_recv_start(fi->iso_handle, arg);
+		case RAW1394_ISO_STOP:
+			hpsb_iso_stop(fi->iso_handle);
+			return 0;
+
+		case RAW1394_ISO_GET_STATUS:
+			return raw1394_iso_get_status(fi, (void*) arg);
+			
+		case RAW1394_ISO_PRODUCE_CONSUME:
+			return hpsb_iso_recv_release_packets(fi->iso_handle, arg);
+			
+		case RAW1394_ISO_SHUTDOWN:
+			raw1394_iso_shutdown(fi);
+			return 0;
+		}
+		break;
+	case RAW1394_ISO_XMIT:
+		switch(cmd) {
+		case RAW1394_ISO_XMIT_START: {
+			/* copy two ints from user-space */
+			int args[2];
+			if(copy_from_user(&args[0], (void*) arg, sizeof(args)))
+				return -EFAULT;
+			return hpsb_iso_xmit_start(fi->iso_handle, args[0], args[1]);
+		}
+		case RAW1394_ISO_STOP:
+			hpsb_iso_stop(fi->iso_handle);
+			return 0;
+			
+		case RAW1394_ISO_GET_STATUS:
+			return raw1394_iso_get_status(fi, (void*) arg);
+			
+		case RAW1394_ISO_PRODUCE_CONSUME:
+			return hpsb_iso_xmit_queue_packets(fi->iso_handle, arg);
+			
+		case RAW1394_ISO_SHUTDOWN:
+			raw1394_iso_shutdown(fi);
+			return 0;
+		}
+		break;
+	default:
+		break;
+	}
+	
+	return -EINVAL;
+}
+
 static unsigned int raw1394_poll(struct file *file, poll_table *pt)
 {
         struct file_info *fi = file->private_data;
@@ -2009,7 +2236,7 @@
                 mask |= POLLIN | POLLRDNORM;
         }
         spin_unlock_irq(&fi->reqlists_lock);
-
+	
         return mask;
 }
 
@@ -2057,6 +2284,9 @@
         struct arm_addr  *arm_addr = NULL;
         int another_host;
 
+	if(fi->iso_state != RAW1394_ISO_INACTIVE)
+		raw1394_iso_shutdown(fi);
+	
         for (i = 0; i < 64; i++) {
                 if (fi->listen_channels & (1ULL << i)) {
                         hpsb_unlisten_channel(hl_handle, fi->host, i);
@@ -2164,7 +2394,9 @@
 static struct file_operations file_ops = {
 	.owner =	THIS_MODULE,
         .read =		raw1394_read, 
-        .write =	raw1394_write, 
+        .write =	raw1394_write,
+	.mmap =         raw1394_mmap,
+	.ioctl =        raw1394_ioctl,
         .poll =		raw1394_poll, 
         .open =		raw1394_open, 
         .release =	raw1394_release, 
diff -Nru a/drivers/ieee1394/raw1394.h b/drivers/ieee1394/raw1394.h
--- a/drivers/ieee1394/raw1394.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/raw1394.h	Sun Dec 15 18:08:28 2002
@@ -36,10 +36,11 @@
 #define RAW1394_REQ_PHYPACKET       500
 
 /* kernel to user */
-#define RAW1394_REQ_BUS_RESET     10000
-#define RAW1394_REQ_ISO_RECEIVE   10001
-#define RAW1394_REQ_FCP_REQUEST   10002
-#define RAW1394_REQ_ARM           10003
+#define RAW1394_REQ_BUS_RESET        10000
+#define RAW1394_REQ_ISO_RECEIVE      10001
+#define RAW1394_REQ_FCP_REQUEST      10002
+#define RAW1394_REQ_ARM              10003
+#define RAW1394_REQ_RAWISO_ACTIVITY  10004
 
 /* error codes */
 #define RAW1394_ERROR_NONE        0
@@ -115,6 +116,64 @@
         struct arm_response *response;
 } *arm_request_response_t;
 
+/* rawiso API */
+
+/* ioctls */
+#define RAW1394_ISO_XMIT_INIT        1  /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_RECV_INIT        2  /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_RECV_START       3  /* arg: int, starting cycle */
+#define RAW1394_ISO_XMIT_START       8  /* arg: int[2], { starting cycle, prebuffer } */
+#define RAW1394_ISO_STOP             4
+#define RAW1394_ISO_GET_STATUS       5  /* arg: raw1394_iso_status* */
+#define RAW1394_ISO_PRODUCE_CONSUME  6  /* arg: int, # of packets */
+#define RAW1394_ISO_SHUTDOWN         7
+
+/* per-packet metadata embedded in the ringbuffer */
+/* must be identical to hpsb_iso_packet_info in iso.h! */
+struct raw1394_iso_packet_info {
+	unsigned short len;
+	unsigned short cycle;
+	unsigned char channel; /* recv only */
+	unsigned char tag;
+	unsigned char sy;
+};
+
+struct raw1394_iso_config {
+	unsigned int buf_packets;
+	unsigned int max_packet_size;
+	int channel;
+	int speed; /* xmit only */
+	int irq_interval;
+};
+
+/* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */
+struct raw1394_iso_status {
+	/* current settings */
+	struct raw1394_iso_config config;
+	
+	/* byte offset between successive packets in the buffer */
+	int buf_stride;
+
+	/* byte offset of data payload within each packet */
+	int packet_data_offset;
+	
+	/* byte offset of struct iso_packet_info within each packet */
+	int packet_info_offset;
+
+	/* index of next packet to fill with data (ISO transmission)
+	   or next packet containing data recieved (ISO reception) */
+	unsigned int first_packet;
+
+	/* number of packets waiting to be filled with data (ISO transmission)
+	   or containing data received (ISO reception) */
+	unsigned int n_packets;
+
+	/* approximate number of packets dropped due to overflow or
+	   underflow of the packet buffer (a value of zero guarantees
+	   that no packets have been dropped) */
+	unsigned int overflows;
+};
+
 #ifdef __KERNEL__
 
 struct iso_block_store {
@@ -123,6 +182,10 @@
         quadlet_t data[0];
 };
 
+enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0,
+			 RAW1394_ISO_RECV = 1,
+			 RAW1394_ISO_XMIT = 2 };
+
 struct file_info {
         struct list_head list;
 
@@ -141,11 +204,16 @@
 
         u8 *fcp_buffer;
 
+	/* old ISO API */
         u64 listen_channels;
         quadlet_t *iso_buffer;
         size_t iso_buffer_length;
 
         u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
+
+	/* new rawiso API */
+	enum raw1394_iso_state iso_state;
+	struct hpsb_iso *iso_handle;
 };
 
 struct arm_addr {
@@ -164,7 +232,6 @@
         struct list_head list;
         struct file_info *file_info;
         struct hpsb_packet *packet;
-        struct hpsb_queue_struct tq;
         struct iso_block_store *ibs;
         quadlet_t *data;
         int free_data;
diff -Nru a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
--- a/drivers/ieee1394/sbp2.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/sbp2.c	Sun Dec 15 18:08:28 2002
@@ -81,11 +81,9 @@
  *
  * sbp2_max_speed 		- Force max speed allowed 
  *				  (2 = 400mb, 1 = 200mb, 0 = 100mb. default = 2)
- * sbp2_serialize_io		- Serialize all I/O coming down from the scsi drivers 
+ * sbp2_serialize_io		- Serialize all I/O coming down from the scsi drivers
  *				  (0 = deserialized, 1 = serialized, default = 0)
  * sbp2_max_sectors, 		- Change max sectors per I/O supported (default = 255)
- * sbp2_max_outstanding_cmds	- Change max outstanding concurrent commands (default = 8)
- * sbp2_max_cmds_per_lun	- Change max concurrent commands per sbp2 device (default = 1)
  * sbp2_exclusive_login		- Set to zero if you'd like to allow multiple hosts the ability
  *				  to log in at the same time. Sbp2 device must support this,
  *				  and you must know what you're doing (default = 1)
@@ -310,6 +308,7 @@
 #include <linux/list.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/interrupt.h>
 #include <linux/fs.h>
 #include <linux/poll.h>
 #include <linux/module.h>
@@ -320,6 +319,7 @@
 #include <linux/blk.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/version.h>
 #include <asm/current.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -329,12 +329,10 @@
 #include <asm/io.h>
 #include <asm/scatterlist.h>
 
-#ifdef CONFIG_KBUILD_2_5
-#include <scsi.h>
-#include <hosts.h>
-#else
 #include "../scsi/scsi.h"
 #include "../scsi/hosts.h"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,47)
+#include "../scsi/sd.h"
 #endif
 
 #include "ieee1394.h"
@@ -348,7 +346,7 @@
 #include "sbp2.h"
 
 static char version[] __devinitdata =
-	"$Rev: 601 $ James Goodwin <jamesg@filanet.com>";
+	"$Rev: 697 $ James Goodwin <jamesg@filanet.com>";
 
 /*
  * Module load parameter definitions
@@ -393,26 +391,6 @@
 static int sbp2_max_sectors = SBP2_MAX_SECTORS;
 
 /*
- * Adjust sbp2_max_outstanding_cmds to tune performance if you have many
- * sbp2 devices attached (or if you need to do some debugging).
- */
-MODULE_PARM(sbp2_max_outstanding_cmds,"i");
-MODULE_PARM_DESC(sbp2_max_outstanding_cmds, "Change max outstanding concurrent commands (default = 8)");
-static int sbp2_max_outstanding_cmds = SBP2SCSI_MAX_OUTSTANDING_CMDS;
-
-/*
- * Adjust sbp2_max_cmds_per_lun to tune performance. Enabling more than
- * one concurrent/linked command per sbp2 device may allow some
- * performance gains, but some older sbp2 devices have firmware bugs
- * resulting in problems when linking commands... so, enable this with
- * care.  I can note that the Oxsemi OXFW911 sbp2 chipset works very well
- * with large numbers of concurrent/linked commands.  =)
- */
-MODULE_PARM(sbp2_max_cmds_per_lun,"i");
-MODULE_PARM_DESC(sbp2_max_cmds_per_lun, "Change max concurrent commands per sbp2 device (default = 1)");
-static int sbp2_max_cmds_per_lun = SBP2SCSI_MAX_CMDS_PER_LUN;
-
-/*
  * Exclusive login to sbp2 device? In most cases, the sbp2 driver should
  * do an exclusive login, as it's generally unsafe to have two hosts
  * talking to a single sbp2 device at the same time (filesystem coherency,
@@ -555,7 +533,7 @@
 static struct hpsb_protocol_driver sbp2_driver = {
 	.name =		"SBP2 Driver",
 	.id_table = 	sbp2_id_table,
-	.probe = 		sbp2_probe,
+	.probe = 	sbp2_probe,
 	.disconnect = 	sbp2_disconnect,
 	.update = 	sbp2_update
 };
@@ -658,90 +636,11 @@
 	return ((i > 0) ? 0:1);
 }
 
-/*
- * This function is called to initially create a packet pool for use in
- * sbp2 I/O requests. This packet pool is used when sending out sbp2
- * command and agent reset requests, and allows us to remove all
- * kmallocs/kfrees from the critical I/O paths.
- */
-static int sbp2util_create_request_packet_pool(struct sbp2scsi_host_info *hi)
+/* Free's an allocated packet */
+static void sbp2_free_packet(struct hpsb_packet *packet)
 {
-	struct hpsb_packet *packet;
-	int i;
-
-	hi->request_packet = kmalloc(sizeof(struct sbp2_request_packet) * SBP2_MAX_REQUEST_PACKETS, 
-				     GFP_KERNEL);
-
-	if (!hi->request_packet) {
-		SBP2_ERR("sbp2util_create_request_packet_pool - packet allocation failed!");
-		return(-ENOMEM);
-	}
-	memset(hi->request_packet, 0, sizeof(struct sbp2_request_packet) * SBP2_MAX_REQUEST_PACKETS);
-
-	/* 
-	 * Create a pool of request packets. Just take the max supported 
-	 * concurrent commands and multiply by two to be safe... 
-	 */
-	for (i=0; i<SBP2_MAX_REQUEST_PACKETS; i++) {
-
-		/*
-		 * Max payload of 8 bytes since the sbp2 command request
-		 * uses a payload of 8 bytes, and agent reset is a quadlet
-		 * write request. Bump this up if we plan on using this
-		 * pool for other stuff.
-		 */
-		packet = alloc_hpsb_packet(8);
-
-		if (!packet) {
-			SBP2_ERR("sbp2util_create_request_packet_pool - packet allocation failed!");
-			return(-ENOMEM);
-		}
-
-		/* 
-		 * Put these request packets into a free list
-		 */
-		INIT_LIST_HEAD(&hi->request_packet[i].list);
-		hi->request_packet[i].packet = packet;
-		list_add_tail(&hi->request_packet[i].list, &hi->sbp2_req_free);
-
-	}
-
-	return(0);
-}
-
-/*
- * This function is called to remove the packet pool. It is called when
- * the sbp2 driver is unloaded.
- */
-static void sbp2util_remove_request_packet_pool(struct sbp2scsi_host_info *hi)
-{
-	struct list_head *lh;
-	struct sbp2_request_packet *request_packet;
-	unsigned long flags;
-
-	/* 
-	 * Go through free list releasing packets
-	 */
-	sbp2_spin_lock(&hi->sbp2_request_packet_lock, flags);
-	while (!list_empty(&hi->sbp2_req_free)) {
-
-		lh = hi->sbp2_req_free.next;
-		list_del(lh);
-
-		request_packet = list_entry(lh, struct sbp2_request_packet, list);
-
-		/*
-		 * Free the hpsb packets that we allocated for the pool
-		 */
-		if (request_packet) {
-			free_hpsb_packet(request_packet->packet);
-		}
-
-	}
-	kfree(hi->request_packet);
-	sbp2_spin_unlock(&hi->sbp2_request_packet_lock, flags);
-
-	return;
+	hpsb_free_tlabel(packet);
+	free_hpsb_packet(packet);
 }
 
 /*
@@ -751,93 +650,28 @@
  * out a free request packet and re-initialize values in it. I'm sure this
  * can still stand some more optimization.
  */
-static struct sbp2_request_packet *
-sbp2util_allocate_write_request_packet(struct sbp2scsi_host_info *hi,
-				       struct node_entry *ne, u64 addr,
-				       size_t data_size,
-				       quadlet_t data) {
-	struct list_head *lh;
-	struct sbp2_request_packet *request_packet = NULL;
+static struct hpsb_packet *
+sbp2util_allocate_write_packet(struct sbp2scsi_host_info *hi,
+			       struct node_entry *ne, u64 addr,
+			       size_t data_size,
+			       quadlet_t *data)
+{
 	struct hpsb_packet *packet;
-	unsigned long flags;
 
-	sbp2_spin_lock(&hi->sbp2_request_packet_lock, flags);
-	if (!list_empty(&hi->sbp2_req_free)) {
+	packet = hpsb_make_writepacket(hi->host, ne->nodeid,
+				       addr, data, data_size);
 
-		/*
-		 * Pull out a free request packet
-		 */
-		lh = hi->sbp2_req_free.next;
-		list_del(lh);
-
-		request_packet = list_entry(lh, struct sbp2_request_packet, list);
-		packet = request_packet->packet;
-
-		/*
-		 * Initialize the packet (this is really initialization
-		 * the core 1394 stack should do, but I'm doing it myself
-		 * to avoid the overhead).
-		 */
-		packet->data_size = data_size;
-		INIT_LIST_HEAD(&packet->list);
-		sema_init(&packet->state_change, 0);
-		packet->state = hpsb_unused;
-		packet->data_be = 1;
-		
-		hpsb_node_fill_packet(ne, packet);
-
-		packet->tlabel = get_tlabel(hi->host, packet->node_id, 0);
-
-		if (!data_size) {
-			fill_async_writequad(packet, addr, data);
-		} else {
-			fill_async_writeblock(packet, addr, data_size);         
-		}
-
-		/*
-		 * Set up a task queue completion routine, which returns
-		 * the packet to the free list and releases the tlabel.
-		 */
-		HPSB_PREPARE_WORK(&request_packet->tq,
-				  (void (*)(void*))sbp2util_free_request_packet,
-				  request_packet);
-		request_packet->hi_context = hi;
-		hpsb_add_packet_complete_task(packet, &request_packet->tq);
+        if (!packet)
+                return NULL;
 
-		/*
-		 * Now, put the packet on the in-use list.
-		 */
-		list_add_tail(&request_packet->list, &hi->sbp2_req_inuse);
+	hpsb_set_packet_complete_task(packet, (void (*)(void*))sbp2_free_packet,
+				      packet);
 
-	} else {
-		SBP2_ERR("sbp2util_allocate_request_packet - no packets available!");
-	}
-	sbp2_spin_unlock(&hi->sbp2_request_packet_lock, flags);
+	hpsb_node_fill_packet(ne, packet);
 
-	return(request_packet);
+	return packet;
 }
 
-/*
- * This function is called to return a packet to our packet pool. It is
- * also called as a completion routine when a request packet is completed.
- */
-static void sbp2util_free_request_packet(struct sbp2_request_packet *request_packet)
-{
-	unsigned long flags;
-	struct sbp2scsi_host_info *hi = request_packet->hi_context;
-
-	/*
-	 * Free the tlabel, and return the packet to the free pool.
-	 */
-	sbp2_spin_lock(&hi->sbp2_request_packet_lock, flags);
-	free_tlabel(hi->host, LOCAL_BUS | request_packet->packet->node_id,
-		    request_packet->packet->tlabel);
-	list_del(&request_packet->list);
-	list_add_tail(&request_packet->list, &hi->sbp2_req_free);
-	sbp2_spin_unlock(&hi->sbp2_request_packet_lock, flags);
-
-	return;
-}
 
 /*
  * This function is called to create a pool of command orbs used for
@@ -847,11 +681,13 @@
 					    struct sbp2scsi_host_info *hi)
 {
 	int i;
-	unsigned long flags;
+	unsigned long flags, orbs;
 	struct sbp2_command_info *command;
+
+	orbs = sbp2_serialize_io ? 2 : SBP2_MAX_COMMAND_ORBS;
         
 	sbp2_spin_lock(&scsi_id->sbp2_command_orb_lock, flags);
-	for (i = 0; i < scsi_id->sbp2_total_command_orbs; i++) {
+	for (i = 0; i < orbs; i++) {
 		command = (struct sbp2_command_info *)
 		    kmalloc(sizeof(struct sbp2_command_info), GFP_KERNEL);
 		if (!command) {
@@ -1148,7 +984,7 @@
 	sbp2_set_busy_timeout(hi, scsi_id);
 
 	/* Do a SBP-2 fetch agent reset. */
-	sbp2_agent_reset(hi, scsi_id, 0);
+	sbp2_agent_reset(hi, scsi_id, 1);
 	
 	/* Get the max speed and packet size that we can use. */
 	sbp2_max_speed_and_size(hi, scsi_id);
@@ -1175,7 +1011,7 @@
 
 	/* Allocate some memory for our host info structure */
 	hi = (struct sbp2scsi_host_info *)kmalloc(sizeof(struct sbp2scsi_host_info),
-						  GFP_KERNEL);
+						  in_interrupt() ? SLAB_ATOMIC : SLAB_KERNEL);
 
 	if (hi == NULL) {
 		SBP2_ERR("out of memory in sbp2_add_host");
@@ -1185,17 +1021,8 @@
 	/* Initialize some host stuff */
 	memset(hi, 0, sizeof(struct sbp2scsi_host_info));
 	INIT_LIST_HEAD(&hi->list);
-	INIT_LIST_HEAD(&hi->sbp2_req_inuse);
-	INIT_LIST_HEAD(&hi->sbp2_req_free);
 	hi->host = host;
 	hi->sbp2_command_lock = SPIN_LOCK_UNLOCKED;
-	hi->sbp2_request_packet_lock = SPIN_LOCK_UNLOCKED;
-
-	/* Create our request packet pool (pool of packets for use in I/O) */
-	if (sbp2util_create_request_packet_pool(hi)) {
-		SBP2_ERR("sbp2util_create_request_packet_pool failed!");
-		return;
-	}
 
 	sbp2_spin_lock(&sbp2_host_info_lock, flags);
 	list_add_tail(&hi->list, &sbp2_host_info_list);
@@ -1262,7 +1089,6 @@
 
 	hi = sbp2_find_host_info(host);
 	if (hi != NULL) {
-		sbp2util_remove_request_packet_pool(hi);
 		list_del(&hi->list);
 		kfree(hi);
 	}
@@ -1373,7 +1199,6 @@
 	INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_inuse);
 	INIT_LIST_HEAD(&scsi_id->sbp2_command_orb_completed);
 	scsi_id->sbp2_command_orb_lock = SPIN_LOCK_UNLOCKED;
-	scsi_id->sbp2_total_command_orbs = 0;
 
 	/*
 	 * Make sure that we've gotten ahold of the sbp2 management agent
@@ -1382,15 +1207,6 @@
 	 */
 	sbp2_parse_unit_directory(scsi_id);
 
-	scsi_id->sbp2_total_command_orbs = SBP2_MAX_COMMAND_ORBS;
-
-	/* 
-	 * Knock the total command orbs down if we are serializing I/O
-	 */
-	if (sbp2_serialize_io) {
-		scsi_id->sbp2_total_command_orbs = 2;	/* one extra for good measure */
-	}
-
 	/*
 	 * Find an empty spot to stick our scsi id instance data. 
 	 */
@@ -1440,7 +1256,7 @@
 	/*
 	 * Do a SBP-2 fetch agent reset
 	 */
-	sbp2_agent_reset(hi, scsi_id, 0);
+	sbp2_agent_reset(hi, scsi_id, 1);
 	
 	/*
 	 * Get the max speed and packet size that we can use
@@ -1461,10 +1277,7 @@
 	/* Complete any pending commands with selection timeout */
 	sbp2scsi_complete_all_commands(hi, scsi_id, DID_NO_CONNECT);
        			
-	/* Clean up any other structures */
-	if (scsi_id->sbp2_total_command_orbs) {
-		sbp2util_remove_command_orb_pool(scsi_id, hi);
-	}
+	sbp2util_remove_command_orb_pool(scsi_id, hi);
 
 	if (scsi_id->login_response) {
 		pci_free_consistent(hi->host->pdev,
@@ -1951,7 +1764,7 @@
 	 * possible.  */
 	if ((scsi_id->sbp2_firmware_revision & 0xffff00) ==
 			SBP2_128KB_BROKEN_FIRMWARE &&
-			(sbp2_max_sectors * 512) > (128 * 1024)) {
+			(sbp2_max_sectors * 512) > (128*1024)) {
 		SBP2_WARN("Node " NODE_BUS_FMT ": Bridge only supports 128KB max transfer size.",
 				NODE_BUS_ARGS(scsi_id->ne->nodeid));
 		SBP2_WARN("WARNING: Current sbp2_max_sectors setting is larger than 128KB (%d sectors)!",
@@ -2012,35 +1825,36 @@
 /*
  * This function is called in order to perform a SBP-2 agent reset. 
  */
-static int sbp2_agent_reset(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id, u32 flags) 
+static int sbp2_agent_reset(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id, int wait) 
 {
-	struct sbp2_request_packet *agent_reset_request_packet;
-
+	struct hpsb_packet *packet;
+	quadlet_t data;
+	
 	SBP2_DEBUG("sbp2_agent_reset");
 
 	/*
 	 * Ok, let's write to the target's management agent register
 	 */
-	agent_reset_request_packet =
-		sbp2util_allocate_write_request_packet(hi, scsi_id->ne,
-						       scsi_id->sbp2_command_block_agent_addr +
-						       SBP2_AGENT_RESET_OFFSET,
-						       0, ntohl(SBP2_AGENT_RESET_DATA));
+	data = ntohl(SBP2_AGENT_RESET_DATA);
+	packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
+						scsi_id->sbp2_command_block_agent_addr +
+						SBP2_AGENT_RESET_OFFSET,
+						4, &data);
 
-	if (!agent_reset_request_packet) {
-		SBP2_ERR("sbp2util_allocate_write_request_packet failed");
-		return(-EIO);
+	if (!packet) {
+		SBP2_ERR("sbp2util_allocate_write_packet failed");
+		return(-ENOMEM);
 	}
 
-	if (!hpsb_send_packet(agent_reset_request_packet->packet)) {
+	if (!hpsb_send_packet(packet)) {
 		SBP2_ERR("hpsb_send_packet failed");
-		sbp2util_free_request_packet(agent_reset_request_packet); 
+		sbp2_free_packet(packet); 
 		return(-EIO);
 	}
 
-	if (!(flags & SBP2_SEND_NO_WAIT)) {
-		down(&agent_reset_request_packet->packet->state_change);
-		down(&agent_reset_request_packet->packet->state_change);
+	if (wait) {
+		down(&packet->state_change);
+		down(&packet->state_change);
 	}
 
 	/*
@@ -2049,7 +1863,6 @@
 	scsi_id->last_orb = NULL;
 
 	return(0);
-
 }
 
 /*
@@ -2310,7 +2123,7 @@
 static int sbp2_link_orb_command(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id,
 				 struct sbp2_command_info *command)
 {
-        struct sbp2_request_packet *command_request_packet;
+        struct hpsb_packet *packet;
 	struct sbp2_command_orb *command_orb = &command->command_orb;
 
 	outstanding_orb_incr;
@@ -2333,25 +2146,24 @@
 		 */
 		if (hpsb_node_entry_valid(scsi_id->ne)) {
 
-			command_request_packet =
-				sbp2util_allocate_write_request_packet(hi, scsi_id->ne,
+			packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
 								scsi_id->sbp2_command_block_agent_addr +
-								SBP2_ORB_POINTER_OFFSET, 8, 0);
+								SBP2_ORB_POINTER_OFFSET, 8, NULL);
 		
-			if (!command_request_packet) {
-				SBP2_ERR("sbp2util_allocate_write_request_packet failed");
-				return(-EIO);
+			if (!packet) {
+				SBP2_ERR("sbp2util_allocate_write_packet failed");
+				return(-ENOMEM);
 			}
 		
-			command_request_packet->packet->data[0] = ORB_SET_NODE_ID(hi->host->node_id);
-			command_request_packet->packet->data[1] = command->command_orb_dma;
-			sbp2util_cpu_to_be32_buffer(command_request_packet->packet->data, 8);
+			packet->data[0] = ORB_SET_NODE_ID(hi->host->node_id);
+			packet->data[1] = command->command_orb_dma;
+			sbp2util_cpu_to_be32_buffer(packet->data, 8);
 		
 			SBP2_ORB_DEBUG("write command agent, command orb %p", command_orb);
 
-			if (!hpsb_send_packet(command_request_packet->packet)) {
+			if (!hpsb_send_packet(packet)) {
 				SBP2_ERR("hpsb_send_packet failed");
-				sbp2util_free_request_packet(command_request_packet); 
+				sbp2_free_packet(packet); 
 				return(-EIO);
 			}
 
@@ -2382,22 +2194,22 @@
 		 * Ring the doorbell
 		 */
 		if (hpsb_node_entry_valid(scsi_id->ne)) {
+			quadlet_t data = cpu_to_be32(command->command_orb_dma);
 
-			command_request_packet = sbp2util_allocate_write_request_packet(hi,
-				scsi_id->ne,
-				scsi_id->sbp2_command_block_agent_addr + SBP2_DOORBELL_OFFSET,
-				0, cpu_to_be32(command->command_orb_dma));
+			packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
+					scsi_id->sbp2_command_block_agent_addr +
+					SBP2_DOORBELL_OFFSET, 4, &data);
 	
-			if (!command_request_packet) {
-				SBP2_ERR("sbp2util_allocate_write_request_packet failed");
-				return(-EIO);
+			if (!packet) {
+				SBP2_ERR("sbp2util_allocate_write_packet failed");
+				return(-ENOMEM);
 			}
 
 			SBP2_ORB_DEBUG("ring doorbell, command orb %p", command_orb);
 
-			if (!hpsb_send_packet(command_request_packet->packet)) {
+			if (!hpsb_send_packet(packet)) {
 				SBP2_ERR("hpsb_send_packet failed");
-				sbp2util_free_request_packet(command_request_packet);
+				sbp2_free_packet(packet);
 				return(-EIO);
 			}
 		}
@@ -2789,7 +2601,7 @@
 				 * Initiate a fetch agent reset. 
 				 */
 				SBP2_DEBUG("Dead bit set - initiating fetch agent reset");
-                                sbp2_agent_reset(hi, scsi_id, SBP2_SEND_NO_WAIT);
+                                sbp2_agent_reset(hi, scsi_id, 0);
 			}
 
 			SBP2_ORB_DEBUG("completing command orb %p", &command->command_orb);
@@ -3107,7 +2919,7 @@
 		/*
 		 * Initiate a fetch agent reset. 
 		 */
-		sbp2_agent_reset(hi, scsi_id, SBP2_SEND_NO_WAIT);
+		sbp2_agent_reset(hi, scsi_id, 0);
 		sbp2scsi_complete_all_commands(hi, scsi_id, DID_BUS_BUSY);		
 		sbp2_spin_unlock(&hi->sbp2_command_lock, flags);
 	}
@@ -3127,7 +2939,7 @@
 
 	if (scsi_id) {
 		SBP2_ERR("Generating sbp2 fetch agent reset");
-		sbp2_agent_reset(hi, scsi_id, SBP2_SEND_NO_WAIT);
+		sbp2_agent_reset(hi, scsi_id, 0);
 	}
 
 	return(SUCCESS);
@@ -3138,12 +2950,12 @@
  */
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,43)
 static int sbp2scsi_biosparam (struct scsi_device *sdev,
-		struct block_device *dev, sector_t capacity, int geom[]) 
+                struct block_device *dev, sector_t capacity, int geom[])
 {
 #else
-static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) 
+static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[])
 {
-	sector_t capacity = disk->capacity;
+        unsigned capacity = disk->capacity;
 #endif
 	int heads, sectors, cylinders;
 
@@ -3208,16 +3020,12 @@
 		"SBP-2 module load options:\n"
 		"- Max speed supported: %s\n"
 		"- Max sectors per I/O supported: %d\n"
-		"- Max outstanding commands supported: %d\n"
-		"- Max outstanding commands per lun supported: %d\n"
                 "- Serialized I/O (debug): %s\n"
 		"- Exclusive login: %s",
 		hi->host->driver->name,
 		version,
 		hpsb_speedto_str[sbp2_max_speed],
 		sbp2_max_sectors,
-		sbp2_max_outstanding_cmds,
-		sbp2_max_cmds_per_lun,
 		sbp2_serialize_io ? "yes" : "no",
 		sbp2_exclusive_login ? "yes" : "no");
 
@@ -3242,29 +3050,27 @@
 	.eh_host_reset_handler =sbp2scsi_reset,
 	.bios_param =		sbp2scsi_biosparam,
 	.this_id =		-1,
-	.sg_tablesize =		SBP2_MAX_SG_ELEMENTS,
-	.use_clustering =	SBP2_CLUSTERING,
+	.sg_tablesize =		SG_ALL,
+	.use_clustering =	ENABLE_CLUSTERING,
+	.cmd_per_lun =		SBP2_MAX_CMDS_PER_LUN,
+	.can_queue = 		SBP2_MAX_SCSI_QUEUE,
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 	.use_new_eh_code =	TRUE,
 #endif
 	.emulated =		1,
-	.proc_name =	SBP2_DEVICE_NAME,
+	.proc_name =		SBP2_DEVICE_NAME,
 };
 
 static int sbp2_module_init(void)
 {
 	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 (sbp2_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;
-	} else {
-		scsi_driver_template.can_queue = sbp2_max_outstanding_cmds;
-		scsi_driver_template.cmd_per_lun = sbp2_max_cmds_per_lun;
 	}
 
 	/* 
diff -Nru a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h
--- a/drivers/ieee1394/sbp2.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/sbp2.h	Sun Dec 15 18:08:28 2002
@@ -32,33 +32,19 @@
 #endif
 
 #define SBP2_DEVICE_NAME		"sbp2"
-#define SBP2_DEVICE_NAME_SIZE		4
 
 /*
  * SBP2 specific structures and defines
  */
 
-#define ORB_FMT_CMD			0x0
-#define ORB_FMT_DUMMY			0x3
-
 #define ORB_DIRECTION_WRITE_TO_MEDIA    0x0
 #define ORB_DIRECTION_READ_FROM_MEDIA   0x1
 #define ORB_DIRECTION_NO_DATA_TRANSFER  0x2
 
 #define ORB_SET_NULL_PTR(value)			((value & 0x1) << 31)
 #define ORB_SET_NOTIFY(value)                   ((value & 0x1) << 31)
-#define ORB_SET_RQ_FMT(value)                   ((value & 0x3) << 29)
+#define ORB_SET_RQ_FMT(value)                   ((value & 0x3) << 29)	/* unused ? */
 #define ORB_SET_NODE_ID(value)			((value & 0xffff) << 16)
-
-struct sbp2_dummy_orb {
-	volatile u32 next_ORB_hi;
-	volatile u32 next_ORB_lo;
-	u32 reserved1;
-        u32 reserved2;
-	u32 notify_rq_fmt;
-	u8 command_block[12];
-};
-
 #define ORB_SET_DATA_SIZE(value)                (value & 0xffff)
 #define ORB_SET_PAGE_SIZE(value)                ((value & 0x7) << 16)
 #define ORB_SET_PAGE_TABLE_PRESENT(value)       ((value & 0x1) << 19)
@@ -253,25 +239,15 @@
  * Other misc defines
  */
 #define SBP2_128KB_BROKEN_FIRMWARE				0xa0b800
-#define SBP2_BROKEN_FIRMWARE_MAX_TRANSFER			0x20000
 
 #define SBP2_DEVICE_TYPE_LUN_UNINITIALIZED			0xffffffff
 
 /*
- * Flags for SBP-2 functions
- */
-#define SBP2_SEND_NO_WAIT					0x00000001
-
-/*
  * SCSI specific stuff
  */
 
-#define SBP2_MAX_SG_ELEMENTS		SG_ALL
-#define SBP2_CLUSTERING			ENABLE_CLUSTERING
 #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
 #define SBP2SCSI_MAX_SCSI_IDS		16	/* Max sbp2 device instances supported */
-#define SBP2SCSI_MAX_OUTSTANDING_CMDS	8	/* Max total outstanding sbp2 commands allowed at a time! */
-#define SBP2SCSI_MAX_CMDS_PER_LUN	1 	/* Max outstanding sbp2 commands per device - tune as needed */
 #define SBP2_MAX_SECTORS		255	/* Max sectors supported */
 
 #ifndef TYPE_SDAD
@@ -314,26 +290,18 @@
 	DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN,DUN
 };
 
-#define SBP2_MAX_REQUEST_PACKETS	(sbp2_max_outstanding_cmds * 2)
-#define SBP2_MAX_COMMAND_ORBS		(sbp2_max_cmds_per_lun * 2)
-
-/*
- * Request packets structure (used for sending command and agent reset packets)
- */
-struct sbp2_request_packet {
-
-	struct list_head list;
-	struct hpsb_packet *packet;
-	struct hpsb_queue_struct tq;
-	void *hi_context;
-
-};
-
+/* This should be safe. If there's more than one LUN per node, we could
+ * saturate the tlabel's though.  */
+#define SBP2_MAX_CMDS_PER_LUN   8
+#define SBP2_MAX_SCSI_QUEUE	(SBP2_MAX_CMDS_PER_LUN * SBP2SCSI_MAX_SCSI_IDS)
+#define SBP2_MAX_COMMAND_ORBS	SBP2_MAX_SCSI_QUEUE
 
 /* This is the two dma types we use for cmd_dma below */
-#define CMD_DMA_NONE   0x0
-#define CMD_DMA_PAGE   0x1
-#define CMD_DMA_SINGLE 0x2
+enum cmd_dma_types {
+	CMD_DMA_NONE,
+	CMD_DMA_PAGE,
+	CMD_DMA_SINGLE
+};
 
 /* 
  * Encapsulates all the info necessary for an outstanding command. 
@@ -347,11 +315,11 @@
 	void (*Current_done)(Scsi_Cmnd *);
 
 	/* Also need s/g structure for each sbp2 command */
-	struct sbp2_unrestricted_page_table scatter_gather_element[SBP2_MAX_SG_ELEMENTS] ____cacheline_aligned;
+	struct sbp2_unrestricted_page_table scatter_gather_element[SG_ALL] ____cacheline_aligned;
 	dma_addr_t sge_dma ____cacheline_aligned;
 	void *sge_buffer;
 	dma_addr_t cmd_dma;
-	int dma_type;
+	enum cmd_dma_types dma_type;
 	unsigned long dma_size;
 	int dma_dir;
 
@@ -412,7 +380,6 @@
 	spinlock_t sbp2_command_orb_lock;
 	struct list_head sbp2_command_orb_inuse;
 	struct list_head sbp2_command_orb_completed;
-	u32 sbp2_total_command_orbs;
 
 	/* Node entry, as retrieved from NodeMgr entries */
 	struct node_entry *ne;
@@ -433,10 +400,9 @@
 	struct hpsb_host *host;
 
 	/*
-	 * Spin locks for command processing and packet pool management
+	 * Spin locks for command processing
 	 */
 	spinlock_t sbp2_command_lock;
-	spinlock_t sbp2_request_packet_lock;
 
 	/*
 	 * This is the scsi host we register with the scsi mid level.
@@ -446,21 +412,6 @@
 	struct Scsi_Host *scsi_host;
 
 	/*
-	 * Lists keeping track of inuse/free sbp2_request_packets. These structures are
-	 * used for sending out sbp2 command and agent reset packets. We initially create
-	 * a pool of request packets so that we don't have to do any kmallocs while in critical
-	 * I/O paths.
-	 */
-	struct list_head sbp2_req_inuse;
-	struct list_head sbp2_req_free;
-
-	/*
-	 * Here is the pool of request packets. All the hpsb packets (for 1394 bus transactions)
-	 * are allocated at init and simply re-initialized when needed.
-	 */
-	struct sbp2_request_packet *request_packet;
-
-	/*
 	 * SCSI ID instance data (one for each sbp2 device instance possible)
 	 */
 	struct scsi_id_instance_data *scsi_id[SBP2SCSI_MAX_SCSI_IDS];
@@ -474,13 +425,6 @@
 /*
  * Various utility prototypes
  */
-static int sbp2util_create_request_packet_pool(struct sbp2scsi_host_info *hi);
-static void sbp2util_remove_request_packet_pool(struct sbp2scsi_host_info *hi);
-static struct sbp2_request_packet *sbp2util_allocate_write_request_packet(struct sbp2scsi_host_info *hi,
-									  struct node_entry *ne, u64 addr,
-									  size_t data_size,
-									  quadlet_t data);
-static void sbp2util_free_request_packet(struct sbp2_request_packet *request_packet);
 static int sbp2util_create_command_orb_pool(struct scsi_id_instance_data *scsi_id, struct sbp2scsi_host_info *hi);
 static void sbp2util_remove_command_orb_pool(struct scsi_id_instance_data *scsi_id, struct sbp2scsi_host_info *hi);
 static struct sbp2_command_info *sbp2util_find_command_for_orb(struct scsi_id_instance_data *scsi_id, dma_addr_t orb);
@@ -523,7 +467,7 @@
 static int sbp2_logout_device(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id); 
 static int sbp2_handle_status_write(struct hpsb_host *host, int nodeid, int destid,
 				    quadlet_t *data, u64 addr, unsigned int length, u16 flags);
-static int sbp2_agent_reset(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id, u32 flags);
+static int sbp2_agent_reset(struct sbp2scsi_host_info *hi, struct scsi_id_instance_data *scsi_id, int wait);
 static int sbp2_create_command_orb(struct sbp2scsi_host_info *hi, 
 				   struct scsi_id_instance_data *scsi_id,
 				   struct sbp2_command_info *command,
@@ -552,8 +496,7 @@
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,44)
 static int sbp2scsi_biosparam (struct scsi_device *sdev, struct block_device *dev, sector_t capacity, int geom[]);
 #else
-static int sbp2scsi_biosparam (struct scsi_device *sdev, 
-			struct block_device *dev, sector_t capacy, int geom[]);
+static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]);
 #endif
 static int sbp2scsi_abort (Scsi_Cmnd *SCpnt); 
 static int sbp2scsi_reset (Scsi_Cmnd *SCpnt); 
diff -Nru a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
--- a/drivers/ieee1394/video1394.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/ieee1394/video1394.c	Sun Dec 15 18:08:28 2002
@@ -37,8 +37,7 @@
 #include <linux/proc_fs.h>
 #include <linux/delay.h>
 #include <linux/devfs_fs_kernel.h>
-
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/wrapper.h>
 #include <linux/vmalloc.h>
@@ -1249,18 +1248,15 @@
 int video1394_mmap(struct file *file, struct vm_area_struct *vma)
 {
 	struct file_ctx *ctx = (struct file_ctx *)file->private_data;
-	struct video_card *video = ctx->video;
-	struct ti_ohci *ohci = video->ohci;
 	int res = -EINVAL;
 
 	lock_kernel();
-	ohci = video->ohci;
-
 	if (ctx->current_ctx == NULL) {
-		PRINT(KERN_ERR, ohci->id, "Current iso context not set");
+		PRINT(KERN_ERR, ctx->video->ohci->id, "Current iso context not set");
 	} else
-		res = do_iso_mmap(ohci, ctx->current_ctx, vma);
+		res = do_iso_mmap(ctx->video->ohci, ctx->current_ctx, vma);
 	unlock_kernel();
+
 	return res;
 }
 
diff -Nru a/drivers/input/Makefile b/drivers/input/Makefile
--- a/drivers/input/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/input/Makefile	Sun Dec 15 18:08:32 2002
@@ -21,7 +21,3 @@
 obj-$(CONFIG_INPUT_JOYSTICK)	+= joystick/
 obj-$(CONFIG_INPUT_TOUCHSCREEN)	+= touchscreen/
 obj-$(CONFIG_INPUT_MISC)	+= misc/
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/gameport/Makefile b/drivers/input/gameport/Makefile
--- a/drivers/input/gameport/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/input/gameport/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,7 +15,3 @@
 obj-$(CONFIG_GAMEPORT_L4)	+= lightning.o
 obj-$(CONFIG_GAMEPORT_NS558)	+= ns558.o
 obj-$(CONFIG_GAMEPORT_VORTEX)	+= vortex.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile
--- a/drivers/input/joystick/Makefile	Sun Dec 15 18:08:30 2002
+++ b/drivers/input/joystick/Makefile	Sun Dec 15 18:08:30 2002
@@ -28,7 +28,3 @@
 obj-$(CONFIG_JOYSTICK_WARRIOR)		+= warrior.o
 
 obj-$(CONFIG_JOYSTICK_IFORCE)		+= iforce/
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/joystick/iforce/Makefile b/drivers/input/joystick/iforce/Makefile
--- a/drivers/input/joystick/iforce/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/input/joystick/iforce/Makefile	Sun Dec 15 18:08:32 2002
@@ -18,7 +18,3 @@
 endif
 
 EXTRA_CFLAGS = -Werror-implicit-function-declaration
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
--- a/drivers/input/keyboard/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/input/keyboard/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,7 +10,3 @@
 obj-$(CONFIG_KEYBOARD_XTKBD)		+= xtkbd.o
 obj-$(CONFIG_KEYBOARD_AMIGA)		+= amikbd.o
 obj-$(CONFIG_KEYBOARD_NEWTON)		+= newtonkbd.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/mouse/Makefile b/drivers/input/mouse/Makefile
--- a/drivers/input/mouse/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/input/mouse/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,7 +12,3 @@
 obj-$(CONFIG_MOUSE_PC110PAD)	+= pc110pad.o
 obj-$(CONFIG_MOUSE_PS2)		+= psmouse.o
 obj-$(CONFIG_MOUSE_SERIAL)	+= sermouse.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/serio/Makefile b/drivers/input/serio/Makefile
--- a/drivers/input/serio/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/input/serio/Makefile	Sun Dec 15 18:08:28 2002
@@ -17,7 +17,3 @@
 obj-$(CONFIG_SERIO_SA1111)	+= sa1111ps2.o
 obj-$(CONFIG_SERIO_AMBAKMI)	+= ambakmi.o
 obj-$(CONFIG_SERIO_Q40KBD)	+= q40kbd.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
--- a/drivers/input/touchscreen/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/input/touchscreen/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,7 +6,3 @@
 
 obj-$(CONFIG_TOUCHSCREEN_BITSY)	+= h3600_ts_input.o
 obj-$(CONFIG_TOUCHSCREEN_GUNZE)	+= gunze.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/macintosh/Makefile b/drivers/macintosh/Makefile
--- a/drivers/macintosh/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/macintosh/Makefile	Sun Dec 15 18:08:32 2002
@@ -34,8 +34,3 @@
 obj-$(CONFIG_ADB_IOP)		+= adb-iop.o
 obj-$(CONFIG_ADB_PMU68K)	+= via-pmu68k.o
 obj-$(CONFIG_ADB_MACIO)		+= macio-adb.o
-
-# The global Rules.make.
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/mca/Makefile b/drivers/mca/Makefile
--- a/drivers/mca/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/mca/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 obj-$(CONFIG_MCA_LEGACY)	+= mca-legacy.o
 
 export-objs	:= mca-bus.o mca-legacy.o mca-proc.o mca-driver.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/md/Makefile b/drivers/md/Makefile
--- a/drivers/md/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/md/Makefile	Sun Dec 15 18:08:29 2002
@@ -18,6 +18,3 @@
 obj-$(CONFIG_MD_MULTIPATH)	+= multipath.o
 obj-$(CONFIG_BLK_DEV_MD)	+= md.o
 obj-$(CONFIG_BLK_DEV_DM)	+= dm-mod.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/media/Makefile b/drivers/media/Makefile
--- a/drivers/media/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/media/Makefile	Sun Dec 15 18:08:32 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y        := video/ radio/ dvb/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/dvb/Makefile b/drivers/media/dvb/Makefile
--- a/drivers/media/dvb/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/media/dvb/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,5 +3,3 @@
 #
 
 obj-y        := dvb-core/ frontends/ av7110/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/dvb/av7110/Makefile b/drivers/media/dvb/av7110/Makefile
--- a/drivers/media/dvb/av7110/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/media/dvb/av7110/Makefile	Sun Dec 15 18:08:31 2002
@@ -7,6 +7,3 @@
 obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
-
-include $(TOPDIR)/Rules.make 
-
diff -Nru a/drivers/media/dvb/dvb-core/Makefile b/drivers/media/dvb/dvb-core/Makefile
--- a/drivers/media/dvb/dvb-core/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/media/dvb/dvb-core/Makefile	Sun Dec 15 18:08:32 2002
@@ -8,6 +8,3 @@
 		dvb_frontend.o dvb_i2c.o dvb_net.o dvb_ksyms.o
 
 obj-$(CONFIG_DVB_CORE) += dvb-core.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/media/dvb/frontends/Makefile b/drivers/media/dvb/frontends/Makefile
--- a/drivers/media/dvb/frontends/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/media/dvb/frontends/Makefile	Sun Dec 15 18:08:28 2002
@@ -11,6 +11,3 @@
 obj-$(CONFIG_DVB_GRUNDIG_29504_491) += grundig_29504-491.o
 obj-$(CONFIG_DVB_GRUNDIG_29504_401) += grundig_29504-401.o
 obj-$(CONFIG_DVB_VES1820) += ves1820.o
-
-include $(TOPDIR)/Rules.make 
- 
diff -Nru a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
--- a/drivers/media/radio/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/media/radio/Makefile	Sun Dec 15 18:08:29 2002
@@ -24,5 +24,3 @@
 obj-$(CONFIG_RADIO_GEMTEK_PCI) += radio-gemtek-pci.o
 obj-$(CONFIG_RADIO_TRUST) += radio-trust.o
 obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/video/Makefile b/drivers/media/video/Makefile
--- a/drivers/media/video/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/media/video/Makefile	Sun Dec 15 18:08:29 2002
@@ -37,5 +37,3 @@
 obj-$(CONFIG_VIDEO_MEYE) += meye.o
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134/ tuner.o tda9887.o video-buf.o
 obj-$(CONFIG_TUNER_3036) += tuner-3036.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile
--- a/drivers/media/video/saa7134/Makefile	Sun Dec 15 18:08:33 2002
+++ b/drivers/media/video/saa7134/Makefile	Sun Dec 15 18:08:33 2002
@@ -6,6 +6,3 @@
 obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o
 
 EXTRA_CFLAGS = -I$(src)/..
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/message/Makefile b/drivers/message/Makefile
--- a/drivers/message/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/message/Makefile	Sun Dec 15 18:08:32 2002
@@ -4,6 +4,3 @@
 
 obj-$(CONFIG_I2O)	+= i2o/
 obj-$(CONFIG_FUSION)	+= fusion/
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile
--- a/drivers/message/fusion/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/message/fusion/Makefile	Sun Dec 15 18:08:29 2002
@@ -52,5 +52,3 @@
 obj-$(CONFIG_FUSION_ISENSE)	+= isense.o
 obj-$(CONFIG_FUSION_CTL)	+= mptctl.o
 obj-$(CONFIG_FUSION_LAN)	+= mptlan.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/message/i2o/Makefile b/drivers/message/i2o/Makefile
--- a/drivers/message/i2o/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/message/i2o/Makefile	Sun Dec 15 18:08:29 2002
@@ -13,6 +13,3 @@
 obj-$(CONFIG_I2O_LAN)	+= i2o_lan.o
 obj-$(CONFIG_I2O_SCSI)	+= i2o_scsi.o
 obj-$(CONFIG_I2O_PROC)	+= i2o_proc.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/misc/Makefile b/drivers/misc/Makefile
--- a/drivers/misc/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/misc/Makefile	Sun Dec 15 18:08:32 2002
@@ -2,4 +2,3 @@
 # Makefile for misc devices that really don't fit anywhere else.
 #
 obj- := misc.o	# Dummy rule to force built-in.o to be made
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/mtd/Makefile b/drivers/mtd/Makefile
--- a/drivers/mtd/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/mtd/Makefile	Sun Dec 15 18:08:29 2002
@@ -40,5 +40,3 @@
 obj-$(CONFIG_NFTL)		+= nftl.o
 
 nftl-objs	:= nftlcore.o nftlmount.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/mtd/chips/Makefile b/drivers/mtd/chips/Makefile
--- a/drivers/mtd/chips/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/mtd/chips/Makefile	Sun Dec 15 18:08:28 2002
@@ -25,5 +25,3 @@
 obj-$(CONFIG_MTD_ROM)		+= map_rom.o
 obj-$(CONFIG_MTD_SHARP)		+= sharp.o
 obj-$(CONFIG_MTD_ABSENT)	+= map_absent.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
--- a/drivers/mtd/devices/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/mtd/devices/Makefile	Sun Dec 15 18:08:28 2002
@@ -19,5 +19,3 @@
 obj-$(CONFIG_MTD_MTDRAM)	+= mtdram.o
 obj-$(CONFIG_MTD_LART)		+= lart.o
 obj-$(CONFIG_MTD_BLKMTD)	+= blkmtd.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c
--- a/drivers/mtd/devices/blkmtd.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/mtd/devices/blkmtd.c	Sun Dec 15 18:08:28 2002
@@ -151,9 +151,10 @@
 /* Page cache stuff */
 
 /* writepage() - should never be called - catch it anyway */
-static int blkmtd_writepage(struct page *page)
+static int blkmtd_writepage(struct page *page, struct writeback_control *wbc)
 {
   printk("blkmtd: writepage called!!!\n");
+  unlock_page(page);
   return -EIO;
 }
 
diff -Nru a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
--- a/drivers/mtd/maps/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/mtd/maps/Makefile	Sun Dec 15 18:08:28 2002
@@ -37,5 +37,3 @@
 obj-$(CONFIG_MTD_EDB7312)	+= edb7312.o
 obj-$(CONFIG_MTD_IMPA7)		+= impa7.o
 obj-$(CONFIG_MTD_FORTUNET)	+= fortunet.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
--- a/drivers/mtd/nand/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/mtd/nand/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,5 +10,3 @@
 
 obj-$(CONFIG_MTD_NAND)		+= $(nandobjs-y)
 obj-$(CONFIG_MTD_NAND_SPIA)	+= spia.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/82596.c b/drivers/net/82596.c
--- a/drivers/net/82596.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/82596.c	Sun Dec 15 18:08:29 2002
@@ -1525,7 +1525,7 @@
 }
 
 #ifdef MODULE
-static struct net_device dev_82596 = { init: i82596_probe };
+static struct net_device dev_82596 = { .init = i82596_probe };
 
 #ifdef ENABLE_APRICOT
 static int io = 0x300;
diff -Nru a/drivers/net/Makefile b/drivers/net/Makefile
--- a/drivers/net/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/Makefile	Sun Dec 15 18:08:28 2002
@@ -198,6 +198,3 @@
 obj-$(CONFIG_NET_TULIP) += tulip/
 obj-$(CONFIG_HAMRADIO) += hamradio/
 obj-$(CONFIG_IRDA) += irda/
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/net/appletalk/Makefile b/drivers/net/appletalk/Makefile
--- a/drivers/net/appletalk/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/appletalk/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,6 +7,3 @@
 obj-$(CONFIG_IPDDP) += ipddp.o
 obj-$(CONFIG_COPS) += cops.o
 obj-$(CONFIG_LTPC) += ltpc.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c
--- a/drivers/net/appletalk/cops.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/appletalk/cops.c	Sun Dec 15 18:08:29 2002
@@ -1012,7 +1012,7 @@
 }
 
 #ifdef MODULE
-static struct net_device cops0_dev = { init: cops_probe };
+static struct net_device cops0_dev = { .init = cops_probe };
 
 MODULE_LICENSE("GPL");
 MODULE_PARM(io, "i");
diff -Nru a/drivers/net/arcnet/Makefile b/drivers/net/arcnet/Makefile
--- a/drivers/net/arcnet/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/arcnet/Makefile	Sun Dec 15 18:08:29 2002
@@ -13,5 +13,3 @@
 obj-$(CONFIG_ARCNET_COM20020) += com20020.o
 obj-$(CONFIG_ARCNET_COM20020_ISA) += com20020-isa.o
 obj-$(CONFIG_ARCNET_COM20020_PCI) += com20020-pci.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/dl2k.c b/drivers/net/dl2k.c
--- a/drivers/net/dl2k.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/dl2k.c	Sun Dec 15 18:08:29 2002
@@ -1140,10 +1140,6 @@
 	long ioaddr = dev->base_addr;
 	u32 hash_table[2];
 	u16 rx_mode = 0;
-	int i;
-	int bit;
-	long index, crc;
-	struct dev_mc_list *mclist;
 	struct netdev_private *np = dev->priv;
 	
 	hash_table[0] = hash_table[1] = 0;
@@ -1157,6 +1153,8 @@
 		/* Receive broadcast and multicast frames */
 		rx_mode = ReceiveBroadcast | ReceiveMulticast | ReceiveUnicast;
 	} else if (dev->mc_count > 0) {
+		int i;
+		struct dev_mc_list *mclist;
 		/* Receive broadcast frames and multicast frames filtering 
 		   by Hashtable */
 		rx_mode =
@@ -1164,14 +1162,13 @@
 		for (i=0, mclist = dev->mc_list; mclist && i < dev->mc_count; 
 				i++, mclist=mclist->next) 
 		{
-			crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
+			int bit, index = 0;
+			int crc = ether_crc_le (ETH_ALEN, mclist->dmi_addr);
 			/* The inverted high significant 6 bits of CRC are
 			   used as an index to hashtable */
-			for (index=0, bit=0; bit < 6; bit++) {
-				if (test_bit(31-bit, &crc)) {
-					 set_bit(bit, &index);
-				}
-			}
+			for (bit = 0; bit < 6; bit++)
+				if (crc & (1 << (31 - bit)))
+					index |= (1 << bit);
 			hash_table[index / 32] |= (1 << (index % 32));
 		}
 	} else {
diff -Nru a/drivers/net/e100/Makefile b/drivers/net/e100/Makefile
--- a/drivers/net/e100/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/net/e100/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,5 +6,3 @@
 
 e100-objs := e100_main.o e100_config.o e100_proc.o e100_phy.o \
 	     e100_eeprom.o e100_test.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/e100/e100_main.c b/drivers/net/e100/e100_main.c
--- a/drivers/net/e100/e100_main.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/e100/e100_main.c	Sun Dec 15 18:08:29 2002
@@ -145,17 +145,17 @@
 static int e100_suspend(struct pci_dev *pcid, u32 state);
 static int e100_resume(struct pci_dev *pcid);
 struct notifier_block e100_notifier_reboot = {
-        notifier_call:  e100_notify_reboot,
-        next:           NULL,
-        priority:       0
+        .notifier_call  = e100_notify_reboot,
+        .next           = NULL,
+        .priority       = 0
 };
 #endif
 static int e100_notify_netdev(struct notifier_block *, unsigned long event, void *ptr);
  
 struct notifier_block e100_notifier_netdev = {
-	notifier_call:  e100_notify_netdev,
-	next:           NULL,
-	priority:       0
+	.notifier_call  = e100_notify_netdev,
+	.next           = NULL,
+	.priority       = 0
 };
 
 static void e100_get_mdix_status(struct e100_private *bdp);
diff -Nru a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
--- a/drivers/net/e1000/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/e1000/Makefile	Sun Dec 15 18:08:28 2002
@@ -34,5 +34,3 @@
 
 e1000-objs := e1000_main.o e1000_hw.o e1000_ethtool.o e1000_param.o \
 	      e1000_proc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/e1000/e1000_param.c b/drivers/net/e1000/e1000_param.c
--- a/drivers/net/e1000/e1000_param.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/e1000/e1000_param.c	Sun Dec 15 18:08:29 2002
@@ -310,7 +310,7 @@
 			.name = "Transmit Descriptors",
 			.err  = "using default of " __MODULE_STRING(DEFAULT_TXD),
 			.def  = DEFAULT_TXD,
-			.arg  = { r: { min: MIN_TXD }}
+			.arg  = { .r = { .min = MIN_TXD }}
 		};
 		struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -327,7 +327,7 @@
 			.name = "Receive Descriptors",
 			.err  = "using default of " __MODULE_STRING(DEFAULT_RXD),
 			.def  = DEFAULT_RXD,
-			.arg  = { r: { min: MIN_RXD }}
+			.arg  = { .r = { .min = MIN_RXD }}
 		};
 		struct e1000_desc_ring *rx_ring = &adapter->rx_ring;
 		e1000_mac_type mac_type = adapter->hw.mac_type;
@@ -363,7 +363,7 @@
 			.name = "Flow Control",
 			.err  = "reading default settings from EEPROM",
 			.def  = e1000_fc_default,
-			.arg  = { l: { nr: ARRAY_SIZE(fc_list), p: fc_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(fc_list), .p = fc_list }}
 		};
 
 		int fc = FlowControl[bd];
@@ -375,7 +375,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Transmit Interrupt Delay",
-			.arg  = { r: { min: MIN_TXDELAY, max: MAX_TXDELAY }}
+			.arg  = { .r = { .min = MIN_TXDELAY, .max = MAX_TXDELAY }}
 		};
 		opt.def = DEFAULT_TIDV;
 		opt.err = tidv;
@@ -388,7 +388,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Transmit Absolute Interrupt Delay",
-			.arg  = { r: { min: MIN_TXABSDELAY, max: MAX_TXABSDELAY }}
+			.arg  = { .r = { .min = MIN_TXABSDELAY, .max = MAX_TXABSDELAY }}
 		};
 		opt.def = DEFAULT_TADV;
 		opt.err = tadv;
@@ -401,7 +401,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Receive Interrupt Delay",
-			.arg  = { r: { min: MIN_RXDELAY, max: MAX_RXDELAY }}
+			.arg  = { .r = { .min = MIN_RXDELAY, .max = MAX_RXDELAY }}
 		};
 		opt.def = DEFAULT_RDTR;
 		opt.err = rdtr;
@@ -414,7 +414,7 @@
 		struct e1000_option opt = {
 			.type = range_option,
 			.name = "Receive Absolute Interrupt Delay",
-			.arg  = { r: { min: MIN_RXABSDELAY, max: MAX_RXABSDELAY }}
+			.arg  = { .r = { .min = MIN_RXABSDELAY, .max = MAX_RXABSDELAY }}
 		};
 		opt.def = DEFAULT_RADV;
 		opt.err = radv;
@@ -486,7 +486,7 @@
 			.name = "Speed",
 			.err  = "parameter ignored",
 			.def  = 0,
-			.arg  = { l: { nr: ARRAY_SIZE(speed_list), p: speed_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(speed_list), .p = speed_list }}
 		};
 
 		speed = Speed[bd];
@@ -501,7 +501,7 @@
 			.name = "Duplex",
 			.err  = "parameter ignored",
 			.def  = 0,
-			.arg  = { l: { nr: ARRAY_SIZE(dplx_list), p: dplx_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(dplx_list), .p = dplx_list }}
 		};
 
 		dplx = Duplex[bd];
@@ -553,7 +553,7 @@
 			.name = "AutoNeg",
 			.err  = "parameter ignored",
 			.def  = AUTONEG_ADV_DEFAULT,
-			.arg  = { l: { nr: ARRAY_SIZE(an_list), p: an_list }}
+			.arg  = { .l = { .nr = ARRAY_SIZE(an_list), .p = an_list }}
 		};
 
 		int an = AutoNeg[bd];
diff -Nru a/drivers/net/fc/Makefile b/drivers/net/fc/Makefile
--- a/drivers/net/fc/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/net/fc/Makefile	Sun Dec 15 18:08:31 2002
@@ -6,5 +6,3 @@
 #
 
 obj-$(CONFIG_IPHASE5526)	+= iph5526.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/fc/iph5526_scsi.h b/drivers/net/fc/iph5526_scsi.h
--- a/drivers/net/fc/iph5526_scsi.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/fc/iph5526_scsi.h	Sun Dec 15 18:08:28 2002
@@ -3,21 +3,21 @@
 
 #define IPH5526_CAN_QUEUE	32
 #define IPH5526_SCSI_FC { 						 				\
-        name:                   "Interphase 5526 Fibre Channel SCSI Adapter",   \
-        detect:                 iph5526_detect,                  \
-        release:                iph5526_release,                 \
-        info:                   iph5526_info,                    \
-        queuecommand:           iph5526_queuecommand,            \
-		bios_param:				iph5526_biosparam,               \
-        can_queue:              IPH5526_CAN_QUEUE,               \
-        this_id:                -1,                              \
-        sg_tablesize:           255,                             \
-        cmd_per_lun:            8,                               \
-        use_clustering:         DISABLE_CLUSTERING,              \
-        eh_abort_handler:       iph5526_abort,                   \
-        eh_device_reset_handler:NULL,                            \
-        eh_bus_reset_handler:   NULL,                            \
-        eh_host_reset_handler:  NULL,                            \
+        .name                   = "Interphase 5526 Fibre Channel SCSI Adapter",   \
+        .detect                 = iph5526_detect,                  \
+        .release                = iph5526_release,                 \
+        .info                   = iph5526_info,                    \
+        .queuecommand           = iph5526_queuecommand,            \
+	.bios_param		= iph5526_biosparam,               \
+        .can_queue              = IPH5526_CAN_QUEUE,               \
+        .this_id                = -1,                              \
+        .sg_tablesize           = 255,                             \
+        .cmd_per_lun            = 8,                               \
+        .use_clustering         = DISABLE_CLUSTERING,              \
+        .eh_abort_handler       = iph5526_abort,                   \
+        .eh_device_reset_handler = NULL,                            \
+        .eh_bus_reset_handler   = NULL,                            \
+        .eh_host_reset_handler  = NULL,                            \
 }
 
 int iph5526_detect(Scsi_Host_Template *tmpt);
diff -Nru a/drivers/net/hamradio/Makefile b/drivers/net/hamradio/Makefile
--- a/drivers/net/hamradio/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/hamradio/Makefile	Sun Dec 15 18:08:28 2002
@@ -22,5 +22,3 @@
 obj-$(CONFIG_BAYCOM_SER_HDX)	+= baycom_ser_hdx.o	hdlcdrv.o
 obj-$(CONFIG_BAYCOM_PAR)	+= baycom_par.o		hdlcdrv.o
 obj-$(CONFIG_BAYCOM_EPP)	+= baycom_epp.o		hdlcdrv.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/irda/Makefile b/drivers/net/irda/Makefile
--- a/drivers/net/irda/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/irda/Makefile	Sun Dec 15 18:08:29 2002
@@ -40,5 +40,3 @@
 
 # The SIR helper module
 sir-dev-objs := sir_core.o sir_dev.o sir_dongle.o sir_kthread.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
--- a/drivers/net/irda/irda-usb.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/irda/irda-usb.c	Sun Dec 15 18:08:29 2002
@@ -75,16 +75,16 @@
 /* These are the currently known IrDA USB dongles. Add new dongles here */
 static struct usb_device_id dongles[] = {
 	/* ACTiSYS Corp,  ACT-IR2000U FIR-USB Adapter */
-	{ USB_DEVICE(0x9c4, 0x011), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ USB_DEVICE(0x9c4, 0x011), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
 	/* KC Technology Inc.,  KC-180 USB IrDA Device */
-	{ USB_DEVICE(0x50f, 0x180), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ USB_DEVICE(0x50f, 0x180), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
 	/* Extended Systems, Inc.,  XTNDAccess IrDA USB (ESI-9685) */
-	{ USB_DEVICE(0x8e9, 0x100), driver_info: IUC_SPEED_BUG | IUC_NO_WINDOW },
-	{ match_flags: USB_DEVICE_ID_MATCH_INT_CLASS |
+	{ USB_DEVICE(0x8e9, 0x100), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
+	{ .match_flags = USB_DEVICE_ID_MATCH_INT_CLASS |
 	               USB_DEVICE_ID_MATCH_INT_SUBCLASS,
-	  bInterfaceClass: USB_CLASS_APP_SPEC,
-	  bInterfaceSubClass: USB_CLASS_IRDA,
-	  driver_info: IUC_DEFAULT, },
+	  .bInterfaceClass = USB_CLASS_APP_SPEC,
+	  .bInterfaceSubClass = USB_CLASS_IRDA,
+	  .driver_info = IUC_DEFAULT, },
 	{ }, /* The end */
 };
 
diff -Nru a/drivers/net/irda/toshoboe.c b/drivers/net/irda/toshoboe.c
--- a/drivers/net/irda/toshoboe.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/irda/toshoboe.c	Sun Dec 15 18:08:28 2002
@@ -938,12 +938,12 @@
 }
 
 static struct pci_driver toshoboe_pci_driver = {
-  name		: "toshoboe",
-  id_table	: toshoboe_pci_tbl,
-  probe		: toshoboe_probe,
-  remove	: toshoboe_remove,
-  suspend	: toshoboe_suspend,
-  resume	: toshoboe_resume 
+	.name		= "toshoboe",
+	.id_table	= toshoboe_pci_tbl,
+	.probe		= toshoboe_probe,
+	.remove		= toshoboe_remove,
+	.suspend	= toshoboe_suspend,
+	.resume		= toshoboe_resume 
 };
 
 int __init
diff -Nru a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
--- a/drivers/net/irda/vlsi_ir.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/irda/vlsi_ir.c	Sun Dec 15 18:08:28 2002
@@ -495,10 +495,10 @@
 }
 
 static struct file_operations vlsi_proc_fops = {
-	open:		vlsi_proc_open,
-	llseek:		vlsi_proc_lseek,
-	read:		vlsi_proc_read,
-	release:	vlsi_proc_release,
+	.open		= vlsi_proc_open,
+	.llseek		= vlsi_proc_lseek,
+	.read		= vlsi_proc_read,
+	.release	= vlsi_proc_release,
 };
 #endif
 
diff -Nru a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
--- a/drivers/net/lasi_82596.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/lasi_82596.c	Sun Dec 15 18:08:28 2002
@@ -1565,9 +1565,9 @@
 MODULE_DEVICE_TABLE(parisc, lan_tbl);
 
 static struct parisc_driver lan_driver = {
-	name:		"Apricot",
-	id_table:	lan_tbl,
-	probe:		lan_init_chip,
+	.name		= "Apricot",
+	.id_table	= lan_tbl,
+	.probe		= lan_init_chip,
 };
 
 static int __devinit lasi_82596_init(void)
diff -Nru a/drivers/net/ni65.c b/drivers/net/ni65.c
--- a/drivers/net/ni65.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/ni65.c	Sun Dec 15 18:08:28 2002
@@ -1210,7 +1210,7 @@
 }
 
 #ifdef MODULE
-static struct net_device dev_ni65 = { base_addr: 0x360, irq: 9, init: ni65_probe };
+static struct net_device dev_ni65 = { .base_addr = 0x360, .irq = 9, .init = ni65_probe };
 
 /* set: io,irq,dma or set it when calling insmod */
 static int irq;
diff -Nru a/drivers/net/pcmcia/Makefile b/drivers/net/pcmcia/Makefile
--- a/drivers/net/pcmcia/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/pcmcia/Makefile	Sun Dec 15 18:08:28 2002
@@ -21,5 +21,3 @@
 obj-$(CONFIG_AIRONET4500_CS)	+= aironet4500_cs.o
 
 obj-$(CONFIG_PCMCIA_IBMTR)	+= ibmtr_cs.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
--- a/drivers/net/pcnet32.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/pcnet32.c	Sun Dec 15 18:08:28 2002
@@ -392,13 +392,13 @@
 }
 
 static struct pcnet32_access pcnet32_wio = {
-    read_csr:	pcnet32_wio_read_csr,
-    write_csr:	pcnet32_wio_write_csr,
-    read_bcr:	pcnet32_wio_read_bcr,
-    write_bcr:	pcnet32_wio_write_bcr,
-    read_rap:	pcnet32_wio_read_rap,
-    write_rap:	pcnet32_wio_write_rap,
-    reset:	pcnet32_wio_reset
+    .read_csr	= pcnet32_wio_read_csr,
+    .write_csr	= pcnet32_wio_write_csr,
+    .read_bcr	= pcnet32_wio_read_bcr,
+    .write_bcr	= pcnet32_wio_write_bcr,
+    .read_rap	= pcnet32_wio_read_rap,
+    .write_rap	= pcnet32_wio_write_rap,
+    .reset	= pcnet32_wio_reset
 };
 
 static u16 pcnet32_dwio_read_csr (unsigned long addr, int index)
@@ -447,13 +447,13 @@
 }
 
 static struct pcnet32_access pcnet32_dwio = {
-    read_csr:	pcnet32_dwio_read_csr,
-    write_csr:	pcnet32_dwio_write_csr,
-    read_bcr:	pcnet32_dwio_read_bcr,
-    write_bcr:	pcnet32_dwio_write_bcr,
-    read_rap:	pcnet32_dwio_read_rap,
-    write_rap:	pcnet32_dwio_write_rap,
-    reset:	pcnet32_dwio_reset
+    .read_csr	= pcnet32_dwio_read_csr,
+    .write_csr	= pcnet32_dwio_write_csr,
+    .read_bcr	= pcnet32_dwio_read_bcr,
+    .write_bcr	= pcnet32_dwio_write_bcr,
+    .read_rap	= pcnet32_dwio_read_rap,
+    .write_rap	= pcnet32_dwio_write_rap,
+    .reset	= pcnet32_dwio_reset
 };
 
 
@@ -1682,9 +1682,9 @@
 }
 
 static struct pci_driver pcnet32_driver = {
-    name:	DRV_NAME,
-    probe:	pcnet32_probe_pci,
-    id_table:	pcnet32_pci_tbl,
+    .name	= DRV_NAME,
+    .probe	= pcnet32_probe_pci,
+    .id_table	= pcnet32_pci_tbl,
 };
 
 MODULE_PARM(debug, "i");
diff -Nru a/drivers/net/rrunner.c b/drivers/net/rrunner.c
--- a/drivers/net/rrunner.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/rrunner.c	Sun Dec 15 18:08:28 2002
@@ -1761,10 +1761,10 @@
 MODULE_DEVICE_TABLE(pci, rr_pci_tbl);
 
 static struct pci_driver rr_driver = {
-	name:		"rrunner",
-	id_table:	rr_pci_tbl,
-	probe:		rr_init_one,
-	remove:		rr_remove_one,
+	.name		= "rrunner",
+	.id_table	= rr_pci_tbl,
+	.probe		= rr_init_one,
+	.remove		= rr_remove_one,
 };
 
 static int __init rr_init_module(void)
diff -Nru a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c
--- a/drivers/net/seeq8005.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/net/seeq8005.c	Sun Dec 15 18:08:30 2002
@@ -707,7 +707,7 @@
 	
 #ifdef MODULE
 
-static struct net_device dev_seeq = { init: seeq8005_probe };
+static struct net_device dev_seeq = { .init = seeq8005_probe };
 static int io = 0x320;
 static int irq = 10;
 MODULE_LICENSE("GPL");
diff -Nru a/drivers/net/sk98lin/Makefile b/drivers/net/sk98lin/Makefile
--- a/drivers/net/sk98lin/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/sk98lin/Makefile	Sun Dec 15 18:08:28 2002
@@ -56,6 +56,3 @@
 # SK_DBGCAT_DRV_EVENT           0x08000000      driver events
 
 EXTRA_CFLAGS += -Idrivers/net/sk98lin -DSK_USE_CSUM $(DBGDEF)
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/net/skfp/Makefile b/drivers/net/skfp/Makefile
--- a/drivers/net/skfp/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/net/skfp/Makefile	Sun Dec 15 18:08:32 2002
@@ -18,6 +18,3 @@
 #   thus simplify fixes to it), please do not clean it up!
 
 EXTRA_CFLAGS += -Idrivers/net/skfp -DPCI -DMEM_MAPPED_IO -Wno-strict-prototypes 
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/net/sundance.c b/drivers/net/sundance.c
--- a/drivers/net/sundance.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/sundance.c	Sun Dec 15 18:08:29 2002
@@ -1753,10 +1753,10 @@
 }
 
 static struct pci_driver sundance_driver = {
-	name:		DRV_NAME,
-	id_table:	sundance_pci_tbl,
-	probe:		sundance_probe1,
-	remove:		__devexit_p(sundance_remove1),
+	.name		= DRV_NAME,
+	.id_table	= sundance_pci_tbl,
+	.probe		= sundance_probe1,
+	.remove		= __devexit_p(sundance_remove1),
 };
 
 static int __init sundance_init(void)
diff -Nru a/drivers/net/sungem.c b/drivers/net/sungem.c
--- a/drivers/net/sungem.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/net/sungem.c	Sun Dec 15 18:08:32 2002
@@ -2557,7 +2557,7 @@
 		
 	switch(ecmd.cmd) {
         case ETHTOOL_GDRVINFO: {
-		struct ethtool_drvinfo info = { cmd: ETHTOOL_GDRVINFO };
+		struct ethtool_drvinfo info = { .cmd = ETHTOOL_GDRVINFO };
 
 		strncpy(info.driver, DRV_NAME, ETHTOOL_BUSINFO_LEN);
 		strncpy(info.version, DRV_VERSION, ETHTOOL_BUSINFO_LEN);
@@ -2652,7 +2652,7 @@
 
 	/* get link status */
 	case ETHTOOL_GLINK: {
-		struct ethtool_value edata = { cmd: ETHTOOL_GLINK };
+		struct ethtool_value edata = { .cmd = ETHTOOL_GLINK };
 
 		edata.data = (gp->lstate == link_up);
 		if (copy_to_user(ep_user, &edata, sizeof(edata)))
@@ -2662,7 +2662,7 @@
 
 	/* get message-level */
 	case ETHTOOL_GMSGLVL: {
-		struct ethtool_value edata = { cmd: ETHTOOL_GMSGLVL };
+		struct ethtool_value edata = { .cmd = ETHTOOL_GMSGLVL };
 
 		edata.data = gp->msg_enable;
 		if (copy_to_user(ep_user, &edata, sizeof(edata)))
diff -Nru a/drivers/net/sunhme.c b/drivers/net/sunhme.c
--- a/drivers/net/sunhme.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/sunhme.c	Sun Dec 15 18:08:29 2002
@@ -181,10 +181,10 @@
 
 struct pci_device_id happymeal_pci_ids[] __initdata = {
 	{
-	  vendor: PCI_VENDOR_ID_SUN,
-	  device: PCI_DEVICE_ID_SUN_HAPPYMEAL,
-	  subvendor: PCI_ANY_ID,
-	  subdevice: PCI_ANY_ID,
+	  .vendor	= PCI_VENDOR_ID_SUN,
+	  .device	= PCI_DEVICE_ID_SUN_HAPPYMEAL,
+	  .subvendor	= PCI_ANY_ID,
+	  .subdevice	= PCI_ANY_ID,
 	},
 	{ }			/* Terminating entry */
 };
diff -Nru a/drivers/net/tg3.c b/drivers/net/tg3.c
--- a/drivers/net/tg3.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/tg3.c	Sun Dec 15 18:08:29 2002
@@ -35,15 +35,6 @@
 #define PCI_DMA_BUS_IS_PHYS 1
 #endif
 
-/* Either I can't figure out how they secretly implemented it (ie. RXD flags
- * for mini ring, where it should go in NIC sram, and how many entries the NIC
- * firmware expects) or it isn't really fully implemented.  Perhaps Broadcom
- * wants people to pay for a "performance enhanced" version of their firmware +
- * binary-only driver that has the mini ring actually implemented.
- * These kids today... -DaveM
- */
-#define TG3_MINI_RING_WORKS 0
-
 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 #define TG3_VLAN_TAG_USED 1
 #else
@@ -63,8 +54,8 @@
 
 #define DRV_MODULE_NAME		"tg3"
 #define PFX DRV_MODULE_NAME	": "
-#define DRV_MODULE_VERSION	"1.2"
-#define DRV_MODULE_RELDATE	"Nov 14, 2002"
+#define DRV_MODULE_VERSION	"1.2a"
+#define DRV_MODULE_RELDATE	"Dec 9, 2002"
 
 #define TG3_DEF_MAC_MODE	0
 #define TG3_DEF_RX_MODE		0
@@ -94,10 +85,6 @@
  */
 #define TG3_RX_RING_SIZE		512
 #define TG3_DEF_RX_RING_PENDING		200
-#if TG3_MINI_RING_WORKS
-#define TG3_RX_MINI_RING_SIZE		256 /* ??? */
-#define TG3_DEF_RX_MINI_RING_PENDING	100
-#endif
 #define TG3_RX_JUMBO_RING_SIZE		256
 #define TG3_DEF_RX_JUMBO_RING_PENDING	100
 #define TG3_RX_RCB_RING_SIZE		1024
@@ -106,10 +93,6 @@
 
 #define TG3_RX_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
 				 TG3_RX_RING_SIZE)
-#if TG3_MINI_RING_WORKS
-#define TG3_RX_MINI_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
-				 TG3_RX_MINI_RING_SIZE)
-#endif
 #define TG3_RX_JUMBO_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
 			         TG3_RX_JUMBO_RING_SIZE)
 #define TG3_RX_RCB_RING_BYTES	(sizeof(struct tg3_rx_buffer_desc) * \
@@ -125,9 +108,6 @@
 #define NEXT_TX(N)		(((N) + 1) & (TG3_TX_RING_SIZE - 1))
 
 #define RX_PKT_BUF_SZ		(1536 + tp->rx_offset + 64)
-#if TG3_MINI_RING_WORKS
-#define RX_MINI_PKT_BUF_SZ	(256 + tp->rx_offset + 64)
-#endif
 #define RX_JUMBO_PKT_BUF_SZ	(9046 + tp->rx_offset + 64)
 
 /* minimum number of free TX descriptors required to wake up TX process */
@@ -1788,16 +1768,7 @@
 			src_map = &tp->rx_jumbo_buffers[src_idx];
 		skb_size = RX_JUMBO_PKT_BUF_SZ;
 		break;
-#if TG3_MINI_RING_WORKS
-	case RXD_OPAQUE_RING_MINI:
-		dest_idx = dest_idx_unmasked % TG3_RX_MINI_RING_SIZE;
-		desc = &tp->rx_mini[dest_idx];
-		map = &tp->rx_mini_buffers[dest_idx];
-		if (src_idx >= 0)
-			src_map = &tp->rx_mini_buffers[src_idx];
-		skb_size = RX_MINI_PKT_BUF_SZ;
-		break;
-#endif
+
 	default:
 		return -EINVAL;
 	};
@@ -1858,15 +1829,7 @@
 		src_desc = &tp->rx_jumbo[src_idx];
 		src_map = &tp->rx_jumbo_buffers[src_idx];
 		break;
-#if TG3_MINI_RING_WORKS
-	case RXD_OPAQUE_RING_MINI:
-		dest_idx = dest_idx_unmasked % TG3_RX_MINI_RING_SIZE;
-		dest_desc = &tp->rx_mini[dest_idx];
-		dest_map = &tp->rx_mini_buffers[dest_idx];
-		src_desc = &tp->rx_mini[src_idx];
-		src_map = &tp->rx_mini_buffers[src_idx];
-		break;
-#endif
+
 	default:
 		return;
 	};
@@ -1942,14 +1905,6 @@
 			skb = tp->rx_jumbo_buffers[desc_idx].skb;
 			post_ptr = &tp->rx_jumbo_ptr;
 		}
-#if TG3_MINI_RING_WORKS
-		else if (opaque_key == RXD_OPAQUE_RING_MINI) {
-			dma_addr = pci_unmap_addr(&tp->rx_mini_buffers[desc_idx],
-						  mapping);
-			skb = tp->rx_mini_buffers[desc_idx].skb;
-			post_ptr = &tp->rx_mini_ptr;
-		}
-#endif
 		else {
 			goto next_pkt_nopost;
 		}
@@ -1969,7 +1924,6 @@
 
 		len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */
 
-		/* Kill the copy case if we ever get the mini ring working. */
 		if (len > RX_COPY_THRESHOLD) {
 			int skb_size;
 
@@ -2055,15 +2009,6 @@
 		if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
 			tr32(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW);
 	}
-#if TG3_MINI_RING_WORKS
-	if (work_mask & RXD_OPAQUE_RING_MINI) {
-		sw_idx = tp->rx_mini_ptr % TG3_RX_MINI_RING_SIZE;
-		tw32_mailbox(MAILBOX_RCV_MINI_PROD_IDX + TG3_64BIT_REG_LOW,
-			     sw_idx);
-		if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
-			tr32(MAILBOX_RCV_MINI_PROD_IDX + TG3_64BIT_REG_LOW);
-	}
-#endif
 
 	return received;
 }
@@ -2764,20 +2709,7 @@
 		dev_kfree_skb_any(rxp->skb);
 		rxp->skb = NULL;
 	}
-#if TG3_MINI_RING_WORKS
-	for (i = 0; i < TG3_RX_MINI_RING_SIZE; i++) {
-		rxp = &tp->rx_mini_buffers[i];
 
-		if (rxp->skb == NULL)
-			continue;
-		pci_unmap_single(tp->pdev,
-				 pci_unmap_addr(rxp, mapping),
-				 RX_MINI_PKT_BUF_SZ - tp->rx_offset,
-				 PCI_DMA_FROMDEVICE);
-		dev_kfree_skb_any(rxp->skb);
-		rxp->skb = NULL;
-	}
-#endif
 	for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
 		rxp = &tp->rx_jumbo_buffers[i];
 
@@ -2842,9 +2774,6 @@
 
 	/* Zero out all descriptors. */
 	memset(tp->rx_std, 0, TG3_RX_RING_BYTES);
-#if TG3_MINI_RING_WORKS
-	memset(tp->rx_mini, 0, TG3_RX_MINI_RING_BYTES);
-#endif
 	memset(tp->rx_jumbo, 0, TG3_RX_JUMBO_RING_BYTES);
 	memset(tp->rx_rcb, 0, TG3_RX_RCB_RING_BYTES);
 
@@ -2877,19 +2806,7 @@
 		rxd->opaque = (RXD_OPAQUE_RING_STD |
 			       (i << RXD_OPAQUE_INDEX_SHIFT));
 	}
-#if TG3_MINI_RING_WORKS
-	for (i = 0; i < TG3_RX_MINI_RING_SIZE; i++) {
-		struct tg3_rx_buffer_desc *rxd;
 
-		rxd = &tp->rx_mini[i];
-		rxd->idx_len = (RX_MINI_PKT_BUF_SZ - tp->rx_offset - 64)
-			<< RXD_LEN_SHIFT;
-		rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT) |
-			RXD_FLAG_MINI;
-		rxd->opaque = (RXD_OPAQUE_RING_MINI |
-			       (i << RXD_OPAQUE_INDEX_SHIFT));
-	}
-#endif
 	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
 		for (i = 0; i < TG3_RX_JUMBO_RING_SIZE; i++) {
 			struct tg3_rx_buffer_desc *rxd;
@@ -2911,14 +2828,6 @@
 			break;
 	}
 
-#if TG3_MINI_RING_WORKS
-	for (i = 0; i < tp->rx_mini_pending; i++) {
-		if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_MINI,
-				     -1, i) < 0)
-			break;
-	}
-#endif
-
 	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
 		for (i = 0; i < tp->rx_jumbo_pending; i++) {
 			if (tg3_alloc_rx_skb(tp, RXD_OPAQUE_RING_JUMBO,
@@ -2943,13 +2852,6 @@
 				    tp->rx_std, tp->rx_std_mapping);
 		tp->rx_std = NULL;
 	}
-#if TG3_MINI_RING_WORKS
-	if (tp->rx_mini) {
-		pci_free_consistent(tp->pdev, TG3_RX_MINI_RING_BYTES,
-				    tp->rx_mini, tp->rx_mini_mapping);
-		tp->rx_mini = NULL;
-	}
-#endif
 	if (tp->rx_jumbo) {
 		pci_free_consistent(tp->pdev, TG3_RX_JUMBO_RING_BYTES,
 				    tp->rx_jumbo, tp->rx_jumbo_mapping);
@@ -2985,9 +2887,6 @@
 {
 	tp->rx_std_buffers = kmalloc((sizeof(struct ring_info) *
 				      (TG3_RX_RING_SIZE +
-#if TG3_MINI_RING_WORKS
-				       TG3_RX_MINI_RING_SIZE +
-#endif
 				       TG3_RX_JUMBO_RING_SIZE)) +
 				     (sizeof(struct tx_ring_info) *
 				      TG3_TX_RING_SIZE),
@@ -2995,29 +2894,14 @@
 	if (!tp->rx_std_buffers)
 		return -ENOMEM;
 
-#if TG3_MINI_RING_WORKS
 	memset(tp->rx_std_buffers, 0,
 	       (sizeof(struct ring_info) *
 		(TG3_RX_RING_SIZE +
-		 TG3_RX_MINI_RING_SIZE +
 		 TG3_RX_JUMBO_RING_SIZE)) +
 	       (sizeof(struct tx_ring_info) *
 		TG3_TX_RING_SIZE));
-#else
-	memset(tp->rx_std_buffers, 0,
-	       (sizeof(struct ring_info) *
-		(TG3_RX_RING_SIZE +
-		 TG3_RX_JUMBO_RING_SIZE)) +
-	       (sizeof(struct tx_ring_info) *
-		TG3_TX_RING_SIZE));
-#endif
 
-#if TG3_MINI_RING_WORKS
-	tp->rx_mini_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE];
-	tp->rx_jumbo_buffers = &tp->rx_mini_buffers[TG3_RX_MINI_RING_SIZE];
-#else
 	tp->rx_jumbo_buffers = &tp->rx_std_buffers[TG3_RX_RING_SIZE];
-#endif
 	tp->tx_buffers = (struct tx_ring_info *)
 		&tp->rx_jumbo_buffers[TG3_RX_JUMBO_RING_SIZE];
 
@@ -3026,14 +2910,6 @@
 	if (!tp->rx_std)
 		goto err_out;
 
-#if TG3_MINI_RING_WORKS
-	tp->rx_mini = pci_alloc_consistent(tp->pdev, TG3_RX_MINI_RING_BYTES,
-					   &tp->rx_mini_mapping);
-
-	if (!tp->rx_mini)
-		goto err_out;
-#endif
-
 	tp->rx_jumbo = pci_alloc_consistent(tp->pdev, TG3_RX_JUMBO_RING_BYTES,
 					    &tp->rx_jumbo_mapping);
 
@@ -4149,8 +4025,6 @@
 	 * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries.
 	 * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries.
 	 *
-	 * ??? No space allocated for mini receive ring? :(
-	 *
 	 * The size of each ring is fixed in the firmware, but the location is
 	 * configurable.
 	 */
@@ -4163,19 +4037,8 @@
 	tw32(RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR,
 	     NIC_SRAM_RX_BUFFER_DESC);
 
-#if TG3_MINI_RING_WORKS
-	tw32(RCVDBDI_MINI_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
-	     ((u64) tp->rx_mini_mapping >> 32));
-	tw32(RCVDBDI_MINI_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW,
-	     ((u64) tp->rx_mini_mapping & 0xffffffff));
-	tw32(RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS,
-	     RX_MINI_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT);
-	tw32(RCVDBDI_MINI_BD + TG3_BDINFO_NIC_ADDR,
-	     NIC_SRAM_RX_MINI_BUFFER_DESC);
-#else
 	tw32(RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS,
 	     BDINFO_FLAGS_DISABLED);
-#endif
 
 	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE) {
 		tw32(RCVDBDI_JUMBO_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH,
@@ -4193,9 +4056,6 @@
 
 	/* Setup replenish thresholds. */
 	tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8);
-#if TG3_MINI_RING_WORKS
-	tw32(RCVBDI_MINI_THRESH, tp->rx_mini_pending / 8);
-#endif
 	tw32(RCVBDI_JUMBO_THRESH, tp->rx_jumbo_pending / 8);
 
 	/* Clear out send RCB ring in SRAM. */
@@ -4243,13 +4103,6 @@
 		     tp->rx_std_ptr);
 	if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
 		tr32(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW);
-#if TG3_MINI_RING_WORKS
-	tp->rx_mini_ptr = tp->rx_mini_pending;
-	tw32_mailbox(MAILBOX_RCV_MINI_PROD_IDX + TG3_64BIT_REG_LOW,
-		     tp->rx_mini_ptr);
-	if (tp->tg3_flags & TG3_FLAG_MBOX_WRITE_REORDER)
-		tr32(MAILBOX_RCV_MINI_PROD_IDX + TG3_64BIT_REG_LOW);
-#endif
 
 	if (tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE)
 		tp->rx_jumbo_ptr = tp->rx_jumbo_pending;
@@ -4872,23 +4725,6 @@
 		       readl(rxd + 0x0), readl(rxd + 0x4),
 		       readl(rxd + 0x8), readl(rxd + 0xc));
 	}
-#if TG3_MINI_RING_WORKS
-	for (i = 0; i < 6; i++) {
-		unsigned long rxd;
-
-		rxd = tp->regs + NIC_SRAM_WIN_BASE + NIC_SRAM_RX_MINI_BUFFER_DESC
-			+ (i * sizeof(struct tg3_rx_buffer_desc));
-		printk("DEBUG: NIC RXD_MINI(%d)[0][%08x:%08x:%08x:%08x]\n",
-		       i,
-		       readl(rxd + 0x0), readl(rxd + 0x4),
-		       readl(rxd + 0x8), readl(rxd + 0xc));
-		rxd += (4 * sizeof(u32));
-		printk("DEBUG: NIC RXD_MINI(%d)[1][%08x:%08x:%08x:%08x]\n",
-		       i,
-		       readl(rxd + 0x0), readl(rxd + 0x4),
-		       readl(rxd + 0x8), readl(rxd + 0xc));
-	}
-#endif
 
 	for (i = 0; i < 6; i++) {
 		unsigned long rxd;
@@ -5419,19 +5255,11 @@
 		struct ethtool_ringparam ering = { ETHTOOL_GRINGPARAM };
 
 		ering.rx_max_pending = TG3_RX_RING_SIZE - 1;
-#if TG3_MINI_RING_WORKS
-		ering.rx_mini_max_pending = TG3_RX_MINI_RING_SIZE - 1;
-#else
 		ering.rx_mini_max_pending = 0;
-#endif
 		ering.rx_jumbo_max_pending = TG3_RX_JUMBO_RING_SIZE - 1;
 
 		ering.rx_pending = tp->rx_pending;
-#if TG3_MINI_RING_WORKS
-		ering.rx_mini_pending = tp->rx_mini_pending;
-#else
 		ering.rx_mini_pending = 0;
-#endif
 		ering.rx_jumbo_pending = tp->rx_jumbo_pending;
 		ering.tx_pending = tp->tx_pending;
 
@@ -5446,9 +5274,6 @@
 			return -EFAULT;
 
 		if ((ering.rx_pending > TG3_RX_RING_SIZE - 1) ||
-#if TG3_MINI_RING_WORKS
-		    (ering.rx_mini_pending > TG3_RX_MINI_RING_SIZE - 1) ||
-#endif
 		    (ering.rx_jumbo_pending > TG3_RX_JUMBO_RING_SIZE - 1) ||
 		    (ering.tx_pending > TG3_TX_RING_SIZE - 1))
 			return -EINVAL;
@@ -5457,9 +5282,6 @@
 		spin_lock(&tp->tx_lock);
 
 		tp->rx_pending = ering.rx_pending;
-#if TG3_MINI_RING_WORKS
-		tp->rx_mini_pending = ering.rx_mini_pending;
-#endif
 		tp->rx_jumbo_pending = ering.rx_jumbo_pending;
 		tp->tx_pending = ering.tx_pending;
 
@@ -6182,6 +6004,13 @@
 	if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0)
 		tp->tg3_flags |= TG3_FLAG_PCI_32BIT;
 
+	/* Chip-specific fixup from Broadcom driver */
+	if ((tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) &&
+	    (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) {
+		pci_state_reg |= PCISTATE_RETRY_SAME_DMA;
+		pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg);
+	}
+
 	/* Force the chip into D0. */
 	err = tg3_set_power_state(tp, 0);
 	if (err)
@@ -6868,9 +6697,6 @@
 	tg3_init_bufmgr_config(tp);
 
 	tp->rx_pending = TG3_DEF_RX_RING_PENDING;
-#if TG3_MINI_RING_WORKS
-	tp->rx_mini_pending = TG3_DEF_RX_MINI_RING_PENDING;
-#endif
 	tp->rx_jumbo_pending = TG3_DEF_RX_JUMBO_RING_PENDING;
 	tp->tx_pending = TG3_DEF_TX_RING_PENDING;
 
diff -Nru a/drivers/net/tg3.h b/drivers/net/tg3.h
--- a/drivers/net/tg3.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/tg3.h	Sun Dec 15 18:08:28 2002
@@ -25,9 +25,6 @@
 
 #define RX_STD_MAX_SIZE			1536
 #define RX_JUMBO_MAX_SIZE		0xdeadbeef /* XXX */
-#if TG3_MINI_RING_WORKS
-#define RX_MINI_MAX_SIZE		256
-#endif
 
 /* First 256 bytes are a mirror of PCI config space. */
 #define TG3PCI_VENDOR			0x00000000
@@ -1301,9 +1298,7 @@
 #define NIC_SRAM_MAC_ADDR_HIGH_MBOX	0x00000c14
 #define NIC_SRAM_MAC_ADDR_LOW_MBOX	0x00000c18
 
-#if TG3_MINI_RING_WORKS
 #define NIC_SRAM_RX_MINI_BUFFER_DESC	0x00001000
-#endif
 
 #define NIC_SRAM_DMA_DESC_POOL_BASE	0x00002000
 #define  NIC_SRAM_DMA_DESC_POOL_SIZE	 0x00002000
@@ -1453,9 +1448,7 @@
 #define RXD_FLAGS_SHIFT	0
 
 #define RXD_FLAG_END			0x0004
-#if TG3_MINI_RING_WORKS
 #define RXD_FLAG_MINI			0x0800
-#endif
 #define RXD_FLAG_JUMBO			0x0020
 #define RXD_FLAG_VLAN			0x0040
 #define RXD_FLAG_ERROR			0x0400
@@ -1490,9 +1483,7 @@
 #define RXD_OPAQUE_INDEX_SHIFT		0
 #define RXD_OPAQUE_RING_STD		0x00010000
 #define RXD_OPAQUE_RING_JUMBO		0x00020000
-#if TG3_MINI_RING_WORKS
 #define RXD_OPAQUE_RING_MINI		0x00040000
-#endif
 #define RXD_OPAQUE_RING_MASK		0x00070000
 };
 
@@ -1728,6 +1719,8 @@
 };
 
 struct tg3 {
+	/* begin "general, frequently-used members" cacheline section */
+
 	/* SMP locking strategy:
 	 *
 	 * lock: Held during all operations except TX packet
@@ -1741,18 +1734,51 @@
 	 * necessary for acquisition of 'tx_lock'.
 	 */
 	spinlock_t			lock;
-	spinlock_t			tx_lock;
+	spinlock_t			indirect_lock;
 
+	unsigned long			regs;
+	struct net_device		*dev;
+	struct pci_dev			*pdev;
+
+	struct tg3_hw_status		*hw_status;
+	dma_addr_t			status_mapping;
+
+	u32				msg_enable;
+
+	/* begin "tx thread" cacheline section */
 	u32				tx_prod;
 	u32				tx_cons;
+	u32				tx_pending;
+
+	spinlock_t			tx_lock;
+
+	/* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */
+	struct tg3_tx_buffer_desc	*tx_ring;
+	struct tx_ring_info		*tx_buffers;
+	dma_addr_t			tx_desc_mapping;
+
+	/* begin "rx thread" cacheline section */
 	u32				rx_rcb_ptr;
 	u32				rx_std_ptr;
 	u32				rx_jumbo_ptr;
-#if TG3_MINI_RING_WORKS
-	u32				rx_mini_ptr;
+	u32				rx_pending;
+	u32				rx_jumbo_pending;
+#if TG3_VLAN_TAG_USED
+	struct vlan_group		*vlgrp;
 #endif
-	spinlock_t			indirect_lock;
 
+	struct tg3_rx_buffer_desc	*rx_std;
+	struct ring_info		*rx_std_buffers;
+	dma_addr_t			rx_std_mapping;
+
+	struct tg3_rx_buffer_desc	*rx_jumbo;
+	struct ring_info		*rx_jumbo_buffers;
+	dma_addr_t			rx_jumbo_mapping;
+
+	struct tg3_rx_buffer_desc	*rx_rcb;
+	dma_addr_t			rx_rcb_mapping;
+
+	/* begin "everything else" cacheline(s) section */
 	struct net_device_stats		net_stats;
 	struct net_device_stats		net_stats_prev;
 	unsigned long			phy_crc_errors;
@@ -1791,8 +1817,6 @@
 #define TG3_FLAG_SPLIT_MODE		0x40000000
 #define TG3_FLAG_INIT_COMPLETE		0x80000000
 
-	u32				msg_enable;
-
 	u32				split_mode_max_reqs;
 #define SPLIT_MODE_5704_MAX_REQ		3
 
@@ -1806,13 +1830,6 @@
 	struct tg3_link_config		link_config;
 	struct tg3_bufmgr_config	bufmgr_config;
 
-	u32				rx_pending;
-#if TG3_MINI_RING_WORKS
-	u32				rx_mini_pending;
-#endif
-	u32				rx_jumbo_pending;
-	u32				tx_pending;
-
 	/* cache h/w values, often passed straight to h/w */
 	u32				rx_mode;
 	u32				tx_mode;
@@ -1864,36 +1881,6 @@
 	 (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \
 	 (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \
 	 (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES)
-
-	unsigned long			regs;
-	struct pci_dev			*pdev;
-	struct net_device		*dev;
-#if TG3_VLAN_TAG_USED
-	struct vlan_group		*vlgrp;
-#endif
-
-	struct tg3_rx_buffer_desc	*rx_std;
-	struct ring_info		*rx_std_buffers;
-	dma_addr_t			rx_std_mapping;
-#if TG3_MINI_RING_WORKS
-	struct tg3_rx_buffer_desc	*rx_mini;
-	struct ring_info		*rx_mini_buffers;
-	dma_addr_t			rx_mini_mapping;
-#endif
-	struct tg3_rx_buffer_desc	*rx_jumbo;
-	struct ring_info		*rx_jumbo_buffers;
-	dma_addr_t			rx_jumbo_mapping;
-
-	struct tg3_rx_buffer_desc	*rx_rcb;
-	dma_addr_t			rx_rcb_mapping;
-
-	/* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */
-	struct tg3_tx_buffer_desc	*tx_ring;
-	struct tx_ring_info		*tx_buffers;
-	dma_addr_t			tx_desc_mapping;
-
-	struct tg3_hw_status		*hw_status;
-	dma_addr_t			status_mapping;
 
 	struct tg3_hw_stats		*hw_stats;
 	dma_addr_t			stats_mapping;
diff -Nru a/drivers/net/tokenring/Makefile b/drivers/net/tokenring/Makefile
--- a/drivers/net/tokenring/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/tokenring/Makefile	Sun Dec 15 18:08:28 2002
@@ -14,5 +14,3 @@
 obj-$(CONFIG_TMSISA) 	+= tmsisa.o
 obj-$(CONFIG_SMCTR) 	+= smctr.o
 obj-$(CONFIG_3C359)	+= 3c359.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/tulip/Makefile b/drivers/net/tulip/Makefile
--- a/drivers/net/tulip/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/net/tulip/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 tulip-objs			:= eeprom.o interrupt.o media.o \
 				   timer.o tulip_core.o		\
 				   21142.o pnic.o pnic2.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/wan/Makefile b/drivers/net/wan/Makefile
--- a/drivers/net/wan/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/net/wan/Makefile	Sun Dec 15 18:08:29 2002
@@ -68,5 +68,3 @@
 endif
 obj-$(CONFIG_N2)		+= n2.o
 obj-$(CONFIG_C101)		+= c101.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/wan/lmc/Makefile b/drivers/net/wan/lmc/Makefile
--- a/drivers/net/wan/lmc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/net/wan/lmc/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,6 +15,3 @@
 # -DLMC_PACKET_LOG
 
 EXTRA_CFLAGS += -I. $(DBGDEF)
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/net/wireless/Makefile b/drivers/net/wireless/Makefile
--- a/drivers/net/wireless/Makefile	Sun Dec 15 18:08:33 2002
+++ b/drivers/net/wireless/Makefile	Sun Dec 15 18:08:33 2002
@@ -18,5 +18,3 @@
 
 obj-$(CONFIG_AIRO)		+= airo.o
 obj-$(CONFIG_AIRO_CS)		+= airo_cs.o airo.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
--- a/drivers/net/wireless/orinoco_cs.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/net/wireless/orinoco_cs.c	Sun Dec 15 18:08:32 2002
@@ -369,7 +369,7 @@
 	CS_CHECK(GetFirstTuple, handle, &tuple);
 	while (1) {
 		cistpl_cftable_entry_t *cfg = &(parse.cftable_entry);
-		cistpl_cftable_entry_t dflt = { index: 0 };
+		cistpl_cftable_entry_t dflt = { .index = 0 };
 
 		CFG_CHECK(GetTupleData, handle, &tuple);
 		CFG_CHECK(ParseTuple, handle, &tuple, &parse);
diff -Nru a/drivers/nubus/Makefile b/drivers/nubus/Makefile
--- a/drivers/nubus/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/nubus/Makefile	Sun Dec 15 18:08:32 2002
@@ -8,5 +8,3 @@
 
 obj-$(CONFIG_MODULES) += nubus_syms.o 
 obj-$(CONFIG_PROC_FS) += proc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/parport/Makefile b/drivers/parport/Makefile
--- a/drivers/parport/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/parport/Makefile	Sun Dec 15 18:08:28 2002
@@ -19,5 +19,3 @@
 obj-$(CONFIG_PARPORT_ATARI)	+= parport_atari.o
 obj-$(CONFIG_PARPORT_SUNBPP)	+= parport_sunbpp.o
 obj-$(CONFIG_PARPORT_GSC)	+= parport_gsc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pci/Makefile b/drivers/pci/Makefile
--- a/drivers/pci/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/pci/Makefile	Sun Dec 15 18:08:32 2002
@@ -39,8 +39,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := devlist.h classlist.h
 
-include $(TOPDIR)/Rules.make
-
 # Dependencies on generated files need to be listed explicitly
 
 $(obj)/names.o: $(obj)/devlist.h $(obj)/classlist.h
diff -Nru a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
--- a/drivers/pcmcia/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/pcmcia/Makefile	Sun Dec 15 18:08:31 2002
@@ -47,5 +47,3 @@
 sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) 	+= sa1100_trizeps.o
 sa1100_cs-objs-$(CONFIG_SA1100_YOPY)		+= sa1100_yopy.o
 sa1100_cs-objs					:= $(sa1100_cs-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pnp/Makefile b/drivers/pnp/Makefile
--- a/drivers/pnp/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/pnp/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,5 +10,3 @@
 obj-$(CONFIG_ISAPNP)		+= isapnp/
 
 export-objs	:= core.o driver.o resource.o $(pnp-card-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pnp/isapnp/Makefile b/drivers/pnp/isapnp/Makefile
--- a/drivers/pnp/isapnp/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/pnp/isapnp/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 isapnp-proc-$(CONFIG_PROC_FS) = proc.o
 
 obj-y := core.o $(isapnp-proc-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/pnp/pnpbios/Makefile b/drivers/pnp/pnpbios/Makefile
--- a/drivers/pnp/pnpbios/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/pnp/pnpbios/Makefile	Sun Dec 15 18:08:31 2002
@@ -7,5 +7,3 @@
 pnpbios-proc-$(CONFIG_PROC_FS) = proc.o
 
 obj-y := core.o $(pnpbios-proc-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/s390/Makefile b/drivers/s390/Makefile
--- a/drivers/s390/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,9 +3,6 @@
 #
 
 obj-y += s390mach.o sysinfo.o
-obj-y += cio/ block/ char/ misc/ net/
+obj-y += cio/ block/ char/ net/
 
 drivers-y += drivers/s390/built-in.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/s390/block/Makefile b/drivers/s390/block/Makefile
--- a/drivers/s390/block/Makefile	Sun Dec 15 18:08:33 2002
+++ b/drivers/s390/block/Makefile	Sun Dec 15 18:08:33 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_DASD_ECKD) += dasd_eckd_mod.o
 obj-$(CONFIG_DASD_FBA)  += dasd_fba_mod.o
 obj-$(CONFIG_BLK_DEV_XPRAM) += xpram.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/s390/char/Makefile b/drivers/s390/char/Makefile
--- a/drivers/s390/char/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/char/Makefile	Sun Dec 15 18:08:29 2002
@@ -20,5 +20,3 @@
 tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
 obj-$(CONFIG_S390_TAPE) += tape.o
 obj-$(CONFIG_S390_TAPE_34XX) += tape_34xx.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
--- a/drivers/s390/char/sclp.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/char/sclp.c	Sun Dec 15 18:08:29 2002
@@ -47,7 +47,7 @@
 static struct list_head sclp_reg_list;
 
 /* sccb queue */
-struct list_head sclp_req_queue;
+static struct list_head sclp_req_queue;
 
 /* sccb for unconditional read */
 static struct sclp_req sclp_read_req;
@@ -448,7 +448,7 @@
 	spin_unlock_irqrestore(&sclp_lock, flags);
 }
 
-struct sclp_register sclp_state_change_event = {
+static struct sclp_register sclp_state_change_event = {
 	.receive_mask = EvTyp_StateChange_Mask,
 	.receiver_fn = sclp_state_change
 };
@@ -514,7 +514,7 @@
 	ctrl_alt_del();
 }
 
-struct sclp_register sclp_quiesce_event = {
+static struct sclp_register sclp_quiesce_event = {
 	.receive_mask = EvTyp_SigQuiesce_Mask,
 	.receiver_fn = sclp_quiesce
 };
diff -Nru a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c
--- a/drivers/s390/char/sclp_con.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/char/sclp_con.c	Sun Dec 15 18:08:29 2002
@@ -97,7 +97,7 @@
 /*
  * Writes the given message to S390 system console
  */
-void
+static void
 sclp_console_write(struct console *console, const char *message,
 		   unsigned int count)
 {
@@ -152,7 +152,7 @@
 }
 
 /* returns the device number of the SCLP console */
-kdev_t
+static kdev_t
 sclp_console_device(struct console *c)
 {
 	return	mk_kdev(sclp_console_major, sclp_console_minor);
@@ -163,7 +163,7 @@
  * is going to give up. We have to make sure that all buffers
  * will be flushed to the SCLP.
  */
-void
+static void
 sclp_console_unblank(void)
 {
 	unsigned long flags;
@@ -187,7 +187,7 @@
  * used to register the SCLP console to the kernel and to
  * give printk necessary information
  */
-struct console sclp_console =
+static struct console sclp_console =
 {
 	.name = sclp_console_name,
 	.write = sclp_console_write,
diff -Nru a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c
--- a/drivers/s390/char/sclp_rw.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/char/sclp_rw.c	Sun Dec 15 18:08:29 2002
@@ -31,7 +31,7 @@
 #define MAX_SCCB_ROOM (PAGE_SIZE - sizeof(struct sclp_buffer))
 
 /* Event type structure for write message and write priority message */
-struct sclp_register sclp_rw_event = {
+static struct sclp_register sclp_rw_event = {
 	.send_mask = EvTyp_Msg_Mask | EvTyp_PMsgCmd_Mask
 };
 
diff -Nru a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
--- a/drivers/s390/char/sclp_tty.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/s390/char/sclp_tty.c	Sun Dec 15 18:08:28 2002
@@ -466,7 +466,7 @@
 /*
  * push input to tty
  */
-void sclp_tty_input(unsigned char* buf, unsigned int count)
+static void sclp_tty_input(unsigned char* buf, unsigned int count)
 {
 	unsigned int cchar;
 
@@ -694,7 +694,7 @@
 {
 }
 
-struct sclp_register sclp_input_event =
+static struct sclp_register sclp_input_event =
 {
 	.receive_mask = EvTyp_OpCmd_Mask | EvTyp_PMsgCmd_Mask,
 	.state_change_fn = sclp_tty_state_change,
diff -Nru a/drivers/s390/char/tape.c b/drivers/s390/char/tape.c
--- a/drivers/s390/char/tape.c	Sun Dec 15 18:08:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,1907 +0,0 @@
-/***********************************************************************
- *  drivers/s390/char/tape.c
- *    tape device driver for S/390 and zSeries tapes.
- *
- *  S390 and zSeries version
- *    Copyright (C) 2001 IBM Corporation
- *    Author(s): Carsten Otte <cotte@de.ibm.com>
- *               Michael Holzheu <holzheu@de.ibm.com>
- *               Tuan Ngo-Anh <ngoanh@de.ibm.com>
- *
- ***********************************************************************
- */
-
-#include "tapedefs.h" // kernel 2.2 compatibility defines
-
-#include <linux/stddef.h>    // defines NULL
-#include <linux/proc_fs.h>   // for /proc/tapedevices
-#include <linux/init.h>      // for kernel parameters
-#include <linux/kmod.h>      // for requesting modules
-#include <linux/spinlock.h>  // for locks
-#include <asm/types.h>       // for variable types
-#ifdef CONFIG_S390_TAPE_DYNAMIC
-#include <asm/s390dyn.h>
-#endif
-#include "tape.h"
-#ifdef CONFIG_S390_TAPE_3590
-#include "tape3590.h"
-#endif
-#ifdef CONFIG_S390_TAPE_3490
-#include "tape3490.h"
-#endif
-#ifdef CONFIG_S390_TAPE_3480
-#include "tape3480.h"
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
-#include "tapeblock.h"
-#endif
-#ifdef CONFIG_S390_TAPE_CHAR
-#include "tapechar.h"
-#endif
-#ifdef CONFIG_PROC_FS
-#include <linux/vmalloc.h>
-#endif
-#define PRINTK_HEADER "T390:"
-#define TAPE_MAX_DEVREGS        (256 / TAPE_MINORS_PER_DEV)
-
-#define TAPE_NO_IO          0
-#define TAPE_DO_IO          1
-
-#define TAPE_CIO_PRIVATE_DATA
-
-#ifdef CONFIG_KMOD
-#define tape_request_module(a) request_module(a)
-#else
-#define tape_request_module(a)
-#endif
-
-/*******************************************************************
- * Internal Prototypes
- *******************************************************************/
-
-static void tape_do_irq (int irq, void *int_parm, struct pt_regs *regs);
-static inline int tape_halt_io(tape_dev_t* td);
-static void tape_wait(tape_ccw_req_t* treq);
-#ifdef CONFIG_S390_TAPE_DYNAMIC
-/* functions for dyn. dev. attach/detach */
-static int tape_oper_handler ( int irq, struct _devreg *dreg);
-static void tape_noper_handler ( int irq, int status );
-#endif
-static inline void tape_disable_device(tape_dev_t* td);
-static inline int tape_enable_device(tape_dev_t* td);
-
-
-/*******************************************************************
- * GLOBALS
- *******************************************************************/
-
-static devreg_t          *tape_devreg[TAPE_MAX_DEVREGS];
-static int               tape_devregct=0;
-static int               tape_autoprobe = 1;
-static tape_discipline_t *tape_first_disc = NULL;
-tape_dev_t               *tape_first_dev = NULL;
-tape_frontend_t          *tape_first_front = NULL;
-char                     *tape[256] = { NULL, }; 
-
-/*
- * Lock hirarchy:
- * tape_discipline_lock > tape_dev_lock > td->lock
- */
-
-rwlock_t   tape_dev_lock=RW_LOCK_UNLOCKED;
-static rwlock_t   tape_discipline_lock=RW_LOCK_UNLOCKED;
-
-#ifdef TAPE_DEBUG
-debug_info_t *tape_dbf_area = NULL;
-#endif
-
-const char* tape_med_st_verbose[MS_SIZE]={
-	"UNKNOWN ",
-	"LOADED  ",
-	"UNLOADED"
-};
-
-const char* tape_state_verbose[TS_SIZE]={
-	"UNUSED",
-	"IN_USE", 
-	"INIT  ",
-	"NOT_OP"
-};
-
-const char* tape_op_verbose[TO_SIZE] = {
-	"BLK",
-	"BSB",
-	"BSF",
-	"DSE",
-	"EGA",
-	"FSB",
-	"FSF",
-	"LDI",
-	"LBL",
-	"MSE",
-	"NOP",
-	"RBA",
-	"RBI",
-	"RBU",
-	"RBL",
-	"RDC",
-	"RFO",
-	"RSD",
-	"REW",
-	"RUN",
-	"SEN",
-	"SID",
-	"SNP",
-	"SPG",
-	"SWI",
-	"SMR",
-	"SYN",
-	"TIO",
-	"UNA",
-	"WRI",
-	"WTM",
-	"MSN",
-	"LOA",
-	"RCF", /* 3590 */
-	"RAT", /* 3590 */
-	"NOT"
-};
-
-/*******************************************************************
- * DEVFS Functions
- *******************************************************************/
-
-#ifdef CONFIG_DEVFS_FS
-
-/*
- * Create devfs root entry (devno in hex) for device td
- */
-
-static inline devfs_handle_t
-tape_mkdevfsroot (tape_dev_t* td) 
-{
-    char devno [10];
-    sprintf (devno,"tape/%04x",td->devinfo.devno);
-    return devfs_mk_dir(NULL, devno, NULL);
-}
-
-/*
- * Remove devfs root entry for device td
- */
-
-static inline void
-tape_rmdevfsroot (tape_dev_t* td)
-{
-    devfs_remove("tape/%04x", td->devinfo.devno);
-}
-
-#endif
-
-/*******************************************************************
- * PROCFS Functions
- *******************************************************************/
-
-#ifdef CONFIG_PROC_FS
-/* functions used in tape_proc_file_ops */
-static ssize_t tape_proc_devices_read (struct file *file, char *user_buf, size_t user_len, loff_t * offset);
-static int tape_proc_devices_open (struct inode *inode, struct file *file);
-static int tape_proc_devices_release (struct inode *inode, struct file *file);
-
-/* our proc tapedevices entry */
-static struct proc_dir_entry *tape_proc_devices;
-
-typedef struct {
-	char *data;
-	int len;
-} tape_procinfo_t;
-
-static struct file_operations tape_proc_devices_file_ops =
-{
-	.owner = THIS_MODULE,
-	.read = tape_proc_devices_read,	/* read */
-	.open = tape_proc_devices_open,	/* open */
-	.release = tape_proc_devices_release,	/* close */
-};
-
-/* 
- * Initialize procfs stuff on startup
- */
-
-static inline void
-tape_proc_init (void) {
-	tape_proc_devices = create_proc_entry ("tapedevices",
-						S_IFREG | S_IRUGO | S_IWUSR,
-						&proc_root);
-	if (tape_proc_devices == NULL) 
-	        goto error;
-	tape_proc_devices->proc_fops = &tape_proc_devices_file_ops;
-	tape_proc_devices->proc_iops = &tape_proc_devices_inode_ops;
-	return;
- error:
-	PRINT_WARN ("tape: Cannot register procfs entry tapedevices\n");
-	return;
-}
-
-/*
- * Open function for /proc/tapedevices
- */
-
-static int
-tape_proc_devices_open (struct inode *inode, struct file *file)
-{
-	tape_dev_t* td;
-	tape_procinfo_t* procinfo;
-	char* data = NULL;
-	int size=0,check_size = -1;
-	int pos=0;
-	int rc=0;
-	long lockflags,lockflags2;
-	tape_ccw_req_t *treq;
-
-	procinfo = kmalloc (sizeof(tape_procinfo_t),GFP_KERNEL);
-	if (!procinfo){
-		rc = -ENOMEM;
-		goto out_no_lock;
-	}
-
-	/* Find out mem size for output, ensure that after releasing lock   */
-	/* (vmalloc must not be called with interrupts disabled) no devices */
-	/* have been added/removed                                          */
-
-	do{
-		size = 100; // Headline
-		read_lock_irqsave(&tape_dev_lock,lockflags);
-
-		for (td=tape_first_dev;td!=NULL;td=td->next)
-			size+=100; // FIXME: Guess better!
-
-		if(size == check_size)
-                        break;
-
-		read_unlock_irqrestore(&tape_dev_lock,lockflags);
-
-		if(data)
-			vfree(data);
-		data=vmalloc(size);
-		if (!data) {
-                    kfree (procinfo);
-                    rc = -ENOMEM;
-                    goto out_no_lock;
-		}
-		check_size = size;
-	}while (1);
-
-	// We have the tape_dev lock now
-
-#ifdef CONFIG_S390_TAPE_CHAR
-	pos+=sprintf(data+pos,"TapeNo\tDevNo\tCuType\tCuModel\tDevType\tDevMod\tBlkSize\tState\tOp\tMedState\n");
-#else
-	pos+=sprintf(data+pos,"TapeNo\tDevNo\tCuType\tCuModel\tDevType\tDevMod\tState\tOp\tMedState\n");
-#endif
-
-	for (td=tape_first_dev;td!=NULL;td=td->next) {
-		s390irq_spin_lock_irqsave (td->devinfo.irq,lockflags2);
-		treq = tape_get_active_ccw_req(td);
-		pos+=sprintf(data+pos,"%d\t",td->first_minor/TAPE_MINORS_PER_DEV);
-		pos+=sprintf(data+pos,"%04X\t",td->devinfo.devno);
-		pos+=sprintf(data+pos,"%04X\t",td->devinfo.sid_data.cu_type);
-		pos+=sprintf(data+pos,"%02X\t",td->devinfo.sid_data.cu_model);
-		pos+=sprintf(data+pos,"%04X\t",td->devinfo.sid_data.dev_type);
-		pos+=sprintf(data+pos,"%02X\t",td->devinfo.sid_data.dev_model);
-#ifdef CONFIG_S390_TAPE_CHAR
-		if(td->char_data.block_size == 0)
-			pos+=sprintf(data+pos,"auto\t");
-		else
-			pos+=sprintf(data+pos,"%i\t",td->char_data.block_size);
-#endif
-		pos+=sprintf(data+pos,"%s\t",((tape_state_get(td) >= 0) &&
-			(tape_state_get(td) < TS_SIZE)) ?
-			tape_state_verbose[tape_state_get (td)] : "UNKNOWN");
-		pos+=sprintf(data+pos,"%s\t",(treq != NULL) ? 
-			tape_op_verbose[treq->op] : "---");
-		pos+=sprintf(data+pos,"%s\n",tape_med_st_verbose[td->medium_state]);
-		s390irq_spin_unlock_irqrestore (td->devinfo.irq,lockflags2);
-	}
-
-	procinfo->data=data;
-	procinfo->len=pos;
-        if (pos>size) BUG(); // we've overwritten some memory
-	file->private_data= (void*) procinfo;
-	read_unlock_irqrestore(&tape_dev_lock,lockflags);
-out_no_lock:
-	return rc;
-}
-
-/*
- * Read function for /proc/tapedevices
- */
-
-static ssize_t
-tape_proc_devices_read (struct file *file, char *user_buf, size_t user_len, loff_t * offset)
-{
-	loff_t len = 0;
-	tape_procinfo_t *p_info = (tape_procinfo_t *) file->private_data;
-
-	if (*offset >= p_info->len) {
-		goto out; /* EOF */
-	} else {
-		len =  user_len<(p_info->len - *offset)?user_len:(p_info->len - *offset);
-		if (copy_to_user (user_buf, &(p_info->data[*offset]), len))
-			return -EFAULT;
-		(*offset) += len;
-	}
-out:
-	return len;
-}
-
-/*
- * Close function for /proc/tapedevices
- */
-
-static int
-tape_proc_devices_release (struct inode *inode, struct file *file)
-{
-	int rc = 0;
-	tape_procinfo_t *p_info = (tape_procinfo_t *) file->private_data;
-        vfree(p_info->data);
-        kfree (p_info);
-	return rc;
-}
-
-/*
- * Cleanup all stuff registered to the procfs
- */
-static inline void
-tape_proc_cleanup (void)
-{
-        if (tape_proc_devices != NULL)
-		remove_proc_entry ("tapedevices", &proc_root);
-}
-
-#endif /* CONFIG_PROC_FS */
-
-/*******************************************************************
- * Wait/Wakeup Functions
- *******************************************************************/
-
-static void tape_wake_up_remove(tape_ccw_req_t* treq){
-	tape_remove_ccw_req(treq->tape_dev,treq);
-	tape_free_ccw_req(treq);
-}
- 
-static void tape_wake_up(tape_ccw_req_t* treq){
-        treq->wakeup = NULL;
-        wake_up(&treq->wq);
-}
- 
-static void tape_wake_up_interruptible(tape_ccw_req_t* treq){
-        treq->wakeup = NULL;
-        wake_up_interruptible(&treq->wq);
-}
- 
-#ifdef CONFIG_S390_TAPE_BLOCK
-static void tape_schedule_tapeblock(tape_ccw_req_t* treq){
-        treq->wakeup = NULL;
-        tapeblock_schedule_exec_io((tape_dev_t*)(treq->tape_dev));;
-}
-#endif
- 
-static void tape_wait_event(tape_ccw_req_t* treq){
-        wait_event (treq->wq,(treq->wakeup == NULL));
-}
- 
-static void tape_wait_event_interruptible(tape_ccw_req_t* treq){
-        wait_event_interruptible(treq->wq,(treq->wakeup == NULL));
-	if (signal_pending (current)) {
-		treq->rc = tape_halt_io(treq->tape_dev);
-		if(treq->rc == -ERESTARTSYS)
-		        PRINT_INFO("IO stopped on irq %d\n",treq->tape_dev->devinfo.irq); /* FIXME: only put into dbf */
-                else if(treq->rc == 0)
-		        PRINT_INFO("could not stop IO,irq was faster on irq %d\n",treq->tape_dev->devinfo.irq); /* FIXME: only put into dbf */
-                else
-			PRINT_WARN("IO error while stopping IO on irq %d\n",treq->tape_dev->devinfo.irq);
-	}
-}
-
-static void tape_wait_event_interruptible_nohaltio(tape_ccw_req_t* treq){
-	wait_event_interruptible(treq->wq,(treq->wakeup == NULL));
-}
-
-/*******************************************************************
- * DYNAMIC ATTACH/DETACH Functions
- *******************************************************************/
-
-static inline void
-tape_init_devregs(void)
-{
-        long lockflags;
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-	memset(tape_devreg,0,sizeof(devreg_t*) * TAPE_MAX_DEVREGS);
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*
- * Alloc a devreg for a devno
- */
-
-static inline devreg_t *
-tape_create_devno_devreg (int devno)
-{
-        devreg_t *devreg = kmalloc (sizeof (devreg_t), GFP_KERNEL);
-        if (devreg != NULL) {
-                memset (devreg, 0, sizeof (devreg_t));
-                devreg->ci.devno = devno;
-                devreg->flag = DEVREG_TYPE_DEVNO;
-                devreg->oper_func = tape_oper_handler;
-        }
-        return devreg;
-}
-
-/*
- * Alloc a devreg for a cu-type 
- */
- 
-static inline devreg_t *
-tape_create_cu_devreg (int cu_type)
-{
-        devreg_t *devreg = kmalloc (sizeof (devreg_t), GFP_KERNEL);
-        if (devreg != NULL) {
-                memset (devreg, 0, sizeof (devreg_t));
-                devreg->ci.hc.ctype = cu_type;
-                devreg->flag = DEVREG_MATCH_CU_TYPE | DEVREG_TYPE_DEVCHARS;
-                devreg->oper_func = tape_oper_handler;
-        }
-        return devreg;
-}
-
-/*
- * Create devregs for device numbers from "from" to "to"
- */
- 
-static inline void
-tape_create_devregs_range(int from, int to)
-{
-	int i;
-	long lockflags;
- 
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-	for (i=from;i<=to;i++) {
-		// register for attch/detach of a devno
-		if(tape_devregct >= TAPE_MAX_DEVREGS){
-			PRINT_WARN ("Could not create devregs for devno range %04x - %04x.\n",i,to);
-			PRINT_WARN ("These devices cannot be used. Use autoprobe\n");
-			PRINT_WARN ("or specify device ranges more precisely!\n");
-			break;
-		}
-		tape_devreg[tape_devregct]=tape_create_devno_devreg(i);
-		if (tape_devreg[tape_devregct]!=NULL) {
-                        s390_device_register (tape_devreg[tape_devregct++]);
-		} else {
-                	PRINT_WARN ("Could not create devreg for devno %04x, dyn. attach for this devno deactivated.\n",i);
-		}
-	}
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-        return;
-}
-
-/*
- * Create a devreg for a discipline
- */
-
-static inline void
-tape_create_devreg_for_disc(tape_discipline_t *disc)
-{
-	int devreg_nr;
-	long lockflags;
- 
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-	for(devreg_nr = 0; devreg_nr < TAPE_MAX_DEVREGS; devreg_nr++){
-		if(tape_devreg[devreg_nr] == NULL)
-			break;
-	}
-	if(devreg_nr == TAPE_MAX_DEVREGS){
-		PRINT_WARN ("Could not create devreg for discipline (%x), dyn. attach for this discipline deactivated.\n",disc->cu_type);
-		goto out_unlock;
-	}
-	tape_devreg[devreg_nr] = tape_create_cu_devreg(disc->cu_type);
-	if (tape_devreg[devreg_nr] != NULL) {
-		s390_device_register(tape_devreg[devreg_nr]);
-	} else {
-		PRINT_WARN("Could not alloc devreg: Out of memory\n");
-		PRINT_WARN("Dynamic attach/detach will not work!\n");
-	}
-out_unlock:
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-	return;
-}
-
-/*
- * Free all devregs
- */ 
-
-static inline void
-tape_delete_all_devregs(void)
-{
-	int i;
-	long lockflags;
-
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-
-	for(i = 0; i < TAPE_MAX_DEVREGS; i++){
-		if(tape_devreg[i]){
-			s390_device_unregister(tape_devreg[i]);
-			kfree(tape_devreg[i]);
-		}
-	}
-	memset(tape_devreg,0,sizeof(devreg_t*) * TAPE_MAX_DEVREGS);
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*
- * Free Devregs for a discipline
- */
-
-static inline void
-tape_delete_devreg_for_disc(tape_discipline_t* disc)
-{
-	int i;
-	long lockflags;
- 
-	write_lock_irqsave(&tape_dev_lock,lockflags);
- 
-	for(i = 0; i < TAPE_MAX_DEVREGS; i++){
-		if(tape_devreg[i]){
-			if(tape_devreg[i]->ci.hc.ctype == disc->cu_type){
-				s390_device_unregister(tape_devreg[i]);
-				kfree(tape_devreg[i]);
-				tape_devreg[i] = NULL;
-			}
-		}
-	}
- 
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-
-/*******************************************************************
- * Module/Kernel Parameter Handling
- *******************************************************************/
-
-#ifndef MODULE
-static char tape_parm_string[1024] __initdata = { 0, };
-
-/*
- * Get Kernel parameters (str) seperated by ","
- * and store them into the tape[] array
- */
-
-static void
-tape_split_parm_string (char *str)
-{
-	char *tmp = str;
-	int count = 0;
-	while (tmp != NULL && *tmp != '\0') {
-		char *end;
-		int len;
-		end = strchr (tmp, ',');
-		if (end == NULL) {
-			len = strlen (tmp) + 1;
-		} else {
-			len = (long) end - (long) tmp + 1;
-			*end = '\0';
-			end++;
-		}
-		tape[count] = kmalloc (len * sizeof (char), GFP_ATOMIC);
-		if (tape[count] == NULL) {
-			printk (KERN_WARNING PRINTK_HEADER
-				"can't store tape= parameter no %d\n",
-				count + 1);
-			break;
-		}
-		memcpy (tape[count], tmp, len * sizeof (char));
-		count++;
-		tmp = end;
-	};
-}
-
-/*
- * This function is called for each "tape=" Kernel parameter
- * at Kernel initialization. We need tape_parm_setup because of
- * 2.2 compatibility (At least I assume this :-))
- */
- 
-void __init
-tape_parm_setup (char *str, int *ints)
-{
-	int len = strlen (tape_parm_string);
-	if (len != 0) {
-		strcat (tape_parm_string, ",");
-	}
-	strcat (tape_parm_string, str);
-}
-
-int __init
-tape_parm_call_setup (char *str)
-{
-	int dummy;
-	tape_parm_setup (str, &dummy);
-	return 1;
-}
-
-__setup("tape=", tape_parm_call_setup);
-#endif   /* not defined MODULE */
-
-
-/*
- * Convert string to int
- */
-
-static inline int
-tape_parm_strtoul (char *str, char **stra)
-{
-	char *temp = str;
-	int val;
-	if (*temp == '0') {
-		temp++;         /* strip leading zero */
-		if (*temp == 'x')
-			temp++; /* strip leading x */
-	}
-	val = simple_strtoul (temp, &temp, 16); /* interpret anything as hex */
-	*stra = temp;
-	return val;
-}
-
-/*
- * Parse Kernel/Module Parameters and create devregs for dynamic attach/detach
- */ 
-
-static inline void
-tape_parm_parse (char **str)
-{
-	char *temp;
-	int from, to;
- 
-	if (*str==NULL) {
-		/* no params present -> leave */
-		return;
-	}
-	while (*str) {
-		temp = *str;
-		from = 0;
-		to = 0;
-		from = tape_parm_strtoul (temp, &temp);
-		to = from;
-		if (*temp == '-') {
-			temp++;
-			to = tape_parm_strtoul (temp, &temp);
-		}
-		tape_create_devregs_range(from,to);
-		str++;
-	}
-}
-
-/*******************************************************************
- * Tape device (td) functions for create, free, enq, deq, enable,
- * disable, get and put
- *******************************************************************/
-
-/*
- * Enable Device
- */
-
-static inline int 
-tape_enable_device(tape_dev_t* td)
-{
-#ifdef CONFIG_DEVFS_FS
-	tape_frontend_t* frontend;
-#endif
-	int rc = 0;
-
-	if(td->discipline->setup_device(td) != 0){
-		rc = -ENOMEM;
-		goto out;
-	}
-
-	/* Register IRQ */
-
-#ifdef TAPE_CIO_PRIVATE_DATA
-	#ifdef CONFIG_S390_TAPE_DYNAMIC
-		rc = s390_request_irq_special (td->devinfo.irq, tape_do_irq,
-			tape_noper_handler,0, TAPE_MAGIC, &(td->devstat));
-	#else
-		rc = s390_request_irq (td->devinfo.irq, tape_do_irq, 0, TAPE_MAGIC, &(td->devstat));
-	#endif
-#else
-	#ifdef CONFIG_S390_TAPE_DYNAMIC
-		rc = s390_request_irq_special (td->devinfo.irq, tape_do_irq,
-			tape_noper_handler,0, (char*)td, &(td->devstat));
-	#else
-		rc = s390_request_irq (td->devinfo.irq, tape_do_irq, 0, (char*)td, &(td->devstat));
-	#endif
-#endif /* TAPE_CIO_PRIVATE_DATA */
-	if (rc){
-		PRINT_WARN ("Cannot register irq %d, rc=%d\n", td->devinfo.irq, rc);
-		td->discipline->cleanup_device(td);
-		goto out;
-	}
-	/* Create devfs entries */
-#ifdef CONFIG_DEVFS_FS
-	if (tape_mkdevfsroot(td)==NULL){
-		PRINT_WARN ("Cannot create a devfs directory for device %04x\n",td->devinfo.devno);
-		goto out_undo;
-	}
-		
-	for (frontend=tape_first_front;frontend!=NULL;frontend=frontend->next){
-		if(frontend->mkdevfstree(td) == NULL){
-			goto out_undo;
-		}
-	}
-#endif
-#ifdef TAPE_CIO_PRIVATE_DATA
-	s390_set_private_data(td->devinfo.irq,td);
-#endif
-out:
-	return rc;
-out_undo:
-        tape_disable_device(td);
-        return -ENOMEM;        
-}
-
-/*
- * Disable Device
- */
-
-static inline void
-tape_disable_device(tape_dev_t* td)
-{
-#ifdef CONFIG_DEVFS_FS
-	tape_frontend_t* frontend;
-#endif
-	td->discipline->cleanup_device(td);
-#ifdef TAPE_CIO_PRIVATE_DATA 
-	s390_set_private_data(td->devinfo.irq,NULL);
-#else
-	ioinfo[td->devinfo.irq]->irq_desc.name = NULL;
-#endif
-
-	free_irq (td->devinfo.irq, &(td->devstat)); 
-#ifdef CONFIG_DEVFS_FS
-        for (frontend=tape_first_front;frontend!=NULL;frontend=frontend->next)
-                frontend->rmdevfstree(td);
-        tape_rmdevfsroot(td);
-#endif
-	tape_state_set(td,TS_NOT_OPER);
-}
-
-/*
- * Append Tape device (td) to our tape info list
- * Must be called with hold tape_dev_lock
- */
- 
-static inline void
-tape_enq_device(tape_dev_t* td)
-{
-	tape_dev_t *temptd = NULL;
- 
-	if (tape_first_dev == NULL) {
-		tape_first_dev = td;
-	} else {
-		temptd = tape_first_dev;
-		while (temptd->next != NULL)
-			temptd = temptd->next;
-		temptd->next = td;
-	}
-}
- 
-/*
- * Remove Tape device (td) from our tape info list
- * Must be called with hold tape_dev_lock
- */
- 
-static inline void
-tape_deq_device(tape_dev_t* td)
-{
-	tape_dev_t* lasttd;
- 
-	if (td==tape_first_dev) {
-		tape_first_dev=td->next;
-	} else {
-		lasttd=tape_first_dev;
-		while (lasttd->next!=td) lasttd=lasttd->next;
-		lasttd->next=td->next;
-	}
-}
-
-
-/*
- * Get Free minor number
- * Must be called with held tape_dev_lock
- */
-
-static inline int
-tape_get_new_minor(int devno)
-{
-	int i,tape_num = -1;
-	tape_dev_t* newtape;
-
-	if(!tape_autoprobe){
-		/* we have static device ranges, so fingure out the */
-		/* tape_num of the attached tape                    */
-		for (i=0;i<tape_devregct;i++){
-			if (tape_devreg[i]->ci.devno==devno) {
-				tape_num=TAPE_MINORS_PER_DEV*i;
-				goto out;
-			}
-		}
-	} else {
-		/* we are running in autoprobe mode, find a free */
-		/* tape_num */
-		i = 0;
-		newtape=tape_first_dev;
-		while (newtape!=NULL) {
-			if (newtape->first_minor==i) {
-				/* tape num in use. try next one */
-				i+=TAPE_MINORS_PER_DEV;
-				newtape=tape_first_dev;
-			} else {
-				/* tape num not used by newtape. look at next */
-				/* tape info */
-				newtape=newtape->next;
-			}
-		}
-		if(i>255) /* No more minor available */
-			tape_num = -1;
-		else
-			tape_num = i;
-	}
-out:
-	return tape_num;
-}
-
-
-/*
- * Create device: Alloc, enable and enq device
- */
-
-static inline tape_dev_t*
-tape_create_device(int irq, int devno, tape_discipline_t* disc)
-{
-	int rc = 0;
-	int tape_num;
-	tape_dev_t *td;
-	long lockflags;
-
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-
-	td = kmalloc (sizeof (tape_dev_t), GFP_ATOMIC);
-	if (td == NULL) {
-		tape_sprintf_exception (tape_dbf_area,2,"ti:no mem \n");
-		PRINT_INFO ("tape: can't allocate memory for "
-			"tape info structure\n");
-		goto error;
-	}
-	memset(td,0,sizeof(tape_dev_t));
-        tape_num = tape_get_new_minor(devno);
-        if(tape_num == -1){
-                PRINT_WARN("tape: could not get minor for tape %x\n",devno);
-                goto error;
-        }
-	rc = get_dev_info_by_irq (irq, &(td->devinfo));
-	if (rc == -ENODEV) {    /* end of device list */
-		goto error;
-	}
-	td->discipline = disc;
-	atomic_set(&(td->use_count),1);
-	td->first_minor = tape_num;
-	td->medium_state = MS_UNKNOWN;
-	td->next = NULL;
-	td->discdata = td->treq = NULL;
-	tape_state_set (td, TS_INIT);
-	td->discdata=NULL;
-	td->last_op = TO_NOTHING;
-
-	if(td->discipline->setup_device(td) != 0)
-		goto error;
-	if(tape_enable_device(td) !=0)	
-		goto error;
-	tape_enq_device(td);
-	PRINT_INFO ("using devno %04x with discipline %04x on irq %d as tape device %d\n",devno,disc->cu_type,irq,tape_num/2);
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-	return td;
-error:
-	tape_sprintf_event (tape_dbf_area,3,"tsetup err: %x\n",rc);
-	if(td)
-		kfree (td);
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-	return NULL;
-}
-
-/*
- * Free Device storage
- */
-
-static void
-tape_free_device(tape_dev_t* td)
-{
-        if (TAPE_BUSY(td)) 
-	        BUG(); /* one should _not_ free the device when a request is pending */
-	tape_sprintf_event (tape_dbf_area,6,"free irq: %x\n",td->devinfo.irq);
-        kfree(td);
-}
-
-/*
- * Decrement use count of tape structure
- * if use count == 0 tape structure is freed
- */
- 
-inline void
-tape_put_device(tape_dev_t* td)
-{
-	if (td==NULL)
-		BUG();
-	if(atomic_dec_and_test(&(td->use_count)))
-		tape_free_device(td);
-}
-
-/*
- * Find the tape_dev_t structure associated with member
- * and increase use count:
- *
- * member:    TAPE_MEMB_IRQ, TAPE_MEMB_MINOR
- */
-
-tape_dev_t *
-__tape_get_device_by_member(unsigned long value, int member)
-{
-	tape_dev_t *td = NULL;
-	long lockflags;
- 
-	read_lock_irqsave(&tape_dev_lock,lockflags);
-	td = tape_first_dev;
-	while(td != NULL) {
-		switch(member){
-			case TAPE_MEMB_IRQ:
-				if(td->devinfo.irq == value)
-					goto out;
-				break;
-			case TAPE_MEMB_MINOR:
-				if((value >= td->first_minor)  && 
-				    (value < (td->first_minor + TAPE_MINORS_PER_DEV)) )
-					goto out;
-				break;
-			case TAPE_MEMB_QUEUE:
-				if(((unsigned long)(&td->blk_data.request_queue)) == value)
-					goto out;
-				break;
-			default:
-				BUG();
-		}
-		td = td->next;
-	}
-out:
-	if(td) // found!
-		atomic_inc(&(td->use_count));
-	read_unlock_irqrestore(&tape_dev_lock,lockflags);
-	return td;
-}
-
-/*
- * Scan all irqs an create tape devices for all matching cu types
- */
-
-static inline void
-tape_create_devs_for_disc(tape_discipline_t* disc)
-{
-	int irq,i;
-	tape_dev_t* td = NULL;
-	s390_dev_info_t dinfo;
-
-	for (irq = get_irq_first(); irq!=-ENODEV; irq=get_irq_next(irq)) {
-		if(get_dev_info_by_irq (irq, &dinfo) == -ENODEV)
-			continue;
-		if(disc->cu_type != dinfo.sid_data.cu_type)
-			/* Wrong type - try next one */
-			continue;
-
-		tape_sprintf_event (tape_dbf_area,3,"det irq:  %x\n",irq);
-		tape_sprintf_event (tape_dbf_area,3,"cu     :  %x\n",disc->cu_type);
-
-
-		if(!tape_autoprobe) {
-		        for( i=0; i<tape_devregct; i++ ) {
-		                if(tape_devreg[i]->ci.devno == dinfo.devno) {
-			                td = tape_create_device(irq, dinfo.devno, disc);
-					if(!td) {
-					        PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
-						continue;
-					}
-					if(disc->init_device)
-					        disc->init_device(td); /* XXX */
-					tape_state_set (td, TS_UNUSED);
-					break;
-				}
-			}
-		}
-		else {
-		        td = tape_create_device(irq,dinfo.devno,disc);
-		  
-			if(!td){
-			        PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
-			        continue;
-			}
-			if(disc->init_device)
-			        disc->init_device(td); /* XXX */
-			tape_state_set (td, TS_UNUSED); 
-		}
-	}
-}
-
-/*
- * Go through our tape info list and disable, deq and free all devices with 
- * matching cu type
- */
-
-static inline void
-tape_delete_devs_for_disc(tape_discipline_t* disc)
-{
-	tape_dev_t *td;
-	long lockflags;
-
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-	td = tape_first_dev;
-	while (td !=NULL){
-		if(td->discipline == disc){
-			tape_deq_device(td);
-			write_unlock_irqrestore(&tape_dev_lock,lockflags);
-			tape_disable_device(td);
-			tape_put_device(td);
-			write_lock_irqsave(&tape_dev_lock,lockflags);
-			td = tape_first_dev;
-		} else {
-			td=td->next;
-		}
-	}
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-}
-		
-/*******************************************************************
- * TAPE Request and IO Functions
- *******************************************************************/
-
-/*
- * Allocate a new tape ccw request
- */
-
-inline tape_ccw_req_t *
-tape_alloc_ccw_req (int cplength, int datasize,int idal_buf_size, tape_op_t operation)
-{
-	tape_ccw_req_t* treq;
-	int kmalloc_flags;
-	if(in_interrupt())
-		kmalloc_flags = GFP_ATOMIC;
-	else
-		kmalloc_flags = GFP_KERNEL;
-
-	treq = (tape_ccw_req_t*) kmalloc(sizeof(tape_ccw_req_t),kmalloc_flags);
-	if(!treq)
-		goto error;
-	memset(treq,0,sizeof(tape_ccw_req_t));
-	treq->kernbuf_size = datasize;
-	treq->userbuf_size = datasize;
-	treq->op           = operation;
-	treq->cplength     = cplength;
-	init_waitqueue_head (&treq->wq); 
-
-	// alloc small kernel buffer
-
-	if(datasize > PAGE_SIZE)
-		BUG();
-	if(datasize > 0){
-		// the kernbuf must be below 2GB --> GFP_DMA
-		treq->kernbuf = kmalloc(datasize,kmalloc_flags | GFP_DMA); 
-		if(!treq->kernbuf)
-			goto error;
-		memset(treq->kernbuf, 0, datasize);
-	}
-
-	// alloc idal kernel buffer
-
-	if(idal_buf_size > 0){
-		treq->idal_buf = idalbuf_alloc(idal_buf_size);
-		if(!treq->idal_buf)
-			goto error;
-	}
-		
-	if(cplength < 0)
-		BUG();
-
-	// the channel program must be below 2GB --> GFP_DMA
-	treq->cpaddr = kmalloc(cplength * sizeof(ccw1_t), kmalloc_flags | GFP_DMA);
-	if(!treq->cpaddr)
-		goto error;
-	memset(treq->cpaddr, 0, cplength*sizeof(ccw1_t));
-	return treq;
-error:
-	tape_sprintf_exception (tape_dbf_area,1,"cqra nomem\n");
-	if(treq)
-		tape_free_ccw_req(treq);
-	return NULL;
-}
-
-/*
- * Free tape ccw request
- */
-
-void
-tape_free_ccw_req (tape_ccw_req_t * treq)
-{
-	if(!treq)
-                BUG();
-	if(treq->cpaddr)
-		kfree(treq->cpaddr);
-	if(treq->kernbuf)
-		kfree(treq->kernbuf);
-	if(treq->idal_buf)
-		idalbuf_free(treq->idal_buf);
-	kfree(treq);
-}
-
-/*
- * Add request to request queue (At the moment queue length = 1)
- */
-
-static inline int
-tape_add_ccw_req(tape_dev_t* td,tape_ccw_req_t* treq)
-{
-	if(td->treq)
-		return -1;
-	td->treq = treq;
-	treq->tape_dev = td;
-	return 0;
-}
-
-/*
- * Remove request from request queue (At the moment queue length = 1)
- */
-
-int
-tape_remove_ccw_req(tape_dev_t* td,tape_ccw_req_t* treq)
-{
-	if(treq != td->treq)
-		BUG();
-	td->last_op = treq->op;
-        td->treq=NULL;
-	treq->tape_dev=NULL;
-        return 0;
-}
-
-/*
- * Get the active ccw request
- */
-
-tape_ccw_req_t*
-tape_get_active_ccw_req(tape_dev_t* td)
-{
-	return td->treq;
-}
-
-/*
- * Stop the active ccw request
- */
-
-static inline int
-tape_halt_io(tape_dev_t* td)
-{
-	int retries = 0;
-	int irq = td->devinfo.irq;
-	int rc = 0;
-	long lockflags;
-	tape_ccw_req_t* treq;
-
-	s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
-	treq = tape_get_active_ccw_req(td);
-	/* check if interrupt has already been processed */
-	if(!treq)
-		goto out;
-	if(treq->wakeup == NULL)
-		goto out;
-	while (retries < 5){
-		if ( retries < 2 )
-			rc = halt_IO(irq, (long)treq, treq->options);
-		else
-			rc = clear_IO(irq, (long)treq, treq->options);
-		switch (rc) {
-		case 0:         /* termination successful */
-			rc = -ERESTARTSYS;
-			goto out;
-		case -ENODEV:
-		        PRINT_INFO ("device gone, retry\n"); /* FIXME: s390dbf only */
-			break;
-		case -EIO:
-			PRINT_INFO ("I/O error, retry\n"); /* FIXME: s390dbf only */
-			break;
-		case -EBUSY:
-			PRINT_INFO ( "device busy, retry later\n"); /* FIXME: s390dbf only */
-			break;
-		default:
-			PRINT_ERR ( "line %d unknown RC=%d, please report"
-			   	    " to linux390@de.ibm.com\n", __LINE__, rc);
-			BUG ();
-		}
-		retries ++;
-	}
-out:
-	s390irq_spin_unlock_irqrestore(td->devinfo.irq, lockflags);
-	return rc;
-}
-
-
-/*
- * The tape IO function:
- * tape_do_io MUST be called with locked td lock!
- */
- 
-static inline int
-__tape_do_io(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type,int io)
-{
-	int rc = 0;
- 
-        if ((td==NULL) || (treq==NULL)) 
-                BUG();
-
-	if(tape_state_get(td) == TS_NOT_OPER){
-		rc = -ENODEV;
-		goto out;
-	}
-	if(TAPE_BUSY(td)){
-		tape_sprintf_event (tape_dbf_area,1,"tape: IRQ - Tape busy\n");	
-		rc = -EBUSY;
-		goto out;
-	}
-	tape_add_ccw_req(td,treq);
-	switch(type){
-		case TAPE_REMOVE_REQ_ON_WAKEUP:
-			treq->wakeup = tape_wake_up_remove;
-			break;
-		case TAPE_NO_WAIT: 
-			// needed for retry
-			break; 
-		case TAPE_WAIT:
-			treq->wakeup = tape_wake_up;
-			treq->wait   = tape_wait_event;
-			break;
-		case TAPE_WAIT_INTERRUPTIBLE:
-			treq->wakeup = tape_wake_up_interruptible;
-			treq->wait   = tape_wait_event_interruptible;
-			break;
-		case TAPE_WAIT_INTERRUPTIBLE_NOHALTIO:
-			// neded for dummy load 
-			treq->wakeup = tape_wake_up_interruptible;
-			treq->wait   = tape_wait_event_interruptible_nohaltio;
-			break;
-#ifdef CONFIG_S390_TAPE_BLOCK
-		case TAPE_SCHED_BLOCK:
-			treq->wakeup = tape_schedule_tapeblock;
-			treq->wait   = NULL;
-			break;
-#endif
-		default:
-                        BUG();
-	}
- 
-	if(io)
-		rc = do_IO(td->devinfo.irq,treq->cpaddr,
-		(unsigned long)treq, 0x00, treq->options);
- 
-	if(rc) {
-		tape_sprintf_event (tape_dbf_area,1,"tape: DOIO failed with er = %i\n",rc);
-		treq->wakeup = NULL;
-		treq->wait   = NULL; /*XXX ??*/
-		tape_remove_ccw_req(td,treq);
-	}
-out:
-	return rc;
-}
-
-/*
- * Do the io request and wait for it
- */
-
-int
-tape_do_io_and_wait(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
-	int rc = 0;
-	long lockflags;
-        if (td==NULL) 
-                BUG();
-	s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
-	rc = __tape_do_io(td,treq,type,TAPE_DO_IO);
-	s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
-	if(rc == 0)
-		tape_wait(treq);
-	return rc;
-}
-
-/*
- * Needed for MTLOAD: Just create a wait request without doing io
- */
-
-int
-tape_do_wait_req(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
-	int rc = 0;
-	long lockflags;
-        if (td==NULL)
-                BUG();
-	s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
-	rc = __tape_do_io(td,treq,type,TAPE_NO_IO);
-	s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
-	tape_wait(treq);
-	return rc;
-}
-
-/*
- * Just do the io
- */
-
-int
-tape_do_io(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
-	int rc = 0;
-	long lockflags;
-	s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
-	rc = __tape_do_io(td,treq,type,TAPE_DO_IO);
-	s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);
-	return rc;
-}
-
-/*
- * Just do the io, but we are already locked here (in irq)
- */
-
-int
-tape_do_io_irq(tape_dev_t * td,tape_ccw_req_t *treq,tape_wait_t type)
-{
-        return __tape_do_io(td,treq,type,TAPE_DO_IO);
-}
-
-/*
- * Wait for an io request
- */
-
-static void
-tape_wait(tape_ccw_req_t* treq)
-{
-	tape_dev_t* td;
-	if(treq==NULL)
-                BUG();
-	td = treq->tape_dev;
-        if (td==NULL)
-                BUG();       
-	if(treq->wait==NULL)
-                BUG();
-        treq->wait(treq);
-	tape_remove_ccw_req(td,treq);
-}
-
-/*
- * Tape interrupt routine, called from Ingo's I/O layer
- */
-
-static void
-tape_do_irq (int irq, void *int_parm, struct pt_regs *regs)
-{
-	tape_dev_t *td;
-#ifdef TAPE_CIO_PRIVATE_DATA
-	td = (tape_dev_t*)s390_get_private_data(irq);
-#else
-	td = (tape_dev_t*)ioinfo[irq]->irq_desc.name;
-#endif
-	if(!td) {
-		PRINT_ERR ("tape: could not get device structure for irq %d in interrupt\n",irq);
-		goto out;
-	}
-	if(td->devstat.dstat != 0x0c){
-		tape_sprintf_event (tape_dbf_area,3,"-- Tape Interrupthandler --\n");
-		tape_dump_sense_dbf(td);
-	}
-	if (tape_state_get(td) == TS_NOT_OPER) {
-		tape_sprintf_event (tape_dbf_area,6,"tape:device is not operational\n");
-		goto out;
-	}
-	td->discipline->irq(td);
-out:
-	return;
-}
-
-/*
- * Oper Handler is called from Ingo's I/O layer when a new tape device is 
- * attached. We create a new devinfo for the new device, enable and enq it.
- */
-
-static int 
-tape_oper_handler ( int irq, struct _devreg *dreg) {
-	tape_dev_t* td=tape_first_dev;
-	int rc=0;
-	s390_dev_info_t dinfo;
-	tape_discipline_t* disc;
-	long lockflags;
-
-	td = tape_get_device_by_irq(irq);
-	if (td!=NULL) {
-		// irq is (still) used by tape. tell ingo to try again later
-		PRINT_ERR ("tape:Oper handler for irq %d called, but irq is still (internally) used.\n",irq);
-		rc = -EAGAIN;
-		goto out;
-	}
-
-	rc = get_dev_info_by_irq (irq, &dinfo);
-	if (rc == -ENODEV) {
-                PRINT_ERR ("tape: Cannot get dev info for irq %d in the oper handler.\n",irq);
-                rc = -EAGAIN;
-                goto out;
-	}
-
-	read_lock_irqsave(&tape_discipline_lock,lockflags);
-
-	disc = tape_first_disc;
-	while ((disc != NULL) && (disc->cu_type != dinfo.sid_data.cu_type))
-		disc = (tape_discipline_t *) (disc->next);
-
-	if (disc == NULL){
-		PRINT_WARN ("tape: No matching discipline for cu_type %x found in the oper handler, ignoring device %04x.\n",dinfo.sid_data.cu_type,dinfo.devno);
-		rc = -ENODEV;
-		goto out_unlock;
-	}
-
-	/* Allocate tape structure  */
-	td = tape_create_device(irq,dinfo.devno,disc);
-
-	if (td == NULL) {
-		PRINT_WARN( "Could not initialize tape 0x%x\n",dinfo.devno);
-		rc = -ENOBUFS;
-		goto out_unlock;
-	} else {
-		if(disc->init_device)
-			disc->init_device(td);
-	}
-	tape_state_set (td, TS_UNUSED); 
-out_unlock:
-        read_unlock_irqrestore(&tape_discipline_lock,lockflags);
-out:
-	return rc;
-}
-
-/*
- * Not Oper Handler is called from Ingo's IO layer, when a tape device
- * is detached. We deq, disable and free the tape info for this device
- */
-
-static void
-tape_noper_handler ( int irq, int status ) {
-	tape_dev_t *td;
-	long lockflags;
-	tape_ccw_req_t *treq;
-
-	td = tape_get_device_by_irq(irq);
-	if (td==NULL) {
-                PRINT_ERR("tape: not operational handler called for irq %x, but tape does not hold this irq.\n",irq);
-                goto error;
-        }
-
-	write_lock_irqsave(&tape_dev_lock,lockflags);
-	tape_deq_device(td);
-	write_unlock_irqrestore(&tape_dev_lock,lockflags);
-
-	tape_disable_device(td);
-
-	s390irq_spin_lock_irqsave (td->devinfo.irq, lockflags);
-	treq = tape_get_active_ccw_req(td);
-	if (treq) {
-		// device is in use!
-                treq->rc= -ENODEV;
-		if(treq->wakeup)
-			treq->wakeup (treq);
-		PRINT_WARN ("Tape #%d is detached while it was busy.\n",td->first_minor/TAPE_MINORS_PER_DEV);
-	} else {
-		// device is unused!
-		PRINT_WARN ("Tape #%d is detached now.\n",td->first_minor/TAPE_MINORS_PER_DEV);
-	}
-
-	s390irq_spin_unlock_irqrestore (td->devinfo.irq, lockflags);	
-
-	/* decrement use count twice ! */	
-	tape_put_device(td);
-	tape_put_device(td);
-error:
-	return;
-}
-
-/*
- * Write sense data to dbf
- */
-
-void tape_dump_sense_dbf(tape_dev_t* td)
-{
-	devstat_t *stat = &td->devstat;
-	const char* op;
-	if(TAPE_BUSY(td))
-		op = tape_op_verbose[tape_get_active_ccw_req(td)->op];
-	else
-		op = "---";
-	tape_sprintf_event (tape_dbf_area,3,"DSTAT : %02x   CSTAT: %02x\n",stat->dstat,stat->cstat);
-	tape_sprintf_event (tape_dbf_area,3,"DEVICE: %04x OP   : %s\n",td->devinfo.devno,op);
-	tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[0]),*((unsigned int*)&stat->ii.sense.data[4]));
-	tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[8]),*((unsigned int*)&stat->ii.sense.data[12]));
-	tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[16]),*((unsigned int*)&stat->ii.sense.data[20]));
-	tape_sprintf_event (tape_dbf_area,3,"%08x %08x\n",*((unsigned int*)&stat->ii.sense.data[24]),*((unsigned int*)&stat->ii.sense.data[28]));
-}
-
-/*
- * Write sense data to console/dbf
- */
-
-void
-tape_dump_sense (tape_dev_t* td)
-{
-	devstat_t *stat = &td->devstat;
-#if 1 /* XXX */
-	PRINT_INFO ("-------------------------------------------------\n");
-	PRINT_INFO ("DSTAT : %02x  CSTAT: %02x  CPA: %04x\n",stat->dstat,stat->cstat,stat->cpa);
-	PRINT_INFO ("DEVICE: %04x\n",td->devinfo.devno);
-	if(TAPE_BUSY(td))
-		PRINT_INFO("OP    : %s\n",tape_op_verbose[tape_get_active_ccw_req(td)->op]);
-		
-	PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
-		    " %02X%02X%02X%02X %02X%02X%02X%02X \n",
-		    stat->ii.sense.data[0], stat->ii.sense.data[1],
-		    stat->ii.sense.data[2], stat->ii.sense.data[3],
-		    stat->ii.sense.data[4], stat->ii.sense.data[5],
-		    stat->ii.sense.data[6], stat->ii.sense.data[7],
-		    stat->ii.sense.data[8], stat->ii.sense.data[9],
-		    stat->ii.sense.data[10], stat->ii.sense.data[11],
-		    stat->ii.sense.data[12], stat->ii.sense.data[13],
-		    stat->ii.sense.data[14], stat->ii.sense.data[15]);
-	PRINT_INFO ("Sense data: %02X%02X%02X%02X %02X%02X%02X%02X "
-		    " %02X%02X%02X%02X %02X%02X%02X%02X \n",
-		    stat->ii.sense.data[16], stat->ii.sense.data[17],
-		    stat->ii.sense.data[18], stat->ii.sense.data[19],
-		    stat->ii.sense.data[20], stat->ii.sense.data[21],
-		    stat->ii.sense.data[22], stat->ii.sense.data[23],
-		    stat->ii.sense.data[24], stat->ii.sense.data[25],
-		    stat->ii.sense.data[26], stat->ii.sense.data[27],
-		    stat->ii.sense.data[28], stat->ii.sense.data[29],
-		    stat->ii.sense.data[30], stat->ii.sense.data[31]);
-	PRINT_INFO ("--------------------------------------------------\n");
-#endif
-}
-
-/*******************************************************************
- * TAPE Discipline functions
- *******************************************************************/
-
-/*
- * Register backend discipline
- */
-
-int
-tape_register_discipline(tape_discipline_t *disc)
-{
-        tape_discipline_t *disc_ptr;
-	long lockflags;
-
-        disc->next = NULL;
-
-	write_lock_irqsave(&tape_discipline_lock,lockflags);
-
-        if (tape_first_disc == NULL) {
-            tape_first_disc = disc;
-        } else {
-                for(disc_ptr = tape_first_disc; disc_ptr->next!=NULL; disc_ptr=(tape_discipline_t*)disc_ptr->next);
-                disc_ptr->next = disc;
-        }
-
-	tape_create_devs_for_disc(disc);
-	if(tape_autoprobe)
-		tape_create_devreg_for_disc(disc);
-
-	write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-        return 0;
-}
-
-/*
- * Unregister backend discipline
- */
-
-void 
-tape_unregister_discipline(tape_discipline_t* disc)
-{
-	tape_discipline_t* lastdisc;
-	long lockflags;
-
-	write_lock_irqsave(&tape_discipline_lock,lockflags);
-
-	tape_delete_devs_for_disc(disc);
-	if(tape_autoprobe)
-		tape_delete_devreg_for_disc(disc);
-
-	if (disc==tape_first_disc) {
-		tape_first_disc=disc->next;
-        } else {
-		lastdisc=tape_first_disc;
-		while (lastdisc->next!=disc) lastdisc=lastdisc->next;
-		lastdisc->next=disc->next;
-	}
-	
-	disc->shutdown();
-
-	write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-}
-
-/*
- * Cleanup all registered disciplines
- */
-
-static inline void
-tape_cleanup_disciplines (void) 
-{
-        long lockflags;
-        tape_discipline_t* disc;
-	/* Unregister all backend disciplines - this also deletes the devices */
-
-	write_lock_irqsave(&tape_discipline_lock,lockflags);
-        disc=tape_first_disc;
-        while (disc != NULL) {
-		write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-		tape_unregister_discipline(disc);
-		kfree(disc);
-		write_lock_irqsave(&tape_discipline_lock,lockflags);
-		disc=tape_first_disc; 
-        }
-	write_unlock_irqrestore(&tape_discipline_lock,lockflags);
-}
-
-
-/*******************************************************************
- * TAPE Init Functions
- *******************************************************************/
-
-/*
- *      tape_print_banner will be called on initialisation and print a nice banner
- */
-
-static inline void 
-tape_print_banner (void) 
-{
-        char *opt_char,*opt_block;
-
-        /* print banner */        
-        PRINT_WARN ("IBM zSeries Tape Device Driver (v%d.%02d).\n",TAPE_VERSION_MAJOR,TAPE_VERSION_MINOR);
-        PRINT_WARN ("(C) IBM Deutschland Entwicklung GmbH, 2000 - 2001\n");
-        opt_char=opt_block="not present";
-#ifdef CONFIG_S390_TAPE_CHAR
-        opt_char="built in";
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
-        opt_block="built in";
-#endif
-        /* print feature info */
-        PRINT_WARN ("character device frontend   : %s\n",opt_char);
-        PRINT_WARN ("block device frontend       : %s\n",opt_block);
-}
-
-/*
- *      tape_init will register the driver for each tape.
- */
-
-int
-tape_init (void)
-{
-        static int initialized=0;
-
-        if (initialized) // Only init the devices once
-            return 0;
-        initialized=1;
-
-	tape_init_devregs();
-#ifdef TAPE_DEBUG
-        tape_dbf_area = debug_register ( "tape", 2, 2, 3*sizeof(long));
-        debug_register_view(tape_dbf_area,&debug_sprintf_view);
-        tape_sprintf_event (tape_dbf_area,3,"begin init\n");
-#endif /* TAPE_DEBUG */
-	tape_print_banner();
-#ifndef MODULE
-        tape_split_parm_string(tape_parm_string);
-#endif
-#ifdef CONFIG_DEVFS_FS
-        devfs_mk_dir (NULL, "tape", NULL);
-#endif /* CONFIG_DEVFS_FS */
-
-        tape_sprintf_event (tape_dbf_area,3,"dev detect\n");
-	/* Allocate the tape structures */
-        if (*tape!=NULL) { /* if parameters are present */
-		PRINT_INFO ("Using ranges supplied in parameters, disabling autoprobe mode.\n");
-		tape_parm_parse (tape);
-		tape_autoprobe = 0;
-	} else {
-		PRINT_INFO ("No parameters supplied, enabling autoprobe mode for all supported devices.\n");
-		tape_autoprobe = 1;
-	}
-#ifdef CONFIG_PROC_FS
-	tape_proc_init();
-#endif /* CONFIG_PROC_FS */
-#ifdef  CONFIG_S390_TAPE_3480 
-	tape_register_discipline(tape3480_init());
-#else
-#ifndef CONFIG_S390_TAPE
-	tape_request_module("tape_3480_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3480 */
-
-#ifdef CONFIG_S390_TAPE_3490
-        tape_register_discipline(tape3490_init());
-#else
-#ifndef CONFIG_S390_TAPE
-        tape_request_module("tape_3490_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3490 */
-
-#ifdef CONFIG_S390_TAPE_3590
-        tape_register_discipline(tape3590_init());
-#else
-#ifndef CONFIG_S390_TAPE
-        tape_request_module("tape_3590_mod");
-#endif
-#endif /* CONFIG_S390_TAPE_3590 */
-	return 0;
-}
-
-/*******************************************************************
- * TAPE Module functions
- *******************************************************************/
-
-#ifdef MODULE
-MODULE_AUTHOR("(C) 2001 IBM Deutschland Entwicklung GmbH by Carsten Otte and Michael Holzheu (cotte@de.ibm.com,holzheu@de.ibm.com)");
-MODULE_DESCRIPTION("Linux on zSeries channel attached tape device driver");
-MODULE_PARM (tape, "1-" __MODULE_STRING (256) "s");
-
-/*
- * The famous init_module
- */
-
-int
-init_module (void)
-{
-#ifdef CONFIG_S390_TAPE_CHAR
-	tapechar_init ();
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
-	tapeblock_init ();
-#endif
-        return 0;
-}
-
-/*
- * Cleanup the frontends
- */
-static inline void
-tape_cleanup_frontends(void) 
-{
-        tape_frontend_t* frontend, *tempfe;
-
-	/* Now get rid of the frontends */
-#ifdef CONFIG_S390_TAPE_CHAR
-	tapechar_uninit();
-#endif
-#ifdef CONFIG_S390_TAPE_BLOCK
-        tapeblock_uninit();
-#endif
-        frontend=tape_first_front;
-	while (frontend != NULL) {
-		tempfe = frontend;
-		frontend = frontend->next;
-		kfree (tempfe);
-	}
-}
-
-
-/*
- * Cleanup module
- */
-
-void
-cleanup_module (void)
-{
-        tape_sprintf_event (tape_dbf_area,6,"cleaup mod");
-	tape_cleanup_disciplines();
-#ifdef CONFIG_DEVFS_FS
-	devfs_remove("tape"); /* devfs checks for NULL */
-#endif CONFIG_DEVFS_FS
-#ifdef CONFIG_PROC_FS
-	tape_proc_cleanup();
-#endif 
-	tape_cleanup_frontends();
-	/* Deallocate devregs in case of not autoprobe */
-	if(!tape_autoprobe)
-		tape_delete_all_devregs();
-#ifdef TAPE_DEBUG
-        debug_unregister (tape_dbf_area);
-#endif /* TAPE_DEBUG */
-}
-#endif				/* MODULE */
-
-
-/*******************************************************************
- * TAPE Tapestate functions
- *******************************************************************/
-
-inline void
-tape_state_set (tape_dev_t * td, tape_state_t newstate)
-{
-    if (td->tape_state == TS_NOT_OPER) {
-        tape_sprintf_event(tape_dbf_area,3,"ts_set err: not oper\n");
-    } else {
-        tape_sprintf_event(tape_dbf_area,4,"ts. dev:  %x\n",td->first_minor);
-        tape_sprintf_event(tape_dbf_area,4,"old ts:   %s\n",(((tape_state_get (td) < TO_SIZE) && (tape_state_get (td) >=0 )) ?  tape_state_verbose[tape_state_get (td)] : "UNKNOWN TS"));
-        tape_sprintf_event(tape_dbf_area,4,"%s\n", 
-			(((tape_state_get (td) < TO_SIZE) &&
-			(tape_state_get (td) >=0 )) ?
-			tape_state_verbose[tape_state_get (td)] :
-			"UNKNOWN TS"));
-        tape_sprintf_event (tape_dbf_area,4,"new ts:   \n");
-        tape_sprintf_event (tape_dbf_area,4,"%s\n",(((newstate < TO_SIZE) &&
-                                              (newstate >= 0)) ?
-                                             tape_state_verbose[newstate] :
-                                             "UNKNOWN TS"));
-	td->tape_state = newstate;
-    }
-}
-
-inline tape_state_t
-tape_state_get (tape_dev_t * td)
-{
-	return (td->tape_state);
-}
-
-inline void
-tape_med_state_set(tape_dev_t * td, tape_medium_state_t newstate)
-{
-	if(td->medium_state == newstate)
-		goto out;
-	switch(newstate){
-		case MS_UNLOADED:
-			PRINT_INFO("(%x): Tape is unloaded\n",td->devstat.devno);
-			break;
-		case MS_LOADED:
-			PRINT_INFO("(%x): Tape has been mounted\n",td->devstat.devno);
-			break;
-		default:
-			// print nothing
-			break;
-	}
-	td->medium_state = newstate;
-out:
-	return;
-}
-	
-
-/*******************************************************************
- * TAPE Exported Functions 
- *******************************************************************/
-
-EXPORT_SYMBOL(tape_register_discipline);
-EXPORT_SYMBOL(tape_unregister_discipline);
-EXPORT_SYMBOL(tape_dbf_area);
-EXPORT_SYMBOL(tape_alloc_ccw_req);
-EXPORT_SYMBOL(tape_free_ccw_req); 
-EXPORT_SYMBOL(tape_state_set);
-EXPORT_SYMBOL(tape_state_get);
-EXPORT_SYMBOL(tape_med_state_set);
-EXPORT_SYMBOL(tape_state_verbose);
-EXPORT_SYMBOL(tape_op_verbose);
-EXPORT_SYMBOL(tape_dump_sense);
-EXPORT_SYMBOL(tape_dump_sense_dbf);
-EXPORT_SYMBOL(tape_do_io);
-EXPORT_SYMBOL(tape_do_io_irq);
-EXPORT_SYMBOL(tape_do_io_and_wait);
-EXPORT_SYMBOL(tape_remove_ccw_req);
-EXPORT_SYMBOL(tape_get_active_ccw_req);
diff -Nru a/drivers/s390/cio/Makefile b/drivers/s390/cio/Makefile
--- a/drivers/s390/cio/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/s390/cio/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,7 +3,7 @@
 #
 
 obj-y += airq.o blacklist.o chsc.o cio.o css.o requestirq.o 
-export-objs += airq.o css.o chsc.o cio.o requestirq.o
+export-objs += airq.o css.o cio.o requestirq.o
 
 ccw_device-objs += device.o device_fsm.o device_ops.o
 ccw_device-objs += device_id.o device_pgid.o device_status.o
@@ -15,5 +15,3 @@
 
 obj-$(CONFIG_QDIO) += qdio.o
 export-objs += qdio.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
--- a/drivers/s390/cio/blacklist.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/cio/blacklist.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/blacklist.c
  *   S/390 common I/O routines -- blacklisting of specific devices
- *   $Revision: 1.22 $
+ *   $Revision: 1.23 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *			      IBM Corporation
@@ -162,10 +162,10 @@
 		else
 			blacklist_parse_parameters (buf + 5, free);
 	} else if (strncmp (buf, "add ", 4) == 0) {
-		/* FIXME: the old code was checking if the new bl'ed
-		 * devices are already known to the system so
-		 * validate_subchannel would still give a working
-		 * status. is that necessary? */
+		/* 
+		 * We don't need to check for known devices since
+		 * css_probe_device will handle this correctly. 
+		 */
 		blacklist_parse_parameters (buf + 4, add);
 	} else {
 		printk (KERN_WARNING "cio_ignore: Parse error; \n"
diff -Nru a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
--- a/drivers/s390/cio/chsc.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/cio/chsc.c	Sun Dec 15 18:08:29 2002
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/chsc.c
  *   S/390 common I/O routines -- channel subsystem call
- *   $Revision: 1.43 $
+ *   $Revision: 1.46 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *			      IBM Corporation
@@ -37,26 +37,6 @@
 
 static int new_channel_path(int chpid, int status);
 
-int
-chsc(void *data)
-{
-	void *area;
-	int cc;
-
-	if (!data)
-		return -EINVAL;
-
-	area = (void *)get_zeroed_page(GFP_KERNEL);
-	if (!area)
-		return -ENOMEM;
-	memcpy(area, data, PAGE_SIZE);
-	cc = do_chsc(area);
-	if (cc == 0)
-		memcpy(data, area, PAGE_SIZE);
-	free_page((unsigned long)area);
-	return cc;
-}
-
 static int
 set_chp_status(int chp, int status)
 {
@@ -114,21 +94,18 @@
 	 * be page-aligned. Implement proper locking or dynamic
 	 * allocation or prove that this function does not have to be
 	 * reentrant! */
-	static struct chsc_area __attribute__ ((aligned(PAGE_SIZE))) chsc_area_ssd;
+	static struct ssd_area chsc_area_ssd 
+		__attribute__ ((aligned(PAGE_SIZE)));
 
-	typeof (chsc_area_ssd.response_block.response_block_data.ssd_res)
-		*ssd_res = &chsc_area_ssd.response_block.response_block_data.ssd_res;
+	typeof (chsc_area_ssd.response_block)
+		*ssd_res = &chsc_area_ssd.response_block;
 
-	chsc_area_ssd = (struct chsc_area) {
+	chsc_area_ssd = (struct ssd_area) {
 		.request_block = {
 			.command_code1 = 0x0010,
 			.command_code2 = 0x0004,
-			.request_block_data = {
-				.ssd_req = {
-					.f_sch = irq,
-					.l_sch = irq,
-				}
-			}
+			.f_sch = irq,
+			.l_sch = irq,
 		}
 	};
 
@@ -306,14 +283,59 @@
 #endif
 }
 
-/* this used to be in s390_process_res_acc_*, FIXME: find a better name
- * for this function */
 static int
-s390_check_valid_chpid(u8 chpid)
+s390_process_res_acc_sch(u8 chpid, __u16 fla, u32 fla_mask,
+			 struct subchannel *sch)
+{
+	int found;
+	int chp;
+	int ccode;
+	
+	/* Update our ssd_info */
+	if (chsc_get_sch_desc_irq(sch->irq))
+		return 0;
+	
+	found = 0;
+	for (chp = 0; chp <= 7; chp++)
+		/*
+		 * check if chpid is in information updated by ssd
+		 */
+		if (sch->ssd_info.valid &&
+		    sch->ssd_info.chpid[chp] == chpid &&
+		    (sch->ssd_info.fla[chp] & fla_mask) == fla) {
+			found = 1;
+			break;
+		}
+	
+	if (found == 0)
+		return 0;
+
+	/*
+	 * Do a stsch to update our subchannel structure with the
+	 * new path information and eventually check for logically
+	 * offline chpids.
+	 */
+	ccode = stsch(sch->irq, &sch->schib);
+	if (ccode > 0)
+		return 0;
+
+	return 0x80 >> chp;
+}
+
+static void
+s390_process_res_acc (u8 chpid, __u16 fla, u32 fla_mask)
 {
+	struct subchannel *sch;
+	int irq;
+	int ret;
 	char dbf_txt[15];
+
 	sprintf(dbf_txt, "accpr%x", chpid);
 	CIO_TRACE_EVENT( 2, dbf_txt);
+	if (fla != 0) {
+		sprintf(dbf_txt, "fla%x", fla);
+		CIO_TRACE_EVENT( 2, dbf_txt);
+	}
 
 	/*
 	 * I/O resources may have become accessible.
@@ -333,31 +355,14 @@
 		CIO_CRW_EVENT(0, "Error: Could not retrieve "
 			      "subchannel descriptions, will not process css"
 			      "machine check...\n");
-		return 0;
+		return;
 	}
 
 	if (!test_bit(chpid, chpids_logical))
-		return 0; /* no need to do the rest */
-
-	return 1;
-}
-
-static void
-s390_process_res_acc_chpid (u8 chpid)
-{
-	struct subchannel *sch;
-	int irq;
-	int ccode;
-	int chp;
-	int ret;
-
-	if (!s390_check_valid_chpid(chpid))
-		return;
-
-	pr_debug( KERN_DEBUG "Looking at chpid %x...\n", chpid);
+		return; /* no need to do the rest */
 
 	for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
-		int found;
+		int chp_mask;
 
 		sch = ioinfo[irq];
 		if (!sch) {
@@ -375,122 +380,33 @@
 				return;
 			continue;
 		}
-
+	
 		spin_lock_irq(&sch->lock);
 
-		/* Update our ssd_info */
-		if (chsc_get_sch_desc_irq(sch->irq))
-			break;
-
-		found = 0;
-		for (chp = 0; chp <= 7; chp++)
-			/*
-			 * check if chpid is in information updated by ssd
-			 */
-			if (sch->ssd_info.valid &&
-			    (sch->ssd_info.chpid[chp] == chpid)) {
-				found = 1;
-				break;
-			}
+		chp_mask = s390_process_res_acc_sch(chpid, fla, fla_mask, sch);
+		if (chp_mask == 0) {
 
-		if (found == 0) {
 			spin_unlock_irq(&sch->lock);
-			continue;
-		}
-		/*
-		 * Do a stsch to update our subchannel structure with the
-		 * new path information and eventually check for logically
-		 * offline chpids.
-		 */
-		ccode = stsch(sch->irq, &sch->schib);
-		if (ccode > 0) {
-// FIXME:		ccw_device_recognition(cdev);
-			spin_unlock_irq(&sch->lock);
-			continue;
+
+			if (fla_mask != 0)
+				break;
+			else
+				continue;
 		}
 
-		sch->lpm = sch->schib.pmcw.pim &
-			sch->schib.pmcw.pam &
-			sch->schib.pmcw.pom;
+		sch->lpm = (sch->schib.pmcw.pim &
+			    sch->schib.pmcw.pam &
+			    sch->schib.pmcw.pom)
+			| chp_mask;
 
 		chsc_validate_chpids(sch);
 
-		sch->lpm |= (0x80 >> chp);
 		dev_fsm_event(sch->dev.driver_data, DEV_EVENT_VERIFY);
 
 		spin_unlock_irq(&sch->lock);
-	}
-}
-
-static void
-s390_process_res_acc_linkaddr ( __u8 chpid, __u16 fla, u32 fla_mask)
-{
-	char dbf_txt[15];
-	struct subchannel *sch;
-	int irq;
-	int ccode;
-	int ret;
-	int j;
-
-	if (!s390_check_valid_chpid(chpid))
-		return;
 
-	sprintf(dbf_txt, "fla%x", fla);
-	CIO_TRACE_EVENT( 2, dbf_txt);
-
-	pr_debug(KERN_DEBUG "Looking at chpid %x, link addr %x...\n", chpid, fla);
-	for (irq = 0; irq <= __MAX_SUBCHANNELS; irq++) {
-		int found;
-		
-		sch = ioinfo[irq];
-		if (!sch) {
-			/* The full program again (see above), grr... */
-			ret = css_probe_device(irq);
-			if (ret == -ENXIO)
-				/* We're through */
-				return;
-			return;
-		}
-
-		/*
-		 * Walk through all subchannels and
-		 * look if our chpid and our (masked) link
-		 * address are in somewhere
-		 * Do a stsch for the found subchannels and
-		 * perform path grouping
-		 */
-
-		/* Update our ssd_info */
-		if (chsc_get_sch_desc_irq(sch->irq))
-			break;
-
-		found = 0;
-		for (j = 0; j < 8; j++)
-			if (sch->ssd_info.valid &&
-			    sch->ssd_info.chpid[j] == chpid &&
-			    (sch->ssd_info.fla[j] & fla_mask) == fla) {
-				found = 1;
-				break;
-			}
-
-		if (found == 0)
-			continue;
-
-		ccode = stsch(sch->irq, &sch->schib);
-		if (ccode > 0)
+		if (fla_mask != 0)
 			break;
-
-		sch->lpm = sch->schib.pmcw.pim &
-			sch->schib.pmcw.pam &
-			sch->schib.pmcw.pom;
-		
-		chsc_validate_chpids(sch);
-		
-		sch->lpm |= (0x80 >> j);
-		dev_fsm_event(sch->dev.driver_data, DEV_EVENT_VERIFY);
-						
-		/* We've found it, get out of here. */
-		break;
 	}
 }
 
@@ -508,7 +424,7 @@
 	 * be page-aligned. Implement proper locking or dynamic
 	 * allocation or prove that this function does not have to be
 	 * reentrant! */
-	static struct chsc_area chsc_area_sei
+	static struct sei_area chsc_area_sei
 		__attribute__ ((aligned(PAGE_SIZE))) = {
 			.request_block = {
 				.command_code1 = 0x0010,
@@ -516,8 +432,8 @@
 			}
 		};
 
-	typeof (chsc_area_sei.response_block.response_block_data.sei_res)
-		*sei_res = &chsc_area_sei.response_block.response_block_data.sei_res;
+	typeof (chsc_area_sei.response_block)
+		*sei_res = &chsc_area_sei.response_block;
 
 
 	CIO_TRACE_EVENT( 2, "prcss");
@@ -582,17 +498,17 @@
 
 		if ((sei_res->vf & 0x80) == 0) {
 			pr_debug( KERN_DEBUG "chpid: %x\n", sei_res->rsid);
-			s390_process_res_acc_chpid (sei_res->rsid);
+			s390_process_res_acc(sei_res->rsid, 0, 0);
 		} else if ((sei_res->vf & 0xc0) == 0x80) {
 			pr_debug( KERN_DEBUG "chpid: %x link addr: %x\n",
 			       sei_res->rsid, sei_res->fla);
-			s390_process_res_acc_linkaddr (sei_res->rsid,
-						       sei_res->fla, 0xff00);
+			s390_process_res_acc(sei_res->rsid, sei_res->fla,
+					     0xff00);
 		} else if ((sei_res->vf & 0xc0) == 0xc0) {
 			pr_debug( KERN_DEBUG "chpid: %x full link addr: %x\n",
 			       sei_res->rsid, sei_res->fla);
-			s390_process_res_acc_linkaddr (sei_res->rsid,
-						       sei_res->fla, 0xffff);
+			s390_process_res_acc(sei_res->rsid, sei_res->fla,
+					     0xffff);
 		}
 		pr_debug( KERN_DEBUG "\n");
 
@@ -810,4 +726,3 @@
 }
 
 module_init(register_channel_paths);
-EXPORT_SYMBOL(chsc);
diff -Nru a/drivers/s390/cio/chsc.h b/drivers/s390/cio/chsc.h
--- a/drivers/s390/cio/chsc.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/s390/cio/chsc.h	Sun Dec 15 18:08:31 2002
@@ -12,6 +12,86 @@
 #define CHSC_SEI_ACC_LINKADDR     2
 #define CHSC_SEI_ACC_FULLLINKADDR 3
 
+struct sei_area {
+	struct {
+		/* word 0 */
+		__u16 command_code1;
+		__u16 command_code2;
+		/* word 1 */
+		__u32 reserved1;
+		/* word 2 */
+		__u32 reserved2;
+		/* word 3 */
+		__u32 reserved3;
+	} __attribute__ ((packed,aligned(8))) request_block;
+	struct {
+		/* word 0 */
+		__u16 length;
+		__u16 response_code;
+		/* word 1 */
+		__u32 reserved1;
+		/* word 2 */
+		__u8  flags;
+		__u8  vf;	  /* validity flags */
+		__u8  rs;	  /* reporting source */
+		__u8  cc;	  /* content code */
+		/* word 3 */
+		__u16 fla;	  /* full link address */
+		__u16 rsid;	  /* reporting source id */
+		/* word 4 */
+		__u32 reserved2;
+		/* word 5 */
+		__u32 reserved3;
+		/* word 6 */
+		__u32 ccdf;	  /* content-code dependent field */
+		/* word 7 */
+		__u32 reserved4;
+		/* word 8 */
+		__u32 reserved5;
+		/* word 9 */
+		__u32 reserved6;
+	} __attribute__ ((packed,aligned(8))) response_block;
+} __attribute__ ((packed,aligned(PAGE_SIZE)));
+
+struct ssd_area {
+	struct {
+		/* word 0 */
+		__u16 command_code1;
+		__u16 command_code2;
+		/* word 1 */
+		__u16 reserved1;
+		__u16 f_sch;	 /* first subchannel */
+		/* word 2 */
+		__u16 reserved2;
+		__u16 l_sch;	/* last subchannel */
+		/* word 3 */
+		__u32 reserved3;
+	} __attribute__ ((packed,aligned(8))) request_block;
+	struct {
+		/* word 0 */
+		__u16 length;
+		__u16 response_code;
+		/* word 1 */
+		__u32 reserved1;
+		/* word 2 */
+		__u8 sch_valid : 1;
+		__u8 dev_valid : 1;
+		__u8 st	       : 3; /* subchannel type */
+		__u8 zeroes    : 3;
+		__u8  unit_addr;  /* unit address */
+		__u16 devno;	  /* device number */
+		/* word 3 */
+		__u8 path_mask;
+		__u8 fla_valid_mask;
+		__u16 sch;	  /* subchannel */
+		/* words 4-5 */
+		__u8 chpid[8];	  /* chpids 0-7 */
+		/* words 6-9 */
+		__u16 fla[8];	  /* full link addresses 0-7 */
+	} __attribute__ ((packed,aligned(8))) response_block;
+} __attribute__ ((packed,aligned(PAGE_SIZE)));
+
+
 struct channel_path {
 	int id;
 	int state;
diff -Nru a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
--- a/drivers/s390/cio/cio.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/s390/cio/cio.c	Sun Dec 15 18:08:32 2002
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/cio.c
  *   S/390 common I/O routines -- low level i/o calls
- *   $Revision: 1.89 $
+ *   $Revision: 1.90 $
  *
  *    Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
  *			      IBM Corporation
@@ -609,6 +609,7 @@
 	struct subchannel *sch;
 	struct irb *irb;
 
+	irq_enter ();
 	/*
 	 * Get interrupt information from lowcore
 	 */
@@ -620,28 +621,23 @@
 		 */
 		if (tpi_info->adapter_IO == 1 &&
 		    tpi_info->int_type == IO_INTERRUPT_TYPE) {
-			irq_enter ();
 			do_adapter_IO (tpi_info->intparm);
-			irq_exit ();
 			continue;
 		}
-		/* Store interrupt response block to lowcore. */
-		if (tsch (tpi_info->irq, irb) != 0)
-			/* Not status pending or not operational. */
-			continue;
-
 		sch = ioinfo[tpi_info->irq];
-		if (!sch)
-			continue;
-
-		irq_enter ();
-		spin_lock(&sch->lock);
-		memcpy (&sch->schib.scsw, &irb->scsw, sizeof (irb->scsw));
-		if (sch->driver && sch->driver->irq)
-			sch->driver->irq(&sch->dev);
-		spin_unlock(&sch->lock);
-		irq_exit ();
-
+		if (sch)
+			spin_lock(&sch->lock);
+		/* Store interrupt response block to lowcore. */
+		if (tsch (tpi_info->irq, irb) == 0 && sch) {
+			/* Keep subchannel information word up to date. */
+			memcpy (&sch->schib.scsw, &irb->scsw,
+				sizeof (irb->scsw));
+			/* Call interrupt handler if there is one. */
+			if (sch->driver && sch->driver->irq)
+				sch->driver->irq(&sch->dev);
+		}
+		if (sch)
+			spin_unlock(&sch->lock);
 		/*
 		 * Are more interrupts pending?
 		 * If so, the tpi instruction will update the lowcore
@@ -650,6 +646,7 @@
 		 * out of the sie which costs more cycles than it saves.
 		 */
 	} while (!MACHINE_IS_VM && tpi (NULL) != 0);
+	irq_exit ();
 }
 
 #ifdef CONFIG_CCW_CONSOLE
diff -Nru a/drivers/s390/cio/cio.h b/drivers/s390/cio/cio.h
--- a/drivers/s390/cio/cio.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/s390/cio/cio.h	Sun Dec 15 18:08:28 2002
@@ -113,7 +113,6 @@
 #define to_subchannel(n) container_of(n, struct subchannel, dev)
 
 extern int cio_validate_subchannel (struct subchannel *, unsigned int);
-extern int cio_modify (struct subchannel *);
 extern int cio_enable_subchannel (struct subchannel *, unsigned int);
 extern int cio_disable_subchannel (struct subchannel *);
 extern int cio_cancel (struct subchannel *);
@@ -127,7 +126,6 @@
 extern int cio_get_options (struct subchannel *);
 
 /* Use with care. */
-extern int cio_tpi (void);
 extern struct subchannel *cio_probe_console(void);
 extern void cio_release_console(void);
 
diff -Nru a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c
--- a/drivers/s390/cio/css.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/s390/cio/css.c	Sun Dec 15 18:08:28 2002
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/css.c
  *  driver for channel subsystem
- *   $Revision: 1.39 $
+ *   $Revision: 1.40 $
  *
  *    Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
  *			 IBM Corporation
@@ -20,6 +20,7 @@
 #include "cio.h"
 #include "cio_debug.h"
 #include "device.h" // FIXME: dito
+#include "ioasm.h"
 
 struct subchannel *ioinfo[__MAX_SUBCHANNELS];
 unsigned int highest_subchannel;
@@ -154,6 +155,7 @@
 {
 	static DECLARE_WORK(work, do_process_crw, 0);
 	struct subchannel *sch;
+	int ccode, devno;
 
 	CIO_CRW_EVENT(2, "source is subchannel %04X\n", irq);
 
@@ -164,9 +166,13 @@
 	}
 	if (!sch->dev.driver_data)
 		return;
+	devno = sch->schib.pmcw.dev;
 	/* FIXME: css_process_crw must not know about ccw_device */
 	dev_fsm_event(sch->dev.driver_data, DEV_EVENT_NOTOPER);
-	// FIXME: revalidate machine checks?
+	ccode = stsch(irq, &sch->schib);
+	if (!ccode)
+		if (devno != sch->schib.pmcw.dev)
+			schedule_work(&work);
 }
 
 /*
diff -Nru a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
--- a/drivers/s390/cio/device.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/s390/cio/device.c	Sun Dec 15 18:08:30 2002
@@ -1,7 +1,7 @@
 /*
  *  drivers/s390/cio/device.c
  *  bus driver for ccw devices
- *   $Revision: 1.44 $
+ *   $Revision: 1.45 $
  *
  *    Copyright (C) 2002 IBM Deutschland Entwicklung GmbH,
  *			 IBM Corporation
@@ -362,18 +362,28 @@
 		sch->dev.driver_data = 0;
 		kfree (cdev->private);
 		kfree (cdev);
-		return;
+		goto out;
 	}
 
 	ret = subchannel_add_files(cdev->dev.parent);
 	if (ret)
 		printk(KERN_WARNING "%s: could not add attributes to %04x\n",
 		       __func__, sch->irq);
+out:
+	put_device(&sch->dev);
 }
 
 static void
 io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch)
 {
+	int rc;
+
+	if (!get_device(&sch->dev)) {
+		if (cdev->dev.release)
+			cdev->dev.release(&cdev->dev);
+		return;
+	}
+
 	sch->dev.driver_data = cdev;
 	sch->driver = &io_subchannel_driver;
 	cdev->ccwlock = &sch->lock;
@@ -392,12 +402,17 @@
 
 	/* Do first half of device_register. */
 	device_initialize(&cdev->dev);
-	get_device(&sch->dev);	/* keep parent refcount in sync. */
 
 	/* Start async. device sensing. */
 	spin_lock_irq(cdev->ccwlock);
-	ccw_device_recognition(cdev);
+	rc = ccw_device_recognition(cdev);
 	spin_unlock_irq(cdev->ccwlock);
+	if (rc) {
+		sch->dev.driver_data = 0;
+		put_device(&sch->dev);
+		if (cdev->dev.release)
+			cdev->dev.release(&cdev->dev);
+	}
 }
 
 static int
diff -Nru a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
--- a/drivers/s390/cio/device_fsm.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/cio/device_fsm.c	Sun Dec 15 18:08:29 2002
@@ -112,7 +112,10 @@
 		CIO_DEBUG(KERN_WARNING, 2,
 			  "SenseID : unknown device %04X on subchannel %04X\n",
 			  sch->schib.pmcw.dev, sch->irq);
-		device_unregister(&cdev->dev);
+		sch->dev.driver_data = 0;
+		put_device(&sch->dev);
+		if (cdev->dev.release)
+			cdev->dev.release(&cdev->dev);
 		break;
 	case DEV_STATE_OFFLINE:
 		/* fill out sense information */
@@ -235,10 +238,8 @@
 
 	sch = to_subchannel(cdev->dev.parent);
 
-	if (state != DEV_STATE_ONLINE) {
+	if (state != DEV_STATE_ONLINE)
 		cio_disable_subchannel(sch);
-		device_unregister(&cdev->dev);
-	}
 
 	/* Reset device status. */
 	memset(&cdev->private->irb, 0, sizeof(struct irb));
@@ -246,6 +247,9 @@
 	cdev->private->state = state;
 
 	wake_up(&cdev->private->wait_q);
+
+	if (state != DEV_STATE_ONLINE)
+		put_device (&cdev->dev);
 }
 
 void
@@ -275,6 +279,8 @@
 	if (cdev->private->state != DEV_STATE_OFFLINE)
 		return -EINVAL;
 	sch = to_subchannel(cdev->dev.parent);
+	if (!get_device(&cdev->dev))
+		return -ENODEV;
 	if (cio_enable_subchannel(sch, sch->schib.pmcw.isc) != 0) {
 		/* Couldn't enable the subchannel for i/o. Sick device. */
 		dev_fsm_event(cdev, DEV_EVENT_NOTOPER);
@@ -683,19 +689,19 @@
 		[DEV_EVENT_NOTOPER]     ccw_device_online_notoper,
 		[DEV_EVENT_INTERRUPT]   ccw_device_qdio_init_irq,
 		[DEV_EVENT_TIMEOUT]     ccw_device_qdio_init_timeout,
-		[DEV_EVENT_VERIFY]      ccw_device_nop, //FIXME
+		[DEV_EVENT_VERIFY]      ccw_device_nop,
 	},
 	[DEV_STATE_QDIO_ACTIVE] {
 		[DEV_EVENT_NOTOPER]     ccw_device_online_notoper,
 		[DEV_EVENT_INTERRUPT]   ccw_device_irq,
 		[DEV_EVENT_TIMEOUT]     ccw_device_nop,
-		[DEV_EVENT_VERIFY]      ccw_device_nop, //FIXME
+		[DEV_EVENT_VERIFY]      ccw_device_nop,
 	},
 	[DEV_STATE_QDIO_CLEANUP] {
 		[DEV_EVENT_NOTOPER]     ccw_device_online_notoper,
 		[DEV_EVENT_INTERRUPT]   ccw_device_qdio_cleanup_irq,
 		[DEV_EVENT_TIMEOUT]     ccw_device_qdio_cleanup_timeout,
-		[DEV_EVENT_VERIFY]      ccw_device_nop, //FIXME
+		[DEV_EVENT_VERIFY]      ccw_device_nop,
 	},
 	/* states to wait for i/o completion before doing something */
 	[DEV_STATE_ONLINE_VERIFY] {
diff -Nru a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h
--- a/drivers/s390/cio/ioasm.h	Sun Dec 15 18:08:33 2002
+++ b/drivers/s390/cio/ioasm.h	Sun Dec 15 18:08:33 2002
@@ -260,7 +260,7 @@
 	return ccode;
 }
 
-extern __inline__ int do_chsc(void *chsc_area)
+extern __inline__ int chsc(void *chsc_area)
 {
 	int cc;
 
diff -Nru a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
--- a/drivers/s390/cio/qdio.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/cio/qdio.c	Sun Dec 15 18:08:29 2002
@@ -53,8 +53,9 @@
 #include "device.h"
 #include "airq.h"
 #include "qdio.h"
+#include "ioasm.h"
 
-#define VERSION_QDIO_C "$Revision: 1.16 $"
+#define VERSION_QDIO_C "$Revision: 1.18 $"
 
 /****************** MODULE PARAMETER VARIABLES ********************/
 MODULE_AUTHOR("Utz Bacher <utz.bacher@de.ibm.com>");
@@ -1573,33 +1574,33 @@
 {
 	struct qdio_irq *irq_ptr;
 	struct qdio_q *q;
-	int irq;
 	int cstat,dstat;
-	char dbf_text[15]="qintXXXX";
+	char dbf_text[15];
 
-	irq = cdev->private->irq; /* FIXME: use different dbg */
         cstat = irb->scsw.cstat;
         dstat = irb->scsw.dstat;
 
-	*((int*)(&dbf_text[4]))=irq;
-	QDIO_DBF_HEX4(0,trace,dbf_text,QDIO_DBF_TRACE_LEN);
+	QDIO_DBF_TEXT4(0, trace, "qint");
+	sprintf(dbf_text, "%s", cdev->dev.bus_id);
+	QDIO_DBF_TEXT4(0, trace, dbf_text);
 	
 	if (!intparm || !cdev) {
 		QDIO_PRINT_STUPID("got unsolicited interrupt in qdio " \
-				  "handler, irq 0x%x\n",irq);
+				  "handler, device %s\n", cdev->dev.bus_id);
 		return;
 	}
 
 	irq_ptr = cdev->private->qdio_data;
 	if (!irq_ptr) {
-		sprintf(dbf_text,"uint%4x",irq);
+		QDIO_DBF_TEXT2(1, trace, "uint");
+		sprintf(dbf_text,"%s", cdev->dev.bus_id);
 		QDIO_DBF_TEXT2(1,trace,dbf_text);
-		QDIO_PRINT_ERR("received interrupt on unused irq 0x%04x!\n",
-			       irq);
+		QDIO_PRINT_ERR("received interrupt on unused device %s!\n",
+			       cdev->dev.bus_id);
 		return;
 	}
 
-	qdio_irq_check_sense(irq, irb);
+	qdio_irq_check_sense(irq_ptr->irq, irb);
 
 	if (cstat & SCHN_STAT_PCI) {
 		qdio_handle_pci(irq_ptr);
@@ -1607,21 +1608,22 @@
 	}
 
 	if ((cstat&~SCHN_STAT_PCI)||dstat) {
-		sprintf(dbf_text,"ick2%4x",irq);
+		QDIO_DBF_TEXT2(1, trace, "ick2");
+		sprintf(dbf_text,"%s", cdev->dev.bus_id);
 		QDIO_DBF_TEXT2(1,trace,dbf_text);
 		QDIO_DBF_HEX2(0,trace,&intparm,sizeof(int));
 		QDIO_DBF_HEX2(0,trace,&dstat,sizeof(int));
 		QDIO_DBF_HEX2(0,trace,&cstat,sizeof(int));
 		QDIO_PRINT_ERR("received check condition on activate " \
-			       "queues on irq 0x%x (cs=x%x, ds=x%x).\n",
-			       irq,cstat,dstat);
+			       "queues on device %s (cs=x%x, ds=x%x).\n",
+			       cdev->dev.bus_id, cstat, dstat);
 		if (irq_ptr->no_input_qs) {
 			q=irq_ptr->input_qs[0];
 		} else if (irq_ptr->no_output_qs) {
 			q=irq_ptr->output_qs[0];
 		} else {
-			QDIO_PRINT_ERR("oops... no queue registered on irq " \
-				  "0x%x!?\n",irq);
+			QDIO_PRINT_ERR("oops... no queue registered for " \
+				       "device %s!?\n", cdev->dev.bus_id);
 			goto omit_handler_call;
 		}
 		q->handler(q->irq,QDIO_STATUS_ACTIVATE_CHECK_CONDITION|
diff -Nru a/drivers/s390/misc/Makefile b/drivers/s390/misc/Makefile
--- a/drivers/s390/misc/Makefile	Sun Dec 15 18:08:32 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,7 +0,0 @@
-#
-# S/390 miscellaneous devices
-#
-
-# placeholder for stuff to come...
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/s390/net/Makefile b/drivers/s390/net/Makefile
--- a/drivers/s390/net/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/net/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,6 +10,3 @@
 obj-$(CONFIG_CTC) += ctc.o fsm.o cu3088.o
 obj-$(CONFIG_IUCV) += netiucv.o
 obj-$(CONFIG_LCS) += lcs.o cu3088.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
--- a/drivers/s390/net/ctcmain.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/net/ctcmain.c	Sun Dec 15 18:08:29 2002
@@ -1,5 +1,5 @@
 /*
- * $Id: ctcmain.c,v 1.29 2002/12/06 12:31:38 cohuck Exp $
+ * $Id: ctcmain.c,v 1.30 2002/12/09 13:56:20 aberg Exp $
  *
  * CTC / ESCON network driver
  *
@@ -36,7 +36,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.29 $
+ * RELEASE-TAG: CTC/ESCON network driver $Revision: 1.30 $
  *
  */
 
@@ -279,7 +279,7 @@
 print_banner(void)
 {
 	static int printed = 0;
-	char vbuf[] = "$Revision: 1.29 $";
+	char vbuf[] = "$Revision: 1.30 $";
 	char *version = vbuf;
 
 	if (printed)
@@ -2821,7 +2821,7 @@
  * @returns 0 on success, !0 on failure.
  */
 
-int
+static int
 ctc_probe_device(struct ccwgroup_device *cgdev)
 {
 	struct ctc_priv *priv;
@@ -2864,7 +2864,7 @@
  *
  * @returns 0 on success, !0 on failure.
  */
-int
+static int
 ctc_new_device(struct ccwgroup_device *cgdev)
 {
 	char read_id[CTC_ID_SIZE];
@@ -2941,7 +2941,7 @@
  *
  * @returns 0 on success, !0 on failure.
  */
-int
+static int
 ctc_shutdown_device(struct ccwgroup_device *cgdev)
 {
 	struct ctc_priv *priv;
@@ -2975,7 +2975,7 @@
 
 }
 
-int
+static int
 ctc_remove_device(struct ccwgroup_device *cgdev)
 {
 	struct ctc_priv *priv;
@@ -2991,7 +2991,7 @@
 	return 0;
 }
 
-struct ccwgroup_driver ctc_group_driver = {
+static struct ccwgroup_driver ctc_group_driver = {
 	.name        = "ctc",
 	.max_slaves  = 2,
 	.driver_id   = 0xC3E3C3,
diff -Nru a/drivers/s390/net/cu3088.c b/drivers/s390/net/cu3088.c
--- a/drivers/s390/net/cu3088.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/s390/net/cu3088.c	Sun Dec 15 18:08:29 2002
@@ -1,5 +1,5 @@
 /*
- * $Id: cu3088.c,v 1.21 2002/12/03 16:26:45 cohuck Exp $
+ * $Id: cu3088.c,v 1.22 2002/12/10 09:53:55 cohuck Exp $
  *
  * CTC / LCS ccw_device driver
  *
@@ -172,5 +172,5 @@
 module_init(cu3088_init);
 module_exit(cu3088_exit);
 
-EXPORT_SYMBOL(register_cu3088_discipline);
-EXPORT_SYMBOL(unregister_cu3088_discipline);
+EXPORT_SYMBOL_GPL(register_cu3088_discipline);
+EXPORT_SYMBOL_GPL(unregister_cu3088_discipline);
diff -Nru a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
--- a/drivers/s390/net/lcs.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/s390/net/lcs.c	Sun Dec 15 18:08:28 2002
@@ -11,7 +11,7 @@
  *			  Frank Pavlic (pavlic@de.ibm.com) and
  *		 	  Martin Schwidefsky <schwidefsky@de.ibm.com>
  *
- *    $Revision: 1.41 $	 $Date: 2002/12/06 12:42:01 $
+ *    $Revision: 1.42 $	 $Date: 2002/12/09 13:55:28 $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@
 /**
  * initialization string for output
  */
-#define VERSION_LCS_C  "$Revision: 1.41 $"
+#define VERSION_LCS_C  "$Revision: 1.42 $"
 
 static const char *version="LCS driver ("VERSION_LCS_C "/" VERSION_LCS_H ")";
 
@@ -1576,7 +1576,7 @@
 /**
  * get network statistics for ifconfig and other user programs
  */
-struct net_device_stats *
+static struct net_device_stats *
 lcs_getstats(struct net_device *dev)
 {
 	struct lcs_card *card;
@@ -1590,7 +1590,7 @@
  * stop lcs device
  * This function will be called by user doing ifconfig xxx down
  */
-int
+static int
 lcs_stop_device(struct net_device *dev)
 {
 	struct lcs_card *card;
@@ -1612,7 +1612,7 @@
  * start lcs device and make it runnable
  * This function will be called by user doing ifconfig xxx up
  */
-int
+static int
 lcs_open_device(struct net_device *dev)
 {
 	struct lcs_card *card;
@@ -1678,7 +1678,7 @@
 /**
  * lcs_probe_device is called on establishing a new ccwgroup_device.
  */
-int
+static int
 lcs_probe_device(struct ccwgroup_device *ccwgdev)
 {
 	struct lcs_card *card;
@@ -1714,7 +1714,7 @@
 /**
  * lcs_new_device will be called by setting the group device online.
  */
-int
+static int
 lcs_new_device(struct ccwgroup_device *ccwgdev)
 {
 	struct  lcs_card *card;
@@ -1794,7 +1794,7 @@
 /**
  * lcs_shutdown_device, called when setting the group device offline.
  */
-int
+static int
 lcs_shutdown_device(struct ccwgroup_device *ccwgdev)
 {
 	struct lcs_card *card;
@@ -1810,7 +1810,7 @@
 /**
  * lcs_remove_device, free buffers and card
  */
-int
+static int
 lcs_remove_device(struct ccwgroup_device *ccwgdev)
 {
 	struct lcs_card *card;
@@ -1828,7 +1828,7 @@
 /**
  * LCS ccwgroup driver registration
  */
-struct ccwgroup_driver lcs_group_driver = {
+static struct ccwgroup_driver lcs_group_driver = {
 	.name        = "lcs",
 	.max_slaves  = 2,
 	.driver_id   = 0xD3C3E2,
diff -Nru a/drivers/sbus/Makefile b/drivers/sbus/Makefile
--- a/drivers/sbus/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/sbus/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 endif
 
 obj-$(CONFIG_SBUSCHAR) += char/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/sbus/char/Makefile b/drivers/sbus/char/Makefile
--- a/drivers/sbus/char/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/sbus/char/Makefile	Sun Dec 15 18:08:31 2002
@@ -25,5 +25,3 @@
 obj-$(CONFIG_TADPOLE_TS102_UCTRL)	+= uctrl.o
 obj-$(CONFIG_SUN_JSFLASH)		+= jsflash.o
 obj-$(CONFIG_BBC_I2C)			+= bbc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h
--- a/drivers/scsi/3w-xxxx.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/3w-xxxx.h	Sun Dec 15 18:08:28 2002
@@ -474,23 +474,23 @@
 
 /* Scsi_Host_Template Initializer */
 #define TWXXXX {					\
-	proc_name : "3w-xxxx",				\
-	proc_info : tw_scsi_proc_info,			\
-	name : "3ware Storage Controller",		\
-	detect : tw_scsi_detect,			\
-	release : tw_scsi_release,			\
-	queuecommand : tw_scsi_queue,			\
-	eh_abort_handler : tw_scsi_eh_abort,		\
-	eh_host_reset_handler : tw_scsi_eh_reset,	\
-	bios_param : tw_scsi_biosparam,			\
-	can_queue : TW_Q_LENGTH-1,			\
-	this_id: -1,					\
-	sg_tablesize : TW_MAX_SGL_LENGTH,		\
-	cmd_per_lun: TW_MAX_CMDS_PER_LUN,		\
-	present : 0,					\
-	unchecked_isa_dma : 0,				\
-	use_clustering : ENABLE_CLUSTERING,		\
-	emulated : 1,					\
-	highmem_io : 1					\
+	.proc_name	= "3w-xxxx",			\
+	.proc_info	= tw_scsi_proc_info,		\
+	.name		= "3ware Storage Controller",	\
+	.detect		= tw_scsi_detect,		\
+	.release	= tw_scsi_release,		\
+	.queuecommand	= tw_scsi_queue,		\
+	.eh_abort_handler	= tw_scsi_eh_abort,	\
+	.eh_host_reset_handler	= tw_scsi_eh_reset,	\
+	.bios_param	= tw_scsi_biosparam,		\
+	.can_queue	= TW_Q_LENGTH-1,		\
+	.this_id	= -1,				\
+	.sg_tablesize	= TW_MAX_SGL_LENGTH,		\
+	.cmd_per_lun	= TW_MAX_CMDS_PER_LUN,		\
+	.present	= 0,				\
+	.unchecked_isa_dma	= 0,			\
+	.use_clustering	= ENABLE_CLUSTERING,		\
+	.emulated	= 1,				\
+	.highmem_io	= 1				\
 }
 #endif /* _3W_XXXX_H */
diff -Nru a/drivers/scsi/53c7,8xx.h b/drivers/scsi/53c7,8xx.h
--- a/drivers/scsi/53c7,8xx.h	Sun Dec 15 18:08:30 2002
+++ b/drivers/scsi/53c7,8xx.h	Sun Dec 15 18:08:30 2002
@@ -59,16 +59,16 @@
 #endif
 
 #define NCR53c7xx {					\
-          name:           "NCR53c{7,8}xx (rel 17)",	\
-	  detect:         NCR53c7xx_detect,		\
-	  queuecommand:   NCR53c7xx_queue_command,	\
-	  abort:          NCR53c7xx_abort,		\
-	  reset:          NCR53c7xx_reset,		\
-	  can_queue:      24,				\
-	  this_id:        7,				\
-	  sg_tablesize:   127,				\
-	  cmd_per_lun:    3,				\
-	  use_clustering: DISABLE_CLUSTERING} 
+          .name           = "NCR53c{7,8}xx (rel 17)",	\
+	  .detect         = NCR53c7xx_detect,		\
+	  .queuecommand   = NCR53c7xx_queue_command,	\
+	  .abort          = NCR53c7xx_abort,		\
+	  .reset          = NCR53c7xx_reset,		\
+	  .can_queue      = 24,				\
+	  .this_id        = 7,				\
+	  .sg_tablesize   = 127,				\
+	  .cmd_per_lun    = 3,				\
+	  .use_clustering = DISABLE_CLUSTERING} 
 
 #ifndef HOSTS_C
 
diff -Nru a/drivers/scsi/AM53C974.h b/drivers/scsi/AM53C974.h
--- a/drivers/scsi/AM53C974.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/AM53C974.h	Sun Dec 15 18:08:31 2002
@@ -51,20 +51,20 @@
 };
 
 #define AM53C974 {				  \
-    proc_name:      "am53c974",    	          \
-    name:           "AM53C974",        		  \
-    detect:         AM53C974_pci_detect,	  \
-    release:        AM53C974_release,		  \
-    info:           AM53C974_info,     		  \
-    command:        AM53C974_command,  		  \
-    queuecommand:   AM53C974_queue_command,	  \
-    abort:          AM53C974_abort,    		  \
-    reset:          AM53C974_reset,    		  \
-    can_queue:      12,                 	  \
-    this_id:        -1,                           \
-    sg_tablesize:   SG_ALL,            		  \
-    cmd_per_lun:    1,                 		  \
-    use_clustering: DISABLE_CLUSTERING 		  \
+    .proc_name      = "am53c974",    	          \
+    .name           = "AM53C974",        		  \
+    .detect         = AM53C974_pci_detect,	  \
+    .release        = AM53C974_release,		  \
+    .info           = AM53C974_info,     		  \
+    .command        = AM53C974_command,  		  \
+    .queuecommand   = AM53C974_queue_command,	  \
+    .abort          = AM53C974_abort,    		  \
+    .reset          = AM53C974_reset,    		  \
+    .can_queue      = 12,                 	  \
+    .this_id        = -1,                           \
+    .sg_tablesize   = SG_ALL,            		  \
+    .cmd_per_lun    = 1,                 		  \
+    .use_clustering = DISABLE_CLUSTERING 		  \
     }
 
 static int AM53C974_pci_detect(Scsi_Host_Template * tpnt);
diff -Nru a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h
--- a/drivers/scsi/BusLogic.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/BusLogic.h	Sun Dec 15 18:08:29 2002
@@ -65,18 +65,18 @@
 */
 
 #define BUSLOGIC							       \
-  { proc_name:      "BusLogic",			  /* ProcFS Directory Entry */ \
-    proc_info:      BusLogic_ProcDirectoryInfo,	  /* ProcFS Info Function   */ \
-    name:           "BusLogic",			  /* Driver Name            */ \
-    detect:         BusLogic_DetectHostAdapter,	  /* Detect Host Adapter    */ \
-    release:        BusLogic_ReleaseHostAdapter,  /* Release Host Adapter   */ \
-    info:           BusLogic_DriverInfo,	  /* Driver Info Function   */ \
-    queuecommand:   BusLogic_QueueCommand,	  /* Queue Command Function */ \
-    slave_configure:BusLogic_SlaveConfigure,	  /* Configure a SCSI_Device*/ \
-    bios_param:     BusLogic_BIOSDiskParameters,  /* BIOS Disk Parameters   */ \
-    unchecked_isa_dma: 1,			  /* Default Initial Value  */ \
-    max_sectors:    128,			  /* I/O queue len limit    */ \
-    use_clustering: ENABLE_CLUSTERING }		  /* Enable Clustering	    */
+  { .proc_name      = "BusLogic",			  /* ProcFS Directory Entry */ \
+    .proc_info      = BusLogic_ProcDirectoryInfo,	  /* ProcFS Info Function   */ \
+    .name           = "BusLogic",			  /* Driver Name            */ \
+    .detect         = BusLogic_DetectHostAdapter,	  /* Detect Host Adapter    */ \
+    .release        = BusLogic_ReleaseHostAdapter,  /* Release Host Adapter   */ \
+    .info           = BusLogic_DriverInfo,	  /* Driver Info Function   */ \
+    .queuecommand   = BusLogic_QueueCommand,	  /* Queue Command Function */ \
+    .slave_configure = BusLogic_SlaveConfigure,	  /* Configure a SCSI_Device*/ \
+    .bios_param     = BusLogic_BIOSDiskParameters,  /* BIOS Disk Parameters   */ \
+    .unchecked_isa_dma = 1,			  /* Default Initial Value  */ \
+    .max_sectors    = 128,			  /* I/O queue len limit    */ \
+    .use_clustering = ENABLE_CLUSTERING }		  /* Enable Clustering	    */
 
 
 /*
diff -Nru a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
--- a/drivers/scsi/Kconfig	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/Kconfig	Sun Dec 15 18:08:32 2002
@@ -467,9 +467,8 @@
 	---help---
 	  This driver supports all EATA/DMA-compliant SCSI host adapters.  DPT
 	  ISA and all EISA I/O addresses are probed looking for the "EATA"
-	  signature.  If you chose "BIOS" at the question "PCI access mode",
-	  the addresses of all the PCI SCSI controllers reported by the PCI
-	  subsystem are probed as well.
+	  signature. The addresses of all the PCI SCSI controllers reported
+          by the PCI subsystem are probed as well.
 
 	  You want to read the start of <file:drivers/scsi/eata.c> and the
 	  SCSI-HOWTO, available from
@@ -490,9 +489,8 @@
 	help
 	  This is a feature of SCSI-2 which improves performance: the host
 	  adapter can send several SCSI commands to a device's queue even if
-	  previous commands haven't finished yet. Most EATA adapters negotiate
-	  this feature automatically with the device, even if your answer is
-	  N. The safe answer is N.
+	  previous commands haven't finished yet.
+	  This is equivalent to the "eata=tc:y" boot option.
 
 config SCSI_EATA_LINKED_COMMANDS
 	bool "enable elevator sorting"
@@ -502,7 +500,7 @@
 	  CD-ROMs. It definitely reduces the average seek distance when doing
 	  random seeks, but this does not necessarily result in a noticeable
 	  performance improvement: your mileage may vary...
-	  The safe answer is N.
+	  This is equivalent to the "eata=lc:y" boot option.
 
 config SCSI_EATA_MAX_TAGS
 	int "maximum number of queued commands"
@@ -515,6 +513,7 @@
 	  Minimum is 2 and maximum is 62. This value is also the window size
 	  used by the elevator sorting option above. The effective value used
 	  by the driver for each probed SCSI device is reported at boot time.
+	  This is equivalent to the "eata=mq:8" boot option.
 
 config SCSI_EATA_DMA
 	tristate "EATA-DMA [Obsolete] (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix) support"
@@ -1487,6 +1486,15 @@
 	  The module will be called u14-34f.o.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+config SCSI_U14_34F_TAGGED_QUEUE
+	bool "enable tagged command queueing"
+	depends on SCSI_U14_34F
+	help
+	  This is a feature of SCSI-2 which improves performance: the host
+	  adapter can send several SCSI commands to a device's queue even if
+	  previous commands haven't finished yet.
+	  This is equivalent to the "u14-34f=tc:y" boot option.
+
 config SCSI_U14_34F_LINKED_COMMANDS
 	bool "enable elevator sorting"
 	depends on SCSI_U14_34F
@@ -1495,8 +1503,7 @@
 	  CD-ROMs. It definitely reduces the average seek distance when doing
 	  random seeks, but this does not necessarily result in a noticeable
 	  performance improvement: your mileage may vary...
-
-	  The safe answer is N.
+	  This is equivalent to the "u14-34f=lc:y" boot option.
 
 config SCSI_U14_34F_MAX_TAGS
 	int "maximum number of queued commands"
@@ -1509,6 +1516,7 @@
 	  Minimum is 2 and maximum is 14. This value is also the window size
 	  used by the elevator sorting option above. The effective value used
 	  by the driver for each probed SCSI device is reported at boot time.
+	  This is equivalent to the "u14-34f=mq:8" boot option.
 
 config SCSI_ULTRASTOR
 	tristate "UltraStor SCSI support"
diff -Nru a/drivers/scsi/Makefile b/drivers/scsi/Makefile
--- a/drivers/scsi/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/Makefile	Sun Dec 15 18:08:31 2002
@@ -141,8 +141,6 @@
 clean-files :=	53c8xx_d.h  53c7xx_d.h sim710_d.h  53c700_d.h	\
 		53c8xx_u.h  53c7xx_u.h sim710_u.h 53c700_u.h
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/53c7,8xx.o: $(obj)/53c8xx_d.h $(obj)/53c8xx_u.h
 $(obj)/53c7xx.o:   $(obj)/53c7xx_d.h $(obj)/53c7xx_u.h
 $(obj)/sim710.o:   $(obj)/sim710_d.h
diff -Nru a/drivers/scsi/a2091.h b/drivers/scsi/a2091.h
--- a/drivers/scsi/a2091.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/a2091.h	Sun Dec 15 18:08:28 2002
@@ -30,18 +30,18 @@
 #define CAN_QUEUE 16
 #endif
 
-#define A2091_SCSI {  proc_name:	   "A2901", \
-		      name:                "Commodore A2091/A590 SCSI", \
-		      detect:              a2091_detect,    \
-		      release:             a2091_release,   \
-		      queuecommand:        wd33c93_queuecommand, \
-		      abort:               wd33c93_abort,   \
-		      reset:               wd33c93_reset,   \
-		      can_queue:           CAN_QUEUE,       \
-		      this_id:             7,               \
-		      sg_tablesize:        SG_ALL,          \
-		      cmd_per_lun:	   CMD_PER_LUN,     \
-		      use_clustering:      DISABLE_CLUSTERING }
+#define A2091_SCSI {  .proc_name	   = "A2901", \
+		      .name                = "Commodore A2091/A590 SCSI", \
+		      .detect              = a2091_detect,    \
+		      .release             = a2091_release,   \
+		      .queuecommand        = wd33c93_queuecommand, \
+		      .abort               = wd33c93_abort,   \
+		      .reset               = wd33c93_reset,   \
+		      .can_queue           = CAN_QUEUE,       \
+		      .this_id             = 7,               \
+		      .sg_tablesize        = SG_ALL,          \
+		      .cmd_per_lun	   = CMD_PER_LUN,     \
+		      .use_clustering      = DISABLE_CLUSTERING }
 
 /*
  * if the transfer address ANDed with this results in a non-zero
diff -Nru a/drivers/scsi/a3000.h b/drivers/scsi/a3000.h
--- a/drivers/scsi/a3000.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/a3000.h	Sun Dec 15 18:08:28 2002
@@ -30,19 +30,19 @@
 #define CAN_QUEUE 16
 #endif
 
-#define _A3000_SCSI { proc_name:	   "A3000",			\
-		      proc_info:           NULL,			\
-		      name:                "Amiga 3000 built-in SCSI",	\
-		      detect:              a3000_detect,		\
-		      release:             a3000_release,		\
-		      queuecommand:        wd33c93_queuecommand,	\
-		      abort:               wd33c93_abort,		\
-		      reset:               wd33c93_reset,		\
-		      can_queue:           CAN_QUEUE,			\
-		      this_id:             7,				\
-		      sg_tablesize:        SG_ALL,			\
-		      cmd_per_lun:	   CMD_PER_LUN,			\
-		      use_clustering:      ENABLE_CLUSTERING }
+#define _A3000_SCSI { .proc_name	   = "A3000",			\
+		      .proc_info           = NULL,			\
+		      .name                = "Amiga 3000 built-in SCSI",	\
+		      .detect              = a3000_detect,		\
+		      .release             = a3000_release,		\
+		      .queuecommand        = wd33c93_queuecommand,	\
+		      .abort               = wd33c93_abort,		\
+		      .reset               = wd33c93_reset,		\
+		      .can_queue           = CAN_QUEUE,			\
+		      .this_id             = 7,				\
+		      .sg_tablesize        = SG_ALL,			\
+		      .cmd_per_lun	   = CMD_PER_LUN,			\
+		      .use_clustering      = ENABLE_CLUSTERING }
 
 /*
  * if the transfer address ANDed with this results in a non-zero
diff -Nru a/drivers/scsi/aacraid/Makefile b/drivers/scsi/aacraid/Makefile
--- a/drivers/scsi/aacraid/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/aacraid/Makefile	Sun Dec 15 18:08:31 2002
@@ -6,5 +6,3 @@
 		   dpcsup.o rx.o sa.o
 
 EXTRA_CFLAGS	:= -Idrivers/scsi
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/scsi/advansys.h b/drivers/scsi/advansys.h
--- a/drivers/scsi/advansys.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/advansys.h	Sun Dec 15 18:08:32 2002
@@ -72,22 +72,22 @@
  */
 #if ASC_LINUX_KERNEL24
 #define ADVANSYS { \
-    proc_name:                  "advansys", \
-    proc_info:                  advansys_proc_info, \
-    name:                       "advansys", \
-    detect:                     advansys_detect, \
-    release:                    advansys_release, \
-    info:                       advansys_info, \
-    queuecommand:               advansys_queuecommand, \
-    eh_bus_reset_handler:	advansys_reset, \
-    bios_param:                 advansys_biosparam, \
-    slave_configure:		advansys_slave_configure, \
+    .proc_name                  = "advansys", \
+    .proc_info                  = advansys_proc_info, \
+    .name                       = "advansys", \
+    .detect                     = advansys_detect, \
+    .release                    = advansys_release, \
+    .info                       = advansys_info, \
+    .queuecommand               = advansys_queuecommand, \
+    .eh_bus_reset_handler	= advansys_reset, \
+    .bios_param                 = advansys_biosparam, \
+    .slave_configure		= advansys_slave_configure, \
     /* \
      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
      * must be set. The flag will be cleared in advansys_detect for non-ISA \
      * adapters. Refer to the comment in scsi_module.c for more information. \
      */ \
-    unchecked_isa_dma:          1, \
+    .unchecked_isa_dma          = 1, \
     /* \
      * All adapters controlled by this driver are capable of large \
      * scatter-gather lists. According to the mid-level SCSI documentation \
@@ -95,25 +95,25 @@
      * 'use_clustering'. But empirically while CPU utilization is increased \
      * by enabling clustering, I/O throughput increases as well. \
      */ \
-    use_clustering:             ENABLE_CLUSTERING, \
+    .use_clustering             = ENABLE_CLUSTERING, \
 }
 #elif ASC_LINUX_KERNEL22
 #define ADVANSYS { \
-    proc_info:                  advansys_proc_info, \
-    name:                       "advansys", \
-    detect:                     advansys_detect, \
-    release:                    advansys_release, \
-    info:                       advansys_info, \
-    queuecommand:               advansys_queuecommand, \
-    use_new_eh_code:		1, \
-    eh_bus_reset_handler:	advansys_reset, \
-    bios_param:                 advansys_biosparam, \
+    .proc_info                  = advansys_proc_info, \
+    .name                       = "advansys", \
+    .detect                     = advansys_detect, \
+    .release                    = advansys_release, \
+    .info                       = advansys_info, \
+    .queuecommand               = advansys_queuecommand, \
+    .use_new_eh_code		= 1, \
+    .eh_bus_reset_handler	= advansys_reset, \
+    .bios_param                 = advansys_biosparam, \
     /* \
      * Because the driver may control an ISA adapter 'unchecked_isa_dma' \
      * must be set. The flag will be cleared in advansys_detect for non-ISA \
      * adapters. Refer to the comment in scsi_module.c for more information. \
      */ \
-    unchecked_isa_dma:          1, \
+    .unchecked_isa_dma          = 1, \
     /* \
      * All adapters controlled by this driver are capable of large \
      * scatter-gather lists. According to the mid-level SCSI documentation \
@@ -121,7 +121,7 @@
      * 'use_clustering'. But empirically while CPU utilization is increased \
      * by enabling clustering, I/O throughput increases as well. \
      */ \
-    use_clustering:             ENABLE_CLUSTERING, \
+    .use_clustering             = ENABLE_CLUSTERING, \
 }
 #endif
 #endif /* _ADVANSYS_H */
diff -Nru a/drivers/scsi/aha152x.h b/drivers/scsi/aha152x.h
--- a/drivers/scsi/aha152x.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/aha152x.h	Sun Dec 15 18:08:29 2002
@@ -31,25 +31,25 @@
 #define AHA152X_REVID "Adaptec 152x SCSI driver; $Revision: 2.5 $"
 
 /* Initial value of Scsi_Host entry */
-#define AHA152X { proc_name:			"aha152x",		\
-                  proc_info:			aha152x_proc_info,	\
-                  name:				AHA152X_REVID,		\
-                  detect:			aha152x_detect,		\
-                  command:			aha152x_command,	\
-                  queuecommand:			aha152x_queue,		\
-		  eh_abort_handler:		aha152x_abort,		\
-		  eh_device_reset_handler:	aha152x_device_reset,	\
-		  eh_bus_reset_handler:		aha152x_bus_reset,	\
-		  eh_host_reset_handler:	aha152x_host_reset,	\
-                  release:			aha152x_release,	\
-                  bios_param:			aha152x_biosparam,	\
-                  can_queue:			1,			\
-                  this_id:			7,			\
-                  sg_tablesize:			SG_ALL,			\
-                  cmd_per_lun:			1,			\
-                  present:			0,			\
-                  unchecked_isa_dma:		0,			\
-                  use_clustering:		DISABLE_CLUSTERING }
+#define AHA152X { .proc_name			= "aha152x",		\
+                  .proc_info			= aha152x_proc_info,	\
+                  .name				= AHA152X_REVID,		\
+                  .detect			= aha152x_detect,		\
+                  .command			= aha152x_command,	\
+                  .queuecommand			= aha152x_queue,		\
+		  .eh_abort_handler		= aha152x_abort,		\
+		  .eh_device_reset_handler	= aha152x_device_reset,	\
+		  .eh_bus_reset_handler		= aha152x_bus_reset,	\
+		  .eh_host_reset_handler	= aha152x_host_reset,	\
+                  .release			= aha152x_release,	\
+                  .bios_param			= aha152x_biosparam,	\
+                  .can_queue			= 1,			\
+                  .this_id			= 7,			\
+                  .sg_tablesize			= SG_ALL,			\
+                  .cmd_per_lun			= 1,			\
+                  .present			= 0,			\
+                  .unchecked_isa_dma		= 0,			\
+                  .use_clustering		= DISABLE_CLUSTERING }
 #endif
 
 
diff -Nru a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
--- a/drivers/scsi/aha1542.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/aha1542.h	Sun Dec 15 18:08:29 2002
@@ -151,21 +151,21 @@
 	#define NULL 0
 #endif
 
-#define AHA1542 {    proc_name:			"aha1542",		\
-		     name:			"Adaptec 1542", 	\
-		     detect:			aha1542_detect,		\
-		     command:			aha1542_command,	\
-		     queuecommand:		aha1542_queuecommand,	\
-		     eh_abort_handler:		aha1542_abort,		\
-		     eh_device_reset_handler:	aha1542_dev_reset,	\
-		     eh_bus_reset_handler:	aha1542_bus_reset,	\
-		     eh_host_reset_handler:	aha1542_host_reset,	\
-		     bios_param:		aha1542_biosparam,      \
-		     can_queue:			AHA1542_MAILBOXES, 	\
-		     this_id:			7, 			\
-		     sg_tablesize:		AHA1542_SCATTER, 	\
-		     cmd_per_lun:		AHA1542_CMDLUN, 	\
-		     unchecked_isa_dma:		1, 			\
-		     use_clustering:		ENABLE_CLUSTERING	\
+#define AHA1542 {    .proc_name			= "aha1542",		\
+		     .name			= "Adaptec 1542", 	\
+		     .detect			= aha1542_detect,		\
+		     .command			= aha1542_command,	\
+		     .queuecommand		= aha1542_queuecommand,	\
+		     .eh_abort_handler		= aha1542_abort,		\
+		     .eh_device_reset_handler	= aha1542_dev_reset,	\
+		     .eh_bus_reset_handler	= aha1542_bus_reset,	\
+		     .eh_host_reset_handler	= aha1542_host_reset,	\
+		     .bios_param		= aha1542_biosparam,      \
+		     .can_queue			= AHA1542_MAILBOXES, 	\
+		     .this_id			= 7, 			\
+		     .sg_tablesize		= AHA1542_SCATTER, 	\
+		     .cmd_per_lun		= AHA1542_CMDLUN, 	\
+		     .unchecked_isa_dma		= 1, 			\
+		     .use_clustering		= ENABLE_CLUSTERING	\
 }
 #endif
diff -Nru a/drivers/scsi/aha1740.h b/drivers/scsi/aha1740.h
--- a/drivers/scsi/aha1740.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/aha1740.h	Sun Dec 15 18:08:29 2002
@@ -162,17 +162,17 @@
 #define AHA1740_SCATTER 16
 #define AHA1740_CMDLUN 1
 
-#define AHA1740 {  proc_name:      "aha1740",				\
-		   proc_info:      aha1740_proc_info,	                \
-		   name:           "Adaptec 174x (EISA)",		\
-		   detect:         aha1740_detect,			\
-		   command:        aha1740_command,			\
-		   queuecommand:   aha1740_queuecommand,		\
-		   bios_param:     aha1740_biosparam,                   \
-		   can_queue:      AHA1740_ECBS, 			\
-		   this_id:        7, 					\
-		   sg_tablesize:   AHA1740_SCATTER, 			\
-		   cmd_per_lun:    AHA1740_CMDLUN, 			\
-		   use_clustering: ENABLE_CLUSTERING}
+#define AHA1740 {  .proc_name      = "aha1740",				\
+		   .proc_info      = aha1740_proc_info,	                \
+		   .name           = "Adaptec 174x (EISA)",		\
+		   .detect         = aha1740_detect,			\
+		   .command        = aha1740_command,			\
+		   .queuecommand   = aha1740_queuecommand,		\
+		   .bios_param     = aha1740_biosparam,                   \
+		   .can_queue      = AHA1740_ECBS, 			\
+		   .this_id        = 7, 					\
+		   .sg_tablesize   = AHA1740_SCATTER, 			\
+		   .cmd_per_lun    = AHA1740_CMDLUN, 			\
+		   .use_clustering = ENABLE_CLUSTERING}
 
 #endif
diff -Nru a/drivers/scsi/amiga7xx.h b/drivers/scsi/amiga7xx.h
--- a/drivers/scsi/amiga7xx.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/amiga7xx.h	Sun Dec 15 18:08:32 2002
@@ -24,15 +24,15 @@
 
 #include <scsi/scsicam.h>
 
-#define AMIGA7XX_SCSI {name:                "Amiga NCR53c710 SCSI", \
-		       detect:              amiga7xx_detect,    \
-		       queuecommand:        NCR53c7xx_queue_command, \
-		       abort:               NCR53c7xx_abort,   \
-		       reset:               NCR53c7xx_reset,   \
-		       can_queue:           24,       \
-		       this_id:             7,               \
-		       sg_tablesize:        63,          \
-		       cmd_per_lun:	    3,     \
-		       use_clustering:      DISABLE_CLUSTERING }
+#define AMIGA7XX_SCSI {.name                = "Amiga NCR53c710 SCSI", \
+		       .detect              = amiga7xx_detect,    \
+		       .queuecommand        = NCR53c7xx_queue_command, \
+		       .abort               = NCR53c7xx_abort,   \
+		       .reset               = NCR53c7xx_reset,   \
+		       .can_queue           = 24,       \
+		       .this_id             = 7,               \
+		       .sg_tablesize        = 63,          \
+		       .cmd_per_lun	    = 3,     \
+		       .use_clustering      = DISABLE_CLUSTERING }
 
 #endif /* AMIGA7XX_H */
diff -Nru a/drivers/scsi/atari_scsi.h b/drivers/scsi/atari_scsi.h
--- a/drivers/scsi/atari_scsi.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/atari_scsi.h	Sun Dec 15 18:08:29 2002
@@ -51,19 +51,19 @@
 #define	DEFAULT_USE_TAGGED_QUEUING	0
 
 
-#define ATARI_SCSI {    proc_info:         atari_scsi_proc_info,	\
-			name:              "Atari native SCSI",		\
-			detect:            atari_scsi_detect,		\
-			release:           atari_scsi_release,		\
-			info:              atari_scsi_info,		\
-			queuecommand:      atari_scsi_queue_command,	\
-			abort:             atari_scsi_abort,		\
-			reset:             atari_scsi_reset,		\
-			can_queue:         0, /* initialized at run-time */	\
-			this_id:           0, /* initialized at run-time */	\
-			sg_tablesize:      0, /* initialized at run-time */	\
-			cmd_per_lun:       0, /* initialized at run-time */	\
-			use_clustering:	   DISABLE_CLUSTERING }
+#define ATARI_SCSI {    .proc_info         = atari_scsi_proc_info,	\
+			.name              = "Atari native SCSI",		\
+			.detect            = atari_scsi_detect,		\
+			.release           = atari_scsi_release,		\
+			.info              = atari_scsi_info,		\
+			.queuecommand      = atari_scsi_queue_command,	\
+			.abort             = atari_scsi_abort,		\
+			.reset             = atari_scsi_reset,		\
+			.can_queue         = 0, /* initialized at run-time */	\
+			.this_id           = 0, /* initialized at run-time */	\
+			.sg_tablesize      = 0, /* initialized at run-time */	\
+			.cmd_per_lun       = 0, /* initialized at run-time */	\
+			.use_clustering	   = DISABLE_CLUSTERING }
 
 #define	NCR5380_implementation_fields	/* none */
 
diff -Nru a/drivers/scsi/atp870u.h b/drivers/scsi/atp870u.h
--- a/drivers/scsi/atp870u.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/atp870u.h	Sun Dec 15 18:08:28 2002
@@ -38,21 +38,21 @@
 extern int atp870u_proc_info(char *, char **, off_t, int, int, int);
 
 #define ATP870U {						\
-	proc_info: atp870u_proc_info,				\
-	detect: atp870u_detect, 				\
-	release: atp870u_release,				\
-	info: atp870u_info,					\
-	command: atp870u_command,				\
-	queuecommand: atp870u_queuecommand,			\
-	eh_abort_handler: atp870u_abort, 			\
-	bios_param: atp870u_biosparam,				\
-	can_queue: qcnt,	 /* max simultaneous cmds      */\
-	this_id: 7,	       /* scsi id of host adapter    */\
-	sg_tablesize: ATP870U_SCATTER,	/* max scatter-gather cmds    */\
-	cmd_per_lun: ATP870U_CMDLUN,	/* cmds per lun (linked cmds) */\
-	present: 0,		/* number of 7xxx's present   */\
-	unchecked_isa_dma: 0,	/* no memory DMA restrictions */\
-	use_clustering: ENABLE_CLUSTERING,			\
+	.proc_info = atp870u_proc_info,				\
+	.detect = atp870u_detect, 				\
+	.release = atp870u_release,				\
+	.info = atp870u_info,					\
+	.command = atp870u_command,				\
+	.queuecommand = atp870u_queuecommand,			\
+	.eh_abort_handler = atp870u_abort, 			\
+	.bios_param = atp870u_biosparam,				\
+	.can_queue = qcnt,	 /* max simultaneous cmds      */\
+	.this_id = 7,	       /* scsi id of host adapter    */\
+	.sg_tablesize = ATP870U_SCATTER,	/* max scatter-gather cmds    */\
+	.cmd_per_lun = ATP870U_CMDLUN,	/* cmds per lun (linked cmds) */\
+	.present = 0,		/* number of 7xxx's present   */\
+	.unchecked_isa_dma = 0,	/* no memory DMA restrictions */\
+	.use_clustering = ENABLE_CLUSTERING,			\
 }
 
 #endif
diff -Nru a/drivers/scsi/blz1230.h b/drivers/scsi/blz1230.h
--- a/drivers/scsi/blz1230.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/blz1230.h	Sun Dec 15 18:08:31 2002
@@ -57,19 +57,19 @@
 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
 			 int hostno, int inout);
 
-#define SCSI_BLZ1230      { proc_name:		"esp-blz1230", \
-			    proc_info:		esp_proc_info, \
-			    name:		"Blizzard1230 SCSI IV", \
-			    detect:		blz1230_esp_detect, \
-			    release:		blz1230_esp_release, \
-			    command:		esp_command, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	ENABLE_CLUSTERING }
+#define SCSI_BLZ1230      { .proc_name		= "esp-blz1230", \
+			    .proc_info		= esp_proc_info, \
+			    .name		= "Blizzard1230 SCSI IV", \
+			    .detect		= blz1230_esp_detect, \
+			    .release		= blz1230_esp_release, \
+			    .command		= esp_command, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= ENABLE_CLUSTERING }
 
 #endif /* BLZ1230_H */
diff -Nru a/drivers/scsi/blz2060.h b/drivers/scsi/blz2060.h
--- a/drivers/scsi/blz2060.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/blz2060.h	Sun Dec 15 18:08:29 2002
@@ -53,18 +53,18 @@
 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
 			 int hostno, int inout);
 
-#define SCSI_BLZ2060      { proc_name:		"esp-blz2060", \
-			    proc_info:		esp_proc_info, \
-			    name:		"Blizzard2060 SCSI", \
-			    detect:		blz2060_esp_detect, \
-			    release:		blz2060_esp_release, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	ENABLE_CLUSTERING }
+#define SCSI_BLZ2060      { .proc_name		= "esp-blz2060", \
+			    .proc_info		= esp_proc_info, \
+			    .name		= "Blizzard2060 SCSI", \
+			    .detect		= blz2060_esp_detect, \
+			    .release		= blz2060_esp_release, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= ENABLE_CLUSTERING }
 
 #endif /* BLZ2060_H */
diff -Nru a/drivers/scsi/bvme6000.h b/drivers/scsi/bvme6000.h
--- a/drivers/scsi/bvme6000.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/bvme6000.h	Sun Dec 15 18:08:31 2002
@@ -25,15 +25,15 @@
 
 #include <scsi/scsicam.h>
 
-#define BVME6000_SCSI  {name:                "BVME6000 NCR53c710 SCSI", \
-		       detect:              bvme6000_scsi_detect,    \
-		       queuecommand:        NCR53c7xx_queue_command, \
-		       abort:               NCR53c7xx_abort,   \
-		       reset:               NCR53c7xx_reset,   \
-		       can_queue:           24,       \
-		       this_id:             7,               \
-		       sg_tablesize:        63,          \
-		       cmd_per_lun:	    3,     \
-		       use_clustering:      DISABLE_CLUSTERING }
+#define BVME6000_SCSI  {.name                = "BVME6000 NCR53c710 SCSI", \
+		       .detect              = bvme6000_scsi_detect,    \
+		       .queuecommand        = NCR53c7xx_queue_command, \
+		       .abort               = NCR53c7xx_abort,   \
+		       .reset               = NCR53c7xx_reset,   \
+		       .can_queue           = 24,       \
+		       .this_id             = 7,               \
+		       .sg_tablesize        = 63,          \
+		       .cmd_per_lun	    = 3,     \
+		       .use_clustering      = DISABLE_CLUSTERING }
 
 #endif /* BVME6000_SCSI_H */
diff -Nru a/drivers/scsi/cpqfcTS.h b/drivers/scsi/cpqfcTS.h
--- a/drivers/scsi/cpqfcTS.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/cpqfcTS.h	Sun Dec 15 18:08:29 2002
@@ -21,22 +21,22 @@
 // limited only by available physical memory) we use SG_ALL.
 
 #define CPQFCTS {                                \
- detect:                 cpqfcTS_detect,         \
- release:                cpqfcTS_release,        \
- info:                   cpqfcTS_info,           \
- proc_info:              cpqfcTS_proc_info,      \
- ioctl:                  cpqfcTS_ioctl,          \
- queuecommand:           cpqfcTS_queuecommand,   \
- eh_device_reset_handler:   cpqfcTS_eh_device_reset,   \
- eh_abort_handler:       cpqfcTS_eh_abort,       \
- bios_param:             cpqfcTS_biosparam,      \
- can_queue:              CPQFCTS_REQ_QUEUE_LEN,  \
- this_id:                -1,                     \
- sg_tablesize:           SG_ALL,                 \
- cmd_per_lun:            CPQFCTS_CMD_PER_LUN,    \
- present:                0,                      \
- unchecked_isa_dma:      0,                      \
- use_clustering:         ENABLE_CLUSTERING,      \
+ .detect                 = cpqfcTS_detect,         \
+ .release                = cpqfcTS_release,        \
+ .info                   = cpqfcTS_info,           \
+ .proc_info              = cpqfcTS_proc_info,      \
+ .ioctl                  = cpqfcTS_ioctl,          \
+ .queuecommand           = cpqfcTS_queuecommand,   \
+ .eh_device_reset_handler   = cpqfcTS_eh_device_reset,   \
+ .eh_abort_handler       = cpqfcTS_eh_abort,       \
+ .bios_param             = cpqfcTS_biosparam,      \
+ .can_queue              = CPQFCTS_REQ_QUEUE_LEN,  \
+ .this_id                = -1,                     \
+ .sg_tablesize           = SG_ALL,                 \
+ .cmd_per_lun            = CPQFCTS_CMD_PER_LUN,    \
+ .present                = 0,                      \
+ .unchecked_isa_dma      = 0,                      \
+ .use_clustering         = ENABLE_CLUSTERING,      \
 }
 
 #endif /* CPQFCTS_H */ 
diff -Nru a/drivers/scsi/cyberstorm.h b/drivers/scsi/cyberstorm.h
--- a/drivers/scsi/cyberstorm.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/cyberstorm.h	Sun Dec 15 18:08:28 2002
@@ -56,18 +56,18 @@
 			 int hostno, int inout);
 
 
-#define SCSI_CYBERSTORM   { proc_name:		"esp-cyberstorm", \
-			    proc_info:		esp_proc_info, \
-			    name:		"CyberStorm SCSI", \
-			    detect:		cyber_esp_detect, \
-			    release:		cyber_esp_release, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	ENABLE_CLUSTERING }
+#define SCSI_CYBERSTORM   { .proc_name		= "esp-cyberstorm", \
+			    .proc_info		= esp_proc_info, \
+			    .name		= "CyberStorm SCSI", \
+			    .detect		= cyber_esp_detect, \
+			    .release		= cyber_esp_release, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= ENABLE_CLUSTERING }
 
 #endif /* CYBER_ESP_H */
diff -Nru a/drivers/scsi/cyberstormII.h b/drivers/scsi/cyberstormII.h
--- a/drivers/scsi/cyberstormII.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/cyberstormII.h	Sun Dec 15 18:08:28 2002
@@ -43,18 +43,18 @@
 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
 			 int hostno, int inout);
 
-#define SCSI_CYBERSTORMII { proc_name:		"esp-cyberstormII", \
-			    proc_info:		esp_proc_info, \
-			    name:		"CyberStorm Mk II SCSI", \
-			    detect:		cyberII_esp_detect, \
-			    release:		cyberII_esp_release, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	ENABLE_CLUSTERING }
+#define SCSI_CYBERSTORMII { .proc_name		= "esp-cyberstormII", \
+			    .proc_info		= esp_proc_info, \
+			    .name		= "CyberStorm Mk II SCSI", \
+			    .detect		= cyberII_esp_detect, \
+			    .release		= cyberII_esp_release, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= ENABLE_CLUSTERING }
 
 #endif /* CYBERII_ESP_H */
diff -Nru a/drivers/scsi/dc390.h b/drivers/scsi/dc390.h
--- a/drivers/scsi/dc390.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/dc390.h	Sun Dec 15 18:08:28 2002
@@ -52,41 +52,41 @@
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30)
 #define DC390_T    {					\
-   proc_name:      "tmscsim",                           \
-   proc_info:      DC390_proc_info,			\
-   name:           DC390_BANNER " V" DC390_VERSION,	\
-   detect:         DC390_detect,			\
-   release:        DC390_release,			\
-   queuecommand:   DC390_queue_command,			\
-   abort:          DC390_abort,				\
-   reset:          DC390_reset,				\
-   bios_param:     DC390_bios_param,			\
-   can_queue:      42,					\
-   this_id:        7,					\
-   sg_tablesize:   SG_ALL,				\
-   cmd_per_lun:    16,					\
-   unchecked_isa_dma: 0,				\
-   use_clustering: DISABLE_CLUSTERING			\
+   .proc_name      = "tmscsim",                           \
+   .proc_info      = DC390_proc_info,			\
+   .name           = DC390_BANNER " V" DC390_VERSION,	\
+   .detect         = DC390_detect,			\
+   .release        = DC390_release,			\
+   .queuecommand   = DC390_queue_command,			\
+   .abort          = DC390_abort,				\
+   .reset          = DC390_reset,				\
+   .bios_param     = DC390_bios_param,			\
+   .can_queue      = 42,					\
+   .this_id        = 7,					\
+   .sg_tablesize   = SG_ALL,				\
+   .cmd_per_lun    = 16,					\
+   .unchecked_isa_dma = 0,				\
+   .use_clustering = DISABLE_CLUSTERING			\
    }
 #else
 extern struct proc_dir_entry DC390_proc_scsi_tmscsim;
 #define DC390_T    {					\
-   proc_dir:       &DC390_proc_scsi_tmscsim,		\
-   proc_info:      DC390_proc_info,			\
-   name:           DC390_BANNER " V" DC390_VERSION,	\
-   detect:         DC390_detect,			\
-   release:        DC390_release,			\
-   queuecommand:   DC390_queue_command,			\
-   abort:          DC390_abort,				\
-   reset:          DC390_reset,				\
-   bios_param:     DC390_bios_param,			\
-   can_queue:      42,					\
-   this_id:        7,					\
-   sg_tablesize:   SG_ALL,				\
-   cmd_per_lun:    16,					\
+   .proc_dir       = &DC390_proc_scsi_tmscsim,		\
+   .proc_info      = DC390_proc_info,			\
+   .name           = DC390_BANNER " V" DC390_VERSION,	\
+   .detect         = DC390_detect,			\
+   .release        = DC390_release,			\
+   .queuecommand   = DC390_queue_command,			\
+   .abort          = DC390_abort,				\
+   .reset          = DC390_reset,				\
+   .bios_param     = DC390_bios_param,			\
+   .can_queue      = 42,					\
+   .this_id        = 7,					\
+   .sg_tablesize   = SG_ALL,				\
+   .cmd_per_lun    = 16,					\
    NEW_EH						\
-   unchecked_isa_dma: 0,				\
-   use_clustering: DISABLE_CLUSTERING			\
+   .unchecked_isa_dma = 0,				\
+   .use_clustering = DISABLE_CLUSTERING			\
    }
 #endif
 #endif /* defined(HOSTS_C) || defined(MODULE) */
diff -Nru a/drivers/scsi/dec_esp.h b/drivers/scsi/dec_esp.h
--- a/drivers/scsi/dec_esp.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/dec_esp.h	Sun Dec 15 18:08:28 2002
@@ -27,19 +27,19 @@
 			 int hostno, int inout);
 
 #define SCSI_DEC_ESP {                                         \
-		proc_name:      "esp",				\
-		proc_info:      &esp_proc_info,			\
-		name:           "NCR53C94",			\
-		detect:         dec_esp_detect,			\
-		info:           esp_info,			\
-		command:        esp_command,			\
-		queuecommand:   esp_queue,			\
-		abort:          esp_abort,			\
-		reset:          esp_reset,			\
-		can_queue:      7,				\
-		this_id:        7,				\
-		sg_tablesize:   SG_ALL,				\
-		cmd_per_lun:    1,				\
-		use_clustering: DISABLE_CLUSTERING, }
+		.proc_name      = "esp",				\
+		.proc_info      = &esp_proc_info,			\
+		.name           = "NCR53C94",			\
+		.detect         = dec_esp_detect,			\
+		.info           = esp_info,			\
+		.command        = esp_command,			\
+		.queuecommand   = esp_queue,			\
+		.abort          = esp_abort,			\
+		.reset          = esp_reset,			\
+		.can_queue      = 7,				\
+		.this_id        = 7,				\
+		.sg_tablesize   = SG_ALL,				\
+		.cmd_per_lun    = 1,				\
+		.use_clustering = DISABLE_CLUSTERING, }
 
 #endif /* DEC_ESP_H */
diff -Nru a/drivers/scsi/dmx3191d.h b/drivers/scsi/dmx3191d.h
--- a/drivers/scsi/dmx3191d.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/dmx3191d.h	Sun Dec 15 18:08:29 2002
@@ -32,22 +32,22 @@
 
 
 #define DMX3191D {				\
-	proc_info:	dmx3191d_proc_info,		\
-	name:		"Domex DMX3191D",		\
-	detect:		dmx3191d_detect,		\
-	release:	dmx3191d_release_resources,	\
-	info:		dmx3191d_info,			\
-	queuecommand:	dmx3191d_queue_command,		\
-	eh_abort_handler:	dmx3191d_abort,		\
-	eh_bus_reset_handler:	dmx3191d_bus_reset, 	\
-	eh_device_reset_handler:dmx3191d_device_reset, 	\
-	eh_host_reset_handler:	dmx3191d_host_reset, 	\
-	bios_param:	NULL,				\
-	can_queue:	32,				\
-        this_id:	7,				\
-        sg_tablesize:	SG_ALL,				\
-	cmd_per_lun:	2,				\
-        use_clustering:	DISABLE_CLUSTERING		\
+	.proc_info	= dmx3191d_proc_info,		\
+	.name		= "Domex DMX3191D",		\
+	.detect		= dmx3191d_detect,		\
+	.release	= dmx3191d_release_resources,	\
+	.info		= dmx3191d_info,			\
+	.queuecommand	= dmx3191d_queue_command,		\
+	.eh_abort_handler	= dmx3191d_abort,		\
+	.eh_bus_reset_handler	= dmx3191d_bus_reset, 	\
+	.eh_device_reset_handler = dmx3191d_device_reset, 	\
+	.eh_host_reset_handler	= dmx3191d_host_reset, 	\
+	.bios_param	= NULL,				\
+	.can_queue	= 32,				\
+        .this_id	= 7,				\
+        .sg_tablesize	= SG_ALL,				\
+	.cmd_per_lun	= 2,				\
+        .use_clustering	= DISABLE_CLUSTERING		\
 }
 
 
diff -Nru a/drivers/scsi/dpti.h b/drivers/scsi/dpti.h
--- a/drivers/scsi/dpti.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/dpti.h	Sun Dec 15 18:08:28 2002
@@ -62,44 +62,44 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,00)
 #define DPT_I2O { \
-	proc_info: adpt_proc_info,					\
-	detect: adpt_detect,						\
-	release: adpt_release,						\
-	info: adpt_info,						\
-	queuecommand: adpt_queue,					\
-	eh_abort_handler: adpt_abort,					\
-	eh_device_reset_handler: adpt_device_reset,			\
-	eh_bus_reset_handler: adpt_bus_reset,				\
-	eh_host_reset_handler: adpt_reset,				\
-	bios_param: adpt_bios_param,					\
-	can_queue: MAX_TO_IOP_MESSAGES ,/* max simultaneous cmds      */\
-	this_id: 7,			/* scsi id of host adapter    */\
-	sg_tablesize: 0,		/* max scatter-gather cmds    */\
-	cmd_per_lun: 256,		/* cmds per lun (linked cmds) */\
-	use_clustering: ENABLE_CLUSTERING,				\
-	use_new_eh_code: 1						\
+	.proc_info = adpt_proc_info,					\
+	.detect = adpt_detect,						\
+	.release = adpt_release,						\
+	.info = adpt_info,						\
+	.queuecommand = adpt_queue,					\
+	.eh_abort_handler = adpt_abort,					\
+	.eh_device_reset_handler = adpt_device_reset,			\
+	.eh_bus_reset_handler = adpt_bus_reset,				\
+	.eh_host_reset_handler = adpt_reset,				\
+	.bios_param = adpt_bios_param,					\
+	.can_queue = MAX_TO_IOP_MESSAGES ,/* max simultaneous cmds      */\
+	.this_id = 7,			/* scsi id of host adapter    */\
+	.sg_tablesize = 0,		/* max scatter-gather cmds    */\
+	.cmd_per_lun = 256,		/* cmds per lun (linked cmds) */\
+	.use_clustering = ENABLE_CLUSTERING,				\
+	.use_new_eh_code = 1						\
 }
 
 #else				/* KERNEL_VERSION > 2.2.16 */
 
 #define DPT_I2O { \
-	proc_info: adpt_proc_info,					\
-	detect: adpt_detect,						\
-	release: adpt_release,						\
-	info: adpt_info,						\
-	queuecommand: adpt_queue,					\
-	eh_abort_handler: adpt_abort,					\
-	eh_device_reset_handler: adpt_device_reset,			\
-	eh_bus_reset_handler: adpt_bus_reset,				\
-	eh_host_reset_handler: adpt_reset,				\
-	bios_param: adpt_bios_param,					\
-	slave_configure: adpt_slave_configure,				\
-	can_queue: MAX_TO_IOP_MESSAGES,	/* max simultaneous cmds      */\
-	this_id: 7,			/* scsi id of host adapter    */\
-	sg_tablesize: 0,		/* max scatter-gather cmds    */\
-	cmd_per_lun: 1,			/* cmds per lun (linked cmds) */\
-	use_clustering: ENABLE_CLUSTERING,				\
-	proc_name: "dpt_i2o"	/* this is the name of our proc node*/	\
+	.proc_info = adpt_proc_info,					\
+	.detect = adpt_detect,						\
+	.release = adpt_release,						\
+	.info = adpt_info,						\
+	.queuecommand = adpt_queue,					\
+	.eh_abort_handler = adpt_abort,					\
+	.eh_device_reset_handler = adpt_device_reset,			\
+	.eh_bus_reset_handler = adpt_bus_reset,				\
+	.eh_host_reset_handler = adpt_reset,				\
+	.bios_param = adpt_bios_param,					\
+	.slave_configure = adpt_slave_configure,				\
+	.can_queue = MAX_TO_IOP_MESSAGES,	/* max simultaneous cmds      */\
+	.this_id = 7,			/* scsi id of host adapter    */\
+	.sg_tablesize = 0,		/* max scatter-gather cmds    */\
+	.cmd_per_lun = 1,			/* cmds per lun (linked cmds) */\
+	.use_clustering = ENABLE_CLUSTERING,				\
+	.proc_name = "dpt_i2o"	/* this is the name of our proc node*/	\
 }
 #endif
 
diff -Nru a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h
--- a/drivers/scsi/dtc.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/dtc.h	Sun Dec 15 18:08:28 2002
@@ -54,19 +54,19 @@
  */
 
 #define DTC3x80 {						\
-	name:				"DTC 3180/3280 ",	\
-	detect:				dtc_detect,		\
-	queuecommand:			dtc_queue_command,	\
-	eh_abort_handler:		dtc_abort,		\
-	eh_bus_reset_handler:		dtc_bus_reset,		\
-	eh_device_reset_handler:	dtc_device_reset,	\
-	eh_host_reset_handler:          dtc_host_reset,		\
-	bios_param:     dtc_biosparam,				\
-	can_queue:      CAN_QUEUE,				\
-	this_id:        7,					\
-	sg_tablesize:   SG_ALL,					\
-	cmd_per_lun:    CMD_PER_LUN ,				\
-	use_clustering: DISABLE_CLUSTERING}
+	.name				= "DTC 3180/3280 ",	\
+	.detect				= dtc_detect,		\
+	.queuecommand			= dtc_queue_command,	\
+	.eh_abort_handler		= dtc_abort,		\
+	.eh_bus_reset_handler		= dtc_bus_reset,		\
+	.eh_device_reset_handler	= dtc_device_reset,	\
+	.eh_host_reset_handler          = dtc_host_reset,		\
+	.bios_param     = dtc_biosparam,				\
+	.can_queue      = CAN_QUEUE,				\
+	.this_id        = 7,					\
+	.sg_tablesize   = SG_ALL,					\
+	.cmd_per_lun    = CMD_PER_LUN ,				\
+	.use_clustering = DISABLE_CLUSTERING}
 
 #define NCR5380_implementation_fields \
     unsigned int base
diff -Nru a/drivers/scsi/eata.c b/drivers/scsi/eata.c
--- a/drivers/scsi/eata.c	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/eata.c	Sun Dec 15 18:08:31 2002
@@ -1,6 +1,12 @@
 /*
  *      eata.c - Low-level driver for EATA/DMA SCSI host adapters.
  *
+ *      12 Nov 2002 Rev. 8.02 for linux 2.5.47
+ *        + Release driver_lock before calling scsi_register.
+ *
+ *      11 Nov 2002 Rev. 8.01 for linux 2.5.47
+ *        + Fixed bios_param and scsicam_bios_param calling parameters.
+ *
  *      28 Oct 2002 Rev. 8.00 for linux 2.5.44-ac4
  *        + Use new tcq and adjust_queue_depth api.
  *        + New command line option (tm:[0-2]) to choose the type of tags:
@@ -460,6 +466,9 @@
 MODULE_PARM(tag_mode, "i");
 MODULE_PARM(ext_tran, "i");
 MODULE_PARM(rev_scan, "i");
+MODULE_PARM(isa_probe, "i");
+MODULE_PARM(eisa_probe, "i");
+MODULE_PARM(pci_probe, "i");
 MODULE_AUTHOR("Dario Ballabio");
 
 #endif
@@ -548,7 +557,7 @@
 #define REG_LM          3
 #define REG_MID         4
 #define REG_MSB         5
-#define REGION_SIZE     9
+#define REGION_SIZE     9UL
 #define MAX_ISA_ADDR    0x03ff
 #define MIN_EISA_ADDR   0x1c88
 #define MAX_EISA_ADDR   0xfc88
@@ -572,7 +581,7 @@
 #define TLDEV(type) ((type) == TYPE_DISK || (type) == TYPE_ROM)
 
 /* "EATA", in Big Endian format */
-#define EATA_SIGNATURE 0x41544145
+#define EATA_SIG_BE 0x45415441
 
 /* Number of valid bytes in the board config structure for EATA 2.0x */
 #define EATA_2_0A_SIZE 28
@@ -583,6 +592,12 @@
 struct eata_info {
    u_int32_t data_len;  /* Number of valid bytes after this field */
    u_int32_t sign;      /* ASCII "EATA" signature */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar version:4, :4;
+   unchar  haaval:1, ata:1, drqvld:1, dmasup:1, morsup:1, trnxfr:1, tarsup:1,
+           ocsena:1;
+#else
    unchar        :4,    /* unused low nibble */
           version:4;    /* EATA version, should be 0x1 */
    unchar  ocsena:1,    /* Overlap Command Support Enabled */
@@ -593,6 +608,8 @@
            drqvld:1,    /* DRQ Index (DRQX) is valid */
               ata:1,    /* This is an ATA device */
            haaval:1;    /* Host Adapter Address Valid */
+#endif
+
    ushort cp_pad_len;   /* Number of pad bytes after cp_len */
    unchar host_addr[4]; /* Host Adapter SCSI ID for channels 3, 2, 1, 0 */
    u_int32_t cp_len;    /* Number of valid bytes in cp */
@@ -600,6 +617,15 @@
    ushort queue_size;   /* Max number of cp that can be queued */
    ushort unused;
    ushort scatt_size;   /* Max number of entries in scatter/gather table */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar    drqx:2, second:1, irq_tr:1, irq:4;
+   unchar  sync;
+   unchar         :4, res1:1, large_sg:1, forcaddr:1, isaena:1;
+   unchar max_chan:3, max_id:5;
+   unchar   max_lun;
+   unchar     eisa:1, pci:1, idquest:1, m1:1, :4;
+#else
    unchar     irq:4,    /* Interrupt Request assigned to this controller */
            irq_tr:1,    /* 0 for edge triggered, 1 for level triggered */
            second:1,    /* 1 if this is a secondary (not primary) controller */
@@ -622,6 +648,8 @@
           idquest:1,    /* RAIDNUM returned is questionable */
               pci:1,    /* This board is PCI */
              eisa:1;    /* This board is EISA */
+#endif
+
    unchar   raidnum;    /* Uniquely identifies this HBA in a system */
    unchar   notused;
 
@@ -631,18 +659,30 @@
 /* Board config structure */
 struct eata_config {
    ushort len;          /* Number of bytes following this field */
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar     :4, tarena:1, mdpena:1, ocena:1, edis:1;
+#else
    unchar edis:1,       /* Disable EATA interface after config command */
          ocena:1,       /* Overlapped Commands Enabled */
         mdpena:1,       /* Transfer all Modified Data Pointer Messages */
         tarena:1,       /* Target Mode Enabled for this controller */
               :4;
+#endif
+
    unchar cpad[511];
    };
 
 /* Returned status packet structure */
 struct mssp {
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar            eoc:1, adapter_status:7;
+#else
    unchar adapter_status:7,    /* State related to current command */
                      eoc:1;    /* End Of Command (1 = command completed) */
+#endif
+
    unchar target_status;       /* SCSI status received after data transfer */
    unchar unused[2];
    u_int32_t inv_res_len;      /* Number of bytes not transferred */
@@ -657,6 +697,16 @@
 
 /* MailBox SCSI Command Packet */
 struct mscp {
+
+#if defined(__BIG_ENDIAN_BITFIELD)
+   unchar     din:1, dout:1, interp:1, :1, sg:1, reqsen:1, init:1, sreset:1;
+   unchar sense_len;
+   unchar unused[3];
+   unchar        :7, fwnest:1;
+   unchar        :5, hbaci:1, iat:1, phsunit:1;
+   unchar channel:3, target:5;
+   unchar     one:1, dispri:1, luntar:1, lun:5;
+#else
    unchar  sreset:1,     /* SCSI Bus Reset Signal should be asserted */
              init:1,     /* Re-initialize controller and self test */
            reqsen:1,     /* Transfer Request Sense Data to addr using DMA */
@@ -679,6 +729,8 @@
            luntar:1,     /* This cp is for Target (not LUN) */
            dispri:1,     /* Disconnect Privilege granted */
               one:1;     /* 1 */
+#endif
+
    unchar mess[3];       /* Massage to/from Target */
    unchar cdb[12];       /* Command Descriptor Block */
    u_int32_t data_len;   /* If sg=0 Data Length, if sg=1 sglist length */
@@ -755,8 +807,13 @@
 #define BN(board) (HD(board)->board_name)
 
 /* Device is Big Endian */
-#define H2DEV(x) cpu_to_be32(x)
-#define DEV2H(x) be32_to_cpu(x)
+#define H2DEV(x)   cpu_to_be32(x)
+#define DEV2H(x)   be32_to_cpu(x)
+#define H2DEV16(x) cpu_to_be16(x)
+#define DEV2H16(x) be16_to_cpu(x)
+
+/* But transfer orientation from the 16 bit data register is Little Endian */
+#define REG2H(x)   le16_to_cpu(x)
 
 static void do_interrupt_handler(int, void *, struct pt_regs *);
 static void flush_dev(Scsi_Device *, unsigned long, unsigned int, unsigned int);
@@ -893,7 +950,7 @@
          }
 
       loop = MAXLOOP;
-      *p = inw(iobase);
+      *p = REG2H(inw(iobase));
       }
 
    return FALSE;
@@ -970,31 +1027,48 @@
       }
 
    if (do_dma(port_base, 0, READ_CONFIG_PIO)) {
+#if defined(DEBUG_DETECT)
+      printk("%s: detect, do_dma failed at 0x%03lx.\n", name, port_base);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
    /* Read the info structure */
    if (read_pio(port_base, (ushort *)&info, (ushort *)&info.ipad[0])) {
+#if defined(DEBUG_DETECT)
+      printk("%s: detect, read_pio failed at 0x%03lx.\n", name, port_base);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
+   info.data_len = DEV2H(info.data_len);
+   info.sign = DEV2H(info.sign);
+   info.cp_pad_len = DEV2H16(info.cp_pad_len);
+   info.cp_len = DEV2H(info.cp_len);
+   info.sp_len = DEV2H(info.sp_len);
+   info.scatt_size = DEV2H16(info.scatt_size);
+   info.queue_size = DEV2H16(info.queue_size);
+
    /* Check the controller "EATA" signature */
-   if (info.sign != EATA_SIGNATURE) {
+   if (info.sign != EATA_SIG_BE) {
+#if defined(DEBUG_DETECT)
+      printk("%s: signature 0x%04x discarded.\n", name, info.sign);
+#endif
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
 
-   if (DEV2H(info.data_len) < EATA_2_0A_SIZE) {
+   if (info.data_len < EATA_2_0A_SIZE) {
       printk("%s: config structure size (%d bytes) too short, detaching.\n",
-             name, DEV2H(info.data_len));
+             name, info.data_len);
       release_region(port_base, REGION_SIZE);
       return FALSE;
       }
-   else if (DEV2H(info.data_len) == EATA_2_0A_SIZE)
+   else if (info.data_len == EATA_2_0A_SIZE)
       protocol_rev = 'A';
-   else if (DEV2H(info.data_len) == EATA_2_0B_SIZE)
+   else if (info.data_len == EATA_2_0B_SIZE)
       protocol_rev = 'B';
    else
       protocol_rev = 'C';
@@ -1106,7 +1180,7 @@
 
    /* Set board configuration */
    memset((char *)cf, 0, sizeof(struct eata_config));
-   cf->len = (ushort) cpu_to_be16((ushort)510);
+   cf->len = (ushort) H2DEV16((ushort)510);
    cf->ocena = TRUE;
 
    if (do_dma(port_base, cf_dma_addr, SET_CONFIG_DMA)) {
@@ -1119,7 +1193,9 @@
    }
 #endif
 
+   spin_unlock(&driver_lock);
    sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
+   spin_lock(&driver_lock);
 
    if (sh[j] == NULL) {
       printk("%s: unable to register host, detaching.\n", name);
@@ -1137,9 +1213,9 @@
    sh[j]->n_io_port = REGION_SIZE;
    sh[j]->dma_channel = dma_channel;
    sh[j]->irq = irq;
-   sh[j]->sg_tablesize = (ushort) be16_to_cpu(info.scatt_size);
+   sh[j]->sg_tablesize = (ushort) info.scatt_size;
    sh[j]->this_id = (ushort) info.host_addr[3];
-   sh[j]->can_queue = (ushort) be16_to_cpu(info.queue_size);
+   sh[j]->can_queue = (ushort) info.queue_size;
    sh[j]->cmd_per_lun = MAX_CMD_PER_LUN;
    memset(HD(j), 0, sizeof(struct hostdata));
    HD(j)->subversion = subversion;
@@ -1254,8 +1330,8 @@
    printk("%s: Vers. 0x%x, ocs %u, tar %u, trnxfr %u, more %u, SYNC 0x%x, "\
           "sec. %u, infol %d, cpl %d spl %d.\n", name, info.version,
           info.ocsena, info.tarsup, info.trnxfr, info.morsup, info.sync,
-          info.second, DEV2H(info.data_len), DEV2H(info.cp_len),
-          DEV2H(info.sp_len));
+          info.second, info.data_len, info.cp_len,
+          info.sp_len);
 
    if (protocol_rev == 'B' || protocol_rev == 'C')
       printk("%s: isaena %u, forcaddr %u, max_id %u, max_chan %u, "\
@@ -1305,6 +1381,9 @@
       else if (!strncmp(cur, "ls:", 3))  link_statistics = val;
       else if (!strncmp(cur, "et:", 3))  ext_tran = val;
       else if (!strncmp(cur, "rs:", 3))  rev_scan = val;
+      else if (!strncmp(cur, "ip:", 3))  isa_probe = val;
+      else if (!strncmp(cur, "ep:", 3))  eisa_probe = val;
+      else if (!strncmp(cur, "pp:", 3))  pci_probe = val;
 
       if ((cur = strchr(cur, ','))) ++cur;
       }
@@ -1389,7 +1468,19 @@
 
    for (k = 0; k < MAX_BOARDS + 1; k++) sh[k] = NULL;
 
-   if (!setup_done) add_pci_ports();
+   for (k = MAX_INT_PARAM; io_port[k]; k++)
+      if (io_port[k] == SKIP) continue;
+      else if (io_port[k] <= MAX_ISA_ADDR) {
+         if (!isa_probe) io_port[k] = SKIP;
+         }
+      else if (io_port[k] >= MIN_EISA_ADDR && io_port[k] <= MAX_EISA_ADDR) {
+         if (!eisa_probe) io_port[k] = SKIP;
+         }
+
+   if (pci_probe) {
+      if (!setup_done) add_pci_ports();
+      else          enable_pci_ports();
+      }
 
    for (k = 0; io_port[k]; k++) {
 
@@ -1834,9 +1925,9 @@
    return SUCCESS;
 }
 
-int eata2x_bios_param(struct scsi_device *sdev, struct block_device *bdev, 
-		sector_t capacity, int *dkinfo) {
-   int size = capacity;
+int eata2x_bios_param(struct scsi_device *sdev, struct block_device *bdev,
+                      sector_t capacity, int *dkinfo) {
+   unsigned int size = capacity;
 
    if (ext_tran || (scsicam_bios_param(bdev, capacity, dkinfo) < 0)) {
       dkinfo[0] = 255;
diff -Nru a/drivers/scsi/eata.h b/drivers/scsi/eata.h
--- a/drivers/scsi/eata.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/eata.h	Sun Dec 15 18:08:28 2002
@@ -7,24 +7,24 @@
 static int eata2x_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 static int eata2x_eh_abort(Scsi_Cmnd *);
 static int eata2x_eh_host_reset(Scsi_Cmnd *);
-static int eata2x_biosparam(struct scsi_device *, struct block_device *,
-		sector_t, int *);
+static int eata2x_bios_param(struct scsi_device *, struct block_device *,
+                             sector_t, int *);
 static int eata2x_slave_configure(Scsi_Device *);
 
-#define EATA_VERSION "8.00.00"
+#define EATA_VERSION "8.03.00"
 
 #define EATA {                                                               \
-                name:              "EATA/DMA 2.0x rev. " EATA_VERSION " ",   \
-                detect:                  eata2x_detect,                      \
-                release:                 eata2x_release,                     \
-                queuecommand:            eata2x_queuecommand,                \
-                eh_abort_handler:        eata2x_eh_abort,                    \
-                eh_device_reset_handler: NULL,                               \
-                eh_bus_reset_handler:    NULL,                               \
-                eh_host_reset_handler:   eata2x_eh_host_reset,               \
-                bios_param:              eata2x_bios_param,                  \
-		slave_configure:	 eata2x_slave_configure,	     \
-                this_id:                 7,                                  \
-                unchecked_isa_dma:       1,                                  \
-                use_clustering:          ENABLE_CLUSTERING                   \
+                .name              = "EATA/DMA 2.0x rev. " EATA_VERSION " ",   \
+                .detect                  = eata2x_detect,                      \
+                .release                 = eata2x_release,                     \
+                .queuecommand            = eata2x_queuecommand,                \
+                .eh_abort_handler        = eata2x_eh_abort,                    \
+                .eh_device_reset_handler = NULL,                               \
+                .eh_bus_reset_handler    = NULL,                               \
+                .eh_host_reset_handler   = eata2x_eh_host_reset,               \
+                .bios_param              = eata2x_bios_param,                  \
+		.slave_configure	 = eata2x_slave_configure,	     \
+                .this_id                 = 7,                                  \
+                .unchecked_isa_dma       = 1,                                  \
+                .use_clustering          = ENABLE_CLUSTERING                   \
              }
diff -Nru a/drivers/scsi/eata_dma.h b/drivers/scsi/eata_dma.h
--- a/drivers/scsi/eata_dma.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/eata_dma.h	Sun Dec 15 18:08:32 2002
@@ -81,15 +81,15 @@
 #include <scsi/scsicam.h>
 
 #define EATA_DMA {                                      \
-        proc_info:         eata_proc_info,     /* procinfo       */ \
-        name:              "EATA (Extended Attachment) HBA driver", \
-        detect:            eata_detect,                 \
-        release:           eata_release,                \
-	queuecommand:      eata_queue,                  \
-	abort:             eata_abort,                  \
-	reset:             eata_reset,                  \
-	unchecked_isa_dma: 1,      /* True if ISA  */   \
-	use_clustering:    ENABLE_CLUSTERING }
+        .proc_info         = eata_proc_info,     /* procinfo       */ \
+        .name              = "EATA (Extended Attachment) HBA driver", \
+        .detect            = eata_detect,                 \
+        .release           = eata_release,                \
+	.queuecommand      = eata_queue,                  \
+	.abort             = eata_abort,                  \
+	.reset             = eata_reset,                  \
+	.unchecked_isa_dma = 1,      /* True if ISA  */   \
+	.use_clustering    = ENABLE_CLUSTERING }
 
 
 #endif /* _EATA_DMA_H */
diff -Nru a/drivers/scsi/eata_pio.h b/drivers/scsi/eata_pio.h
--- a/drivers/scsi/eata_pio.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/eata_pio.h	Sun Dec 15 18:08:32 2002
@@ -65,14 +65,14 @@
 static int eata_pio_release(struct Scsi_Host *);
 
 #define EATA_PIO {							\
-	proc_info:         	eata_pio_proc_info, /* procinfo	  */	\
-	name:              	"EATA (Extended Attachment) PIO driver",\
-	detect:            	eata_pio_detect,			\
-	release:           	eata_pio_release,			\
-	queuecommand:      	eata_pio_queue,				\
-	eh_abort_handler:  	eata_pio_abort,				\
-	eh_host_reset_handler:	eata_pio_host_reset,			\
-	use_clustering:    	ENABLE_CLUSTERING 			\
+	.proc_info         	= eata_pio_proc_info, /* procinfo	  */	\
+	.name              	= "EATA (Extended Attachment) PIO driver",\
+	.detect            	= eata_pio_detect,			\
+	.release           	= eata_pio_release,			\
+	.queuecommand      	= eata_pio_queue,				\
+	.eh_abort_handler  	= eata_pio_abort,				\
+	.eh_host_reset_handler	= eata_pio_host_reset,			\
+	.use_clustering    	= ENABLE_CLUSTERING 			\
 }
 
 #endif				/* _EATA_PIO_H */
diff -Nru a/drivers/scsi/fastlane.h b/drivers/scsi/fastlane.h
--- a/drivers/scsi/fastlane.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/fastlane.h	Sun Dec 15 18:08:29 2002
@@ -48,18 +48,18 @@
 extern int esp_proc_info(char *buffer, char **start, off_t offset, int length,
 			 int hostno, int inout);
 
-#define SCSI_FASTLANE     { proc_name:		"esp-fastlane", \
-			    proc_info:		esp_proc_info, \
-			    name:		"Fastlane SCSI", \
-			    detect:		fastlane_esp_detect, \
-			    release:		fastlane_esp_release, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	ENABLE_CLUSTERING }
+#define SCSI_FASTLANE     { .proc_name		= "esp-fastlane", \
+			    .proc_info		= esp_proc_info, \
+			    .name		= "Fastlane SCSI", \
+			    .detect		= fastlane_esp_detect, \
+			    .release		= fastlane_esp_release, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= ENABLE_CLUSTERING }
 
 #endif /* FASTLANE_H */
diff -Nru a/drivers/scsi/fcal.h b/drivers/scsi/fcal.h
--- a/drivers/scsi/fcal.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/fcal.h	Sun Dec 15 18:08:28 2002
@@ -26,21 +26,21 @@
 int fcal_slave_configure(Scsi_Device *);
 
 #define FCAL {							\
-	name:			"Fibre Channel Arbitrated Loop",\
-	detect:			fcal_detect,			\
-	release:		fcal_release,			\
-	proc_info:		fcal_proc_info,			\
-	queuecommand:		fcp_scsi_queuecommand,		\
-	slave_configure:	fcal_slave_configure,		\
-	can_queue:		FCAL_CAN_QUEUE,			\
-	this_id:		-1,				\
-	sg_tablesize:		1,				\
-	cmd_per_lun:		1,				\
-	use_clustering:		ENABLE_CLUSTERING,		\
-	eh_abort_handler:	fcp_scsi_abort,			\
-	eh_device_reset_handler:fcp_scsi_dev_reset,		\
-	eh_bus_reset_handler:	fcp_scsi_bus_reset,		\
-	eh_host_reset_handler:	fcp_scsi_host_reset,		\
+	.name			= "Fibre Channel Arbitrated Loop",\
+	.detect			= fcal_detect,			\
+	.release		= fcal_release,			\
+	.proc_info		= fcal_proc_info,			\
+	.queuecommand		= fcp_scsi_queuecommand,		\
+	.slave_configure	= fcal_slave_configure,		\
+	.can_queue		= FCAL_CAN_QUEUE,			\
+	.this_id		= -1,				\
+	.sg_tablesize		= 1,				\
+	.cmd_per_lun		= 1,				\
+	.use_clustering		= ENABLE_CLUSTERING,		\
+	.eh_abort_handler	= fcp_scsi_abort,			\
+	.eh_device_reset_handler = fcp_scsi_dev_reset,		\
+	.eh_bus_reset_handler	= fcp_scsi_bus_reset,		\
+	.eh_host_reset_handler	= fcp_scsi_host_reset,		\
 }	
 
 #endif /* !(_FCAL_H) */
diff -Nru a/drivers/scsi/fd_mcs.h b/drivers/scsi/fd_mcs.h
--- a/drivers/scsi/fd_mcs.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/fd_mcs.h	Sun Dec 15 18:08:28 2002
@@ -36,23 +36,23 @@
 static const char *fd_mcs_info(struct Scsi_Host *);
 
 #define FD_MCS {\
-                    proc_name:			"fd_mcs",		\
-                    proc_info:			fd_mcs_proc_info,	\
-		    detect:			fd_mcs_detect,		\
-		    release:			fd_mcs_release,		\
-		    info:			fd_mcs_info,		\
-		    command:			fd_mcs_command,		\
-		    queuecommand:   		fd_mcs_queue,           \
-		    eh_abort_handler:		fd_mcs_abort,           \
-		    eh_bus_reset_handler:	fd_mcs_bus_reset,       \
-		    eh_host_reset_handler:	fd_mcs_host_reset,      \
-		    eh_device_reset_handler:	fd_mcs_device_reset,    \
-		    bios_param:     		fd_mcs_biosparam,       \
-		    can_queue:      		1, 			\
-		    this_id:        		7, 			\
-		    sg_tablesize:   		64, 			\
-		    cmd_per_lun:    		1, 			\
-		    use_clustering: 		DISABLE_CLUSTERING	\
+                    .proc_name			= "fd_mcs",		\
+                    .proc_info			= fd_mcs_proc_info,	\
+		    .detect			= fd_mcs_detect,		\
+		    .release			= fd_mcs_release,		\
+		    .info			= fd_mcs_info,		\
+		    .command			= fd_mcs_command,		\
+		    .queuecommand   		= fd_mcs_queue,           \
+		    .eh_abort_handler		= fd_mcs_abort,           \
+		    .eh_bus_reset_handler	= fd_mcs_bus_reset,       \
+		    .eh_host_reset_handler	= fd_mcs_host_reset,      \
+		    .eh_device_reset_handler	= fd_mcs_device_reset,    \
+		    .bios_param     		= fd_mcs_biosparam,       \
+		    .can_queue      		= 1, 			\
+		    .this_id        		= 7, 			\
+		    .sg_tablesize   		= 64, 			\
+		    .cmd_per_lun    		= 1, 			\
+		    .use_clustering 		= DISABLE_CLUSTERING	\
 		}
 
 #endif				/* _FD_MCS_H */
diff -Nru a/drivers/scsi/fdomain.h b/drivers/scsi/fdomain.h
--- a/drivers/scsi/fdomain.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/fdomain.h	Sun Dec 15 18:08:28 2002
@@ -39,21 +39,21 @@
 				   int length, int hostno, int inout );
 static int        fdomain_16x0_release(struct Scsi_Host *shpnt);
 
-#define FDOMAIN_16X0 { proc_info:      		fdomain_16x0_proc_info,           \
-		       detect:         		fdomain_16x0_detect,              \
-		       info:           		fdomain_16x0_info,                \
-		       command:        		fdomain_16x0_command,             \
-		       queuecommand:   		fdomain_16x0_queue,               \
-		       eh_abort_handler:	fdomain_16x0_abort,               \
-		       eh_bus_reset_handler:	fdomain_16x0_bus_reset,           \
-		       eh_device_reset_handler:	fdomain_16x0_device_reset,        \
-		       eh_host_reset_handler:	fdomain_16x0_host_reset,          \
-		       bios_param:		fdomain_16x0_biosparam,           \
-		       release:			fdomain_16x0_release,		  \
-		       can_queue:		1, 				  \
-		       this_id:  		6, 				  \
-		       sg_tablesize:		64, 				  \
-		       cmd_per_lun:		1, 				  \
-		       use_clustering:		DISABLE_CLUSTERING		  \
+#define FDOMAIN_16X0 { .proc_info      		= fdomain_16x0_proc_info,           \
+		       .detect         		= fdomain_16x0_detect,              \
+		       .info           		= fdomain_16x0_info,                \
+		       .command        		= fdomain_16x0_command,             \
+		       .queuecommand   		= fdomain_16x0_queue,               \
+		       .eh_abort_handler	= fdomain_16x0_abort,               \
+		       .eh_bus_reset_handler	= fdomain_16x0_bus_reset,           \
+		       .eh_device_reset_handler	= fdomain_16x0_device_reset,        \
+		       .eh_host_reset_handler	= fdomain_16x0_host_reset,          \
+		       .bios_param		= fdomain_16x0_biosparam,           \
+		       .release			= fdomain_16x0_release,		  \
+		       .can_queue		= 1, 				  \
+		       .this_id  		= 6, 				  \
+		       .sg_tablesize		= 64, 				  \
+		       .cmd_per_lun		= 1, 				  \
+		       .use_clustering		= DISABLE_CLUSTERING		  \
 }
 #endif
diff -Nru a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
--- a/drivers/scsi/g_NCR5380.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/g_NCR5380.h	Sun Dec 15 18:08:28 2002
@@ -66,22 +66,22 @@
 #endif
 
 #define GENERIC_NCR5380 {						\
-	proc_info:      generic_NCR5380_proc_info,			\
-	name:           "Generic NCR5380/NCR53C400 Scsi Driver",	\
-	detect:         generic_NCR5380_detect,				\
-	release:        generic_NCR5380_release_resources,		\
-	info:           (void *)generic_NCR5380_info,			\
-	queuecommand:   generic_NCR5380_queue_command,			\
-	eh_abort_handler:generic_NCR5380_abort,				\
-	eh_bus_reset_handler:generic_NCR5380_bus_reset,			\
-	eh_device_reset_handler:generic_NCR5380_device_reset,		\
-	eh_host_reset_handler:generic_NCR5380_host_reset,			\
-	bios_param:     NCR5380_BIOSPARAM,				\
-	can_queue:      CAN_QUEUE,					\
-        this_id:        7,						\
-        sg_tablesize:   SG_ALL,						\
-	cmd_per_lun:    CMD_PER_LUN ,					\
-        use_clustering: DISABLE_CLUSTERING}
+	.proc_info      = generic_NCR5380_proc_info,			\
+	.name           = "Generic NCR5380/NCR53C400 Scsi Driver",	\
+	.detect         = generic_NCR5380_detect,				\
+	.release        = generic_NCR5380_release_resources,		\
+	.info           = (void *)generic_NCR5380_info,			\
+	.queuecommand   = generic_NCR5380_queue_command,			\
+	.eh_abort_handler = generic_NCR5380_abort,				\
+	.eh_bus_reset_handler = generic_NCR5380_bus_reset,			\
+	.eh_device_reset_handler = generic_NCR5380_device_reset,		\
+	.eh_host_reset_handler = generic_NCR5380_host_reset,			\
+	.bios_param     = NCR5380_BIOSPARAM,				\
+	.can_queue      = CAN_QUEUE,					\
+        .this_id        = 7,						\
+        .sg_tablesize   = SG_ALL,						\
+	.cmd_per_lun    = CMD_PER_LUN ,					\
+        .use_clustering = DISABLE_CLUSTERING}
 
 #ifndef HOSTS_C
 
diff -Nru a/drivers/scsi/gdth.h b/drivers/scsi/gdth.h
--- a/drivers/scsi/gdth.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/gdth.h	Sun Dec 15 18:08:29 2002
@@ -1037,28 +1037,28 @@
 int gdth_eh_device_reset(Scsi_Cmnd *scp);
 int gdth_eh_bus_reset(Scsi_Cmnd *scp);
 int gdth_eh_host_reset(Scsi_Cmnd *scp);
-#define GDTH { proc_name:       "gdth",                          \
-               proc_info:       gdth_proc_info,                  \
-               name:            "GDT SCSI Disk Array Controller",\
-               detect:          gdth_detect,                     \
-               release:         gdth_release,                    \
-               info:            gdth_info,                       \
-               command:         NULL,                            \
-               queuecommand:    gdth_queuecommand,               \
-               eh_abort_handler: gdth_eh_abort,                  \
-               eh_device_reset_handler: gdth_eh_device_reset,    \
-               eh_bus_reset_handler: gdth_eh_bus_reset,          \
-               eh_host_reset_handler: gdth_eh_host_reset,        \
-               abort:           gdth_abort,                      \
-               reset:           gdth_reset,                      \
-               bios_param:      gdth_bios_param,                 \
-               can_queue:       GDTH_MAXCMDS,                    \
-               this_id:         -1,                              \
-               sg_tablesize:    GDTH_MAXSG,                      \
-               cmd_per_lun:     GDTH_MAXC_P_L,                   \
-               present:         0,                               \
-               unchecked_isa_dma: 1,                             \
-               use_clustering:  ENABLE_CLUSTERING }
+#define GDTH { .proc_name       = "gdth",                          \
+               .proc_info       = gdth_proc_info,                  \
+               .name            = "GDT SCSI Disk Array Controller",\
+               .detect          = gdth_detect,                     \
+               .release         = gdth_release,                    \
+               .info            = gdth_info,                       \
+               .command         = NULL,                            \
+               .queuecommand    = gdth_queuecommand,               \
+               .eh_abort_handler = gdth_eh_abort,                  \
+               .eh_device_reset_handler = gdth_eh_device_reset,    \
+               .eh_bus_reset_handler = gdth_eh_bus_reset,          \
+               .eh_host_reset_handler = gdth_eh_host_reset,        \
+               .abort           = gdth_abort,                      \
+               .reset           = gdth_reset,                      \
+               .bios_param      = gdth_bios_param,                 \
+               .can_queue       = GDTH_MAXCMDS,                    \
+               .this_id         = -1,                              \
+               .sg_tablesize    = GDTH_MAXSG,                      \
+               .cmd_per_lun     = GDTH_MAXC_P_L,                   \
+               .present         = 0,                               \
+               .unchecked_isa_dma = 1,                             \
+               .use_clustering  = ENABLE_CLUSTERING }
 
 #endif
 
diff -Nru a/drivers/scsi/gvp11.h b/drivers/scsi/gvp11.h
--- a/drivers/scsi/gvp11.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/gvp11.h	Sun Dec 15 18:08:32 2002
@@ -32,18 +32,18 @@
 
 #ifdef HOSTS_C
 
-#define GVP11_SCSI {  proc_name:	   "GVP11", \
-		      name:                "GVP Series II SCSI", \
-		      detect:              gvp11_detect,    \
-		      release:             gvp11_release,   \
-		      queuecommand:        wd33c93_queuecommand, \
-		      abort:               wd33c93_abort,   \
-		      reset:               wd33c93_reset,   \
-		      can_queue:           CAN_QUEUE,       \
-		      this_id:             7,               \
-		      sg_tablesize:        SG_ALL,          \
-		      cmd_per_lun:	   CMD_PER_LUN,     \
-		      use_clustering:      DISABLE_CLUSTERING }
+#define GVP11_SCSI {  .proc_name	   = "GVP11", \
+		      .name                = "GVP Series II SCSI", \
+		      .detect              = gvp11_detect,    \
+		      .release             = gvp11_release,   \
+		      .queuecommand        = wd33c93_queuecommand, \
+		      .abort               = wd33c93_abort,   \
+		      .reset               = wd33c93_reset,   \
+		      .can_queue           = CAN_QUEUE,       \
+		      .this_id             = 7,               \
+		      .sg_tablesize        = SG_ALL,          \
+		      .cmd_per_lun	   = CMD_PER_LUN,     \
+		      .use_clustering      = DISABLE_CLUSTERING }
 #else
 
 /*
diff -Nru a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
--- a/drivers/scsi/hosts.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/hosts.c	Sun Dec 15 18:08:28 2002
@@ -488,14 +488,14 @@
 	if (!shost_tp->max_sectors) {
 		printk(KERN_WARNING
 		    "scsi HBA driver %s didn't set max_sectors, "
-		    "please fix the template", shost_tp->name);
+		    "please fix the template\n", shost_tp->name);
 		shost_tp->max_sectors = 1024;
 	}
 
 	if (!shost_tp->release) {
 		printk(KERN_WARNING
 		    "scsi HBA driver %s didn't set a release method, "
-		    "please fix the template", shost_tp->name);
+		    "please fix the template\n", shost_tp->name);
 		shost_tp->release = &scsi_host_legacy_release;
 	}
 
diff -Nru a/drivers/scsi/ibmmca.h b/drivers/scsi/ibmmca.h
--- a/drivers/scsi/ibmmca.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/ibmmca.h	Sun Dec 15 18:08:29 2002
@@ -27,22 +27,22 @@
  * about this, but it will break things in the future.
  */
 #define IBMMCA {                                                      \
-          proc_name:      "ibmmca",             /*proc_name*/         \
-	  proc_info:	  ibmmca_proc_info,     /*proc info fn*/      \
-          name:           "IBM SCSI-Subsystem", /*name*/              \
-          detect:         ibmmca_detect,        /*detect fn*/         \
-          release:        ibmmca_release,       /*release fn*/        \
-          command:        ibmmca_command,       /*command fn*/        \
-          queuecommand:   ibmmca_queuecommand,  /*queuecommand fn*/   \
-	  eh_abort_handler:ibmmca_abort,         /*abort fn*/          \
-	  eh_host_reset_handler:ibmmca_host_reset,         /*reset fn*/          \
-          bios_param:     ibmmca_biosparam,     /*bios fn*/           \
-          can_queue:      16,                   /*can_queue*/         \
-          this_id:        7,                    /*set by detect*/     \
-          sg_tablesize:   16,                   /*sg_tablesize*/      \
-          cmd_per_lun:    1,                    /*cmd_per_lun*/       \
-          unchecked_isa_dma: 0,                 /*32-Bit Busmaster */ \
-          use_clustering: ENABLE_CLUSTERING     /*use_clustering*/    \
+          .proc_name      = "ibmmca",             /*proc_name*/         \
+	  .proc_info	  = ibmmca_proc_info,     /*proc info fn*/      \
+          .name           = "IBM SCSI-Subsystem", /*name*/              \
+          .detect         = ibmmca_detect,        /*detect fn*/         \
+          .release        = ibmmca_release,       /*release fn*/        \
+          .command        = ibmmca_command,       /*command fn*/        \
+          .queuecommand   = ibmmca_queuecommand,  /*queuecommand fn*/   \
+	  .eh_abort_handler = ibmmca_abort,         /*abort fn*/          \
+	  .eh_host_reset_handler = ibmmca_host_reset,         /*reset fn*/          \
+          .bios_param     = ibmmca_biosparam,     /*bios fn*/           \
+          .can_queue      = 16,                   /*can_queue*/         \
+          .this_id        = 7,                    /*set by detect*/     \
+          .sg_tablesize   = 16,                   /*sg_tablesize*/      \
+          .cmd_per_lun    = 1,                    /*cmd_per_lun*/       \
+          .unchecked_isa_dma = 0,                 /*32-Bit Busmaster */ \
+          .use_clustering = ENABLE_CLUSTERING     /*use_clustering*/    \
           }
 
 #endif /* _IBMMCA_H */
diff -Nru a/drivers/scsi/imm.h b/drivers/scsi/imm.h
--- a/drivers/scsi/imm.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/imm.h	Sun Dec 15 18:08:28 2002
@@ -163,21 +163,21 @@
 int imm_biosparam(struct scsi_device *, struct block_device *,
 		sector_t, int *);
 
-#define IMM {	proc_name:			"imm",			\
-		proc_info:			imm_proc_info,		\
-		name:				"Iomega VPI2 (imm) interface",\
-		detect:				imm_detect,		\
-		release:			imm_release,		\
-		command:			imm_command,		\
-		queuecommand:			imm_queuecommand,	\
-                eh_abort_handler:               imm_abort,              \
-                eh_device_reset_handler:        NULL,                   \
-                eh_bus_reset_handler:           imm_reset,              \
-                eh_host_reset_handler:          imm_reset,              \
-		bios_param:		        imm_biosparam,		\
-		this_id:			7,			\
-		sg_tablesize:			SG_ALL,			\
-		cmd_per_lun:			1,			\
-		use_clustering:			ENABLE_CLUSTERING	\
+#define IMM {	.proc_name			= "imm",			\
+		.proc_info			= imm_proc_info,		\
+		.name				= "Iomega VPI2 (imm) interface",\
+		.detect				= imm_detect,		\
+		.release			= imm_release,		\
+		.command			= imm_command,		\
+		.queuecommand			= imm_queuecommand,	\
+                .eh_abort_handler               = imm_abort,              \
+                .eh_device_reset_handler        = NULL,                   \
+                .eh_bus_reset_handler           = imm_reset,              \
+                .eh_host_reset_handler          = imm_reset,              \
+		.bios_param		        = imm_biosparam,		\
+		.this_id			= 7,			\
+		.sg_tablesize			= SG_ALL,			\
+		.cmd_per_lun			= 1,			\
+		.use_clustering			= ENABLE_CLUSTERING	\
 }
 #endif				/* _IMM_H */
diff -Nru a/drivers/scsi/in2000.h b/drivers/scsi/in2000.h
--- a/drivers/scsi/in2000.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/in2000.h	Sun Dec 15 18:08:28 2002
@@ -414,22 +414,22 @@
 #define IN2000_CPL      2
 #define IN2000_HOST_ID  7
 
-#define IN2000 {  proc_name:       		"in2000",	     /* name of /proc/scsi directory entry */ \
-                  proc_info:       		in2000_proc_info,    /* pointer to proc info function */ \
-                  name:            		"Always IN2000",     /* device name */ \
-                  detect:          		in2000_detect,       /* returns number of in2000's found */ \
-                  release:			in2000_release,	     /* release the in2000 controller */ \
-                  queuecommand:    		in2000_queuecommand, /* queue scsi command, don't wait */ \
-                  eh_abort_handler:		in2000_abort,        /* abort current command */ \
-                  eh_bus_reset_handler:		in2000_bus_reset,    /* reset scsi bus */ \
-                  eh_device_reset_handler:	in2000_device_reset, /* reset scsi device */ \
-                  eh_host_reset_handler:	in2000_host_reset,   /* reset scsi hba */ \
-                  bios_param:      		in2000_biosparam,    /* figures out BIOS parameters for lilo, etc */ \
-                  can_queue:       		IN2000_CAN_Q,        /* max commands we can queue up */ \
-                  this_id:         		IN2000_HOST_ID,      /* host-adapter scsi id */ \
-                  sg_tablesize:    		IN2000_SG,           /* scatter-gather table size */ \
-                  cmd_per_lun:     		IN2000_CPL,          /* commands per lun */ \
-                  use_clustering:  		DISABLE_CLUSTERING,  /* ENABLE_CLUSTERING may speed things up */ \
+#define IN2000 {  .proc_name       		= "in2000",	     /* name of /proc/scsi directory entry */ \
+                  .proc_info       		= in2000_proc_info,    /* pointer to proc info function */ \
+                  .name            		= "Always IN2000",     /* device name */ \
+                  .detect          		= in2000_detect,       /* returns number of in2000's found */ \
+                  .release			= in2000_release,	     /* release the in2000 controller */ \
+                  .queuecommand    		= in2000_queuecommand, /* queue scsi command, don't wait */ \
+                  .eh_abort_handler		= in2000_abort,        /* abort current command */ \
+                  .eh_bus_reset_handler		= in2000_bus_reset,    /* reset scsi bus */ \
+                  .eh_device_reset_handler	= in2000_device_reset, /* reset scsi device */ \
+                  .eh_host_reset_handler	= in2000_host_reset,   /* reset scsi hba */ \
+                  .bios_param      		= in2000_biosparam,    /* figures out BIOS parameters for lilo, etc */ \
+                  .can_queue       		= IN2000_CAN_Q,        /* max commands we can queue up */ \
+                  .this_id         		= IN2000_HOST_ID,      /* host-adapter scsi id */ \
+                  .sg_tablesize    		= IN2000_SG,           /* scatter-gather table size */ \
+                  .cmd_per_lun     		= IN2000_CPL,          /* commands per lun */ \
+                  .use_clustering  		= DISABLE_CLUSTERING,  /* ENABLE_CLUSTERING may speed things up */ \
                 }
 
 #endif /* IN2000_H */
diff -Nru a/drivers/scsi/ini9100u.h b/drivers/scsi/ini9100u.h
--- a/drivers/scsi/ini9100u.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/ini9100u.h	Sun Dec 15 18:08:29 2002
@@ -88,31 +88,31 @@
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g"
 
 #define INI9100U	{ \
-	next:		NULL,						\
-	module:		NULL,						\
-	proc_name:	"INI9100U", \
-	proc_info:	NULL,				\
-	name:		i91u_REVID, \
-	detect:		i91u_detect, \
-	release:	i91u_release, \
-	info:		NULL,					\
-	command:	i91u_command, \
-	queuecommand:	i91u_queue, \
- 	eh_strategy_handler: NULL, \
- 	eh_abort_handler: NULL, \
- 	eh_device_reset_handler: NULL, \
- 	eh_bus_reset_handler: NULL, \
- 	eh_host_reset_handler: NULL, \
-	abort:		i91u_abort, \
-	reset:		i91u_reset, \
-	bios_param:	i91u_biosparam, \
-	can_queue:	1, \
-	this_id:	1, \
-	sg_tablesize:	SG_ALL, \
-	cmd_per_lun: 	1, \
-	present:	0, \
-	unchecked_isa_dma: 0, \
-	use_clustering:	ENABLE_CLUSTERING, \
+	.next		= NULL,						\
+	.module		= NULL,						\
+	.proc_name	= "INI9100U", \
+	.proc_info	= NULL,				\
+	.name		= i91u_REVID, \
+	.detect		= i91u_detect, \
+	.release	= i91u_release, \
+	.info		= NULL,					\
+	.command	= i91u_command, \
+	.queuecommand	= i91u_queue, \
+ 	.eh_strategy_handler = NULL, \
+ 	.eh_abort_handler = NULL, \
+ 	.eh_device_reset_handler = NULL, \
+ 	.eh_bus_reset_handler = NULL, \
+ 	.eh_host_reset_handler = NULL, \
+	.abort		= i91u_abort, \
+	.reset		= i91u_reset, \
+	.bios_param	= i91u_biosparam, \
+	.can_queue	= 1, \
+	.this_id	= 1, \
+	.sg_tablesize	= SG_ALL, \
+	.cmd_per_lun 	= 1, \
+	.present	= 0, \
+	.unchecked_isa_dma = 0, \
+	.use_clustering	= ENABLE_CLUSTERING, \
 }
 
 #define VIRT_TO_BUS(i)  (unsigned int) virt_to_bus((void *)(i))
diff -Nru a/drivers/scsi/inia100.h b/drivers/scsi/inia100.h
--- a/drivers/scsi/inia100.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/inia100.h	Sun Dec 15 18:08:28 2002
@@ -85,21 +85,21 @@
 #define inia100_REVID "Initio INI-A100U2W SCSI device driver; Revision: 1.02d"
 
 #define INIA100	{ \
-	proc_name:	"inia100", \
-	name:		inia100_REVID, \
-	detect:		inia100_detect, \
-	release:	inia100_release, \
-	queuecommand:	inia100_queue, \
-	eh_abort_handler:inia100_abort, \
-	eh_bus_reset_handler:	inia100_bus_reset, \
-	eh_device_reset_handler:inia100_device_reset, \
-	can_queue:	1, \
-	this_id:	1, \
-	sg_tablesize:	SG_ALL, \
-	cmd_per_lun: 	1, \
-	present:	0, \
-	unchecked_isa_dma: 0, \
-	use_clustering:	ENABLE_CLUSTERING, \
+	.proc_name	= "inia100", \
+	.name		= inia100_REVID, \
+	.detect		= inia100_detect, \
+	.release	= inia100_release, \
+	.queuecommand	= inia100_queue, \
+	.eh_abort_handler = inia100_abort, \
+	.eh_bus_reset_handler	= inia100_bus_reset, \
+	.eh_device_reset_handler = inia100_device_reset, \
+	.can_queue	= 1, \
+	.this_id	= 1, \
+	.sg_tablesize	= SG_ALL, \
+	.cmd_per_lun 	= 1, \
+	.present	= 0, \
+	.unchecked_isa_dma = 0, \
+	.use_clustering	= ENABLE_CLUSTERING, \
 }
 
 #define ULONG   unsigned long
diff -Nru a/drivers/scsi/ips.h b/drivers/scsi/ips.h
--- a/drivers/scsi/ips.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/ips.h	Sun Dec 15 18:08:28 2002
@@ -407,80 +407,80 @@
     * Scsi_Host Template
     */
 #if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0)
- #define IPS {                            \
-    module : NULL,                        \
-    proc_info : NULL,                     \
-    proc_dir : NULL,                      \
-    name : NULL,                          \
-    detect : ips_detect,                  \
-    release : ips_release,                \
-    info : ips_info,                      \
-    command : NULL,                       \
-    queuecommand : ips_queue,             \
-    eh_strategy_handler : NULL,           \
-    eh_abort_handler : ips_eh_abort,      \
-    eh_device_reset_handler : NULL,       \
-    eh_bus_reset_handler : NULL,          \
-    eh_host_reset_handler : ips_eh_reset, \
-    abort : NULL,                         \
-    reset : NULL,                         \
-    slave_attach : NULL,                  \
-    bios_param : ips_biosparam,           \
-    can_queue : 0,                        \
-    this_id: -1,                          \
-    sg_tablesize : IPS_MAX_SG,            \
-    cmd_per_lun: 3,                       \
-    present : 0,                          \
-    unchecked_isa_dma : 0,                \
-    use_clustering : ENABLE_CLUSTERING,   \
-    use_new_eh_code : 1                   \
+#define IPS {	\
+	.module				= NULL,		\
+	.proc_info			= NULL,		\
+	.proc_dir			= NULL,		\
+	.name				= NULL,		\
+	.detect				= ips_detect,	\
+	.release			= ips_release,	\
+	.info				= ips_info,	\
+	.command			= NULL,		\
+	.queuecommand			= ips_queue,	\
+	.eh_strategy_handler		= NULL,		\
+	.eh_abort_handler		= ips_eh_abort,	\
+	.eh_device_reset_handler	= NULL,		\
+	.eh_bus_reset_handler		= NULL,		\
+	.eh_host_reset_handler		= ips_eh_reset,	\
+	.abort				= NULL,		\
+	.reset				= NULL,		\
+	.slave_attach			= NULL,		\
+	.bios_param			= ips_biosparam,\
+	.can_queue			= 0,		\
+	.this_id			= -1,		\
+	.sg_tablesize			= IPS_MAX_SG,	\
+	.cmd_per_lun			= 3,		\
+	.present			= 0,		\
+	.unchecked_isa_dma		= 0,		\
+	.use_clustering			= ENABLE_CLUSTERING,	\
+	.use_new_eh_code		= 1 \
 }
 #elif LINUX_VERSION_CODE < LinuxVersionCode(2,5,0)
- #define IPS {                            \
-    module : NULL,                        \
-    proc_info : NULL,                     \
-    name : NULL,                          \
-    detect : ips_detect,                  \
-    release : ips_release,                \
-    info : ips_info,                      \
-    command : NULL,                       \
-    queuecommand : ips_queue,             \
-    eh_strategy_handler : NULL,           \
-    eh_abort_handler : ips_eh_abort,      \
-    eh_device_reset_handler : NULL,       \
-    eh_bus_reset_handler : NULL,          \
-    eh_host_reset_handler : ips_eh_reset, \
-    abort : NULL,                         \
-    reset : NULL,                         \
-    slave_attach : NULL,                  \
-    bios_param : ips_biosparam,           \
-    can_queue : 0,                        \
-    this_id: -1,                          \
-    sg_tablesize : IPS_MAX_SG,            \
-    cmd_per_lun: 3,                       \
-    present : 0,                          \
-    unchecked_isa_dma : 0,                \
-    use_clustering : ENABLE_CLUSTERING,   \
-    use_new_eh_code : 1                   \
+#define IPS{	\
+	.module				= NULL,		\
+	.proc_info			= NULL,		\
+	.name				= NULL,		\
+	.detect				= ips_detect,	\
+	.release			= ips_release,	\
+	.info				= ips_info,	\
+	.command			= NULL,		\
+	.queuecommand			= ips_queue,	\
+	.eh_strategy_handler		= NULL,		\
+	.eh_abort_handler		= ips_eh_abort,	\
+	.eh_device_reset_handler	= NULL,		\
+	.eh_bus_reset_handler		= NULL,		\
+	.eh_host_reset_handler		= ips_eh_reset,	\
+	.abort				= NULL,		\
+	.reset				= NULL,		\
+	.slave_attach			= NULL,		\
+	.bios_param			= ips_biosparam,\
+	.can_queue			= 0,		\
+	.this_id			= -1,		\
+	.sg_tablesize			= IPS_MAX_SG,	\
+	.cmd_per_lun			= 3,		\
+	.present			= 0,		\
+	.unchecked_isa_dma		= 0,		\
+	.use_clustering			= ENABLE_CLUSTERING,\
+	.use_new_eh_code		= 1 \
 }
 #else
- #define IPS {                            \
-    detect : ips_detect,                  \
-    release : ips_release,                \
-    info : ips_info,                      \
-    queuecommand : ips_queue,             \
-    eh_abort_handler : ips_eh_abort,      \
-    eh_host_reset_handler : ips_eh_reset, \
-    slave_configure : ips_slave_configure,\
-    bios_param : ips_biosparam,           \
-    can_queue : 0,                        \
-    this_id: -1,                          \
-    sg_tablesize : IPS_MAX_SG,            \
-    cmd_per_lun: 3,                       \
-    present : 0,                          \
-    unchecked_isa_dma : 0,                \
-    use_clustering : ENABLE_CLUSTERING,   \
-    highmem_io : 1                        \
+#define IPS {	\
+	.detect			= ips_detect,		\
+	.release		= ips_release,		\
+	.info			= ips_info,		\
+	.queuecommand		= ips_queue,		\
+	.eh_abort_handler	= ips_eh_abort,		\
+	.eh_host_reset_handler	= ips_eh_reset,		\
+	.slave_configure	= ips_slave_configure,	\
+	.bios_param		= ips_biosparam,	\
+	.can_queue		= 0,			\
+	.this_id		= -1,			\
+	.sg_tablesize		= IPS_MAX_SG,		\
+	.cmd_per_lun		= 3,			\
+	.present		= 0,			\
+	.unchecked_isa_dma	= 0,			\
+	.use_clustering		= ENABLE_CLUSTERING,	\
+	.highmem_io		= 1 \
 }
 #endif
 
diff -Nru a/drivers/scsi/jazz_esp.h b/drivers/scsi/jazz_esp.h
--- a/drivers/scsi/jazz_esp.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/jazz_esp.h	Sun Dec 15 18:08:32 2002
@@ -21,19 +21,19 @@
 			 int hostno, int inout);
 
 #define SCSI_JAZZ_ESP {                                         \
-		proc_name:      "esp",				\
-		proc_info:      &esp_proc_info,			\
-		name:           "ESP 100/100a/200",		\
-		detect:         jazz_esp_detect,		\
-		info:           esp_info,			\
-		command:        esp_command,			\
-		queuecommand:   esp_queue,			\
-		abort:          esp_abort,			\
-		reset:          esp_reset,			\
-		can_queue:      7,				\
-		this_id:        7,				\
-		sg_tablesize:   SG_ALL,				\
-		cmd_per_lun:    1,				\
-		use_clustering: DISABLE_CLUSTERING, }
+		.proc_name      = "esp",				\
+		.proc_info      = &esp_proc_info,			\
+		.name           = "ESP 100/100a/200",		\
+		.detect         = jazz_esp_detect,		\
+		.info           = esp_info,			\
+		.command        = esp_command,			\
+		.queuecommand   = esp_queue,			\
+		.abort          = esp_abort,			\
+		.reset          = esp_reset,			\
+		.can_queue      = 7,				\
+		.this_id        = 7,				\
+		.sg_tablesize   = SG_ALL,				\
+		.cmd_per_lun    = 1,				\
+		.use_clustering = DISABLE_CLUSTERING, }
 
 #endif /* JAZZ_ESP_H */
diff -Nru a/drivers/scsi/lasi700.h b/drivers/scsi/lasi700.h
--- a/drivers/scsi/lasi700.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/lasi700.h	Sun Dec 15 18:08:28 2002
@@ -31,34 +31,34 @@
 
 
 #define LASI700_SCSI {				\
-	name:		"LASI SCSI 53c700",	\
-	proc_name:	"lasi700",		\
-	detect:		lasi700_detect,		\
-	release:	lasi700_release,	\
-	this_id:	7,			\
+	.name		= "LASI SCSI 53c700",	\
+	.proc_name	= "lasi700",		\
+	.detect		= lasi700_detect,		\
+	.release	= lasi700_release,	\
+	.this_id	= 7,			\
 }
 
 #define LASI_710_SVERSION	0x082
 #define LASI_700_SVERSION	0x071
 
 #define LASI700_ID_TABLE {			\
-	hw_type:	HPHW_FIO,		\
-	sversion:	LASI_700_SVERSION,	\
-	hversion:	HVERSION_ANY_ID,	\
-	hversion_rev:	HVERSION_REV_ANY_ID,	\
+	.hw_type	= HPHW_FIO,		\
+	.sversion	= LASI_700_SVERSION,	\
+	.hversion	= HVERSION_ANY_ID,	\
+	.hversion_rev	= HVERSION_REV_ANY_ID,	\
 }
 
 #define LASI710_ID_TABLE {			\
-	hw_type:	HPHW_FIO,		\
-	sversion:	LASI_710_SVERSION,	\
-	hversion:	HVERSION_ANY_ID,	\
-	hversion_rev:	HVERSION_REV_ANY_ID,	\
+	.hw_type	= HPHW_FIO,		\
+	.sversion	= LASI_710_SVERSION,	\
+	.hversion	= HVERSION_ANY_ID,	\
+	.hversion_rev	= HVERSION_REV_ANY_ID,	\
 }
 
 #define LASI700_DRIVER {			\
-	name:		"Lasi SCSI",		\
-	id_table:	lasi700_scsi_tbl,	\
-	probe:		lasi700_driver_callback,\
+	.name		= "Lasi SCSI",		\
+	.id_table	= lasi700_scsi_tbl,	\
+	.probe		= lasi700_driver_callback,\
 }
 
 #define LASI700_CLOCK	25
diff -Nru a/drivers/scsi/mac53c94.h b/drivers/scsi/mac53c94.h
--- a/drivers/scsi/mac53c94.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/mac53c94.h	Sun Dec 15 18:08:29 2002
@@ -15,19 +15,19 @@
 int mac53c94_reset(Scsi_Cmnd *, unsigned int);
 
 #define SCSI_MAC53C94 {					\
-	proc_name:	"53c94",			\
-	name:		"53C94",			\
-	detect:		mac53c94_detect,		\
-	release:	mac53c94_release,		\
-	command:	mac53c94_command,		\
-	queuecommand:	mac53c94_queue,			\
-	abort:		mac53c94_abort,			\
-	reset:		mac53c94_reset,			\
-	can_queue:	1,				\
-	this_id:	7,				\
-	sg_tablesize:	SG_ALL,				\
-	cmd_per_lun:	1,				\
-	use_clustering:	DISABLE_CLUSTERING,		\
+	.proc_name	= "53c94",			\
+	.name		= "53C94",			\
+	.detect		= mac53c94_detect,		\
+	.release	= mac53c94_release,		\
+	.command	= mac53c94_command,		\
+	.queuecommand	= mac53c94_queue,			\
+	.abort		= mac53c94_abort,			\
+	.reset		= mac53c94_reset,			\
+	.can_queue	= 1,				\
+	.this_id	= 7,				\
+	.sg_tablesize	= SG_ALL,				\
+	.cmd_per_lun	= 1,				\
+	.use_clustering	= DISABLE_CLUSTERING,		\
 }
 
 /*
diff -Nru a/drivers/scsi/mac_esp.h b/drivers/scsi/mac_esp.h
--- a/drivers/scsi/mac_esp.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/mac_esp.h	Sun Dec 15 18:08:29 2002
@@ -21,20 +21,20 @@
 extern int esp_reset(Scsi_Cmnd *, unsigned int);
 
 
-#define SCSI_MAC_ESP      { proc_name:		"esp", \
-			    name:		"Mac 53C9x SCSI", \
-			    detect:		mac_esp_detect, \
-			    release:		NULL, \
-			    info:		esp_info, \
+#define SCSI_MAC_ESP      { .proc_name		= "esp", \
+			    .name		= "Mac 53C9x SCSI", \
+			    .detect		= mac_esp_detect, \
+			    .release		= NULL, \
+			    .info		= esp_info, \
 			    /* command:		esp_command, */ \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    this_id:		7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-			    use_clustering:	DISABLE_CLUSTERING }
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .this_id		= 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+			    .use_clustering	= DISABLE_CLUSTERING }
 
 #endif /* MAC_ESP_H */
 
diff -Nru a/drivers/scsi/mac_scsi.h b/drivers/scsi/mac_scsi.h
--- a/drivers/scsi/mac_scsi.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/mac_scsi.h	Sun Dec 15 18:08:29 2002
@@ -65,19 +65,19 @@
 #include <scsi/scsicam.h>
 
 #define MAC_NCR5380 {						\
-name:			"Macintosh NCR5380 SCSI",			\
-detect:			macscsi_detect,					\
-release:		macscsi_release,	/* Release */		\
-info:			macscsi_info,					\
-queuecommand:		macscsi_queue_command,				\
-abort:			macscsi_abort,			 		\
-reset:			macscsi_reset,					\
-can_queue:		CAN_QUEUE,		/* can queue */		\
-this_id:		7,			/* id */		\
-sg_tablesize:		SG_ALL,			/* sg_tablesize */	\
-cmd_per_lun:		CMD_PER_LUN,		/* cmd per lun */	\
-unchecked_isa_dma:	0,			/* unchecked_isa_dma */	\
-use_clustering:		DISABLE_CLUSTERING				\
+.name			= "Macintosh NCR5380 SCSI",			\
+.detect			= macscsi_detect,					\
+.release		= macscsi_release,	/* Release */		\
+.info			= macscsi_info,					\
+.queuecommand		= macscsi_queue_command,				\
+.abort			= macscsi_abort,			 		\
+.reset			= macscsi_reset,					\
+.can_queue		= CAN_QUEUE,		/* can queue */		\
+.this_id		= 7,			/* id */		\
+.sg_tablesize		= SG_ALL,			/* sg_tablesize */	\
+.cmd_per_lun		= CMD_PER_LUN,		/* cmd per lun */	\
+.unchecked_isa_dma	= 0,			/* unchecked_isa_dma */	\
+.use_clustering		= DISABLE_CLUSTERING				\
 	}
 
 #ifndef HOSTS_C
diff -Nru a/drivers/scsi/mca_53c9x.h b/drivers/scsi/mca_53c9x.h
--- a/drivers/scsi/mca_53c9x.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/mca_53c9x.h	Sun Dec 15 18:08:31 2002
@@ -31,18 +31,18 @@
 			 int hostno, int inout);
 
 
-#define MCA_53C9X         { proc_name:		"esp", \
-			    name:		"NCR 53c9x SCSI", \
-			    detect:		mca_esp_detect, \
-			    release:		mca_esp_release, \
-			    queuecommand:	esp_queue, \
-			    abort:		esp_abort, \
-			    reset:		esp_reset, \
-			    can_queue:          7, \
-			    sg_tablesize:	SG_ALL, \
-			    cmd_per_lun:	1, \
-                            unchecked_isa_dma:  1, \
-			    use_clustering:	DISABLE_CLUSTERING }
+#define MCA_53C9X         { .proc_name		= "esp", \
+			    .name		= "NCR 53c9x SCSI", \
+			    .detect		= mca_esp_detect, \
+			    .release		= mca_esp_release, \
+			    .queuecommand	= esp_queue, \
+			    .abort		= esp_abort, \
+			    .reset		= esp_reset, \
+			    .can_queue          = 7, \
+			    .sg_tablesize	= SG_ALL, \
+			    .cmd_per_lun	= 1, \
+                            .unchecked_isa_dma  = 1, \
+			    .use_clustering	= DISABLE_CLUSTERING }
 
 /* Ports the ncr's 53c94 can be put at; indexed by pos register value */
 
diff -Nru a/drivers/scsi/megaraid.h b/drivers/scsi/megaraid.h
--- a/drivers/scsi/megaraid.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/megaraid.h	Sun Dec 15 18:08:29 2002
@@ -207,22 +207,22 @@
 #else
 #define MEGARAID \
   {\
-    name:	    	"MegaRAID",		/* Driver Name			*/\
-    proc_info:		megaraid_proc_info,     /* /proc driver info		*/\
-    detect:		megaraid_detect,	/* Detect Host Adapter		*/\
-    release:	  	megaraid_release,	/* Release Host Adapter		*/\
-    info:	     	megaraid_info,	   	/* Driver Info Function		*/\
-    command:	  	megaraid_command,	/* Command Function		*/\
-    queuecommand:  	megaraid_queue,		/* Queue Command Function	*/\
-    bios_param:     	megaraid_biosparam, 	/* Disk BIOS Parameters		*/\
-    can_queue:		MAX_COMMANDS,	    	/* Can Queue			*/\
-    this_id:	  	7,		       	/* HBA Target ID		*/\
-    sg_tablesize:   	MAX_SGLIST,	  	/* Scatter/Gather Table Size	*/\
-    cmd_per_lun:    	MAX_CMD_PER_LUN,	/* SCSI Commands per LUN	*/\
-    present:	  	0,		       	/* Present			*/\
-    unchecked_isa_dma:	0,		       	/* Default Unchecked ISA DMA	*/\
-    use_clustering:   	ENABLE_CLUSTERING,  	/* Enable Clustering		*/\
-	highmem_io:		1,													\
+    .name	    	= "MegaRAID",		/* Driver Name			*/\
+    .proc_info		= megaraid_proc_info,     /* /proc driver info		*/\
+    .detect		= megaraid_detect,	/* Detect Host Adapter		*/\
+    .release	  	= megaraid_release,	/* Release Host Adapter		*/\
+    .info	     	= megaraid_info,	   	/* Driver Info Function		*/\
+    .command	  	= megaraid_command,	/* Command Function		*/\
+    .queuecommand  	= megaraid_queue,		/* Queue Command Function	*/\
+    .bios_param     	= megaraid_biosparam, 	/* Disk BIOS Parameters		*/\
+    .can_queue		= MAX_COMMANDS,	    	/* Can Queue			*/\
+    .this_id	  	= 7,		       	/* HBA Target ID		*/\
+    .sg_tablesize   	= MAX_SGLIST,	  	/* Scatter/Gather Table Size	*/\
+    .cmd_per_lun    	= MAX_CMD_PER_LUN,	/* SCSI Commands per LUN	*/\
+    .present	  	= 0,		       	/* Present			*/\
+    .unchecked_isa_dma	= 0,		       	/* Default Unchecked ISA DMA	*/\
+    .use_clustering   	= ENABLE_CLUSTERING,  	/* Enable Clustering		*/\
+	.highmem_io		= 1,													\
   }
 #endif
 
diff -Nru a/drivers/scsi/mesh.h b/drivers/scsi/mesh.h
--- a/drivers/scsi/mesh.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/mesh.h	Sun Dec 15 18:08:28 2002
@@ -14,21 +14,21 @@
 int mesh_host_reset(Scsi_Cmnd *);
 
 #define SCSI_MESH {						\
-	proc_name:			"mesh",			\
-	name:				"MESH",			\
-	detect:				mesh_detect,		\
-	release:			mesh_release,		\
-	command:			NULL,			\
-	queuecommand:			mesh_queue,		\
-	eh_abort_handler:		mesh_abort,		\
-	eh_device_reset_handler:	NULL,			\
-	eh_bus_reset_handler:		NULL,			\
-	eh_host_reset_handler:		mesh_host_reset,	\
-	can_queue:			20,			\
-	this_id:			7,			\
-	sg_tablesize:			SG_ALL,			\
-	cmd_per_lun:			2,			\
-	use_clustering:			DISABLE_CLUSTERING,	\
+	.proc_name			= "mesh",			\
+	.name				= "MESH",			\
+	.detect				= mesh_detect,		\
+	.release			= mesh_release,		\
+	.command			= NULL,			\
+	.queuecommand			= mesh_queue,		\
+	.eh_abort_handler		= mesh_abort,		\
+	.eh_device_reset_handler	= NULL,			\
+	.eh_bus_reset_handler		= NULL,			\
+	.eh_host_reset_handler		= mesh_host_reset,	\
+	.can_queue			= 20,			\
+	.this_id			= 7,			\
+	.sg_tablesize			= SG_ALL,			\
+	.cmd_per_lun			= 2,			\
+	.use_clustering			= DISABLE_CLUSTERING,	\
 }
 
 /*
diff -Nru a/drivers/scsi/mvme147.h b/drivers/scsi/mvme147.h
--- a/drivers/scsi/mvme147.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/mvme147.h	Sun Dec 15 18:08:28 2002
@@ -31,19 +31,19 @@
 
 #ifdef HOSTS_C
 
-#define MVME147_SCSI {proc_name:	   "MVME147",			\
-		      proc_info:           NULL,			\
-		      name:                "MVME147 built-in SCSI",	\
-		      detect:              mvme147_detect,		\
-		      release:             mvme147_release,		\
-		      queuecommand:        wd33c93_queuecommand,	\
-		      abort:               wd33c93_abort,		\
-		      reset:               wd33c93_reset,		\
-		      can_queue:           CAN_QUEUE,			\
-		      this_id:             7,				\
-		      sg_tablesize:        SG_ALL,			\
-		      cmd_per_lun:	   CMD_PER_LUN,			\
-		      use_clustering:      ENABLE_CLUSTERING }
+#define MVME147_SCSI {.proc_name	   = "MVME147",			\
+		      .proc_info           = NULL,			\
+		      .name                = "MVME147 built-in SCSI",	\
+		      .detect              = mvme147_detect,		\
+		      .release             = mvme147_release,		\
+		      .queuecommand        = wd33c93_queuecommand,	\
+		      .abort               = wd33c93_abort,		\
+		      .reset               = wd33c93_reset,		\
+		      .can_queue           = CAN_QUEUE,			\
+		      .this_id             = 7,				\
+		      .sg_tablesize        = SG_ALL,			\
+		      .cmd_per_lun	   = CMD_PER_LUN,			\
+		      .use_clustering      = ENABLE_CLUSTERING }
 
 #endif /* else def HOSTS_C */
 
diff -Nru a/drivers/scsi/mvme16x.h b/drivers/scsi/mvme16x.h
--- a/drivers/scsi/mvme16x.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/mvme16x.h	Sun Dec 15 18:08:29 2002
@@ -25,15 +25,15 @@
 
 #include <scsi/scsicam.h>
 
-#define MVME16x_SCSI  {name:                "MVME16x NCR53c710 SCSI", \
-		       detect:              mvme16x_scsi_detect,    \
-		       queuecommand:        NCR53c7xx_queue_command, \
-		       abort:               NCR53c7xx_abort,   \
-		       reset:               NCR53c7xx_reset,   \
-		       can_queue:           24,       \
-		       this_id:             7,               \
-		       sg_tablesize:        63,          \
-		       cmd_per_lun:	    3,     \
-		       use_clustering:      DISABLE_CLUSTERING }
+#define MVME16x_SCSI  {.name                = "MVME16x NCR53c710 SCSI", \
+		       .detect              = mvme16x_scsi_detect,    \
+		       .queuecommand        = NCR53c7xx_queue_command, \
+		       .abort               = NCR53c7xx_abort,   \
+		       .reset               = NCR53c7xx_reset,   \
+		       .can_queue           = 24,       \
+		       .this_id             = 7,               \
+		       .sg_tablesize        = 63,          \
+		       .cmd_per_lun	    = 3,     \
+		       .use_clustering      = DISABLE_CLUSTERING }
 
 #endif /* MVME16x_SCSI_H */
diff -Nru a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h
--- a/drivers/scsi/ncr53c8xx.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/ncr53c8xx.h	Sun Dec 15 18:08:29 2002
@@ -70,19 +70,19 @@
 
 #if	LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
 
-#define NCR53C8XX {     name:           "",			\
-			detect:         ncr53c8xx_detect,	\
-			release:        ncr53c8xx_release,	\
-			info:           ncr53c8xx_info, 	\
-			queuecommand:   ncr53c8xx_queue_command,\
-			slave_configure:ncr53c8xx_slave_configure,\
-			abort:          ncr53c8xx_abort,	\
-			reset:          ncr53c8xx_reset,	\
-			can_queue:      SCSI_NCR_CAN_QUEUE,	\
-			this_id:        7,			\
-			sg_tablesize:   SCSI_NCR_SG_TABLESIZE,	\
-			cmd_per_lun:    SCSI_NCR_CMD_PER_LUN,	\
-			use_clustering: DISABLE_CLUSTERING} 
+#define NCR53C8XX {     .name           = "",			\
+			.detect         = ncr53c8xx_detect,	\
+			.release        = ncr53c8xx_release,	\
+			.info           = ncr53c8xx_info, 	\
+			.queuecommand   = ncr53c8xx_queue_command,\
+			.slave_configure = ncr53c8xx_slave_configure,\
+			.abort          = ncr53c8xx_abort,	\
+			.reset          = ncr53c8xx_reset,	\
+			.can_queue      = SCSI_NCR_CAN_QUEUE,	\
+			.this_id        = 7,			\
+			.sg_tablesize   = SCSI_NCR_SG_TABLESIZE,	\
+			.cmd_per_lun    = SCSI_NCR_CMD_PER_LUN,	\
+			.use_clustering = DISABLE_CLUSTERING} 
 
 #else
 
diff -Nru a/drivers/scsi/oktagon_esp.h b/drivers/scsi/oktagon_esp.h
--- a/drivers/scsi/oktagon_esp.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/oktagon_esp.h	Sun Dec 15 18:08:28 2002
@@ -40,18 +40,18 @@
 			int hostno, int inout);
 
 #define SCSI_OKTAGON_ESP {                       \
-   proc_name:           "esp-oktagon",           \
-   proc_info:           &esp_proc_info,          \
-   name:                "BSC Oktagon SCSI",      \
-   detect:              oktagon_esp_detect,      \
-   release:             oktagon_esp_release,     \
-   queuecommand:        esp_queue,               \
-   abort:               esp_abort,               \
-   reset:               esp_reset,               \
-   can_queue:           7,                       \
-   this_id:             7,                       \
-   sg_tablesize:        SG_ALL,                  \
-   cmd_per_lun:         1,                       \
-   use_clustering:      ENABLE_CLUSTERING }
+   .proc_name           = "esp-oktagon",           \
+   .proc_info           = &esp_proc_info,          \
+   .name                = "BSC Oktagon SCSI",      \
+   .detect              = oktagon_esp_detect,      \
+   .release             = oktagon_esp_release,     \
+   .queuecommand        = esp_queue,               \
+   .abort               = esp_abort,               \
+   .reset               = esp_reset,               \
+   .can_queue           = 7,                       \
+   .this_id             = 7,                       \
+   .sg_tablesize        = SG_ALL,                  \
+   .cmd_per_lun         = 1,                       \
+   .use_clustering      = ENABLE_CLUSTERING }
 
 #endif /* OKTAGON_ESP_H */
diff -Nru a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h
--- a/drivers/scsi/pas16.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/pas16.h	Sun Dec 15 18:08:29 2002
@@ -144,19 +144,19 @@
  */
 
 #define MV_PAS16 {					\
-	name:           "Pro Audio Spectrum-16 SCSI", 	\
-	detect:         pas16_detect, 			\
-	queuecommand:   pas16_queue_command,		\
-	eh_abort_handler: pas16_abort,			\
-	eh_bus_reset_handler: pas16_bus_reset,		\
-	eh_device_reset_handler: pas16_device_reset,	\
-	eh_host_reset_handler: pas16_host_reset,	\
-	bios_param:     pas16_biosparam, 		\
-	can_queue:      CAN_QUEUE,			\
-	this_id:        7,				\
-	sg_tablesize:   SG_ALL,				\
-	cmd_per_lun:    CMD_PER_LUN ,			\
-	use_clustering: DISABLE_CLUSTERING}
+	.name           = "Pro Audio Spectrum-16 SCSI", 	\
+	.detect         = pas16_detect, 			\
+	.queuecommand   = pas16_queue_command,		\
+	.eh_abort_handler = pas16_abort,			\
+	.eh_bus_reset_handler = pas16_bus_reset,		\
+	.eh_device_reset_handler = pas16_device_reset,	\
+	.eh_host_reset_handler = pas16_host_reset,	\
+	.bios_param     = pas16_biosparam, 		\
+	.can_queue      = CAN_QUEUE,			\
+	.this_id        = 7,				\
+	.sg_tablesize   = SG_ALL,				\
+	.cmd_per_lun    = CMD_PER_LUN ,			\
+	.use_clustering = DISABLE_CLUSTERING}
 
 #ifndef HOSTS_C
 
diff -Nru a/drivers/scsi/pci2000.h b/drivers/scsi/pci2000.h
--- a/drivers/scsi/pci2000.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/pci2000.h	Sun Dec 15 18:08:32 2002
@@ -203,22 +203,22 @@
 
 /* screen is 80 columns wide, damnit! */
 #define PCI2000 {				\
-	proc_name:	"pci2000",					\
-	name:		"PCI-2000 SCSI Intelligent Disk Controller",	\
-	detect:		Pci2000_Detect,					\
-	release:	Pci2000_Release,				\
-	command:	Pci2000_Command,				\
-	queuecommand:	Pci2000_QueueCommand,				\
-	abort:		Pci2000_Abort,					\
-	reset:		Pci2000_Reset,					\
-	bios_param:	Pci2000_BiosParam,				\
-	can_queue:	16,						\
-	this_id:	-1,						\
-	sg_tablesize:	16,						\
-	cmd_per_lun:	1,						\
-	present:	0,						\
-	unchecked_isa_dma:0,						\
-	use_clustering:	DISABLE_CLUSTERING,				\
+	.proc_name	= "pci2000",					\
+	.name		= "PCI-2000 SCSI Intelligent Disk Controller",	\
+	.detect		= Pci2000_Detect,					\
+	.release	= Pci2000_Release,				\
+	.command	= Pci2000_Command,				\
+	.queuecommand	= Pci2000_QueueCommand,				\
+	.abort		= Pci2000_Abort,					\
+	.reset		= Pci2000_Reset,					\
+	.bios_param	= Pci2000_BiosParam,				\
+	.can_queue	= 16,						\
+	.this_id	= -1,						\
+	.sg_tablesize	= 16,						\
+	.cmd_per_lun	= 1,						\
+	.present	= 0,						\
+	.unchecked_isa_dma = 0,						\
+	.use_clustering	= DISABLE_CLUSTERING,				\
 }
 
 #endif
diff -Nru a/drivers/scsi/pci2220i.h b/drivers/scsi/pci2220i.h
--- a/drivers/scsi/pci2220i.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/pci2220i.h	Sun Dec 15 18:08:29 2002
@@ -42,21 +42,21 @@
 #endif
 
 #define PCI2220I {					\
-	proc_name:		"pci2220i",		\
-	name:			"PCI-2220I/PCI-2240I",	\
-	detect:			Pci2220i_Detect,	\
-	release:		Pci2220i_Release,	\
-	command:		Pci2220i_Command,	\
-	queuecommand:		Pci2220i_QueueCommand,	\
-	abort:			Pci2220i_Abort,		\
-	reset:			Pci2220i_Reset,		\
-	bios_param:		Pci2220i_BiosParam,	\
-	can_queue:		1,			\
-	this_id:		-1,			\
-	sg_tablesize:		SG_ALL,			\
-	cmd_per_lun:		1,			\
-	present:		0,			\
-	unchecked_isa_dma:	0,			\
-	use_clustering:		DISABLE_CLUSTERING,	\
+	.proc_name		= "pci2220i",		\
+	.name			= "PCI-2220I/PCI-2240I",	\
+	.detect			= Pci2220i_Detect,	\
+	.release		= Pci2220i_Release,	\
+	.command		= Pci2220i_Command,	\
+	.queuecommand		= Pci2220i_QueueCommand,	\
+	.abort			= Pci2220i_Abort,		\
+	.reset			= Pci2220i_Reset,		\
+	.bios_param		= Pci2220i_BiosParam,	\
+	.can_queue		= 1,			\
+	.this_id		= -1,			\
+	.sg_tablesize		= SG_ALL,			\
+	.cmd_per_lun		= 1,			\
+	.present		= 0,			\
+	.unchecked_isa_dma	= 0,			\
+	.use_clustering		= DISABLE_CLUSTERING,	\
 }
 #endif
diff -Nru a/drivers/scsi/pcmcia/Makefile b/drivers/scsi/pcmcia/Makefile
--- a/drivers/scsi/pcmcia/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/pcmcia/Makefile	Sun Dec 15 18:08:29 2002
@@ -22,5 +22,3 @@
 aha152x_cs-objs	:= aha152x_stub.o aha152x.o
 fdomain_cs-objs	:= fdomain_stub.o fdomain.o
 qlogic_cs-objs	:= qlogic_stub.o qlogicfas.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/scsi/pluto.h b/drivers/scsi/pluto.h
--- a/drivers/scsi/pluto.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/pluto.h	Sun Dec 15 18:08:29 2002
@@ -44,21 +44,21 @@
 int pluto_slave_configure(Scsi_Device *);
 
 #define PLUTO {							\
-	name:			"Sparc Storage Array 100/200",	\
-	detect:			pluto_detect,			\
-	release:		pluto_release,			\
-	info:			pluto_info,			\
-	queuecommand:		fcp_scsi_queuecommand,		\
-	slave_configure:	pluto_slave_configure,		\
-	can_queue:		PLUTO_CAN_QUEUE,		\
-	this_id:		-1,				\
-	sg_tablesize:		1,				\
-	cmd_per_lun:		1,				\
-	use_clustering:		ENABLE_CLUSTERING,		\
-	eh_abort_handler:	fcp_scsi_abort,			\
-	eh_device_reset_handler:fcp_scsi_dev_reset,		\
-	eh_bus_reset_handler:	fcp_scsi_bus_reset,		\
-	eh_host_reset_handler:	fcp_scsi_host_reset,		\
+	.name			= "Sparc Storage Array 100/200",	\
+	.detect			= pluto_detect,			\
+	.release		= pluto_release,			\
+	.info			= pluto_info,			\
+	.queuecommand		= fcp_scsi_queuecommand,		\
+	.slave_configure	= pluto_slave_configure,		\
+	.can_queue		= PLUTO_CAN_QUEUE,		\
+	.this_id		= -1,				\
+	.sg_tablesize		= 1,				\
+	.cmd_per_lun		= 1,				\
+	.use_clustering		= ENABLE_CLUSTERING,		\
+	.eh_abort_handler	= fcp_scsi_abort,			\
+	.eh_device_reset_handler = fcp_scsi_dev_reset,		\
+	.eh_bus_reset_handler	= fcp_scsi_bus_reset,		\
+	.eh_host_reset_handler	= fcp_scsi_host_reset,		\
 }	
 
 #endif /* !(_PLUTO_H) */
diff -Nru a/drivers/scsi/ppa.h b/drivers/scsi/ppa.h
--- a/drivers/scsi/ppa.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/ppa.h	Sun Dec 15 18:08:31 2002
@@ -171,21 +171,21 @@
 int ppa_biosparam(struct scsi_device *, struct block_device *,
 		sector_t, int *);
 
-#define PPA {	proc_name:			"ppa",		\
-		proc_info:			ppa_proc_info,		\
-		name:				"Iomega VPI0 (ppa) interface",\
-		detect:				ppa_detect,		\
-		release:			ppa_release,		\
-		command:			ppa_command,		\
-		queuecommand:			ppa_queuecommand,	\
-		eh_abort_handler:		ppa_abort,		\
-		eh_device_reset_handler:	NULL,			\
-		eh_bus_reset_handler:		ppa_reset,		\
-		eh_host_reset_handler:		ppa_reset,		\
-		bios_param:			ppa_biosparam,		\
-		this_id:			-1,			\
-		sg_tablesize:			SG_ALL,			\
-		cmd_per_lun:			1,			\
-		use_clustering:			ENABLE_CLUSTERING	\
+#define PPA {	.proc_name			= "ppa",		\
+		.proc_info			= ppa_proc_info,		\
+		.name				= "Iomega VPI0 (ppa) interface",\
+		.detect				= ppa_detect,		\
+		.release			= ppa_release,		\
+		.command			= ppa_command,		\
+		.queuecommand			= ppa_queuecommand,	\
+		.eh_abort_handler		= ppa_abort,		\
+		.eh_device_reset_handler	= NULL,			\
+		.eh_bus_reset_handler		= ppa_reset,		\
+		.eh_host_reset_handler		= ppa_reset,		\
+		.bios_param			= ppa_biosparam,		\
+		.this_id			= -1,			\
+		.sg_tablesize			= SG_ALL,			\
+		.cmd_per_lun			= 1,			\
+		.use_clustering			= ENABLE_CLUSTERING	\
 }
 #endif				/* _PPA_H */
diff -Nru a/drivers/scsi/psi240i.h b/drivers/scsi/psi240i.h
--- a/drivers/scsi/psi240i.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/psi240i.h	Sun Dec 15 18:08:32 2002
@@ -321,18 +321,18 @@
 	#define NULL 0
 #endif
 
-#define PSI240I { proc_name:      "psi240i", \
-		  name:           "PSI-240I EIDE Disk Controller",\
-		  detect:         Psi240i_Detect,			\
-		  command:	  Psi240i_Command,			\
-		  queuecommand:	  Psi240i_QueueCommand,		\
-		  abort:	  Psi240i_Abort,			\
-		  reset:	  Psi240i_Reset,			\
-		  bios_param:	  Psi240i_BiosParam,                 	\
-		  can_queue:	  1, 					\
-		  this_id:	  -1, 					\
-		  sg_tablesize:	  SG_NONE,		 		\
-		  cmd_per_lun:	  1, 					\
-		  use_clustering: DISABLE_CLUSTERING }
+#define PSI240I { .proc_name      = "psi240i", \
+		  .name           = "PSI-240I EIDE Disk Controller",\
+		  .detect         = Psi240i_Detect,			\
+		  .command	  = Psi240i_Command,			\
+		  .queuecommand	  = Psi240i_QueueCommand,		\
+		  .abort	  = Psi240i_Abort,			\
+		  .reset	  = Psi240i_Reset,			\
+		  .bios_param	  = Psi240i_BiosParam,                 	\
+		  .can_queue	  = 1, 					\
+		  .this_id	  = -1, 					\
+		  .sg_tablesize	  = SG_NONE,		 		\
+		  .cmd_per_lun	  = 1, 					\
+		  .use_clustering = DISABLE_CLUSTERING }
 
 #endif
diff -Nru a/drivers/scsi/qla1280.h b/drivers/scsi/qla1280.h
--- a/drivers/scsi/qla1280.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/qla1280.h	Sun Dec 15 18:08:32 2002
@@ -1325,25 +1325,25 @@
  */
 
 #define QLA1280_LINUX_TEMPLATE {				\
-	proc_info: qla1280_proc_info,				\
-	name: "Qlogic ISP 1280/12160",				\
-	detect: qla1280_detect,					\
-	release: qla1280_release,				\
-	info: qla1280_info,					\
-	queuecommand: qla1280_queuecommand,			\
+	.proc_info = qla1280_proc_info,				\
+	.name = "Qlogic ISP 1280/12160",				\
+	.detect = qla1280_detect,					\
+	.release = qla1280_release,				\
+	.info = qla1280_info,					\
+	.queuecommand = qla1280_queuecommand,			\
 /*	use_new_eh_code: 0, */					\
-	abort: qla1280_abort,					\
-	reset: qla1280_reset,					\
-	slave_configure: qla1280_slave_configure,		\
-	bios_param: qla1280_biosparam,				\
-	can_queue: 255,		/* max simultaneous cmds      */\
-	this_id: -1,		/* scsi id of host adapter    */\
-	sg_tablesize: SG_ALL,	/* max scatter-gather cmds    */\
-	cmd_per_lun: 3,		/* cmds per lun (linked cmds) */\
-	present: 0,		/* number of 1280's present   */\
-	unchecked_isa_dma: 0,	/* no memory DMA restrictions */\
-	use_clustering: ENABLE_CLUSTERING,			\
-	emulated: 0						\
+	.abort = qla1280_abort,					\
+	.reset = qla1280_reset,					\
+	.slave_configure = qla1280_slave_configure,		\
+	.bios_param = qla1280_biosparam,				\
+	.can_queue = 255,		/* max simultaneous cmds      */\
+	.this_id = -1,		/* scsi id of host adapter    */\
+	.sg_tablesize = SG_ALL,	/* max scatter-gather cmds    */\
+	.cmd_per_lun = 3,		/* cmds per lun (linked cmds) */\
+	.present = 0,		/* number of 1280's present   */\
+	.unchecked_isa_dma = 0,	/* no memory DMA restrictions */\
+	.use_clustering = ENABLE_CLUSTERING,			\
+	.emulated = 0						\
 }
 
 #endif				/* _IO_HBA_QLA1280_H */
diff -Nru a/drivers/scsi/qlogicfas.h b/drivers/scsi/qlogicfas.h
--- a/drivers/scsi/qlogicfas.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/qlogicfas.h	Sun Dec 15 18:08:29 2002
@@ -13,20 +13,20 @@
 			       sector_t, int[]);
 
 #define QLOGICFAS {						\
-	detect:         		qlogicfas_detect,	\
-	info:           		qlogicfas_info,		\
-	command:     			qlogicfas_command, 	\
-	queuecommand:			qlogicfas_queuecommand,	\
-	eh_abort_handler:          	qlogicfas_abort,	\
-	eh_bus_reset_handler:		qlogicfas_bus_reset,	\
-	eh_device_reset_handler:        qlogicfas_device_reset,	\
-	eh_host_reset_handler:          qlogicfas_host_reset,	\
-	bios_param:     qlogicfas_biosparam,			\
-	can_queue:      0,					\
-	this_id:        -1,					\
-	sg_tablesize:   SG_ALL,					\
-	cmd_per_lun:    1,					\
-	use_clustering: DISABLE_CLUSTERING			\
+	.detect         		= qlogicfas_detect,	\
+	.info           		= qlogicfas_info,		\
+	.command     			= qlogicfas_command, 	\
+	.queuecommand			= qlogicfas_queuecommand,	\
+	.eh_abort_handler          	= qlogicfas_abort,	\
+	.eh_bus_reset_handler		= qlogicfas_bus_reset,	\
+	.eh_device_reset_handler        = qlogicfas_device_reset,	\
+	.eh_host_reset_handler          = qlogicfas_host_reset,	\
+	.bios_param     = qlogicfas_biosparam,			\
+	.can_queue      = 0,					\
+	.this_id        = -1,					\
+	.sg_tablesize   = SG_ALL,					\
+	.cmd_per_lun    = 1,					\
+	.use_clustering = DISABLE_CLUSTERING			\
 }
 #endif /* _QLOGICFAS_H */
 
diff -Nru a/drivers/scsi/qlogicfc.h b/drivers/scsi/qlogicfc.h
--- a/drivers/scsi/qlogicfc.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/qlogicfc.h	Sun Dec 15 18:08:29 2002
@@ -83,20 +83,20 @@
 #endif
 
 #define QLOGICFC {							   \
-        detect:                 isp2x00_detect,                            \
-        release:                isp2x00_release,                           \
-        info:                   isp2x00_info,                              \
-        queuecommand:           isp2x00_queuecommand,                      \
-        eh_abort_handler:       isp2x00_abort,                             \
-        bios_param:             isp2x00_biosparam,                         \
-        can_queue:              QLOGICFC_REQ_QUEUE_LEN,                    \
-        this_id:                -1,                                        \
-        sg_tablesize:           QLOGICFC_MAX_SG(QLOGICFC_REQ_QUEUE_LEN),   \
-	cmd_per_lun:		QLOGICFC_CMD_PER_LUN, 			   \
-        present:                0,                                         \
-        unchecked_isa_dma:      0,                                         \
-        use_clustering:         ENABLE_CLUSTERING, 			   \
-	highmem_io:		1					   \
+        .detect                 = isp2x00_detect,                            \
+        .release                = isp2x00_release,                           \
+        .info                   = isp2x00_info,                              \
+        .queuecommand           = isp2x00_queuecommand,                      \
+        .eh_abort_handler       = isp2x00_abort,                             \
+        .bios_param             = isp2x00_biosparam,                         \
+        .can_queue              = QLOGICFC_REQ_QUEUE_LEN,                    \
+        .this_id                = -1,                                        \
+        .sg_tablesize           = QLOGICFC_MAX_SG(QLOGICFC_REQ_QUEUE_LEN),   \
+	.cmd_per_lun		= QLOGICFC_CMD_PER_LUN, 			   \
+        .present                = 0,                                         \
+        .unchecked_isa_dma      = 0,                                         \
+        .use_clustering         = ENABLE_CLUSTERING, 			   \
+	.highmem_io		= 1					   \
 }
 
 #endif /* _QLOGICFC_H */
diff -Nru a/drivers/scsi/qlogicisp.h b/drivers/scsi/qlogicisp.h
--- a/drivers/scsi/qlogicisp.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/qlogicisp.h	Sun Dec 15 18:08:28 2002
@@ -72,18 +72,18 @@
 #endif
 
 #define QLOGICISP {							   \
-	detect:			isp1020_detect,				   \
-	release:		isp1020_release,			   \
-	info:			isp1020_info,				   \
-	queuecommand:		isp1020_queuecommand,			   \
-	bios_param:		isp1020_biosparam,			   \
-	can_queue:		QLOGICISP_REQ_QUEUE_LEN,		   \
-	this_id:		-1,					   \
-	sg_tablesize:		QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
-	cmd_per_lun:		1,					   \
-	present:		0,					   \
-	unchecked_isa_dma:	0,					   \
-	use_clustering:		DISABLE_CLUSTERING			   \
+	.detect			= isp1020_detect,				   \
+	.release		= isp1020_release,			   \
+	.info			= isp1020_info,				   \
+	.queuecommand		= isp1020_queuecommand,			   \
+	.bios_param		= isp1020_biosparam,			   \
+	.can_queue		= QLOGICISP_REQ_QUEUE_LEN,		   \
+	.this_id		= -1,					   \
+	.sg_tablesize		= QLOGICISP_MAX_SG(QLOGICISP_REQ_QUEUE_LEN), \
+	.cmd_per_lun		= 1,					   \
+	.present		= 0,					   \
+	.unchecked_isa_dma	= 0,					   \
+	.use_clustering		= DISABLE_CLUSTERING			   \
 }
 
 #endif /* _QLOGICISP_H */
diff -Nru a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
--- a/drivers/scsi/scsi_debug.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/scsi_debug.c	Sun Dec 15 18:08:29 2002
@@ -1636,8 +1636,8 @@
 }
 
 static struct bus_type pseudo_lld_bus = {
-        name: "pseudo",
-        match: pseudo_lld_bus_match,
+        .name = "pseudo",
+        .match = pseudo_lld_bus_match,
 };
 
 int scsi_debug_register_driver(struct device_driver *dev_driver)
diff -Nru a/drivers/scsi/sd.c b/drivers/scsi/sd.c
--- a/drivers/scsi/sd.c	Sun Dec 15 18:08:30 2002
+++ b/drivers/scsi/sd.c	Sun Dec 15 18:08:30 2002
@@ -1217,7 +1217,7 @@
 	gd->minors = 16;
 	gd->fops = &sd_fops;
 
-	if (index > 26) {
+	if (index >= 26) {
 		sprintf(gd->disk_name, "sd%c%c",
 			'a' + index/26-1,'a' + index % 26);
 	} else {
diff -Nru a/drivers/scsi/seagate.h b/drivers/scsi/seagate.h
--- a/drivers/scsi/seagate.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/seagate.h	Sun Dec 15 18:08:31 2002
@@ -19,19 +19,19 @@
 static int seagate_st0x_device_reset(Scsi_Cmnd *);
 static int seagate_st0x_host_reset(Scsi_Cmnd *);
 
-#define SEAGATE_ST0X  {  detect:         seagate_st0x_detect,			\
-			 release:        seagate_st0x_release,			\
-			 info:           seagate_st0x_info,			\
-			 command:        seagate_st0x_command,			\
-			 queuecommand:   seagate_st0x_queue_command,		\
-			 eh_abort_handler:	seagate_st0x_abort,		\
-			 eh_bus_reset_handler:  seagate_st0x_bus_reset,		\
-			 eh_host_reset_handler: seagate_st0x_host_reset,	\
-			 eh_device_reset_handler:seagate_st0x_device_reset,	\
-			 can_queue:      1,					\
-			 this_id:        7,					\
-			 sg_tablesize:   SG_ALL,				\
-			 cmd_per_lun:    1,					\
-			 use_clustering: DISABLE_CLUSTERING}
+#define SEAGATE_ST0X  {  .detect         = seagate_st0x_detect,			\
+			 .release        = seagate_st0x_release,			\
+			 .info           = seagate_st0x_info,			\
+			 .command        = seagate_st0x_command,			\
+			 .queuecommand   = seagate_st0x_queue_command,		\
+			 .eh_abort_handler	= seagate_st0x_abort,		\
+			 .eh_bus_reset_handler  = seagate_st0x_bus_reset,		\
+			 .eh_host_reset_handler = seagate_st0x_host_reset,	\
+			 .eh_device_reset_handler = seagate_st0x_device_reset,	\
+			 .can_queue      = 1,					\
+			 .this_id        = 7,					\
+			 .sg_tablesize   = SG_ALL,				\
+			 .cmd_per_lun    = 1,					\
+			 .use_clustering = DISABLE_CLUSTERING}
 
 #endif /* _SEAGATE_H */
diff -Nru a/drivers/scsi/sgiwd93.h b/drivers/scsi/sgiwd93.h
--- a/drivers/scsi/sgiwd93.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/sgiwd93.h	Sun Dec 15 18:08:29 2002
@@ -25,17 +25,17 @@
 int wd33c93_abort(Scsi_Cmnd *);
 int wd33c93_reset(Scsi_Cmnd *, unsigned int);
 
-#define SGIWD93_SCSI {proc_name:	   "SGIWD93", \
-		      name:                "SGI WD93", \
-		      detect:              sgiwd93_detect,    \
-		      release:             sgiwd93_release,   \
-		      queuecommand:        wd33c93_queuecommand, \
-		      abort:               wd33c93_abort,   \
-		      reset:               wd33c93_reset,   \
-		      can_queue:           CAN_QUEUE,       \
-		      this_id:             7,               \
-		      sg_tablesize:        SG_ALL,          \
-		      cmd_per_lun:	   CMD_PER_LUN,     \
-		      use_clustering:      DISABLE_CLUSTERING }
+#define SGIWD93_SCSI {.proc_name	   = "SGIWD93", \
+		      .name                = "SGI WD93", \
+		      .detect              = sgiwd93_detect,    \
+		      .release             = sgiwd93_release,   \
+		      .queuecommand        = wd33c93_queuecommand, \
+		      .abort               = wd33c93_abort,   \
+		      .reset               = wd33c93_reset,   \
+		      .can_queue           = CAN_QUEUE,       \
+		      .this_id             = 7,               \
+		      .sg_tablesize        = SG_ALL,          \
+		      .cmd_per_lun	   = CMD_PER_LUN,     \
+		      .use_clustering      = DISABLE_CLUSTERING }
 
 #endif /* !(_SGIWD93_H) */
diff -Nru a/drivers/scsi/sim710.h b/drivers/scsi/sim710.h
--- a/drivers/scsi/sim710.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/sim710.h	Sun Dec 15 18:08:29 2002
@@ -22,20 +22,20 @@
 
 #include <scsi/scsicam.h>
 
-#define SIM710_SCSI { proc_name:		"sim710",		\
-		      name:			"53c710",	 	\
-		      detect:			sim710_detect,		\
-		      release:			sim710_release,		\
-		      queuecommand:		sim710_queuecommand,	\
-		      eh_abort_handler:		sim710_abort,		\
-		      eh_device_reset_handler:	sim710_dev_reset,	\
-		      eh_bus_reset_handler:	sim710_bus_reset,	\
-		      eh_host_reset_handler:	sim710_host_reset,	\
-		      can_queue:		8,		 	\
-		      this_id:			7, 			\
-		      sg_tablesize:		128,		 	\
-		      cmd_per_lun:		1,		 	\
-		      use_clustering:		DISABLE_CLUSTERING }
+#define SIM710_SCSI { .proc_name		= "sim710",		\
+		      .name			= "53c710",	 	\
+		      .detect			= sim710_detect,		\
+		      .release			= sim710_release,		\
+		      .queuecommand		= sim710_queuecommand,	\
+		      .eh_abort_handler		= sim710_abort,		\
+		      .eh_device_reset_handler	= sim710_dev_reset,	\
+		      .eh_bus_reset_handler	= sim710_bus_reset,	\
+		      .eh_host_reset_handler	= sim710_host_reset,	\
+		      .can_queue		= 8,		 	\
+		      .this_id			= 7, 			\
+		      .sg_tablesize		= 128,		 	\
+		      .cmd_per_lun		= 1,		 	\
+		      .use_clustering		= DISABLE_CLUSTERING }
 
 #ifndef HOSTS_C
 
diff -Nru a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c
--- a/drivers/scsi/sr_ioctl.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/sr_ioctl.c	Sun Dec 15 18:08:29 2002
@@ -8,6 +8,7 @@
 #include <linux/blk.h>
 #include <linux/blkpg.h>
 #include <linux/cdrom.h>
+#include <asm/io.h>
 
 #include "scsi.h"
 #include "hosts.h"
@@ -156,9 +157,6 @@
 			err = -ENOMEDIUM;
 			break;
 		case ILLEGAL_REQUEST:
-			if (!cgc->quiet)
-				printk(KERN_ERR "%s: CDROM (ioctl) reports ILLEGAL "
-				       "REQUEST.\n", cd->cdi.name);
 			err = -EIO;
 			if (SRpnt->sr_sense_buffer[12] == 0x20 &&
 			    SRpnt->sr_sense_buffer[13] == 0x00)
diff -Nru a/drivers/scsi/st.c b/drivers/scsi/st.c
--- a/drivers/scsi/st.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/st.c	Sun Dec 15 18:08:29 2002
@@ -12,13 +12,13 @@
    Copyright 1992 - 2002 Kai Makisara
    email Kai.Makisara@metla.fi
 
-   Last modified: Tue Oct 15 22:01:04 2002 by makisara
+   Last modified: Sat Dec 14 14:25:09 2002 by makisara
    Some small formal changes - aeb, 950809
 
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static char *verstr = "20021015";
+static char *verstr = "20021214";
 
 #include <linux/module.h>
 
@@ -923,8 +923,9 @@
 
                 DEBC(printk(ST_DEB_MSG "%s: Write protected\n", name));
 
-		if ((st_flags & O_ACCMODE) == O_WRONLY ||
-		    (st_flags & O_ACCMODE) == O_RDWR) {
+		if (do_wait &&
+		    ((st_flags & O_ACCMODE) == O_WRONLY ||
+		     (st_flags & O_ACCMODE) == O_RDWR)) {
 			retval = (-EROFS);
 			goto err_out;
 		}
@@ -991,8 +992,10 @@
 		return (-EBUSY);
 	}
 
-	if(!scsi_device_get(STp->device))
+	if(scsi_device_get(STp->device)) {
+		write_unlock(&st_dev_arr_lock);
 		return (-ENXIO);
+	}
 	STp->in_use = 1;
 	write_unlock(&st_dev_arr_lock);
 	STp->rew_at_close = STp->autorew_dev = (minor(inode->i_rdev) & 0x80) == 0;
diff -Nru a/drivers/scsi/sun3x_esp.h b/drivers/scsi/sun3x_esp.h
--- a/drivers/scsi/sun3x_esp.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/sun3x_esp.h	Sun Dec 15 18:08:28 2002
@@ -21,19 +21,19 @@
 #define DMA_PORTS_P        (dregs->cond_reg & DMA_INT_ENAB)
 
 #define SCSI_SUN3X_ESP {                                        \
-		proc_name:      "esp",  			\
-		proc_info:      &esp_proc_info,			\
-		name:           "Sun ESP 100/100a/200",		\
-		detect:         sun3x_esp_detect,		\
-		info:           esp_info,			\
-		command:        esp_command,			\
-		queuecommand:   esp_queue,			\
-		abort:          esp_abort,			\
-		reset:          esp_reset,			\
-		can_queue:      7,				\
-		this_id:        7,				\
-		sg_tablesize:   SG_ALL,				\
-		cmd_per_lun:    1,				\
-		use_clustering: DISABLE_CLUSTERING, }
+		.proc_name      = "esp",  			\
+		.proc_info      = &esp_proc_info,			\
+		.name           = "Sun ESP 100/100a/200",		\
+		.detect         = sun3x_esp_detect,		\
+		.info           = esp_info,			\
+		.command        = esp_command,			\
+		.queuecommand   = esp_queue,			\
+		.abort          = esp_abort,			\
+		.reset          = esp_reset,			\
+		.can_queue      = 7,				\
+		.this_id        = 7,				\
+		.sg_tablesize   = SG_ALL,				\
+		.cmd_per_lun    = 1,				\
+		.use_clustering = DISABLE_CLUSTERING, }
 
 #endif /* !(_SUN3X_ESP_H) */
diff -Nru a/drivers/scsi/sym53c8xx.h b/drivers/scsi/sym53c8xx.h
--- a/drivers/scsi/sym53c8xx.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/sym53c8xx.h	Sun Dec 15 18:08:29 2002
@@ -85,21 +85,21 @@
 
 #if	LINUX_VERSION_CODE >= LinuxVersionCode(2,1,75)
 
-#define SYM53C8XX {     name:           "",			\
-			detect:         sym53c8xx_detect,	\
-			release:        sym53c8xx_release,	\
-			info:           sym53c8xx_info, 	\
-			queuecommand:   sym53c8xx_queue_command,\
-			slave_configure:sym53c8xx_slave_configure,\
-			abort:          sym53c8xx_abort,	\
-			reset:          sym53c8xx_reset,	\
-			can_queue:      SCSI_NCR_CAN_QUEUE,	\
-			this_id:        7,			\
-			sg_tablesize:   SCSI_NCR_SG_TABLESIZE,	\
-			cmd_per_lun:    SCSI_NCR_CMD_PER_LUN,	\
-			max_sectors:	MAX_HW_SEGMENTS*8,	\
-			use_clustering: DISABLE_CLUSTERING,	\
-			highmem_io:	1} 
+#define SYM53C8XX {     .name           = "",			\
+			.detect         = sym53c8xx_detect,	\
+			.release        = sym53c8xx_release,	\
+			.info           = sym53c8xx_info, 	\
+			.queuecommand   = sym53c8xx_queue_command,\
+			.slave_configure = sym53c8xx_slave_configure,\
+			.abort          = sym53c8xx_abort,	\
+			.reset          = sym53c8xx_reset,	\
+			.can_queue      = SCSI_NCR_CAN_QUEUE,	\
+			.this_id        = 7,			\
+			.sg_tablesize   = SCSI_NCR_SG_TABLESIZE,	\
+			.cmd_per_lun    = SCSI_NCR_CMD_PER_LUN,	\
+			.max_sectors	= MAX_HW_SEGMENTS*8,	\
+			.use_clustering = DISABLE_CLUSTERING,	\
+			.highmem_io	= 1} 
 
 #else
 
diff -Nru a/drivers/scsi/sym53c8xx_2/Makefile b/drivers/scsi/sym53c8xx_2/Makefile
--- a/drivers/scsi/sym53c8xx_2/Makefile	Sun Dec 15 18:08:31 2002
+++ b/drivers/scsi/sym53c8xx_2/Makefile	Sun Dec 15 18:08:31 2002
@@ -2,6 +2,3 @@
 
 sym53c8xx-objs := sym_fw.o sym_glue.o sym_hipd.o sym_malloc.o sym_misc.o sym_nvram.o
 obj-$(CONFIG_SCSI_SYM53C8XX_2) := sym53c8xx.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/scsi/t128.h b/drivers/scsi/t128.h
--- a/drivers/scsi/t128.h	Sun Dec 15 18:08:28 2002
+++ b/drivers/scsi/t128.h	Sun Dec 15 18:08:28 2002
@@ -121,19 +121,19 @@
  */
 
 #define TRANTOR_T128 {					\
-	name:           "Trantor T128/T128F/T228",	\
-	detect:         t128_detect,			\
-	queuecommand:   t128_queue_command,		\
-	eh_abort_handler: t128_abort,			\
-	eh_bus_reset_handler:    t128_bus_reset,	\
-	eh_host_reset_handler:   t128_host_reset,	\
-	eh_device_reset_handler: t128_device_reset,	\
-	bios_param:     t128_biosparam,			\
-	can_queue:      CAN_QUEUE,			\
-        this_id:        7,				\
-	sg_tablesize:   SG_ALL,				\
-	cmd_per_lun:    CMD_PER_LUN,			\
-	use_clustering: DISABLE_CLUSTERING}
+	.name           = "Trantor T128/T128F/T228",	\
+	.detect         = t128_detect,			\
+	.queuecommand   = t128_queue_command,		\
+	.eh_abort_handler = t128_abort,			\
+	.eh_bus_reset_handler    = t128_bus_reset,	\
+	.eh_host_reset_handler   = t128_host_reset,	\
+	.eh_device_reset_handler = t128_device_reset,	\
+	.bios_param     = t128_biosparam,			\
+	.can_queue      = CAN_QUEUE,			\
+        .this_id        = 7,				\
+	.sg_tablesize   = SG_ALL,				\
+	.cmd_per_lun    = CMD_PER_LUN,			\
+	.use_clustering = DISABLE_CLUSTERING}
 
 #ifndef HOSTS_C
 
diff -Nru a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
--- a/drivers/scsi/u14-34f.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/u14-34f.c	Sun Dec 15 18:08:29 2002
@@ -1,6 +1,12 @@
 /*
  *      u14-34f.c - Low-level driver for UltraStor 14F/34F SCSI host adapters.
  *
+ *      12 Nov 2002 Rev. 8.02 for linux 2.5.47
+ *        + Release driver_lock before calling scsi_register.
+ *
+ *      11 Nov 2002 Rev. 8.01 for linux 2.5.47
+ *        + Fixed bios_param and scsicam_bios_param calling parameters.
+ *
  *      28 Oct 2002 Rev. 8.00 for linux 2.5.44-ac4
  *        + Use new tcq and adjust_queue_depth api.
  *        + New command line option (tm:[0-2]) to choose the type of tags:
@@ -841,7 +847,9 @@
 
    if (have_old_firmware) tpnt->use_clustering = DISABLE_CLUSTERING;
 
+   spin_unlock(&driver_lock);
    sh[j] = scsi_register(tpnt, sizeof(struct hostdata));
+   spin_lock(&driver_lock);
 
    if (sh[j] == NULL) {
       printk("%s: unable to register host, detaching.\n", name);
@@ -1488,8 +1496,8 @@
    return SUCCESS;
 }
 
-static int u14_34f_bios_param(struct scsi_device *disk, struct block_device *bdev,
-	sector_t capacity, int *dkinfo) {
+static int u14_34f_bios_param(struct scsi_device *disk,
+                 struct block_device *bdev, sector_t capacity, int *dkinfo) {
    unsigned int j = 0;
    unsigned int size = capacity;
 
diff -Nru a/drivers/scsi/u14-34f.h b/drivers/scsi/u14-34f.h
--- a/drivers/scsi/u14-34f.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/u14-34f.h	Sun Dec 15 18:08:32 2002
@@ -7,23 +7,24 @@
 static int u14_34f_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
 static int u14_34f_eh_abort(Scsi_Cmnd *);
 static int u14_34f_eh_host_reset(Scsi_Cmnd *);
-static int u14_34f_bios_param(struct scsi_device *, struct block_device *, sector_t, int *);
+static int u14_34f_bios_param(struct scsi_device *, struct block_device *,
+                              sector_t, int *);
 static int u14_34f_slave_configure(Scsi_Device *);
 
-#define U14_34F_VERSION "8.00.00"
+#define U14_34F_VERSION "8.03.00"
 
 #define ULTRASTOR_14_34F {                                                   \
-                name:         "UltraStor 14F/34F rev. " U14_34F_VERSION " ", \
-                detect:                  u14_34f_detect,                     \
-                release:                 u14_34f_release,                    \
-                queuecommand:            u14_34f_queuecommand,               \
-                eh_abort_handler:        u14_34f_eh_abort,                   \
-                eh_device_reset_handler: NULL,                               \
-                eh_bus_reset_handler:    NULL,                               \
-                eh_host_reset_handler:   u14_34f_eh_host_reset,              \
-                bios_param:              u14_34f_bios_param,                 \
-                slave_configure:         u14_34f_slave_configure,            \
-                this_id:                 7,                                  \
-                unchecked_isa_dma:       1,                                  \
-                use_clustering:          ENABLE_CLUSTERING                   \
+                .name         = "UltraStor 14F/34F rev. " U14_34F_VERSION " ", \
+                .detect                  = u14_34f_detect,                     \
+                .release                 = u14_34f_release,                    \
+                .queuecommand            = u14_34f_queuecommand,               \
+                .eh_abort_handler        = u14_34f_eh_abort,                   \
+                .eh_device_reset_handler = NULL,                               \
+                .eh_bus_reset_handler    = NULL,                               \
+                .eh_host_reset_handler   = u14_34f_eh_host_reset,              \
+                .bios_param              = u14_34f_bios_param,                 \
+                .slave_configure         = u14_34f_slave_configure,            \
+                .this_id                 = 7,                                  \
+                .unchecked_isa_dma       = 1,                                  \
+                .use_clustering          = ENABLE_CLUSTERING                   \
                 }
diff -Nru a/drivers/scsi/ultrastor.h b/drivers/scsi/ultrastor.h
--- a/drivers/scsi/ultrastor.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/scsi/ultrastor.h	Sun Dec 15 18:08:29 2002
@@ -30,19 +30,19 @@
 #define ULTRASTOR_24F_PORT 0xC80
 
 
-#define ULTRASTOR_14F {   name:              "UltraStor 14F/24F/34F", 	\
-			  detect:            ultrastor_detect, 		\
-			  info:              ultrastor_info, 		\
-			  queuecommand:      ultrastor_queuecommand,	\
-			  eh_abort_handler:  ultrastor_abort, 		\
-			  eh_host_reset_handler:  ultrastor_host_reset,	\
-			  bios_param:        ultrastor_biosparam, 	\
-			  can_queue:         ULTRASTOR_MAX_CMDS,	\
-			  this_id:           0, 			\
-			  sg_tablesize:      ULTRASTOR_14F_MAX_SG, 	\
-			  cmd_per_lun:       ULTRASTOR_MAX_CMDS_PER_LUN,\
-			  unchecked_isa_dma: 1, 			\
-			  use_clustering:    ENABLE_CLUSTERING }
+#define ULTRASTOR_14F {   .name              = "UltraStor 14F/24F/34F", 	\
+			  .detect            = ultrastor_detect, 		\
+			  .info              = ultrastor_info, 		\
+			  .queuecommand      = ultrastor_queuecommand,	\
+			  .eh_abort_handler  = ultrastor_abort, 		\
+			  .eh_host_reset_handler  = ultrastor_host_reset,	\
+			  .bios_param        = ultrastor_biosparam, 	\
+			  .can_queue         = ULTRASTOR_MAX_CMDS,	\
+			  .this_id           = 0, 			\
+			  .sg_tablesize      = ULTRASTOR_14F_MAX_SG, 	\
+			  .cmd_per_lun       = ULTRASTOR_MAX_CMDS_PER_LUN,\
+			  .unchecked_isa_dma = 1, 			\
+			  .use_clustering    = ENABLE_CLUSTERING }
 
 
 #ifdef ULTRASTOR_PRIVATE
diff -Nru a/drivers/scsi/wd7000.h b/drivers/scsi/wd7000.h
--- a/drivers/scsi/wd7000.h	Sun Dec 15 18:08:32 2002
+++ b/drivers/scsi/wd7000.h	Sun Dec 15 18:08:32 2002
@@ -44,21 +44,21 @@
 #define WD7000_SG   16
 
 #define WD7000 {						\
-	proc_name:		"wd7000",			\
-	proc_info:		wd7000_proc_info,		\
-	name:			"Western Digital WD-7000",	\
-	detect:			wd7000_detect,			\
-	command:		wd7000_command,			\
-	queuecommand:		wd7000_queuecommand,		\
-	eh_bus_reset_handler:	wd7000_bus_reset,		\
-	eh_device_reset_handler:wd7000_device_reset,		\
-	eh_host_reset_handler:	wd7000_host_reset,		\
-	bios_param:		wd7000_biosparam,		\
-	can_queue:		WD7000_Q,			\
-	this_id:		7,				\
-	sg_tablesize:		WD7000_SG,			\
-	cmd_per_lun:		1,				\
-	unchecked_isa_dma:	1,				\
-	use_clustering:		ENABLE_CLUSTERING,		\
+	.proc_name		= "wd7000",			\
+	.proc_info		= wd7000_proc_info,		\
+	.name			= "Western Digital WD-7000",	\
+	.detect			= wd7000_detect,			\
+	.command		= wd7000_command,			\
+	.queuecommand		= wd7000_queuecommand,		\
+	.eh_bus_reset_handler	= wd7000_bus_reset,		\
+	.eh_device_reset_handler = wd7000_device_reset,		\
+	.eh_host_reset_handler	= wd7000_host_reset,		\
+	.bios_param		= wd7000_biosparam,		\
+	.can_queue		= WD7000_Q,			\
+	.this_id		= 7,				\
+	.sg_tablesize		= WD7000_SG,			\
+	.cmd_per_lun		= 1,				\
+	.unchecked_isa_dma	= 1,				\
+	.use_clustering		= ENABLE_CLUSTERING,		\
 }
 #endif
diff -Nru a/drivers/serial/Makefile b/drivers/serial/Makefile
--- a/drivers/serial/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/serial/Makefile	Sun Dec 15 18:08:29 2002
@@ -29,5 +29,3 @@
 obj-$(CONFIG_SERIAL_68360) += 68360serial.o
 obj-$(CONFIG_SERIAL_COLDFIRE) += mcfserial.o
 obj-$(CONFIG_V850E_NB85E_UART) += nb85e_uart.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/sgi/Makefile b/drivers/sgi/Makefile
--- a/drivers/sgi/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/sgi/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,5 +8,3 @@
 subdir-m	+= char
 
 obj-y		+= char/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/sgi/char/Makefile b/drivers/sgi/char/Makefile
--- a/drivers/sgi/char/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/sgi/char/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,5 +8,3 @@
 obj-$(CONFIG_SGI_SERIAL)	+= sgiserial.o
 obj-$(CONFIG_SGI_DS1286)	+= ds1286.o
 obj-$(CONFIG_SGI_NEWPORT_GFX)	+= graphics.o rrm.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/tc/Makefile b/drivers/tc/Makefile
--- a/drivers/tc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/tc/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,8 +13,6 @@
 obj-$(CONFIG_ZS) += zs.o
 obj-$(CONFIG_VT) += lk201.o lk201-map.o lk201-remap.o
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/lk201-map.o: $(obj)/lk201-map.c
 
 # Uncomment if you're changing the keymap and have an appropriate
diff -Nru a/drivers/telephony/Makefile b/drivers/telephony/Makefile
--- a/drivers/telephony/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/telephony/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,6 +7,3 @@
 obj-$(CONFIG_PHONE) += phonedev.o
 obj-$(CONFIG_PHONE_IXJ) += ixj.o
 obj-$(CONFIG_PHONE_IXJ_PCMCIA) += ixj_pcmcia.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/usb/Makefile b/drivers/usb/Makefile
--- a/drivers/usb/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/usb/Makefile	Sun Dec 15 18:08:32 2002
@@ -58,5 +58,3 @@
 obj-$(CONFIG_USB_TEST)		+= misc/
 obj-$(CONFIG_USB_TIGL)		+= misc/
 obj-$(CONFIG_USB_USS720)	+= misc/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
--- a/drivers/usb/class/Kconfig	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/class/Kconfig	Sun Dec 15 18:08:28 2002
@@ -16,9 +16,12 @@
 	  The module will be called audio.o. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+comment "USB Bluetooth TTY can only be used with disabled Bluetooth subsystem"
+	depends on USB && BT
+
 config USB_BLUETOOTH_TTY
 	tristate "USB Bluetooth TTY support"
-	depends on USB
+	depends on USB && BT=n
 	---help---
 	  This driver implements a nonstandard tty interface to a Bluetooth
 	  device that can be used only by specialized Bluetooth HCI software.
diff -Nru a/drivers/usb/class/Makefile b/drivers/usb/class/Makefile
--- a/drivers/usb/class/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/class/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,6 +8,3 @@
 obj-$(CONFIG_USB_BLUETOOTH_TTY)	+= bluetty.o
 obj-$(CONFIG_USB_MIDI)		+= usb-midi.o
 obj-$(CONFIG_USB_PRINTER)	+= usblp.o
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
--- a/drivers/usb/class/usblp.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/class/usblp.c	Sun Dec 15 18:08:28 2002
@@ -188,8 +188,6 @@
 
 extern devfs_handle_t usb_devfs_handle;			/* /dev/usb dir. */
 
-static struct usblp *usblp_table[USBLP_MINORS];
-
 /* Quirks: various printer quirks are handled by this table & its flags. */
 
 struct quirk_printer_struct {
@@ -325,17 +323,22 @@
 
 static int usblp_open(struct inode *inode, struct file *file)
 {
-	int minor = minor(inode->i_rdev) - USBLP_MINOR_BASE;
+	int minor = minor(inode->i_rdev);
 	struct usblp *usblp;
+	struct usb_interface *intf;
 	int retval;
 
 	if (minor < 0 || minor >= USBLP_MINORS)
 		return -ENODEV;
 
 	lock_kernel();
-	usblp  = usblp_table[minor];
 
 	retval = -ENODEV;
+	intf = usb_find_interface(&usblp_driver, mk_kdev(USB_MAJOR,minor));
+	if (!intf) {
+		goto out;
+	}
+	usblp = dev_get_drvdata (&intf->dev);
 	if (!usblp || !usblp->dev)
 		goto out;
 
@@ -382,7 +385,6 @@
 static void usblp_cleanup (struct usblp *usblp)
 {
 	devfs_unregister (usblp->devfs);
-	usblp_table [usblp->minor] = NULL;
 	usb_deregister_dev (1, usblp->minor);
 	info("usblp%d: removed", usblp->minor);
 
@@ -905,14 +907,11 @@
 	usblp_check_status(usblp, 0);
 #endif
 
-	/* add a table entry so the device works when advertised */
-	usblp_table[usblp->minor] = usblp;
-
 	/* If we have devfs, create with perms=660. */
 	sprintf(name, "lp%d", usblp->minor);
 	usblp->devfs = devfs_register(usb_devfs_handle, name,
 				      DEVFS_FL_DEFAULT, USB_MAJOR,
-				      USBLP_MINOR_BASE + usblp->minor,
+				      usblp->minor,
 				      S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
 				      S_IWGRP, &usblp_fops, NULL);
 
@@ -925,6 +924,10 @@
 		usblp->dev->descriptor.idProduct);
 
 	dev_set_drvdata (&intf->dev, usblp);
+
+	/* add device id so the device works when advertised */
+	intf->kdev = mk_kdev(USB_MAJOR,usblp->minor);
+
 	return 0;
 
 abort_minor:
@@ -1108,6 +1111,9 @@
 static void usblp_disconnect(struct usb_interface *intf)
 {
 	struct usblp *usblp = dev_get_drvdata (&intf->dev);
+
+	/* remove device id to disable open() */
+	intf->kdev = NODEV;
 
 	if (!usblp || !usblp->dev) {
 		err("bogus disconnect");
diff -Nru a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile
--- a/drivers/usb/core/Makefile	Sun Dec 15 18:08:33 2002
+++ b/drivers/usb/core/Makefile	Sun Dec 15 18:08:33 2002
@@ -16,5 +16,3 @@
 endif
 
 obj-$(CONFIG_USB)	+= usbcore.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/core/hub.c	Sun Dec 15 18:08:29 2002
@@ -768,35 +768,49 @@
  * Not covered by the spec - but easy to deal with.
  *
  * This implementation uses 400ms minimum debounce timeout and checks
- * every 100ms for transient disconnects to restart the delay.
+ * every 25ms for transient disconnects to restart the delay.
  */
 
 #define HUB_DEBOUNCE_TIMEOUT	400
-#define HUB_DEBOUNCE_STEP	100
+#define HUB_DEBOUNCE_STEP	 25
+#define HUB_DEBOUNCE_STABLE	  4
 
 /* return: -1 on error, 0 on success, 1 on disconnect.  */
 static int usb_hub_port_debounce(struct usb_device *hub, int port)
 {
 	int ret;
-	unsigned delay_time;
+	int delay_time, stable_count;
 	u16 portchange, portstatus;
+	unsigned connection;
 
-	for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; /* empty */ ) {
-
-		/* wait debounce step increment */
+	connection = 0;
+	stable_count = 0;
+	for (delay_time = 0; delay_time < HUB_DEBOUNCE_TIMEOUT; delay_time += HUB_DEBOUNCE_STEP) {
 		wait_ms(HUB_DEBOUNCE_STEP);
 
 		ret = usb_hub_port_status(hub, port, &portstatus, &portchange);
 		if (ret < 0)
 			return -1;
 
+		if ((portstatus & USB_PORT_STAT_CONNECTION) == connection) {
+			if (connection) {
+				if (++stable_count == HUB_DEBOUNCE_STABLE)
+					break;
+			}
+		} else {
+			stable_count = 0;
+		}
+		connection = portstatus & USB_PORT_STAT_CONNECTION;
+
 		if ((portchange & USB_PORT_STAT_C_CONNECTION)) {
 			usb_clear_port_feature(hub, port+1, USB_PORT_FEAT_C_CONNECTION);
-			delay_time = 0;
 		}
-		else
-			delay_time += HUB_DEBOUNCE_STEP;
 	}
+
+	/* XXX Replace this with dbg() when 2.6 is about to ship. */
+	info("debounce: hub %d port %d: delay %dms stable %d status 0x%x\n",
+	    hub->devnum, port, delay_time, stable_count, portstatus);
+
 	return ((portstatus&USB_PORT_STAT_CONNECTION)) ? 0 : 1;
 }
 
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/core/usb.c	Sun Dec 15 18:08:29 2002
@@ -470,6 +470,40 @@
 	return NULL;
 }
 
+/**
+ * usb_find_interface - find usb_interface pointer for driver and device
+ * @drv: the driver whose current configuration is considered
+ * @kdev: the desired device
+ *
+ * This walks the driver device list and returns a pointer to the interface 
+ * with the matching kdev_t.
+ */
+struct usb_interface *usb_find_interface(struct usb_driver *drv, kdev_t kdev)
+{
+	struct list_head *entry;
+	struct device *dev;
+	struct usb_interface *intf;
+
+	list_for_each(entry, &drv->driver.devices) {
+		dev = container_of(entry, struct device, driver_list);
+
+		/* can't look at usb devices, only interfaces */
+		if (dev->driver == &usb_generic_driver)
+			continue;
+
+		intf = to_usb_interface(dev);
+		if (!intf)
+			continue;
+
+		if (kdev_same(intf->kdev,kdev)) {
+			return intf;
+		}
+	}
+
+	/* no device found that matches */
+	return NULL;	
+}
+
 static int usb_device_match (struct device *dev, struct device_driver *drv)
 {
 	struct usb_interface *intf;
@@ -1445,6 +1479,7 @@
 EXPORT_SYMBOL(usb_interface_claimed);
 EXPORT_SYMBOL(usb_driver_release_interface);
 EXPORT_SYMBOL(usb_match_id);
+EXPORT_SYMBOL(usb_find_interface);
 
 EXPORT_SYMBOL(usb_new_device);
 EXPORT_SYMBOL(usb_reset_device);
diff -Nru a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
--- a/drivers/usb/host/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/usb/host/Makefile	Sun Dec 15 18:08:32 2002
@@ -8,5 +8,3 @@
 obj-$(CONFIG_USB_UHCI_HCD)	+= uhci-hcd.o
 
 obj-$(CONFIG_USB_SL811HS)	+= hc_sl811.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/image/Makefile b/drivers/usb/image/Makefile
--- a/drivers/usb/image/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/image/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 obj-$(CONFIG_USB_HPUSBSCSI)	+= hpusbscsi.o
 obj-$(CONFIG_USB_MICROTEK)	+= microtek.o
 obj-$(CONFIG_USB_SCANNER)	+= scanner.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/image/scanner.c b/drivers/usb/image/scanner.c
--- a/drivers/usb/image/scanner.c	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/image/scanner.c	Sun Dec 15 18:08:28 2002
@@ -398,6 +398,7 @@
 {
 	struct scn_usb_data *scn;
 	struct usb_device *dev;
+	struct usb_interface *intf;
 
 	int scn_minor;
 
@@ -409,13 +410,13 @@
 
 	dbg("open_scanner: scn_minor:%d", scn_minor);
 
-	if (!p_scn_table[scn_minor]) {
+	intf = usb_find_interface(&scanner_driver, mk_kdev(USB_MAJOR,scn_minor));
+	if (!intf) {
 		up(&scn_mutex);
 		err("open_scanner(%d): Unable to access minor data", scn_minor);
 		return -ENODEV;
 	}
-
-	scn = p_scn_table[scn_minor];
+	scn = dev_get_drvdata (&intf->dev);
 
 	dev = scn->scn_dev;
 
@@ -458,7 +459,7 @@
 static int
 close_scanner(struct inode * inode, struct file * file)
 {
-	struct scn_usb_data *scn;
+	struct scn_usb_data *scn = file->private_data;
 
 	int scn_minor;
 
@@ -466,15 +467,9 @@
 
 	dbg("close_scanner: scn_minor:%d", scn_minor);
 
-	if (!p_scn_table[scn_minor]) {
-		err("close_scanner(%d): invalid scn_minor", scn_minor);
-		return -ENODEV;
-	}
-
 	down(&scn_mutex);
-
-	scn = p_scn_table[scn_minor];
 	down(&(scn->sem));
+
 	scn->isopen = 0;
 
 	file->private_data = NULL;
@@ -695,17 +690,12 @@
 	      unsigned int cmd, unsigned long arg)
 {
 	struct usb_device *dev;
-
+	struct scn_usb_data *scn = file->private_data;
 	int scn_minor;
 
 	scn_minor = USB_SCN_MINOR(inode);
 
-	if (!p_scn_table[scn_minor]) {
-		err("ioctl_scanner(%d): invalid scn_minor", scn_minor);
-		return -ENODEV;
-	}
-
-	dev = p_scn_table[scn_minor]->scn_dev;
+	dev = scn->scn_dev;
 
 	switch (cmd)
 	{
@@ -987,13 +977,6 @@
 		return -ENOMEM;
 	}
 
-/* Check to make sure that the last slot isn't already taken */
-	if (p_scn_table[scn_minor]) {
-		err("probe_scanner: No more minor devices remaining.");
-		up(&scn_mutex);
-		return -ENOMEM;
-	}
-
 	dbg("probe_scanner: Allocated minor:%d", scn_minor);
 
 	if (!(scn = kmalloc (sizeof (struct scn_usb_data), GFP_KERNEL))) {
@@ -1082,17 +1065,19 @@
 	
 	scn->devfs = devfs_register(usb_devfs_handle, name,
 				    DEVFS_FL_DEFAULT, USB_MAJOR,
-				    SCN_BASE_MNR + scn->scn_minor,
+				    scn->scn_minor,
 				    S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP |
 				    S_IWGRP | S_IROTH | S_IWOTH, &usb_scanner_fops, NULL);
 	if (scn->devfs == NULL)
 		dbg("scanner%d: device node registration failed", scn_minor);
 
-	p_scn_table[scn_minor] = scn;
-
 	up(&scn_mutex);
 
 	dev_set_drvdata(&intf->dev, scn);
+
+	/* add device id so the device works when advertised */
+	intf->kdev = mk_kdev(USB_MAJOR,scn->scn_minor);
+
 	return 0;
 }
 
@@ -1101,6 +1086,9 @@
 {
 	struct scn_usb_data *scn = dev_get_drvdata(&intf->dev);
 
+	/* remove device id to disable open() */
+	intf->kdev = NODEV;
+
 	dev_set_drvdata(&intf->dev, NULL);
 	if (scn) {
 		down (&scn_mutex);
@@ -1119,7 +1107,6 @@
 		dbg("disconnect_scanner: De-allocating minor:%d", scn->scn_minor);
 		devfs_unregister(scn->devfs);
 		usb_deregister_dev(1, scn->scn_minor);
-		p_scn_table[scn->scn_minor] = NULL;
 		usb_free_urb(scn->scn_irq);
 		up (&(scn->sem));
 		kfree (scn);
diff -Nru a/drivers/usb/image/scanner.h b/drivers/usb/image/scanner.h
--- a/drivers/usb/image/scanner.h	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/image/scanner.h	Sun Dec 15 18:08:29 2002
@@ -216,7 +216,7 @@
 #define IS_EP_BULK_OUT(ep) (IS_EP_BULK(ep) && ((ep)->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)
 #define IS_EP_INTR(ep) ((ep)->bmAttributes == USB_ENDPOINT_XFER_INT ? 1 : 0)
 
-#define USB_SCN_MINOR(X) minor((X)->i_rdev) - SCN_BASE_MNR
+#define USB_SCN_MINOR(X) minor((X)->i_rdev)
 
 #ifdef DEBUG
 #define SCN_DEBUG(X) X
@@ -273,7 +273,5 @@
 };
 
 extern devfs_handle_t usb_devfs_handle;
-
-static struct scn_usb_data *p_scn_table[SCN_MAX_MNR] = { NULL, /* ... */};
 
 static struct usb_driver scanner_driver;
diff -Nru a/drivers/usb/input/Makefile b/drivers/usb/input/Makefile
--- a/drivers/usb/input/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/input/Makefile	Sun Dec 15 18:08:29 2002
@@ -30,5 +30,3 @@
 obj-$(CONFIG_USB_WACOM)		+= wacom.o
 obj-$(CONFIG_USB_POWERMATE)	+= powermate.o
 obj-$(CONFIG_USB_XPAD)		+= xpad.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/media/Makefile b/drivers/usb/media/Makefile
--- a/drivers/usb/media/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/media/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_USB_SE401)		+= se401.o
 obj-$(CONFIG_USB_STV680)	+= stv680.o
 obj-$(CONFIG_USB_VICAM)		+= vicam.o usbvideo.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
--- a/drivers/usb/misc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/misc/Makefile	Sun Dec 15 18:08:29 2002
@@ -14,5 +14,3 @@
 obj-$(CONFIG_USB_TEST)		+= usbtest.o
 obj-$(CONFIG_USB_TIGL)		+= tiglusb.o
 obj-$(CONFIG_USB_USS720)	+= uss720.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/net/Makefile b/drivers/usb/net/Makefile
--- a/drivers/usb/net/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/net/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,6 +8,3 @@
 obj-$(CONFIG_USB_PEGASUS)	+= pegasus.o
 obj-$(CONFIG_USB_RTL8150)	+= rtl8150.o
 obj-$(CONFIG_USB_USBNET)	+= usbnet.o
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
--- a/drivers/usb/net/pegasus.c	Sun Dec 15 18:08:32 2002
+++ b/drivers/usb/net/pegasus.c	Sun Dec 15 18:08:32 2002
@@ -45,7 +45,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.5.7 (2002/11/18)"
+#define DRIVER_VERSION "v0.5.8 (2002/12/13)"
 #define DRIVER_AUTHOR "Petko Manolov <petkan@users.sourceforge.net>"
 #define DRIVER_DESC "Pegasus/Pegasus II USB Ethernet driver"
 
@@ -118,9 +118,14 @@
 			 void *data)
 {
 	int ret;
-	unsigned char buffer[256];
+	char *buffer;
 	DECLARE_WAITQUEUE(wait, current);
 
+	buffer = kmalloc(size, GFP_DMA);
+	if (!buffer) {
+		warn("%s: looks like we're out of memory", __FUNCTION__);
+		return -ENOMEM;
+	}
 	add_wait_queue(&pegasus->ctrl_wait, &wait);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	while (pegasus->flags & ETH_REGS_CHANGED)
@@ -153,6 +158,7 @@
 out:
 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
 	memcpy(data, buffer, size);
+	kfree(buffer);
 
 	return ret;
 }
@@ -161,9 +167,14 @@
 			 void *data)
 {
 	int ret;
-	unsigned char buffer[256];
+	char *buffer;
 	DECLARE_WAITQUEUE(wait, current);
 
+	buffer = kmalloc(size, GFP_DMA);
+	if (!buffer) {
+		warn("%s: looks like we're out of memory", __FUNCTION__);
+		return -ENOMEM;
+	}
 	memcpy(buffer, data, size);
 
 	add_wait_queue(&pegasus->ctrl_wait, &wait);
@@ -196,6 +207,7 @@
 	schedule();
 out:
 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
+	kfree(buffer);
 
 	return ret;
 }
@@ -203,9 +215,15 @@
 static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data)
 {
 	int ret;
-	__u16 tmp = data;
+	char *tmp;
 	DECLARE_WAITQUEUE(wait, current);
 
+	tmp = kmalloc(1, GFP_DMA);
+	if (!tmp) {
+		warn("%s: looks like we're out of memory", __FUNCTION__);
+		return -ENOMEM;
+	}
+	memcpy(tmp, &data, 1);
 	add_wait_queue(&pegasus->ctrl_wait, &wait);
 	set_current_state(TASK_UNINTERRUPTIBLE);
 	while (pegasus->flags & ETH_REGS_CHANGED)
@@ -215,7 +233,7 @@
 
 	pegasus->dr.bRequestType = PEGASUS_REQT_WRITE;
 	pegasus->dr.bRequest = PEGASUS_REQ_SET_REG;
-	pegasus->dr.wValue = cpu_to_le16p(&tmp);
+	pegasus->dr.wValue = cpu_to_le16p(&data);
 	pegasus->dr.wIndex = cpu_to_le16p(&indx);
 	pegasus->dr.wLength = cpu_to_le16(1);
 	pegasus->ctrl_urb->transfer_buffer_length = 1;
@@ -223,7 +241,7 @@
 	usb_fill_control_urb(pegasus->ctrl_urb, pegasus->usb,
 			     usb_sndctrlpipe(pegasus->usb, 0),
 			     (char *) &pegasus->dr,
-			     &data, 1, ctrl_callback, pegasus);
+			     &tmp, 1, ctrl_callback, pegasus);
 
 	add_wait_queue(&pegasus->ctrl_wait, &wait);
 	set_current_state(TASK_UNINTERRUPTIBLE);
@@ -236,6 +254,7 @@
 	schedule();
 out:
 	remove_wait_queue(&pegasus->ctrl_wait, &wait);
+	kfree(tmp);
 
 	return ret;
 }
diff -Nru a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
--- a/drivers/usb/serial/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/usb/serial/Makefile	Sun Dec 15 18:08:28 2002
@@ -33,7 +33,4 @@
 # Objects that export symbols.
 export-objs	:= usb-serial.o ezusb.o
 
-usbserial-objs	:= usb-serial.o generic.o $(usbserial-obj-y)
-
-include $(TOPDIR)/Rules.make
-
+usbserial-objs	:= usb-serial.o generic.o bus.o $(usbserial-obj-y)
diff -Nru a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/drivers/usb/serial/bus.c	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,138 @@
+/*
+ * USB Serial Converter Bus specific functions
+ *
+ * Copyright (C) 2002 Greg Kroah-Hartman (greg@kroah.com)
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License version
+ *	2 as published by the Free Software Foundation.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/tty.h>
+#include <linux/module.h>
+#include <linux/usb.h>
+
+#ifdef CONFIG_USB_SERIAL_DEBUG
+	static int debug = 1;
+#else
+	static int debug;
+#endif
+
+#include "usb-serial.h"
+
+
+static int usb_serial_device_match (struct device *dev, struct device_driver *drv)
+{
+	struct usb_serial_device_type *driver;
+	const struct usb_serial_port *port;
+
+	/*
+	 * drivers are already assigned to ports in serial_probe so it's
+	 * a simple check here.
+	 */
+	port = to_usb_serial_port(dev);
+	if (!port)
+		return 0;
+
+	driver = to_usb_serial_driver(drv);
+
+	if (driver == port->serial->type)
+		return 1;
+
+	return 0;
+}
+
+struct bus_type usb_serial_bus_type = {
+	.name =		"usb-serial",
+	.match =	usb_serial_device_match,
+};
+
+static int usb_serial_device_probe (struct device *dev)
+{
+	struct usb_serial_device_type *driver;
+	struct usb_serial_port *port;
+	int retval = 0;
+	int minor;
+
+	port = to_usb_serial_port(dev);
+	if (!port) {
+		retval = -ENODEV;
+		goto exit;
+	}
+
+	driver = port->serial->type;
+	if (driver->port_probe) {
+		if (!try_module_get(driver->owner)) {
+			err ("module get failed, exiting");
+			retval = -EIO;
+			goto exit;
+		}
+		retval = driver->port_probe (port);
+		module_put(driver->owner);
+		if (retval)
+			goto exit;
+	}
+
+	minor = port->number;
+
+	tty_register_devfs (&usb_serial_tty_driver, 0, minor);
+	info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)",
+	     driver->name, minor, minor);
+
+exit:
+	return retval;
+}
+
+static int usb_serial_device_remove (struct device *dev)
+{
+	struct usb_serial_device_type *driver;
+	struct usb_serial_port *port;
+	int retval = 0;
+	int minor;
+
+	port = to_usb_serial_port(dev);
+	if (!port) {
+		return -ENODEV;
+	}
+
+	driver = port->serial->type;
+	if (driver->port_remove) {
+		if (!try_module_get(driver->owner)) {
+			err ("module get failed, exiting");
+			retval = -EIO;
+			goto exit;
+		}
+		retval = driver->port_remove (port);
+		module_put(driver->owner);
+	}
+exit:
+	minor = port->number;
+	tty_unregister_devfs (&usb_serial_tty_driver, minor);
+	info("%s converter now disconnected from ttyUSB%d",
+	     driver->name, minor);
+
+	return retval;
+}
+
+int usb_serial_bus_register(struct usb_serial_device_type *device)
+{
+	int retval;
+
+	device->driver.name = (char *)device->name;
+	device->driver.bus = &usb_serial_bus_type;
+	device->driver.probe = usb_serial_device_probe;
+	device->driver.remove = usb_serial_device_remove;
+
+	retval = driver_register(&device->driver);
+
+	return retval;
+}
+
+void usb_serial_bus_deregister(struct usb_serial_device_type *device)
+{
+	driver_unregister (&device->driver);
+}
+
diff -Nru a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/serial/usb-serial.c	Sun Dec 15 18:08:29 2002
@@ -14,6 +14,10 @@
  *
  * See Documentation/usb/usb-serial.txt for more information on using this driver
  *
+ * (12/10/2002) gkh
+ *	Split the ports off into their own struct device, and added a
+ *	usb-serial bus driver.
+ *
  * (11/19/2002) gkh
  *	removed a few #ifdefs for the generic code and cleaned up the failure
  *	logic in initialization.
@@ -345,7 +349,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v1.8"
+#define DRIVER_VERSION "v2.0"
 #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/"
 #define DRIVER_DESC "USB Serial Driver core"
 
@@ -378,13 +382,13 @@
 */
 
 static int			serial_refcount;
-static struct tty_driver	serial_tty_driver;
 static struct tty_struct *	serial_tty[SERIAL_TTY_MINORS];
 static struct termios *		serial_termios[SERIAL_TTY_MINORS];
 static struct termios *		serial_termios_locked[SERIAL_TTY_MINORS];
 static struct usb_serial	*serial_table[SERIAL_TTY_MINORS];	/* initially all NULL */
 static LIST_HEAD(usb_serial_driver_list);
 
+
 struct usb_serial *usb_serial_get_by_minor (unsigned int minor)
 {
 	return serial_table[minor];
@@ -1132,11 +1136,17 @@
 		}
 	}
 
-	/* initialize the devfs nodes for this device and let the user know what ports we are bound to */
-	for (i = 0; i < serial->num_ports; ++i) {
-		tty_register_devfs (&serial_tty_driver, 0, serial->port[i].number);
-		info("%s converter now attached to ttyUSB%d (or usb/tts/%d for devfs)", 
-		     type->name, serial->port[i].number, serial->port[i].number);
+	/* register all of the individual ports with the driver core */
+	for (i = 0; i < num_ports; ++i) {
+		port = &serial->port[i];
+		port->dev.parent = &serial->dev->dev;
+		port->dev.driver = NULL;
+		port->dev.bus = &usb_serial_bus_type;
+
+		snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
+		snprintf (&port->dev.name[0], sizeof(port->dev.name), "usb serial port %d", port->number);
+		dbg ("%s - registering %s", __FUNCTION__, port->dev.bus_id);
+		device_register (&port->dev);
 	}
 
 	usb_serial_console_init (debug, minor);
@@ -1204,6 +1214,9 @@
 		serial_shutdown (serial);
 
 		for (i = 0; i < serial->num_ports; ++i)
+			device_unregister(&serial->port[i].dev);
+
+		for (i = 0; i < serial->num_ports; ++i)
 			serial->port[i].open_count = 0;
 
 		for (i = 0; i < serial->num_bulk_in; ++i) {
@@ -1233,12 +1246,6 @@
 			if (port->interrupt_in_buffer)
 				kfree (port->interrupt_in_buffer);
 		}
-
-		for (i = 0; i < serial->num_ports; ++i) {
-			tty_unregister_devfs (&serial_tty_driver, serial->port[i].number);
-			info("%s converter now disconnected from ttyUSB%d", serial->type->name, serial->port[i].number);
-		}
-
 		/* return the minor range that this device had */
 		return_serial (serial);
 
@@ -1250,7 +1257,7 @@
 }
 
 
-static struct tty_driver serial_tty_driver = {
+struct tty_driver usb_serial_tty_driver = {
 	.magic =		TTY_DRIVER_MAGIC,
 	.driver_name =		"usb-serial",
 #ifndef CONFIG_DEVFS_FS
@@ -1294,6 +1301,8 @@
 		serial_table[i] = NULL;
 	}
 
+	bus_register(&usb_serial_bus_type);
+
 	/* register the generic driver, if we should */
 	result = usb_serial_generic_register(debug);
 	if (result < 0) {
@@ -1302,9 +1311,9 @@
 	}
 
 	/* register the tty driver */
-	serial_tty_driver.init_termios          = tty_std_termios;
-	serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-	result = tty_register_driver (&serial_tty_driver);
+	usb_serial_tty_driver.init_termios = tty_std_termios;
+	usb_serial_tty_driver.init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+	result = tty_register_driver (&usb_serial_tty_driver);
 	if (result) {
 		err("%s - tty_register_driver failed", __FUNCTION__);
 		goto exit_generic;
@@ -1322,7 +1331,7 @@
 	return result;
 
 exit_tty:
-	tty_unregister_driver(&serial_tty_driver);
+	tty_unregister_driver(&usb_serial_tty_driver);
 
 exit_generic:
 	usb_serial_generic_deregister();
@@ -1340,7 +1349,8 @@
 	usb_serial_generic_deregister();
 
 	usb_deregister(&usb_serial_driver);
-	tty_unregister_driver(&serial_tty_driver);
+	tty_unregister_driver(&usb_serial_tty_driver);
+	bus_unregister(&usb_serial_bus_type);
 }
 
 
@@ -1350,12 +1360,24 @@
 
 int usb_serial_register(struct usb_serial_device_type *new_device)
 {
+	int retval;
+
 	/* Add this device to our list of devices */
 	list_add(&new_device->driver_list, &usb_serial_driver_list);
 
-	info ("USB Serial support registered for %s", new_device->name);
+	retval =  usb_serial_bus_register (new_device);
 
-	return 0;
+	if (retval)
+		goto error;
+
+	info("USB Serial support registered for %s", new_device->name);
+
+	return retval;
+error:
+	err("problem %d when registering driver %s", retval, new_device->name);
+	list_del(&new_device->driver_list);
+
+	return retval;
 }
 
 
@@ -1376,6 +1398,7 @@
 	}
 
 	list_del(&device->driver_list);
+	usb_serial_bus_deregister (device);
 }
 
 
diff -Nru a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
--- a/drivers/usb/serial/usb-serial.h	Sun Dec 15 18:08:33 2002
+++ b/drivers/usb/serial/usb-serial.h	Sun Dec 15 18:08:33 2002
@@ -121,7 +121,9 @@
 	int			open_count;
 	struct semaphore	sem;
 	void *			private;
+	struct device		dev;
 };
+#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
 
 /**
  * usb_serial - structure used by the usb-serial core for a device
@@ -206,13 +208,17 @@
 	char	num_ports;
 
 	struct list_head	driver_list;
-	
+	struct device_driver	driver;
+
 	int (*probe) (struct usb_serial *serial);
 	int (*attach) (struct usb_serial *serial);
 	int (*calc_num_ports) (struct usb_serial *serial);
 
 	void (*shutdown) (struct usb_serial *serial);
 
+	int (*port_probe) (struct usb_serial_port *port);
+	int (*port_remove) (struct usb_serial_port *port);
+
 	/* serial function calls */
 	int  (*open)		(struct usb_serial_port *port, struct file * filp);
 	void (*close)		(struct usb_serial_port *port, struct file * filp);
@@ -229,6 +235,7 @@
 	void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
 	void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
 };
+#define to_usb_serial_driver(d) container_of(d, struct usb_serial_device_type, driver)
 
 extern int  usb_serial_register(struct usb_serial_device_type *new_device);
 extern void usb_serial_deregister(struct usb_serial_device_type *device);
@@ -262,7 +269,12 @@
 extern int usb_serial_generic_register (int debug);
 extern void usb_serial_generic_deregister (void);
 
+extern int usb_serial_bus_register (struct usb_serial_device_type *device);
+extern void usb_serial_bus_deregister (struct usb_serial_device_type *device);
+
 extern struct usb_serial_device_type usb_serial_generic_device;
+extern struct bus_type usb_serial_bus_type;
+extern struct tty_driver usb_serial_tty_driver;
 
 /* Inline functions to check the sanity of a pointer that is passed to us */
 static inline int serial_paranoia_check (struct usb_serial *serial, const char *function)
diff -Nru a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
--- a/drivers/usb/storage/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/storage/Makefile	Sun Dec 15 18:08:29 2002
@@ -21,5 +21,3 @@
 
 usb-storage-objs :=	scsiglue.o protocol.o transport.o usb.o \
 			initializers.o $(usb-storage-obj-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h	Sun Dec 15 18:08:31 2002
+++ b/drivers/usb/storage/unusual_devs.h	Sun Dec 15 18:08:31 2002
@@ -214,9 +214,9 @@
 		US_FL_FIX_INQUIRY | US_FL_START_STOP ),
 
 /* This entry is needed because the device reports Sub=ff */
-UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0422, 
+UNUSUAL_DEV(  0x054c, 0x0010, 0x0106, 0x0440, 
 		"Sony",
-		"DSC-S30/S70/S75/505V/F505/F707", 
+		"DSC-S30/S70/S75/505V/F505/F707/F717", 
 		US_SC_SCSI, US_PR_CB, NULL,
 		US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE ),
 
@@ -502,6 +502,18 @@
 		US_SC_SCSI, US_PR_SDDR55, NULL,
 		US_FL_FIX_INQUIRY ),
 #endif
+
+/* Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100
+ * Only revision 1.13 tested (same for all of the above devices,
+ * based on the Datafab DF-UG-07 chip).  Needed for US_FL_FIX_INQUIRY.
+ * Submitted by Marek Michalkiewicz <marekm@amelek.gda.pl>.
+ * See also http://martin.wilck.bei.t-online.de/#kecf .
+ */
+UNUSUAL_DEV(  0x07c4, 0xa400, 0x0000, 0xffff,
+		"Datafab",
+		"KECF-USB",
+		US_SC_SCSI, US_PR_BULK, NULL,
+		US_FL_FIX_INQUIRY ),
 
 /* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant
  * to the USB storage specification in two ways:
diff -Nru a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
--- a/drivers/usb/usb-skeleton.c	Sun Dec 15 18:08:29 2002
+++ b/drivers/usb/usb-skeleton.c	Sun Dec 15 18:08:29 2002
@@ -1,5 +1,5 @@
 /*
- * USB Skeleton driver - 0.8
+ * USB Skeleton driver - 0.9
  *
  * Copyright (c) 2001-2002 Greg Kroah-Hartman (greg@kroah.com)
  *
@@ -17,10 +17,10 @@
  *
  * TODO:
  *	- fix urb->status race condition in write sequence
- *	- move minor_table to a dynamic list.
  *
  * History:
  *
+ * 2002_12_12 - 0.9 - compile fixes and got rid of fixed minor array.
  * 2002_09_26 - 0.8 - changes due to USB core conversion to struct device
  *			driver.
  * 2002_02_12 - 0.7 - zero out dev in probe function for devices that do
@@ -83,18 +83,10 @@
 
 
 #ifdef CONFIG_USB_DYNAMIC_MINORS
-/* 
- * if the user wants to use dynamic minor numbers, then we can have up to 256
- * devices
- */
 #define USB_SKEL_MINOR_BASE	0
-#define MAX_DEVICES		256
 #else
 /* Get a minor range for your devices from the usb maintainer */
 #define USB_SKEL_MINOR_BASE	200
-
-/* we can have up to this number of device plugged in at once */
-#define MAX_DEVICES		16
 #endif
 
 /* Structure to hold all of our device specific stuff */
@@ -117,8 +109,8 @@
 	struct urb *		write_urb;		/* the urb used to send data */
 	__u8			bulk_out_endpointAddr;	/* the address of the bulk out endpoint */
 
-	struct work_struct			work;			/* work queue entry for line discipline waking up */
-	int			open_count;		/* number of times this port has been opened */
+	struct work_struct	work;			/* work queue entry for line discipline waking up */
+	int			open;			/* if the port is open or not */
 	struct semaphore	sem;			/* locks this structure */
 };
 
@@ -139,13 +131,6 @@
 
 static void skel_write_bulk_callback	(struct urb *urb, struct pt_regs *regs);
 
-
-/* array of pointers to our devices that are currently connected */
-static struct usb_skel		*minor_table[MAX_DEVICES];
-
-/* lock to protect the minor_table structure */
-static DECLARE_MUTEX (minor_table_mutex);
-
 /*
  * File operations needed when we register this driver.
  * This assumes that this driver NEEDS file operations,
@@ -218,7 +203,6 @@
  */
 static inline void skel_delete (struct usb_skel *dev)
 {
-	minor_table[dev->minor] = NULL;
 	if (dev->bulk_in_buffer != NULL)
 		kfree (dev->bulk_in_buffer);
 	if (dev->bulk_out_buffer != NULL)
@@ -235,41 +219,31 @@
 static int skel_open (struct inode *inode, struct file *file)
 {
 	struct usb_skel *dev = NULL;
+	struct usb_interface *interface;
 	int subminor;
 	int retval = 0;
 	
-	dbg(__FUNCTION__);
+	dbg("%s", __FUNCTION__);
 
-	subminor = MINOR (inode->i_rdev) - USB_SKEL_MINOR_BASE;
-	if ((subminor < 0) ||
-	    (subminor >= MAX_DEVICES)) {
-		return -ENODEV;
-	}
+	subminor = minor (inode->i_rdev);
 
-	/* Increment our usage count for the module.
-	 * This is redundant here, because "struct file_operations"
-	 * has an "owner" field. This line is included here soley as
-	 * a reference for drivers using lesser structures... ;-)
-	 */
-	MOD_INC_USE_COUNT;
-
-	/* lock our minor table and get our local data for this minor */
-	down (&minor_table_mutex);
-	dev = minor_table[subminor];
-	if (dev == NULL) {
-		up (&minor_table_mutex);
-		MOD_DEC_USE_COUNT;
+	interface = usb_find_interface (&skel_driver,
+					mk_kdev(USB_MAJOR, subminor));
+	if (!interface) {
+		err ("%s - error, can't find device for minor %d",
+		     __FUNCTION__, subminor);
 		return -ENODEV;
 	}
+			
+	dev = dev_get_drvdata (&interface->dev);
+	if (!dev)
+		return -ENODEV;
 
 	/* lock this device */
 	down (&dev->sem);
 
-	/* unlock the minor table */
-	up (&minor_table_mutex);
-
 	/* increment our usage count for the driver */
-	++dev->open_count;
+	++dev->open;
 
 	/* save our object in the file's private structure */
 	file->private_data = dev;
@@ -291,20 +265,17 @@
 
 	dev = (struct usb_skel *)file->private_data;
 	if (dev == NULL) {
-		dbg (__FUNCTION__ " - object is NULL");
+		dbg ("%s - object is NULL", __FUNCTION__);
 		return -ENODEV;
 	}
 
-	dbg(__FUNCTION__ " - minor %d", dev->minor);
-
-	/* lock our minor table */
-	down (&minor_table_mutex);
+	dbg("%s - minor %d", __FUNCTION__, dev->minor);
 
 	/* lock our device */
 	down (&dev->sem);
 
-	if (dev->open_count <= 0) {
-		dbg (__FUNCTION__ " - device not opened");
+	if (dev->open <= 0) {
+		dbg ("%s - device not opened", __FUNCTION__);
 		retval = -ENODEV;
 		goto exit_not_opened;
 	}
@@ -313,25 +284,16 @@
 		/* the device was unplugged before the file was released */
 		up (&dev->sem);
 		skel_delete (dev);
-		up (&minor_table_mutex);
-		MOD_DEC_USE_COUNT;
 		return 0;
 	}
 
-	/* decrement our usage count for the device */
-	--dev->open_count;
-	if (dev->open_count <= 0) {
-		/* shutdown any bulk writes that might be going on */
-		usb_unlink_urb (dev->write_urb);
-		dev->open_count = 0;
-	}
+	/* shutdown any bulk writes that might be going on */
+	usb_unlink_urb (dev->write_urb);
 
-	/* decrement our usage count for the module */
-	MOD_DEC_USE_COUNT;
+	dev->open = 0;
 
 exit_not_opened:
 	up (&dev->sem);
-	up (&minor_table_mutex);
 
 	return retval;
 }
@@ -347,7 +309,7 @@
 
 	dev = (struct usb_skel *)file->private_data;
 	
-	dbg(__FUNCTION__ " - minor %d, count = %d", dev->minor, count);
+	dbg("%s - minor %d, count = %d", __FUNCTION__, dev->minor, count);
 
 	/* lock this object */
 	down (&dev->sem);
@@ -390,7 +352,7 @@
 
 	dev = (struct usb_skel *)file->private_data;
 
-	dbg(__FUNCTION__ " - minor %d, count = %d", dev->minor, count);
+	dbg("%s - minor %d, count = %d", __FUNCTION__, dev->minor, count);
 
 	/* lock this object */
 	down (&dev->sem);
@@ -403,13 +365,13 @@
 
 	/* verify that we actually have some data to write */
 	if (count == 0) {
-		dbg(__FUNCTION__ " - write request of 0 bytes");
+		dbg("%s - write request of 0 bytes", __FUNCTION__);
 		goto exit;
 	}
 
 	/* see if we are already in the middle of a write */
 	if (dev->write_urb->status == -EINPROGRESS) {
-		dbg (__FUNCTION__ " - already writing");
+		dbg ("%s - already writing", __FUNCTION__);
 		goto exit;
 	}
 
@@ -438,8 +400,8 @@
 	 unless a spinlock is held */
 	retval = usb_submit_urb(dev->write_urb, GFP_KERNEL);
 	if (retval) {
-		err(__FUNCTION__ " - failed submitting write urb, error %d",
-		    retval);
+		err("%s - failed submitting write urb, error %d",
+		    __FUNCTION__, retval);
 	} else {
 		retval = bytes_written;
 	}
@@ -470,7 +432,7 @@
 		return -ENODEV;
 	}
 
-	dbg(__FUNCTION__ " - minor %d, cmd 0x%.4x, arg %ld", 
+	dbg("%s - minor %d, cmd 0x%.4x, arg %ld", __FUNCTION__,
 	    dev->minor, cmd, arg);
 
 
@@ -491,12 +453,12 @@
 {
 	struct usb_skel *dev = (struct usb_skel *)urb->context;
 
-	dbg(__FUNCTION__ " - minor %d", dev->minor);
+	dbg("%s - minor %d", __FUNCTION__, dev->minor);
 
 	if ((urb->status != -ENOENT) && 
 	    (urb->status != -ECONNRESET)) {
-		dbg(__FUNCTION__ " - nonzero write bulk status received: %d",
-		    urb->status);
+		dbg("%s - nonzero write bulk status received: %d",
+		    __FUNCTION__, urb->status);
 		return;
 	}
 
@@ -514,7 +476,7 @@
 {
 	struct usb_device *udev = interface_to_usbdev(interface);
 	struct usb_skel *dev = NULL;
-	struct usb_interface_descriptor *iface_desc;
+	struct usb_host_interface *iface_desc;
 	struct usb_endpoint_descriptor *endpoint;
 	int minor;
 	int buffer_size;
@@ -529,7 +491,6 @@
 		return -ENODEV;
 	}
 
-	down (&minor_table_mutex);
 	retval = usb_register_dev (&skel_fops, USB_SKEL_MINOR_BASE, 1, &minor);
 	if (retval) {
 		/* something prevented us from registering this driver */
@@ -544,7 +505,6 @@
 		goto exit_minor;
 	}
 	memset (dev, 0x00, sizeof (*dev));
-	minor_table[minor] = dev;
 
 	init_MUTEX (&dev->sem);
 	dev->udev = udev;
@@ -554,7 +514,7 @@
 	/* set up the endpoint information */
 	/* check out the endpoints */
 	iface_desc = &interface->altsetting[0];
-	for (i = 0; i < iface_desc->bNumEndpoints; ++i) {
+	for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
 		endpoint = &iface_desc->endpoint[i].desc;
 
 		if ((endpoint->bEndpointAddress & 0x80) &&
@@ -600,13 +560,17 @@
 	
 	dev->devfs = devfs_register (usb_devfs_handle, name,
 				     DEVFS_FL_DEFAULT, USB_MAJOR,
-				     USB_SKEL_MINOR_BASE + dev->minor,
+				     dev->minor,
 				     S_IFCHR | S_IRUSR | S_IWUSR | 
 				     S_IRGRP | S_IWGRP | S_IROTH, 
 				     &skel_fops, NULL);
 
 	/* let the user know what node this device is now attached to */
 	info ("USB Skeleton device now attached to USBSkel%d", dev->minor);
+
+	/* add device id so the device works when advertised */
+	interface->kdev = mk_kdev(USB_MAJOR, dev->minor);
+
 	goto exit;
 	
 error:
@@ -617,7 +581,6 @@
 	usb_deregister_dev (1, minor);
 
 exit:
-	up (&minor_table_mutex);
 	if (dev) {
 		dev_set_drvdata (&interface->dev, dev);
 		return 0;
@@ -642,9 +605,11 @@
 	if (!dev)
 		return;
 
-	down (&minor_table_mutex);
 	down (&dev->sem);
 		
+	/* remove device id to disable open() */
+	interface->kdev = NODEV;
+
 	minor = dev->minor;
 
 	/* remove our devfs node */
@@ -654,7 +619,7 @@
 	usb_deregister_dev (1, minor);
 	
 	/* if the device is not opened, then we clean up right now */
-	if (!dev->open_count) {
+	if (!dev->open) {
 		up (&dev->sem);
 		skel_delete (dev);
 	} else {
@@ -663,7 +628,6 @@
 	}
 
 	info("USB Skeleton #%d now disconnected", minor);
-	up (&minor_table_mutex);
 }
 
 
diff -Nru a/drivers/video/Makefile b/drivers/video/Makefile
--- a/drivers/video/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/video/Makefile	Sun Dec 15 18:08:28 2002
@@ -88,8 +88,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := promcon_tbl.c
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/promcon_tbl.c: $(src)/prom.uni
 	$(objtree)/scripts/conmakehash $< | \
 	sed -e '/#include <[^>]*>/p' -e 's/types/init/' \
diff -Nru a/drivers/video/aty/Makefile b/drivers/video/aty/Makefile
--- a/drivers/video/aty/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/video/aty/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,6 +4,3 @@
 atyfb-$(CONFIG_FB_ATY_GX)	+= mach64_gx.o
 atyfb-$(CONFIG_FB_ATY_CT)	+= mach64_ct.o mach64_cursor.o
 atyfb-objs			:= $(atyfb-y)
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/video/console/Makefile b/drivers/video/console/Makefile
--- a/drivers/video/console/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/video/console/Makefile	Sun Dec 15 18:08:29 2002
@@ -52,8 +52,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := promcon_tbl.c
 
-include $(TOPDIR)/Rules.make
-
 $(obj)/promcon_tbl.c: $(src)/prom.uni
 	$(objtree)/scripts/conmakehash $< | \
 	sed -e '/#include <[^>]*>/p' -e 's/types/init/' \
diff -Nru a/drivers/video/matrox/Makefile b/drivers/video/matrox/Makefile
--- a/drivers/video/matrox/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/video/matrox/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,6 +15,3 @@
 obj-$(CONFIG_FB_MATROX)           += matroxfb_base.o matroxfb_accel.o matroxfb_DAC1064.o matroxfb_Ti3026.o matroxfb_misc.o $(my-obj-y)
 obj-$(CONFIG_FB_MATROX_I2C)       += i2c-matroxfb.o
 obj-$(CONFIG_FB_MATROX_MAVEN)     += matroxfb_maven.o matroxfb_crtc2.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/drivers/video/riva/Makefile b/drivers/video/riva/Makefile
--- a/drivers/video/riva/Makefile	Sun Dec 15 18:08:28 2002
+++ b/drivers/video/riva/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_FB_RIVA) += rivafb.o
 
 rivafb-objs := fbdev.o riva_hw.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/drivers/video/sis/Makefile b/drivers/video/sis/Makefile
--- a/drivers/video/sis/Makefile	Sun Dec 15 18:08:32 2002
+++ b/drivers/video/sis/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,7 +7,3 @@
 obj-$(CONFIG_FB_SIS) += sisfb.o
 
 sisfb-objs := sis_main.o sis_accel.o init.o init301.o
-
-include $(TOPDIR)/Rules.make
-
-
diff -Nru a/drivers/zorro/Makefile b/drivers/zorro/Makefile
--- a/drivers/zorro/Makefile	Sun Dec 15 18:08:29 2002
+++ b/drivers/zorro/Makefile	Sun Dec 15 18:08:29 2002
@@ -12,8 +12,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := devlist.h
 
-include $(TOPDIR)/Rules.make
-
 # Dependencies on generated files need to be listed explicitly
 
 $(obj)/names.o: $(obj)/devlist.h
diff -Nru a/fs/Makefile b/fs/Makefile
--- a/fs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/Makefile	Sun Dec 15 18:08:29 2002
@@ -15,6 +15,8 @@
 		filesystems.o namespace.o seq_file.o xattr.o libfs.o \
 		fs-writeback.o mpage.o direct-io.o aio.o eventpoll.o
 
+obj-$(CONFIG_COMPAT) += compat.o
+
 ifneq ($(CONFIG_NFSD),n)
 ifneq ($(CONFIG_NFSD),)
 obj-y += nfsctl.o
@@ -94,5 +96,3 @@
 obj-$(CONFIG_XFS_FS)		+= xfs/
 obj-$(CONFIG_AFS_FS)		+= afs/
 obj-$(CONFIG_BEFS_FS)		+= befs/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/adfs/Makefile b/fs/adfs/Makefile
--- a/fs/adfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/adfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_ADFS_FS) += adfs.o
 
 adfs-objs := dir.o dir_f.o dir_fplus.o file.o inode.o map.o super.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/adfs/inode.c b/fs/adfs/inode.c
--- a/fs/adfs/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/adfs/inode.c	Sun Dec 15 18:08:29 2002
@@ -51,9 +51,9 @@
 	return 0;
 }
 
-static int adfs_writepage(struct page *page)
+static int adfs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, adfs_get_block);
+	return block_write_full_page(page, adfs_get_block, wbc);
 }
 
 static int adfs_readpage(struct file *file, struct page *page)
diff -Nru a/fs/affs/Makefile b/fs/affs/Makefile
--- a/fs/affs/Makefile	Sun Dec 15 18:08:32 2002
+++ b/fs/affs/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_AFFS_FS) += affs.o
 
 affs-objs := super.o namei.o inode.o file.o dir.o amigaffs.o bitmap.o symlink.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/affs/file.c b/fs/affs/file.c
--- a/fs/affs/file.c	Sun Dec 15 18:08:29 2002
+++ b/fs/affs/file.c	Sun Dec 15 18:08:29 2002
@@ -407,9 +407,9 @@
 	return -ENOSPC;
 }
 
-static int affs_writepage(struct page *page)
+static int affs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, affs_get_block);
+	return block_write_full_page(page, affs_get_block, wbc);
 }
 static int affs_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/afs/Makefile b/fs/afs/Makefile
--- a/fs/afs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/afs/Makefile	Sun Dec 15 18:08:29 2002
@@ -24,5 +24,3 @@
 	volume.o
 
 obj-$(CONFIG_AFS_FS)  := kafs.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/autofs/Makefile b/fs/autofs/Makefile
--- a/fs/autofs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/autofs/Makefile	Sun Dec 15 18:08:33 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_AUTOFS_FS) += autofs.o
 
 autofs-objs := dirhash.o init.o inode.o root.o symlink.o waitq.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/autofs4/Makefile b/fs/autofs4/Makefile
--- a/fs/autofs4/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/autofs4/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_AUTOFS4_FS) += autofs4.o
 
 autofs4-objs := init.o inode.o root.o symlink.o waitq.o expire.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/befs/Makefile b/fs/befs/Makefile
--- a/fs/befs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/befs/Makefile	Sun Dec 15 18:08:33 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_BEFS_FS) += befs.o
 
 befs-objs := datastream.o btree.o super.o inode.o debug.o io.o linuxvfs.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/bfs/Makefile b/fs/bfs/Makefile
--- a/fs/bfs/Makefile	Sun Dec 15 18:08:31 2002
+++ b/fs/bfs/Makefile	Sun Dec 15 18:08:31 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_BFS_FS) += bfs.o
 
 bfs-objs := inode.o file.o dir.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/bfs/file.c b/fs/bfs/file.c
--- a/fs/bfs/file.c	Sun Dec 15 18:08:28 2002
+++ b/fs/bfs/file.c	Sun Dec 15 18:08:28 2002
@@ -130,9 +130,9 @@
 	return err;
 }
 
-static int bfs_writepage(struct page *page)
+static int bfs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, bfs_get_block);
+	return block_write_full_page(page, bfs_get_block, wbc);
 }
 
 static int bfs_readpage(struct file *file, struct page *page)
diff -Nru a/fs/block_dev.c b/fs/block_dev.c
--- a/fs/block_dev.c	Sun Dec 15 18:08:33 2002
+++ b/fs/block_dev.c	Sun Dec 15 18:08:33 2002
@@ -22,6 +22,7 @@
 #include <linux/mpage.h>
 #include <linux/mount.h>
 #include <linux/uio.h>
+#include <linux/namei.h>
 #include <asm/uaccess.h>
 
 
@@ -126,9 +127,9 @@
 				nr_segs, blkdev_get_blocks);
 }
 
-static int blkdev_writepage(struct page * page)
+static int blkdev_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, blkdev_get_block);
+	return block_write_full_page(page, blkdev_get_block, wbc);
 }
 
 static int blkdev_readpage(struct file * file, struct page * page)
@@ -795,4 +796,83 @@
 
 	sprintf(buffer, "%s(%d,%d)", name, MAJOR(dev), MINOR(dev));
 	return buffer;
+}
+
+/**
+ * open_bdev_excl  -  open a block device by name and set it up for use
+ *
+ * @path:	special file representing the block device
+ * @flags:	%MS_RDONLY for opening read-only
+ * @kind:	usage (same as the 4th paramter to blkdev_get)
+ * @holder:	owner for exclusion
+ *
+ * Open the blockdevice described by the special file at @path, claim it
+ * for the @holder and properly set it up for @kind usage.
+ */
+struct block_device *open_bdev_excl(const char *path, int flags,
+				    int kind, void *holder)
+{
+	struct inode *inode;
+	struct block_device *bdev;
+	struct nameidata nd;
+	mode_t mode = FMODE_READ;
+	int error = 0;
+
+	if (!path || !*path)
+		return ERR_PTR(-EINVAL);
+
+	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
+	if (error)
+		return ERR_PTR(error);
+
+	inode = nd.dentry->d_inode;
+	error = -ENOTBLK;
+	if (!S_ISBLK(inode->i_mode))
+		goto path_release;
+	error = -EACCES;
+	if (nd.mnt->mnt_flags & MNT_NODEV)
+		goto path_release;
+	error = bd_acquire(inode);
+	if (error)
+		goto path_release;
+	bdev = inode->i_bdev;
+
+	/* Done with lookups */
+	path_release(&nd);
+
+	if (!(flags & MS_RDONLY))
+		mode |= FMODE_WRITE;
+	error = blkdev_get(bdev, mode, 0, kind);
+	if (error)
+		return ERR_PTR(error);
+	error = -EACCES;
+	if (!(flags & MS_RDONLY) && bdev_read_only(bdev))
+		goto blkdev_put;
+	error = bd_claim(bdev, holder);
+	if (error)
+		goto blkdev_put;
+
+	return bdev;
+	
+blkdev_put:
+	blkdev_put(bdev, BDEV_FS);
+	return ERR_PTR(error);
+
+path_release:
+	path_release(&nd);
+	return ERR_PTR(error);
+}
+
+/**
+ * close_bdev_excl  -  release a blockdevice openen by open_bdev_excl()
+ *
+ * @bdev:	blockdevice to close
+ * @kind:	usage (same as the 4th paramter to blkdev_get)
+ *
+ * This is the counterpart to open_bdev_excl().
+ */
+void close_bdev_excl(struct block_device *bdev, int kind)
+{
+	bd_release(bdev);
+	blkdev_put(bdev, kind);
 }
diff -Nru a/fs/buffer.c b/fs/buffer.c
--- a/fs/buffer.c	Sun Dec 15 18:08:29 2002
+++ b/fs/buffer.c	Sun Dec 15 18:08:29 2002
@@ -219,8 +219,10 @@
 	sync_inodes_sb(sb, 0);
 	DQUOT_SYNC(sb);
 	lock_super(sb);
-	if (sb->s_dirt && sb->s_op && sb->s_op->write_super)
+	if (sb->s_dirt && sb->s_op->write_super)
 		sb->s_op->write_super(sb);
+	if (sb->s_op->sync_fs)
+		sb->s_op->sync_fs(sb, 1);
 	unlock_super(sb);
 	sync_blockdev(sb->s_bdev);
 	sync_inodes_sb(sb, 1);
@@ -251,10 +253,12 @@
 asmlinkage long sys_sync(void)
 {
 	wakeup_bdflush(0);
-	sync_inodes(0);	/* All mappings and inodes, including block devices */
+	sync_inodes(0);		/* All mappings, inodes and their blockdevs */
 	DQUOT_SYNC(NULL);
-	sync_supers();	/* Write the superblocks */
-	sync_inodes(1);	/* All the mappings and inodes, again. */
+	sync_supers();		/* Write the superblocks */
+	sync_filesystems(0);	/* Start syncing the filesystems */
+	sync_filesystems(1);	/* Waitingly sync the filesystems */
+	sync_inodes(1);		/* Mappings, inodes and blockdevs, again. */
 	return 0;
 }
 
@@ -276,7 +280,7 @@
 	/* sync the superblock to buffers */
 	sb = inode->i_sb;
 	lock_super(sb);
-	if (sb->s_op && sb->s_op->write_super)
+	if (sb->s_op->write_super)
 		sb->s_op->write_super(sb);
 	unlock_super(sb);
 
@@ -1622,16 +1626,15 @@
  * state inside lock_buffer().
  *
  * If block_write_full_page() is called for regular writeback
- * (called_for_sync() is false) then it will return -EAGAIN for a locked
+ * (called_for_sync() is false) then it will redirty a page which has a locked
  * buffer.   This only can happen if someone has written the buffer directly,
  * with submit_bh().  At the address_space level PageWriteback prevents this
  * contention from occurring.
  */
-static int __block_write_full_page(struct inode *inode,
-			struct page *page, get_block_t *get_block)
+static int __block_write_full_page(struct inode *inode, struct page *page,
+			get_block_t *get_block, struct writeback_control *wbc)
 {
 	int err;
-	int ret = 0;
 	unsigned long block;
 	unsigned long last_block;
 	struct buffer_head *bh, *head;
@@ -1701,11 +1704,11 @@
 	do {
 		get_bh(bh);
 		if (buffer_mapped(bh) && buffer_dirty(bh)) {
-			if (called_for_sync()) {
+			if (wbc->sync_mode != WB_SYNC_NONE) {
 				lock_buffer(bh);
 			} else {
 				if (test_set_buffer_locked(bh)) {
-					ret = -EAGAIN;
+					__set_page_dirty_nobuffers(page);
 					continue;
 				}
 			}
@@ -1757,8 +1760,6 @@
 			SetPageUptodate(page);
 		end_page_writeback(page);
 	}
-	if (err == 0)
-		return ret;
 	return err;
 
 recover:
@@ -2483,7 +2484,8 @@
 /*
  * The generic ->writepage function for buffer-backed address_spaces
  */
-int block_write_full_page(struct page *page, get_block_t *get_block)
+int block_write_full_page(struct page *page, get_block_t *get_block,
+			struct writeback_control *wbc)
 {
 	struct inode * const inode = page->mapping->host;
 	const unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT;
@@ -2492,7 +2494,7 @@
 
 	/* Is the page fully inside i_size? */
 	if (page->index < end_index)
-		return __block_write_full_page(inode, page, get_block);
+		return __block_write_full_page(inode, page, get_block, wbc);
 
 	/* Is the page fully outside i_size? (truncate in progress) */
 	offset = inode->i_size & (PAGE_CACHE_SIZE-1);
@@ -2512,7 +2514,7 @@
 	memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
 	flush_dcache_page(page);
 	kunmap_atomic(kaddr, KM_USER0);
-	return __block_write_full_page(inode, page, get_block);
+	return __block_write_full_page(inode, page, get_block, wbc);
 }
 
 sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
@@ -2757,11 +2759,25 @@
 /*
  * There are no bdflush tunables left.  But distributions are
  * still running obsolete flush daemons, so we terminate them here.
+ *
+ * Use of bdflush() is deprecated and will be removed in a future kernel.
+ * The `pdflush' kernel threads fully replace bdflush daemons and this call.
  */
 asmlinkage long sys_bdflush(int func, long data)
 {
+	static int msg_count;
+
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
+
+	if (msg_count < 5) {
+		msg_count++;
+		printk(KERN_INFO
+			"warning: process `%s' used the obsolete bdflush"
+			" system call\n", current->comm);
+		printk(KERN_INFO "Fix your initscripts?\n");
+	}
+
 	if (func == 1)
 		do_exit(0);
 	return 0;
diff -Nru a/fs/cifs/Makefile b/fs/cifs/Makefile
--- a/fs/cifs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/cifs/Makefile	Sun Dec 15 18:08:28 2002
@@ -4,5 +4,3 @@
 obj-$(CONFIG_CIFS) += cifs.o
 
 cifs-objs := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o md4.o md5.o cifs_unicode.o nterr.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/cifs/file.c b/fs/cifs/file.c
--- a/fs/cifs/file.c	Sun Dec 15 18:08:28 2002
+++ b/fs/cifs/file.c	Sun Dec 15 18:08:28 2002
@@ -415,7 +415,7 @@
 }
 
 static int
-cifs_writepage(struct page* page)
+cifs_writepage(struct page* page, struct writeback_control *wbc)
 {
 	int rc = -EFAULT;
 	int xid;
diff -Nru a/fs/coda/Makefile b/fs/coda/Makefile
--- a/fs/coda/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/coda/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,6 +10,3 @@
 # If you want debugging output, please uncomment the following line.
 
 # EXTRA_CFLAGS += -DDEBUG -DDEBUG_SMB_MALLOC=1
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/compat.c b/fs/compat.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/compat.c	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,72 @@
+/*
+ *  linux/fs/compat.c
+ *
+ *  Kernel compatibililty routines for e.g. 32 bit syscall support
+ *  on 64 bit kernels.
+ *
+ *  Copyright (C) 2002 Stephen Rothwell, IBM Corporation
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#include <linux/linkage.h>
+#include <linux/compat.h>
+#include <linux/errno.h>
+#include <linux/time.h>
+#include <linux/fs.h>
+
+#include <asm/uaccess.h>
+
+/*
+ * Not all architectures have sys_utime, so implement this in terms
+ * of sys_utimes.
+ */
+asmlinkage long compat_sys_utime(char *filename, struct compat_utimbuf *t)
+{
+	struct timeval tv[2];
+
+	if (t) {
+		if (get_user(tv[0].tv_sec, &t->actime) ||
+		    get_user(tv[1].tv_sec, &t->modtime))
+			return -EFAULT;
+		tv[0].tv_usec = 0;
+		tv[1].tv_usec = 0;
+	}
+	return do_utimes(filename, t ? tv : NULL);
+}
+
+
+asmlinkage long compat_sys_newstat(char * filename,
+		struct compat_stat *statbuf)
+{
+	struct kstat stat;
+	int error = vfs_stat(filename, &stat);
+
+	if (!error)
+		error = cp_compat_stat(&stat, statbuf);
+	return error;
+}
+
+asmlinkage long compat_sys_newlstat(char * filename,
+		struct compat_stat *statbuf)
+{
+	struct kstat stat;
+	int error = vfs_lstat(filename, &stat);
+
+	if (!error)
+		error = cp_compat_stat(&stat, statbuf);
+	return error;
+}
+
+asmlinkage long compat_sys_newfstat(unsigned int fd,
+		struct compat_stat * statbuf)
+{
+	struct kstat stat;
+	int error = vfs_fstat(fd, &stat);
+
+	if (!error)
+		error = cp_compat_stat(&stat, statbuf);
+	return error;
+}
diff -Nru a/fs/cramfs/Makefile b/fs/cramfs/Makefile
--- a/fs/cramfs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/cramfs/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_CRAMFS) += cramfs.o
 
 cramfs-objs := inode.o uncompress.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/devfs/Makefile b/fs/devfs/Makefile
--- a/fs/devfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/devfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,9 +13,6 @@
 TOPDIR = ../..
 endif
 
-include $(TOPDIR)/Rules.make
-
-
 # Rule to build documentation
 doc:	base.c util.c
 	@echo '$$PACKAGE devfs' > devfs.doc
diff -Nru a/fs/devpts/Makefile b/fs/devpts/Makefile
--- a/fs/devpts/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/devpts/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_DEVPTS_FS) += devpts.o
 
 devpts-objs := inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/efs/Makefile b/fs/efs/Makefile
--- a/fs/efs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/efs/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_EFS_FS) += efs.o
 
 efs-objs := super.o inode.o namei.o dir.o file.o symlink.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/eventpoll.c b/fs/eventpoll.c
--- a/fs/eventpoll.c	Sun Dec 15 18:08:29 2002
+++ b/fs/eventpoll.c	Sun Dec 15 18:08:29 2002
@@ -1573,7 +1573,7 @@
 	if (IS_ERR(eventpoll_mnt))
 		goto eexit_4;
 
-	printk(KERN_INFO "[%p] eventpoll: successfully initialized.\n", current);
+	DNPRINTK(3, (KERN_INFO "[%p] eventpoll: successfully initialized.\n", current));
 
 	return 0;
 
diff -Nru a/fs/exec.c b/fs/exec.c
--- a/fs/exec.c	Sun Dec 15 18:08:29 2002
+++ b/fs/exec.c	Sun Dec 15 18:08:29 2002
@@ -1268,7 +1268,7 @@
 	BUG_ON(mm->core_waiters);
 }
 
-int do_coredump(long signr, struct pt_regs * regs)
+int do_coredump(long signr, int exit_code, struct pt_regs * regs)
 {
 	char corename[CORENAME_MAX_SIZE + 1];
 	struct mm_struct *mm = current->mm;
@@ -1288,6 +1288,8 @@
 	}
 	mm->dumpable = 0;
 	init_completion(&mm->core_done);
+	current->sig->group_exit = 1;
+	current->sig->group_exit_code = exit_code;
 	coredump_wait(mm);
 
 	if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump)
@@ -1314,6 +1316,7 @@
 
 	retval = binfmt->core_dump(signr, regs, file);
 
+	current->sig->group_exit_code |= 0x80;
 close_fail:
 	filp_close(file, NULL);
 fail_unlock:
diff -Nru a/fs/exportfs/Makefile b/fs/exportfs/Makefile
--- a/fs/exportfs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/exportfs/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 obj-$(CONFIG_EXPORTFS) += exportfs.o
 
 exportfs-objs := expfs.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ext2/Makefile b/fs/ext2/Makefile
--- a/fs/ext2/Makefile	Sun Dec 15 18:08:30 2002
+++ b/fs/ext2/Makefile	Sun Dec 15 18:08:30 2002
@@ -16,5 +16,3 @@
 ifeq ($(CONFIG_EXT2_FS_POSIX_ACL),y)
 ext2-objs += acl.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ext2/balloc.c b/fs/ext2/balloc.c
--- a/fs/ext2/balloc.c	Sun Dec 15 18:08:29 2002
+++ b/fs/ext2/balloc.c	Sun Dec 15 18:08:29 2002
@@ -178,8 +178,9 @@
 
 	lock_super (sb);
 	es = EXT2_SB(sb)->s_es;
-	if (block < le32_to_cpu(es->s_first_data_block) || 
-	    (block + count) > le32_to_cpu(es->s_blocks_count)) {
+	if (block < le32_to_cpu(es->s_first_data_block) ||
+	    block + count < block ||
+	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext2_error (sb, "ext2_free_blocks",
 			    "Freeing blocks not in datazone - "
 			    "block = %lu, count = %lu", block, count);
diff -Nru a/fs/ext2/inode.c b/fs/ext2/inode.c
--- a/fs/ext2/inode.c	Sun Dec 15 18:08:28 2002
+++ b/fs/ext2/inode.c	Sun Dec 15 18:08:28 2002
@@ -430,8 +430,12 @@
 		mark_buffer_dirty_inode(bh, inode);
 		/* We used to sync bh here if IS_SYNC(inode).
 		 * But we now rely upon generic_osync_inode()
-		 * and b_inode_buffers
+		 * and b_inode_buffers.  But not for directories.
 		 */
+		if (S_ISDIR(inode->i_mode) && IS_DIRSYNC(inode)) {
+			ll_rw_block(WRITE, 1, &bh);
+			wait_on_buffer(bh);
+		}
 		parent = nr;
 	}
 	if (n == num)
@@ -588,9 +592,9 @@
 	goto reread;
 }
 
-static int ext2_writepage(struct page *page)
+static int ext2_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,ext2_get_block);
+	return block_write_full_page(page, ext2_get_block, wbc);
 }
 
 static int ext2_readpage(struct file *file, struct page *page)
diff -Nru a/fs/ext3/Makefile b/fs/ext3/Makefile
--- a/fs/ext3/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/ext3/Makefile	Sun Dec 15 18:08:28 2002
@@ -16,5 +16,3 @@
 ifeq ($(CONFIG_EXT3_FS_POSIX_ACL),y)
 ext3-objs += acl.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ext3/balloc.c b/fs/ext3/balloc.c
--- a/fs/ext3/balloc.c	Sun Dec 15 18:08:28 2002
+++ b/fs/ext3/balloc.c	Sun Dec 15 18:08:28 2002
@@ -120,8 +120,9 @@
 	}
 	lock_super (sb);
 	es = EXT3_SB(sb)->s_es;
-	if (block < le32_to_cpu(es->s_first_data_block) || 
-	    (block + count) > le32_to_cpu(es->s_blocks_count)) {
+	if (block < le32_to_cpu(es->s_first_data_block) ||
+	    block + count < block ||
+	    block + count > le32_to_cpu(es->s_blocks_count)) {
 		ext3_error (sb, "ext3_free_blocks",
 			    "Freeing blocks not in datazone - "
 			    "block = %lu, count = %lu", block, count);
diff -Nru a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
--- a/fs/ext3/ialloc.c	Sun Dec 15 18:08:29 2002
+++ b/fs/ext3/ialloc.c	Sun Dec 15 18:08:29 2002
@@ -600,6 +600,7 @@
 	inode->i_flags |= S_NOQUOTA;
 	inode->i_nlink = 0;
 	iput(inode);
+	brelse(bitmap_bh);
 	return ERR_PTR(err);
 }
 
diff -Nru a/fs/ext3/inode.c b/fs/ext3/inode.c
--- a/fs/ext3/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/ext3/inode.c	Sun Dec 15 18:08:29 2002
@@ -33,6 +33,7 @@
 #include <linux/quotaops.h>
 #include <linux/string.h>
 #include <linux/buffer_head.h>
+#include <linux/writeback.h>
 #include <linux/mpage.h>
 #include <linux/uio.h>
 #include "xattr.h"
@@ -1287,7 +1288,7 @@
  * disastrous.  Any write() or metadata operation will sync the fs for
  * us.
  */
-static int ext3_writepage(struct page *page)
+static int ext3_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct inode *inode = page->mapping->host;
 	struct buffer_head *page_bufs;
@@ -1308,7 +1309,7 @@
 		goto out_fail;
 
 	needed = ext3_writepage_trans_blocks(inode);
-	if (current->flags & PF_MEMALLOC)
+	if (wbc->for_reclaim)
 		handle = ext3_journal_try_start(inode, needed);
 	else
 		handle = ext3_journal_start(inode, needed);
@@ -1339,7 +1340,7 @@
 				PAGE_CACHE_SIZE, NULL, bget_one);
 	}
 
-	ret = block_write_full_page(page, ext3_get_block);
+	ret = block_write_full_page(page, ext3_get_block, wbc);
 
 	/*
 	 * The page can become unlocked at any point now, and
@@ -1371,11 +1372,10 @@
 
 	/*
 	 * We have to fail this writepage to avoid cross-fs transactions.
-	 * Return EAGAIN so the caller will the page back on
-	 * mapping->dirty_pages.  The page's buffers' dirty state will be left
-	 * as-is.
+	 * Put the page back on mapping->dirty_pages.  The page's buffers'
+	 * dirty state will be left as-is.
 	 */
-	ret = -EAGAIN;
+	__set_page_dirty_nobuffers(page);
 	unlock_page(page);
 	return ret;
 }
@@ -2698,7 +2698,7 @@
 	handle_t *handle;
 
 	lock_kernel();
-	handle = ext3_journal_start(inode, 1);
+	handle = ext3_journal_start(inode, 2);
 	if (IS_ERR(handle))
 		goto out;
 	if (current_handle &&
diff -Nru a/fs/ext3/super.c b/fs/ext3/super.c
--- a/fs/ext3/super.c	Sun Dec 15 18:08:32 2002
+++ b/fs/ext3/super.c	Sun Dec 15 18:08:32 2002
@@ -47,6 +47,7 @@
 					struct ext3_super_block * es);
 static void ext3_clear_journal_err(struct super_block * sb,
 				   struct ext3_super_block * es);
+static int ext3_sync_fs(struct super_block *sb, int wait);
 
 #ifdef CONFIG_JBD_DEBUG
 int journal_no_write[2];
@@ -495,18 +496,19 @@
 static struct super_operations ext3_sops = {
 	.alloc_inode	= ext3_alloc_inode,
 	.destroy_inode	= ext3_destroy_inode,
-	.read_inode	= ext3_read_inode,	/* BKL held */
-	.write_inode	= ext3_write_inode,	/* BKL not held.  Don't need */
-	.dirty_inode	= ext3_dirty_inode,	/* BKL not held.  We take it */
-	.put_inode	= ext3_put_inode,		/* BKL not held.  Don't need */
-	.delete_inode	= ext3_delete_inode,	/* BKL not held.  We take it */
-	.put_super	= ext3_put_super,		/* BKL held */
-	.write_super	= ext3_write_super,	/* BKL not held. We take it. Needed? */
-	.write_super_lockfs = ext3_write_super_lockfs, /* BKL not held. Take it */
-	.unlockfs	= ext3_unlockfs,		/* BKL not held.  We take it */
-	.statfs		= ext3_statfs,		/* BKL not held. */
-	.remount_fs	= ext3_remount,		/* BKL held */
-	.clear_inode	= ext3_clear_inode,	/* BKL not needed. */
+	.read_inode	= ext3_read_inode,
+	.write_inode	= ext3_write_inode,
+	.dirty_inode	= ext3_dirty_inode,
+	.put_inode	= ext3_put_inode,
+	.delete_inode	= ext3_delete_inode,
+	.put_super	= ext3_put_super,
+	.write_super	= ext3_write_super,
+	.sync_fs	= ext3_sync_fs,
+	.write_super_lockfs = ext3_write_super_lockfs,
+	.unlockfs	= ext3_unlockfs,
+	.statfs		= ext3_statfs,
+	.remount_fs	= ext3_remount,
+	.clear_inode	= ext3_clear_inode,
 };
 
 struct dentry *ext3_get_parent(struct dentry *child);
@@ -1714,25 +1716,27 @@
  * This implicitly triggers the writebehind on sync().
  */
 
-static int do_sync_supers = 0;
-MODULE_PARM(do_sync_supers, "i");
-MODULE_PARM_DESC(do_sync_supers, "Write superblocks synchronously");
-
 void ext3_write_super (struct super_block * sb)
 {
-	tid_t target;
 	lock_kernel();	
 	if (down_trylock(&sb->s_lock) == 0)
-		BUG();		/* aviro detector */
+		BUG();
 	sb->s_dirt = 0;
-	target = log_start_commit(EXT3_SB(sb)->s_journal, NULL);
+	log_start_commit(EXT3_SB(sb)->s_journal, NULL);
+	unlock_kernel();
+}
 
-	if (do_sync_supers) {
-		unlock_super(sb);
+static int ext3_sync_fs(struct super_block *sb, int wait)
+{
+	tid_t target;
+
+	lock_kernel();	
+	sb->s_dirt = 0;
+	target = log_start_commit(EXT3_SB(sb)->s_journal, NULL);
+	if (wait)
 		log_wait_commit(EXT3_SB(sb)->s_journal, target);
-		lock_super(sb);
-	}
 	unlock_kernel();
+	return 0;
 }
 
 /*
diff -Nru a/fs/fat/Makefile b/fs/fat/Makefile
--- a/fs/fat/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/fat/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_FAT_FS) += fat.o
 
 fat-objs := cache.o dir.o file.o inode.o misc.o fatfs_syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/fat/inode.c b/fs/fat/inode.c
--- a/fs/fat/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/fat/inode.c	Sun Dec 15 18:08:29 2002
@@ -1050,9 +1050,9 @@
 	return 0;
 }
 
-static int fat_writepage(struct page *page)
+static int fat_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,fat_get_block);
+	return block_write_full_page(page,fat_get_block, wbc);
 }
 static int fat_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/freevxfs/Makefile b/fs/freevxfs/Makefile
--- a/fs/freevxfs/Makefile	Sun Dec 15 18:08:32 2002
+++ b/fs/freevxfs/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,5 +6,3 @@
 
 freevxfs-objs := vxfs_bmap.o vxfs_fshead.o vxfs_immed.o vxfs_inode.o \
 		 vxfs_lookup.o vxfs_olt.o vxfs_subr.o vxfs_super.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/fs-writeback.c b/fs/fs-writeback.c
--- a/fs/fs-writeback.c	Sun Dec 15 18:08:29 2002
+++ b/fs/fs-writeback.c	Sun Dec 15 18:08:29 2002
@@ -57,7 +57,7 @@
 	 * dirty the inode itself
 	 */
 	if (flags & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) {
-		if (sb->s_op && sb->s_op->dirty_inode)
+		if (sb->s_op->dirty_inode)
 			sb->s_op->dirty_inode(inode);
 	}
 
@@ -67,14 +67,10 @@
 
 	spin_lock(&inode_lock);
 	if ((inode->i_state & flags) != flags) {
-		const int was_dirty = inode->i_state & I_DIRTY;
 		struct address_space *mapping = inode->i_mapping;
 
 		inode->i_state |= flags;
 
-		if (!was_dirty)
-			mapping->dirtied_when = jiffies;
-
 		/*
 		 * If the inode is locked, just update its dirty state. 
 		 * The unlocker will place the inode on the appropriate
@@ -84,18 +80,20 @@
 			goto out;
 
 		/*
-		 * Only add valid (hashed) inode to the superblock's
+		 * Only add valid (hashed) inodes to the superblock's
 		 * dirty list.  Add blockdev inodes as well.
 		 */
 		if (list_empty(&inode->i_hash) && !S_ISBLK(inode->i_mode))
 			goto out;
 
 		/*
-		 * If the inode was already on s_dirty, don't reposition
-		 * it (that would break s_dirty time-ordering).
+		 * If the inode was already on s_dirty or s_io, don't
+		 * reposition it (that would break s_dirty time-ordering).
 		 */
-		if (!was_dirty)
+		if (!mapping->dirtied_when) {
+			mapping->dirtied_when = jiffies|1; /* 0 is special */
 			list_move(&inode->i_list, &sb->s_dirty);
+		}
 	}
 out:
 	spin_unlock(&inode_lock);
@@ -103,26 +101,23 @@
 
 static void write_inode(struct inode *inode, int sync)
 {
-	if (inode->i_sb->s_op && inode->i_sb->s_op->write_inode &&
-			!is_bad_inode(inode))
+	if (inode->i_sb->s_op->write_inode && !is_bad_inode(inode))
 		inode->i_sb->s_op->write_inode(inode, sync);
 }
 
 /*
  * Write a single inode's dirty pages and inode data out to disk.
- * If `sync' is set, wait on the writeout.
- * Subtract the number of written pages from nr_to_write.
+ * If `wait' is set, wait on the writeout.
  *
- * Normally it is not legal for a single process to lock more than one
- * page at a time, due to ab/ba deadlock problems.  But writepages()
- * does want to lock a large number of pages, without immediately submitting
- * I/O against them (starting I/O is a "deferred unlock_page").
- *
- * However it *is* legal to lock multiple pages, if this is only ever performed
- * by a single process.  We provide that exclusion via locking in the
- * filesystem's ->writepages a_op. This ensures that only a single
- * process is locking multiple pages against this inode.  And as I/O is
- * submitted against all those locked pages, there is no deadlock.
+ * The whole writeout design is quite complex and fragile.  We want to avoid
+ * starvation of particular inodes when others are being redirtied, prevent
+ * livelocks, etc.
+ *
+ * So what we do is to move all pages which are to be written from dirty_pages
+ * onto io_pages.  And keep on writing io_pages until it's empty.  Refusing to
+ * move more pages onto io_pages until io_pages is empty.  Once that point has
+ * been reached, we are ready to take another pass across the inode's dirty
+ * pages.
  *
  * Called under inode_lock.
  */
@@ -131,7 +126,6 @@
 			struct writeback_control *wbc)
 {
 	unsigned dirty;
-	unsigned long orig_dirtied_when;
 	struct address_space *mapping = inode->i_mapping;
 	struct super_block *sb = inode->i_sb;
 
@@ -141,8 +135,11 @@
 	dirty = inode->i_state & I_DIRTY;
 	inode->i_state |= I_LOCK;
 	inode->i_state &= ~I_DIRTY;
-	orig_dirtied_when = mapping->dirtied_when;
-	mapping->dirtied_when = 0;	/* assume it's whole-file writeback */
+
+	write_lock(&mapping->page_lock);
+	if (wait || !wbc->for_kupdate || list_empty(&mapping->io_pages))
+		list_splice_init(&mapping->dirty_pages, &mapping->io_pages);
+	write_unlock(&mapping->page_lock);
 	spin_unlock(&inode_lock);
 
 	do_writepages(mapping, wbc);
@@ -155,24 +152,26 @@
 		filemap_fdatawait(mapping);
 
 	spin_lock(&inode_lock);
-
 	inode->i_state &= ~I_LOCK;
 	if (!(inode->i_state & I_FREEING)) {
-		list_del(&inode->i_list);
-		if (inode->i_state & I_DIRTY) {		/* Redirtied */
-			list_add(&inode->i_list, &sb->s_dirty);
+		if (!list_empty(&mapping->io_pages)) {
+		 	/* Needs more writeback */
+			inode->i_state |= I_DIRTY_PAGES;
+		} else if (!list_empty(&mapping->dirty_pages)) {
+			/* Redirtied */
+			inode->i_state |= I_DIRTY_PAGES;
+			mapping->dirtied_when = jiffies|1;
+			list_move(&inode->i_list, &sb->s_dirty);
+		} else if (inode->i_state & I_DIRTY) {
+			/* Redirtied */
+			mapping->dirtied_when = jiffies|1;
+			list_move(&inode->i_list, &sb->s_dirty);
+		} else if (atomic_read(&inode->i_count)) {
+			mapping->dirtied_when = 0;
+			list_move(&inode->i_list, &inode_in_use);
 		} else {
-			if (!list_empty(&mapping->dirty_pages) ||
-					!list_empty(&mapping->io_pages)) {
-			 	/* Not a whole-file writeback */
-				mapping->dirtied_when = orig_dirtied_when;
-				inode->i_state |= I_DIRTY_PAGES;
-				list_add_tail(&inode->i_list, &sb->s_dirty);
-			} else if (atomic_read(&inode->i_count)) {
-				list_add(&inode->i_list, &inode_in_use);
-			} else {
-				list_add(&inode->i_list, &inode_unused);
-			}
+			mapping->dirtied_when = 0;
+			list_move(&inode->i_list, &inode_unused);
 		}
 	}
 	wake_up_inode(inode);
@@ -185,8 +184,10 @@
 __writeback_single_inode(struct inode *inode, int sync,
 			struct writeback_control *wbc)
 {
-	if (current_is_pdflush() && (inode->i_state & I_LOCK))
+	if (current_is_pdflush() && (inode->i_state & I_LOCK)) {
+		list_move(&inode->i_list, &inode->i_sb->s_dirty);
 		return;
+	}
 
 	while (inode->i_state & I_LOCK) {
 		__iget(inode);
@@ -233,7 +234,9 @@
 {
 	const unsigned long start = jiffies;	/* livelock avoidance */
 
-	list_splice_init(&sb->s_dirty, &sb->s_io);
+	if (!wbc->for_kupdate || list_empty(&sb->s_io))
+		list_splice_init(&sb->s_dirty, &sb->s_io);
+
 	while (!list_empty(&sb->s_io)) {
 		struct inode *inode = list_entry(sb->s_io.prev,
 						struct inode, i_list);
@@ -241,6 +244,9 @@
 		struct backing_dev_info *bdi = mapping->backing_dev_info;
 		int really_sync;
 
+		if (bdi->memory_backed)
+			break;
+
 		if (wbc->nonblocking && bdi_write_congested(bdi)) {
 			wbc->encountered_congestion = 1;
 			if (sb != blockdev_superblock)
@@ -272,7 +278,6 @@
 		really_sync = (wbc->sync_mode == WB_SYNC_ALL);
 		BUG_ON(inode->i_state & I_FREEING);
 		__iget(inode);
-		list_move(&inode->i_list, &sb->s_dirty);
 		__writeback_single_inode(inode, really_sync, wbc);
 		if (wbc->sync_mode == WB_SYNC_HOLD) {
 			mapping->dirtied_when = jiffies;
diff -Nru a/fs/hfs/Makefile b/fs/hfs/Makefile
--- a/fs/hfs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/hfs/Makefile	Sun Dec 15 18:08:33 2002
@@ -8,5 +8,3 @@
 	    bnode.o brec.o btree.o catalog.o dir.o dir_cap.o dir_dbl.o \
 	    dir_nat.o extent.o file.o file_cap.o file_hdr.o inode.o mdb.o \
             part_tbl.o string.o super.o sysdep.o trans.o version.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/hfs/inode.c b/fs/hfs/inode.c
--- a/fs/hfs/inode.c	Sun Dec 15 18:08:32 2002
+++ b/fs/hfs/inode.c	Sun Dec 15 18:08:32 2002
@@ -229,9 +229,9 @@
 	return __hfs_notify_change(dentry, attr, HFS_HDR);
 }
 
-static int hfs_writepage(struct page *page)
+static int hfs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,hfs_get_block);
+	return block_write_full_page(page,hfs_get_block, wbc);
 }
 static int hfs_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/hpfs/Makefile b/fs/hpfs/Makefile
--- a/fs/hpfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/hpfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 
 hpfs-objs := alloc.o anode.o buffer.o dentry.o dir.o dnode.o ea.o file.o \
 	     inode.o map.o name.o namei.o super.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/hpfs/file.c b/fs/hpfs/file.c
--- a/fs/hpfs/file.c	Sun Dec 15 18:08:32 2002
+++ b/fs/hpfs/file.c	Sun Dec 15 18:08:32 2002
@@ -98,9 +98,9 @@
 	return 0;
 }
 
-static int hpfs_writepage(struct page *page)
+static int hpfs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,hpfs_get_block);
+	return block_write_full_page(page,hpfs_get_block, wbc);
 }
 static int hpfs_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/hugetlbfs/Makefile b/fs/hugetlbfs/Makefile
--- a/fs/hugetlbfs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/hugetlbfs/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_HUGETLBFS) += hugetlbfs.o
 
 hugetlbfs-objs := inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
--- a/fs/hugetlbfs/inode.c	Sun Dec 15 18:08:32 2002
+++ b/fs/hugetlbfs/inode.c	Sun Dec 15 18:08:32 2002
@@ -448,7 +448,6 @@
 
 static struct address_space_operations hugetlbfs_aops = {
 	.readpage	= hugetlbfs_readpage,
-	.writepage	= fail_writepage,
 	.prepare_write	= hugetlbfs_prepare_write,
 	.commit_write	= hugetlbfs_commit_write
 };
@@ -529,6 +528,8 @@
 	if (!capable(CAP_IPC_LOCK))
 		return ERR_PTR(-EPERM);
 
+	if (!is_hugepage_mem_enough(size))
+		return ERR_PTR(-ENOMEM);
 	n = atomic_read(&hugetlbfs_counter);
 	atomic_inc(&hugetlbfs_counter);
 
diff -Nru a/fs/inode.c b/fs/inode.c
--- a/fs/inode.c	Sun Dec 15 18:08:32 2002
+++ b/fs/inode.c	Sun Dec 15 18:08:32 2002
@@ -225,7 +225,7 @@
 		BUG();
 	wait_on_inode(inode);
 	DQUOT_DROP(inode);
-	if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->clear_inode)
+	if (inode->i_sb && inode->i_sb->s_op->clear_inode)
 		inode->i_sb->s_op->clear_inode(inode);
 	if (inode->i_bdev)
 		bd_forget(inode);
@@ -937,7 +937,7 @@
 
 	security_inode_delete(inode);
 
-	if (op && op->delete_inode) {
+	if (op->delete_inode) {
 		void (*delete)(struct inode *) = op->delete_inode;
 		if (!is_bad_inode(inode))
 			DQUOT_INIT(inode);
diff -Nru a/fs/intermezzo/Makefile b/fs/intermezzo/Makefile
--- a/fs/intermezzo/Makefile	Sun Dec 15 18:08:30 2002
+++ b/fs/intermezzo/Makefile	Sun Dec 15 18:08:30 2002
@@ -9,6 +9,3 @@
 	           journal_obdfs.o journal_reiserfs.o journal_tmpfs.o journal_xfs.o \
 	           kml_reint.o kml_unpack.o methods.o presto.o psdev.o replicator.o \
 	           super.o sysctl.o upcall.o vfs.o
-
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/intermezzo/cache.c b/fs/intermezzo/cache.c
--- a/fs/intermezzo/cache.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/cache.c	Sun Dec 15 18:08:29 2002
@@ -39,8 +39,8 @@
 #include <linux/blkdev.h>
 #include <linux/init.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 /*
    This file contains the routines associated with managing a
diff -Nru a/fs/intermezzo/dcache.c b/fs/intermezzo/dcache.c
--- a/fs/intermezzo/dcache.c	Sun Dec 15 18:08:31 2002
+++ b/fs/intermezzo/dcache.c	Sun Dec 15 18:08:31 2002
@@ -46,7 +46,7 @@
 #include <linux/smp_lock.h>
 #include <linux/vmalloc.h>
 
-#include <linux/intermezzo_fs.h>
+#include "intermezzo_fs.h"
 
 kmem_cache_t * presto_dentry_slab;
 
diff -Nru a/fs/intermezzo/dir.c b/fs/intermezzo/dir.c
--- a/fs/intermezzo/dir.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/dir.c	Sun Dec 15 18:08:28 2002
@@ -45,8 +45,8 @@
 #define __NO_VERSION__
 #include <linux/module.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 static inline void presto_relock_sem(struct inode *dir) 
 {
@@ -342,7 +342,7 @@
         int error;
         struct presto_cache *cache;
         struct presto_file_set *fset;
-        struct lento_vfs_context info = { 0, 0, 0 };
+        struct lento_vfs_context info = { 0, {0}, 0 };
 
         ENTRY;
 
@@ -358,8 +358,8 @@
         CDEBUG(D_INODE, "valid %#x, mode %#o, uid %u, gid %u, size %Lu, "
                "atime %lu mtime %lu ctime %lu flags %d\n",
                iattr->ia_valid, iattr->ia_mode, iattr->ia_uid, iattr->ia_gid,
-               iattr->ia_size, iattr->ia_atime, iattr->ia_mtime,
-               iattr->ia_ctime, iattr->ia_attr_flags);
+               iattr->ia_size, iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec,
+               iattr->ia_ctime.tv_sec, iattr->ia_attr_flags);
         
         if ( presto_get_permit(de->d_inode) < 0 ) {
                 EXIT;
diff -Nru a/fs/intermezzo/ext_attr.c b/fs/intermezzo/ext_attr.c
--- a/fs/intermezzo/ext_attr.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/ext_attr.c	Sun Dec 15 18:08:29 2002
@@ -46,8 +46,8 @@
 #include <asm/segment.h>
 #include <linux/smp_lock.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #ifdef CONFIG_FS_EXT_ATTR
 #include <linux/ext_attr.h>
diff -Nru a/fs/intermezzo/file.c b/fs/intermezzo/file.c
--- a/fs/intermezzo/file.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/file.c	Sun Dec 15 18:08:29 2002
@@ -50,9 +50,9 @@
 #define __NO_VERSION__
 #include <linux/module.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
 #include <linux/fsfilter.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 /*
  * these are initialized in super.c
  */
@@ -61,7 +61,7 @@
 
 static int presto_open_upcall(int minor, struct dentry *de)
 {
-        int rc;
+        int rc = 0;
         char *path, *buffer;
         struct presto_file_set *fset;
         int pathlen;
diff -Nru a/fs/intermezzo/fileset.c b/fs/intermezzo/fileset.c
--- a/fs/intermezzo/fileset.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/fileset.c	Sun Dec 15 18:08:29 2002
@@ -43,8 +43,8 @@
 #include <linux/init.h>
 #include <linux/module.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 static inline struct presto_file_set *presto_dentry2fset(struct dentry *dentry)
 {
diff -Nru a/fs/intermezzo/inode.c b/fs/intermezzo/inode.c
--- a/fs/intermezzo/inode.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/inode.c	Sun Dec 15 18:08:28 2002
@@ -47,8 +47,8 @@
 #include <linux/vmalloc.h>
 #include <asm/segment.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 extern void presto_free_cache(struct presto_cache *);
 
diff -Nru a/fs/intermezzo/intermezzo_fs.h b/fs/intermezzo/intermezzo_fs.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_fs.h	Sun Dec 15 18:08:29 2002
@@ -0,0 +1,931 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
+ *  Copyright (C) 2001 Tacitus Systems, Inc.
+ *  Copyright (C) 2000 Stelias Computing, Inc.
+ *  Copyright (C) 2000 Red Hat, Inc.
+ *  Copyright (C) 2000 TurboLinux, Inc.
+ *  Copyright (C) 2000 Los Alamos National Laboratory.
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __INTERMEZZO_FS_H_
+#define __INTERMEZZO_FS_H_ 1
+
+#include "intermezzo_lib.h"
+#include "intermezzo_idl.h"
+
+
+#ifdef __KERNEL__
+typedef __u8 uuid_t[16];
+#else
+# include <uuid/uuid.h>
+#endif
+
+struct lento_vfs_context {
+        __u64 kml_offset;
+        struct timespec updated_time;
+        __u64 remote_ino;
+        __u64 remote_generation;
+        __u32 slot_offset;
+        __u32 recno;
+        __u32 flags;
+        uuid_t uuid;
+        struct presto_version remote_version;
+};
+
+static inline int izo_ioctl_is_invalid(struct izo_ioctl_data *data);
+
+#ifdef __KERNEL__
+# include <linux/smp.h>
+# include <linux/fsfilter.h>
+# include <linux/mount.h>
+# include <linux/slab.h>
+# include <linux/vmalloc.h>
+# include <linux/smp_lock.h>
+
+/* fixups for fs.h */
+# ifndef fs_down
+#  define fs_down(sem) down(sem)
+# endif
+
+# ifndef fs_up
+#  define fs_up(sem) up(sem)
+# endif
+
+# define KML_IDLE                        0
+# define KML_DECODE                      1
+# define KML_OPTIMIZE                    2
+# define KML_REINT                       3
+
+# define KML_OPEN_REINT                  0x0100
+# define KML_REINT_BEGIN                 0x0200
+# define KML_BACKFETCH                   0x0400
+# define KML_REINT_END                   0x0800
+# define KML_CLOSE_REINT                 0x1000
+# define KML_REINT_MAXBUF                (64 * 1024)
+
+# define CACHE_CLIENT_RO       0x4
+# define CACHE_LENTO_RO        0x8
+
+/* global variables */
+extern int presto_debug;
+extern int presto_print_entry;
+extern long presto_kmemory;
+extern long presto_vmemory;
+
+# define PRESTO_DEBUG
+# ifdef PRESTO_DEBUG
+/* debugging masks */
+#  define D_SUPER       1
+#  define D_INODE       2
+#  define D_FILE        4
+#  define D_CACHE       8  /* cache debugging */
+#  define D_MALLOC     16  /* print malloc, de-alloc information */
+#  define D_JOURNAL    32
+#  define D_UPCALL     64  /* up and downcall debugging */
+#  define D_PSDEV     128
+#  define D_PIOCTL    256
+#  define D_SPECIAL   512
+#  define D_TIMING   1024
+#  define D_DOWNCALL 2048
+#  define D_KML      4096
+#  define D_FSDATA   8192
+
+#  define CDEBUG(mask, format, a...)                                    \
+        do {                                                            \
+                if (presto_debug & mask) {                              \
+                        printk("(%s:%s,l. %d %d): " format, __FILE__,   \
+                               __FUNCTION__, __LINE__, current->pid     \
+                               , ## a);                                 \
+                }                                                       \
+        } while (0)
+
+#define CERROR(format, a...)                                            \
+do {                                                                    \
+        printk("(%s:%s,l. %d %d): " format, __FILE__, __FUNCTION__,     \
+               __LINE__, current->pid , ## a);                          \
+} while (0)
+
+#  define ENTRY                                                         \
+        if (presto_print_entry)                                         \
+                printk("Process %d entered %s\n", current->pid, __FUNCTION__)
+
+#  define EXIT                                                          \
+        if (presto_print_entry)                                         \
+                printk("Process %d leaving %s at %d\n", current->pid,   \
+                       __FUNCTION__, __LINE__)
+
+#  define presto_kmem_inc(ptr, size) presto_kmemory += (size)
+#  define presto_kmem_dec(ptr, size) presto_kmemory -= (size)
+#  define presto_vmem_inc(ptr, size) presto_vmemory += (size)
+#  define presto_vmem_dec(ptr, size) presto_vmemory -= (size)
+# else /* !PRESTO_DEBUG */
+#  define CDEBUG(mask, format, a...) do {} while (0)
+#  define ENTRY do {} while (0)
+#  define EXIT do {} while (0)
+#  define presto_kmem_inc(ptr, size) do {} while (0)
+#  define presto_kmem_dec(ptr, size) do {} while (0)
+#  define presto_vmem_inc(ptr, size) do {} while (0)
+#  define presto_vmem_dec(ptr, size) do {} while (0)
+# endif /* PRESTO_DEBUG */
+
+
+struct run_ctxt {
+        struct vfsmount *pwdmnt;
+        struct dentry   *pwd;
+        struct vfsmount *rootmnt;
+        struct dentry   *root;
+        uid_t            fsuid;
+        gid_t            fsgid;
+        mm_segment_t     fs;
+	int              ngroups;
+	gid_t	         groups[NGROUPS];
+
+};
+
+static inline void push_ctxt(struct run_ctxt *save, struct run_ctxt *new)
+{
+        int i;
+        save->fs = get_fs();
+        save->pwd = dget(current->fs->pwd);
+        save->pwdmnt = mntget(current->fs->pwdmnt);
+        save->fsgid = current->fsgid;
+        save->fsuid = current->fsuid;
+        save->root = current->fs->root;
+        save->rootmnt = current->fs->rootmnt;
+        save->ngroups = current->ngroups;
+        for (i = 0; i< current->ngroups; i++) 
+                save->groups[i] = current->groups[i];
+
+        set_fs(new->fs);
+        lock_kernel();
+        set_fs_pwd(current->fs, new->pwdmnt, new->pwd);
+        if (new->root)
+                set_fs_root(current->fs, new->rootmnt, new->root);
+        unlock_kernel();
+        current->fsuid = new->fsuid;
+        current->fsgid = new->fsgid;
+        if (new->ngroups > 0) {
+                current->ngroups = new->ngroups;
+                for (i = 0; i< new->ngroups; i++) 
+                        current->groups[i] = new->groups[i];
+        }
+        
+}
+
+static inline void pop_ctxt(struct run_ctxt *saved)
+{
+        int i;
+
+        set_fs(saved->fs);
+        lock_kernel();
+        set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
+        if (saved->root)
+                set_fs_root(current->fs, saved->rootmnt, saved->root);
+        unlock_kernel();
+        current->fsuid = saved->fsuid;
+        current->fsgid = saved->fsgid;
+        current->ngroups = saved->ngroups;
+        for (i = 0; i< saved->ngroups; i++) 
+                current->groups[i] = saved->groups[i];
+
+        mntput(saved->pwdmnt);
+        dput(saved->pwd);
+}
+
+static inline struct presto_dentry_data *presto_d2d(struct dentry *dentry)
+{
+        return (struct presto_dentry_data *)(dentry->d_fsdata);
+}
+
+struct presto_cache {
+        spinlock_t          cache_lock;
+        loff_t              cache_reserved;
+        struct  vfsmount   *cache_vfsmount;
+        struct super_block *cache_sb;
+        struct  dentry     *cache_root;
+        struct list_head    cache_chain; /* for the dev/cache hash */
+
+        int   cache_flags;
+
+        char *cache_type;            /* filesystem type of cache */
+        struct filter_fs *cache_filter;
+
+        struct upc_channel *cache_psdev;  /* points to channel used */
+        struct list_head cache_channel_list; 
+        struct list_head cache_fset_list; /* filesets mounted in cache */
+};
+
+struct presto_log_fd {
+        rwlock_t         fd_lock;
+        loff_t           fd_offset;  /* offset where next record should go */
+        struct file    *fd_file;
+        int             fd_truncating;
+        unsigned int   fd_recno;   /* last recno written */
+        struct list_head  fd_reservations;
+};
+
+/* file sets */
+# define CHUNK_BITS  16
+
+struct presto_file_set {
+        struct list_head fset_list;
+        struct presto_log_fd fset_kml;
+        struct presto_log_fd fset_lml;
+        struct presto_log_fd fset_rcvd;
+        struct list_head *fset_clients;  /* cache of clients */
+        struct dentry *fset_dentry;
+        struct vfsmount *fset_mnt;
+        struct presto_cache *fset_cache;
+
+        unsigned int fset_lento_recno;  /* last recno mentioned to lento */
+        loff_t fset_lento_off;    /* last offset mentioned to lento */
+        loff_t fset_kml_logical_off; /* logical offset of kml file byte 0 */
+        char * fset_name;
+
+        int fset_flags;
+        int fset_chunkbits;
+        char *fset_reint_buf; /* temporary buffer holds kml during reint */
+
+        spinlock_t fset_permit_lock;
+        int fset_permit_count;
+        int fset_permit_upcall_count;
+        /* This queue is used both for processes waiting for the kernel to give
+         * up the permit as well as processes waiting for the kernel to be given
+         * the permit, depending on the state of FSET_HASPERMIT. */
+        wait_queue_head_t fset_permit_queue;
+
+        loff_t  fset_file_maxio;  /* writing more than this causes a close */
+        unsigned long int kml_truncate_size;
+};
+
+/* This is the default number of bytes written before a close is recorded*/
+#define FSET_DEFAULT_MAX_FILEIO (1024<<10)
+
+struct dentry *presto_tmpfs_ilookup(struct inode *dir, struct dentry *dentry, 
+                                    ino_t ino, unsigned int generation);
+struct dentry *presto_iget_ilookup(struct inode *dir, struct dentry *dentry, 
+                                    ino_t ino, unsigned int generation);
+struct dentry *presto_add_ilookup_dentry(struct dentry *parent,
+                                         struct dentry *real);
+
+struct journal_ops {
+        int (*tr_all_data)(struct inode *);
+        loff_t (*tr_avail)(struct presto_cache *fset, struct super_block *);
+        void *(*tr_start)(struct presto_file_set *, struct inode *, int op);
+        void (*tr_commit)(struct presto_file_set *, void *handle);
+        void (*tr_journal_data)(struct inode *);
+        struct dentry *(*tr_ilookup)(struct inode *dir, struct dentry *dentry, ino_t ino, unsigned int generation);
+        struct dentry *(*tr_add_ilookup)(struct dentry *parent, struct dentry *real);
+};
+
+extern struct journal_ops presto_ext2_journal_ops;
+extern struct journal_ops presto_ext3_journal_ops;
+extern struct journal_ops presto_tmpfs_journal_ops;
+extern struct journal_ops presto_xfs_journal_ops;
+extern struct journal_ops presto_reiserfs_journal_ops;
+extern struct journal_ops presto_obdfs_journal_ops;
+
+# define LENTO_FL_KML            0x0001
+# define LENTO_FL_EXPECT         0x0002
+# define LENTO_FL_VFSCHECK       0x0004
+# define LENTO_FL_JUSTLOG        0x0008
+# define LENTO_FL_WRITE_KML      0x0010
+# define LENTO_FL_CANCEL_LML     0x0020
+# define LENTO_FL_WRITE_EXPECT   0x0040
+# define LENTO_FL_IGNORE_TIME    0x0080
+# define LENTO_FL_TOUCH_PARENT   0x0100
+# define LENTO_FL_TOUCH_NEWOBJ   0x0200
+# define LENTO_FL_SET_DDFILEID   0x0400
+
+struct presto_cache *presto_get_cache(struct inode *inode);
+int presto_sprint_mounts(char *buf, int buflen, int minor);
+struct presto_file_set *presto_fset(struct dentry *de);
+int presto_journal(struct dentry *dentry, char *buf, size_t size);
+int presto_fwrite(struct file *file, const char *str, int len, loff_t *off);
+int presto_ispresto(struct inode *);
+
+/* super.c */
+extern struct file_system_type presto_fs_type;
+extern int init_intermezzo_fs(void);
+
+/* fileset.c */
+extern int izo_prepare_fileset(struct dentry *root, char *fsetname);
+char * izo_make_path(struct presto_file_set *fset, char *name);
+struct file *izo_fset_open(struct presto_file_set *fset, char *name, int flags, int mode);
+
+/* psdev.c */
+int izo_psdev_get_free_channel(void);
+int presto_psdev_init(void);
+int izo_psdev_setpid(int minor);
+extern void presto_psdev_cleanup(void);
+inline int presto_lento_up(int minor);
+int izo_psdev_setchannel(struct file *file, int fd);
+
+/* inode.c */
+extern struct super_operations presto_super_ops;
+void presto_set_ops(struct inode *inode, struct  filter_fs *filter);
+
+/* dcache.c */
+void presto_frob_dop(struct dentry *de);
+char *presto_path(struct dentry *dentry, struct dentry *root,
+                  char *buffer, int buflen);
+inline struct presto_dentry_data *izo_alloc_ddata(void);
+int presto_set_dd(struct dentry *);
+int presto_init_ddata_cache(void);
+void presto_cleanup_ddata_cache(void);
+extern struct dentry_operations presto_dentry_ops;
+
+/* dir.c */
+extern struct inode_operations presto_dir_iops;
+extern struct inode_operations presto_file_iops;
+extern struct inode_operations presto_sym_iops;
+extern struct file_operations presto_dir_fops;
+extern struct file_operations presto_file_fops;
+extern struct file_operations presto_sym_fops;
+int presto_setattr(struct dentry *de, struct iattr *iattr);
+int presto_settime(struct presto_file_set *fset, struct dentry *newobj,
+                   struct dentry *parent, struct dentry *target,
+                   struct lento_vfs_context *ctx, int valid);
+int presto_ioctl(struct inode *inode, struct file *file,
+                 unsigned int cmd, unsigned long arg);
+
+extern int presto_ilookup_uid;
+# define PRESTO_ILOOKUP_MAGIC "...ino:"
+# define PRESTO_ILOOKUP_SEP ':'
+int izo_dentry_is_ilookup(struct dentry *, ino_t *id, unsigned int *generation);
+struct dentry *presto_lookup(struct inode * dir, struct dentry *dentry);
+
+struct presto_dentry_data {
+        int dd_count; /* how mnay dentries are using this dentry */
+        struct presto_file_set *dd_fset;
+        struct dentry *dd_inodentry; 
+        loff_t dd_kml_offset;
+        int dd_flags;
+        __u64 remote_ino;
+        __u64 remote_generation;
+};
+
+struct presto_file_data {
+        int fd_do_lml;
+        loff_t fd_lml_offset;
+        size_t fd_bytes_written;
+        /* authorization related data of file at open time */
+        uid_t fd_uid;
+        gid_t fd_gid;
+        mode_t fd_mode;
+        /* identification data of calling process */
+        uid_t fd_fsuid;
+        gid_t fd_fsgid;
+        int fd_ngroups;
+        gid_t fd_groups[NGROUPS_MAX];
+        /* information how to complete the close operation */
+        struct lento_vfs_context fd_info;
+        struct presto_version fd_version;
+};
+
+/* presto.c and Lento::Downcall */
+
+int presto_walk(const char *name, struct nameidata *nd);
+int izo_clear_fsetroot(struct dentry *dentry);
+int izo_clear_all_fsetroots(struct presto_cache *cache);
+int presto_get_kmlsize(char *path, __u64 *size);
+int presto_get_lastrecno(char *path, off_t *size);
+int presto_set_fsetroot(struct dentry *dentry, char *fsetname,
+                       unsigned int flags);
+int presto_set_fsetroot_from_ioc(struct dentry *dentry, char *fsetname,
+                                 unsigned int flags);
+inline int presto_is_read_only(struct presto_file_set *);
+int presto_truncate_lml(struct presto_file_set *fset);
+int lento_write_lml(char *path,
+                     __u64 remote_ino,
+                     __u32 remote_generation,
+                     __u32 remote_version,
+                    struct presto_version *remote_file_version);
+int lento_complete_closes(char *path);
+inline int presto_f2m(struct presto_file_set *fset);
+int presto_prep(struct dentry *, struct presto_cache **,
+                       struct presto_file_set **);
+/* cache.c */
+extern struct presto_cache *presto_cache_init(void);
+extern inline void presto_cache_add(struct presto_cache *cache);
+extern inline void presto_cache_init_hash(void);
+
+struct presto_cache *presto_cache_find(struct super_block *sb);
+
+#define PRESTO_REQLOW  (3 * 4096)
+#define PRESTO_REQHIGH (6 * 4096)
+void presto_release_space(struct presto_cache *cache, loff_t req);
+int presto_reserve_space(struct presto_cache *cache, loff_t req);
+
+#define PRESTO_DATA             0x00000002 /* cached data is valid */
+#define PRESTO_ATTR             0x00000004 /* attributes cached */
+#define PRESTO_DONT_JOURNAL     0x00000008 /* things like .intermezzo/ */
+
+struct presto_file_set *presto_path2fileset(const char *name);
+int izo_revoke_permit(struct dentry *, uuid_t uuid);
+int presto_chk(struct dentry *dentry, int flag);
+void presto_set(struct dentry *dentry, int flag);
+int presto_get_permit(struct inode *inode);
+int presto_put_permit(struct inode *inode);
+int presto_set_max_kml_size(const char *path, unsigned long max_size);
+int izo_mark_dentry(struct dentry *dentry, int and, int or, int *res);
+int izo_mark_cache(struct dentry *dentry, int and_bits, int or_bits, int *);
+int izo_mark_fset(struct dentry *dentry, int and_bits, int or_bits, int *);
+void presto_getversion(struct presto_version *pv, struct inode *inode);
+int presto_i2m(struct inode *inode);
+int presto_c2m(struct presto_cache *cache);
+
+
+/* file.c */
+int izo_purge_file(struct presto_file_set *fset, char *file);
+int presto_adjust_lml(struct file *file, struct lento_vfs_context *info);
+
+/* journal.c */
+struct rec_info {
+        loff_t offset;
+        int size;
+        int recno;
+        int is_kml;
+};
+
+void presto_trans_commit(struct presto_file_set *fset, void *handle);
+void *presto_trans_start(struct presto_file_set *fset, struct inode *inode,
+                         int op);
+int presto_fread(struct file *file, char *str, int len, loff_t *off);
+int presto_clear_lml_close(struct presto_file_set *fset,
+                           loff_t  lml_offset);
+int presto_complete_lml(struct presto_file_set *fset);
+int presto_read_kml_logical_offset(struct rec_info *recinfo,
+                                   struct presto_file_set *fset);
+int presto_write_kml_logical_offset(struct presto_file_set *fset);
+struct file *presto_copy_kml_tail(struct presto_file_set *fset,
+                                  unsigned long int start);
+int presto_finish_kml_truncate(struct presto_file_set *fset,
+                               unsigned long int offset);
+int izo_lookup_file(struct presto_file_set *fset, char *path,
+                    struct nameidata *nd);
+int izo_do_truncate(struct presto_file_set *fset, struct dentry *dentry,
+                    loff_t length,  loff_t size_check);
+int izo_log_close(struct presto_log_fd *logfd);
+struct file *izo_log_open(struct presto_file_set *fset, char *name, int flags);
+int izo_init_kml_file(struct presto_file_set *, struct presto_log_fd *);
+int izo_init_lml_file(struct presto_file_set *, struct presto_log_fd *);
+int izo_init_last_rcvd_file(struct presto_file_set *, struct presto_log_fd *);
+
+/* vfs.c */
+
+/* Extra data needed in the KML for rollback operations; this structure is
+ * passed around during the KML-writing process. */
+struct izo_rollback_data {
+        __u32 rb_mode;
+        __u32 rb_rdev;
+        __u64 rb_uid;
+        __u64 rb_gid;
+};
+
+int presto_write_last_rcvd(struct rec_info *recinfo,
+                           struct presto_file_set *fset,
+                           struct lento_vfs_context *info);
+void izo_get_rollback_data(struct inode *inode, struct izo_rollback_data *rb);
+int presto_do_close(struct presto_file_set *fset, struct file *file);
+int presto_do_setattr(struct presto_file_set *fset, struct dentry *dentry,
+                      struct iattr *iattr, struct lento_vfs_context *info);
+int presto_do_create(struct presto_file_set *fset, struct dentry *dir,
+                     struct dentry *dentry, int mode,
+                     struct lento_vfs_context *info);
+int presto_do_link(struct presto_file_set *fset, struct dentry *dir,
+                   struct dentry *old_dentry, struct dentry *new_dentry,
+                   struct lento_vfs_context *info);
+int presto_do_unlink(struct presto_file_set *fset, struct dentry *dir,
+                     struct dentry *dentry, struct lento_vfs_context *info);
+int presto_do_symlink(struct presto_file_set *fset, struct dentry *dir,
+                      struct dentry *dentry, const char *name,
+                      struct lento_vfs_context *info);
+int presto_do_mkdir(struct presto_file_set *fset, struct dentry *dir,
+                    struct dentry *dentry, int mode,
+                    struct lento_vfs_context *info);
+int presto_do_rmdir(struct presto_file_set *fset, struct dentry *dir,
+                    struct dentry *dentry, struct lento_vfs_context *info);
+int presto_do_mknod(struct presto_file_set *fset, struct dentry *dir,
+                    struct dentry *dentry, int mode, dev_t dev,
+                    struct lento_vfs_context *info);
+int do_rename(struct presto_file_set *fset, struct dentry *old_dir,
+              struct dentry *old_dentry, struct dentry *new_dir,
+              struct dentry *new_dentry, struct lento_vfs_context *info);
+int presto_do_statfs (struct presto_file_set *fset,
+                      struct statfs * buf);
+
+int lento_setattr(const char *name, struct iattr *iattr,
+                  struct lento_vfs_context *info);
+int lento_create(const char *name, int mode, struct lento_vfs_context *info);
+int lento_link(const char *oldname, const char *newname,
+               struct lento_vfs_context *info);
+int lento_unlink(const char *name, struct lento_vfs_context *info);
+int lento_symlink(const char *oldname,const char *newname,
+                  struct lento_vfs_context *info);
+int lento_mkdir(const char *name, int mode, struct lento_vfs_context *info);
+int lento_rmdir(const char *name, struct lento_vfs_context *info);
+int lento_mknod(const char *name, int mode, dev_t dev,
+                struct lento_vfs_context *info);
+int lento_rename(const char *oldname, const char *newname,
+                 struct lento_vfs_context *info);
+int lento_iopen(const char *name, ino_t ino, unsigned int generation,int flags);
+
+/* journal.c */
+
+#define JOURNAL_PAGE_SZ  PAGE_SIZE
+
+__inline__ int presto_no_journal(struct presto_file_set *fset);
+int journal_fetch(int minor);
+int presto_log(struct presto_file_set *fset, struct rec_info *rec,
+               const char *buf, size_t size,
+               const char *string1, int len1, 
+               const char *string2, int len2,
+               const char *string3, int len3);
+int presto_get_fileid(int minor, struct presto_file_set *fset,
+                      struct dentry *dentry);
+int presto_journal_setattr(struct rec_info *rec, struct presto_file_set *fset,
+                           struct dentry *dentry, struct presto_version *old_ver,
+                           struct izo_rollback_data *, struct iattr *iattr);
+int presto_journal_create(struct rec_info *rec, struct presto_file_set *fset,
+                          struct dentry *dentry,
+                          struct presto_version *tgt_dir_ver,
+                          struct presto_version *new_file_ver, int mode);
+int presto_journal_link(struct rec_info *rec, struct presto_file_set *fset,
+                        struct dentry *src, struct dentry *tgt,
+                        struct presto_version *tgt_dir_ver,
+                        struct presto_version *new_link_ver);
+int presto_journal_unlink(struct rec_info *rec, struct presto_file_set *fset,
+                          struct dentry *dir,
+                          struct presto_version *tgt_dir_ver,
+                          struct presto_version *old_file_ver,
+                          struct izo_rollback_data *, struct dentry *dentry,
+                          char *old_target, int old_targetlen);
+int presto_journal_symlink(struct rec_info *rec, struct presto_file_set *fset,
+                           struct dentry *dentry, const char *target,
+                           struct presto_version *tgt_dir_ver,
+                           struct presto_version *new_link_ver);
+int presto_journal_mkdir(struct rec_info *rec, struct presto_file_set *fset,
+                         struct dentry *dentry,
+                         struct presto_version *tgt_dir_ver,
+                         struct presto_version *new_dir_ver, int mode);
+int presto_journal_rmdir(struct rec_info *rec, struct presto_file_set *fset,
+                         struct dentry *dentry,
+                         struct presto_version *tgt_dir_ver,
+                         struct presto_version *old_dir_ver,
+                         struct izo_rollback_data *, int len, const char *name);
+int presto_journal_mknod(struct rec_info *rec, struct presto_file_set *fset,
+                         struct dentry *dentry,
+                         struct presto_version *tgt_dir_ver,
+                         struct presto_version *new_node_ver, int mode,
+                         int dmajor, int dminor);
+int presto_journal_rename(struct rec_info *rec, struct presto_file_set *fset,
+                          struct dentry *src, struct dentry *tgt,
+                          struct presto_version *src_dir_ver,
+                          struct presto_version *tgt_dir_ver);
+int presto_journal_open(struct rec_info *, struct presto_file_set *,
+                        struct dentry *, struct presto_version *old_ver);
+int presto_journal_close(struct rec_info *rec, struct presto_file_set *,
+                         struct file *, struct dentry *,
+                         struct presto_version *old_file_ver,
+                         struct presto_version *new_file_ver);
+int presto_write_lml_close(struct rec_info *rec,
+                           struct presto_file_set *fset, 
+                           struct file *file,
+                           __u64 remote_ino,
+                           __u64 remote_generation,
+                           struct presto_version *remote_version,
+                           struct presto_version *new_file_ver);
+void presto_log_op(void *data, int len);
+loff_t presto_kml_offset(struct presto_file_set *fset);
+
+/* upcall.c */
+#define SYNCHRONOUS 0
+#define ASYNCHRONOUS 1
+/* asynchronous calls */
+int izo_upc_kml(int minor, __u64 offset, __u32 first_recno, __u64 length,
+                __u32 last_recno, char *fsetname);
+int izo_upc_kml_truncate(int minor, __u64 length, __u32 last_recno,
+                         char *fsetname);
+int izo_upc_go_fetch_kml(int minor, char *fsetname, uuid_t uuid, __u64 kmlsize);
+int izo_upc_backfetch(int minor, char *path, char *fileset, 
+                      struct lento_vfs_context *);
+
+/* synchronous calls */
+int izo_upc_get_fileid(int minor, __u32 reclen, char *rec, 
+                       __u32 pathlen, char *path, char *fsetname);
+int izo_upc_permit(int minor, struct dentry *, __u32 pathlen, char *path,
+                   char *fset);
+int izo_upc_open(int minor, __u32 pathlen, char *path, char *fsetname, 
+                 struct lento_vfs_context *info);
+int izo_upc_connect(int minor, __u64 ip_address, __u64 port, __u8 uuid[16],
+                    int client_flag);
+int izo_upc_revoke_permit(int minor, char *fsetname, uuid_t uuid);
+int izo_upc_set_kmlsize(int minor, char *fsetname, uuid_t uuid, __u64 kmlsize);
+int izo_upc_client_make_branch(int minor, char *fsetname);
+int izo_upc_server_make_branch(int minor, char *fsetname);
+int izo_upc_branch_undo(int minor, char *fsetname, char *branchname);
+int izo_upc_branch_redo(int minor, char *fsetname, char *branchname);
+int izo_upc_repstatus(int minor,  char * fsetname, struct izo_rcvd_rec *lr_server);
+
+/* general mechanism */
+int izo_upc_upcall(int minor, int *size, struct izo_upcall_hdr *, int async);
+
+/* replicator.c */
+int izo_repstatus(struct presto_file_set *fset, __u64 client_kmlsize, 
+                  struct izo_rcvd_rec *lr_client, struct izo_rcvd_rec *lr_server);
+int izo_rep_cache_init(struct presto_file_set *);
+loff_t izo_rcvd_get(struct izo_rcvd_rec *, struct presto_file_set *, char *uuid);
+loff_t izo_rcvd_write(struct presto_file_set *, struct izo_rcvd_rec *);
+loff_t izo_rcvd_upd_remote(struct presto_file_set *fset, char * uuid,  __u64 remote_recno,
+                           __u64 remote_offset);
+
+/* sysctl.c */
+int init_intermezzo_sysctl(void);
+void cleanup_intermezzo_sysctl(void);
+
+/* ext_attr.c */
+/* We will be more tolerant than the default ea patch with attr name sizes and
+ * the size of value. If these come via VFS from the default ea patches, the
+ * corresponding character strings will be truncated anyway. During journalling- * we journal length for both name and value. See journal_set_ext_attr.
+ */
+#define PRESTO_EXT_ATTR_NAME_MAX 128
+#define PRESTO_EXT_ATTR_VALUE_MAX 8192
+
+#define PRESTO_ALLOC(ptr, size)                                         \
+do {                                                                    \
+        long s = (size);                                                \
+        (ptr) = kmalloc(s, GFP_KERNEL);                                 \
+        if ((ptr) == NULL)                                              \
+                CERROR("IZO: out of memory at %s:%d (trying to "        \
+                       "allocate %ld)\n", __FILE__, __LINE__, s);       \
+        else {                                                          \
+                presto_kmem_inc((ptr), s);                              \
+                memset((ptr), 0, s);                                    \
+        }                                                               \
+        CDEBUG(D_MALLOC, "kmalloced: %ld at %p (tot %ld).\n",           \
+               s, (ptr), presto_kmemory);                               \
+} while (0)
+
+#define PRESTO_FREE(ptr, size)                                          \
+do {                                                                    \
+        long s = (size);                                                \
+        if ((ptr) == NULL) {                                            \
+                CERROR("IZO: free NULL pointer (%ld bytes) at "         \
+                       "%s:%d\n", s, __FILE__, __LINE__);               \
+                break;                                                  \
+        }                                                               \
+        kfree(ptr);                                                     \
+        CDEBUG(D_MALLOC, "kfreed: %ld at %p (tot %ld).\n",              \
+               s, (ptr), presto_kmemory);                               \
+        presto_kmem_dec((ptr), s);                                      \
+} while (0)
+
+static inline int dentry_name_cmp(struct dentry *dentry, char *name)
+{
+        return (strlen(name) == dentry->d_name.len &&
+                memcmp(name, dentry->d_name.name, dentry->d_name.len) == 0);
+}
+
+static inline char *strdup(char *str)
+{
+        char *tmp;
+        tmp = kmalloc(strlen(str) + 1, GFP_KERNEL);
+        if (tmp)
+                memcpy(tmp, str, strlen(str) + 1);
+               
+        return tmp;
+}
+
+/* buffer MUST be at least the size of izo_ioctl_hdr */
+static inline int izo_ioctl_getdata(char *buf, char *end, void *arg)
+{
+        struct izo_ioctl_hdr *hdr;
+        struct izo_ioctl_data *data;
+        int err;
+        ENTRY;
+
+        hdr = (struct izo_ioctl_hdr *)buf;
+        data = (struct izo_ioctl_data *)buf;
+
+        err = copy_from_user(buf, (void *)arg, sizeof(*hdr));
+        if ( err ) {
+                EXIT;
+                return err;
+        }
+
+        if (hdr->ioc_version != IZO_IOCTL_VERSION) {
+                CERROR("IZO: version mismatch kernel vs application\n");
+                return -EINVAL;
+        }
+
+        if (hdr->ioc_len + buf >= end) {
+                CERROR("IZO: user buffer exceeds kernel buffer\n");
+                return -EINVAL;
+        }
+
+        if (hdr->ioc_len < sizeof(struct izo_ioctl_data)) {
+                CERROR("IZO: user buffer too small for ioctl\n");
+                return -EINVAL;
+        }
+
+        err = copy_from_user(buf, (void *)arg, hdr->ioc_len);
+        if ( err ) {
+                EXIT;
+                return err;
+        }
+
+        if (izo_ioctl_is_invalid(data)) {
+                CERROR("IZO: ioctl not correctly formatted\n");
+                return -EINVAL;
+        }
+
+        if (data->ioc_inllen1) {
+                data->ioc_inlbuf1 = &data->ioc_bulk[0];
+        }
+
+        if (data->ioc_inllen2) {
+                data->ioc_inlbuf2 = &data->ioc_bulk[0] +
+                        size_round(data->ioc_inllen1);
+        }
+
+        EXIT;
+        return 0;
+}
+
+# define MYPATHLEN(buffer, path) ((buffer) + PAGE_SIZE - (path))
+
+# define free kfree
+# define malloc(a) kmalloc(a, GFP_KERNEL)
+# define printf printk
+int kml_reint_rec(struct file *dir, struct izo_ioctl_data *data);
+int izo_get_fileid(struct file *dir, struct izo_ioctl_data *data);
+int izo_set_fileid(struct file *dir, struct izo_ioctl_data *data);
+
+#else /* __KERNEL__ */
+# include <stdlib.h>
+# include <stdio.h>
+# include <sys/types.h>
+# include <sys/ioctl.h>
+# include <string.h>
+
+# define printk printf
+# ifndef CERROR
+#   define CERROR printf
+# endif
+# define kmalloc(a,b) malloc(a)
+
+void init_fsreintdata (void);
+int kml_fsreint(struct kml_rec *rec, char *basedir);
+int kml_iocreint(__u32 size, char *ptr, __u32 offset, int dird,
+                 uuid_t uuid, __u32 generate_kml);
+
+static inline int izo_ioctl_packlen(struct izo_ioctl_data *data);
+
+static inline void izo_ioctl_init(struct izo_ioctl_data *data)
+{
+        memset(data, 0, sizeof(*data));
+        data->ioc_len = sizeof(*data);
+        data->ioc_version = IZO_IOCTL_VERSION;
+}
+
+static inline int
+izo_ioctl_pack(struct izo_ioctl_data *data, char **pbuf, int max)
+{
+        char *ptr;
+        struct izo_ioctl_data *overlay;
+        data->ioc_len = izo_ioctl_packlen(data);
+        data->ioc_version = IZO_IOCTL_VERSION;
+
+        if (*pbuf && izo_ioctl_packlen(data) > max)
+                return 1;
+        if (*pbuf == NULL)
+                *pbuf = malloc(data->ioc_len);
+        if (*pbuf == NULL)
+                return 1;
+        overlay = (struct izo_ioctl_data *)*pbuf;
+        memcpy(*pbuf, data, sizeof(*data));
+
+        ptr = overlay->ioc_bulk;
+        if (data->ioc_inlbuf1)
+                LOGL(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
+        if (data->ioc_inlbuf2)
+                LOGL(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
+        if (izo_ioctl_is_invalid(overlay))
+                return 1;
+
+        return 0;
+}
+
+#endif /* __KERNEL__*/
+
+#define IZO_ERROR_NAME 1
+#define IZO_ERROR_UPDATE 2
+#define IZO_ERROR_DELETE 3
+#define IZO_ERROR_RENAME 4
+
+static inline char *izo_error(int err)
+{
+#ifndef __KERNEL__
+        if (err <= 0)
+                return strerror(-err);
+#endif
+        switch (err) {
+        case IZO_ERROR_NAME:
+                return "InterMezzo name/name conflict";
+        case IZO_ERROR_UPDATE:
+                return "InterMezzo update/update conflict";
+        case IZO_ERROR_DELETE:
+                return "InterMezzo update/delete conflict";
+        case IZO_ERROR_RENAME:
+                return "InterMezzo rename/rename conflict";
+        }
+        return "Unknown InterMezzo error";
+}
+
+static inline int izo_ioctl_packlen(struct izo_ioctl_data *data)
+{
+        int len = sizeof(struct izo_ioctl_data);
+        len += size_round(data->ioc_inllen1);
+        len += size_round(data->ioc_inllen2);
+        return len;
+}
+
+static inline int izo_ioctl_is_invalid(struct izo_ioctl_data *data)
+{
+        if (data->ioc_len > (1<<30)) {
+                CERROR("IZO ioctl: ioc_len larger than 1<<30\n");
+                return 1;
+        }
+        if (data->ioc_inllen1 > (1<<30)) {
+                CERROR("IZO ioctl: ioc_inllen1 larger than 1<<30\n");
+                return 1;
+        }
+        if (data->ioc_inllen2 > (1<<30)) {
+                CERROR("IZO ioctl: ioc_inllen2 larger than 1<<30\n");
+                return 1;
+        }
+        if (data->ioc_inlbuf1 && !data->ioc_inllen1) {
+                CERROR("IZO ioctl: inlbuf1 pointer but 0 length\n");
+                return 1;
+        }
+        if (data->ioc_inlbuf2 && !data->ioc_inllen2) {
+                CERROR("IZO ioctl: inlbuf2 pointer but 0 length\n");
+                return 1;
+        }
+        if (data->ioc_pbuf1 && !data->ioc_plen1) {
+                CERROR("IZO ioctl: pbuf1 pointer but 0 length\n");
+                return 1;
+        }
+        if (data->ioc_pbuf2 && !data->ioc_plen2) {
+                CERROR("IZO ioctl: pbuf2 pointer but 0 length\n");
+                return 1;
+        }
+        if (izo_ioctl_packlen(data) != data->ioc_len ) {
+                CERROR("IZO ioctl: packlen exceeds ioc_len\n");
+                return 1;
+        }
+        if (data->ioc_inllen1 &&
+            data->ioc_bulk[data->ioc_inllen1 - 1] != '\0') {
+                CERROR("IZO ioctl: inlbuf1 not 0 terminated\n");
+                return 1;
+        }
+        if (data->ioc_inllen2 &&
+            data->ioc_bulk[size_round(data->ioc_inllen1) + data->ioc_inllen2
+                           - 1] != '\0') {
+                CERROR("IZO ioctl: inlbuf2 not 0 terminated\n");
+                return 1;
+        }
+        return 0;
+}
+
+/* kml_unpack.c */
+char *kml_print_rec(struct kml_rec *rec, int brief);
+int kml_unpack(struct kml_rec *rec, char **buf, char *end);
+
+/* fs 2.5 compat */
+
+/* is_read_only() is replaced by bdev_read_only which takes struct
+   block_device *.  Since this is only needed for debugging, it can be
+   safely ignored now.
+*/
+#define is_read_only(dev) 0
+
+#endif
diff -Nru a/fs/intermezzo/intermezzo_idl.h b/fs/intermezzo/intermezzo_idl.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_idl.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,304 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
+ *  Copyright (C) 2001 Tacit Networks, Inc.
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __INTERMEZZO_IDL_H__
+#define __INTERMEZZO_IDL_H__
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+/* this file contains all data structures used in InterMezzo's interfaces:
+ * - upcalls
+ * - ioctl's
+ * - KML records
+ * - RCVD records
+ * - rpc's
+ */ 
+
+/* UPCALL */
+#define INTERMEZZO_MINOR 248   
+
+
+#define IZO_UPC_VERSION 0x00010002
+#define IZO_UPC_PERMIT        1
+#define IZO_UPC_CONNECT       2
+#define IZO_UPC_GO_FETCH_KML  3
+#define IZO_UPC_OPEN          4
+#define IZO_UPC_REVOKE_PERMIT 5
+#define IZO_UPC_KML           6
+#define IZO_UPC_BACKFETCH     7
+#define IZO_UPC_KML_TRUNC     8
+#define IZO_UPC_SET_KMLSIZE   9
+#define IZO_UPC_BRANCH_UNDO   10
+#define IZO_UPC_BRANCH_REDO   11
+#define IZO_UPC_GET_FILEID    12
+#define IZO_UPC_CLIENT_MAKE_BRANCH    13
+#define IZO_UPC_SERVER_MAKE_BRANCH    14
+#define IZO_UPC_REPSTATUS    15
+
+#define IZO_UPC_LARGEST_OPCODE 15
+
+struct izo_upcall_hdr {
+        __u32 u_len;
+        __u32 u_version;
+        __u32 u_opc;
+        __u32 u_uniq;
+        __u32 u_pid;
+        __u32 u_uid;
+        __u32 u_pathlen;
+        __u32 u_fsetlen;
+        __u64 u_offset;
+        __u64 u_length;
+        __u32 u_first_recno;
+        __u32 u_last_recno;
+        __u32 u_async;
+        __u32 u_reclen;
+        __u8  u_uuid[16];
+};
+
+/* This structure _must_ sit at the beginning of the buffer */
+struct izo_upcall_resp {
+        __u32 opcode;
+        __u32 unique;    
+        __u32 result;
+};
+
+
+/* IOCTL */
+
+#define IZO_IOCTL_VERSION 0x00010003
+
+/* maximum size supported for ioc_pbuf1 */
+#define KML_MAX_BUF (64*1024)
+
+struct izo_ioctl_hdr { 
+        __u32  ioc_len;
+        __u32  ioc_version;
+};
+
+struct izo_ioctl_data {
+        __u32 ioc_len;
+        __u32 ioc_version;
+        __u32 ioc_izodev;
+        __u32 ioc_kmlrecno;
+        __u64 ioc_kmlsize;
+        __u32 ioc_flags;
+        __s32 ioc_inofd;
+        __u64 ioc_ino;
+        __u64 ioc_generation;
+        __u32 ioc_mark_what;
+        __u32 ioc_and_flag;
+        __u32 ioc_or_flag;
+        __u32 ioc_dev;
+        __u32 ioc_offset;
+        __u32 ioc_slot;
+        __u64 ioc_uid;
+        __u8  ioc_uuid[16];
+
+        __u32 ioc_inllen1;   /* path */
+        char *ioc_inlbuf1;
+        __u32 ioc_inllen2;   /* fileset */
+        char *ioc_inlbuf2;
+
+        __u32 ioc_plen1;     /* buffers in user space (KML) */
+        char *ioc_pbuf1;
+        __u32 ioc_plen2;     /* buffers in user space (KML) */
+        char *ioc_pbuf2;
+
+        char  ioc_bulk[0];
+};
+
+#define IZO_IOC_DEVICE          _IOW ('p',0x50, void *)
+#define IZO_IOC_REINTKML        _IOW ('p',0x51, void *)
+#define IZO_IOC_GET_RCVD        _IOW ('p',0x52, void *)
+#define IZO_IOC_SET_IOCTL_UID   _IOW ('p',0x53, void *)
+#define IZO_IOC_GET_KML_SIZE    _IOW ('p',0x54, void *)
+#define IZO_IOC_PURGE_FILE_DATA _IOW ('p',0x55, void *)
+#define IZO_IOC_CONNECT         _IOW ('p',0x56, void *)
+#define IZO_IOC_GO_FETCH_KML    _IOW ('p',0x57, void *)
+#define IZO_IOC_MARK            _IOW ('p',0x58, void *)
+#define IZO_IOC_CLEAR_FSET      _IOW ('p',0x59, void *)
+#define IZO_IOC_CLEAR_ALL_FSETS _IOW ('p',0x60, void *)
+#define IZO_IOC_SET_FSET        _IOW ('p',0x61, void *)
+#define IZO_IOC_REVOKE_PERMIT   _IOW ('p',0x62, void *)
+#define IZO_IOC_SET_KMLSIZE     _IOW ('p',0x63, void *)
+#define IZO_IOC_CLIENT_MAKE_BRANCH _IOW ('p',0x64, void *)
+#define IZO_IOC_SERVER_MAKE_BRANCH _IOW ('p',0x65, void *)
+#define IZO_IOC_BRANCH_UNDO    _IOW ('p',0x66, void *)
+#define IZO_IOC_BRANCH_REDO    _IOW ('p',0x67, void *)
+#define IZO_IOC_SET_PID        _IOW ('p',0x68, void *)
+#define IZO_IOC_SET_CHANNEL    _IOW ('p',0x69, void *)
+#define IZO_IOC_GET_CHANNEL    _IOW ('p',0x70, void *)
+#define IZO_IOC_GET_FILEID    _IOW ('p',0x71, void *)
+#define IZO_IOC_ADJUST_LML    _IOW ('p',0x72, void *)
+#define IZO_IOC_SET_FILEID    _IOW ('p',0x73, void *)
+#define IZO_IOC_REPSTATUS    _IOW ('p',0x74, void *)
+
+/* marking flags for fsets */
+#define FSET_CLIENT_RO        0x00000001
+#define FSET_LENTO_RO         0x00000002
+#define FSET_HASPERMIT        0x00000004 /* we have a permit to WB */
+#define FSET_INSYNC           0x00000008 /* this fileset is in sync */
+#define FSET_PERMIT_WAITING   0x00000010 /* Lento is waiting for permit */
+#define FSET_STEAL_PERMIT     0x00000020 /* take permit if Lento is dead */
+#define FSET_JCLOSE_ON_WRITE  0x00000040 /* Journal closes on writes */
+#define FSET_DATA_ON_DEMAND   0x00000080 /* update data on file_open() */
+#define FSET_PERMIT_EXCLUSIVE 0x00000100 /* only one permitholder allowed */
+#define FSET_HAS_BRANCHES     0x00000200 /* this fileset contains branches */
+#define FSET_IS_BRANCH        0x00000400 /* this fileset is a branch */
+#define FSET_FLAT_BRANCH      0x00000800 /* this fileset is ROOT with branches */
+
+/* what to mark indicator (ioctl parameter) */
+#define MARK_DENTRY   101
+#define MARK_FSET     102
+#define MARK_CACHE    103
+#define MARK_GETFL    104
+
+/* KML */
+
+#define KML_MAJOR_VERSION 0x00010000
+#define KML_MINOR_VERSION 0x00000002
+#define KML_OPCODE_NOOP          0
+#define KML_OPCODE_CREATE        1
+#define KML_OPCODE_MKDIR         2
+#define KML_OPCODE_UNLINK        3
+#define KML_OPCODE_RMDIR         4
+#define KML_OPCODE_CLOSE         5
+#define KML_OPCODE_SYMLINK       6
+#define KML_OPCODE_RENAME        7
+#define KML_OPCODE_SETATTR       8
+#define KML_OPCODE_LINK          9
+#define KML_OPCODE_OPEN          10
+#define KML_OPCODE_MKNOD         11
+#define KML_OPCODE_WRITE         12
+#define KML_OPCODE_RELEASE       13
+#define KML_OPCODE_TRUNC         14
+#define KML_OPCODE_SETEXTATTR    15
+#define KML_OPCODE_DELEXTATTR    16
+#define KML_OPCODE_KML_TRUNC     17
+#define KML_OPCODE_GET_FILEID    18
+#define KML_OPCODE_NUM           19
+/* new stuff */
+struct presto_version {
+        __u32 pv_mtime_sec;
+        __u32 pv_mtime_nsec;
+        __u32 pv_ctime_sec;
+        __u32 pv_ctime_nsec;
+        __u64 pv_size;
+};
+
+struct kml_prefix_hdr {
+        __u32                    len;
+        __u32                    version;
+        __u32                    pid;
+        __u32                    auid;
+        __u32                    fsuid;
+        __u32                    fsgid;
+        __u32                    opcode;
+        __u32                    ngroups;
+};
+
+struct kml_prefix { 
+        struct kml_prefix_hdr    *hdr;
+        __u32                    *groups;
+};
+
+struct kml_suffix { 
+        __u32                    prevrec;
+        __u32                    recno;
+        __u32                    time;
+        __u32                    len;
+};
+
+struct kml_rec {
+        char                   *buf;
+        struct kml_prefix       prefix;
+        __u64                   offset;
+        char                   *path;
+        int                     pathlen;
+        char                   *name;
+        int                     namelen;
+        char                   *target;
+        int                     targetlen;
+        struct presto_version  *old_objectv;
+        struct presto_version  *new_objectv;
+        struct presto_version  *old_parentv;
+        struct presto_version  *new_parentv;
+        struct presto_version  *old_targetv;
+        struct presto_version  *new_targetv;
+        __u32                   valid;
+        __u32                   mode;
+        __u32                   uid;
+        __u32                   gid;
+        __u64                   size;
+        __u32                   mtime_sec;
+        __u32                   mtime_nsec;
+        __u32                   ctime_sec;
+        __u32                   ctime_nsec;
+        __u32                   flags;
+        __u32                   ino;
+        __u32                   rdev;
+        __u32                   major;
+        __u32                   minor;
+        __u32                   generation;
+        __u32                   old_mode;
+        __u32                   old_rdev;
+        __u64                   old_uid;
+        __u64                   old_gid;
+        char                   *old_target;
+        int                     old_targetlen;
+        struct kml_suffix      *suffix;
+};
+
+
+/* RCVD */ 
+
+/* izo_rcvd_rec fills the .intermezzo/fset/last_rcvd file and provides data about
+ * our view of reintegration offsets for a given peer.
+ *
+ * The only exception is the last_rcvd record which has a UUID consisting of all
+ * zeroes; this record's lr_local_offset field is the logical byte offset of our
+ * KML, which is updated when KML truncation takes place.  All other fields are
+ * reserved. */
+
+/* XXX - document how clean shutdowns are recorded */
+
+struct izo_rcvd_rec { 
+        __u8    lr_uuid[16];       /* which peer? */
+        __u64   lr_remote_recno;   /* last confirmed remote recno  */
+        __u64   lr_remote_offset;  /* last confirmed remote offset */
+        __u64   lr_local_recno;    /* last locally reinted recno   */
+        __u64   lr_local_offset;   /* last locally reinted offset  */
+        __u64   lr_last_ctime;     /* the largest ctime that has reintegrated */
+};
+
+/* Cache purge database
+ *
+ * Each DB entry is this structure followed by the path name, no trailing NUL. */
+struct izo_purge_entry {
+        __u64 p_atime;
+        __u32 p_pathlen;
+};
+
+/* RPC */
+
+#endif
diff -Nru a/fs/intermezzo/intermezzo_journal.h b/fs/intermezzo/intermezzo_journal.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_journal.h	Sun Dec 15 18:08:28 2002
@@ -0,0 +1,26 @@
+#ifndef __PRESTO_JOURNAL_H
+#define __PRESTO_JOURNAL_H
+
+
+#include <linux/version.h>
+
+struct journal_prefix {
+	int len;
+        u32 version;
+	int pid;
+	int uid;
+	int fsuid;
+	int fsgid;
+	int opcode;
+        u32 ngroups;
+        u32 groups[0];
+};
+
+struct journal_suffix {
+	unsigned long prevrec;  /* offset of previous record for dentry */
+	int recno;
+	int time;
+	int len;
+};
+
+#endif
diff -Nru a/fs/intermezzo/intermezzo_kml.h b/fs/intermezzo/intermezzo_kml.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_kml.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,261 @@
+#ifndef __INTERMEZZO_KML_H
+#define __INTERMEZZO_KML_H
+
+#include <linux/version.h>
+#include "intermezzo_psdev.h"
+#include <linux/fs.h>
+#include "intermezzo_journal.h"
+
+#define PRESTO_KML_MAJOR_VERSION 0x00010000
+#define PRESTO_KML_MINOR_VERSION 0x00002001
+#define PRESTO_OP_NOOP          0
+#define PRESTO_OP_CREATE        1
+#define PRESTO_OP_MKDIR         2
+#define PRESTO_OP_UNLINK        3
+#define PRESTO_OP_RMDIR         4
+#define PRESTO_OP_CLOSE         5
+#define PRESTO_OP_SYMLINK       6
+#define PRESTO_OP_RENAME        7
+#define PRESTO_OP_SETATTR       8
+#define PRESTO_OP_LINK          9
+#define PRESTO_OP_OPEN          10
+#define PRESTO_OP_MKNOD         11
+#define PRESTO_OP_WRITE         12
+#define PRESTO_OP_RELEASE       13
+#define PRESTO_OP_TRUNC         14
+#define PRESTO_OP_SETEXTATTR    15
+#define PRESTO_OP_DELEXTATTR    16
+
+#define PRESTO_LML_DONE     	1 /* flag to get first write to do LML */
+#define KML_KOP_MARK            0xffff
+
+struct presto_lml_data {
+        loff_t   rec_offset;
+};
+
+struct big_journal_prefix {
+        u32 len;
+        u32 version; 
+        u32 pid;
+        u32 uid;
+        u32 fsuid;
+        u32 fsgid;
+        u32 opcode;
+        u32 ngroups;
+        u32 groups[NGROUPS_MAX];
+};
+
+enum kml_opcode {
+        KML_CREATE = 1,
+        KML_MKDIR,
+        KML_UNLINK,
+        KML_RMDIR,
+        KML_CLOSE,
+        KML_SYMLINK,
+        KML_RENAME,
+        KML_SETATTR,
+        KML_LINK,
+        KML_OPEN,
+        KML_MKNOD,
+        KML_ENDMARK = 0xff
+};
+
+struct kml_create {
+	char 			*path;
+	struct presto_version 	new_objectv, 
+				old_parentv, 
+				new_parentv;
+	int 			mode;
+	int 			uid;
+	int 			gid;
+};
+
+struct kml_open {
+};
+
+struct kml_mkdir {
+	char 			*path;
+	struct presto_version 	new_objectv, 
+				old_parentv, 
+				new_parentv;
+	int 			mode;
+	int 			uid;
+	int 			gid;
+};
+
+struct kml_unlink {
+	char 			*path, 	
+				*name;
+	struct presto_version 	old_tgtv, 
+				old_parentv, 
+				new_parentv;
+};
+
+struct kml_rmdir {
+	char 			*path, 
+				*name;
+	struct presto_version 	old_tgtv, 
+				old_parentv, 
+				new_parentv;
+};
+
+struct kml_close {
+	int 			open_mode, 
+				open_uid, 
+				open_gid;
+	char 			*path;
+	struct presto_version 	new_objectv;
+	__u64 			ino;
+      	int 			generation;
+};
+
+struct kml_symlink {
+	char 			*sourcepath, 	
+				*targetpath;
+	struct presto_version 	new_objectv, 
+				old_parentv, 
+				new_parentv;
+      	int 			uid;
+	int 			gid;
+};
+
+struct kml_rename {
+	char 			*sourcepath, 
+				*targetpath;
+	struct presto_version 	old_objectv, 
+				new_objectv, 
+				old_tgtv, 
+				new_tgtv;
+};
+
+struct kml_setattr {
+	char 			*path;
+	struct presto_version 	old_objectv;
+	struct iattr 		iattr;
+};
+
+struct kml_link {
+	char 			*sourcepath, 	
+				*targetpath;
+	struct presto_version 	new_objectv, 
+				old_parentv, 
+				new_parentv;
+};
+
+struct kml_mknod {
+	char 			*path;
+	struct presto_version 	new_objectv, 
+				old_parentv, 
+				new_parentv;
+	int 			mode;
+      	int 			uid;
+	int 			gid;
+       	int 			major;
+	int 			minor;
+};
+
+/* kml record items for optimizing */
+struct kml_kop_node
+{
+        u32             kml_recno;
+        u32             kml_flag;
+        u32             kml_op;
+        nlink_t         i_nlink;
+        u32             i_ino;
+};
+
+struct kml_kop_lnode
+{
+        struct list_head chains;
+        struct kml_kop_node node;
+};
+
+struct kml_endmark {
+	u32			total;
+	struct kml_kop_node 	*kop;
+};
+
+/* kml_flag */
+#define  KML_REC_DELETE               1
+#define  KML_REC_EXIST                0
+
+struct kml_optimize {
+	struct list_head kml_chains;
+        u32              kml_flag;
+        u32              kml_op;
+        nlink_t          i_nlink;
+        u32              i_ino;
+};
+
+struct kml_rec {
+	/* attribute of this record */
+	int 				rec_size;
+        int     			rec_kml_offset;
+
+	struct 	big_journal_prefix 	rec_head;
+	union {
+		struct kml_create 	create;
+		struct kml_open 	open;
+		struct kml_mkdir 	mkdir;
+		struct kml_unlink 	unlink;
+		struct kml_rmdir 	rmdir;
+		struct kml_close 	close;
+		struct kml_symlink 	symlink;
+		struct kml_rename 	rename;
+		struct kml_setattr 	setattr;
+		struct kml_mknod 	mknod;
+		struct kml_link 	link;
+		struct kml_endmark      endmark;
+	} rec_kml;
+        struct 	journal_suffix 		rec_tail;
+
+        /* for kml optimize only */
+        struct  kml_optimize kml_optimize;
+};
+
+/* kml record items for optimizing */
+extern void kml_kop_init (struct presto_file_set *fset);
+extern void kml_kop_addrec (struct presto_file_set *fset, 
+		struct inode *ino, u32 op, u32 flag);
+extern int  kml_kop_flush (struct presto_file_set *fset);
+
+/* defined in kml_setup.c */
+extern int kml_init (struct presto_file_set *fset);
+extern int kml_cleanup (struct presto_file_set *fset);
+
+/* defined in kml.c */
+extern int begin_kml_reint (struct file *file, unsigned long arg);
+extern int do_kml_reint (struct file *file, unsigned long arg);
+extern int end_kml_reint (struct file *file, unsigned long arg);
+
+/* kml_utils.c */
+extern char *dlogit (void *tbuf, const void *sbuf, int size);
+extern char * bdup_printf (char *format, ...);
+
+/* defined in kml_decode.c */
+/* printop */
+#define  PRINT_KML_PREFIX             0x1
+#define  PRINT_KML_SUFFIX             0x2
+#define  PRINT_KML_REC                0x4
+#define  PRINT_KML_OPTIMIZE           0x8
+#define  PRINT_KML_EXIST              0x10
+#define  PRINT_KML_DELETE             0x20
+extern void   kml_printrec (struct kml_rec *rec, int printop);
+extern int    print_allkmlrec (struct list_head *head, int printop);
+extern int    delete_kmlrec (struct list_head *head);
+extern int    kml_decoderec (char *buf, int pos, int buflen, int *size,
+	                     struct kml_rec **newrec);
+extern int decode_kmlrec (struct list_head *head, char *kml_buf, int buflen);
+extern void kml_freerec (struct kml_rec *rec);
+
+/* defined in kml_reint.c */
+#define KML_CLOSE_BACKFETCH            1
+extern int kml_reintbuf (struct  kml_fsdata *kml_fsdata,
+                  	char *mtpt, struct kml_rec **rec);
+
+/* defined in kml_setup.c */
+extern int kml_init (struct presto_file_set *fset);
+extern int kml_cleanup (struct presto_file_set *fset);
+
+#endif
+
diff -Nru a/fs/intermezzo/intermezzo_lib.h b/fs/intermezzo/intermezzo_lib.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_lib.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,168 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ *
+ * Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * Data structures unpacking/packing macros & inlines
+ *
+ */
+
+#ifndef _INTERMEZZO_LIB_H
+#define _INTERMEZZO_LIB_H
+
+#ifdef __KERNEL__
+# include <linux/types.h>
+#else
+# include <string.h>
+# include <sys/types.h>
+#endif
+
+#undef MIN
+#define MIN(a,b) (((a)<(b)) ? (a): (b))
+#undef MAX
+#define MAX(a,b) (((a)>(b)) ? (a): (b))
+#define MKSTR(ptr) ((ptr))? (ptr) : ""
+
+static inline int size_round (int val)
+{
+	return (val + 3) & (~0x3);
+}
+
+static inline int size_round0(int val)
+{
+        if (!val) 
+                return 0;
+	return (val + 1 + 3) & (~0x3);
+}
+
+static inline size_t round_strlen(char *fset)
+{
+	return size_round(strlen(fset) + 1);
+}
+
+#ifdef __KERNEL__
+# define NTOH__u32(var) le32_to_cpu(var)
+# define NTOH__u64(var) le64_to_cpu(var)
+# define HTON__u32(var) cpu_to_le32(var)
+# define HTON__u64(var) cpu_to_le64(var)
+#else
+# include <glib.h>
+# define NTOH__u32(var) GUINT32_FROM_LE(var)
+# define NTOH__u64(var) GUINT64_FROM_LE(var)
+# define HTON__u32(var) GUINT32_TO_LE(var)
+# define HTON__u64(var) GUINT64_TO_LE(var)
+#endif
+
+/* 
+ * copy sizeof(type) bytes from pointer to var and move ptr forward.
+ * return EFAULT if pointer goes beyond end
+ */
+#define UNLOGV(var,type,ptr,end)                \
+do {                                            \
+        var = *(type *)ptr;                     \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+/* the following two macros convert to little endian */
+/* type MUST be __u32 or __u64 */
+#define LUNLOGV(var,type,ptr,end)               \
+do {                                            \
+        var = NTOH##type(*(type *)ptr);         \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+/* now log values */
+#define LOGV(var,type,ptr)                      \
+do {                                            \
+        *((type *)ptr) = var;                   \
+        ptr += sizeof(type);                    \
+} while (0)
+
+/* and in network order */
+#define LLOGV(var,type,ptr)                     \
+do {                                            \
+        *((type *)ptr) = HTON##type(var);       \
+        ptr += sizeof(type);                    \
+} while (0)
+
+
+/* 
+ * set var to point at (type *)ptr, move ptr forward with sizeof(type)
+ * return from function with EFAULT if ptr goes beyond end
+ */
+#define UNLOGP(var,type,ptr,end)                \
+do {                                            \
+        var = (type *)ptr;                      \
+        ptr += sizeof(type);                    \
+        if (ptr > end )                         \
+                return -EFAULT;                 \
+} while (0)
+
+#define LOGP(var,type,ptr)                      \
+do {                                            \
+        memcpy(ptr, var, sizeof(type));         \
+        ptr += sizeof(type);                    \
+} while (0)
+
+/* 
+ * set var to point at (char *)ptr, move ptr forward by size_round(len);
+ * return from function with EFAULT if ptr goes beyond end
+ */
+#define UNLOGL(var,type,len,ptr,end)                    \
+do {                                                    \
+        if (len == 0)                                   \
+                var = (type *)0;                        \
+        else {                                          \
+                var = (type *)ptr;                      \
+                ptr += size_round(len * sizeof(type));  \
+        }                                               \
+        if (ptr > end )                                 \
+                return -EFAULT;                         \
+} while (0)
+
+#define UNLOGL0(var,type,len,ptr,end)                           \
+do {                                                            \
+        UNLOGL(var,type,len+1,ptr,end);                         \
+        if ( *((char *)ptr - size_round(len+1) + len) != '\0')  \
+                        return -EFAULT;                         \
+} while (0)
+
+#define LOGL(var,len,ptr)                               \
+do {                                                    \
+        size_t __fill = size_round(len);                \
+        /* Prevent data leakage. */                     \
+        if (__fill > 0)                                 \
+                memset((char *)ptr, 0, __fill);         \
+        memcpy((char *)ptr, (const char *)var, len);    \
+        ptr += __fill;                                  \
+} while (0)
+
+#define LOGL0(var,len,ptr)                              \
+do {                                                    \
+        if (!len) break;                                \
+        memcpy((char *)ptr, (const char *)var, len);    \
+        *((char *)(ptr) + len) = 0;                     \
+        ptr += size_round(len + 1);                     \
+} while (0)
+
+#endif /* _INTERMEZZO_LIB_H */
+
diff -Nru a/fs/intermezzo/intermezzo_psdev.h b/fs/intermezzo/intermezzo_psdev.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_psdev.h	Sun Dec 15 18:08:29 2002
@@ -0,0 +1,57 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
+
+#ifndef __PRESTO_PSDEV_H
+#define __PRESTO_PSDEV_H
+
+#define MAX_CHANNEL 16
+#define PROCNAME_SIZE 32
+#include <linux/smp_lock.h>
+#include <linux/smp_lock.h>
+#include <linux/version.h>
+
+/* represents state of an instance reached with /dev/intermezzo */
+/* communication pending & processing queues */
+struct upc_channel {
+        unsigned int         uc_seq;
+        wait_queue_head_t    uc_waitq;    /* Lento wait queue */
+        struct list_head     uc_pending;
+        struct list_head     uc_processing;
+        spinlock_t            uc_lock;
+        int                  uc_pid;      /* Lento's pid */
+        int                  uc_hard;     /* allows signals during upcalls */
+        int                  uc_no_filter;
+        int                  uc_no_journal;
+        int                  uc_no_upcall;
+        int                  uc_timeout;  /* . sec: signals will dequeue upc */
+        long                 uc_errorval; /* for testing I/O failures */
+        struct list_head     uc_cache_list;
+        int                  uc_minor;
+};
+
+#define ISLENTO(minor) (current->pid == izo_channels[minor].uc_pid \
+                || current->real_parent->pid == izo_channels[minor].uc_pid \
+                || current->real_parent->real_parent->pid == izo_channels[minor].uc_pid)
+
+extern struct upc_channel izo_channels[MAX_CHANNEL];
+
+/* message types between presto filesystem in kernel */
+#define REQ_READ   1
+#define REQ_WRITE  2
+#define REQ_ASYNC  4
+#define REQ_DEAD   8
+
+struct upc_req {
+        struct list_head   rq_chain;
+        caddr_t            rq_data;
+        int                rq_flags;
+        int                rq_bufsize;
+        int                rq_rep_size;
+        int                rq_opcode;  /* copied from data to save lookup */
+        int                rq_unique;
+        wait_queue_head_t  rq_sleep;   /* process' wait queue */
+        unsigned long      rq_posttime;
+};
+
+#endif
diff -Nru a/fs/intermezzo/intermezzo_upcall.h b/fs/intermezzo/intermezzo_upcall.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/fs/intermezzo/intermezzo_upcall.h	Sun Dec 15 18:08:28 2002
@@ -0,0 +1,146 @@
+/*
+ * Based on cfs.h from Coda, but revamped for increased simplicity.
+ * Linux modifications by Peter Braam, Aug 1996
+ * Rewritten for InterMezzo
+ */
+
+#ifndef _PRESTO_HEADER_
+#define _PRESTO_HEADER_
+
+
+/* upcall.c */
+#define SYNCHRONOUS 0
+#define ASYNCHRONOUS 1
+
+int lento_permit(int minor, int pathlen, int fsetnamelen, char *path, char *fset);
+int lento_opendir(int minor, int pathlen, char *path, int async);
+int lento_kml(int minor, unsigned int offset, unsigned int first_recno,
+              unsigned int length, unsigned int last_recno, int namelen,
+              char *fsetname);
+int lento_open(int minor, int pathlen, char *path);
+int lento_journal(int minor, char *page, int async);
+int lento_release_permit(int minor, int cookie);
+
+/*
+ * Kernel <--> Lento communications.
+ */
+/* upcalls */
+#define LENTO_PERMIT    1
+#define LENTO_JOURNAL   2
+#define LENTO_OPENDIR   3
+#define LENTO_OPEN      4
+#define LENTO_SIGNAL    5
+#define LENTO_KML       6
+#define LENTO_COOKIE    7
+
+/*         Lento <-> Presto  RPC arguments       */
+struct lento_up_hdr {
+        unsigned int opcode;
+        unsigned int unique;    /* Keep multiple outstanding msgs distinct */
+        u_short pid;            /* Common to all */
+        u_short uid;
+};
+
+/* This structure _must_ sit at the beginning of the buffer */
+struct lento_down_hdr {
+        unsigned int opcode;
+        unsigned int unique;    
+        unsigned int result;
+};
+
+/* lento_permit: */
+struct lento_permit_in {
+        struct lento_up_hdr uh;
+        int pathlen;
+        int fsetnamelen;
+        char path[0];
+};
+struct lento_permit_out {
+        struct lento_down_hdr dh;
+};
+
+
+/* lento_opendir: */
+struct lento_opendir_in {
+        struct lento_up_hdr uh;
+        int async;
+        int pathlen;
+        char path[0];
+};
+struct lento_opendir_out {
+        struct lento_down_hdr dh;
+};
+
+
+/* lento_kml: */
+struct lento_kml_in {
+        struct lento_up_hdr uh;
+        unsigned int offset;
+        unsigned int first_recno;
+        unsigned int length;
+        unsigned int last_recno;
+        int namelen;
+        char fsetname[0];
+};
+
+struct lento_kml_out {
+        struct lento_down_hdr dh;
+};
+
+
+/* lento_open: */
+struct lento_open_in {
+        struct lento_up_hdr uh;
+        int pathlen;
+        char path[0];
+};
+struct lento_open_out {
+    struct lento_down_hdr dh;
+};
+
+/* lento_response_cookie */
+struct lento_response_cookie_in {
+        struct lento_up_hdr uh;
+        int cookie;
+};
+
+struct lento_response_cookie_out {
+    struct lento_down_hdr dh;
+};
+
+
+struct lento_mknod {
+  struct lento_down_hdr dh;
+  int    major;
+  int    minor;
+  int    mode;
+  char   path[0];
+};
+
+
+/* NB: every struct below begins with an up_hdr */
+union up_args {
+    struct lento_up_hdr uh;             
+    struct lento_permit_in lento_permit;
+    struct lento_open_in lento_open;
+    struct lento_opendir_in lento_opendir;
+    struct lento_kml_in lento_kml;
+    struct lento_response_cookie_in lento_response_cookie;
+};
+
+union down_args {
+    struct lento_down_hdr dh;
+    struct lento_permit_out lento_permit;
+    struct lento_open_out lento_open;
+    struct lento_opendir_out lento_opendir;
+    struct lento_kml_out lento_kml;
+    struct lento_response_cookie_out lento_response_cookie;
+};    
+
+#include "intermezzo_psdev.h"
+
+int lento_upcall(int minor, int read_size, int *rep_size, 
+                 union up_args *buffer, int async,
+                 struct upc_req *rq );
+#endif 
+
diff -Nru a/fs/intermezzo/journal.c b/fs/intermezzo/journal.c
--- a/fs/intermezzo/journal.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/journal.c	Sun Dec 15 18:08:28 2002
@@ -38,8 +38,9 @@
 #include <asm/uaccess.h>
 #include <linux/string.h>
 #include <linux/smp_lock.h>
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 struct presto_reservation_data {
         unsigned int ri_recno;
@@ -363,8 +364,10 @@
 
         presto_getversion(&version, dentry->d_inode);
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
@@ -376,8 +379,10 @@
 
         memcpy(&version, pv, sizeof(version));
         
-        version.pv_mtime = HTON__u64(version.pv_mtime);
-        version.pv_ctime = HTON__u64(version.pv_ctime);
+        version.pv_mtime_sec = HTON__u32(version.pv_mtime_sec);
+        version.pv_mtime_nsec = HTON__u32(version.pv_mtime_nsec);
+        version.pv_ctime_sec = HTON__u32(version.pv_ctime_sec);
+        version.pv_ctime_nsec = HTON__u32(version.pv_ctime_nsec);
         version.pv_size = HTON__u64(version.pv_size);
 
         return logit(buf, &version, sizeof(version));
diff -Nru a/fs/intermezzo/journal_ext2.c b/fs/intermezzo/journal_ext2.c
--- a/fs/intermezzo/journal_ext2.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/journal_ext2.c	Sun Dec 15 18:08:28 2002
@@ -33,8 +33,8 @@
 #include <linux/string.h>
 #include <linux/ext2_fs.h> 
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #if defined(CONFIG_EXT2_FS)
 
diff -Nru a/fs/intermezzo/journal_ext3.c b/fs/intermezzo/journal_ext3.c
--- a/fs/intermezzo/journal_ext3.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/journal_ext3.c	Sun Dec 15 18:08:29 2002
@@ -44,8 +44,8 @@
 #include <linux/ext3_jbd.h>
 #endif
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #if defined(CONFIG_EXT3_FS) || defined (CONFIG_EXT3_FS_MODULE)
 
diff -Nru a/fs/intermezzo/journal_obdfs.c b/fs/intermezzo/journal_obdfs.c
--- a/fs/intermezzo/journal_obdfs.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/journal_obdfs.c	Sun Dec 15 18:08:28 2002
@@ -40,8 +40,8 @@
 #include /usr/src/obd/include/linux/obdfs.h
 #endif
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #ifdef CONFIG_OBDFS_FS
 
diff -Nru a/fs/intermezzo/journal_reiserfs.c b/fs/intermezzo/journal_reiserfs.c
--- a/fs/intermezzo/journal_reiserfs.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/journal_reiserfs.c	Sun Dec 15 18:08:28 2002
@@ -43,8 +43,8 @@
 #include <linux/reiserfs_fs_i.h>
 #endif
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #if defined(CONFIG_REISERFS_FS) || defined(CONFIG_REISERFS_FS_MODULE)
 
diff -Nru a/fs/intermezzo/journal_tmpfs.c b/fs/intermezzo/journal_tmpfs.c
--- a/fs/intermezzo/journal_tmpfs.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/journal_tmpfs.c	Sun Dec 15 18:08:32 2002
@@ -46,8 +46,8 @@
 #endif
 #endif
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #if defined(CONFIG_TMPFS)
 
diff -Nru a/fs/intermezzo/journal_xfs.c b/fs/intermezzo/journal_xfs.c
--- a/fs/intermezzo/journal_xfs.c	Sun Dec 15 18:08:31 2002
+++ b/fs/intermezzo/journal_xfs.c	Sun Dec 15 18:08:31 2002
@@ -36,9 +36,9 @@
 #ifdef CONFIG_FS_XFS
 #include <linux/xfs_fs.h>
 #endif
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
-#include <linux/intermezzo_journal.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
+#include "intermezzo_journal.h"
 
 #if 0
 
diff -Nru a/fs/intermezzo/kml.c b/fs/intermezzo/kml.c
--- a/fs/intermezzo/kml.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/kml.c	Sun Dec 15 18:08:28 2002
@@ -5,10 +5,10 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_upcall.h>
-#include <linux/intermezzo_psdev.h>
-#include <linux/intermezzo_kml.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_upcall.h"
+#include "intermezzo_psdev.h"
+#include "intermezzo_kml.h"
 
 static struct presto_file_set * kml_getfset (char *path)
 {
diff -Nru a/fs/intermezzo/kml_decode.c b/fs/intermezzo/kml_decode.c
--- a/fs/intermezzo/kml_decode.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/kml_decode.c	Sun Dec 15 18:08:32 2002
@@ -13,8 +13,8 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/mm.h>
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_kml.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_kml.h"
 
 static int size_round (int val);
 static int unpack_create (struct kml_create *rec, char *buf,
diff -Nru a/fs/intermezzo/kml_reint.c b/fs/intermezzo/kml_reint.c
--- a/fs/intermezzo/kml_reint.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/kml_reint.c	Sun Dec 15 18:08:32 2002
@@ -34,8 +34,9 @@
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/mmu_context.h>
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 static void kmlreint_pre_secure(struct kml_rec *rec, struct file *dir,
                                 struct run_ctxt *saved)
@@ -100,7 +101,8 @@
                 return 0;
         }
 
-        if (inode->i_mtime == a->pv_mtime &&
+        if (inode->i_mtime.tv_sec == a->pv_mtime_sec &&
+            inode->i_mtime.tv_nsec == a->pv_mtime_nsec &&
             (S_ISDIR(inode->i_mode) || inode->i_size == a->pv_size))
                 return 1;
 
@@ -126,8 +128,10 @@
                 struct iattr iattr;
 
                 iattr.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_SIZE;
-                iattr.ia_mtime = (time_t)rec->new_objectv->pv_mtime;
-                iattr.ia_ctime = (time_t)rec->new_objectv->pv_ctime;
+                iattr.ia_mtime.tv_sec = (time_t)rec->new_objectv->pv_mtime_sec;
+                iattr.ia_mtime.tv_nsec = (time_t)rec->new_objectv->pv_mtime_nsec;
+                iattr.ia_ctime.tv_sec = (time_t)rec->new_objectv->pv_ctime_sec;
+                iattr.ia_ctime.tv_nsec = (time_t)rec->new_objectv->pv_ctime_nsec;
                 iattr.ia_size = (time_t)rec->new_objectv->pv_size;
 
                 /* no kml record, but update last rcvd */
@@ -144,7 +148,8 @@
         } else {
                 int minor = presto_f2m(fset);
 
-                info.updated_time = rec->new_objectv->pv_mtime;
+                info.updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+                info.updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
                 memcpy(&info.remote_version, rec->old_objectv, 
                        sizeof(*rec->old_objectv));
                 info.remote_ino = rec->ino;
@@ -180,7 +185,8 @@
         int     error;        ENTRY;
 
         CDEBUG (D_KML, "=====REINT_CREATE::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_create(rec->path, rec->mode, info);
         pop_ctxt(&saved_ctxt); 
@@ -198,7 +204,8 @@
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_LINK::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_link(rec->path, rec->target, info);
         pop_ctxt(&saved_ctxt); 
@@ -216,7 +223,8 @@
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_MKDIR::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_mkdir(rec->path, rec->mode, info);
         pop_ctxt(&saved_ctxt); 
@@ -234,7 +242,8 @@
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_MKNOD::%s\n", rec->path);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
 
         dev = rec->rdev ?: MKDEV(rec->major, rec->minor);
@@ -262,7 +271,8 @@
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_RENAME::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_rename(rec->path, rec->target, info);
         pop_ctxt(&saved_ctxt); 
@@ -287,7 +297,8 @@
         }
 
         CDEBUG (D_KML, "=====REINT_RMDIR::%s\n", path);
-        info->updated_time = rec->new_parentv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_parentv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_parentv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_rmdir(path, info);
         pop_ctxt(&saved_ctxt); 
@@ -311,8 +322,10 @@
         iattr.ia_uid   = (uid_t)rec->uid;
         iattr.ia_gid   = (gid_t)rec->gid;
         iattr.ia_size  = (off_t)rec->size;
-        iattr.ia_ctime = (time_t)rec->ctime;
-        iattr.ia_mtime = (time_t)rec->mtime;
+        iattr.ia_ctime.tv_sec = rec->ctime_sec;
+        iattr.ia_ctime.tv_nsec = rec->ctime_nsec;
+        iattr.ia_mtime.tv_sec = rec->mtime_sec;
+        iattr.ia_mtime.tv_nsec = rec->mtime_nsec;
         iattr.ia_atime = iattr.ia_mtime; /* We don't track atimes. */
         iattr.ia_attr_flags = rec->flags;
 
@@ -334,7 +347,8 @@
         ENTRY;
 
         CDEBUG (D_KML, "=====REINT_SYMLINK::%s -> %s\n", rec->path, rec->target);
-        info->updated_time = rec->new_objectv->pv_ctime;
+        info->updated_time.tv_sec = rec->new_objectv->pv_ctime_sec;
+        info->updated_time.tv_nsec = rec->new_objectv->pv_ctime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_symlink(rec->target, rec->path, info);
         pop_ctxt(&saved_ctxt); 
@@ -359,7 +373,8 @@
         }
 
         CDEBUG (D_KML, "=====REINT_UNLINK::%s\n", path);
-        info->updated_time = rec->new_parentv->pv_mtime;
+        info->updated_time.tv_sec = rec->new_parentv->pv_mtime_sec;
+        info->updated_time.tv_nsec = rec->new_parentv->pv_mtime_nsec;
         kmlreint_pre_secure(rec, dir, &saved_ctxt);
         error = lento_unlink(path, info);
         pop_ctxt(&saved_ctxt); 
diff -Nru a/fs/intermezzo/kml_setup.c b/fs/intermezzo/kml_setup.c
--- a/fs/intermezzo/kml_setup.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/kml_setup.c	Sun Dec 15 18:08:29 2002
@@ -5,10 +5,10 @@
 #include <linux/module.h>
 #include <asm/uaccess.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_upcall.h>
-#include <linux/intermezzo_psdev.h>
-#include <linux/intermezzo_kml.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_upcall.h"
+#include "intermezzo_psdev.h"
+#include "intermezzo_kml.h"
 
 int kml_init (struct presto_file_set *fset)
 {
diff -Nru a/fs/intermezzo/kml_unpack.c b/fs/intermezzo/kml_unpack.c
--- a/fs/intermezzo/kml_unpack.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/kml_unpack.c	Sun Dec 15 18:08:32 2002
@@ -56,9 +56,9 @@
 #  include <glib.h>
 #endif
 
-#include <linux/intermezzo_lib.h>
-#include <linux/intermezzo_idl.h>
-#include <linux/intermezzo_fs.h>
+#include "intermezzo_lib.h"
+#include "intermezzo_idl.h"
+#include "intermezzo_fs.h"
 
 int kml_unpack_version(struct presto_version **ver, char **buf, char *end) 
 {
@@ -67,8 +67,10 @@
 
 	UNLOGP(*ver, struct presto_version, ptr, end);
         pv = *ver;
-        pv->pv_mtime   = NTOH__u64(pv->pv_mtime);
-        pv->pv_ctime   = NTOH__u64(pv->pv_ctime);
+        pv->pv_mtime_sec   = NTOH__u32(pv->pv_mtime_sec);
+        pv->pv_mtime_nsec   = NTOH__u32(pv->pv_mtime_nsec);
+        pv->pv_ctime_sec   = NTOH__u32(pv->pv_ctime_sec);
+        pv->pv_ctime_nsec   = NTOH__u32(pv->pv_ctime_nsec);
         pv->pv_size    = NTOH__u64(pv->pv_size);
 
 	*buf = ptr;
@@ -247,8 +249,10 @@
 	LUNLOGV(rec->uid, __u32, ptr, end);
 	LUNLOGV(rec->gid, __u32, ptr, end);
 	LUNLOGV(rec->size, __u64, ptr, end);
-	LUNLOGV(rec->mtime, __u64, ptr, end);
-	LUNLOGV(rec->ctime, __u64, ptr, end);
+	LUNLOGV(rec->mtime_sec, __u32, ptr, end);
+	LUNLOGV(rec->mtime_nsec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_sec, __u32, ptr, end);
+	LUNLOGV(rec->ctime_nsec, __u32, ptr, end);
 	LUNLOGV(rec->flags, __u32, ptr, end);
         LUNLOGV(rec->old_mode, __u32, ptr, end);
         LUNLOGV(rec->old_rdev, __u32, ptr, end);
diff -Nru a/fs/intermezzo/kml_utils.c b/fs/intermezzo/kml_utils.c
--- a/fs/intermezzo/kml_utils.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/kml_utils.c	Sun Dec 15 18:08:29 2002
@@ -4,8 +4,8 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_kml.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_kml.h"
 
 
 // dlogit -- oppsite to logit ()
diff -Nru a/fs/intermezzo/methods.c b/fs/intermezzo/methods.c
--- a/fs/intermezzo/methods.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/methods.c	Sun Dec 15 18:08:32 2002
@@ -46,7 +46,7 @@
 #include <linux/module.h>
 
 #include <linux/fsfilter.h>
-#include <linux/intermezzo_fs.h>
+#include "intermezzo_fs.h"
 
 
 int filter_print_entry = 0;
diff -Nru a/fs/intermezzo/presto.c b/fs/intermezzo/presto.c
--- a/fs/intermezzo/presto.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/presto.c	Sun Dec 15 18:08:29 2002
@@ -37,8 +37,8 @@
 #include <linux/string.h>
 #include <linux/smp_lock.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 int presto_walk(const char *name, struct nameidata *nd)
 {
@@ -627,8 +627,10 @@
 void presto_getversion(struct presto_version * presto_version,
                        struct inode * inode)
 {
-        presto_version->pv_mtime = (__u64)inode->i_mtime;
-        presto_version->pv_ctime = (__u64)inode->i_ctime;
+        presto_version->pv_mtime_sec = inode->i_mtime.tv_sec;
+        presto_version->pv_mtime_nsec = inode->i_mtime.tv_nsec;
+        presto_version->pv_ctime_sec = inode->i_ctime.tv_sec;
+        presto_version->pv_ctime_nsec = inode->i_ctime.tv_nsec;
         presto_version->pv_size  = (__u64)inode->i_size;
 }
 
diff -Nru a/fs/intermezzo/psdev.c b/fs/intermezzo/psdev.c
--- a/fs/intermezzo/psdev.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/psdev.c	Sun Dec 15 18:08:29 2002
@@ -51,8 +51,8 @@
 #include <asm/uaccess.h>
 #include <linux/miscdevice.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 
 #ifdef PRESTO_DEVEL
diff -Nru a/fs/intermezzo/replicator.c b/fs/intermezzo/replicator.c
--- a/fs/intermezzo/replicator.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/replicator.c	Sun Dec 15 18:08:29 2002
@@ -29,8 +29,10 @@
 #include <asm/uaccess.h>
 
 #include <linux/errno.h>
+#include <linux/fs.h>
+#include <linux/fsfilter.h>
 
-#include <linux/intermezzo_fs.h>
+#include "intermezzo_fs.h"
 
 /*
  * this file contains a hash table of replicators/clients for a
diff -Nru a/fs/intermezzo/super.c b/fs/intermezzo/super.c
--- a/fs/intermezzo/super.c	Sun Dec 15 18:08:32 2002
+++ b/fs/intermezzo/super.c	Sun Dec 15 18:08:32 2002
@@ -47,8 +47,8 @@
 #define __NO_VERSION__
 #include <linux/module.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #ifdef PRESTO_DEBUG
 long presto_vmemory = 0;
diff -Nru a/fs/intermezzo/sysctl.c b/fs/intermezzo/sysctl.c
--- a/fs/intermezzo/sysctl.c	Sun Dec 15 18:08:28 2002
+++ b/fs/intermezzo/sysctl.c	Sun Dec 15 18:08:28 2002
@@ -39,9 +39,8 @@
 #include <linux/utsname.h>
 #include <linux/blk.h>
 
-
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 /* /proc entries */
 
diff -Nru a/fs/intermezzo/upcall.c b/fs/intermezzo/upcall.c
--- a/fs/intermezzo/upcall.c	Sun Dec 15 18:08:33 2002
+++ b/fs/intermezzo/upcall.c	Sun Dec 15 18:08:33 2002
@@ -45,11 +45,11 @@
 #include <linux/vmalloc.h>
 #include <asm/segment.h>
 
-#include <linux/intermezzo_lib.h>
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_lib.h"
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
-#include <linux/intermezzo_idl.h>
+#include "intermezzo_idl.h"
 
 /*
   At present:
diff -Nru a/fs/intermezzo/vfs.c b/fs/intermezzo/vfs.c
--- a/fs/intermezzo/vfs.c	Sun Dec 15 18:08:29 2002
+++ b/fs/intermezzo/vfs.c	Sun Dec 15 18:08:29 2002
@@ -68,8 +68,8 @@
 #include <linux/namei.h>
 #include <linux/blk.h>
 
-#include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_psdev.h>
+#include "intermezzo_fs.h"
+#include "intermezzo_psdev.h"
 
 #ifdef CONFIG_FS_EXT_ATTR
 # include <linux/ext_attr.h>
@@ -186,7 +186,7 @@
 
         if (errorval && errorval == (long)value && !is_read_only(dev)) {
                 CDEBUG(D_SUPER, "setting device %s read only\n", kdevname(dev));
-                BLKDEV_FAIL(dev, 1);
+                BLKDEV_FAIL(kdev_val(dev), 1);
                 izo_channels[minor].uc_errorval = -kdev_val(dev);
         }
 }
@@ -475,7 +475,7 @@
                name, iattr->ia_valid, iattr->ia_mode, iattr->ia_uid,
                iattr->ia_gid, iattr->ia_size);
         CDEBUG(D_PIOCTL, "atime %#lx, mtime %#lx, ctime %#lx, attr_flags %#x\n",
-               iattr->ia_atime, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
+               iattr->ia_atime.tv_sec, iattr->ia_mtime.tv_sec, iattr->ia_ctime.tv_sec,
                iattr->ia_attr_flags);
         CDEBUG(D_PIOCTL, "offset %d, recno %d, flags %#x\n",
                info->slot_offset, info->recno, info->flags);
diff -Nru a/fs/isofs/Makefile b/fs/isofs/Makefile
--- a/fs/isofs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/isofs/Makefile	Sun Dec 15 18:08:33 2002
@@ -8,5 +8,3 @@
 isofs-objs-$(CONFIG_JOLIET)	+= joliet.o
 isofs-objs-$(CONFIG_ZISOFS)	+= compress.o
 isofs-objs			:= $(isofs-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/jbd/Makefile b/fs/jbd/Makefile
--- a/fs/jbd/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/jbd/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,6 +7,3 @@
 obj-$(CONFIG_JBD) += jbd.o
 
 jbd-objs := transaction.o commit.o recovery.o checkpoint.o revoke.o journal.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/jffs/Makefile b/fs/jffs/Makefile
--- a/fs/jffs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/jffs/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,6 +9,3 @@
 jffs-y 				:= jffs_fm.o intrep.o inode-v23.o
 jffs-$(CONFIG_JFFS_PROC_FS)	+= jffs_proc.o
 jffs-objs			:= $(jffs-y)
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/jffs2/Makefile b/fs/jffs2/Makefile
--- a/fs/jffs2/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/jffs2/Makefile	Sun Dec 15 18:08:28 2002
@@ -18,6 +18,3 @@
 
 jffs2-objs := $(COMPR_OBJS) $(JFFS2_OBJS) $(VERS_OBJS) $(NAND_OBJS-y) \
 	      $(LINUX_OBJS-$(VERSION)$(PATCHLEVEL))
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/jfs/Makefile b/fs/jfs/Makefile
--- a/fs/jfs/Makefile	Sun Dec 15 18:08:32 2002
+++ b/fs/jfs/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 endif
 
 EXTRA_CFLAGS += -D_JFS_4K
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/jfs/file.c b/fs/jfs/file.c
--- a/fs/jfs/file.c	Sun Dec 15 18:08:28 2002
+++ b/fs/jfs/file.c	Sun Dec 15 18:08:28 2002
@@ -27,6 +27,7 @@
 
 
 extern int jfs_commit_inode(struct inode *, int);
+extern void jfs_truncate(struct inode *);
 
 int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
 {
@@ -41,59 +42,6 @@
 	rc |= jfs_commit_inode(inode, 1);
 
 	return rc ? -EIO : 0;
-}
-
-/*
- * Guts of jfs_truncate.  Called with locks already held.  Can be called
- * with directory for truncating directory index table.
- */
-void jfs_truncate_nolock(struct inode *ip, loff_t length)
-{
-	loff_t newsize;
-	tid_t tid;
-
-	ASSERT(length >= 0);
-
-	if (test_cflag(COMMIT_Nolink, ip)) {
-		xtTruncate(0, ip, length, COMMIT_WMAP);
-		return;
-	}
-
-	do {
-		tid = txBegin(ip->i_sb, 0);
-
-		/*
-		 * The commit_sem cannot be taken before txBegin.
-		 * txBegin may block and there is a chance the inode
-		 * could be marked dirty and need to be committed
-		 * before txBegin unblocks
-		 */
-		down(&JFS_IP(ip)->commit_sem);
-
-		newsize = xtTruncate(tid, ip, length,
-				     COMMIT_TRUNCATE | COMMIT_PWMAP);
-		if (newsize < 0) {
-			txEnd(tid);
-			up(&JFS_IP(ip)->commit_sem);
-			break;
-		}
-
-		ip->i_mtime = ip->i_ctime = CURRENT_TIME;
-		mark_inode_dirty(ip);
-
-		txCommit(tid, 1, &ip, 0);
-		txEnd(tid);
-		up(&JFS_IP(ip)->commit_sem);
-	} while (newsize > length);	/* Truncate isn't always atomic */
-}
-
-static void jfs_truncate(struct inode *ip)
-{
-	jFYI(1, ("jfs_truncate: size = 0x%lx\n", (ulong) ip->i_size));
-
-	IWRITE_LOCK(ip);
-	jfs_truncate_nolock(ip, ip->i_size);
-	IWRITE_UNLOCK(ip);
 }
 
 static int jfs_open(struct inode *inode, struct file *file)
diff -Nru a/fs/jfs/inode.c b/fs/jfs/inode.c
--- a/fs/jfs/inode.c	Sun Dec 15 18:08:28 2002
+++ b/fs/jfs/inode.c	Sun Dec 15 18:08:28 2002
@@ -59,7 +59,7 @@
 		inode->i_mapping->a_ops = &jfs_aops;
 		inode->i_mapping->gfp_mask = GFP_NOFS;
 	} else if (S_ISLNK(inode->i_mode)) {
-		if (inode->i_size > IDATASIZE) {
+		if (inode->i_size >= IDATASIZE) {
 			inode->i_op = &page_symlink_inode_operations;
 			inode->i_mapping->a_ops = &jfs_aops;
 		} else
@@ -277,9 +277,9 @@
 	return jfs_get_blocks(ip, lblock, 1, bh_result, create);
 }
 
-static int jfs_writepage(struct page *page)
+static int jfs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, jfs_get_block);
+	return block_write_full_page(page, jfs_get_block, wbc);
 }
 
 static int jfs_writepages(struct address_space *mapping,
@@ -330,3 +330,58 @@
 	.bmap		= jfs_bmap,
 	.direct_IO	= jfs_direct_IO,
 };
+
+/*
+ * Guts of jfs_truncate.  Called with locks already held.  Can be called
+ * with directory for truncating directory index table.
+ */
+void jfs_truncate_nolock(struct inode *ip, loff_t length)
+{
+	loff_t newsize;
+	tid_t tid;
+
+	ASSERT(length >= 0);
+
+	if (test_cflag(COMMIT_Nolink, ip)) {
+		xtTruncate(0, ip, length, COMMIT_WMAP);
+		return;
+	}
+
+	do {
+		tid = txBegin(ip->i_sb, 0);
+
+		/*
+		 * The commit_sem cannot be taken before txBegin.
+		 * txBegin may block and there is a chance the inode
+		 * could be marked dirty and need to be committed
+		 * before txBegin unblocks
+		 */
+		down(&JFS_IP(ip)->commit_sem);
+
+		newsize = xtTruncate(tid, ip, length,
+				     COMMIT_TRUNCATE | COMMIT_PWMAP);
+		if (newsize < 0) {
+			txEnd(tid);
+			up(&JFS_IP(ip)->commit_sem);
+			break;
+		}
+
+		ip->i_mtime = ip->i_ctime = CURRENT_TIME;
+		mark_inode_dirty(ip);
+
+		txCommit(tid, 1, &ip, 0);
+		txEnd(tid);
+		up(&JFS_IP(ip)->commit_sem);
+	} while (newsize > length);	/* Truncate isn't always atomic */
+}
+
+void jfs_truncate(struct inode *ip)
+{
+	jFYI(1, ("jfs_truncate: size = 0x%lx\n", (ulong) ip->i_size));
+
+	block_truncate_page(ip->i_mapping, ip->i_size, jfs_get_block);
+
+	IWRITE_LOCK(ip);
+	jfs_truncate_nolock(ip, ip->i_size);
+	IWRITE_UNLOCK(ip);
+}
diff -Nru a/fs/jfs/jfs_debug.c b/fs/jfs/jfs_debug.c
--- a/fs/jfs/jfs_debug.c	Sun Dec 15 18:08:31 2002
+++ b/fs/jfs/jfs_debug.c	Sun Dec 15 18:08:31 2002
@@ -100,6 +100,7 @@
 
 #ifdef CONFIG_JFS_STATISTICS
 extern read_proc_t jfs_lmstats_read;
+extern read_proc_t jfs_txstats_read;
 extern read_proc_t jfs_xtstat_read;
 extern read_proc_t jfs_mpstat_read;
 #endif
@@ -111,6 +112,7 @@
 } Entries[] = {
 #ifdef CONFIG_JFS_STATISTICS
 	{ "lmstats",	jfs_lmstats_read, },
+	{ "txstats",	jfs_txstats_read, },
 	{ "xtstat",	jfs_xtstat_read, },
 	{ "mpstat",	jfs_mpstat_read, },
 #endif
diff -Nru a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c
--- a/fs/jfs/jfs_dtree.c	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/jfs_dtree.c	Sun Dec 15 18:08:30 2002
@@ -200,6 +200,28 @@
 #define ciToUpper(c)	UniStrupr((c)->name)
 
 /*
+ *	read_index_page()
+ *
+ *	Reads a page of a directory's index table.
+ *	Having metadata mapped into the directory inode's address space
+ *	presents a multitude of problems.  We avoid this by mapping to
+ *	the absolute address space outside of the *_metapage routines
+ */
+static struct metapage *read_index_page(struct inode *inode, s64 blkno)
+{
+	int rc;
+	s64 xaddr;
+	int xflag;
+	s32 xlen;
+
+	rc = xtLookup(inode, blkno, 1, &xflag, &xaddr, &xlen, 1);
+	if (rc || (xlen == 0))
+		return NULL;
+
+	return read_metapage(inode, xaddr, PSIZE, 1);
+}
+
+/*
  *	find_index()
  *
  *	Returns dtree page containing directory table entry for specified
@@ -208,7 +230,7 @@
  *	mp must be released by caller.
  */
 static struct dir_table_slot *find_index(struct inode *ip, u32 index,
-					 struct metapage ** mp)
+					 struct metapage ** mp, s64 *lblock)
 {
 	struct jfs_inode_info *jfs_ip = JFS_IP(ip);
 	s64 blkno;
@@ -243,12 +265,14 @@
 		blkno = ((offset + 1) >> L2PSIZE) <<
 		    JFS_SBI(ip->i_sb)->l2nbperpage;
 
-		if (*mp && ((*mp)->index != blkno)) {
+		if (*mp && (*lblock != blkno)) {
 			release_metapage(*mp);
 			*mp = 0;
 		}
-		if (*mp == 0)
-			*mp = read_metapage(ip, blkno, PSIZE, 0);
+		if (*mp == 0) {
+			*lblock = blkno;
+			*mp = read_index_page(ip, blkno);
+		}
 		if (*mp == 0) {
 			jERROR(1,
 			       ("free_index: error reading directory table\n"));
@@ -368,7 +392,7 @@
 		ip->i_size = PSIZE;
 		ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage);
 
-		if ((mp = get_metapage(ip, 0, ip->i_blksize, 0)) == 0) {
+		if ((mp = read_index_page(ip, 0)) == 0) {
 			jERROR(1, ("add_index: get_metapage failed!\n"));
 			xtTruncate(tid, ip, 0, COMMIT_PWMAP);
 			return -1;
@@ -411,12 +435,12 @@
 		ip->i_size += PSIZE;
 		ip->i_blocks += LBLK2PBLK(sb, sbi->nbperpage);
 
-		if ((mp = get_metapage(ip, blkno, PSIZE, 0)))
+		if ((mp = read_index_page(ip, blkno)))
 			memset(mp->data, 0, PSIZE);	/* Just looks better */
 		else
 			xtTruncate(tid, ip, offset, COMMIT_PWMAP);
 	} else
-		mp = read_metapage(ip, blkno, PSIZE, 0);
+		mp = read_index_page(ip, blkno);
 
 	if (mp == 0) {
 		jERROR(1, ("add_index: get/read_metapage failed!\n"));
@@ -445,9 +469,10 @@
 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next)
 {
 	struct dir_table_slot *dirtab_slot;
+	s64 lblock;
 	struct metapage *mp = 0;
 
-	dirtab_slot = find_index(ip, index, &mp);
+	dirtab_slot = find_index(ip, index, &mp, &lblock);
 
 	if (dirtab_slot == 0)
 		return;
@@ -470,11 +495,11 @@
  *	Changes an entry in the directory index table
  */
 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn,
-			 int slot, struct metapage ** mp)
+			 int slot, struct metapage ** mp, u64 *lblock)
 {
 	struct dir_table_slot *dirtab_slot;
 
-	dirtab_slot = find_index(ip, index, mp);
+	dirtab_slot = find_index(ip, index, mp, lblock);
 
 	if (dirtab_slot == 0)
 		return;
@@ -497,10 +522,11 @@
 static int read_index(struct inode *ip, u32 index,
 		     struct dir_table_slot * dirtab_slot)
 {
+	s64 lblock;
 	struct metapage *mp = 0;
 	struct dir_table_slot *slot;
 
-	slot = find_index(ip, index, &mp);
+	slot = find_index(ip, index, &mp, &lblock);
 	if (slot == 0) {
 		return -EIO;
 	}
@@ -1491,12 +1517,14 @@
 	 * Update directory index table for entries now in right page
 	 */
 	if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) {
+		s64 lblock;
+
 		mp = 0;
 		stbl = DT_GETSTBL(rp);
 		for (n = 0; n < rp->header.nextindex; n++) {
 			ldtentry = (struct ldtentry *) & rp->slot[stbl[n]];
 			modify_index(tid, ip, le32_to_cpu(ldtentry->index),
-				     rbn, n, &mp);
+				     rbn, n, &mp, &lblock);
 		}
 		if (mp)
 			release_metapage(mp);
@@ -1616,6 +1644,8 @@
 		 * Update directory index table to reflect new page address
 		 */
 		if (DO_INDEX(ip)) {
+			s64 lblock;
+
 			mp = 0;
 			stbl = DT_GETSTBL(sp);
 			for (n = 0; n < sp->header.nextindex; n++) {
@@ -1623,7 +1653,7 @@
 				    (struct ldtentry *) & sp->slot[stbl[n]];
 				modify_index(tid, ip,
 					     le32_to_cpu(ldtentry->index),
-					     xaddr, n, &mp);
+					     xaddr, n, &mp, &lblock);
 			}
 			if (mp)
 				release_metapage(mp);
@@ -1911,6 +1941,7 @@
 	 * Update directory index table for entries now in right page
 	 */
 	if ((rp->header.flag & BT_LEAF) && DO_INDEX(ip)) {
+		s64 lblock;
 		struct metapage *mp = 0;
 		struct ldtentry *ldtentry;
 
@@ -1918,7 +1949,7 @@
 		for (n = 0; n < rp->header.nextindex; n++) {
 			ldtentry = (struct ldtentry *) & rp->slot[stbl[n]];
 			modify_index(tid, ip, le32_to_cpu(ldtentry->index),
-				     rbn, n, &mp);
+				     rbn, n, &mp, &lblock);
 		}
 		if (mp)
 			release_metapage(mp);
@@ -2120,6 +2151,8 @@
 		 * Update directory index table for entries moved in stbl
 		 */
 		if (DO_INDEX(ip) && index < p->header.nextindex) {
+			s64 lblock;
+
 			imp = 0;
 			stbl = DT_GETSTBL(p);
 			for (i = index; i < p->header.nextindex; i++) {
@@ -2127,7 +2160,7 @@
 				    (struct ldtentry *) & p->slot[stbl[i]];
 				modify_index(tid, ip,
 					     le32_to_cpu(ldtentry->index),
-					     bn, i, &imp);
+					     bn, i, &imp, &lblock);
 			}
 			if (imp)
 				release_metapage(imp);
@@ -2769,12 +2802,6 @@
 			set_cflag(COMMIT_Stale, ip);
 
 			tblk->xflag = xflag_save;
-			/*
-			 * Tells jfs_metapage code that the metadata pages
-			 * for the index table are no longer useful, and
-			 * remove them from page cache.
-			 */
-			invalidate_inode_metapages(ip);
 		} else
 			ip->i_size = 1;
 
@@ -3919,6 +3946,8 @@
 		memmove(stbl + index + 1, stbl + index, nextindex - index);
 
 		if ((p->header.flag & BT_LEAF) && data->leaf.ip) {
+			s64 lblock;
+
 			/*
 			 * Need to update slot number for entries that moved
 			 * in the stbl
@@ -3928,7 +3957,7 @@
 				lh = (struct ldtentry *) & (p->slot[stbl[n]]);
 				modify_index(data->leaf.tid, data->leaf.ip,
 					     le32_to_cpu(lh->index), bn, n,
-					     &mp);
+					     &mp, &lblock);
 			}
 			if (mp)
 				release_metapage(mp);
diff -Nru a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
--- a/fs/jfs/jfs_imap.c	Sun Dec 15 18:08:28 2002
+++ b/fs/jfs/jfs_imap.c	Sun Dec 15 18:08:28 2002
@@ -1170,7 +1170,7 @@
 	 * invalidate any page of the inode extent freed from buffer cache;
 	 */
 	freepxd = iagp->inoext[extno];
-	invalidate_pxd_metapages(ip->i_sb->s_bdev->bd_inode, freepxd);
+	invalidate_pxd_metapages(ip, freepxd);
 
 	/*
 	 *      update iag list(s) (careful update step 2)
diff -Nru a/fs/jfs/jfs_incore.h b/fs/jfs/jfs_incore.h
--- a/fs/jfs/jfs_incore.h	Sun Dec 15 18:08:28 2002
+++ b/fs/jfs/jfs_incore.h	Sun Dec 15 18:08:28 2002
@@ -54,7 +54,6 @@
 	lid_t	atlhead;	/* anonymous tlock list head	*/
 	lid_t	atltail;	/* anonymous tlock list tail	*/
 	struct list_head anon_inode_list; /* inodes having anonymous txns */
-	struct list_head mp_list; /* metapages in inode's address space */
 	/*
 	 * rdwrlock serializes xtree between reads & writes and synchronizes
 	 * changes to special inodes.  It's use would be redundant on
@@ -117,7 +116,6 @@
 	COMMIT_Inlineea,	/* commit inode inline EA */
 	COMMIT_Freewmap,	/* free WMAP at iClose() */
 	COMMIT_Dirty,		/* Inode is really dirty */
-	COMMIT_Holdlock,	/* Hold the IWRITE_LOCK until commit is done */
 	COMMIT_Dirtable,	/* commit changes to di_dirtable */
 	COMMIT_Stale,		/* data extent is no longer valid */
 	COMMIT_Synclist,	/* metadata pages on group commit synclist */
diff -Nru a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
--- a/fs/jfs/jfs_logmgr.c	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/jfs_logmgr.c	Sun Dec 15 18:08:29 2002
@@ -197,6 +197,8 @@
 	uint commit;		/* # of commit */
 	uint pagedone;		/* # of page written */
 	uint submitted;		/* # of pages submitted */
+	uint full_page;		/* # of full pages submitted */
+	uint partial_page;	/* # of partial pages submitted */
 } lmStat;
 #endif
 
@@ -597,21 +599,21 @@
 		/* mark tblk for end-of-page */
 		tblk->flag |= tblkGC_EOP;
 
-		/* if page is not already on write queue,
-		 * just enqueue (no lbmWRITE to prevent redrive)
-		 * buffer to wqueue to ensure correct serial order
-		 * of the pages since log pages will be added
-		 * continuously (tblk bound with the page hasn't
-		 * got around to init write of the page, either
-		 * preempted or the page got filled by its COMMIT
-		 * record);
-		 * pages with COMMIT are paged out explicitly by
-		 * tblk in lmGroupCommit();
-		 */
-		if (bp->l_wqnext == NULL) {
-			/* bp->l_ceor = bp->l_eor; */
-			/* lp->h.eor = lp->t.eor = bp->l_ceor; */
-			lbmWrite(log, bp, 0, 0);
+		if (log->cflag & logGC_PAGEOUT) {
+			/* if page is not already on write queue,
+			 * just enqueue (no lbmWRITE to prevent redrive)
+			 * buffer to wqueue to ensure correct serial order
+			 * of the pages since log pages will be added
+			 * continuously
+			 */
+			if (bp->l_wqnext == NULL)
+				lbmWrite(log, bp, 0, 0);
+		} else {
+			/*
+			 * No current GC leader, initiate group commit
+			 */
+			log->cflag |= logGC_PAGEOUT;
+			lmGCwrite(log, 0);
 		}
 	}
 	/* page is not bound with outstanding tblk:
@@ -678,10 +680,17 @@
 		LOGGC_UNLOCK(log);
 		return rc;
 	}
-	jFYI(1,
-	     ("lmGroup Commit: tblk = 0x%p, gcrtc = %d\n", tblk,
-	      log->gcrtc));
+	jFYI(1, ("lmGroup Commit: tblk = 0x%p, gcrtc = %d\n", tblk,
+		 log->gcrtc));
 
+	if (tblk->xflag & COMMIT_LAZY) {
+		/*
+		 * Lazy transactions can leave now
+		 */
+		tblk->flag |= tblkGC_LAZY;
+		LOGGC_UNLOCK(log);
+		return 0;
+	}
 	/*
 	 * group commit pageout in progress
 	 */
@@ -709,12 +718,6 @@
 	/* upcount transaction waiting for completion
 	 */
 	log->gcrtc++;
-
-	if (tblk->xflag & COMMIT_LAZY) {
-		tblk->flag |= tblkGC_LAZY;
-		LOGGC_UNLOCK(log);
-		return 0;
-	}
 	tblk->flag |= tblkGC_READY;
 
 	__SLEEP_COND(tblk->gcwait, (tblk->flag & tblkGC_COMMITTED),
@@ -785,6 +788,7 @@
 			bp->l_ceor));
 		lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmGC,
 			 cant_write);
+		INCREMENT(lmStat.full_page);
 	}
 	/* page is not yet full */
 	else {
@@ -794,6 +798,7 @@
 		       ("gc: tclsn:0x%x, bceor:0x%x\n", tblk->clsn,
 			bp->l_ceor));
 		lbmWrite(log, bp, lbmWRITE | lbmGC, cant_write);
+		INCREMENT(lmStat.partial_page);
 	}
 }
 
@@ -881,11 +886,15 @@
 
 	/* are there any transactions who have entered lnGroupCommit()
 	 * (whose COMMITs are after that of the last log page written.
-	 * They are waiting for new group commit (above at (SLEEP 1)):
+	 * They are waiting for new group commit (above at (SLEEP 1))
+	 * or lazy transactions are on a full (queued) log page,
 	 * select the latest ready transaction as new group leader and
 	 * wake her up to lead her group.
 	 */
-	if ((log->gcrtc > 0) && log->cqueue.head)
+	if ((tblk = log->cqueue.head) &&
+	    ((log->gcrtc > 0) || (tblk->bp->l_wqnext != NULL) ||
+	     test_bit(log_SYNCBARRIER, &log->flag) ||
+	     test_bit(log_QUIESCE, &log->flag)))
 		/*
 		 * Call lmGCwrite with new group leader
 		 */
@@ -1042,6 +1051,16 @@
 			 log->syncpt));
 	}
 
+	/*
+	 * We may have to initiate group commit
+	 */
+	LOGGC_LOCK(log);
+	if (log->cqueue.head && !(log->cflag & logGC_PAGEOUT)) {
+		log->cflag |= logGC_PAGEOUT;
+		lmGCwrite(log, 0);
+	}
+	LOGGC_UNLOCK(log);
+
 	return lsn;
 }
 
@@ -1407,6 +1426,22 @@
 
 	jFYI(1, ("lmLogWait: log:0x%p\n", log));
 
+	/*
+	 * This ensures that we will keep writing to the journal as long
+	 * as there are unwritten commit records
+	 */
+	set_bit(log_QUIESCE, &log->flag);
+
+	/*
+	 * Initiate I/O on outstanding transactions
+	 */
+	LOGGC_LOCK(log);
+	if (log->cqueue.head && !(log->cflag & logGC_PAGEOUT)) {
+		log->cflag |= logGC_PAGEOUT;
+		lmGCwrite(log, 0);
+	}
+	LOGGC_UNLOCK(log);
+
 	if (log->cqueue.head || !list_empty(&log->synclist)) {
 		/*
 		 * If there was very recent activity, we may need to wait
@@ -1423,6 +1458,8 @@
 	}
 	assert(log->cqueue.head == NULL);
 	assert(list_empty(&log->synclist));
+
+	clear_bit(log_QUIESCE, &log->flag);	/* Probably not needed */
 }
 
 /*
@@ -2312,10 +2349,14 @@
 		       "================\n"
 		       "commits = %d\n"
 		       "writes submitted = %d\n"
-		       "writes completed = %d\n",
+		       "writes completed = %d\n"
+		       "full pages submitted = %d\n"
+		       "partial pages submitted = %d\n",
 		       lmStat.commit,
 		       lmStat.submitted,
-		       lmStat.pagedone);
+		       lmStat.pagedone,
+		       lmStat.full_page,
+		       lmStat.partial_page);
 
 	begin = offset;
 	*start = buffer + begin;
diff -Nru a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
--- a/fs/jfs/jfs_metapage.c	Sun Dec 15 18:08:28 2002
+++ b/fs/jfs/jfs_metapage.c	Sun Dec 15 18:08:28 2002
@@ -317,8 +317,6 @@
 		mp->page = 0;
 		mp->logical_size = size;
 		add_to_hash(mp, hash_ptr);
-		if (!absolute)
-			list_add(&mp->inode_list, &JFS_IP(inode)->mp_list);
 		spin_unlock(&meta_lock);
 
 		if (new) {
@@ -351,8 +349,6 @@
 freeit:
 	spin_lock(&meta_lock);
 	remove_from_hash(mp, hash_ptr);
-	if (!absolute)
-		list_del(&mp->inode_list);
 	free_metapage(mp);
 	spin_unlock(&meta_lock);
 	return NULL;
@@ -457,8 +453,6 @@
 		spin_unlock(&meta_lock);
 	} else {
 		remove_from_hash(mp, meta_hash(mp->mapping, mp->index));
-		if (!test_bit(META_absolute, &mp->flag))
-			list_del(&mp->inode_list);
 		spin_unlock(&meta_lock);
 
 		if (mp->page) {
@@ -505,7 +499,8 @@
 	struct metapage **hash_ptr;
 	unsigned long lblock;
 	int l2BlocksPerPage = PAGE_CACHE_SHIFT - ip->i_blkbits;
-	struct address_space *mapping = ip->i_mapping;
+	/* All callers are interested in block device's mapping */
+	struct address_space *mapping = ip->i_sb->s_bdev->bd_inode->i_mapping;
 	struct metapage *mp;
 	struct page *page;
 
@@ -533,26 +528,6 @@
 			}
 		}
 	}
-}
-
-void invalidate_inode_metapages(struct inode *inode)
-{
-	struct list_head *ptr;
-	struct metapage *mp;
-
-	spin_lock(&meta_lock);
-	list_for_each(ptr, &JFS_IP(inode)->mp_list) {
-		mp = list_entry(ptr, struct metapage, inode_list);
-		clear_bit(META_dirty, &mp->flag);
-		set_bit(META_discard, &mp->flag);
-		kunmap(mp->page);
-		page_cache_release(mp->page);
-		INCREMENT(mpStat.pagefree);
-		mp->data = 0;
-		mp->page = 0;
-	}
-	spin_unlock(&meta_lock);
-	truncate_inode_pages(inode->i_mapping, 0);
 }
 
 #ifdef CONFIG_JFS_STATISTICS
diff -Nru a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h
--- a/fs/jfs/jfs_metapage.h	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/jfs_metapage.h	Sun Dec 15 18:08:29 2002
@@ -38,7 +38,6 @@
 	struct metapage *hash_prev;
 	struct metapage *hash_next;	/* Also used for free list */
 
-	struct list_head inode_list;	/* per-inode metapage list */
 	/*
 	 * mapping & index become redundant, but we need these here to
 	 * add the metapage to the hash before we have the real page
@@ -109,9 +108,7 @@
 	__invalidate_metapages((ip), addressPXD(&(pxd)), lengthPXD(&(pxd)))
 #define invalidate_dxd_metapages(ip, dxd) \
 	__invalidate_metapages((ip), addressDXD(&(dxd)), lengthDXD(&(dxd)))
+#define invalidate_xad_metapages(ip, xad) \
+	__invalidate_metapages((ip), addressXAD(&(xad)), lengthXAD(&(xad)))
 
-/*
- * This one uses mp_list to invalidate all pages for an inode
- */
-extern void invalidate_inode_metapages(struct inode *inode);
 #endif				/* _H_JFS_METAPAGE */
diff -Nru a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
--- a/fs/jfs/jfs_txnmgr.c	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/jfs_txnmgr.c	Sun Dec 15 18:08:29 2002
@@ -70,6 +70,7 @@
 	wait_queue_head_t freelockwait;	/* eventlist of free tlock */
 	wait_queue_head_t lowlockwait;	/* eventlist of ample tlocks */
 	int tlocksInUse;	/* Number of tlocks in use */
+	int TlocksLow;		/* Indicates low number of available tlocks */
 	spinlock_t LazyLock;	/* synchronize sync_queue & unlock_queue */
 /*	struct tblock *sync_queue; * Transactions waiting for data sync */
 	struct tblock *unlock_queue;	/* Txns waiting to be released */
@@ -79,6 +80,20 @@
 					   that couldn't be sync'ed */
 } TxAnchor;
 
+#ifdef CONFIG_JFS_STATISTICS
+struct {
+	uint txBegin;
+	uint txBegin_barrier;
+	uint txBegin_lockslow;
+	uint txBegin_freetid;
+	uint txBeginAnon;
+	uint txBeginAnon_barrier;
+	uint txBeginAnon_lockslow;
+	uint txLockAlloc;
+	uint txLockAlloc_freelock;
+} TxStat;
+#endif
+
 static int nTxBlock = 512;	/* number of transaction blocks */
 struct tblock *TxBlock;	        /* transaction block table */
 
@@ -86,7 +101,6 @@
 static int TxLockLWM = 4096*.4;	/* Low water mark for number of txLocks used */
 static int TxLockHWM = 4096*.8;	/* High water mark for number of txLocks used */
 struct tlock *TxLock;           /* transaction lock table */
-static int TlocksLow = 0;	/* Indicates low number of available tlocks */
 
 
 /*
@@ -143,7 +157,8 @@
 /*
  * external references
  */
-extern int lmGroupCommit(struct jfs_log * log, struct tblock * tblk);
+extern int lmGroupCommit(struct jfs_log *, struct tblock *);
+extern int lmGCwrite(struct jfs_log *, int);
 extern void lmSync(struct jfs_log *);
 extern int jfs_commit_inode(struct inode *, int);
 extern int jfs_stop_threads;
@@ -190,13 +205,18 @@
 {
 	lid_t lid;
 
+	INCREMENT(TxStat.txLockAlloc);
+	if (!TxAnchor.freelock) {
+		INCREMENT(TxStat.txLockAlloc_freelock);
+	}
+
 	while (!(lid = TxAnchor.freelock))
 		TXN_SLEEP(&TxAnchor.freelockwait);
 	TxAnchor.freelock = TxLock[lid].next;
 	HIGHWATERMARK(stattx.maxlid, lid);
-	if ((++TxAnchor.tlocksInUse > TxLockHWM) && (TlocksLow == 0)) {
+	if ((++TxAnchor.tlocksInUse > TxLockHWM) && (TxAnchor.TlocksLow == 0)) {
 		jEVENT(0,("txLockAlloc TlocksLow\n"));
-		TlocksLow = 1;
+		TxAnchor.TlocksLow = 1;
 		wake_up(&jfs_sync_thread_wait);
 	}
 
@@ -208,9 +228,9 @@
 	TxLock[lid].next = TxAnchor.freelock;
 	TxAnchor.freelock = lid;
 	TxAnchor.tlocksInUse--;
-	if (TlocksLow && (TxAnchor.tlocksInUse < TxLockLWM)) {
+	if (TxAnchor.TlocksLow && (TxAnchor.tlocksInUse < TxLockLWM)) {
 		jEVENT(0,("txLockFree TlocksLow no more\n"));
-		TlocksLow = 0;
+		TxAnchor.TlocksLow = 0;
 		TXN_WAKEUP(&TxAnchor.lowlockwait);
 	}
 	TXN_WAKEUP(&TxAnchor.freelockwait);
@@ -322,6 +342,8 @@
 
 	TXN_LOCK();
 
+	INCREMENT(TxStat.txBegin);
+
       retry:
 	if (!(flag & COMMIT_FORCE)) {
 		/*
@@ -329,6 +351,7 @@
 		 */
 		if (test_bit(log_SYNCBARRIER, &log->flag) ||
 		    test_bit(log_QUIESCE, &log->flag)) {
+			INCREMENT(TxStat.txBegin_barrier);
 			TXN_SLEEP(&log->syncwait);
 			goto retry;
 		}
@@ -339,7 +362,8 @@
 		 * unless COMMIT_FORCE or COMMIT_INODE (which may ultimately
 		 * free tlocks)
 		 */
-		if (TlocksLow) {
+		if (TxAnchor.TlocksLow) {
+			INCREMENT(TxStat.txBegin_lockslow);
 			TXN_SLEEP(&TxAnchor.lowlockwait);
 			goto retry;
 		}
@@ -350,6 +374,7 @@
 	 */
 	if ((t = TxAnchor.freetid) == 0) {
 		jFYI(1, ("txBegin: waiting for free tid\n"));
+		INCREMENT(TxStat.txBegin_freetid);
 		TXN_SLEEP(&TxAnchor.freewait);
 		goto retry;
 	}
@@ -359,6 +384,7 @@
 	if ((tblk->next == 0) && (current != jfsCommitTask)) {
 		/* Save one tblk for jfsCommit thread */
 		jFYI(1, ("txBegin: waiting for free tid\n"));
+		INCREMENT(TxStat.txBegin_freetid);
 		TXN_SLEEP(&TxAnchor.freewait);
 		goto retry;
 	}
@@ -412,6 +438,7 @@
 	log = JFS_SBI(sb)->log;
 
 	TXN_LOCK();
+	INCREMENT(TxStat.txBeginAnon);
 
       retry:
 	/*
@@ -419,6 +446,7 @@
 	 */
 	if (test_bit(log_SYNCBARRIER, &log->flag) ||
 	    test_bit(log_QUIESCE, &log->flag)) {
+		INCREMENT(TxStat.txBeginAnon_barrier);
 		TXN_SLEEP(&log->syncwait);
 		goto retry;
 	}
@@ -426,7 +454,8 @@
 	/*
 	 * Don't begin transaction if we're getting starved for tlocks
 	 */
-	if (TlocksLow) {
+	if (TxAnchor.TlocksLow) {
+		INCREMENT(TxStat.txBeginAnon_lockslow);
 		TXN_SLEEP(&TxAnchor.lowlockwait);
 		goto retry;
 	}
@@ -1485,10 +1514,6 @@
 {
 	struct metapage *mp;
 	pxd_t *pxd;
-	int rc;
-	s64 xaddr;
-	int xflag;
-	s32 xlen;
 
 	mp = tlck->mp;
 
@@ -1513,13 +1538,7 @@
 		return 0;
 	}
 
-	rc = xtLookup(tlck->ip, mp->index, 1, &xflag, &xaddr, &xlen, 1);
-	if (rc || (xlen == 0)) {
-		jERROR(1, ("dataLog: can't find physical address\n"));
-		return 0;
-	}
-
-	PXDaddress(pxd, xaddr);
+	PXDaddress(pxd, mp->index);
 	PXDlength(pxd, mp->logical_size >> tblk->sb->s_blocksize_bits);
 
 	lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck));
@@ -1825,18 +1844,10 @@
 		} else {
 			/*
 			 * xdlist will point to into inode's xtree, ensure
-			 * that transaction is not committed lazily unless
-			 * we're deleting the inode (unlink).  In that case
-			 * we have special logic for the inode to be
-			 * unlocked by the lazy commit thread.
+			 * that transaction is not committed lazily.
 			 */
 			xadlock->xdlist = &p->xad[XTENTRYSTART];
-			if ((tblk->xflag & COMMIT_LAZY) &&
-			    (tblk->xflag & COMMIT_DELETE) &&
-			    (tblk->ip == ip))
-				set_cflag(COMMIT_Holdlock, ip);
-			else
-				tblk->xflag &= ~COMMIT_LAZY;
+			tblk->xflag &= ~COMMIT_LAZY;
 		}
 		jFYI(1,
 		     ("xtLog: free ip:0x%p mp:0x%p count:%d lwm:2\n",
@@ -2368,10 +2379,6 @@
 		ip = tblk->ip;
 		diUpdatePMap(ipimap, ip->i_ino, TRUE, tblk);
 		ipimap->i_state |= I_DIRTY;
-		if (test_and_clear_cflag(COMMIT_Holdlock, ip)) {
-			if (tblk->flag & tblkGC_LAZY)
-				IWRITE_UNLOCK(ip);
-		}
 		iput(ip);
 	}
 }
@@ -2752,7 +2759,7 @@
 
 	tblk->flag |= tblkGC_COMMITTED;
 
-	if ((tblk->flag & tblkGC_READY) || (tblk->flag & tblkGC_LAZY))
+	if (tblk->flag & tblkGC_READY)
 		log->gcrtc--;
 
 	if (tblk->flag & tblkGC_READY)
@@ -2958,6 +2965,16 @@
 		goto restart;
 	}
 	TXN_UNLOCK();
+
+	/*
+	 * We may need to kick off the group commit
+	 */
+	spin_lock_irq(&log->gclock);	// LOGGC_LOCK
+	if (log->cqueue.head && !(log->cflag & logGC_PAGEOUT)) {
+		log->cflag |= logGC_PAGEOUT;
+		lmGCwrite(log, 0);
+	}
+	spin_unlock_irq(&log->gclock);	// LOGGC_UNLOCK
 }
 
 /*
@@ -3006,7 +3023,7 @@
 		 * write each inode on the anonymous inode list
 		 */
 		TXN_LOCK();
-		while (TlocksLow && !list_empty(&TxAnchor.anon_list)) {
+		while (TxAnchor.TlocksLow && !list_empty(&TxAnchor.anon_list)) {
 			jfs_ip = list_entry(TxAnchor.anon_list.next,
 					    struct jfs_inode_info,
 					    anon_inode_list);
@@ -3097,6 +3114,7 @@
 		       "freelockwait = %s\n"
 		       "lowlockwait = %s\n"
 		       "tlocksInUse = %d\n"
+		       "TlocksLow = %d\n"
 		       "unlock_queue = 0x%p\n"
 		       "unlock_tail = 0x%p\n",
 		       TxAnchor.freetid,
@@ -3105,8 +3123,54 @@
 		       freelockwait,
 		       lowlockwait,
 		       TxAnchor.tlocksInUse,
+		       TxAnchor.TlocksLow,
 		       TxAnchor.unlock_queue,
 		       TxAnchor.unlock_tail);
+
+	begin = offset;
+	*start = buffer + begin;
+	len -= begin;
+
+	if (len > length)
+		len = length;
+	else
+		*eof = 1;
+
+	if (len < 0)
+		len = 0;
+
+	return len;
+}
+#endif
+
+#if defined(CONFIG_PROC_FS) && defined(CONFIG_JFS_STATISTICS)
+int jfs_txstats_read(char *buffer, char **start, off_t offset, int length,
+		     int *eof, void *data)
+{
+	int len = 0;
+	off_t begin;
+
+	len += sprintf(buffer,
+		       "JFS TxStats\n"
+		       "===========\n"
+		       "calls to txBegin = %d\n"
+		       "txBegin blocked by sync barrier = %d\n"
+		       "txBegin blocked by tlocks low = %d\n"
+		       "txBegin blocked by no free tid = %d\n"
+		       "calls to txBeginAnon = %d\n"
+		       "txBeginAnon blocked by sync barrier = %d\n"
+		       "txBeginAnon blocked by tlocks low = %d\n"
+		       "calls to txLockAlloc = %d\n"
+		       "tLockAlloc blocked by no free lock = %d\n",
+		       TxStat.txBegin,
+		       TxStat.txBegin_barrier,
+		       TxStat.txBegin_lockslow,
+		       TxStat.txBegin_freetid,
+		       TxStat.txBeginAnon,
+		       TxStat.txBeginAnon_barrier,
+		       TxStat.txBeginAnon_lockslow,
+		       TxStat.txLockAlloc,
+		       TxStat.txLockAlloc_freelock);
 
 	begin = offset;
 	*start = buffer + begin;
diff -Nru a/fs/jfs/jfs_xtree.c b/fs/jfs/jfs_xtree.c
--- a/fs/jfs/jfs_xtree.c	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/jfs_xtree.c	Sun Dec 15 18:08:29 2002
@@ -3518,6 +3518,13 @@
 		xaddr = addressXAD(xad);
 
 		/*
+		 * The "data" for a directory is indexed by the block
+		 * device's address space.  This metadata must be invalidated
+		 * here
+		 */
+		if (S_ISDIR(ip->i_mode) && (teof == 0))
+			invalidate_xad_metapages(ip, *xad);
+		/*
 		 * entry beyond eof: continue scan of current page
 		 *          xad
 		 * ---|---=======------->
diff -Nru a/fs/jfs/namei.c b/fs/jfs/namei.c
--- a/fs/jfs/namei.c	Sun Dec 15 18:08:30 2002
+++ b/fs/jfs/namei.c	Sun Dec 15 18:08:30 2002
@@ -544,8 +544,7 @@
 	if (ip->i_nlink == 0)
 		set_cflag(COMMIT_Nolink, ip);
 
-	if (!test_cflag(COMMIT_Holdlock, ip))
-		IWRITE_UNLOCK(ip);
+	IWRITE_UNLOCK(ip);
 
 	/*
 	 * Truncating the directory index table is not guaranteed.  It
@@ -602,7 +601,7 @@
 		break;
 	case S_IFLNK:
 		/* fast symbolic link */
-		if (ip->i_size <= 256) {
+		if (ip->i_size < IDATASIZE) {
 			ip->i_size = 0;
 			return 0;
 		}
@@ -674,7 +673,7 @@
 		break;
 	case S_IFLNK:
 		/* if its contained in inode nothing to do */
-		if (ip->i_size <= 256)
+		if (ip->i_size < IDATASIZE)
 			return 0;
 		break;
 	default:
@@ -1255,14 +1254,6 @@
 		commit_flag = 0;
 
 	rc = txCommit(tid, ipcount, iplist, commit_flag);
-
-	/*
-	 * Don't unlock new_ip if COMMIT_HOLDLOCK is set
-	 */
-	if (new_ip && test_cflag(COMMIT_Holdlock, new_ip)) {
-		up(&JFS_IP(new_ip)->commit_sem);
-		new_ip = 0;
-	}
 
       out4:
 	txEnd(tid);
diff -Nru a/fs/jfs/super.c b/fs/jfs/super.c
--- a/fs/jfs/super.c	Sun Dec 15 18:08:29 2002
+++ b/fs/jfs/super.c	Sun Dec 15 18:08:29 2002
@@ -97,6 +97,11 @@
 {
 	struct jfs_inode_info *ji = JFS_IP(inode);
 
+	if (ji->active_ag != -1) {
+		struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap;
+		atomic_dec(&bmap->db_active[ji->active_ag]);
+	}
+
 #ifdef CONFIG_JFS_POSIX_ACL
 	if (ji->i_acl && (ji->i_acl != JFS_ACL_NOT_CACHED))
 		posix_acl_release(ji->i_acl);
@@ -412,7 +417,6 @@
 	if ((flags & (SLAB_CTOR_VERIFY | SLAB_CTOR_CONSTRUCTOR)) ==
 	    SLAB_CTOR_CONSTRUCTOR) {
 		INIT_LIST_HEAD(&jfs_ip->anon_inode_list);
-		INIT_LIST_HEAD(&jfs_ip->mp_list);
 		init_rwsem(&jfs_ip->rdwrlock);
 		init_MUTEX(&jfs_ip->commit_sem);
 		jfs_ip->atlhead = 0;
diff -Nru a/fs/lockd/Makefile b/fs/lockd/Makefile
--- a/fs/lockd/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/lockd/Makefile	Sun Dec 15 18:08:28 2002
@@ -10,5 +10,3 @@
 	        svcproc.o svcsubs.o mon.o xdr.o lockd_syms.o
 lockd-objs-$(CONFIG_LOCKD_V4) += xdr4.o svc4proc.o
 lockd-objs		      := $(lockd-objs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/minix/Makefile b/fs/minix/Makefile
--- a/fs/minix/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/minix/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_MINIX_FS) += minix.o
 
 minix-objs := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/minix/inode.c b/fs/minix/inode.c
--- a/fs/minix/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/minix/inode.c	Sun Dec 15 18:08:29 2002
@@ -316,9 +316,9 @@
 		return V2_minix_get_block(inode, block, bh_result, create);
 }
 
-static int minix_writepage(struct page *page)
+static int minix_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,minix_get_block);
+	return block_write_full_page(page, minix_get_block, wbc);
 }
 static int minix_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/mpage.c b/fs/mpage.c
--- a/fs/mpage.c	Sun Dec 15 18:08:28 2002
+++ b/fs/mpage.c	Sun Dec 15 18:08:28 2002
@@ -327,7 +327,7 @@
  */
 static struct bio *
 mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
-			sector_t *last_block_in_bio, int *ret)
+	sector_t *last_block_in_bio, int *ret, struct writeback_control *wbc)
 {
 	struct inode *inode = page->mapping->host;
 	const unsigned blkbits = inode->i_blkbits;
@@ -501,7 +501,7 @@
 confused:
 	if (bio)
 		bio = mpage_bio_submit(WRITE, bio);
-	*ret = page->mapping->a_ops->writepage(page);
+	*ret = page->mapping->a_ops->writepage(page, wbc);
 out:
 	return bio;
 }
@@ -525,12 +525,12 @@
  * Pages can be moved from clean_pages or locked_pages onto dirty_pages
  * at any time - it's not possible to lock against that.  So pages which
  * have already been added to a BIO may magically reappear on the dirty_pages
- * list.  And generic_writepages() will again try to lock those pages.
+ * list.  And mpage_writepages() will again try to lock those pages.
  * But I/O has not yet been started against the page.  Thus deadlock.
  *
- * To avoid this, the entire contents of the dirty_pages list are moved
- * onto io_pages up-front.  We then walk io_pages, locking the
- * pages and submitting them for I/O, moving them to locked_pages.
+ * To avoid this, mpage_writepages() will only write pages from io_pages. The
+ * caller must place them there.  We walk io_pages, locking the pages and
+ * submitting them for I/O, moving them to locked_pages.
  *
  * This has the added benefit of preventing a livelock which would otherwise
  * occur if pages are being dirtied faster than we can write them out.
@@ -539,8 +539,8 @@
  * if it's dirty.  This is desirable behaviour for memory-cleaning writeback,
  * but it is INCORRECT for data-integrity system calls such as fsync().  fsync()
  * and msync() need to guarentee that all the data which was dirty at the time
- * the call was made get new I/O started against them.  The way to do this is
- * to run filemap_fdatawait() before calling filemap_fdatawrite().
+ * the call was made get new I/O started against them.  So if called_for_sync()
+ * is true, we must wait for existing IO to complete.
  *
  * It's fairly rare for PageWriteback pages to be on ->dirty_pages.  It
  * means that someone redirtied the page while it was under I/O.
@@ -554,9 +554,8 @@
 	sector_t last_block_in_bio = 0;
 	int ret = 0;
 	int done = 0;
-	int sync = called_for_sync();
 	struct pagevec pvec;
-	int (*writepage)(struct page *);
+	int (*writepage)(struct page *page, struct writeback_control *wbc);
 
 	if (wbc->nonblocking && bdi_write_congested(bdi)) {
 		blk_run_queues();
@@ -570,14 +569,11 @@
 
 	pagevec_init(&pvec, 0);
 	write_lock(&mapping->page_lock);
-
-	list_splice_init(&mapping->dirty_pages, &mapping->io_pages);
-
-        while (!list_empty(&mapping->io_pages) && !done) {
+	while (!list_empty(&mapping->io_pages) && !done) {
 		struct page *page = list_entry(mapping->io_pages.prev,
 					struct page, list);
 		list_del(&page->list);
-		if (PageWriteback(page) && !sync) {
+		if (PageWriteback(page) && wbc->sync_mode == WB_SYNC_NONE) {
 			if (PageDirty(page)) {
 				list_add(&page->list, &mapping->dirty_pages);
 				continue;
@@ -603,20 +599,16 @@
 
 		lock_page(page);
 
-		if (sync)
+		if (wbc->sync_mode != WB_SYNC_NONE)
 			wait_on_page_writeback(page);
 
 		if (page->mapping == mapping && !PageWriteback(page) &&
 					test_clear_page_dirty(page)) {
 			if (writepage) {
-				ret = (*writepage)(page);
-				if (ret == -EAGAIN) {
-					__set_page_dirty_nobuffers(page);
-					ret = 0;
-				}
+				ret = (*writepage)(page, wbc);
 			} else {
 				bio = mpage_writepage(bio, page, get_block,
-						&last_block_in_bio, &ret);
+					&last_block_in_bio, &ret, wbc);
 			}
 			if (ret || (--(wbc->nr_to_write) <= 0))
 				done = 1;
diff -Nru a/fs/msdos/Makefile b/fs/msdos/Makefile
--- a/fs/msdos/Makefile	Sun Dec 15 18:08:32 2002
+++ b/fs/msdos/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_MSDOS_FS) += msdos.o
 
 msdos-objs := namei.o msdosfs_syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ncpfs/Makefile b/fs/ncpfs/Makefile
--- a/fs/ncpfs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/ncpfs/Makefile	Sun Dec 15 18:08:33 2002
@@ -17,5 +17,3 @@
 # EXTRA_CFLAGS += -DDEBUG_NCP=1
 
 CFLAGS_ncplib_kernel.o := -finline-functions
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/nfs/Makefile b/fs/nfs/Makefile
--- a/fs/nfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/nfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -11,5 +11,3 @@
 nfs-$(CONFIG_NFS_V4)	+= nfs4proc.o nfs4xdr.o nfs4state.o nfs4renewd.o
 nfs-$(CONFIG_NFS_DIRECTIO) += direct.o
 nfs-objs		:= $(nfs-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
--- a/fs/nfs/nfs4proc.c	Sun Dec 15 18:08:30 2002
+++ b/fs/nfs/nfs4proc.c	Sun Dec 15 18:08:30 2002
@@ -648,7 +648,7 @@
 {
 	int status;
 	struct rpc_message msg = {
-		.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
+		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
 		.rpc_argp = cp,
 		.rpc_resp = cp,
 		.rpc_cred = cred,
@@ -1112,7 +1112,7 @@
 	nfs4_setup_remove(cp, name, &up->cinfo);
 	nfs4_setup_getattr(cp, &up->attrs, bmres);
 	
-	msg->rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND];
+	msg->rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND];
 	msg->rpc_argp = cp;
 	msg->rpc_resp = cp;
 	return 0;
@@ -1373,7 +1373,7 @@
 	struct rpc_task	*task = &data->task;
 	struct nfs4_compound *cp = &data->u.v4.compound;
 	struct rpc_message msg = {
-		.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
+		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
 		.rpc_argp = cp,
 		.rpc_resp = cp,
 		.rpc_cred = data->cred,
@@ -1417,7 +1417,7 @@
 	struct rpc_task	*task = &data->task;
 	struct nfs4_compound *cp = &data->u.v4.compound;
 	struct rpc_message msg = {
-		.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
+		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
 		.rpc_argp = cp,
 		.rpc_resp = cp,
 		.rpc_cred = data->cred,
@@ -1468,7 +1468,7 @@
 	struct rpc_task	*task = &data->task;
 	struct nfs4_compound *cp = &data->u.v4.compound;
 	struct rpc_message msg = {
-		.rpc_proc = &nfs4_procedures[NFSPROC4_COMPOUND],
+		.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
 		.rpc_argp = cp,
 		.rpc_resp = cp,
 		.rpc_cred = data->cred,
@@ -1523,7 +1523,7 @@
 	struct rpc_task *task;
 	struct nfs4_compound *cp;
 	struct rpc_message msg = {
-		.rpc_proc	= &nfs4_procedures[NFSPROC4_COMPOUND],
+		.rpc_proc	= &nfs4_procedures[NFSPROC4_CLNT_COMPOUND],
 	};
 
 	rp = (struct renew_desc *) kmalloc(sizeof(*rp), GFP_KERNEL);
diff -Nru a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
--- a/fs/nfs/nfs4xdr.c	Sun Dec 15 18:08:32 2002
+++ b/fs/nfs/nfs4xdr.c	Sun Dec 15 18:08:32 2002
@@ -83,6 +83,13 @@
 	{ 0,		NFNON	     },
 };
 
+struct compound_hdr {
+	int32_t		status;
+	uint32_t	nops;
+	uint32_t	taglen;
+	char *		tag;
+};
+
 /*
  * START OF "GENERIC" ENCODE ROUTINES.
  *   These may look a little ugly since they are imported from a "generic"
@@ -118,6 +125,20 @@
 	return p + tmp;
 }
 
+static int
+encode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr)
+{
+	uint32_t *p;
+
+	dprintk("encode_compound: tag=%.*s\n", (int)hdr->taglen, hdr->tag);
+	RESERVE_SPACE(12+XDR_QUADLEN(hdr->taglen));
+	WRITE32(hdr->taglen);
+	WRITEMEM(hdr->tag, hdr->taglen);
+	WRITE32(NFS4_MINOR_VERSION);
+	WRITE32(hdr->nops);
+	return 0;
+}
+
 /*
  * FIXME: The following dummy entries will be replaced once the userland
  * upcall gets in...
@@ -161,9 +182,13 @@
 	 *          = 36 bytes, plus any contribution from variable-length fields
 	 *            such as owner/group/acl's.
 	 */
-	len = 36;
+	len = 16;
 
 	/* Sigh */
+	if (iap->ia_valid & ATTR_SIZE)
+		len += 8;
+	if (iap->ia_valid & ATTR_MODE)
+		len += 4;
 	if (iap->ia_valid & ATTR_UID) {
 		status = owner_namelen = encode_uid(owner_name, iap->ia_uid);
 		if (status < 0) {
@@ -171,7 +196,7 @@
 			       iap->ia_uid);
 			goto out;
 		}
-		len += XDR_QUADLEN(owner_namelen);
+		len += 4 + (XDR_QUADLEN(owner_namelen) << 2);
 	}
 	if (iap->ia_valid & ATTR_GID) {
 		status = owner_grouplen = encode_gid(owner_group, iap->ia_gid);
@@ -180,8 +205,16 @@
 			       iap->ia_gid);
 			goto out;
 		}
-		len += XDR_QUADLEN(owner_grouplen);
+		len += 4 + (XDR_QUADLEN(owner_grouplen) << 2);
 	}
+	if (iap->ia_valid & ATTR_ATIME_SET)
+		len += 16;
+	else if (iap->ia_valid & ATTR_ATIME)
+		len += 4;
+	if (iap->ia_valid & ATTR_MTIME_SET)
+		len += 16;
+	else if (iap->ia_valid & ATTR_MTIME)
+		len += 4;
 	RESERVE_SPACE(len);
 
 	/*
@@ -204,13 +237,11 @@
 		bmval1 |= FATTR4_WORD1_OWNER;
 		WRITE32(owner_namelen);
 		WRITEMEM(owner_name, owner_namelen);
-		p += owner_namelen;
 	}
 	if (iap->ia_valid & ATTR_GID) {
 		bmval1 |= FATTR4_WORD1_OWNER_GROUP;
 		WRITE32(owner_grouplen);
 		WRITEMEM(owner_group, owner_grouplen);
-		p += owner_namelen;
 	}
 	if (iap->ia_valid & ATTR_ATIME_SET) {
 		bmval1 |= FATTR4_WORD1_TIME_ACCESS_SET;
@@ -238,6 +269,11 @@
 	/*
 	 * Now we backfill the bitmap and the attribute buffer length.
 	 */
+	if (len != ((char *)p - (char *)q) + 4) {
+		printk ("encode_attr: Attr length calculation error! %u != %u\n",
+				len, ((char *)p - (char *)q) + 4);
+		BUG();
+	}
 	len = (char *)p - (char *)q - 12;
 	*q++ = htonl(bmval0);
 	*q++ = htonl(bmval1);
@@ -265,7 +301,7 @@
 {
 	uint32_t *p;
 
-	RESERVE_SPACE(20);
+	RESERVE_SPACE(8+sizeof(nfs4_stateid));
 	WRITE32(OP_CLOSE);
 	WRITE32(close->cl_seqid);
 	WRITEMEM(close->cl_stateid, sizeof(nfs4_stateid));
@@ -380,7 +416,7 @@
 	uint32_t *p;
 	
 	/* seqid, share_access, share_deny, clientid, ownerlen, owner, opentype */
-	RESERVE_SPACE(52);
+	RESERVE_SPACE(36);
 	WRITE32(OP_OPEN);
 	WRITE32(0);                       /* seqid */
 	WRITE32(open->op_share_access);
@@ -392,7 +428,7 @@
 	
 	if (open->op_opentype == NFS4_OPEN_CREATE) {
 		if (open->op_createmode == NFS4_CREATE_EXCLUSIVE) {
-			RESERVE_SPACE(12);
+			RESERVE_SPACE(4+sizeof(nfs4_verifier));
 			WRITE32(open->op_createmode);
 			WRITEMEM(open->op_verifier, sizeof(nfs4_verifier));
 		}
@@ -427,7 +463,7 @@
 	 * Note: In this "stateless" implementation, the OPEN_CONFIRM
 	 * seqid is always equal to 1.
 	 */
-	RESERVE_SPACE(24);
+	RESERVE_SPACE(8+sizeof(nfs4_stateid));
 	WRITE32(OP_OPEN_CONFIRM);
 	WRITEMEM(open_confirm->oc_stateid, sizeof(nfs4_stateid));
 	WRITE32(1);
@@ -494,7 +530,7 @@
 	int replen;
 	uint32_t *p;
 
-	RESERVE_SPACE(40);
+	RESERVE_SPACE(32+sizeof(nfs4_verifier));
 	WRITE32(OP_READDIR);
 	WRITE64(readdir->rd_cookie);
 	WRITEMEM(readdir->rd_req_verifier, sizeof(nfs4_verifier));
@@ -558,7 +594,7 @@
 	WRITE32(rename->rn_oldnamelen);
 	WRITEMEM(rename->rn_oldname, rename->rn_oldnamelen);
 	
-	RESERVE_SPACE(8 + rename->rn_newnamelen);
+	RESERVE_SPACE(4 + rename->rn_newnamelen);
 	WRITE32(rename->rn_newnamelen);
 	WRITEMEM(rename->rn_newname, rename->rn_newnamelen);
 
@@ -605,7 +641,7 @@
 	int status;
 	uint32_t *p;
 	
-        RESERVE_SPACE(20);
+        RESERVE_SPACE(4+sizeof(nfs4_stateid));
         WRITE32(OP_SETATTR);
 	WRITEMEM(setattr->st_stateid, sizeof(nfs4_stateid));
 
@@ -626,7 +662,7 @@
 	len2 = strlen(setclientid->sc_netid);
 	len3 = strlen(setclientid->sc_uaddr);
 	total_len = XDR_QUADLEN(len1) + XDR_QUADLEN(len2) + XDR_QUADLEN(len3);
-	total_len = (total_len << 2) + 32;
+	total_len = (total_len << 2) + 24 + sizeof(nfs4_verifier);
 
 	RESERVE_SPACE(total_len);
 	WRITE32(OP_SETCLIENTID);
@@ -681,16 +717,14 @@
 static int
 encode_compound(struct xdr_stream *xdr, struct nfs4_compound *cp, struct rpc_rqst *req)
 {
+	struct compound_hdr hdr = {
+		.taglen = cp->taglen,
+		.tag	= cp->tag,
+		.nops	= cp->req_nops,
+	};
 	int i, status = 0;
-	uint32_t *p;
 
-	dprintk("encode_compound: tag=%.*s\n", (int)cp->taglen, cp->tag);
-	
-	RESERVE_SPACE(12 + cp->taglen);
-	WRITE32(cp->taglen);
-	WRITEMEM(cp->tag, cp->taglen);
-	WRITE32(NFS4_MINOR_VERSION);
-	WRITE32(cp->req_nops);
+	encode_compound_hdr(xdr, &hdr);
 
 	for (i = 0; i < cp->req_nops; i++) {
 		switch (cp->ops[i].opnum) {
@@ -834,8 +868,8 @@
 	p = xdr_inline_decode(xdr, nbytes); \
 	if (!p) { \
 		printk(KERN_WARNING "%s: reply buffer overflowed in line %d.", \
-				__FUNCTION__, __LINE__); \
-			return -EIO; \
+			       	__FUNCTION__, __LINE__); \
+		return -EIO; \
 	} \
 } while (0)
 
@@ -862,6 +896,44 @@
 }
 
 static int
+decode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr)
+{
+	uint32_t *p;
+
+	READ_BUF(8);
+	READ32(hdr->status);
+	READ32(hdr->taglen);
+	
+	READ_BUF(hdr->taglen + 4);
+	hdr->tag = (char *)p;
+	p += XDR_QUADLEN(hdr->taglen);
+	READ32(hdr->nops);
+	return 0;
+}
+
+static int
+decode_op_hdr(struct xdr_stream *xdr, enum nfs_opnum4 expected)
+{
+	uint32_t *p;
+	uint32_t opnum;
+	int32_t nfserr;
+
+	READ_BUF(8);
+	READ32(opnum);
+	if (opnum != expected) {
+		printk(KERN_NOTICE
+				"nfs4_decode_op_hdr: Server returned operation"
+			       	" %d but we issued a request for %d\n",
+				opnum, expected);
+		return -EIO;
+	}
+	READ32(nfserr);
+	if (nfserr != NFS_OK)
+		return -nfs_stat_to_errno(nfserr);
+	return 0;
+}
+
+static int
 decode_change_info(struct xdr_stream *xdr, struct nfs4_change_info *cinfo)
 {
 	uint32_t *p;
@@ -874,68 +946,71 @@
 }
 
 static int
-decode_access(struct xdr_stream *xdr, int nfserr, struct nfs4_access *access)
+decode_access(struct xdr_stream *xdr, struct nfs4_access *access)
 {
 	uint32_t *p;
 	uint32_t supp, acc;
+	int status;
 
-	if (!nfserr) {
-		READ_BUF(8);
-		READ32(supp);
-		READ32(acc);
-
-		if ((supp & ~access->ac_req_access) || (acc & ~supp)) {
-			printk(KERN_NOTICE "NFS: server returned bad bits in access call!\n");
-			return -EIO;
-		}
-		*access->ac_resp_supported = supp;
-		*access->ac_resp_access = acc;
+	status = decode_op_hdr(xdr, OP_ACCESS);
+	if (status)
+		return status;
+	READ_BUF(8);
+	READ32(supp);
+	READ32(acc);
+	if ((supp & ~access->ac_req_access) || (acc & ~supp)) {
+		printk(KERN_NOTICE "NFS: server returned bad bits in access call!\n");
+		return -EIO;
 	}
+	*access->ac_resp_supported = supp;
+	*access->ac_resp_access = acc;
 	return 0;
 }
 
 static int
-decode_close(struct xdr_stream *xdr, int nfserr, struct nfs4_close *close)
+decode_close(struct xdr_stream *xdr, struct nfs4_close *close)
 {
 	uint32_t *p;
+	int status;
 
-	if (!nfserr) {
-		READ_BUF(sizeof(nfs4_stateid));
-		COPYMEM(close->cl_stateid, sizeof(nfs4_stateid));
-	}
+	status = decode_op_hdr(xdr, OP_CLOSE);
+	if (status)
+		return status;
+	READ_BUF(sizeof(nfs4_stateid));
+	COPYMEM(close->cl_stateid, sizeof(nfs4_stateid));
 	return 0;
 }
 
 static int
-decode_commit(struct xdr_stream *xdr, int nfserr, struct nfs4_commit *commit)
+decode_commit(struct xdr_stream *xdr, struct nfs4_commit *commit)
 {
 	uint32_t *p;
+	int status;
 
-        if (!nfserr) {
-                READ_BUF(8);
-                COPYMEM(commit->co_verifier->verifier, 8);
-        }
+	status = decode_op_hdr(xdr, OP_COMMIT);
+	if (status)
+		return status;
+	READ_BUF(8);
+	COPYMEM(commit->co_verifier->verifier, 8);
 	return 0;
 }
 
 static int
-decode_create(struct xdr_stream *xdr, int nfserr, struct nfs4_create *create)
+decode_create(struct xdr_stream *xdr, struct nfs4_create *create)
 {
 	uint32_t *p;
 	uint32_t bmlen;
 	int status;
 
-	if (!nfserr) {
-		if ((status = decode_change_info(xdr, create->cr_cinfo)))
-			goto out;
-		READ_BUF(4);
-		READ32(bmlen);
-		if (bmlen > 2)
-			goto xdr_error;
-		READ_BUF(bmlen << 2);
-	}
-
-	DECODE_TAIL;
+	status = decode_op_hdr(xdr, OP_CREATE);
+	if (status)
+		return status;
+	if ((status = decode_change_info(xdr, create->cr_cinfo)))
+		return status;
+	READ_BUF(4);
+	READ32(bmlen);
+	READ_BUF(bmlen << 2);
+	return 0;
 }
 
 extern uint32_t nfs4_fattr_bitmap[2];
@@ -944,25 +1019,24 @@
 extern uint32_t nfs4_pathconf_bitmap[2];
 
 static int
-decode_getattr(struct xdr_stream *xdr, int nfserr, struct nfs4_getattr *getattr)
+decode_getattr(struct xdr_stream *xdr, struct nfs4_getattr *getattr)
 {
-        struct nfs_fattr *nfp = getattr->gt_attrs;
+	struct nfs_fattr *nfp = getattr->gt_attrs;
 	struct nfs_fsstat *fsstat = getattr->gt_fsstat;
 	struct nfs_fsinfo *fsinfo = getattr->gt_fsinfo;
 	struct nfs_pathconf *pathconf = getattr->gt_pathconf;
+	uint32_t attrlen, dummy32, bmlen,
+		 bmval0 = 0,
+		 bmval1 = 0,
+		 len = 0;
 	uint32_t *p;
-        uint32_t bmlen;
-        uint32_t bmval0 = 0;
-        uint32_t bmval1 = 0;
-        uint32_t attrlen;
-        uint32_t dummy32;
-        uint32_t len = 0;
 	unsigned int type;
 	int fmode = 0;
 	int status;
 	
-        if (nfserr)
-                goto success;
+	status = decode_op_hdr(xdr, OP_GETATTR);
+	if (status)
+		return status;
         
         READ_BUF(4);
         READ32(bmlen);
@@ -1193,265 +1267,361 @@
         if (len != attrlen)
                 goto xdr_error;
 	
-success:
         DECODE_TAIL;
 }
 
 static int
-decode_getfh(struct xdr_stream *xdr, int nfserr, struct nfs4_getfh *getfh)
+decode_getfh(struct xdr_stream *xdr, struct nfs4_getfh *getfh)
 {
 	struct nfs_fh *fh = getfh->gf_fhandle;
 	uint32_t *p;
 	uint32_t len;
 	int status;
 
+	status = decode_op_hdr(xdr, OP_GETFH);
+	if (status)
+		return status;
 	/* Zero handle first to allow comparisons */
 	memset(fh, 0, sizeof(*fh));
-		
-        if (!nfserr) {
-                READ_BUF(4);
-		READ32(len);
-		if (len > NFS_MAXFHSIZE)
-			goto xdr_error;
-		fh->size = len;
-                READ_BUF(len);
-                COPYMEM(fh->data, len);
-        }
 
-        DECODE_TAIL;
+	READ_BUF(4);
+	READ32(len);
+	if (len > NFS_MAXFHSIZE)
+		return -EIO;
+	fh->size = len;
+	READ_BUF(len);
+	COPYMEM(fh->data, len);
+	return 0;
 }
 
 static int
-decode_link(struct xdr_stream *xdr, int nfserr, struct nfs4_link *link)
+decode_link(struct xdr_stream *xdr, struct nfs4_link *link)
 {
-	int status = 0;
+	int status;
 	
-	if (!nfserr)
-		status = decode_change_info(xdr, link->ln_cinfo);
-	return status;
+	status = decode_op_hdr(xdr, OP_LINK);
+	if (status)
+		return status;
+	return decode_change_info(xdr, link->ln_cinfo);
+}
+
+static int
+decode_lookup(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_LOOKUP);
 }
 
 static int
-decode_open(struct xdr_stream *xdr, int nfserr, struct nfs4_open *open)
+decode_open(struct xdr_stream *xdr, struct nfs4_open *open)
 {
 	uint32_t *p;
 	uint32_t bmlen, delegation_type;
 	int status;
 	
-	if (!nfserr) {
-		READ_BUF(sizeof(nfs4_stateid));
-		COPYMEM(open->op_stateid, sizeof(nfs4_stateid));
+	status = decode_op_hdr(xdr, OP_OPEN);
+	if (status)
+		return status;
+	READ_BUF(sizeof(nfs4_stateid));
+	COPYMEM(open->op_stateid, sizeof(nfs4_stateid));
 
-		decode_change_info(xdr, open->op_cinfo);
+	decode_change_info(xdr, open->op_cinfo);
 
-		READ_BUF(8);
-		READ32(*open->op_rflags);
-		READ32(bmlen);
-		if (bmlen > 10)
-			goto xdr_error;
+	READ_BUF(8);
+	READ32(*open->op_rflags);
+	READ32(bmlen);
+	if (bmlen > 10)
+		goto xdr_error;
 		
-		READ_BUF((bmlen << 2) + 4);
-		p += bmlen;
-		READ32(delegation_type);
-		if (delegation_type != NFS4_OPEN_DELEGATE_NONE)
-			goto xdr_error;
-	}
+	READ_BUF((bmlen << 2) + 4);
+	p += bmlen;
+	READ32(delegation_type);
+	if (delegation_type != NFS4_OPEN_DELEGATE_NONE)
+		goto xdr_error;
 	
 	DECODE_TAIL;
 }
 
 static int
-decode_open_confirm(struct xdr_stream *xdr, int nfserr, struct nfs4_open_confirm *open_confirm)
+decode_open_confirm(struct xdr_stream *xdr, struct nfs4_open_confirm *open_confirm)
 {
 	uint32_t *p;
+	int status;
 
-	if (!nfserr) {
-		READ_BUF(sizeof(nfs4_stateid));
-		COPYMEM(open_confirm->oc_stateid, sizeof(nfs4_stateid));
-	}
+	status = decode_op_hdr(xdr, OP_OPEN_CONFIRM);
+	if (status)
+		return status;
+	READ_BUF(sizeof(nfs4_stateid));
+	COPYMEM(open_confirm->oc_stateid, sizeof(nfs4_stateid));
 	return 0;
 }
 
 static int
-decode_read(struct xdr_stream *xdr, int nfserr, struct nfs4_read *read)
+decode_putfh(struct xdr_stream *xdr)
 {
-	uint32_t throwaway;
+	return decode_op_hdr(xdr, OP_PUTFH);
+}
+
+static int
+decode_putrootfh(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_PUTROOTFH);
+}
+
+static int
+decode_read(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_read *read)
+{
+	struct iovec *iov = req->rq_rvec;
 	uint32_t *p;
+	uint32_t count, eof, recvd, hdrlen;
 	int status;
 
-	if (!nfserr) {
-		READ_BUF(8);
-		if (read->rd_eof)
-			READ32(*read->rd_eof);
-		else
-			READ32(throwaway);
-		READ32(*read->rd_bytes_read);
-		if (*read->rd_bytes_read > read->rd_length)
-			goto xdr_error;
-	}
-
-	DECODE_TAIL;
+	status = decode_op_hdr(xdr, OP_READ);
+	if (status)
+		return status;
+	READ_BUF(8);
+	READ32(eof);
+	READ32(count);
+	hdrlen = (u8 *) p - (u8 *) iov->iov_base;
+	if (iov->iov_len < hdrlen) {
+		printk(KERN_WARNING "NFS: READ reply header overflowed:"
+				"length %u > %Zu\n", hdrlen, iov->iov_len);
+		return -errno_NFSERR_IO;
+	} else if (iov->iov_len != hdrlen) {
+		dprintk("NFS: READ header is short. iovec will be shifted.\n");
+		xdr_shift_buf(&req->rq_rcv_buf, iov->iov_len - hdrlen);
+	}
+	recvd = req->rq_received - hdrlen;
+	if (count > recvd) {
+		printk(KERN_WARNING "NFS: server cheating in read reply: "
+				"count %u > recvd %u\n", count, recvd);
+		count = recvd;
+		eof = 0;
+	}
+	if (read->rd_eof)
+		*read->rd_eof = eof;
+	*read->rd_bytes_read = count;
+	return 0;
 }
 
 static int
-decode_readdir(struct xdr_stream *xdr, int nfserr, struct rpc_rqst *req, struct nfs4_readdir *readdir)
+decode_readdir(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_readdir *readdir)
 {
 	struct xdr_buf	*rcvbuf = &req->rq_rcv_buf;
 	struct page	*page = *rcvbuf->pages;
-	unsigned int	pglen = rcvbuf->page_len;
-	uint32_t *end, *entry, *p;
-	uint32_t len, attrlen, word;
-	int i;
+	struct iovec	*iov = rcvbuf->head;
+	unsigned int	nr, pglen = rcvbuf->page_len;
+	uint32_t	*end, *entry, *p;
+	uint32_t	len, attrlen, word;
+	int 		i, hdrlen, recvd, status;
 
-	if (!nfserr) {
-		READ_BUF(8);
-		COPYMEM(readdir->rd_resp_verifier, 8);
+	status = decode_op_hdr(xdr, OP_READDIR);
+	if (status)
+		return status;
+	READ_BUF(8);
+	COPYMEM(readdir->rd_resp_verifier, 8);
 
-		BUG_ON(pglen > PAGE_CACHE_SIZE);
-		p   = (uint32_t *) kmap(page);
-		end = (uint32_t *) ((char *)p + pglen + readdir->rd_pgbase);
-
-		while (*p++) {
-			entry = p - 1;
-			if (p + 3 > end)
-				goto short_pkt;
-			p += 2;     /* cookie */
-			len = ntohl(*p++);  /* filename length */
-			if (len > NFS4_MAXNAMLEN) {
-				printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)\n", len);
-				goto err_unmap;
-			}
+	hdrlen = (char *) p - (char *) iov->iov_base;
+	if (iov->iov_len < hdrlen) {
+		printk(KERN_WARNING "NFS: READDIR reply header overflowed:"
+				"length %d > %Zu\n", hdrlen, iov->iov_len);
+		return -EIO;
+	} else if (iov->iov_len != hdrlen) {
+		dprintk("NFS: READDIR header is short. iovec will be shifted.\n");
+		xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen);
+	}
+	recvd = req->rq_received - hdrlen;
+	if (pglen > recvd)
+		pglen = recvd;
+
+	BUG_ON(pglen + readdir->rd_pgbase > PAGE_CACHE_SIZE);
+	p   = (uint32_t *) kmap(page);
+	end = (uint32_t *) ((char *)p + pglen + readdir->rd_pgbase);
+	entry = p;
+	for (nr = 0; *p++; nr++) {
+		if (p + 3 > end)
+			goto short_pkt;
+		p += 2;     /* cookie */
+		len = ntohl(*p++);  /* filename length */
+		if (len > NFS4_MAXNAMLEN) {
+			printk(KERN_WARNING "NFS: giant filename in readdir (len 0x%x)\n", len);
+			goto err_unmap;
+		}
 			
-			p += XDR_QUADLEN(len);
-			if (p + 1 > end)
-				goto short_pkt;
-			len = ntohl(*p++);  /* bitmap length */
-			if (len > 10) {
-				printk(KERN_WARNING "NFS: giant bitmap in readdir (len 0x%x)\n", len);
-				goto err_unmap;
-			}
-			if (p + len + 1 > end)
-				goto short_pkt;
-			attrlen = 0;
-			for (i = 0; i < len; i++) {
-				word = ntohl(*p++);
-				if (!word)
-					continue;
-				else if (i == 0 && word == FATTR4_WORD0_FILEID) {
-					attrlen = 8;
-					continue;
-				}
-				printk(KERN_WARNING "NFS: unexpected bitmap word in readdir (0x%x)\n", word);
-				goto err_unmap;
-			}
-			if (ntohl(*p++) != attrlen) {
-				printk(KERN_WARNING "NFS: unexpected attrlen in readdir\n");
-				goto err_unmap;
+		p += XDR_QUADLEN(len);
+		if (p + 1 > end)
+			goto short_pkt;
+		len = ntohl(*p++);  /* bitmap length */
+		if (len > 10) {
+			printk(KERN_WARNING "NFS: giant bitmap in readdir (len 0x%x)\n", len);
+			goto err_unmap;
+		}
+		if (p + len + 1 > end)
+			goto short_pkt;
+		attrlen = 0;
+		for (i = 0; i < len; i++) {
+			word = ntohl(*p++);
+			if (!word)
+				continue;
+			else if (i == 0 && word == FATTR4_WORD0_FILEID) {
+				attrlen = 8;
+				continue;
 			}
-			p += XDR_QUADLEN(attrlen);
-			if (p + 1 > end)
-				goto short_pkt;
+			printk(KERN_WARNING "NFS: unexpected bitmap word in readdir (0x%x)\n", word);
+			goto err_unmap;
 		}
-		kunmap(page);
-	}
-	
+		if (ntohl(*p++) != attrlen) {
+			printk(KERN_WARNING "NFS: unexpected attrlen in readdir\n");
+			goto err_unmap;
+		}
+		p += XDR_QUADLEN(attrlen);
+		if (p + 1 > end)
+			goto short_pkt;
+	}
+	if (!nr && (entry[0] != 0 || entry[1] == 0))
+		goto short_pkt;
+out:	
+	kunmap(page);
 	return 0;
 short_pkt:
-	printk(KERN_NOTICE "NFS: short packet in readdir reply!\n");
-	/* truncate listing */
-	kunmap(page);
 	entry[0] = entry[1] = 0;
-	return 0;
+	/* truncate listing ? */
+	if (!nr) {
+		printk(KERN_NOTICE "NFS: readdir reply truncated!\n");
+		entry[1] = 1;
+	}
+	goto out;
 err_unmap:
 	kunmap(page);
 	return -errno_NFSERR_IO;
 }
 
 static int
-decode_readlink(struct xdr_stream *xdr, int nfserr, struct rpc_rqst *req, struct nfs4_readlink *readlink)
+decode_readlink(struct xdr_stream *xdr, struct rpc_rqst *req, struct nfs4_readlink *readlink)
 {
 	struct xdr_buf *rcvbuf = &req->rq_rcv_buf;
+	struct iovec *iov = rcvbuf->head;
 	uint32_t *strlen;
-	uint32_t len;
+	unsigned int hdrlen, len;
 	char *string;
+	int status;
 
-	if (!nfserr) {
-		/*
-		 * The XDR encode routine has set things up so that
-		 * the link text will be copied directly into the
-		 * buffer.  We just have to do overflow-checking,
-		 * and and null-terminate the text (the VFS expects
-		 * null-termination).
-		 */
-		strlen = (uint32_t *) kmap(rcvbuf->pages[0]);
-		len = ntohl(*strlen);
-		if (len > PAGE_CACHE_SIZE - 5) {
-			printk(KERN_WARNING "nfs: server returned giant symlink!\n");
-			kunmap(rcvbuf->pages[0]);
-			return -EIO;
-		}
-		*strlen = len;
-		
-		string = (char *)(strlen + 1);
-		string[len] = '\0';
+	status = decode_op_hdr(xdr, OP_READLINK);
+	if (status)
+		return status;
+
+	hdrlen = (char *) xdr->p - (char *) iov->iov_base;
+	if (iov->iov_len > hdrlen) {
+		dprintk("NFS: READLINK header is short. iovec will be shifted.\n");
+		xdr_shift_buf(rcvbuf, iov->iov_len - hdrlen);
+
+	}
+	/*
+	 * The XDR encode routine has set things up so that
+	 * the link text will be copied directly into the
+	 * buffer.  We just have to do overflow-checking,
+	 * and and null-terminate the text (the VFS expects
+	 * null-termination).
+	 */
+	strlen = (uint32_t *) kmap(rcvbuf->pages[0]);
+	len = ntohl(*strlen);
+	if (len > PAGE_CACHE_SIZE - 5) {
+		printk(KERN_WARNING "nfs: server returned giant symlink!\n");
 		kunmap(rcvbuf->pages[0]);
+		return -EIO;
 	}
+	*strlen = len;
+
+	string = (char *)(strlen + 1);
+	string[len] = '\0';
+	kunmap(rcvbuf->pages[0]);
 	return 0;
 }
 
 static int
-decode_remove(struct xdr_stream *xdr, int nfserr, struct nfs4_remove *remove)
+decode_restorefh(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_RESTOREFH);
+}
+
+static int
+decode_remove(struct xdr_stream *xdr, struct nfs4_remove *remove)
 {
 	int status;
 
-	status = 0;
-	if (!nfserr) 
-		status = decode_change_info(xdr, remove->rm_cinfo);
+	status = decode_op_hdr(xdr, OP_REMOVE);
+	if (status)
+		goto out;
+	status = decode_change_info(xdr, remove->rm_cinfo);
+out:
 	return status;
 }
 
 static int
-decode_rename(struct xdr_stream *xdr, int nfserr, struct nfs4_rename *rename)
+decode_rename(struct xdr_stream *xdr, struct nfs4_rename *rename)
 {
-	int status = 0;
+	int status;
 
-	if (!nfserr) {
-		if ((status = decode_change_info(xdr, rename->rn_src_cinfo)))
-			goto out;
-		if ((status = decode_change_info(xdr, rename->rn_dst_cinfo)))
-			goto out;
-	}
+	status = decode_op_hdr(xdr, OP_RENAME);
+	if (status)
+		goto out;
+	if ((status = decode_change_info(xdr, rename->rn_src_cinfo)))
+		goto out;
+	if ((status = decode_change_info(xdr, rename->rn_dst_cinfo)))
+		goto out;
 out:
 	return status;
 }
 
 static int
+decode_renew(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_RENEW);
+}
+
+static int
+decode_savefh(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_SAVEFH);
+}
+
+static int
 decode_setattr(struct xdr_stream *xdr)
 {
 	uint32_t *p;
-        uint32_t bmlen;
+	uint32_t bmlen;
 	int status;
-        
-        READ_BUF(4);
-        READ32(bmlen);
-        if (bmlen > 10)
-                goto xdr_error;
-        READ_BUF(bmlen << 2);
 
-        DECODE_TAIL;
+        
+	status = decode_op_hdr(xdr, OP_SETATTR);
+	if (status)
+		return status;
+	READ_BUF(4);
+	READ32(bmlen);
+	READ_BUF(bmlen << 2);
+	return 0;
 }
 
 static int
-decode_setclientid(struct xdr_stream *xdr, int nfserr, struct nfs4_setclientid *setclientid)
+decode_setclientid(struct xdr_stream *xdr, struct nfs4_setclientid *setclientid)
 {
 	uint32_t *p;
+	uint32_t opnum;
+	int32_t nfserr;
 
-	if (!nfserr) {
+	READ_BUF(8);
+	READ32(opnum);
+	if (opnum != OP_SETCLIENTID) {
+		printk(KERN_NOTICE
+				"nfs4_decode_setclientid: Server returned operation"
+			       	" %d\n", opnum);
+		return -EIO;
+	}
+	READ32(nfserr);
+	if (nfserr == NFS_OK) {
 		READ_BUF(8 + sizeof(nfs4_verifier));
 		READ64(setclientid->sc_state->cl_clientid);
 		COPYMEM(setclientid->sc_state->cl_confirm, sizeof(nfs4_verifier));
-	}
-	else if (nfserr == NFSERR_CLID_INUSE) {
+	} else if (nfserr == NFSERR_CLID_INUSE) {
 		uint32_t len;
 
 		/* skip netid string */
@@ -1463,156 +1633,146 @@
 		READ_BUF(4);
 		READ32(len);
 		READ_BUF(len);
-	}
+		return -EEXIST;
+	} else
+		return -nfs_stat_to_errno(nfserr);
 
 	return 0;
 }
 
 static int
-decode_write(struct xdr_stream *xdr, int nfserr, struct nfs4_write *write)
+decode_setclientid_confirm(struct xdr_stream *xdr)
+{
+	return decode_op_hdr(xdr, OP_SETCLIENTID_CONFIRM);
+}
+
+static int
+decode_write(struct xdr_stream *xdr, struct nfs4_write *write)
 {
 	uint32_t *p;
 	int status;
 
-	if (!nfserr) {
-		READ_BUF(16);
-		READ32(*write->wr_bytes_written);
-		if (*write->wr_bytes_written > write->wr_len)
-			goto xdr_error;
-		READ32(write->wr_verf->committed);
-		COPYMEM(write->wr_verf->verifier, 8);
-	}
+	status = decode_op_hdr(xdr, OP_WRITE);
+	if (status)
+		return status;
 
-	DECODE_TAIL;
+	READ_BUF(16);
+	READ32(*write->wr_bytes_written);
+	if (*write->wr_bytes_written > write->wr_len)
+		return -EIO;
+	READ32(write->wr_verf->committed);
+	COPYMEM(write->wr_verf->verifier, 8);
+	return 0;
 }
 
 /* FIXME: this sucks */
 static int
 decode_compound(struct xdr_stream *xdr, struct nfs4_compound *cp, struct rpc_rqst *req)
 {
-	uint32_t *p;
-	uint32_t taglen;
-	uint32_t opnum, nfserr;
+	struct compound_hdr hdr;
+	struct nfs4_op *op;
 	int status;
 
-	READ_BUF(8);
-	READ32(cp->toplevel_status);
-	READ32(taglen);
+	status = decode_compound_hdr(xdr, &hdr);
+	if (status)
+		goto out;
+
+	cp->toplevel_status = hdr.status;
 
 	/*
 	 * We need this if our zero-copy I/O is going to work.  Rumor has
 	 * it that the spec will soon mandate it...
 	 */
-	if (taglen != cp->taglen)
+	if (hdr.taglen != cp->taglen)
 		dprintk("nfs4: non-conforming server returns tag length mismatch!\n");
 
-	READ_BUF(taglen + 4);
-	p += XDR_QUADLEN(taglen);
-	READ32(cp->resp_nops);
-	if (cp->resp_nops > cp->req_nops) {
+	cp->resp_nops = hdr.nops;
+	if (hdr.nops > cp->req_nops) {
 		dprintk("nfs4: resp_nops > req_nops!\n");
 		goto xdr_error;
 	}
 
-	for (cp->nops = 0; cp->nops < cp->resp_nops; cp->nops++) {
-		READ_BUF(8);
-		READ32(opnum);
-		if (opnum != cp->ops[cp->nops].opnum) {
-			dprintk("nfs4: operation mismatch!\n");
-			goto xdr_error;
-		}
-		READ32(nfserr);
-		if (cp->nops == cp->resp_nops - 1) {
-			if (nfserr != cp->toplevel_status) {
-				dprintk("nfs4: status mismatch!\n");
-				goto xdr_error;
-			}
-		}
-		else if (nfserr) {
-			dprintk("nfs4: intermediate status nonzero!\n");
-			goto xdr_error;
-		}
-		cp->ops[cp->nops].nfserr = nfserr;
-
-		switch (opnum) {
+	op = &cp->ops[0];
+	for (cp->nops = 0; cp->nops < cp->resp_nops; cp->nops++, op++) {
+		switch (op->opnum) {
 		case OP_ACCESS:
-			status = decode_access(xdr, nfserr, &cp->ops[cp->nops].u.access);
+			status = decode_access(xdr, &op->u.access);
 			break;
 		case OP_CLOSE:
-			status = decode_close(xdr, nfserr, &cp->ops[cp->nops].u.close);
+			status = decode_close(xdr, &op->u.close);
 			break;
 		case OP_COMMIT:
-			status = decode_commit(xdr, nfserr, &cp->ops[cp->nops].u.commit);
+			status = decode_commit(xdr, &op->u.commit);
 			break;
 		case OP_CREATE:
-			status = decode_create(xdr, nfserr, &cp->ops[cp->nops].u.create);
+			status = decode_create(xdr, &op->u.create);
 			break;
 		case OP_GETATTR:
-			status = decode_getattr(xdr, nfserr, &cp->ops[cp->nops].u.getattr);
+			status = decode_getattr(xdr, &op->u.getattr);
 			break;
 		case OP_GETFH:
-			status = decode_getfh(xdr, nfserr, &cp->ops[cp->nops].u.getfh);
+			status = decode_getfh(xdr, &op->u.getfh);
 			break;
 		case OP_LINK:
-			status = decode_link(xdr, nfserr, &cp->ops[cp->nops].u.link);
+			status = decode_link(xdr, &op->u.link);
 			break;
 		case OP_LOOKUP:
-			status = 0;
+			status = decode_lookup(xdr);
 			break;
 		case OP_OPEN:
-			status = decode_open(xdr, nfserr, &cp->ops[cp->nops].u.open);
+			status = decode_open(xdr, &op->u.open);
 			break;
 		case OP_OPEN_CONFIRM:
-			status = decode_open_confirm(xdr, nfserr, &cp->ops[cp->nops].u.open_confirm);
+			status = decode_open_confirm(xdr, &op->u.open_confirm);
 			break;
 		case OP_PUTFH:
-			status = 0;
+			status = decode_putfh(xdr);
 			break;
 		case OP_PUTROOTFH:
-			status = 0;
+			status = decode_putrootfh(xdr);
 			break;
 		case OP_READ:
-			status = decode_read(xdr, nfserr, &cp->ops[cp->nops].u.read);
+			status = decode_read(xdr, req, &op->u.read);
 			break;
 		case OP_READDIR:
-			status = decode_readdir(xdr, nfserr, req, &cp->ops[cp->nops].u.readdir);
+			status = decode_readdir(xdr, req, &op->u.readdir);
 			break;
 		case OP_READLINK:
-			status = decode_readlink(xdr, nfserr, req, &cp->ops[cp->nops].u.readlink);
+			status = decode_readlink(xdr, req, &op->u.readlink);
 			break;
 		case OP_RESTOREFH:
-			status = 0;
+			status = decode_restorefh(xdr);
 			break;
 		case OP_REMOVE:
-			status = decode_remove(xdr, nfserr, &cp->ops[cp->nops].u.remove);
+			status = decode_remove(xdr, &op->u.remove);
 			break;
 		case OP_RENAME:
-			status = decode_rename(xdr, nfserr, &cp->ops[cp->nops].u.rename);
+			status = decode_rename(xdr, &op->u.rename);
 			break;
 		case OP_RENEW:
-			status = 0;
+			status = decode_renew(xdr);
 			break;
 		case OP_SAVEFH:
-			status = 0;
+			status = decode_savefh(xdr);
 			break;
 		case OP_SETATTR:
 			status = decode_setattr(xdr);
 			break;
 		case OP_SETCLIENTID:
-			status = decode_setclientid(xdr, nfserr, &cp->ops[cp->nops].u.setclientid);
+			status = decode_setclientid(xdr, &op->u.setclientid);
 			break;
 		case OP_SETCLIENTID_CONFIRM:
-			status = 0;
+			status = decode_setclientid_confirm(xdr);
 			break;
 		case OP_WRITE:
-			status = decode_write(xdr, nfserr, &cp->ops[cp->nops].u.write);
+			status = decode_write(xdr, &op->u.write);
 			break;
 		default:
 			BUG();
 			return -EIO;
 		}
 		if (status)
-			goto xdr_error;
+			break;
 	}
 
 	DECODE_TAIL;
@@ -1685,15 +1845,15 @@
 #endif
 
 #define PROC(proc, argtype, restype)				\
-[NFSPROC4_##proc] = {						\
-	.p_proc   = NFSPROC4_##proc,				\
+[NFSPROC4_CLNT_##proc] = {						\
+	.p_proc   = NFSPROC4_COMPOUND,				\
 	.p_encode = (kxdrproc_t) nfs4_xdr_##argtype,		\
 	.p_decode = (kxdrproc_t) nfs4_xdr_##restype,		\
 	.p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2,	\
     }
 
 struct rpc_procinfo	nfs4_procedures[] = {
-  PROC(COMPOUND,	enc_compound,	dec_compound)
+  PROC(COMPOUND,	enc_compound,	dec_compound),
 };
 
 struct rpc_version		nfs_version4 = {
diff -Nru a/fs/nfs/write.c b/fs/nfs/write.c
--- a/fs/nfs/write.c	Sun Dec 15 18:08:30 2002
+++ b/fs/nfs/write.c	Sun Dec 15 18:08:30 2002
@@ -240,7 +240,7 @@
  * Write an mmapped page to the server.
  */
 int
-nfs_writepage(struct page *page)
+nfs_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct inode *inode = page->mapping->host;
 	unsigned long end_index;
diff -Nru a/fs/nfsd/Makefile b/fs/nfsd/Makefile
--- a/fs/nfsd/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/nfsd/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 nfsd-$(CONFIG_NFSD_V3)	+= nfs3proc.o nfs3xdr.o
 nfsd-$(CONFIG_NFSD_V4)	+= nfs4proc.o nfs4xdr.o
 nfsd-objs		:= $(nfsd-y)
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/nls/Makefile b/fs/nls/Makefile
--- a/fs/nls/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/nls/Makefile	Sun Dec 15 18:08:28 2002
@@ -45,5 +45,3 @@
 obj-$(CONFIG_NLS_KOI8_U)	+= nls_koi8-u.o nls_koi8-ru.o
 obj-$(CONFIG_NLS_ABC)		+= nls_abc.o
 obj-$(CONFIG_NLS_UTF8)		+= nls_utf8.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ntfs/Makefile b/fs/ntfs/Makefile
--- a/fs/ntfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/ntfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -14,6 +14,3 @@
 ifeq ($(CONFIG_NTFS_RW),y)
 EXTRA_CFLAGS += -DNTFS_RW
 endif
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/ntfs/aops.c b/fs/ntfs/aops.c
--- a/fs/ntfs/aops.c	Sun Dec 15 18:08:31 2002
+++ b/fs/ntfs/aops.c	Sun Dec 15 18:08:31 2002
@@ -792,7 +792,7 @@
  *
  * Return 0 on success and -errno on error.
  */
-static int ntfs_writepage(struct page *page)
+static int ntfs_writepage(struct page *page, struct writeback_control *wbc)
 {
 	s64 attr_pos;
 	struct inode *vi;
diff -Nru a/fs/open.c b/fs/open.c
--- a/fs/open.c	Sun Dec 15 18:08:28 2002
+++ b/fs/open.c	Sun Dec 15 18:08:28 2002
@@ -29,7 +29,7 @@
 
 	if (sb) {
 		retval = -ENOSYS;
-		if (sb->s_op && sb->s_op->statfs) {
+		if (sb->s_op->statfs) {
 			memset(buf, 0, sizeof(struct statfs));
 			retval = security_sb_statfs(sb);
 			if (retval)
diff -Nru a/fs/openpromfs/Makefile b/fs/openpromfs/Makefile
--- a/fs/openpromfs/Makefile	Sun Dec 15 18:08:32 2002
+++ b/fs/openpromfs/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs.o
 
 openpromfs-objs := inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/partitions/Makefile b/fs/partitions/Makefile
--- a/fs/partitions/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/partitions/Makefile	Sun Dec 15 18:08:29 2002
@@ -18,6 +18,3 @@
 obj-$(CONFIG_ULTRIX_PARTITION) += ultrix.o
 obj-$(CONFIG_IBM_PARTITION) += ibm.o
 obj-$(CONFIG_EFI_PARTITION) += efi.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/fs/proc/Makefile b/fs/proc/Makefile
--- a/fs/proc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/proc/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 ifeq ($(CONFIG_PROC_DEVICETREE),y)
 proc-objs    += proc_devtree.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/qnx4/Makefile b/fs/qnx4/Makefile
--- a/fs/qnx4/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/qnx4/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_QNX4FS_FS) += qnx4.o
 
 qnx4-objs := inode.o dir.o namei.o file.o bitmap.o truncate.o fsync.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/qnx4/inode.c b/fs/qnx4/inode.c
--- a/fs/qnx4/inode.c	Sun Dec 15 18:08:32 2002
+++ b/fs/qnx4/inode.c	Sun Dec 15 18:08:32 2002
@@ -424,9 +424,9 @@
 	return;
 }
 
-static int qnx4_writepage(struct page *page)
+static int qnx4_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,qnx4_get_block);
+	return block_write_full_page(page,qnx4_get_block, wbc);
 }
 static int qnx4_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/ramfs/Makefile b/fs/ramfs/Makefile
--- a/fs/ramfs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/ramfs/Makefile	Sun Dec 15 18:08:33 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_RAMFS) += ramfs.o
 
 ramfs-objs := inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ramfs/inode.c b/fs/ramfs/inode.c
--- a/fs/ramfs/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/ramfs/inode.c	Sun Dec 15 18:08:29 2002
@@ -135,7 +135,6 @@
 
 static struct address_space_operations ramfs_aops = {
 	.readpage	= simple_readpage,
-	.writepage	= fail_writepage,
 	.prepare_write	= simple_prepare_write,
 	.commit_write	= simple_commit_write
 };
diff -Nru a/fs/readdir.c b/fs/readdir.c
--- a/fs/readdir.c	Sun Dec 15 18:08:29 2002
+++ b/fs/readdir.c	Sun Dec 15 18:08:29 2002
@@ -133,18 +133,26 @@
 	if (reclen > buf->count)
 		return -EINVAL;
 	dirent = buf->previous;
-	if (dirent)
-		__put_user(offset, &dirent->d_off);
+	if (dirent) {
+		if (__put_user(offset, &dirent->d_off))
+			goto efault;
+	}
 	dirent = buf->current_dir;
 	buf->previous = dirent;
-	__put_user(ino, &dirent->d_ino);
-	__put_user(reclen, &dirent->d_reclen);
-	copy_to_user(dirent->d_name, name, namlen);
-	__put_user(0, dirent->d_name + namlen);
+	if (__put_user(ino, &dirent->d_ino))
+		goto efault;
+	if (__put_user(reclen, &dirent->d_reclen))
+		goto efault;
+	if (copy_to_user(dirent->d_name, name, namlen))
+		goto efault;
+	if (__put_user(0, dirent->d_name + namlen))
+		goto efault;
 	((char *) dirent) += reclen;
 	buf->current_dir = dirent;
 	buf->count -= reclen;
 	return 0;
+efault:
+	return -EFAULT;
 }
 
 asmlinkage long sys_getdents(unsigned int fd, void * dirent, unsigned int count)
@@ -174,8 +182,10 @@
 	error = buf.error;
 	lastdirent = buf.previous;
 	if (lastdirent) {
-		put_user(file->f_pos, &lastdirent->d_off);
-		error = count - buf.count;
+		if (put_user(file->f_pos, &lastdirent->d_off))
+			error = -EFAULT;
+		else
+			error = count - buf.count;
 	}
 
 out_putf:
diff -Nru a/fs/reiserfs/Makefile b/fs/reiserfs/Makefile
--- a/fs/reiserfs/Makefile	Sun Dec 15 18:08:33 2002
+++ b/fs/reiserfs/Makefile	Sun Dec 15 18:08:33 2002
@@ -19,8 +19,6 @@
 EXTRA_CFLAGS := -O1
 endif
 
-include $(TOPDIR)/Rules.make
-
 TAGS:
 	etags *.c
 
diff -Nru a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
--- a/fs/reiserfs/dir.c	Sun Dec 15 18:08:29 2002
+++ b/fs/reiserfs/dir.c	Sun Dec 15 18:08:29 2002
@@ -18,9 +18,9 @@
 int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) ;
 
 struct file_operations reiserfs_dir_operations = {
-    read:	generic_read_dir,
-    readdir:	reiserfs_readdir,
-    fsync:	reiserfs_dir_fsync,
+    .read	= generic_read_dir,
+    .readdir	= reiserfs_readdir,
+    .fsync	= reiserfs_dir_fsync,
 };
 
 int reiserfs_dir_fsync(struct file *filp, struct dentry *dentry, int datasync) {
diff -Nru a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
--- a/fs/reiserfs/inode.c	Sun Dec 15 18:08:29 2002
+++ b/fs/reiserfs/inode.c	Sun Dec 15 18:08:29 2002
@@ -490,7 +490,7 @@
 	return reiserfs_new_unf_blocknrs2(th, inode, allocated_block_nr, path, block);
     }
 #endif
-    return reiserfs_new_unf_blocknrs (th, allocated_block_nr, path, block);
+    return reiserfs_new_unf_blocknrs (th, inode, allocated_block_nr, path, block);
 }
 
 int reiserfs_get_block (struct inode * inode, sector_t block,
@@ -1917,7 +1917,7 @@
     }
 }
 
-static int reiserfs_write_full_page(struct page *page) {
+static int reiserfs_write_full_page(struct page *page, struct writeback_control *wbc) {
     struct inode *inode = page->mapping->host ;
     unsigned long end_index = inode->i_size >> PAGE_CACHE_SHIFT ;
     unsigned last_offset = PAGE_CACHE_SIZE;
@@ -2018,11 +2018,11 @@
 }
 
 
-static int reiserfs_writepage (struct page * page)
+static int reiserfs_writepage (struct page * page, struct writeback_control *wbc)
 {
     struct inode *inode = page->mapping->host ;
     reiserfs_wait_on_write_block(inode->i_sb) ;
-    return reiserfs_write_full_page(page) ;
+    return reiserfs_write_full_page(page, wbc) ;
 }
 
 
@@ -2113,11 +2113,11 @@
 }
 
 struct address_space_operations reiserfs_address_space_operations = {
-    writepage: reiserfs_writepage,
-    readpage: reiserfs_readpage, 
-    releasepage: reiserfs_releasepage,
-    sync_page: block_sync_page,
-    prepare_write: reiserfs_prepare_write,
-    commit_write: reiserfs_commit_write,
-    bmap: reiserfs_aop_bmap
+    .writepage = reiserfs_writepage,
+    .readpage = reiserfs_readpage, 
+    .releasepage = reiserfs_releasepage,
+    .sync_page = block_sync_page,
+    .prepare_write = reiserfs_prepare_write,
+    .commit_write = reiserfs_commit_write,
+    .bmap = reiserfs_aop_bmap
 } ;
diff -Nru a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
--- a/fs/reiserfs/journal.c	Sun Dec 15 18:08:29 2002
+++ b/fs/reiserfs/journal.c	Sun Dec 15 18:08:29 2002
@@ -1812,8 +1812,7 @@
   struct reiserfs_journal_commit_task *ct = __ct;
   struct reiserfs_journal_list *jl ;
 
-  /* FIXMEL: is this needed? */
-  lock_kernel();
+  reiserfs_write_lock(ct->p_s_sb);
 
   jl = SB_JOURNAL_LIST(ct->p_s_sb) + ct->jindex ;
 
@@ -1824,7 +1823,7 @@
     kupdate_one_transaction(ct->p_s_sb, jl) ;
   }
   reiserfs_kfree(ct->self, sizeof(struct reiserfs_journal_commit_task), ct->p_s_sb) ;
-  unlock_kernel();
+  reiserfs_write_unlock(ct->p_s_sb);
 }
 
 static void setup_commit_task_arg(struct reiserfs_journal_commit_task *ct,
diff -Nru a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
--- a/fs/reiserfs/namei.c	Sun Dec 15 18:08:29 2002
+++ b/fs/reiserfs/namei.c	Sun Dec 15 18:08:29 2002
@@ -1296,14 +1296,14 @@
  */
 struct inode_operations reiserfs_dir_inode_operations = {
   //&reiserfs_dir_operations,	/* default_file_ops */
-    create:	reiserfs_create,
-    lookup:	reiserfs_lookup,
-    link:	reiserfs_link,
-    unlink:	reiserfs_unlink,
-    symlink:	reiserfs_symlink,
-    mkdir:	reiserfs_mkdir,
-    rmdir:	reiserfs_rmdir,
-    mknod:	reiserfs_mknod,
-    rename:	reiserfs_rename,
+    .create	= reiserfs_create,
+    .lookup	= reiserfs_lookup,
+    .link	= reiserfs_link,
+    .unlink	= reiserfs_unlink,
+    .symlink	= reiserfs_symlink,
+    .mkdir	= reiserfs_mkdir,
+    .rmdir	= reiserfs_rmdir,
+    .mknod	= reiserfs_mknod,
+    .rename	= reiserfs_rename,
 };
 
diff -Nru a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
--- a/fs/reiserfs/procfs.c	Sun Dec 15 18:08:28 2002
+++ b/fs/reiserfs/procfs.c	Sun Dec 15 18:08:28 2002
@@ -78,7 +78,7 @@
 	struct super_block *sb;
 	char *format;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	if ( REISERFS_SB(sb)->s_properties & (1 << REISERFS_3_6) ) {
@@ -136,7 +136,7 @@
 	struct reiserfs_sb_info *r;
 	int len = 0;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	r = REISERFS_SB(sb);
@@ -229,7 +229,7 @@
 	int len = 0;
 	int level;
 	
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	r = REISERFS_SB(sb);
@@ -308,7 +308,7 @@
 	struct reiserfs_sb_info *r;
 	int len = 0;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	r = REISERFS_SB(sb);
@@ -352,7 +352,7 @@
 	int hash_code;
 	int len = 0;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = REISERFS_SB(sb);
@@ -409,7 +409,7 @@
 	int len = 0;
 	int exact;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	sb_info = REISERFS_SB(sb);
@@ -461,7 +461,7 @@
 	struct journal_params *jp;	
 	int len = 0;
     
-	sb = procinfo_prologue((dev_t)data);
+	sb = procinfo_prologue((int)data);
 	if( sb == NULL )
 		return -ENOENT;
 	r = REISERFS_SB(sb);
@@ -604,7 +604,7 @@
 {
 	return ( REISERFS_SB(sb)->procdir ) ? create_proc_read_entry
 		( name, 0, REISERFS_SB(sb)->procdir, func, 
-		  ( void * ) sb->s_bdev->bd_dev) : NULL;
+		  ( void * )(int) sb->s_bdev->bd_dev) : NULL;
 }
 
 void reiserfs_proc_unregister( struct super_block *sb, const char *name )
diff -Nru a/fs/reiserfs/super.c b/fs/reiserfs/super.c
--- a/fs/reiserfs/super.c	Sun Dec 15 18:08:29 2002
+++ b/fs/reiserfs/super.c	Sun Dec 15 18:08:29 2002
@@ -474,25 +474,25 @@
 
 struct super_operations reiserfs_sops = 
 {
-  alloc_inode: reiserfs_alloc_inode,
-  destroy_inode: reiserfs_destroy_inode,
-  write_inode: reiserfs_write_inode,
-  dirty_inode: reiserfs_dirty_inode,
-  delete_inode: reiserfs_delete_inode,
-  put_super: reiserfs_put_super,
-  write_super: reiserfs_write_super,
-  write_super_lockfs: reiserfs_write_super_lockfs,
-  unlockfs: reiserfs_unlockfs,
-  statfs: reiserfs_statfs,
-  remount_fs: reiserfs_remount,
+  .alloc_inode = reiserfs_alloc_inode,
+  .destroy_inode = reiserfs_destroy_inode,
+  .write_inode = reiserfs_write_inode,
+  .dirty_inode = reiserfs_dirty_inode,
+  .delete_inode = reiserfs_delete_inode,
+  .put_super = reiserfs_put_super,
+  .write_super = reiserfs_write_super,
+  .write_super_lockfs = reiserfs_write_super_lockfs,
+  .unlockfs = reiserfs_unlockfs,
+  .statfs = reiserfs_statfs,
+  .remount_fs = reiserfs_remount,
 
 };
 
 static struct export_operations reiserfs_export_ops = {
-  encode_fh: reiserfs_encode_fh,
-  decode_fh: reiserfs_decode_fh,
-  get_parent: reiserfs_get_parent,
-  get_dentry: reiserfs_get_dentry,
+  .encode_fh = reiserfs_encode_fh,
+  .decode_fh = reiserfs_decode_fh,
+  .get_parent = reiserfs_get_parent,
+  .get_dentry = reiserfs_get_dentry,
 } ;
 
 /* this struct is used in reiserfs_getopt () for containing the value for those
@@ -716,7 +716,7 @@
   }
 
   if (*mount_flags & MS_RDONLY) {
-    /* remount rean-only */
+    /* remount read-only */
     if (s->s_flags & MS_RDONLY)
       /* it is read-only already */
       return 0;
@@ -732,6 +732,10 @@
     journal_mark_dirty(&th, s, SB_BUFFER_WITH_SB (s));
     s->s_dirt = 0;
   } else {
+    /* remount read-write */
+    if (!(s->s_flags & MS_RDONLY))
+	return 0; /* We are read-write already */
+
     REISERFS_SB(s)->s_mount_state = sb_umount_state(rs) ;
     s->s_flags &= ~MS_RDONLY ; /* now it is safe to call journal_begin */
     journal_begin(&th, s, 10) ;
diff -Nru a/fs/romfs/Makefile b/fs/romfs/Makefile
--- a/fs/romfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/romfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_ROMFS_FS) += romfs.o
 
 romfs-objs := inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/smbfs/Makefile b/fs/smbfs/Makefile
--- a/fs/smbfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/smbfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -17,8 +17,6 @@
 #EXTRA_CFLAGS += -DDEBUG_SMB_TIMESTAMP
 #EXTRA_CFLAGS += -Werror
 
-include $(TOPDIR)/Rules.make
-
 #
 # Maintainer rules
 #
diff -Nru a/fs/smbfs/file.c b/fs/smbfs/file.c
--- a/fs/smbfs/file.c	Sun Dec 15 18:08:32 2002
+++ b/fs/smbfs/file.c	Sun Dec 15 18:08:32 2002
@@ -170,7 +170,7 @@
  * We are called with the page locked and we unlock it when done.
  */
 static int
-smb_writepage(struct page *page)
+smb_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct address_space *mapping = page->mapping;
 	struct inode *inode;
diff -Nru a/fs/super.c b/fs/super.c
--- a/fs/super.c	Sun Dec 15 18:08:29 2002
+++ b/fs/super.c	Sun Dec 15 18:08:29 2002
@@ -49,6 +49,8 @@
 static struct super_block *alloc_super(void)
 {
 	struct super_block *s = kmalloc(sizeof(struct super_block),  GFP_USER);
+	static struct super_operations default_op;
+
 	if (s) {
 		memset(s, 0, sizeof(struct super_block));
 		if (security_sb_alloc(s)) {
@@ -72,6 +74,7 @@
 		s->s_maxbytes = MAX_NON_LFS;
 		s->dq_op = sb_dquot_ops;
 		s->s_qcop = sb_quotactl_ops;
+		s->s_op = &default_op;
 	}
 out:
 	return s;
@@ -186,12 +189,13 @@
 		sb->s_flags &= ~MS_ACTIVE;
 		/* bad name - it should be evict_inodes() */
 		invalidate_inodes(sb);
-		if (sop) {
-			if (sop->write_super && sb->s_dirt)
-				sop->write_super(sb);
-			if (sop->put_super)
-				sop->put_super(sb);
-		}
+
+		if (sop->write_super && sb->s_dirt)
+			sop->write_super(sb);
+		if (sop->sync_fs)
+			sop->sync_fs(sb, 1);
+		if (sop->put_super)
+			sop->put_super(sb);
 
 		/* Forget any remaining inodes */
 		if (invalidate_inodes(sb)) {
@@ -267,7 +271,7 @@
 {
 	lock_super(sb);
 	if (sb->s_root && sb->s_dirt)
-		if (sb->s_op && sb->s_op->write_super)
+		if (sb->s_op->write_super)
 			sb->s_op->write_super(sb);
 	unlock_super(sb);
 }
@@ -296,6 +300,44 @@
 	spin_unlock(&sb_lock);
 }
 
+/*
+ * Call the ->sync_fs super_op against all filesytems which are r/w and
+ * which implement it.
+ */
+void sync_filesystems(int wait)
+{
+	struct super_block * sb;
+
+	spin_lock(&sb_lock);
+	for (sb = sb_entry(super_blocks.next); sb != sb_entry(&super_blocks);
+			sb = sb_entry(sb->s_list.next)) {
+		if (!sb->s_op->sync_fs);
+			continue;
+		if (sb->s_flags & MS_RDONLY)
+			continue;
+		sb->s_need_sync_fs = 1;
+	}
+	spin_unlock(&sb_lock);
+
+restart:
+	spin_lock(&sb_lock);
+	for (sb = sb_entry(super_blocks.next); sb != sb_entry(&super_blocks);
+			sb = sb_entry(sb->s_list.next)) {
+		if (!sb->s_need_sync_fs)
+			continue;
+		sb->s_need_sync_fs = 0;
+		if (sb->s_flags & MS_RDONLY)
+			continue;	/* hm.  Was remounted r/w meanwhile */
+		sb->s_count++;
+		spin_unlock(&sb_lock);
+		down_read(&sb->s_umount);
+		sb->s_op->sync_fs(sb, wait);
+		drop_super(sb);
+		goto restart;
+	}
+	spin_unlock(&sb_lock);
+}
+
 /**
  *	get_super	-	get the superblock of a device
  *	@dev: device to get the superblock for
@@ -396,7 +438,7 @@
 	if ((flags & MS_RDONLY) && !(sb->s_flags & MS_RDONLY))
 		if (!fs_may_remount_ro(sb))
 			return -EBUSY;
-	if (sb->s_op && sb->s_op->remount_fs) {
+	if (sb->s_op->remount_fs) {
 		lock_super(sb);
 		retval = sb->s_op->remount_fs(sb, &flags, data);
 		unlock_super(sb);
@@ -463,55 +505,25 @@
 	int flags, char *dev_name, void * data,
 	int (*fill_super)(struct super_block *, void *, int))
 {
-	struct inode *inode;
 	struct block_device *bdev;
-	struct super_block * s;
-	struct nameidata nd;
+	struct super_block *s;
 	int error = 0;
-	mode_t mode = FMODE_READ; /* we always need it ;-) */
 
-	/* What device it is? */
-	if (!dev_name || !*dev_name)
-		return ERR_PTR(-EINVAL);
-	error = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
-	if (error)
-		return ERR_PTR(error);
-	inode = nd.dentry->d_inode;
-	error = -ENOTBLK;
-	if (!S_ISBLK(inode->i_mode))
-		goto out;
-	error = -EACCES;
-	if (nd.mnt->mnt_flags & MNT_NODEV)
-		goto out;
-	error = bd_acquire(inode);
-	if (error)
-		goto out;
-	bdev = inode->i_bdev;
-	/* Done with lookups, semaphore down */
-	if (!(flags & MS_RDONLY))
-		mode |= FMODE_WRITE;
-	error = blkdev_get(bdev, mode, 0, BDEV_FS);
-	if (error)
-		goto out;
-	error = -EACCES;
-	if (!(flags & MS_RDONLY) && bdev_read_only(bdev))
-		goto out1;
-	error = bd_claim(bdev, fs_type);
-	if (error)
-		goto out1;
+	bdev = open_bdev_excl(dev_name, flags, BDEV_FS, fs_type);
+	if (IS_ERR(bdev))
+		return (struct super_block *)bdev;
 
 	s = sget(fs_type, test_bdev_super, set_bdev_super, bdev);
-	if (IS_ERR(s)) {
-		bd_release(bdev);
-		blkdev_put(bdev, BDEV_FS);
-	} else if (s->s_root) {
+	if (IS_ERR(s))
+		goto out;
+
+	if (s->s_root) {
 		if ((flags ^ s->s_flags) & MS_RDONLY) {
 			up_write(&s->s_umount);
 			deactivate_super(s);
 			s = ERR_PTR(-EBUSY);
 		}
-		bd_release(bdev);
-		blkdev_put(bdev, BDEV_FS);
+		goto out;
 	} else {
 		s->s_flags = flags;
 		strncpy(s->s_id, bdevname(bdev), sizeof(s->s_id));
@@ -525,14 +537,12 @@
 		} else
 			s->s_flags |= MS_ACTIVE;
 	}
-	path_release(&nd);
+
 	return s;
 
-out1:
-	blkdev_put(bdev, BDEV_FS);
 out:
-	path_release(&nd);
-	return ERR_PTR(error);
+	close_bdev_excl(bdev, BDEV_FS);
+	return s;
 }
 
 void kill_block_super(struct super_block *sb)
@@ -540,8 +550,7 @@
 	struct block_device *bdev = sb->s_bdev;
 	generic_shutdown_super(sb);
 	set_blocksize(bdev, sb->s_old_blocksize);
-	bd_release(bdev);
-	blkdev_put(bdev, BDEV_FS);
+	close_bdev_excl(bdev, BDEV_FS);
 }
 
 struct super_block *get_sb_nodev(struct file_system_type *fs_type,
diff -Nru a/fs/sysfs/Makefile b/fs/sysfs/Makefile
--- a/fs/sysfs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/sysfs/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 export-objs	:= inode.o
 
 obj-y		:= inode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/sysfs/inode.c b/fs/sysfs/inode.c
--- a/fs/sysfs/inode.c	Sun Dec 15 18:08:31 2002
+++ b/fs/sysfs/inode.c	Sun Dec 15 18:08:31 2002
@@ -382,7 +382,6 @@
 
 static struct address_space_operations sysfs_aops = {
 	.readpage	= simple_readpage,
-	.writepage	= fail_writepage,
 	.prepare_write	= simple_prepare_write,
 	.commit_write	= simple_commit_write
 };
diff -Nru a/fs/sysv/Makefile b/fs/sysv/Makefile
--- a/fs/sysv/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/sysv/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 
 sysv-objs := ialloc.o balloc.o inode.o itree.o file.o dir.o \
 	     namei.o super.o symlink.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/sysv/itree.c b/fs/sysv/itree.c
--- a/fs/sysv/itree.c	Sun Dec 15 18:08:28 2002
+++ b/fs/sysv/itree.c	Sun Dec 15 18:08:28 2002
@@ -449,9 +449,9 @@
 	return 0;
 }
 
-static int sysv_writepage(struct page *page)
+static int sysv_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,get_block);
+	return block_write_full_page(page,get_block,wbc);
 }
 static int sysv_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/udf/Makefile b/fs/udf/Makefile
--- a/fs/udf/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/udf/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 udf-objs     := balloc.o dir.o file.o ialloc.o inode.o lowlevel.o namei.o \
 		partition.o super.o truncate.o symlink.o fsync.o \
 		crc.o directory.o misc.o udftime.o unicode.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/udf/file.c b/fs/udf/file.c
--- a/fs/udf/file.c	Sun Dec 15 18:08:29 2002
+++ b/fs/udf/file.c	Sun Dec 15 18:08:29 2002
@@ -62,7 +62,7 @@
 	return 0;
 }
 
-static int udf_adinicb_writepage(struct page *page)
+static int udf_adinicb_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct inode *inode = page->mapping->host;
 	char *kaddr;
diff -Nru a/fs/udf/inode.c b/fs/udf/inode.c
--- a/fs/udf/inode.c	Sun Dec 15 18:08:33 2002
+++ b/fs/udf/inode.c	Sun Dec 15 18:08:33 2002
@@ -39,6 +39,7 @@
 #include <linux/module.h>
 #include <linux/pagemap.h>
 #include <linux/buffer_head.h>
+#include <linux/writeback.h>
 #include <linux/slab.h>
 
 #include "udf_i.h"
@@ -137,9 +138,9 @@
 	}
 }
 
-static int udf_writepage(struct page *page)
+static int udf_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page, udf_get_block);
+	return block_write_full_page(page, udf_get_block, wbc);
 }
 
 static int udf_readpage(struct file *file, struct page *page)
@@ -170,6 +171,10 @@
 {
 	struct page *page;
 	char *kaddr;
+	struct writeback_control udf_wbc = {
+		.sync_mode = WB_SYNC_NONE,
+		.nr_to_write = 1,
+	};
 
 	/* from now on we have normal address_space methods */
 	inode->i_data.a_ops = &udf_aops;
@@ -206,8 +211,7 @@
 	else
 		UDF_I_ALLOCTYPE(inode) = ICBTAG_FLAG_AD_LONG;
 
-	if (inode->i_data.a_ops->writepage(page) == -EAGAIN)
-		__set_page_dirty_nobuffers(page);
+	inode->i_data.a_ops->writepage(page, &udf_wbc);
 	page_cache_release(page);
 
 	mark_inode_dirty(inode);
diff -Nru a/fs/ufs/Makefile b/fs/ufs/Makefile
--- a/fs/ufs/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/ufs/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 
 ufs-objs := balloc.o cylinder.o dir.o file.o ialloc.o inode.o \
 	    namei.o super.o symlink.o truncate.o util.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/ufs/inode.c b/fs/ufs/inode.c
--- a/fs/ufs/inode.c	Sun Dec 15 18:08:28 2002
+++ b/fs/ufs/inode.c	Sun Dec 15 18:08:28 2002
@@ -445,9 +445,9 @@
 	return NULL;
 }
 
-static int ufs_writepage(struct page *page)
+static int ufs_writepage(struct page *page, struct writeback_control *wbc)
 {
-	return block_write_full_page(page,ufs_getfrag_block);
+	return block_write_full_page(page,ufs_getfrag_block,wbc);
 }
 static int ufs_readpage(struct file *file, struct page *page)
 {
diff -Nru a/fs/umsdos/Makefile b/fs/umsdos/Makefile
--- a/fs/umsdos/Makefile	Sun Dec 15 18:08:28 2002
+++ b/fs/umsdos/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,8 +6,6 @@
 
 umsdos-objs := dir.o  inode.o ioctl.o mangle.o namei.o rdir.o emd.o
 
-include $(TOPDIR)/Rules.make
-
 p:
 	proto *.c >/usr/include/linux/umsdos_fs.p
 
diff -Nru a/fs/vfat/Makefile b/fs/vfat/Makefile
--- a/fs/vfat/Makefile	Sun Dec 15 18:08:31 2002
+++ b/fs/vfat/Makefile	Sun Dec 15 18:08:31 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_VFAT_FS) += vfat.o
 
 vfat-objs := namei.o vfatfs_syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/xfs/Makefile b/fs/xfs/Makefile
--- a/fs/xfs/Makefile	Sun Dec 15 18:08:29 2002
+++ b/fs/xfs/Makefile	Sun Dec 15 18:08:29 2002
@@ -157,5 +157,3 @@
 endif
 
 CFLAGS_xfsidbg.o += -Iarch/$(ARCH)/kdb
-
-include $(TOPDIR)/Rules.make
diff -Nru a/fs/xfs/linux/xfs_aops.c b/fs/xfs/linux/xfs_aops.c
--- a/fs/xfs/linux/xfs_aops.c	Sun Dec 15 18:08:32 2002
+++ b/fs/xfs/linux/xfs_aops.c	Sun Dec 15 18:08:32 2002
@@ -691,7 +691,8 @@
 
 STATIC int
 linvfs_writepage(
-	struct page		*page)
+	struct page		*page,
+	struct writeback_control *wbc)
 {
 	int			error;
 	int			need_trans = 1;
diff -Nru a/fs/xfs/linux/xfs_linux.h b/fs/xfs/linux/xfs_linux.h
--- a/fs/xfs/linux/xfs_linux.h	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/linux/xfs_linux.h	Sun Dec 15 18:08:28 2002
@@ -42,7 +42,6 @@
 #include <linux/sched.h>
 #include <linux/bitops.h>
 #include <linux/major.h>
-#include <linux/root_dev.h>
 
 #include <asm/page.h>
 #include <asm/div64.h>
diff -Nru a/fs/xfs/linux/xfs_lrw.c b/fs/xfs/linux/xfs_lrw.c
--- a/fs/xfs/linux/xfs_lrw.c	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/linux/xfs_lrw.c	Sun Dec 15 18:08:28 2002
@@ -215,54 +215,46 @@
 	void			*target,
 	cred_t			*credp)
 {
-	size_t			size = 0;
 	ssize_t			ret;
 	xfs_fsize_t		n;
 	xfs_inode_t		*ip;
-	xfs_mount_t		*mp;
 	vnode_t			*vp;
+	int			invisible = (filp->f_mode & FINVIS);
 
 	ip = XFS_BHVTOI(bdp);
 	vp = BHV_TO_VNODE(bdp);
-	mp = ip->i_mount;
 	vn_trace_entry(vp, "xfs_sendfile", (inst_t *)__return_address);
 
 	XFS_STATS_INC(xfsstats.xs_read_calls);
 
 	n = XFS_MAX_FILE_OFFSET - *offp;
-	if ((n <= 0) || (size == 0))
+	if ((n <= 0) || (count == 0))
 		return 0;
 
-	if (n < size)
-		size = n;
+	if (n < count)
+		count = n;
 
-	if (XFS_FORCED_SHUTDOWN(mp)) {
+	if (XFS_FORCED_SHUTDOWN(ip->i_mount))
 		return -EIO;
-	}
 
 	xfs_ilock(ip, XFS_IOLOCK_SHARED);
-
-	if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) &&
-	    !(filp->f_mode & FINVIS)) {
-		int error;
+	if (DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && !invisible) {
 		vrwlock_t locktype = VRWLOCK_READ;
+		int error;
 
 		error = xfs_dm_send_data_event(DM_EVENT_READ, bdp, *offp,
-				size, FILP_DELAY_FLAG(filp), &locktype);
+				count, FILP_DELAY_FLAG(filp), &locktype);
 		if (error) {
 			xfs_iunlock(ip, XFS_IOLOCK_SHARED);
 			return -error;
 		}
 	}
-
 	ret = generic_file_sendfile(filp, offp, count, actor, target);
 	xfs_iunlock(ip, XFS_IOLOCK_SHARED);
 
 	XFS_STATS_ADD(xfsstats.xs_read_bytes, ret);
-
-	if (!(filp->f_mode & FINVIS))
+	if (!invisible)
 		xfs_ichgtime(ip, XFS_ICHGTIME_ACC);
-
 	return ret;
 }
 
diff -Nru a/fs/xfs/linux/xfs_lrw.h b/fs/xfs/linux/xfs_lrw.h
--- a/fs/xfs/linux/xfs_lrw.h	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/linux/xfs_lrw.h	Sun Dec 15 18:08:28 2002
@@ -58,6 +58,9 @@
 extern ssize_t xfs_write (struct bhv_desc *, struct file *,
 				const struct iovec *, unsigned long,
 				loff_t *, struct cred *);
+extern ssize_t xfs_sendfile (struct bhv_desc *, struct file *,
+				loff_t *, size_t, read_actor_t,
+				void *, struct cred *);
 
 extern int xfs_dev_is_read_only (struct xfs_mount *, char *);
 
diff -Nru a/fs/xfs/linux/xfs_super.c b/fs/xfs/linux/xfs_super.c
--- a/fs/xfs/linux/xfs_super.c	Sun Dec 15 18:08:32 2002
+++ b/fs/xfs/linux/xfs_super.c	Sun Dec 15 18:08:32 2002
@@ -468,27 +468,18 @@
 
 int
 xfs_blkdev_get(
+	xfs_mount_t		*mp,
 	const char		*name,
 	struct block_device	**bdevp)
 {
-	struct nameidata	nd;
-	int			error;
+	int			error = 0;
 
-	error = path_lookup(name, LOOKUP_FOLLOW, &nd);
-	if (error) {
+	*bdevp = open_bdev_excl(name, 0, BDEV_FS, mp);
+	if (IS_ERR(*bdevp)) {
+		error = PTR_ERR(*bdevp);
 		printk("XFS: Invalid device [%s], error=%d\n", name, error);
-		return -error;
-	}
-
-	/* I think we actually want bd_acquire here..  --hch */
-	*bdevp = bdget(kdev_t_to_nr(nd.dentry->d_inode->i_rdev));
-	if (*bdevp) {
-		error = blkdev_get(*bdevp, FMODE_READ|FMODE_WRITE, 0, BDEV_FS);
-	} else {
-		error = -ENOMEM;
 	}
 
-	path_release(&nd);
 	return -error;
 }
 
@@ -497,7 +488,7 @@
 	struct block_device	*bdev)
 {
 	if (bdev)
-		blkdev_put(bdev, BDEV_FS);
+		close_bdev_excl(bdev, BDEV_FS);
 }
 
 void
@@ -762,17 +753,6 @@
 }
 
 STATIC void
-linvfs_put_inode(
-	struct inode		*ip)
-{
-	vnode_t			*vp = LINVFS_GET_VP(ip);
-	int			error;
-
-	if (vp && vp->v_fbhv && (atomic_read(&ip->i_count) == 1))
-		VOP_RELEASE(vp, error);
-}
-
-STATIC void
 linvfs_put_super(
 	struct super_block	*sb)
 {
@@ -989,7 +969,6 @@
 	.alloc_inode		= linvfs_alloc_inode,
 	.destroy_inode		= linvfs_destroy_inode,
 	.write_inode		= linvfs_write_inode,
-	.put_inode		= linvfs_put_inode,
 	.clear_inode		= linvfs_clear_inode,
 	.put_super		= linvfs_put_super,
 	.write_super		= linvfs_write_super,
diff -Nru a/fs/xfs/linux/xfs_super.h b/fs/xfs/linux/xfs_super.h
--- a/fs/xfs/linux/xfs_super.h	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/linux/xfs_super.h	Sun Dec 15 18:08:28 2002
@@ -78,12 +78,14 @@
 #define LINVFS_SET_VFS(s, vfsp) \
 	((s)->s_fs_info = vfsp)
 
+struct xfs_mount;
 struct pb_target;
 struct block_device;
 
 extern void xfs_initialize_vnode (bhv_desc_t *, vnode_t *, bhv_desc_t *, int);
 
-extern int  xfs_blkdev_get (const char *, struct block_device **);
+extern int  xfs_blkdev_get (struct xfs_mount *, const char *,
+				struct block_device **);
 extern void xfs_blkdev_put (struct block_device *);
 
 extern struct pb_target *xfs_alloc_buftarg (struct block_device *);
diff -Nru a/fs/xfs/pagebuf/page_buf.c b/fs/xfs/pagebuf/page_buf.c
--- a/fs/xfs/pagebuf/page_buf.c	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/pagebuf/page_buf.c	Sun Dec 15 18:08:28 2002
@@ -104,7 +104,7 @@
 	pb_trace.buf[j].event = event;
 	pb_trace.buf[j].flags = pb->pb_flags;
 	pb_trace.buf[j].hold = pb->pb_hold.counter;
-	pb_trace.buf[j].lock_value = PBP(pb)->pb_sema.count.counter;
+	pb_trace.buf[j].lock_value = pb->pb_sema.count.counter;
 	pb_trace.buf[j].task = (void *)current;
 	pb_trace.buf[j].misc = misc;
 	pb_trace.buf[j].ra = ra;
@@ -118,7 +118,6 @@
  */
 
 STATIC kmem_cache_t *pagebuf_cache;
-STATIC pagebuf_daemon_t *pb_daemon;
 STATIC void pagebuf_daemon_wakeup(int);
 STATIC struct workqueue_struct *pagebuf_workqueue;
 
@@ -272,12 +271,12 @@
 	 */
 	flags &= ~(PBF_LOCK|PBF_MAPPED|PBF_DONT_BLOCK|PBF_READ_AHEAD);
 
-	memset(pb, 0, sizeof(page_buf_private_t));
+	memset(pb, 0, sizeof(page_buf_t));
 	atomic_set(&pb->pb_hold, 1);
 	init_MUTEX_LOCKED(&pb->pb_iodonesema);
 	INIT_LIST_HEAD(&pb->pb_list);
 	INIT_LIST_HEAD(&pb->pb_hash_list);
-	init_MUTEX_LOCKED(&PBP(pb)->pb_sema); /* held, no waiters */
+	init_MUTEX_LOCKED(&pb->pb_sema); /* held, no waiters */
 	PB_SET_OWNER(pb);
 	pb->pb_target = target;
 	pb->pb_file_offset = range_base;
@@ -289,8 +288,8 @@
 	pb->pb_buffer_length = pb->pb_count_desired = range_length;
 	pb->pb_flags = flags | PBF_NONE;
 	pb->pb_bn = PAGE_BUF_DADDR_NULL;
-	atomic_set(&PBP(pb)->pb_pin_count, 0);
-	init_waitqueue_head(&PBP(pb)->pb_waiters);
+	atomic_set(&pb->pb_pin_count, 0);
+	init_waitqueue_head(&pb->pb_waiters);
 
 	PB_STATS_INC(pbstats.pb_create);
 	PB_TRACE(pb, PB_TRACE_REC(get), target);
@@ -657,7 +656,7 @@
 	 * if this does not work then we need to drop the
 	 * spinlock and do a hard attempt on the semaphore.
 	 */
-	not_locked = down_trylock(&PBP(pb)->pb_sema);
+	not_locked = down_trylock(&pb->pb_sema);
 	if (not_locked) {
 		if (!(flags & PBF_TRYLOCK)) {
 			/* wait for buffer ownership */
@@ -788,28 +787,6 @@
 }
 
 /*
- * Create a pagebuf and populate it with pages from the address
- * space of the passed in inode.
- */
-page_buf_t *
-pagebuf_lookup(
-	struct pb_target	*target,
-	struct inode		*inode,
-	loff_t			ioff,
-	size_t			isize,
-	page_buf_flags_t	flags)
-{
-	page_buf_t		*pb = NULL;
-
-	flags |= _PBF_PRIVATE_BH;
-	pb = pagebuf_allocate(flags);
-	if (pb) {
-		_pagebuf_initialize(pb, target, ioff, isize, flags);
-	}
-	return pb;
-}
-
-/*
  * If we are not low on memory then do the readahead in a deadlock
  * safe manner.
  */
@@ -906,7 +883,7 @@
 	pb->pb_locked = 0;
 
 	pb->pb_count_desired = pb->pb_buffer_length = len;
-	pb->pb_flags |= PBF_MAPPED | _PBF_PRIVATE_BH;
+	pb->pb_flags |= PBF_MAPPED;
 
 	return 0;
 }
@@ -952,7 +929,7 @@
 	/* otherwise pagebuf_free just ignores it */
 	pb->pb_flags |= _PBF_MEM_ALLOCATED;
 	PB_CLEAR_OWNER(pb);
-	up(&PBP(pb)->pb_sema);	/* Return unlocked pagebuf */
+	up(&pb->pb_sema);	/* Return unlocked pagebuf */
 
 	PB_TRACE(pb, PB_TRACE_REC(no_daddr), rmem);
 
@@ -1070,8 +1047,8 @@
 pagebuf_pin(
 	page_buf_t		*pb)
 {
-	atomic_inc(&PBP(pb)->pb_pin_count);
-	PB_TRACE(pb, PB_TRACE_REC(pin), PBP(pb)->pb_pin_count.counter);
+	atomic_inc(&pb->pb_pin_count);
+	PB_TRACE(pb, PB_TRACE_REC(pin), pb->pb_pin_count.counter);
 }
 
 /*
@@ -1085,17 +1062,17 @@
 pagebuf_unpin(
 	page_buf_t		*pb)
 {
-	if (atomic_dec_and_test(&PBP(pb)->pb_pin_count)) {
-		wake_up_all(&PBP(pb)->pb_waiters);
+	if (atomic_dec_and_test(&pb->pb_pin_count)) {
+		wake_up_all(&pb->pb_waiters);
 	}
-	PB_TRACE(pb, PB_TRACE_REC(unpin), PBP(pb)->pb_pin_count.counter);
+	PB_TRACE(pb, PB_TRACE_REC(unpin), pb->pb_pin_count.counter);
 }
 
 int
 pagebuf_ispin(
 	page_buf_t		*pb)
 {
-	return atomic_read(&PBP(pb)->pb_pin_count);
+	return atomic_read(&pb->pb_pin_count);
 }
 
 /*
@@ -1111,19 +1088,19 @@
 {
 	DECLARE_WAITQUEUE	(wait, current);
 
-	if (atomic_read(&PBP(pb)->pb_pin_count) == 0)
+	if (atomic_read(&pb->pb_pin_count) == 0)
 		return;
 
-	add_wait_queue(&PBP(pb)->pb_waiters, &wait);
+	add_wait_queue(&pb->pb_waiters, &wait);
 	for (;;) {
 		current->state = TASK_UNINTERRUPTIBLE;
-		if (atomic_read(&PBP(pb)->pb_pin_count) == 0) {
+		if (atomic_read(&pb->pb_pin_count) == 0) {
 			break;
 		}
 		pagebuf_run_queues(pb);
 		schedule();
 	}
-	remove_wait_queue(&PBP(pb)->pb_waiters, &wait);
+	remove_wait_queue(&pb->pb_waiters, &wait);
 	current->state = TASK_RUNNING;
 }
 
@@ -1503,44 +1480,6 @@
 }
 
 /*
- *	pagebuf_segment
- *
- *	pagebuf_segment is used to retrieve the various contiguous
- *	segments of a buffer.  The variable addressed by the
- *	loff_t * should be initialized to 0, and successive
- *	calls will update to point to the segment following the one
- *	returned.
- */
-STATIC void
-pagebuf_segment(
-	page_buf_t		*pb,	/* buffer to examine		*/
-	loff_t			*boff_p,/* offset in buffer of next	*/
-					/* next segment (updated)	*/
-	struct page		**spage_p, /* page (updated)		*/
-					/* (NULL if not in page array)	*/
-	size_t			*soff_p,/* offset in page (updated)	*/
-	size_t			*ssize_p) /* segment length (updated)	*/
-{
-	loff_t			kpboff;	/* offset in pagebuf		*/
-	int			kpi;	/* page index in pagebuf	*/
-	size_t			slen;	/* segment length		*/
-
-	kpboff = *boff_p;
-
-	kpi = page_buf_btoct(kpboff + pb->pb_offset);
-
-	*spage_p = pb->pb_pages[kpi];
-
-	*soff_p = page_buf_poff(kpboff + pb->pb_offset);
-	slen = PAGE_CACHE_SIZE - *soff_p;
-	if (slen > (pb->pb_count_desired - kpboff))
-		slen = (pb->pb_count_desired - kpboff);
-	*ssize_p = slen;
-
-	*boff_p = *boff_p + slen;
-}
-
-/*
  *	pagebuf_iomove
  *
  *	Move data into or out of a buffer.
@@ -1548,21 +1487,21 @@
 void
 pagebuf_iomove(
 	page_buf_t		*pb,	/* buffer to process		*/
-	off_t			boff,	/* starting buffer offset	*/
+	size_t			boff,	/* starting buffer offset	*/
 	size_t			bsize,	/* length to copy		*/
 	caddr_t			data,	/* data address			*/
 	page_buf_rw_t		mode)	/* read/write flag		*/
 {
-	loff_t			cboff;
-	size_t			cpoff;
-	size_t			csize;
+	size_t			bend, cpoff, csize;
 	struct page		*page;
 
-	cboff = boff;
-	boff += bsize; /* last */
+	bend = boff + bsize;
+	while (boff < bend) {
+		page = pb->pb_pages[page_buf_btoct(boff + pb->pb_offset)];
+		cpoff = page_buf_poff(boff + pb->pb_offset);
+		csize = min_t(size_t,
+			      PAGE_CACHE_SIZE-cpoff, pb->pb_count_desired-boff);
 
-	while (cboff < boff) {
-		pagebuf_segment(pb, &cboff, &page, &cpoff, &csize);
 		ASSERT(((csize + cpoff) <= PAGE_CACHE_SIZE));
 
 		switch (mode) {
@@ -1576,6 +1515,7 @@
 			memcpy(page_address(page) + cpoff, data, csize);
 		}
 
+		boff += csize;
 		data += csize;
 	}
 }
@@ -1584,13 +1524,17 @@
  * Pagebuf delayed write buffer handling
  */
 
+STATIC int pbd_active = 1;
+STATIC LIST_HEAD(pbd_delwrite_queue);
+STATIC spinlock_t pbd_delwrite_lock = SPIN_LOCK_UNLOCKED;
+
 void
 pagebuf_delwri_queue(
 	page_buf_t		*pb,
 	int			unlock)
 {
 	PB_TRACE(pb, PB_TRACE_REC(delwri_q), unlock);
-	spin_lock(&pb_daemon->pb_delwrite_lock);
+	spin_lock(&pbd_delwrite_lock);
 	/* If already in the queue, dequeue and place at tail */
 	if (!list_empty(&pb->pb_list)) {
 		if (unlock) {
@@ -1599,9 +1543,9 @@
 		list_del(&pb->pb_list);
 	}
 
-	list_add_tail(&pb->pb_list, &pb_daemon->pb_delwrite_l);
-	PBP(pb)->pb_flushtime = jiffies + pb_params.p_un.age_buffer;
-	spin_unlock(&pb_daemon->pb_delwrite_lock);
+	list_add_tail(&pb->pb_list, &pbd_delwrite_queue);
+	pb->pb_flushtime = jiffies + pb_params.p_un.age_buffer;
+	spin_unlock(&pbd_delwrite_lock);
 
 	if (unlock && (pb->pb_flags & _PBF_LOCKABLE)) {
 		pagebuf_unlock(pb);
@@ -1613,10 +1557,10 @@
 	page_buf_t		*pb)
 {
 	PB_TRACE(pb, PB_TRACE_REC(delwri_uq), 0);
-	spin_lock(&pb_daemon->pb_delwrite_lock);
+	spin_lock(&pbd_delwrite_lock);
 	list_del_init(&pb->pb_list);
 	pb->pb_flags &= ~PBF_DELWRI;
-	spin_unlock(&pb_daemon->pb_delwrite_lock);
+	spin_unlock(&pbd_delwrite_lock);
 }
 
 /* Defines for pagebuf daemon */
@@ -1659,7 +1603,7 @@
 
 	INIT_LIST_HEAD(&tmp);
 	do {
-		if (pb_daemon->active == 1) {
+		if (pbd_active == 1) {
 			del_timer(&pb_daemon_timer);
 			pb_daemon_timer.expires = jiffies +
 					pb_params.p_un.flush_interval;
@@ -1667,14 +1611,14 @@
 			interruptible_sleep_on(&pbd_waitq);
 		}
 
-		if (pb_daemon->active == 0) {
+		if (pbd_active == 0) {
 			del_timer(&pb_daemon_timer);
 		}
 
-		spin_lock(&pb_daemon->pb_delwrite_lock);
+		spin_lock(&pbd_delwrite_lock);
 
 		count = 0;
-		list_for_each_safe(curr, next, &pb_daemon->pb_delwrite_l) {
+		list_for_each_safe(curr, next, &pbd_delwrite_queue) {
 			pb = list_entry(curr, page_buf_t, pb_list);
 
 			PB_TRACE(pb, PB_TRACE_REC(walkq1), pagebuf_ispin(pb));
@@ -1683,8 +1627,8 @@
 			    (((pb->pb_flags & _PBF_LOCKABLE) == 0) ||
 			     !pagebuf_cond_lock(pb))) {
 
-				if (!force_flush && time_before(jiffies,
-						PBP(pb)->pb_flushtime)) {
+				if (!force_flush &&
+				    time_before(jiffies, pb->pb_flushtime)) {
 					pagebuf_unlock(pb);
 					break;
 				}
@@ -1696,7 +1640,7 @@
 			}
 		}
 
-		spin_unlock(&pb_daemon->pb_delwrite_lock);
+		spin_unlock(&pbd_delwrite_lock);
 		while (!list_empty(&tmp)) {
 			pb = list_entry(tmp.next, page_buf_t, pb_list);
 			list_del_init(&pb->pb_list);
@@ -1712,9 +1656,9 @@
 			pagebuf_run_queues(NULL);
 
 		force_flush = 0;
-	} while (pb_daemon->active == 1);
+	} while (pbd_active == 1);
 
-	pb_daemon->active = -1;
+	pbd_active = -1;
 	wake_up_interruptible(&pbd_waitq);
 
 	return 0;
@@ -1730,10 +1674,10 @@
 	struct list_head	*curr, *next, tmp;
 	int			pincount = 0;
 
-	spin_lock(&pb_daemon->pb_delwrite_lock);
+	spin_lock(&pbd_delwrite_lock);
 	INIT_LIST_HEAD(&tmp);
 
-	list_for_each_safe(curr, next, &pb_daemon->pb_delwrite_l) {
+	list_for_each_safe(curr, next, &pbd_delwrite_queue) {
 		pb = list_entry(curr, page_buf_t, pb_list);
 
 		/*
@@ -1764,7 +1708,7 @@
 			pb->pb_flags &= ~PBF_ASYNC;
 		}
 
-		spin_unlock(&pb_daemon->pb_delwrite_lock);
+		spin_unlock(&pbd_delwrite_lock);
 
 		if ((flags & PBDF_TRYLOCK) == 0) {
 			pagebuf_lock(pb);
@@ -1775,10 +1719,10 @@
 
 		__pagebuf_iorequest(pb);
 
-		spin_lock(&pb_daemon->pb_delwrite_lock);
+		spin_lock(&pbd_delwrite_lock);
 	}
 
-	spin_unlock(&pb_daemon->pb_delwrite_lock);
+	spin_unlock(&pbd_delwrite_lock);
 
 	pagebuf_run_queues(NULL);
 
@@ -1802,26 +1746,17 @@
 STATIC int
 pagebuf_daemon_start(void)
 {
-	if (!pb_daemon) {
-		pb_daemon = (pagebuf_daemon_t *)
-				kmalloc(sizeof(pagebuf_daemon_t), GFP_KERNEL);
-		if (!pb_daemon) {
-			return -1; /* error */
-		}
-
-		pb_daemon->active = 1;
-		pb_daemon->pb_delwrite_lock = SPIN_LOCK_UNLOCKED;
+	int		rval;
 
-		INIT_LIST_HEAD(&pb_daemon->pb_delwrite_l);
+	pagebuf_workqueue = create_workqueue("pagebuf");
+	if (!pagebuf_workqueue)
+		return -ENOMEM;
 
-		kernel_thread(pagebuf_daemon, (void *)pb_daemon,
-				CLONE_FS|CLONE_FILES|CLONE_VM);
+	rval = kernel_thread(pagebuf_daemon, NULL, CLONE_FS|CLONE_FILES);
+	if (rval < 0)
+		destroy_workqueue(pagebuf_workqueue);
 
-		pagebuf_workqueue = create_workqueue("pagebuf");
-		if (!pagebuf_workqueue)
-			return -1;
-	}
-	return 0;
+	return rval;
 }
 
 /*
@@ -1832,19 +1767,10 @@
 STATIC void
 pagebuf_daemon_stop(void)
 {
-	if (pb_daemon) {
-		destroy_workqueue(pagebuf_workqueue);
-
-		pb_daemon->active = 0;
-
-		wake_up_interruptible(&pbd_waitq);
-		while (pb_daemon->active == 0) {
-			interruptible_sleep_on(&pbd_waitq);
-		}
-
-		kfree(pb_daemon);
-		pb_daemon = NULL;
-	}
+	pbd_active = 0;
+	wake_up_interruptible(&pbd_waitq);
+	wait_event_interruptible(pbd_waitq, pbd_active);
+	destroy_workqueue(pagebuf_workqueue);
 }
 
 
@@ -1965,8 +1891,7 @@
 			"fs/pagebuf/stat", 0, 0, pagebuf_readstats, NULL);
 #endif
 
-	pagebuf_cache = kmem_cache_create("page_buf_t",
-			sizeof(page_buf_private_t), 0,
+	pagebuf_cache = kmem_cache_create("page_buf_t", sizeof(page_buf_t), 0,
 			SLAB_HWCACHE_ALIGN, NULL, NULL);
 	if (pagebuf_cache == NULL) {
 		printk("pagebuf: couldn't init pagebuf cache\n");
diff -Nru a/fs/xfs/pagebuf/page_buf.h b/fs/xfs/pagebuf/page_buf.h
--- a/fs/xfs/pagebuf/page_buf.h	Sun Dec 15 18:08:29 2002
+++ b/fs/xfs/pagebuf/page_buf.h	Sun Dec 15 18:08:29 2002
@@ -109,7 +109,6 @@
 
 	/* flags used only internally */
 	_PBF_LOCKABLE = (1 << 19), /* page_buf_t may be locked		   */
-	_PBF_PRIVATE_BH = (1 << 20), /* do not use public buffer heads	   */
 	_PBF_ALL_PAGES_MAPPED = (1 << 21),
 				/* all pages in rage are mapped		   */
 	_PBF_ADDR_ALLOCATED = (1 << 22),
@@ -195,6 +194,10 @@
 #define PB_PAGES	4
 
 typedef struct page_buf_s {
+	struct semaphore	pb_sema;	/* semaphore for lockables  */
+	unsigned long		pb_flushtime;	/* time to flush pagebuf    */
+	atomic_t		pb_pin_count;	/* pin count		    */
+	wait_queue_head_t	pb_waiters;	/* unpin waiters	    */
 	struct list_head	pb_list;
 	page_buf_flags_t	pb_flags;	/* status flags */
 	struct list_head	pb_hash_list;
@@ -221,6 +224,9 @@
 	unsigned char		pb_hash_index;	/* hash table index	*/
 	struct page		**pb_pages;	/* array of page pointers */
 	struct page		*pb_page_array[PB_PAGES]; /* inline pages */
+#ifdef PAGEBUF_LOCK_TRACKING
+	int			pb_last_holder;
+#endif
 } page_buf_t;
 
 
@@ -244,14 +250,6 @@
 		page_buf_flags_t);	/* PBF_LOCK, PBF_READ,		*/
 					/* PBF_ASYNC			*/	
 
-extern page_buf_t *pagebuf_lookup(
-		struct pb_target *,
-		struct inode *,
-		loff_t,			/* starting offset of range	*/
-		size_t,			/* length of range		*/
-		page_buf_flags_t);	/* PBF_READ, PBF_WRITE,		*/
-					/* PBF_FORCEIO, _PBF_LOCKABLE	*/
-
 extern page_buf_t *pagebuf_get_empty(	/* allocate pagebuf struct with */
 					/*  no memory or disk address	*/
 		struct pb_target *);	/* mount point "fake" inode	*/
@@ -340,7 +338,7 @@
 
 extern void pagebuf_iomove(		/* move data in/out of pagebuf	*/
 		page_buf_t *,		/* buffer to manipulate		*/
-		off_t,			/* starting buffer offset	*/
+		size_t,			/* starting buffer offset	*/
 		size_t,			/* length in buffer		*/
 		caddr_t,		/* data pointer			*/
 		page_buf_rw_t);		/* direction			*/
diff -Nru a/fs/xfs/pagebuf/page_buf_internal.h b/fs/xfs/pagebuf/page_buf_internal.h
--- a/fs/xfs/pagebuf/page_buf_internal.h	Sun Dec 15 18:08:29 2002
+++ b/fs/xfs/pagebuf/page_buf_internal.h	Sun Dec 15 18:08:29 2002
@@ -48,24 +48,10 @@
 #define page_has_buffers(page)	((page)->buffers)
 #endif
 
-typedef struct page_buf_private_s {
-	page_buf_t		pb_common;	/* public part of structure */
-	struct semaphore	pb_sema;	/* semaphore for lockables  */
-	unsigned long		pb_flushtime;	/* time to flush pagebuf    */
-	atomic_t		pb_pin_count;	/* pin count		    */
-	wait_queue_head_t	pb_waiters;	/* unpin waiters	    */
 #ifdef PAGEBUF_LOCK_TRACKING
-	int			pb_last_holder;
-#endif
-} page_buf_private_t;
-
-#define PBC(pb) (&((pb)->pb_common))
-#define PBP(pb) ((page_buf_private_t *) (pb))
-
-#ifdef PAGEBUF_LOCK_TRACKING
-#define PB_SET_OWNER(pb)	(PBP(pb)->pb_last_holder = current->pid)
-#define PB_CLEAR_OWNER(pb)	(PBP(pb)->pb_last_holder = -1)
-#define PB_GET_OWNER(pb)	(PBP(pb)->pb_last_holder)
+#define PB_SET_OWNER(pb)	(pb->pb_last_holder = current->pid)
+#define PB_CLEAR_OWNER(pb)	(pb->pb_last_holder = -1)
+#define PB_GET_OWNER(pb)	(pb->pb_last_holder)
 #else
 #define PB_SET_OWNER(pb)
 #define PB_CLEAR_OWNER(pb)
@@ -94,12 +80,6 @@
 
 #define PB_TRACE_BUFSIZE	1024
 #define CIRC_INC(i)	(((i) + 1) & (PB_TRACE_BUFSIZE - 1))
-
-typedef struct pagebuf_daemon {
-	int			active;
-	spinlock_t		pb_delwrite_lock;
-	struct list_head	pb_delwrite_l;
-} pagebuf_daemon_t;
 
 /*
  * Tunable pagebuf parameters
diff -Nru a/fs/xfs/pagebuf/page_buf_locking.c b/fs/xfs/pagebuf/page_buf_locking.c
--- a/fs/xfs/pagebuf/page_buf_locking.c	Sun Dec 15 18:08:29 2002
+++ b/fs/xfs/pagebuf/page_buf_locking.c	Sun Dec 15 18:08:29 2002
@@ -75,7 +75,7 @@
 
 	ASSERT(pb->pb_flags & _PBF_LOCKABLE);
 
-	locked = down_trylock(&PBP(pb)->pb_sema) == 0;
+	locked = down_trylock(&pb->pb_sema) == 0;
 	if (locked) {
 		PB_SET_OWNER(pb);
 	}
@@ -95,7 +95,7 @@
 	page_buf_t		*pb)
 {
 	ASSERT(pb->pb_flags & _PBF_LOCKABLE);
-	return(atomic_read(&PBP(pb)->pb_sema.count));
+	return(atomic_read(&pb->pb_sema.count));
 }
 
 /*
@@ -114,7 +114,7 @@
 
 	PB_TRACE(pb, PB_TRACE_REC(lock), 0);
 	pagebuf_run_queues(pb);
-	down(&PBP(pb)->pb_sema);
+	down(&pb->pb_sema);
 	PB_SET_OWNER(pb);
 	PB_TRACE(pb, PB_TRACE_REC(locked), 0);
 	return 0;
@@ -133,6 +133,6 @@
 {
 	ASSERT(pb->pb_flags & _PBF_LOCKABLE);
 	PB_CLEAR_OWNER(pb);
-	up(&PBP(pb)->pb_sema);
+	up(&pb->pb_sema);
 	PB_TRACE(pb, PB_TRACE_REC(unlock), 0);
 }
diff -Nru a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
--- a/fs/xfs/xfs_mount.h	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/xfs_mount.h	Sun Dec 15 18:08:28 2002
@@ -428,11 +428,6 @@
 void		xfs_initialize_perag(xfs_mount_t *, int);
 void		xfs_xlatesb(void *, struct xfs_sb *, int, xfs_arch_t, __int64_t);
 
-int		xfs_blkdev_get(const char *, struct block_device **);
-void		xfs_blkdev_put(struct block_device *);
-struct xfs_buftarg *xfs_alloc_buftarg(struct block_device *);
-void		xfs_free_buftarg(struct xfs_buftarg *);
-
 /*
  * Flags for freeze operations.
  */
diff -Nru a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
--- a/fs/xfs/xfs_vfsops.c	Sun Dec 15 18:08:28 2002
+++ b/fs/xfs/xfs_vfsops.c	Sun Dec 15 18:08:28 2002
@@ -381,8 +381,9 @@
  *	(2) logical volume with data and log subvolumes.
  *	(3) logical volume with data, log, and realtime subvolumes.
  *
- * The Linux VFS took care of finding and opening the data volume for
- * us.  We have to handle the other two (if present) here.
+ * We only have to handle opening the log and realtime volumes here if
+ * they are present.  The data subvolume has already been opened by
+ * get_sb_bdev() and is stored in vfsp->vfs_super->s_bdev.
  */
 STATIC int
 xfs_mount(
@@ -399,18 +400,23 @@
 	logdev = rtdev = NULL;
 
 	/*
+	 * Allocate VFS private data (xfs mount structure).
+	 */
+	mp = xfs_mount_init();
+
+	/*
 	 * Open real time and log devices - order is important.
 	 */
 	if (args->logname[0]) {
-		error = xfs_blkdev_get(args->logname, &logdev);
+		error = xfs_blkdev_get(mp, args->logname, &logdev);
 		if (error)
-			return error;
+			goto free_mp;
 	}
 	if (args->rtname[0]) {
-		error = xfs_blkdev_get(args->rtname, &rtdev);
+		error = xfs_blkdev_get(mp, args->rtname, &rtdev);
 		if (error) {
 			xfs_blkdev_put(logdev);
-			return error;
+			goto free_mp;
 		}
 
 		if (rtdev == ddev || rtdev == logdev) {
@@ -418,15 +424,11 @@
 	"XFS: Cannot mount filesystem with identical rtdev and ddev/logdev.");
 			xfs_blkdev_put(logdev);
 			xfs_blkdev_put(rtdev);
-			return EINVAL;
+			error = EINVAL;
+			goto free_mp;
 		}
 	}
 
-	/*
-	 * Allocate VFS private data (xfs mount structure).
-	 */
-	mp = xfs_mount_init();
-
 	vfs_insertbhv(vfsp, &mp->m_bhv, &xfs_vfsops, mp);
 
 	mp->m_ddev_targp = xfs_alloc_buftarg(ddev);
@@ -459,7 +461,7 @@
 		xfs_size_buftarg(mp->m_logdev_targp, mp->m_sb.sb_blocksize, ss);
 	}
 	if (rtdev)
-		xfs_size_buftarg(mp->m_logdev_targp, mp->m_sb.sb_blocksize,
+		xfs_size_buftarg(mp->m_rtdev_targp, mp->m_sb.sb_blocksize,
 				 mp->m_sb.sb_blocksize);
 
 	error = xfs_mountfs(vfsp, mp, ddev->bd_dev, flags);
@@ -476,6 +478,8 @@
 		xfs_binval(mp->m_rtdev_targp);
 	}
 	xfs_unmountfs_close(mp, NULL);
+
+ free_mp:
 	xfs_mount_free(mp, 1);
 	return error;
 }
diff -Nru a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
--- a/fs/xfs/xfs_vnodeops.c	Sun Dec 15 18:08:33 2002
+++ b/fs/xfs/xfs_vnodeops.c	Sun Dec 15 18:08:33 2002
@@ -4870,6 +4870,7 @@
 	BHV_IDENTITY_INIT(VN_BHV_XFS,VNODE_POSITION_XFS),
 	.vop_open		= xfs_open,
 	.vop_read		= xfs_read,
+	.vop_sendfile		= xfs_sendfile,
 	.vop_write		= xfs_write,
 	.vop_ioctl		= xfs_ioctl,
 	.vop_getattr		= xfs_getattr,
diff -Nru a/fs/xfs/xfsidbg.c b/fs/xfs/xfsidbg.c
--- a/fs/xfs/xfsidbg.c	Sun Dec 15 18:08:31 2002
+++ b/fs/xfs/xfsidbg.c	Sun Dec 15 18:08:31 2002
@@ -1793,7 +1793,7 @@
 static int
 kdbm_pb(int argc, const char **argv, const char **envp, struct pt_regs *regs)
 {
-	page_buf_private_t bp;
+	page_buf_t bp;
 	unsigned long addr;
 	long	offset=0;
 	int nextarg;
@@ -1808,43 +1808,43 @@
 		return diag;
 
 	kdb_printf("page_buf_t at 0x%lx\n", addr);
-	kdb_printf("  pb_flags %s\n", pb_flags(bp.pb_common.pb_flags));
+	kdb_printf("  pb_flags %s\n", pb_flags(bp.pb_flags));
 	kdb_printf("  pb_target 0x%p pb_hold %d pb_next 0x%p pb_prev 0x%p\n",
-		   bp.pb_common.pb_target, bp.pb_common.pb_hold.counter,
-		   bp.pb_common.pb_list.next, bp.pb_common.pb_list.prev);
+		   bp.pb_target, bp.pb_hold.counter,
+		   bp.pb_list.next, bp.pb_list.prev);
 	kdb_printf("  pb_hash_index %d pb_hash_next 0x%p pb_hash_prev 0x%p\n",
-		   bp.pb_common.pb_hash_index,
-		   bp.pb_common.pb_hash_list.next,
-		   bp.pb_common.pb_hash_list.prev);
+		   bp.pb_hash_index,
+		   bp.pb_hash_list.next,
+		   bp.pb_hash_list.prev);
 	kdb_printf("  pb_file_offset 0x%llx pb_buffer_length 0x%llx pb_addr 0x%p\n",
-		   (unsigned long long) bp.pb_common.pb_file_offset,
-		   (unsigned long long) bp.pb_common.pb_buffer_length,
-		   bp.pb_common.pb_addr);
+		   (unsigned long long) bp.pb_file_offset,
+		   (unsigned long long) bp.pb_buffer_length,
+		   bp.pb_addr);
 	kdb_printf("  pb_bn 0x%Lx pb_count_desired 0x%lx\n",
-		   bp.pb_common.pb_bn,
-		   (unsigned long) bp.pb_common.pb_count_desired);
+		   bp.pb_bn,
+		   (unsigned long) bp.pb_count_desired);
 	kdb_printf("  pb_io_remaining %d pb_error %u\n",
-		   bp.pb_common.pb_io_remaining.counter,
-		   bp.pb_common.pb_error);
+		   bp.pb_io_remaining.counter,
+		   bp.pb_error);
 	kdb_printf("  pb_page_count %u pb_offset 0x%x pb_pages 0x%p\n",
-		bp.pb_common.pb_page_count, bp.pb_common.pb_offset,
-		bp.pb_common.pb_pages);
+		bp.pb_page_count, bp.pb_offset,
+		bp.pb_pages);
 #ifdef PAGEBUF_LOCK_TRACKING
 	kdb_printf("  pb_iodonesema (%d,%d) pb_sema (%d,%d) pincount (%d) last holder %d\n",
-		   bp.pb_common.pb_iodonesema.count.counter,
-		   bp.pb_common.pb_iodonesema.sleepers,
+		   bp.pb_iodonesema.count.counter,
+		   bp.pb_iodonesema.sleepers,
 		   bp.pb_sema.count.counter, bp.pb_sema.sleepers,
 		   bp.pb_pin_count.counter, bp.pb_last_holder);
 #else
 	kdb_printf("  pb_iodonesema (%d,%d) pb_sema (%d,%d) pincount (%d)\n",
-		   bp.pb_common.pb_iodonesema.count.counter,
-		   bp.pb_common.pb_iodonesema.sleepers,
+		   bp.pb_iodonesema.count.counter,
+		   bp.pb_iodonesema.sleepers,
 		   bp.pb_sema.count.counter, bp.pb_sema.sleepers,
 		   bp.pb_pin_count.counter);
 #endif
-	if (bp.pb_common.pb_fspriv || bp.pb_common.pb_fspriv2) {
+	if (bp.pb_fspriv || bp.pb_fspriv2) {
 		kdb_printf(  "pb_fspriv 0x%p pb_fspriv2 0x%p\n",
-			   bp.pb_common.pb_fspriv, bp.pb_common.pb_fspriv2);
+			   bp.pb_fspriv, bp.pb_fspriv2);
 	}
 
 	return 0;
diff -Nru a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
--- a/include/asm-alpha/pci.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-alpha/pci.h	Sun Dec 15 18:08:28 2002
@@ -6,8 +6,6 @@
 #include <linux/spinlock.h>
 #include <asm/scatterlist.h>
 #include <asm/machvec.h>
-#include <asm/io.h>
-
 
 /*
  * The following structure is used to manage multiple PCI busses.
diff -Nru a/include/asm-i386/ipc.h b/include/asm-i386/ipc.h
--- a/include/asm-i386/ipc.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-i386/ipc.h	Sun Dec 15 18:08:32 2002
@@ -14,6 +14,7 @@
 #define SEMOP		 1
 #define SEMGET		 2
 #define SEMCTL		 3
+#define SEMTIMEDOP	 4
 #define MSGSND		11
 #define MSGRCV		12
 #define MSGGET		13
diff -Nru a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
--- a/include/asm-ia64/unistd.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-ia64/unistd.h	Sun Dec 15 18:08:28 2002
@@ -235,6 +235,7 @@
 #define __NR_epoll_create		1243
 #define __NR_epoll_ctl			1244
 #define __NR_epoll_wait			1245
+#define __NR_semtimedop			1246
 
 #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
 
diff -Nru a/include/asm-m68knommu/current.h b/include/asm-m68knommu/current.h
--- a/include/asm-m68knommu/current.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-m68knommu/current.h	Sun Dec 15 18:08:29 2002
@@ -10,7 +10,7 @@
  *	current and lose _current_task.
  */
 
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
 
 struct task_struct;
 
diff -Nru a/include/asm-m68knommu/elf.h b/include/asm-m68knommu/elf.h
--- a/include/asm-m68knommu/elf.h	Sun Dec 15 18:08:31 2002
+++ b/include/asm-m68knommu/elf.h	Sun Dec 15 18:08:31 2002
@@ -62,7 +62,7 @@
 	pr_reg[8] = regs->a1;						\
 	pr_reg[14] = regs->d0;						\
 	pr_reg[15] = rdusp();						\
-	pr_reg[16] = 0 /* regs->orig_d0; */			\
+	pr_reg[16] = 0 /* regs->orig_d0 */;				\
 	pr_reg[17] = regs->sr;						\
 	pr_reg[18] = regs->pc;						\
 	/* pr_reg[19] = (regs->format << 12) | regs->vector; */		\
@@ -70,7 +70,6 @@
 	  struct switch_stack *sw = ((struct switch_stack *)regs) - 1;	\
 	  pr_reg[5] = sw->d6;						\
 	  pr_reg[6] = sw->d7;						\
-	  pr_reg[9] = sw->a2;						\
 	  pr_reg[10] = sw->a3;						\
 	  pr_reg[11] = sw->a4;						\
 	  pr_reg[12] = sw->a5;						\
diff -Nru a/include/asm-m68knommu/hardirq.h b/include/asm-m68knommu/hardirq.h
--- a/include/asm-m68knommu/hardirq.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-m68knommu/hardirq.h	Sun Dec 15 18:08:28 2002
@@ -2,6 +2,7 @@
 #define __M68K_HARDIRQ_H
 
 #include <linux/config.h>
+#include <linux/cache.h>
 #include <linux/threads.h>
 
 typedef struct {
diff -Nru a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h
--- a/include/asm-m68knommu/processor.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-m68knommu/processor.h	Sun Dec 15 18:08:29 2002
@@ -50,6 +50,12 @@
 #define TASK_SIZE	(0xF0000000UL)
 
 /*
+ * This decides where the kernel will search for a free chunk of vm
+ * space during mmap's. We won't be using it
+ */
+#define TASK_UNMAPPED_BASE	0
+
+/*
  * Bus types
  */
 #define EISA_bus 0
diff -Nru a/include/asm-m68knommu/thread_info.h b/include/asm-m68knommu/thread_info.h
--- a/include/asm-m68knommu/thread_info.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-m68knommu/thread_info.h	Sun Dec 15 18:08:29 2002
@@ -8,6 +8,8 @@
 #ifndef _ASM_THREAD_INFO_H
 #define _ASM_THREAD_INFO_H
 
+#include <asm/page.h>
+
 #ifdef __KERNEL__
 
 #ifndef __ASSEMBLY__
@@ -22,6 +24,7 @@
 	unsigned long	   flags;		/* low level flags */
 	int		   cpu;			/* cpu we're on */
 	int		   preempt_count;	/* 0 => preemptable, <0 => BUG*/
+	struct restart_block restart_block;
 };
 
 /*
@@ -29,10 +32,13 @@
  */
 #define INIT_THREAD_INFO(tsk)			\
 {						\
-	task:		&tsk,			\
-	exec_domain:	&default_exec_domain,	\
-	flags:		0,			\
-	cpu:		0,			\
+	.task		= &tsk,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.restart_block	= {			\
+		.fn = do_no_restart_syscall,	\
+	},					\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
diff -Nru a/include/asm-mips64/compat.h b/include/asm-mips64/compat.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/asm-mips64/compat.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,18 @@
+#ifndef _ASM_MIPS64_COMPAT_H
+#define _ASM_MIPS64_COMPAT_H
+/*
+ * Architecture specific compatibility types
+ */
+#include <linux/types.h>
+
+typedef u32		compat_size_t;
+typedef s32		compat_ssize_t;
+typedef s32		compat_time_t;
+typedef s32		compat_suseconds_t;
+
+struct compat_timespec {
+	compat_time_t	tv_sec;
+	s32		tv_nsec;
+};
+
+#endif /* _ASM_MIPS64_COMPAT_H */
diff -Nru a/include/asm-mips64/posix_types.h b/include/asm-mips64/posix_types.h
--- a/include/asm-mips64/posix_types.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-mips64/posix_types.h	Sun Dec 15 18:08:28 2002
@@ -58,10 +58,7 @@
 typedef int		__kernel_ipc_pid_t32;
 typedef int		__kernel_uid_t32;
 typedef int		__kernel_gid_t32;
-typedef unsigned int	__kernel_size_t32;
-typedef int		__kernel_ssize_t32;
 typedef int		__kernel_ptrdiff_t32;
-typedef int		__kernel_time_t32;
 typedef int		__kernel_suseconds_t32;
 typedef int		__kernel_clock_t32;
 typedef int		__kernel_daddr_t32;
diff -Nru a/include/asm-mips64/stat.h b/include/asm-mips64/stat.h
--- a/include/asm-mips64/stat.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-mips64/stat.h	Sun Dec 15 18:08:32 2002
@@ -10,6 +10,7 @@
 #define _ASM_STAT_H
 
 #include <linux/types.h>
+#include <linux/compat.h>
 
 struct __old_kernel_stat {
 	unsigned int	st_dev;
@@ -40,11 +41,11 @@
 	int		    st_pad2[2];
 	__kernel_off_t32    st_size;
 	int		    st_pad3;
-	__kernel_time_t32   st_atime;
+	compat_time_t     st_atime;
 	int		    reserved0;
-	__kernel_time_t32   st_mtime;
+	compat_time_t     st_mtime;
 	int		    reserved1;
-	__kernel_time_t32   st_ctime;
+	compat_time_t     st_ctime;
 	int		    reserved2;
 	int		    st_blksize;
 	int		    st_blocks;
diff -Nru a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h
--- a/include/asm-s390/bitops.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390/bitops.h	Sun Dec 15 18:08:28 2002
@@ -53,7 +53,7 @@
 /*
  * SMP save set_bit routine based on compare and swap (CS)
  */
-static inline void set_bit_cs(int nr, volatile void *ptr)
+static inline void set_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -78,7 +78,7 @@
 /*
  * SMP save clear_bit routine based on compare and swap (CS)
  */
-static inline void clear_bit_cs(int nr, volatile void *ptr)
+static inline void clear_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -103,7 +103,7 @@
 /*
  * SMP save change_bit routine based on compare and swap (CS)
  */
-static inline void change_bit_cs(int nr, volatile void *ptr)
+static inline void change_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -128,7 +128,8 @@
 /*
  * SMP save test_and_set_bit routine based on compare and swap (CS)
  */
-static inline int test_and_set_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -154,7 +155,8 @@
 /*
  * SMP save test_and_clear_bit routine based on compare and swap (CS)
  */
-static inline int test_and_clear_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -180,7 +182,8 @@
 /*
  * SMP save test_and_change_bit routine based on compare and swap (CS) 
  */
-static inline int test_and_change_bit_cs(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_cs(int nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -207,7 +210,7 @@
 /*
  * fast, non-SMP set_bit routine
  */
-static inline void __set_bit(int nr, volatile void *ptr)
+static inline void __set_bit(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -219,7 +222,7 @@
 }
 
 static inline void 
-__constant_set_bit(const int nr, volatile void *ptr)
+__constant_set_bit(const int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -269,7 +272,7 @@
  * fast, non-SMP clear_bit routine
  */
 static inline void 
-__clear_bit(int nr, volatile void *ptr)
+__clear_bit(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -281,7 +284,7 @@
 }
 
 static inline void 
-__constant_clear_bit(const int nr, volatile void *ptr)
+__constant_clear_bit(const int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -330,7 +333,7 @@
 /* 
  * fast, non-SMP change_bit routine 
  */
-static inline void __change_bit(int nr, volatile void *ptr)
+static inline void __change_bit(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -342,7 +345,7 @@
 }
 
 static inline void 
-__constant_change_bit(const int nr, volatile void *ptr) 
+__constant_change_bit(const int nr, volatile unsigned long *ptr) 
 {
 	unsigned long addr;
 
@@ -391,7 +394,8 @@
 /*
  * fast, non-SMP test_and_set_bit routine
  */
-static inline int test_and_set_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_set_bit_simple(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -409,7 +413,8 @@
 /*
  * fast, non-SMP test_and_clear_bit routine
  */
-static inline int test_and_clear_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_clear_bit_simple(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -427,7 +432,8 @@
 /*
  * fast, non-SMP test_and_change_bit routine
  */
-static inline int test_and_change_bit_simple(int nr, volatile void *ptr)
+static inline int
+test_and_change_bit_simple(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -463,7 +469,7 @@
  * This routine doesn't need to be atomic.
  */
 
-static inline int __test_bit(int nr, volatile void *ptr)
+static inline int __test_bit(int nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -473,7 +479,8 @@
 	return (ch >> (nr & 7)) & 1;
 }
 
-static inline int __constant_test_bit(int nr, volatile void * addr) {
+static inline int 
+__constant_test_bit(int nr, volatile unsigned long * addr) {
     return (((volatile char *) addr)[(nr>>3)^3] & (1<<(nr&7))) != 0;
 }
 
@@ -485,7 +492,8 @@
 /*
  * Find-bit routines..
  */
-static inline int find_first_zero_bit(void * addr, unsigned size)
+static inline int
+find_first_zero_bit(unsigned long * addr, unsigned size)
 {
 	unsigned long cmp, count;
         int res;
@@ -523,7 +531,8 @@
         return (res < size) ? res : size;
 }
 
-static inline int find_first_bit(void * addr, unsigned size)
+static inline int
+find_first_bit(unsigned long * addr, unsigned size)
 {
 	unsigned long cmp, count;
         int res;
@@ -561,7 +570,8 @@
         return (res < size) ? res : size;
 }
 
-static inline int find_next_zero_bit (void * addr, int size, int offset)
+static inline int
+find_next_zero_bit (unsigned long * addr, int size, int offset)
 {
         unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
         unsigned long bitvec, reg;
@@ -599,7 +609,8 @@
         return (offset + res);
 }
 
-static inline int find_next_bit (void * addr, int size, int offset)
+static inline int
+find_next_bit (unsigned long * addr, int size, int offset)
 {
         unsigned long * p = ((unsigned long *) addr) + (offset >> 5);
         unsigned long bitvec, reg;
@@ -668,7 +679,7 @@
  * __ffs = find first bit in word. Undefined if no bit exists,
  * so code should check against 0UL first..
  */
-static inline unsigned long __ffs(unsigned long word)
+static inline unsigned long __ffs (unsigned long word)
 {
 	unsigned long reg, result;
 
@@ -707,7 +718,7 @@
  * differs in spirit from the above ffz (man ffs).
  */
 
-extern int inline ffs (int x)
+extern inline int ffs (int x)
 {
         int r = 1;
 
@@ -792,10 +803,15 @@
  *    23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
  */
 
-#define ext2_set_bit(nr, addr)       test_and_set_bit((nr)^24, addr)
-#define ext2_clear_bit(nr, addr)     test_and_clear_bit((nr)^24, addr)
-#define ext2_test_bit(nr, addr)      test_bit((nr)^24, addr)
-static inline int ext2_find_first_zero_bit(void *vaddr, unsigned size)
+#define ext2_set_bit(nr, addr)       \
+	test_and_set_bit((nr)^24, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr)     \
+	test_and_clear_bit((nr)^24, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr)      \
+	test_bit((nr)^24, (unsigned long *)addr)
+
+static inline int 
+ext2_find_first_zero_bit(void *vaddr, unsigned size)
 {
 	unsigned long cmp, count;
         int res;
diff -Nru a/include/asm-s390/cio.h b/include/asm-s390/cio.h
--- a/include/asm-s390/cio.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-s390/cio.h	Sun Dec 15 18:08:32 2002
@@ -262,8 +262,6 @@
 
 extern int diag210(struct diag210 *addr);
 
-extern int chsc(void *data);
-
 extern void wait_cons_dev(void);
 
 #endif
diff -Nru a/include/asm-s390/current.h b/include/asm-s390/current.h
--- a/include/asm-s390/current.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-s390/current.h	Sun Dec 15 18:08:32 2002
@@ -13,7 +13,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
 
 struct task_struct;
 
diff -Nru a/include/asm-s390/page.h b/include/asm-s390/page.h
--- a/include/asm-s390/page.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390/page.h	Sun Dec 15 18:08:28 2002
@@ -64,7 +64,7 @@
 
 #define BUG() do { \
         printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); \
-        __asm__ __volatile__(".word 0x0000"); \
+        __asm__ __volatile__(".long 0"); \
 } while (0)                                       
 
 #define PAGE_BUG(page) do { \
diff -Nru a/include/asm-s390/posix_types.h b/include/asm-s390/posix_types.h
--- a/include/asm-s390/posix_types.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390/posix_types.h	Sun Dec 15 18:08:28 2002
@@ -60,13 +60,13 @@
 #endif
 
 #undef  __FD_SET
-#define __FD_SET(fd,fdsetp)  set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp)  set_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_CLR
-#define __FD_CLR(fd,fdsetp)  clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp)  clear_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_ISSET
-#define __FD_ISSET(fd,fdsetp)  test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp)  test_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_ZERO
 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff -Nru a/include/asm-s390/rwsem.h b/include/asm-s390/rwsem.h
--- a/include/asm-s390/rwsem.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-s390/rwsem.h	Sun Dec 15 18:08:29 2002
@@ -228,7 +228,7 @@
                 : "=&d" (old), "=&d" (new)
 		: "a" (&sem->count), "m" (tmp)
 		: "cc", "memory" );
-	if (new > 1) // FIXME: is this correct ?!?
+	if (new > 1)
 		rwsem_downgrade_wake(sem);
 }
 
diff -Nru a/include/asm-s390/setup.h b/include/asm-s390/setup.h
--- a/include/asm-s390/setup.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-s390/setup.h	Sun Dec 15 18:08:32 2002
@@ -25,13 +25,13 @@
  */
 extern unsigned long machine_flags;
 
-#define MACHINE_IS_VM    (machine_flags & 1)
-#define MACHINE_HAS_IEEE (machine_flags & 2)
-#define MACHINE_IS_P390  (machine_flags & 4)
-#define MACHINE_HAS_CSP  (machine_flags & 8)
-#define MACHINE_HAS_MVPG (machine_flags & 16)
+#define MACHINE_IS_VM		(machine_flags & 1)
+#define MACHINE_HAS_IEEE	(machine_flags & 2)
+#define MACHINE_IS_P390		(machine_flags & 4)
+#define MACHINE_HAS_CSP		(machine_flags & 8)
+#define MACHINE_HAS_MVPG	(machine_flags & 16)
 
-#define MACHINE_HAS_SCLP (!MACHINE_IS_P390)
+#define MACHINE_HAS_SCLP	(!MACHINE_IS_P390)
 
 /*
  * Console mode. Override with conmode=
diff -Nru a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h
--- a/include/asm-s390/thread_info.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-s390/thread_info.h	Sun Dec 15 18:08:29 2002
@@ -26,6 +26,7 @@
 	unsigned long		flags;		/* low level flags */
 	unsigned int		cpu;		/* current CPU */
 	unsigned int		preempt_count; /* 0 => preemptable */
+	struct restart_block	restart_block;
 };
 
 /*
@@ -33,10 +34,13 @@
  */
 #define INIT_THREAD_INFO(tsk)			\
 {						\
-	task:		&tsk,			\
-	exec_domain:	&default_exec_domain,	\
-	flags:		0,			\
-	cpu:		0,			\
+	.task		= &tsk,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.restart_block	= {			\
+		.fn = do_no_restart_syscall,	\
+	},					\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
@@ -69,6 +73,7 @@
 #define TIF_NOTIFY_RESUME	1	/* resumption notification requested */
 #define TIF_SIGPENDING		2	/* signal pending */
 #define TIF_NEED_RESCHED	3	/* rescheduling necessary */
+#define TIF_RESTART_SVC		4	/* restart svc with new svc number */
 #define TIF_USEDFPU		16	/* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG	17	/* true if poll_idle() is polling 
 					   TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@
 #define _TIF_NOTIFY_RESUME	(1<<TIF_NOTIFY_RESUME)
 #define _TIF_SIGPENDING		(1<<TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC	(1<<TIF_RESTART_SVC)
 #define _TIF_USEDFPU		(1<<TIF_USEDFPU)
 #define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)
 
diff -Nru a/include/asm-s390/uaccess.h b/include/asm-s390/uaccess.h
--- a/include/asm-s390/uaccess.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390/uaccess.h	Sun Dec 15 18:08:28 2002
@@ -84,7 +84,7 @@
 {
         int err;
 
-        __asm__ __volatile__ (  "   sr    %0,01\n"
+        __asm__ __volatile__ (  "   sr    %0,%0\n"
 				"   lr    2,%1\n"
 				"   lr    4,%2\n"
                                 "   sacf  512\n"
diff -Nru a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h
--- a/include/asm-s390/unistd.h	Sun Dec 15 18:08:33 2002
+++ b/include/asm-s390/unistd.h	Sun Dec 15 18:08:33 2002
@@ -19,6 +19,7 @@
 #define __NR_write                4
 #define __NR_open                 5
 #define __NR_close                6
+#define __NR_restart_syscall	  7
 #define __NR_creat                8
 #define __NR_link                 9
 #define __NR_unlink              10
diff -Nru a/include/asm-s390x/bitops.h b/include/asm-s390x/bitops.h
--- a/include/asm-s390x/bitops.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-s390x/bitops.h	Sun Dec 15 18:08:32 2002
@@ -1,3 +1,6 @@
+#ifndef _S390_BITOPS_H
+#define _S390_BITOPS_H
+
 /*
  *  include/asm-s390/bitops.h
  *
@@ -9,9 +12,7 @@
  *    Copyright (C) 1992, Linus Torvalds
  *
  */
-
-#ifndef _S390_BITOPS_H
-#define _S390_BITOPS_H
+#include <linux/config.h>
 
 /*
  * bit 0 is the LSB of *addr; bit 63 is the MSB of *addr;
@@ -32,7 +33,6 @@
  * of the form "flags |= (1 << bitnr)" are used INTERMIXED
  * with operation of the form "set_bit(bitnr, flags)".
  */
-#include <linux/config.h>
 
 /* set ALIGN_CS to 1 if the SMP safe bit operations should
  * align the address to 4 byte boundary. It seems to work
@@ -57,7 +57,7 @@
 /*
  * SMP save set_bit routine based on compare and swap (CS)
  */
-static inline void set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -82,7 +82,7 @@
 /*
  * SMP save clear_bit routine based on compare and swap (CS)
  */
-static inline void clear_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -107,7 +107,7 @@
 /*
  * SMP save change_bit routine based on compare and swap (CS)
  */
-static inline void change_bit_cs(unsigned long nr, volatile void *ptr)
+static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -132,8 +132,8 @@
 /*
  * SMP save test_and_set_bit routine based on compare and swap (CS)
  */
-static inline int 
-test_and_set_bit_cs(unsigned long nr, volatile void *ptr)
+static inline int
+test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -160,7 +160,7 @@
  * SMP save test_and_clear_bit routine based on compare and swap (CS)
  */
 static inline int
-test_and_clear_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -187,7 +187,7 @@
  * SMP save test_and_change_bit routine based on compare and swap (CS) 
  */
 static inline int
-test_and_change_bit_cs(unsigned long nr, volatile void *ptr)
+test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr)
 {
         unsigned long addr, old, new, mask;
 
@@ -214,7 +214,7 @@
 /*
  * fast, non-SMP set_bit routine
  */
-static inline void __set_bit(unsigned long nr, volatile void *ptr)
+static inline void __set_bit(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -226,7 +226,7 @@
 }
 
 static inline void 
-__constant_set_bit(const unsigned long nr, volatile void *ptr)
+__constant_set_bit(const unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -276,7 +276,7 @@
  * fast, non-SMP clear_bit routine
  */
 static inline void 
-__clear_bit(unsigned long nr, volatile void *ptr)
+__clear_bit(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -288,7 +288,7 @@
 }
 
 static inline void 
-__constant_clear_bit(const unsigned long nr, volatile void *ptr)
+__constant_clear_bit(const unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -337,7 +337,7 @@
 /* 
  * fast, non-SMP change_bit routine 
  */
-static inline void __change_bit(unsigned long nr, volatile void *ptr)
+static inline void __change_bit(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 
@@ -349,7 +349,7 @@
 }
 
 static inline void 
-__constant_change_bit(const unsigned long nr, volatile void *ptr) 
+__constant_change_bit(const unsigned long nr, volatile unsigned long *ptr) 
 {
 	unsigned long addr;
 
@@ -399,7 +399,7 @@
  * fast, non-SMP test_and_set_bit routine
  */
 static inline int
-test_and_set_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -418,7 +418,7 @@
  * fast, non-SMP test_and_clear_bit routine
  */
 static inline int
-test_and_clear_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -437,7 +437,7 @@
  * fast, non-SMP test_and_change_bit routine
  */
 static inline int
-test_and_change_bit_simple(unsigned long nr, volatile void *ptr)
+test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -473,7 +473,7 @@
  * This routine doesn't need to be atomic.
  */
 
-static inline int __test_bit(unsigned long nr, volatile void *ptr)
+static inline int __test_bit(unsigned long nr, volatile unsigned long *ptr)
 {
 	unsigned long addr;
 	unsigned char ch;
@@ -484,7 +484,7 @@
 }
 
 static inline int 
-__constant_test_bit(unsigned long nr, volatile void *addr) {
+__constant_test_bit(unsigned long nr, volatile unsigned long *addr) {
     return (((volatile char *) addr)[(nr>>3)^7] & (1<<(nr&7))) != 0;
 }
 
@@ -497,7 +497,7 @@
  * Find-bit routines..
  */
 static inline unsigned long
-find_first_zero_bit(void * addr, unsigned long size)
+find_first_zero_bit(unsigned long * addr, unsigned long size)
 {
         unsigned long res, cmp, count;
 
@@ -539,7 +539,7 @@
 }
 
 static inline unsigned long
-find_first_bit(void * addr, unsigned long size)
+find_first_bit(unsigned long * addr, unsigned long size)
 {
         unsigned long res, cmp, count;
 
@@ -581,7 +581,7 @@
 }
 
 static inline unsigned long
-find_next_zero_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_zero_bit (unsigned long * addr, unsigned long size, unsigned long offset)
 {
         unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
         unsigned long bitvec, reg;
@@ -625,7 +625,7 @@
 }
 
 static inline unsigned long
-find_next_bit (void * addr, unsigned long size, unsigned long offset)
+find_next_bit (unsigned long * addr, unsigned long size, unsigned long offset)
 {
         unsigned long * p = ((unsigned long *) addr) + (offset >> 6);
         unsigned long bitvec, reg;
@@ -744,7 +744,7 @@
  * the libc and compiler builtin ffs routines, therefore
  * differs in spirit from the above ffz (man ffs).
  */
-extern int inline ffs (int x)
+extern inline int ffs (int x)
 {
         int r = 1;
 
@@ -836,9 +836,13 @@
  *    23 22 21 20 19 18 17 16 31 30 29 28 27 26 25 24
  */
 
-#define ext2_set_bit(nr, addr)       test_and_set_bit((nr)^56, addr)
-#define ext2_clear_bit(nr, addr)     test_and_clear_bit((nr)^56, addr)
-#define ext2_test_bit(nr, addr)      test_bit((nr)^56, addr)
+#define ext2_set_bit(nr, addr)       \
+	test_and_set_bit((nr)^56, (unsigned long *)addr)
+#define ext2_clear_bit(nr, addr)     \
+	test_and_clear_bit((nr)^56, (unsigned long *)addr)
+#define ext2_test_bit(nr, addr)      \
+	test_bit((nr)^56, (unsigned long *)addr)
+
 static inline unsigned long
 ext2_find_first_zero_bit(void *vaddr, unsigned long size)
 {
diff -Nru a/include/asm-s390x/ccwgroup.h b/include/asm-s390x/ccwgroup.h
--- a/include/asm-s390x/ccwgroup.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390x/ccwgroup.h	Sun Dec 15 18:08:28 2002
@@ -31,10 +31,10 @@
 
 extern int  ccwgroup_driver_register   (struct ccwgroup_driver *cdriver);
 extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
-extern int ccwgroup_create_dev (struct device *root,
-				unsigned int creator_id,
-				struct ccw_driver *gdrv,
-				int argc, char *argv[]);
+extern int ccwgroup_create (struct device *root,
+			    unsigned int creator_id,
+			    struct ccw_driver *gdrv,
+			    int argc, char *argv[]);
 
 extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
 extern int ccwgroup_remove_ccwdev(struct ccw_device *cdev);
diff -Nru a/include/asm-s390x/cio.h b/include/asm-s390x/cio.h
--- a/include/asm-s390x/cio.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-s390x/cio.h	Sun Dec 15 18:08:29 2002
@@ -262,8 +262,6 @@
 
 extern int diag210(struct diag210 *addr);
 
-extern int chsc(void *data);
-
 extern void wait_cons_dev(void);
 
 #endif
diff -Nru a/include/asm-s390x/current.h b/include/asm-s390x/current.h
--- a/include/asm-s390x/current.h	Sun Dec 15 18:08:33 2002
+++ b/include/asm-s390x/current.h	Sun Dec 15 18:08:33 2002
@@ -13,7 +13,7 @@
 
 #ifdef __KERNEL__
 
-#include <asm/thread_info.h>
+#include <linux/thread_info.h>
 
 struct task_struct;
 
diff -Nru a/include/asm-s390x/posix_types.h b/include/asm-s390x/posix_types.h
--- a/include/asm-s390x/posix_types.h	Sun Dec 15 18:08:32 2002
+++ b/include/asm-s390x/posix_types.h	Sun Dec 15 18:08:32 2002
@@ -58,13 +58,13 @@
 #endif
 
 #undef  __FD_SET
-#define __FD_SET(fd,fdsetp)  set_bit(fd,fdsetp)
+#define __FD_SET(fd,fdsetp)  set_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_CLR
-#define __FD_CLR(fd,fdsetp)  clear_bit(fd,fdsetp)
+#define __FD_CLR(fd,fdsetp)  clear_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_ISSET
-#define __FD_ISSET(fd,fdsetp)  test_bit(fd,fdsetp)
+#define __FD_ISSET(fd,fdsetp)  test_bit(fd,fdsetp->fds_bits)
 
 #undef  __FD_ZERO
 #define __FD_ZERO(fdsetp) (memset (fdsetp, 0, sizeof(*(fd_set *)fdsetp)))
diff -Nru a/include/asm-s390x/rwsem.h b/include/asm-s390x/rwsem.h
--- a/include/asm-s390x/rwsem.h	Sun Dec 15 18:08:28 2002
+++ b/include/asm-s390x/rwsem.h	Sun Dec 15 18:08:28 2002
@@ -228,7 +228,7 @@
                 : "=&d" (old), "=&d" (new)
 		: "a" (&sem->count), "m" (tmp)
 		: "cc", "memory" );
-	if (new > 1) // FIXME: is this correct ?!?
+	if (new > 1)
 		rwsem_downgrade_wake(sem);
 }
 
diff -Nru a/include/asm-s390x/thread_info.h b/include/asm-s390x/thread_info.h
--- a/include/asm-s390x/thread_info.h	Sun Dec 15 18:08:30 2002
+++ b/include/asm-s390x/thread_info.h	Sun Dec 15 18:08:30 2002
@@ -26,6 +26,7 @@
 	unsigned long		flags;		/* low level flags */
 	unsigned int		cpu;		/* current CPU */
 	unsigned int		preempt_count;  /* 0 => preemptable */
+	struct restart_block	restart_block;
 };
 
 /*
@@ -33,10 +34,13 @@
  */
 #define INIT_THREAD_INFO(tsk)			\
 {						\
-	task:		&tsk,			\
-	exec_domain:	&default_exec_domain,	\
-	flags:		0,			\
-	cpu:		0,			\
+	.task		= &tsk,			\
+	.exec_domain	= &default_exec_domain,	\
+	.flags		= 0,			\
+	.cpu		= 0,			\
+	.restart_block	= {			\
+		.fn = do_no_restart_syscall,	\
+	},					\
 }
 
 #define init_thread_info	(init_thread_union.thread_info)
@@ -69,6 +73,7 @@
 #define TIF_NOTIFY_RESUME	1	/* resumption notification requested */
 #define TIF_SIGPENDING		2	/* signal pending */
 #define TIF_NEED_RESCHED	3	/* rescheduling necessary */
+#define TIF_RESTART_SVC		4	/* restart svc with new svc number */
 #define TIF_USEDFPU		16	/* FPU was used by this task this quantum (SMP) */
 #define TIF_POLLING_NRFLAG	17	/* true if poll_idle() is polling 
 					   TIF_NEED_RESCHED */
@@ -77,6 +82,7 @@
 #define _TIF_NOTIFY_RESUME	(1<<TIF_NOTIFY_RESUME)
 #define _TIF_SIGPENDING		(1<<TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED	(1<<TIF_NEED_RESCHED)
+#define _TIF_RESTART_SVC	(1<<TIF_RESTART_SVC)
 #define _TIF_USEDFPU		(1<<TIF_USEDFPU)
 #define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)
 
diff -Nru a/include/asm-s390x/unistd.h b/include/asm-s390x/unistd.h
--- a/include/asm-s390x/unistd.h	Sun Dec 15 18:08:29 2002
+++ b/include/asm-s390x/unistd.h	Sun Dec 15 18:08:29 2002
@@ -19,6 +19,7 @@
 #define __NR_write                4
 #define __NR_open                 5
 #define __NR_close                6
+#define __NR_restart_syscall	  7
 #define __NR_creat                8
 #define __NR_link                 9
 #define __NR_unlink              10
diff -Nru a/include/linux/binfmts.h b/include/linux/binfmts.h
--- a/include/linux/binfmts.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/binfmts.h	Sun Dec 15 18:08:29 2002
@@ -57,7 +57,7 @@
 extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm); 
 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
 extern void compute_creds(struct linux_binprm *binprm);
-extern int do_coredump(long signr, struct pt_regs * regs);
+extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
 extern void set_binfmt(struct linux_binfmt *new);
 
 
diff -Nru a/include/linux/buffer_head.h b/include/linux/buffer_head.h
--- a/include/linux/buffer_head.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/buffer_head.h	Sun Dec 15 18:08:28 2002
@@ -178,7 +178,7 @@
  */
 int try_to_release_page(struct page * page, int gfp_mask);
 int block_invalidatepage(struct page *page, unsigned long offset);
-int block_write_full_page(struct page*, get_block_t*);
+int block_write_full_page(struct page *page, get_block_t *get_block, struct writeback_control *wbc);
 int block_read_full_page(struct page*, get_block_t*);
 int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*);
 int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
diff -Nru a/include/linux/compat.h b/include/linux/compat.h
--- a/include/linux/compat.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/compat.h	Sun Dec 15 18:08:29 2002
@@ -1,15 +1,18 @@
 #ifndef _LINUX_COMPAT_H
 #define _LINUX_COMPAT_H
 /*
- * These are the type definitions for the arhitecure sepcific
- * compatibility layer.
+ * These are the type definitions for the architecture specific
+ * syscall compatibility layer.
  */
 #include <linux/config.h>
 
 #ifdef CONFIG_COMPAT
 
+#include <linux/stat.h>
 #include <asm/compat.h>
 
+#define compat_jiffies_to_clock_t(x)	((x) / (HZ / COMPAT_USER_HZ))
+
 struct compat_utimbuf {
 	compat_time_t		actime;
 	compat_time_t		modtime;
@@ -19,6 +22,15 @@
 	struct compat_timeval	it_interval;
 	struct compat_timeval	it_value;
 };
+
+struct compat_tms {
+	compat_clock_t		tms_utime;
+	compat_clock_t		tms_stime;
+	compat_clock_t		tms_cutime;
+	compat_clock_t		tms_cstime;
+};
+
+extern int cp_compat_stat(struct kstat *, struct compat_stat *);
 
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
diff -Nru a/include/linux/cpufreq.h b/include/linux/cpufreq.h
--- a/include/linux/cpufreq.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/cpufreq.h	Sun Dec 15 18:08:29 2002
@@ -37,15 +37,26 @@
 #define CPUFREQ_POLICY_POWERSAVE        (1)
 #define CPUFREQ_POLICY_PERFORMANCE      (2)
 
-/* values here are CPU kHz so that hardware which doesn't run with some
- * frequencies can complain without having to guess what per cent / per
- * mille means. */
+/* Frequency values here are CPU kHz so that hardware which doesn't run 
+ * with some frequencies can complain without having to guess what per 
+ * cent / per mille means. 
+ * Maximum transition latency is in nanoseconds - if it's unknown,
+ * CPUFREQ_ETERNAL shall be used.
+ */
+
+#define CPUFREQ_ETERNAL (-1)
+struct cpufreq_cpuinfo {
+	unsigned int            max_freq;
+	unsigned int            min_freq;
+	unsigned int            transition_latency;
+};
+
 struct cpufreq_policy {
 	unsigned int            cpu;    /* cpu nr or CPUFREQ_ALL_CPUS */
 	unsigned int            min;    /* in kHz */
 	unsigned int            max;    /* in kHz */
         unsigned int            policy; /* see above */
-	unsigned int            max_cpu_freq; /* for information */
+	struct cpufreq_cpuinfo  cpuinfo;     /* see above */
 };
 
 #define CPUFREQ_ADJUST          (0)
@@ -116,7 +127,6 @@
 #endif
 	/* 2.4. compatible API */
 #ifdef CONFIG_CPU_FREQ_24_API
-	unsigned int            cpu_min_freq[NR_CPUS];
 	unsigned int            cpu_cur_freq[NR_CPUS];
 #endif
 };
diff -Nru a/include/linux/fs.h b/include/linux/fs.h
--- a/include/linux/fs.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/fs.h	Sun Dec 15 18:08:28 2002
@@ -278,7 +278,7 @@
 struct writeback_control;
 
 struct address_space_operations {
-	int (*writepage)(struct page *);
+	int (*writepage)(struct page *page, struct writeback_control *wbc);
 	int (*readpage)(struct file *, struct page *);
 	int (*sync_page)(struct page *);
 
@@ -631,6 +631,7 @@
 	struct semaphore	s_lock;
 	int			s_count;
 	int			s_syncing;
+	int			s_need_sync_fs;
 	atomic_t		s_active;
 	void                    *s_security;
 
@@ -810,6 +811,7 @@
 	void (*delete_inode) (struct inode *);
 	void (*put_super) (struct super_block *);
 	void (*write_super) (struct super_block *);
+	int (*sync_fs)(struct super_block *sb, int wait);
 	void (*write_super_lockfs) (struct super_block *);
 	void (*unlockfs) (struct super_block *);
 	int (*statfs) (struct super_block *, struct statfs *);
@@ -1096,15 +1098,20 @@
 extern void bd_release(struct block_device *);
 extern void blk_run_queues(void);
 
-/* fs/devices.c */
+/* fs/char_dev.c */
 extern int register_chrdev(unsigned int, const char *, struct file_operations *);
 extern int unregister_chrdev(unsigned int, const char *);
 extern int chrdev_open(struct inode *, struct file *);
+
+/* fs/block_dev.c */
 extern const char *__bdevname(dev_t);
 extern inline const char *bdevname(struct block_device *bdev)
 {
 	return __bdevname(bdev->bd_dev);
 }
+extern struct block_device *open_bdev_excl(const char *, int, int, void *);
+extern void close_bdev_excl(struct block_device *, int);
+
 extern const char * cdevname(kdev_t);
 extern const char * kdevname(kdev_t);
 extern void init_special_inode(struct inode *, umode_t, dev_t);
@@ -1143,6 +1150,7 @@
 extern int filemap_fdatawrite(struct address_space *);
 extern int filemap_fdatawait(struct address_space *);
 extern void sync_supers(void);
+extern void sync_filesystems(int wait);
 extern sector_t bmap(struct inode *, sector_t);
 extern int setattr_mask(unsigned int);
 extern int notify_change(struct dentry *, struct iattr *);
diff -Nru a/include/linux/hugetlb.h b/include/linux/hugetlb.h
--- a/include/linux/hugetlb.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/hugetlb.h	Sun Dec 15 18:08:29 2002
@@ -20,6 +20,7 @@
 void huge_page_release(struct page *);
 void hugetlb_release_key(struct hugetlb_key *);
 int hugetlb_report_meminfo(char *);
+int is_hugepage_mem_enough(size_t);
 
 extern int htlbpage_max;
 
@@ -35,6 +36,7 @@
 #define zap_hugepage_range(vma, start, len)	BUG()
 #define unmap_hugepage_range(vma, start, end)	BUG()
 #define huge_page_release(page)			BUG()
+#define is_hugepage_mem_enough(size)		0
 #define hugetlb_report_meminfo(buf)		0
 
 #endif /* !CONFIG_HUGETLB_PAGE */
diff -Nru a/include/linux/init.h b/include/linux/init.h
--- a/include/linux/init.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/init.h	Sun Dec 15 18:08:28 2002
@@ -91,19 +91,15 @@
 #define __exitcall(fn)							\
 	static exitcall_t __exitcall_##fn __exit_call = fn
 
-/*
- * Used for kernel command line parameter setup
- */
-struct kernel_param {
+struct obs_kernel_param {
 	const char *str;
 	int (*setup_func)(char *);
 };
 
-extern struct kernel_param __setup_start, __setup_end;
-
+/* OBSOLETE: see moduleparam.h for the right way. */
 #define __setup(str, fn)						\
 	static char __setup_str_##fn[] __initdata = str;		\
-	static struct kernel_param __setup_##fn				\
+	static struct obs_kernel_param __setup_##fn			\
 		 __attribute__((unused,__section__ (".init.setup")))	\
 		= { __setup_str_##fn, fn }
 
@@ -165,6 +161,16 @@
 
 /* Data marked not to be saved by software_suspend() */
 #define __nosavedata __attribute__ ((__section__ (".data.nosave")))
+
+/* This means "can be init if no module support, otherwise module load
+   may call it." */
+#ifdef CONFIG_MODULES
+#define __init_or_module
+#define __initdata_or_module
+#else
+#define __init_or_module __init
+#define __initdata_or_module __initdata
+#endif /*CONFIG_MODULES*/
 
 #ifdef CONFIG_HOTPLUG
 #define __devinit
diff -Nru a/include/linux/intermezzo_fs.h b/include/linux/intermezzo_fs.h
--- a/include/linux/intermezzo_fs.h	Sun Dec 15 18:08:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,931 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *  Copyright (C) 2001 Tacitus Systems, Inc.
- *  Copyright (C) 2000 Stelias Computing, Inc.
- *  Copyright (C) 2000 Red Hat, Inc.
- *  Copyright (C) 2000 TurboLinux, Inc.
- *  Copyright (C) 2000 Los Alamos National Laboratory.
- *
- *   This file is part of InterMezzo, http://www.inter-mezzo.org.
- *
- *   InterMezzo is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   InterMezzo is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with InterMezzo; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __INTERMEZZO_FS_H_
-#define __INTERMEZZO_FS_H_ 1
-
-#include <linux/intermezzo_lib.h>
-#include <linux/intermezzo_idl.h>
-
-
-#ifdef __KERNEL__
-typedef __u8 uuid_t[16];
-#else
-# include <uuid/uuid.h>
-#endif
-
-struct lento_vfs_context {
-        __u64 kml_offset;
-        __u64 updated_time;
-        __u64 remote_ino;
-        __u64 remote_generation;
-        __u32 slot_offset;
-        __u32 recno;
-        __u32 flags;
-        uuid_t uuid;
-        struct presto_version remote_version;
-};
-
-static inline int izo_ioctl_is_invalid(struct izo_ioctl_data *data);
-
-#ifdef __KERNEL__
-# include <linux/smp.h>
-# include <linux/fsfilter.h>
-# include <linux/mount.h>
-# include <linux/slab.h>
-# include <linux/vmalloc.h>
-# include <linux/smp_lock.h>
-
-/* fixups for fs.h */
-# ifndef fs_down
-#  define fs_down(sem) down(sem)
-# endif
-
-# ifndef fs_up
-#  define fs_up(sem) up(sem)
-# endif
-
-# define KML_IDLE                        0
-# define KML_DECODE                      1
-# define KML_OPTIMIZE                    2
-# define KML_REINT                       3
-
-# define KML_OPEN_REINT                  0x0100
-# define KML_REINT_BEGIN                 0x0200
-# define KML_BACKFETCH                   0x0400
-# define KML_REINT_END                   0x0800
-# define KML_CLOSE_REINT                 0x1000
-# define KML_REINT_MAXBUF                (64 * 1024)
-
-# define CACHE_CLIENT_RO       0x4
-# define CACHE_LENTO_RO        0x8
-
-/* global variables */
-extern int presto_debug;
-extern int presto_print_entry;
-extern long presto_kmemory;
-extern long presto_vmemory;
-
-# define PRESTO_DEBUG
-# ifdef PRESTO_DEBUG
-/* debugging masks */
-#  define D_SUPER       1
-#  define D_INODE       2
-#  define D_FILE        4
-#  define D_CACHE       8  /* cache debugging */
-#  define D_MALLOC     16  /* print malloc, de-alloc information */
-#  define D_JOURNAL    32
-#  define D_UPCALL     64  /* up and downcall debugging */
-#  define D_PSDEV     128
-#  define D_PIOCTL    256
-#  define D_SPECIAL   512
-#  define D_TIMING   1024
-#  define D_DOWNCALL 2048
-#  define D_KML      4096
-#  define D_FSDATA   8192
-
-#  define CDEBUG(mask, format, a...)                                    \
-        do {                                                            \
-                if (presto_debug & mask) {                              \
-                        printk("(%s:%s,l. %d %d): " format, __FILE__,   \
-                               __FUNCTION__, __LINE__, current->pid     \
-                               , ## a);                                 \
-                }                                                       \
-        } while (0)
-
-#define CERROR(format, a...)                                            \
-do {                                                                    \
-        printk("(%s:%s,l. %d %d): " format, __FILE__, __FUNCTION__,     \
-               __LINE__, current->pid , ## a);                          \
-} while (0)
-
-#  define ENTRY                                                         \
-        if (presto_print_entry)                                         \
-                printk("Process %d entered %s\n", current->pid, __FUNCTION__)
-
-#  define EXIT                                                          \
-        if (presto_print_entry)                                         \
-                printk("Process %d leaving %s at %d\n", current->pid,   \
-                       __FUNCTION__, __LINE__)
-
-#  define presto_kmem_inc(ptr, size) presto_kmemory += (size)
-#  define presto_kmem_dec(ptr, size) presto_kmemory -= (size)
-#  define presto_vmem_inc(ptr, size) presto_vmemory += (size)
-#  define presto_vmem_dec(ptr, size) presto_vmemory -= (size)
-# else /* !PRESTO_DEBUG */
-#  define CDEBUG(mask, format, a...) do {} while (0)
-#  define ENTRY do {} while (0)
-#  define EXIT do {} while (0)
-#  define presto_kmem_inc(ptr, size) do {} while (0)
-#  define presto_kmem_dec(ptr, size) do {} while (0)
-#  define presto_vmem_inc(ptr, size) do {} while (0)
-#  define presto_vmem_dec(ptr, size) do {} while (0)
-# endif /* PRESTO_DEBUG */
-
-
-struct run_ctxt {
-        struct vfsmount *pwdmnt;
-        struct dentry   *pwd;
-        struct vfsmount *rootmnt;
-        struct dentry   *root;
-        uid_t            fsuid;
-        gid_t            fsgid;
-        mm_segment_t     fs;
-	int              ngroups;
-	gid_t	         groups[NGROUPS];
-
-};
-
-static inline void push_ctxt(struct run_ctxt *save, struct run_ctxt *new)
-{
-        int i;
-        save->fs = get_fs();
-        save->pwd = dget(current->fs->pwd);
-        save->pwdmnt = mntget(current->fs->pwdmnt);
-        save->fsgid = current->fsgid;
-        save->fsuid = current->fsuid;
-        save->root = current->fs->root;
-        save->rootmnt = current->fs->rootmnt;
-        save->ngroups = current->ngroups;
-        for (i = 0; i< current->ngroups; i++) 
-                save->groups[i] = current->groups[i];
-
-        set_fs(new->fs);
-        lock_kernel();
-        set_fs_pwd(current->fs, new->pwdmnt, new->pwd);
-        if (new->root)
-                set_fs_root(current->fs, new->rootmnt, new->root);
-        unlock_kernel();
-        current->fsuid = new->fsuid;
-        current->fsgid = new->fsgid;
-        if (new->ngroups > 0) {
-                current->ngroups = new->ngroups;
-                for (i = 0; i< new->ngroups; i++) 
-                        current->groups[i] = new->groups[i];
-        }
-        
-}
-
-static inline void pop_ctxt(struct run_ctxt *saved)
-{
-        int i;
-
-        set_fs(saved->fs);
-        lock_kernel();
-        set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
-        if (saved->root)
-                set_fs_root(current->fs, saved->rootmnt, saved->root);
-        unlock_kernel();
-        current->fsuid = saved->fsuid;
-        current->fsgid = saved->fsgid;
-        current->ngroups = saved->ngroups;
-        for (i = 0; i< saved->ngroups; i++) 
-                current->groups[i] = saved->groups[i];
-
-        mntput(saved->pwdmnt);
-        dput(saved->pwd);
-}
-
-static inline struct presto_dentry_data *presto_d2d(struct dentry *dentry)
-{
-        return (struct presto_dentry_data *)(dentry->d_fsdata);
-}
-
-struct presto_cache {
-        spinlock_t          cache_lock;
-        loff_t              cache_reserved;
-        struct  vfsmount   *cache_vfsmount;
-        struct super_block *cache_sb;
-        struct  dentry     *cache_root;
-        struct list_head    cache_chain; /* for the dev/cache hash */
-
-        int   cache_flags;
-
-        char *cache_type;            /* filesystem type of cache */
-        struct filter_fs *cache_filter;
-
-        struct upc_channel *cache_psdev;  /* points to channel used */
-        struct list_head cache_channel_list; 
-        struct list_head cache_fset_list; /* filesets mounted in cache */
-};
-
-struct presto_log_fd {
-        rwlock_t         fd_lock;
-        loff_t           fd_offset;  /* offset where next record should go */
-        struct file    *fd_file;
-        int             fd_truncating;
-        unsigned int   fd_recno;   /* last recno written */
-        struct list_head  fd_reservations;
-};
-
-/* file sets */
-# define CHUNK_BITS  16
-
-struct presto_file_set {
-        struct list_head fset_list;
-        struct presto_log_fd fset_kml;
-        struct presto_log_fd fset_lml;
-        struct presto_log_fd fset_rcvd;
-        struct list_head *fset_clients;  /* cache of clients */
-        struct dentry *fset_dentry;
-        struct vfsmount *fset_mnt;
-        struct presto_cache *fset_cache;
-
-        unsigned int fset_lento_recno;  /* last recno mentioned to lento */
-        loff_t fset_lento_off;    /* last offset mentioned to lento */
-        loff_t fset_kml_logical_off; /* logical offset of kml file byte 0 */
-        char * fset_name;
-
-        int fset_flags;
-        int fset_chunkbits;
-        char *fset_reint_buf; /* temporary buffer holds kml during reint */
-
-        spinlock_t fset_permit_lock;
-        int fset_permit_count;
-        int fset_permit_upcall_count;
-        /* This queue is used both for processes waiting for the kernel to give
-         * up the permit as well as processes waiting for the kernel to be given
-         * the permit, depending on the state of FSET_HASPERMIT. */
-        wait_queue_head_t fset_permit_queue;
-
-        loff_t  fset_file_maxio;  /* writing more than this causes a close */
-        unsigned long int kml_truncate_size;
-};
-
-/* This is the default number of bytes written before a close is recorded*/
-#define FSET_DEFAULT_MAX_FILEIO (1024<<10)
-
-struct dentry *presto_tmpfs_ilookup(struct inode *dir, struct dentry *dentry, 
-                                    ino_t ino, unsigned int generation);
-struct dentry *presto_iget_ilookup(struct inode *dir, struct dentry *dentry, 
-                                    ino_t ino, unsigned int generation);
-struct dentry *presto_add_ilookup_dentry(struct dentry *parent,
-                                         struct dentry *real);
-
-struct journal_ops {
-        int (*tr_all_data)(struct inode *);
-        loff_t (*tr_avail)(struct presto_cache *fset, struct super_block *);
-        void *(*tr_start)(struct presto_file_set *, struct inode *, int op);
-        void (*tr_commit)(struct presto_file_set *, void *handle);
-        void (*tr_journal_data)(struct inode *);
-        struct dentry *(*tr_ilookup)(struct inode *dir, struct dentry *dentry, ino_t ino, unsigned int generation);
-        struct dentry *(*tr_add_ilookup)(struct dentry *parent, struct dentry *real);
-};
-
-extern struct journal_ops presto_ext2_journal_ops;
-extern struct journal_ops presto_ext3_journal_ops;
-extern struct journal_ops presto_tmpfs_journal_ops;
-extern struct journal_ops presto_xfs_journal_ops;
-extern struct journal_ops presto_reiserfs_journal_ops;
-extern struct journal_ops presto_obdfs_journal_ops;
-
-# define LENTO_FL_KML            0x0001
-# define LENTO_FL_EXPECT         0x0002
-# define LENTO_FL_VFSCHECK       0x0004
-# define LENTO_FL_JUSTLOG        0x0008
-# define LENTO_FL_WRITE_KML      0x0010
-# define LENTO_FL_CANCEL_LML     0x0020
-# define LENTO_FL_WRITE_EXPECT   0x0040
-# define LENTO_FL_IGNORE_TIME    0x0080
-# define LENTO_FL_TOUCH_PARENT   0x0100
-# define LENTO_FL_TOUCH_NEWOBJ   0x0200
-# define LENTO_FL_SET_DDFILEID   0x0400
-
-struct presto_cache *presto_get_cache(struct inode *inode);
-int presto_sprint_mounts(char *buf, int buflen, int minor);
-struct presto_file_set *presto_fset(struct dentry *de);
-int presto_journal(struct dentry *dentry, char *buf, size_t size);
-int presto_fwrite(struct file *file, const char *str, int len, loff_t *off);
-int presto_ispresto(struct inode *);
-
-/* super.c */
-extern struct file_system_type presto_fs_type;
-extern int init_intermezzo_fs(void);
-
-/* fileset.c */
-extern int izo_prepare_fileset(struct dentry *root, char *fsetname);
-char * izo_make_path(struct presto_file_set *fset, char *name);
-struct file *izo_fset_open(struct presto_file_set *fset, char *name, int flags, int mode);
-
-/* psdev.c */
-int izo_psdev_get_free_channel(void);
-int presto_psdev_init(void);
-int izo_psdev_setpid(int minor);
-extern void presto_psdev_cleanup(void);
-inline int presto_lento_up(int minor);
-int izo_psdev_setchannel(struct file *file, int fd);
-
-/* inode.c */
-extern struct super_operations presto_super_ops;
-void presto_set_ops(struct inode *inode, struct  filter_fs *filter);
-
-/* dcache.c */
-void presto_frob_dop(struct dentry *de);
-char *presto_path(struct dentry *dentry, struct dentry *root,
-                  char *buffer, int buflen);
-inline struct presto_dentry_data *izo_alloc_ddata(void);
-int presto_set_dd(struct dentry *);
-int presto_init_ddata_cache(void);
-void presto_cleanup_ddata_cache(void);
-extern struct dentry_operations presto_dentry_ops;
-
-/* dir.c */
-extern struct inode_operations presto_dir_iops;
-extern struct inode_operations presto_file_iops;
-extern struct inode_operations presto_sym_iops;
-extern struct file_operations presto_dir_fops;
-extern struct file_operations presto_file_fops;
-extern struct file_operations presto_sym_fops;
-int presto_setattr(struct dentry *de, struct iattr *iattr);
-int presto_settime(struct presto_file_set *fset, struct dentry *newobj,
-                   struct dentry *parent, struct dentry *target,
-                   struct lento_vfs_context *ctx, int valid);
-int presto_ioctl(struct inode *inode, struct file *file,
-                 unsigned int cmd, unsigned long arg);
-
-extern int presto_ilookup_uid;
-# define PRESTO_ILOOKUP_MAGIC "...ino:"
-# define PRESTO_ILOOKUP_SEP ':'
-int izo_dentry_is_ilookup(struct dentry *, ino_t *id, unsigned int *generation);
-struct dentry *presto_lookup(struct inode * dir, struct dentry *dentry);
-
-struct presto_dentry_data {
-        int dd_count; /* how mnay dentries are using this dentry */
-        struct presto_file_set *dd_fset;
-        struct dentry *dd_inodentry; 
-        loff_t dd_kml_offset;
-        int dd_flags;
-        __u64 remote_ino;
-        __u64 remote_generation;
-};
-
-struct presto_file_data {
-        int fd_do_lml;
-        loff_t fd_lml_offset;
-        size_t fd_bytes_written;
-        /* authorization related data of file at open time */
-        uid_t fd_uid;
-        gid_t fd_gid;
-        mode_t fd_mode;
-        /* identification data of calling process */
-        uid_t fd_fsuid;
-        gid_t fd_fsgid;
-        int fd_ngroups;
-        gid_t fd_groups[NGROUPS_MAX];
-        /* information how to complete the close operation */
-        struct lento_vfs_context fd_info;
-        struct presto_version fd_version;
-};
-
-/* presto.c and Lento::Downcall */
-
-int presto_walk(const char *name, struct nameidata *nd);
-int izo_clear_fsetroot(struct dentry *dentry);
-int izo_clear_all_fsetroots(struct presto_cache *cache);
-int presto_get_kmlsize(char *path, __u64 *size);
-int presto_get_lastrecno(char *path, off_t *size);
-int presto_set_fsetroot(struct dentry *dentry, char *fsetname,
-                       unsigned int flags);
-int presto_set_fsetroot_from_ioc(struct dentry *dentry, char *fsetname,
-                                 unsigned int flags);
-inline int presto_is_read_only(struct presto_file_set *);
-int presto_truncate_lml(struct presto_file_set *fset);
-int lento_write_lml(char *path,
-                     __u64 remote_ino,
-                     __u32 remote_generation,
-                     __u32 remote_version,
-                    struct presto_version *remote_file_version);
-int lento_complete_closes(char *path);
-inline int presto_f2m(struct presto_file_set *fset);
-int presto_prep(struct dentry *, struct presto_cache **,
-                       struct presto_file_set **);
-/* cache.c */
-extern struct presto_cache *presto_cache_init(void);
-extern inline void presto_cache_add(struct presto_cache *cache);
-extern inline void presto_cache_init_hash(void);
-
-struct presto_cache *presto_cache_find(struct super_block *sb);
-
-#define PRESTO_REQLOW  (3 * 4096)
-#define PRESTO_REQHIGH (6 * 4096)
-void presto_release_space(struct presto_cache *cache, loff_t req);
-int presto_reserve_space(struct presto_cache *cache, loff_t req);
-
-#define PRESTO_DATA             0x00000002 /* cached data is valid */
-#define PRESTO_ATTR             0x00000004 /* attributes cached */
-#define PRESTO_DONT_JOURNAL     0x00000008 /* things like .intermezzo/ */
-
-struct presto_file_set *presto_path2fileset(const char *name);
-int izo_revoke_permit(struct dentry *, uuid_t uuid);
-int presto_chk(struct dentry *dentry, int flag);
-void presto_set(struct dentry *dentry, int flag);
-int presto_get_permit(struct inode *inode);
-int presto_put_permit(struct inode *inode);
-int presto_set_max_kml_size(const char *path, unsigned long max_size);
-int izo_mark_dentry(struct dentry *dentry, int and, int or, int *res);
-int izo_mark_cache(struct dentry *dentry, int and_bits, int or_bits, int *);
-int izo_mark_fset(struct dentry *dentry, int and_bits, int or_bits, int *);
-void presto_getversion(struct presto_version *pv, struct inode *inode);
-int presto_i2m(struct inode *inode);
-int presto_c2m(struct presto_cache *cache);
-
-
-/* file.c */
-int izo_purge_file(struct presto_file_set *fset, char *file);
-int presto_adjust_lml(struct file *file, struct lento_vfs_context *info);
-
-/* journal.c */
-struct rec_info {
-        loff_t offset;
-        int size;
-        int recno;
-        int is_kml;
-};
-
-void presto_trans_commit(struct presto_file_set *fset, void *handle);
-void *presto_trans_start(struct presto_file_set *fset, struct inode *inode,
-                         int op);
-int presto_fread(struct file *file, char *str, int len, loff_t *off);
-int presto_clear_lml_close(struct presto_file_set *fset,
-                           loff_t  lml_offset);
-int presto_complete_lml(struct presto_file_set *fset);
-int presto_read_kml_logical_offset(struct rec_info *recinfo,
-                                   struct presto_file_set *fset);
-int presto_write_kml_logical_offset(struct presto_file_set *fset);
-struct file *presto_copy_kml_tail(struct presto_file_set *fset,
-                                  unsigned long int start);
-int presto_finish_kml_truncate(struct presto_file_set *fset,
-                               unsigned long int offset);
-int izo_lookup_file(struct presto_file_set *fset, char *path,
-                    struct nameidata *nd);
-int izo_do_truncate(struct presto_file_set *fset, struct dentry *dentry,
-                    loff_t length,  loff_t size_check);
-int izo_log_close(struct presto_log_fd *logfd);
-struct file *izo_log_open(struct presto_file_set *fset, char *name, int flags);
-int izo_init_kml_file(struct presto_file_set *, struct presto_log_fd *);
-int izo_init_lml_file(struct presto_file_set *, struct presto_log_fd *);
-int izo_init_last_rcvd_file(struct presto_file_set *, struct presto_log_fd *);
-
-/* vfs.c */
-
-/* Extra data needed in the KML for rollback operations; this structure is
- * passed around during the KML-writing process. */
-struct izo_rollback_data {
-        __u32 rb_mode;
-        __u32 rb_rdev;
-        __u64 rb_uid;
-        __u64 rb_gid;
-};
-
-int presto_write_last_rcvd(struct rec_info *recinfo,
-                           struct presto_file_set *fset,
-                           struct lento_vfs_context *info);
-void izo_get_rollback_data(struct inode *inode, struct izo_rollback_data *rb);
-int presto_do_close(struct presto_file_set *fset, struct file *file);
-int presto_do_setattr(struct presto_file_set *fset, struct dentry *dentry,
-                      struct iattr *iattr, struct lento_vfs_context *info);
-int presto_do_create(struct presto_file_set *fset, struct dentry *dir,
-                     struct dentry *dentry, int mode,
-                     struct lento_vfs_context *info);
-int presto_do_link(struct presto_file_set *fset, struct dentry *dir,
-                   struct dentry *old_dentry, struct dentry *new_dentry,
-                   struct lento_vfs_context *info);
-int presto_do_unlink(struct presto_file_set *fset, struct dentry *dir,
-                     struct dentry *dentry, struct lento_vfs_context *info);
-int presto_do_symlink(struct presto_file_set *fset, struct dentry *dir,
-                      struct dentry *dentry, const char *name,
-                      struct lento_vfs_context *info);
-int presto_do_mkdir(struct presto_file_set *fset, struct dentry *dir,
-                    struct dentry *dentry, int mode,
-                    struct lento_vfs_context *info);
-int presto_do_rmdir(struct presto_file_set *fset, struct dentry *dir,
-                    struct dentry *dentry, struct lento_vfs_context *info);
-int presto_do_mknod(struct presto_file_set *fset, struct dentry *dir,
-                    struct dentry *dentry, int mode, dev_t dev,
-                    struct lento_vfs_context *info);
-int do_rename(struct presto_file_set *fset, struct dentry *old_dir,
-              struct dentry *old_dentry, struct dentry *new_dir,
-              struct dentry *new_dentry, struct lento_vfs_context *info);
-int presto_do_statfs (struct presto_file_set *fset,
-                      struct statfs * buf);
-
-int lento_setattr(const char *name, struct iattr *iattr,
-                  struct lento_vfs_context *info);
-int lento_create(const char *name, int mode, struct lento_vfs_context *info);
-int lento_link(const char *oldname, const char *newname,
-               struct lento_vfs_context *info);
-int lento_unlink(const char *name, struct lento_vfs_context *info);
-int lento_symlink(const char *oldname,const char *newname,
-                  struct lento_vfs_context *info);
-int lento_mkdir(const char *name, int mode, struct lento_vfs_context *info);
-int lento_rmdir(const char *name, struct lento_vfs_context *info);
-int lento_mknod(const char *name, int mode, dev_t dev,
-                struct lento_vfs_context *info);
-int lento_rename(const char *oldname, const char *newname,
-                 struct lento_vfs_context *info);
-int lento_iopen(const char *name, ino_t ino, unsigned int generation,int flags);
-
-/* journal.c */
-
-#define JOURNAL_PAGE_SZ  PAGE_SIZE
-
-__inline__ int presto_no_journal(struct presto_file_set *fset);
-int journal_fetch(int minor);
-int presto_log(struct presto_file_set *fset, struct rec_info *rec,
-               const char *buf, size_t size,
-               const char *string1, int len1, 
-               const char *string2, int len2,
-               const char *string3, int len3);
-int presto_get_fileid(int minor, struct presto_file_set *fset,
-                      struct dentry *dentry);
-int presto_journal_setattr(struct rec_info *rec, struct presto_file_set *fset,
-                           struct dentry *dentry, struct presto_version *old_ver,
-                           struct izo_rollback_data *, struct iattr *iattr);
-int presto_journal_create(struct rec_info *rec, struct presto_file_set *fset,
-                          struct dentry *dentry,
-                          struct presto_version *tgt_dir_ver,
-                          struct presto_version *new_file_ver, int mode);
-int presto_journal_link(struct rec_info *rec, struct presto_file_set *fset,
-                        struct dentry *src, struct dentry *tgt,
-                        struct presto_version *tgt_dir_ver,
-                        struct presto_version *new_link_ver);
-int presto_journal_unlink(struct rec_info *rec, struct presto_file_set *fset,
-                          struct dentry *dir,
-                          struct presto_version *tgt_dir_ver,
-                          struct presto_version *old_file_ver,
-                          struct izo_rollback_data *, struct dentry *dentry,
-                          char *old_target, int old_targetlen);
-int presto_journal_symlink(struct rec_info *rec, struct presto_file_set *fset,
-                           struct dentry *dentry, const char *target,
-                           struct presto_version *tgt_dir_ver,
-                           struct presto_version *new_link_ver);
-int presto_journal_mkdir(struct rec_info *rec, struct presto_file_set *fset,
-                         struct dentry *dentry,
-                         struct presto_version *tgt_dir_ver,
-                         struct presto_version *new_dir_ver, int mode);
-int presto_journal_rmdir(struct rec_info *rec, struct presto_file_set *fset,
-                         struct dentry *dentry,
-                         struct presto_version *tgt_dir_ver,
-                         struct presto_version *old_dir_ver,
-                         struct izo_rollback_data *, int len, const char *name);
-int presto_journal_mknod(struct rec_info *rec, struct presto_file_set *fset,
-                         struct dentry *dentry,
-                         struct presto_version *tgt_dir_ver,
-                         struct presto_version *new_node_ver, int mode,
-                         int dmajor, int dminor);
-int presto_journal_rename(struct rec_info *rec, struct presto_file_set *fset,
-                          struct dentry *src, struct dentry *tgt,
-                          struct presto_version *src_dir_ver,
-                          struct presto_version *tgt_dir_ver);
-int presto_journal_open(struct rec_info *, struct presto_file_set *,
-                        struct dentry *, struct presto_version *old_ver);
-int presto_journal_close(struct rec_info *rec, struct presto_file_set *,
-                         struct file *, struct dentry *,
-                         struct presto_version *old_file_ver,
-                         struct presto_version *new_file_ver);
-int presto_write_lml_close(struct rec_info *rec,
-                           struct presto_file_set *fset, 
-                           struct file *file,
-                           __u64 remote_ino,
-                           __u64 remote_generation,
-                           struct presto_version *remote_version,
-                           struct presto_version *new_file_ver);
-void presto_log_op(void *data, int len);
-loff_t presto_kml_offset(struct presto_file_set *fset);
-
-/* upcall.c */
-#define SYNCHRONOUS 0
-#define ASYNCHRONOUS 1
-/* asynchronous calls */
-int izo_upc_kml(int minor, __u64 offset, __u32 first_recno, __u64 length,
-                __u32 last_recno, char *fsetname);
-int izo_upc_kml_truncate(int minor, __u64 length, __u32 last_recno,
-                         char *fsetname);
-int izo_upc_go_fetch_kml(int minor, char *fsetname, uuid_t uuid, __u64 kmlsize);
-int izo_upc_backfetch(int minor, char *path, char *fileset, 
-                      struct lento_vfs_context *);
-
-/* synchronous calls */
-int izo_upc_get_fileid(int minor, __u32 reclen, char *rec, 
-                       __u32 pathlen, char *path, char *fsetname);
-int izo_upc_permit(int minor, struct dentry *, __u32 pathlen, char *path,
-                   char *fset);
-int izo_upc_open(int minor, __u32 pathlen, char *path, char *fsetname, 
-                 struct lento_vfs_context *info);
-int izo_upc_connect(int minor, __u64 ip_address, __u64 port, __u8 uuid[16],
-                    int client_flag);
-int izo_upc_revoke_permit(int minor, char *fsetname, uuid_t uuid);
-int izo_upc_set_kmlsize(int minor, char *fsetname, uuid_t uuid, __u64 kmlsize);
-int izo_upc_client_make_branch(int minor, char *fsetname);
-int izo_upc_server_make_branch(int minor, char *fsetname);
-int izo_upc_branch_undo(int minor, char *fsetname, char *branchname);
-int izo_upc_branch_redo(int minor, char *fsetname, char *branchname);
-int izo_upc_repstatus(int minor,  char * fsetname, struct izo_rcvd_rec *lr_server);
-
-/* general mechanism */
-int izo_upc_upcall(int minor, int *size, struct izo_upcall_hdr *, int async);
-
-/* replicator.c */
-int izo_repstatus(struct presto_file_set *fset, __u64 client_kmlsize, 
-                  struct izo_rcvd_rec *lr_client, struct izo_rcvd_rec *lr_server);
-int izo_rep_cache_init(struct presto_file_set *);
-loff_t izo_rcvd_get(struct izo_rcvd_rec *, struct presto_file_set *, char *uuid);
-loff_t izo_rcvd_write(struct presto_file_set *, struct izo_rcvd_rec *);
-loff_t izo_rcvd_upd_remote(struct presto_file_set *fset, char * uuid,  __u64 remote_recno,
-                           __u64 remote_offset);
-
-/* sysctl.c */
-int init_intermezzo_sysctl(void);
-void cleanup_intermezzo_sysctl(void);
-
-/* ext_attr.c */
-/* We will be more tolerant than the default ea patch with attr name sizes and
- * the size of value. If these come via VFS from the default ea patches, the
- * corresponding character strings will be truncated anyway. During journalling- * we journal length for both name and value. See journal_set_ext_attr.
- */
-#define PRESTO_EXT_ATTR_NAME_MAX 128
-#define PRESTO_EXT_ATTR_VALUE_MAX 8192
-
-#define PRESTO_ALLOC(ptr, size)                                         \
-do {                                                                    \
-        long s = (size);                                                \
-        (ptr) = kmalloc(s, GFP_KERNEL);                                 \
-        if ((ptr) == NULL)                                              \
-                CERROR("IZO: out of memory at %s:%d (trying to "        \
-                       "allocate %ld)\n", __FILE__, __LINE__, s);       \
-        else {                                                          \
-                presto_kmem_inc((ptr), s);                              \
-                memset((ptr), 0, s);                                    \
-        }                                                               \
-        CDEBUG(D_MALLOC, "kmalloced: %ld at %p (tot %ld).\n",           \
-               s, (ptr), presto_kmemory);                               \
-} while (0)
-
-#define PRESTO_FREE(ptr, size)                                          \
-do {                                                                    \
-        long s = (size);                                                \
-        if ((ptr) == NULL) {                                            \
-                CERROR("IZO: free NULL pointer (%ld bytes) at "         \
-                       "%s:%d\n", s, __FILE__, __LINE__);               \
-                break;                                                  \
-        }                                                               \
-        kfree(ptr);                                                     \
-        CDEBUG(D_MALLOC, "kfreed: %ld at %p (tot %ld).\n",              \
-               s, (ptr), presto_kmemory);                               \
-        presto_kmem_dec((ptr), s);                                      \
-} while (0)
-
-static inline int dentry_name_cmp(struct dentry *dentry, char *name)
-{
-        return (strlen(name) == dentry->d_name.len &&
-                memcmp(name, dentry->d_name.name, dentry->d_name.len) == 0);
-}
-
-static inline char *strdup(char *str)
-{
-        char *tmp;
-        tmp = kmalloc(strlen(str) + 1, GFP_KERNEL);
-        if (tmp)
-                memcpy(tmp, str, strlen(str) + 1);
-               
-        return tmp;
-}
-
-/* buffer MUST be at least the size of izo_ioctl_hdr */
-static inline int izo_ioctl_getdata(char *buf, char *end, void *arg)
-{
-        struct izo_ioctl_hdr *hdr;
-        struct izo_ioctl_data *data;
-        int err;
-        ENTRY;
-
-        hdr = (struct izo_ioctl_hdr *)buf;
-        data = (struct izo_ioctl_data *)buf;
-
-        err = copy_from_user(buf, (void *)arg, sizeof(*hdr));
-        if ( err ) {
-                EXIT;
-                return err;
-        }
-
-        if (hdr->ioc_version != IZO_IOCTL_VERSION) {
-                CERROR("IZO: version mismatch kernel vs application\n");
-                return -EINVAL;
-        }
-
-        if (hdr->ioc_len + buf >= end) {
-                CERROR("IZO: user buffer exceeds kernel buffer\n");
-                return -EINVAL;
-        }
-
-        if (hdr->ioc_len < sizeof(struct izo_ioctl_data)) {
-                CERROR("IZO: user buffer too small for ioctl\n");
-                return -EINVAL;
-        }
-
-        err = copy_from_user(buf, (void *)arg, hdr->ioc_len);
-        if ( err ) {
-                EXIT;
-                return err;
-        }
-
-        if (izo_ioctl_is_invalid(data)) {
-                CERROR("IZO: ioctl not correctly formatted\n");
-                return -EINVAL;
-        }
-
-        if (data->ioc_inllen1) {
-                data->ioc_inlbuf1 = &data->ioc_bulk[0];
-        }
-
-        if (data->ioc_inllen2) {
-                data->ioc_inlbuf2 = &data->ioc_bulk[0] +
-                        size_round(data->ioc_inllen1);
-        }
-
-        EXIT;
-        return 0;
-}
-
-# define MYPATHLEN(buffer, path) ((buffer) + PAGE_SIZE - (path))
-
-# define free kfree
-# define malloc(a) kmalloc(a, GFP_KERNEL)
-# define printf printk
-int kml_reint_rec(struct file *dir, struct izo_ioctl_data *data);
-int izo_get_fileid(struct file *dir, struct izo_ioctl_data *data);
-int izo_set_fileid(struct file *dir, struct izo_ioctl_data *data);
-
-#else /* __KERNEL__ */
-# include <stdlib.h>
-# include <stdio.h>
-# include <sys/types.h>
-# include <sys/ioctl.h>
-# include <string.h>
-
-# define printk printf
-# ifndef CERROR
-#   define CERROR printf
-# endif
-# define kmalloc(a,b) malloc(a)
-
-void init_fsreintdata (void);
-int kml_fsreint(struct kml_rec *rec, char *basedir);
-int kml_iocreint(__u32 size, char *ptr, __u32 offset, int dird,
-                 uuid_t uuid, __u32 generate_kml);
-
-static inline int izo_ioctl_packlen(struct izo_ioctl_data *data);
-
-static inline void izo_ioctl_init(struct izo_ioctl_data *data)
-{
-        memset(data, 0, sizeof(*data));
-        data->ioc_len = sizeof(*data);
-        data->ioc_version = IZO_IOCTL_VERSION;
-}
-
-static inline int
-izo_ioctl_pack(struct izo_ioctl_data *data, char **pbuf, int max)
-{
-        char *ptr;
-        struct izo_ioctl_data *overlay;
-        data->ioc_len = izo_ioctl_packlen(data);
-        data->ioc_version = IZO_IOCTL_VERSION;
-
-        if (*pbuf && izo_ioctl_packlen(data) > max)
-                return 1;
-        if (*pbuf == NULL)
-                *pbuf = malloc(data->ioc_len);
-        if (*pbuf == NULL)
-                return 1;
-        overlay = (struct izo_ioctl_data *)*pbuf;
-        memcpy(*pbuf, data, sizeof(*data));
-
-        ptr = overlay->ioc_bulk;
-        if (data->ioc_inlbuf1)
-                LOGL(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
-        if (data->ioc_inlbuf2)
-                LOGL(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
-        if (izo_ioctl_is_invalid(overlay))
-                return 1;
-
-        return 0;
-}
-
-#endif /* __KERNEL__*/
-
-#define IZO_ERROR_NAME 1
-#define IZO_ERROR_UPDATE 2
-#define IZO_ERROR_DELETE 3
-#define IZO_ERROR_RENAME 4
-
-static inline char *izo_error(int err)
-{
-#ifndef __KERNEL__
-        if (err <= 0)
-                return strerror(-err);
-#endif
-        switch (err) {
-        case IZO_ERROR_NAME:
-                return "InterMezzo name/name conflict";
-        case IZO_ERROR_UPDATE:
-                return "InterMezzo update/update conflict";
-        case IZO_ERROR_DELETE:
-                return "InterMezzo update/delete conflict";
-        case IZO_ERROR_RENAME:
-                return "InterMezzo rename/rename conflict";
-        }
-        return "Unknown InterMezzo error";
-}
-
-static inline int izo_ioctl_packlen(struct izo_ioctl_data *data)
-{
-        int len = sizeof(struct izo_ioctl_data);
-        len += size_round(data->ioc_inllen1);
-        len += size_round(data->ioc_inllen2);
-        return len;
-}
-
-static inline int izo_ioctl_is_invalid(struct izo_ioctl_data *data)
-{
-        if (data->ioc_len > (1<<30)) {
-                CERROR("IZO ioctl: ioc_len larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen1 > (1<<30)) {
-                CERROR("IZO ioctl: ioc_inllen1 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen2 > (1<<30)) {
-                CERROR("IZO ioctl: ioc_inllen2 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf1 && !data->ioc_inllen1) {
-                CERROR("IZO ioctl: inlbuf1 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf2 && !data->ioc_inllen2) {
-                CERROR("IZO ioctl: inlbuf2 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_pbuf1 && !data->ioc_plen1) {
-                CERROR("IZO ioctl: pbuf1 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_pbuf2 && !data->ioc_plen2) {
-                CERROR("IZO ioctl: pbuf2 pointer but 0 length\n");
-                return 1;
-        }
-        if (izo_ioctl_packlen(data) != data->ioc_len ) {
-                CERROR("IZO ioctl: packlen exceeds ioc_len\n");
-                return 1;
-        }
-        if (data->ioc_inllen1 &&
-            data->ioc_bulk[data->ioc_inllen1 - 1] != '\0') {
-                CERROR("IZO ioctl: inlbuf1 not 0 terminated\n");
-                return 1;
-        }
-        if (data->ioc_inllen2 &&
-            data->ioc_bulk[size_round(data->ioc_inllen1) + data->ioc_inllen2
-                           - 1] != '\0') {
-                CERROR("IZO ioctl: inlbuf2 not 0 terminated\n");
-                return 1;
-        }
-        return 0;
-}
-
-/* kml_unpack.c */
-char *kml_print_rec(struct kml_rec *rec, int brief);
-int kml_unpack(struct kml_rec *rec, char **buf, char *end);
-
-/* fs 2.5 compat */
-
-/* is_read_only() is replaced by bdev_read_only which takes struct
-   block_device *.  Since this is only needed for debugging, it can be
-   safely ignored now.
-*/
-#define is_read_only(dev) 0
-
-#endif
diff -Nru a/include/linux/intermezzo_journal.h b/include/linux/intermezzo_journal.h
--- a/include/linux/intermezzo_journal.h	Sun Dec 15 18:08:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,26 +0,0 @@
-#ifndef __PRESTO_JOURNAL_H
-#define __PRESTO_JOURNAL_H
-
-
-#include <linux/version.h>
-
-struct journal_prefix {
-	int len;
-        u32 version;
-	int pid;
-	int uid;
-	int fsuid;
-	int fsgid;
-	int opcode;
-        u32 ngroups;
-        u32 groups[0];
-};
-
-struct journal_suffix {
-	unsigned long prevrec;  /* offset of previous record for dentry */
-	int recno;
-	int time;
-	int len;
-};
-
-#endif
diff -Nru a/include/linux/intermezzo_kml.h b/include/linux/intermezzo_kml.h
--- a/include/linux/intermezzo_kml.h	Sun Dec 15 18:08:33 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,261 +0,0 @@
-#ifndef __INTERMEZZO_KML_H
-#define __INTERMEZZO_KML_H
-
-#include <linux/version.h>
-#include <linux/intermezzo_psdev.h>
-#include <linux/fs.h>
-#include <linux/intermezzo_journal.h>
-
-#define PRESTO_KML_MAJOR_VERSION 0x00010000
-#define PRESTO_KML_MINOR_VERSION 0x00002001
-#define PRESTO_OP_NOOP          0
-#define PRESTO_OP_CREATE        1
-#define PRESTO_OP_MKDIR         2
-#define PRESTO_OP_UNLINK        3
-#define PRESTO_OP_RMDIR         4
-#define PRESTO_OP_CLOSE         5
-#define PRESTO_OP_SYMLINK       6
-#define PRESTO_OP_RENAME        7
-#define PRESTO_OP_SETATTR       8
-#define PRESTO_OP_LINK          9
-#define PRESTO_OP_OPEN          10
-#define PRESTO_OP_MKNOD         11
-#define PRESTO_OP_WRITE         12
-#define PRESTO_OP_RELEASE       13
-#define PRESTO_OP_TRUNC         14
-#define PRESTO_OP_SETEXTATTR    15
-#define PRESTO_OP_DELEXTATTR    16
-
-#define PRESTO_LML_DONE     	1 /* flag to get first write to do LML */
-#define KML_KOP_MARK            0xffff
-
-struct presto_lml_data {
-        loff_t   rec_offset;
-};
-
-struct big_journal_prefix {
-        u32 len;
-        u32 version; 
-        u32 pid;
-        u32 uid;
-        u32 fsuid;
-        u32 fsgid;
-        u32 opcode;
-        u32 ngroups;
-        u32 groups[NGROUPS_MAX];
-};
-
-enum kml_opcode {
-        KML_CREATE = 1,
-        KML_MKDIR,
-        KML_UNLINK,
-        KML_RMDIR,
-        KML_CLOSE,
-        KML_SYMLINK,
-        KML_RENAME,
-        KML_SETATTR,
-        KML_LINK,
-        KML_OPEN,
-        KML_MKNOD,
-        KML_ENDMARK = 0xff
-};
-
-struct kml_create {
-	char 			*path;
-	struct presto_version 	new_objectv, 
-				old_parentv, 
-				new_parentv;
-	int 			mode;
-	int 			uid;
-	int 			gid;
-};
-
-struct kml_open {
-};
-
-struct kml_mkdir {
-	char 			*path;
-	struct presto_version 	new_objectv, 
-				old_parentv, 
-				new_parentv;
-	int 			mode;
-	int 			uid;
-	int 			gid;
-};
-
-struct kml_unlink {
-	char 			*path, 	
-				*name;
-	struct presto_version 	old_tgtv, 
-				old_parentv, 
-				new_parentv;
-};
-
-struct kml_rmdir {
-	char 			*path, 
-				*name;
-	struct presto_version 	old_tgtv, 
-				old_parentv, 
-				new_parentv;
-};
-
-struct kml_close {
-	int 			open_mode, 
-				open_uid, 
-				open_gid;
-	char 			*path;
-	struct presto_version 	new_objectv;
-	__u64 			ino;
-      	int 			generation;
-};
-
-struct kml_symlink {
-	char 			*sourcepath, 	
-				*targetpath;
-	struct presto_version 	new_objectv, 
-				old_parentv, 
-				new_parentv;
-      	int 			uid;
-	int 			gid;
-};
-
-struct kml_rename {
-	char 			*sourcepath, 
-				*targetpath;
-	struct presto_version 	old_objectv, 
-				new_objectv, 
-				old_tgtv, 
-				new_tgtv;
-};
-
-struct kml_setattr {
-	char 			*path;
-	struct presto_version 	old_objectv;
-	struct iattr 		iattr;
-};
-
-struct kml_link {
-	char 			*sourcepath, 	
-				*targetpath;
-	struct presto_version 	new_objectv, 
-				old_parentv, 
-				new_parentv;
-};
-
-struct kml_mknod {
-	char 			*path;
-	struct presto_version 	new_objectv, 
-				old_parentv, 
-				new_parentv;
-	int 			mode;
-      	int 			uid;
-	int 			gid;
-       	int 			major;
-	int 			minor;
-};
-
-/* kml record items for optimizing */
-struct kml_kop_node
-{
-        u32             kml_recno;
-        u32             kml_flag;
-        u32             kml_op;
-        nlink_t         i_nlink;
-        u32             i_ino;
-};
-
-struct kml_kop_lnode
-{
-        struct list_head chains;
-        struct kml_kop_node node;
-};
-
-struct kml_endmark {
-	u32			total;
-	struct kml_kop_node 	*kop;
-};
-
-/* kml_flag */
-#define  KML_REC_DELETE               1
-#define  KML_REC_EXIST                0
-
-struct kml_optimize {
-	struct list_head kml_chains;
-        u32              kml_flag;
-        u32              kml_op;
-        nlink_t          i_nlink;
-        u32              i_ino;
-};
-
-struct kml_rec {
-	/* attribute of this record */
-	int 				rec_size;
-        int     			rec_kml_offset;
-
-	struct 	big_journal_prefix 	rec_head;
-	union {
-		struct kml_create 	create;
-		struct kml_open 	open;
-		struct kml_mkdir 	mkdir;
-		struct kml_unlink 	unlink;
-		struct kml_rmdir 	rmdir;
-		struct kml_close 	close;
-		struct kml_symlink 	symlink;
-		struct kml_rename 	rename;
-		struct kml_setattr 	setattr;
-		struct kml_mknod 	mknod;
-		struct kml_link 	link;
-		struct kml_endmark      endmark;
-	} rec_kml;
-        struct 	journal_suffix 		rec_tail;
-
-        /* for kml optimize only */
-        struct  kml_optimize kml_optimize;
-};
-
-/* kml record items for optimizing */
-extern void kml_kop_init (struct presto_file_set *fset);
-extern void kml_kop_addrec (struct presto_file_set *fset, 
-		struct inode *ino, u32 op, u32 flag);
-extern int  kml_kop_flush (struct presto_file_set *fset);
-
-/* defined in kml_setup.c */
-extern int kml_init (struct presto_file_set *fset);
-extern int kml_cleanup (struct presto_file_set *fset);
-
-/* defined in kml.c */
-extern int begin_kml_reint (struct file *file, unsigned long arg);
-extern int do_kml_reint (struct file *file, unsigned long arg);
-extern int end_kml_reint (struct file *file, unsigned long arg);
-
-/* kml_utils.c */
-extern char *dlogit (void *tbuf, const void *sbuf, int size);
-extern char * bdup_printf (char *format, ...);
-
-/* defined in kml_decode.c */
-/* printop */
-#define  PRINT_KML_PREFIX             0x1
-#define  PRINT_KML_SUFFIX             0x2
-#define  PRINT_KML_REC                0x4
-#define  PRINT_KML_OPTIMIZE           0x8
-#define  PRINT_KML_EXIST              0x10
-#define  PRINT_KML_DELETE             0x20
-extern void   kml_printrec (struct kml_rec *rec, int printop);
-extern int    print_allkmlrec (struct list_head *head, int printop);
-extern int    delete_kmlrec (struct list_head *head);
-extern int    kml_decoderec (char *buf, int pos, int buflen, int *size,
-	                     struct kml_rec **newrec);
-extern int decode_kmlrec (struct list_head *head, char *kml_buf, int buflen);
-extern void kml_freerec (struct kml_rec *rec);
-
-/* defined in kml_reint.c */
-#define KML_CLOSE_BACKFETCH            1
-extern int kml_reintbuf (struct  kml_fsdata *kml_fsdata,
-                  	char *mtpt, struct kml_rec **rec);
-
-/* defined in kml_setup.c */
-extern int kml_init (struct presto_file_set *fset);
-extern int kml_cleanup (struct presto_file_set *fset);
-
-#endif
-
diff -Nru a/include/linux/intermezzo_psdev.h b/include/linux/intermezzo_psdev.h
--- a/include/linux/intermezzo_psdev.h	Sun Dec 15 18:08:29 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,57 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __PRESTO_PSDEV_H
-#define __PRESTO_PSDEV_H
-
-#define MAX_CHANNEL 16
-#define PROCNAME_SIZE 32
-#include <linux/smp_lock.h>
-#include <linux/smp_lock.h>
-#include <linux/version.h>
-
-/* represents state of an instance reached with /dev/intermezzo */
-/* communication pending & processing queues */
-struct upc_channel {
-        unsigned int         uc_seq;
-        wait_queue_head_t    uc_waitq;    /* Lento wait queue */
-        struct list_head     uc_pending;
-        struct list_head     uc_processing;
-        spinlock_t            uc_lock;
-        int                  uc_pid;      /* Lento's pid */
-        int                  uc_hard;     /* allows signals during upcalls */
-        int                  uc_no_filter;
-        int                  uc_no_journal;
-        int                  uc_no_upcall;
-        int                  uc_timeout;  /* . sec: signals will dequeue upc */
-        long                 uc_errorval; /* for testing I/O failures */
-        struct list_head     uc_cache_list;
-        int                  uc_minor;
-};
-
-#define ISLENTO(minor) (current->pid == izo_channels[minor].uc_pid \
-                || current->real_parent->pid == izo_channels[minor].uc_pid \
-                || current->real_parent->real_parent->pid == izo_channels[minor].uc_pid)
-
-extern struct upc_channel izo_channels[MAX_CHANNEL];
-
-/* message types between presto filesystem in kernel */
-#define REQ_READ   1
-#define REQ_WRITE  2
-#define REQ_ASYNC  4
-#define REQ_DEAD   8
-
-struct upc_req {
-        struct list_head   rq_chain;
-        caddr_t            rq_data;
-        int                rq_flags;
-        int                rq_bufsize;
-        int                rq_rep_size;
-        int                rq_opcode;  /* copied from data to save lookup */
-        int                rq_unique;
-        wait_queue_head_t  rq_sleep;   /* process' wait queue */
-        unsigned long      rq_posttime;
-};
-
-#endif
diff -Nru a/include/linux/intermezzo_upcall.h b/include/linux/intermezzo_upcall.h
--- a/include/linux/intermezzo_upcall.h	Sun Dec 15 18:08:28 2002
+++ /dev/null	Wed Dec 31 16:00:00 1969
@@ -1,146 +0,0 @@
-/*
- * Based on cfs.h from Coda, but revamped for increased simplicity.
- * Linux modifications by Peter Braam, Aug 1996
- * Rewritten for InterMezzo
- */
-
-#ifndef _PRESTO_HEADER_
-#define _PRESTO_HEADER_
-
-
-/* upcall.c */
-#define SYNCHRONOUS 0
-#define ASYNCHRONOUS 1
-
-int lento_permit(int minor, int pathlen, int fsetnamelen, char *path, char *fset);
-int lento_opendir(int minor, int pathlen, char *path, int async);
-int lento_kml(int minor, unsigned int offset, unsigned int first_recno,
-              unsigned int length, unsigned int last_recno, int namelen,
-              char *fsetname);
-int lento_open(int minor, int pathlen, char *path);
-int lento_journal(int minor, char *page, int async);
-int lento_release_permit(int minor, int cookie);
-
-/*
- * Kernel <--> Lento communications.
- */
-/* upcalls */
-#define LENTO_PERMIT    1
-#define LENTO_JOURNAL   2
-#define LENTO_OPENDIR   3
-#define LENTO_OPEN      4
-#define LENTO_SIGNAL    5
-#define LENTO_KML       6
-#define LENTO_COOKIE    7
-
-/*         Lento <-> Presto  RPC arguments       */
-struct lento_up_hdr {
-        unsigned int opcode;
-        unsigned int unique;    /* Keep multiple outstanding msgs distinct */
-        u_short pid;            /* Common to all */
-        u_short uid;
-};
-
-/* This structure _must_ sit at the beginning of the buffer */
-struct lento_down_hdr {
-        unsigned int opcode;
-        unsigned int unique;    
-        unsigned int result;
-};
-
-/* lento_permit: */
-struct lento_permit_in {
-        struct lento_up_hdr uh;
-        int pathlen;
-        int fsetnamelen;
-        char path[0];
-};
-struct lento_permit_out {
-        struct lento_down_hdr dh;
-};
-
-
-/* lento_opendir: */
-struct lento_opendir_in {
-        struct lento_up_hdr uh;
-        int async;
-        int pathlen;
-        char path[0];
-};
-struct lento_opendir_out {
-        struct lento_down_hdr dh;
-};
-
-
-/* lento_kml: */
-struct lento_kml_in {
-        struct lento_up_hdr uh;
-        unsigned int offset;
-        unsigned int first_recno;
-        unsigned int length;
-        unsigned int last_recno;
-        int namelen;
-        char fsetname[0];
-};
-
-struct lento_kml_out {
-        struct lento_down_hdr dh;
-};
-
-
-/* lento_open: */
-struct lento_open_in {
-        struct lento_up_hdr uh;
-        int pathlen;
-        char path[0];
-};
-struct lento_open_out {
-    struct lento_down_hdr dh;
-};
-
-/* lento_response_cookie */
-struct lento_response_cookie_in {
-        struct lento_up_hdr uh;
-        int cookie;
-};
-
-struct lento_response_cookie_out {
-    struct lento_down_hdr dh;
-};
-
-
-struct lento_mknod {
-  struct lento_down_hdr dh;
-  int    major;
-  int    minor;
-  int    mode;
-  char   path[0];
-};
-
-
-/* NB: every struct below begins with an up_hdr */
-union up_args {
-    struct lento_up_hdr uh;             
-    struct lento_permit_in lento_permit;
-    struct lento_open_in lento_open;
-    struct lento_opendir_in lento_opendir;
-    struct lento_kml_in lento_kml;
-    struct lento_response_cookie_in lento_response_cookie;
-};
-
-union down_args {
-    struct lento_down_hdr dh;
-    struct lento_permit_out lento_permit;
-    struct lento_open_out lento_open;
-    struct lento_opendir_out lento_opendir;
-    struct lento_kml_out lento_kml;
-    struct lento_response_cookie_out lento_response_cookie;
-};    
-
-#include "intermezzo_psdev.h"
-
-int lento_upcall(int minor, int read_size, int *rep_size, 
-                 union up_args *buffer, int async,
-                 struct upc_req *rq );
-#endif 
-
diff -Nru a/include/linux/kernel.h b/include/linux/kernel.h
--- a/include/linux/kernel.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/kernel.h	Sun Dec 15 18:08:28 2002
@@ -38,6 +38,13 @@
 #define	KERN_INFO	"<6>"	/* informational			*/
 #define	KERN_DEBUG	"<7>"	/* debug-level messages			*/
 
+extern int console_printk[];
+
+#define console_loglevel (console_printk[0])
+#define default_message_loglevel (console_printk[1])
+#define minimum_console_loglevel (console_printk[2])
+#define default_console_loglevel (console_printk[3])
+
 struct completion;
 
 #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
@@ -71,7 +78,7 @@
 extern int vsscanf(const char *, const char *, va_list);
 
 extern int get_option(char **str, int *pint);
-extern char *get_options(char *str, int nints, int *ints);
+extern char *get_options(const char *str, int nints, int *ints);
 extern unsigned long long memparse(char *ptr, char **retptr);
 extern void dev_probe_lock(void);
 extern void dev_probe_unlock(void);
@@ -80,8 +87,6 @@
 
 asmlinkage int printk(const char * fmt, ...)
 	__attribute__ ((format (printf, 1, 2)));
-
-extern int console_loglevel;
 
 static inline void console_silent(void)
 {
diff -Nru a/include/linux/mm.h b/include/linux/mm.h
--- a/include/linux/mm.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/mm.h	Sun Dec 15 18:08:28 2002
@@ -70,7 +70,6 @@
 	unsigned long vm_pgoff;		/* Offset (within vm_file) in PAGE_SIZE
 					   units, *not* PAGE_CACHE_SIZE */
 	struct file * vm_file;		/* File we map to (can be NULL). */
-	unsigned long vm_raend;		/* XXX: put full readahead info here. */
 	void * vm_private_data;		/* was vm_pte (shared mem) */
 };
 
@@ -355,7 +354,6 @@
 
 extern void show_free_areas(void);
 
-extern int fail_writepage(struct page *);
 struct page * shmem_nopage(struct vm_area_struct * vma, unsigned long address, int unused);
 struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags);
 extern void shmem_lock(struct file * file, int lock);
@@ -517,6 +515,7 @@
 			   unsigned long offset);
 void handle_ra_miss(struct address_space *mapping, 
 		    struct file_ra_state *ra);
+unsigned long max_sane_readahead(unsigned long nr);
 
 /* Do stack extension */
 extern int expand_stack(struct vm_area_struct * vma, unsigned long address);
diff -Nru a/include/linux/module.h b/include/linux/module.h
--- a/include/linux/module.h	Sun Dec 15 18:08:31 2002
+++ b/include/linux/module.h	Sun Dec 15 18:08:31 2002
@@ -20,10 +20,6 @@
 #include <asm/module.h>
 #include <asm/uaccess.h> /* For struct exception_table_entry */
 
-/* Indirect stringification */
-#define __MODULE_STRING_1(x)	#x
-#define __MODULE_STRING(x)	__MODULE_STRING_1(x)
-
 /* Not Yet Implemented */
 #define MODULE_LICENSE(name)
 #define MODULE_AUTHOR(name)
@@ -116,10 +112,16 @@
 	atomic_t count;
 } ____cacheline_aligned;
 
+enum module_state
+{
+	MODULE_STATE_LIVE,
+	MODULE_STATE_COMING,
+	MODULE_STATE_GOING,
+};
+
 struct module
 {
-	/* Am I live (yet)? */
-	int live;
+	enum module_state state;
 
 	/* Member of list of modules */
 	struct list_head list;
@@ -177,6 +179,14 @@
 	char args[0];
 };
 
+/* FIXME: It'd be nice to isolate modules during init, too, so they
+   aren't used before they (may) fail.  But presently too much code
+   (IDE & SCSI) require entry into the module during init.*/
+static inline int module_is_live(struct module *mod)
+{
+	return mod->state != MODULE_STATE_GOING;
+}
+
 #ifdef CONFIG_MODULE_UNLOAD
 
 void __symbol_put(const char *symbol);
@@ -195,7 +205,7 @@
 
 	if (module) {
 		unsigned int cpu = get_cpu();
-		if (likely(module->live))
+		if (likely(module_is_live(module)))
 			local_inc(&module->ref[cpu].count);
 		else
 			ret = 0;
@@ -210,7 +220,7 @@
 		unsigned int cpu = get_cpu();
 		local_dec(&module->ref[cpu].count);
 		/* Maybe they're waiting for us to drop reference? */
-		if (unlikely(!module->live))
+		if (unlikely(!module_is_live(module)))
 			wake_up_process(module->waiter);
 		put_cpu();
 	}
@@ -219,7 +229,7 @@
 #else /*!CONFIG_MODULE_UNLOAD*/
 static inline int try_module_get(struct module *module)
 {
-	return !module || module->live;
+	return !module || module_is_live(module);
 }
 static inline void module_put(struct module *module)
 {
@@ -291,6 +301,21 @@
 #define __MOD_DEC_USE_COUNT(mod) module_put(mod)
 #define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)
 
+struct obsolete_modparm {
+	char name[64];
+	char type[64-sizeof(void *)];
+	void *addr;
+};
+#ifdef MODULE
+/* DEPRECATED: Do not use. */
+#define MODULE_PARM(var,type)						    \
+struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
+{ __stringify(var), type };
+
+#else
+#define MODULE_PARM(var,type)
+#endif
+
 /* People do this inside their init routines, when the module isn't
    "live" yet.  They should no longer be doing that, but
    meanwhile... */
@@ -303,11 +328,11 @@
 #endif
 #define MOD_DEC_USE_COUNT module_put(THIS_MODULE)
 #define try_inc_mod_count(mod) try_module_get(mod)
-#define MODULE_PARM(parm,string)
 #define EXPORT_NO_SYMBOLS
 extern int module_dummy_usage;
 #define GET_USE_COUNT(module) (module_dummy_usage)
 #define MOD_IN_USE 0
+#define __MODULE_STRING(x) __stringify(x)
 #define __mod_between(a_start, a_len, b_start, b_len)		\
 (((a_start) >= (b_start) && (a_start) <= (b_start)+(b_len))	\
  || ((a_start)+(a_len) >= (b_start)				\
diff -Nru a/include/linux/moduleparam.h b/include/linux/moduleparam.h
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/include/linux/moduleparam.h	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,127 @@
+#ifndef _LINUX_MODULE_PARAMS_H
+#define _LINUX_MODULE_PARAMS_H
+/* (C) Copyright 2001, 2002 Rusty Russell IBM Corporation */
+#include <linux/init.h>
+#include <linux/stringify.h>
+
+/* You can override this manually, but generally this should match the
+   module name. */
+#ifdef MODULE
+#define MODULE_PARAM_PREFIX /* empty */
+#else
+#define MODULE_PARAM_PREFIX __stringify(KBUILD_MODNAME) "."
+#endif
+
+struct kernel_param;
+
+/* Returns 0, or -errno.  arg is in kp->arg. */
+typedef int (*param_set_fn)(const char *val, struct kernel_param *kp);
+/* Returns length written or -errno.  Buffer is 4k (ie. be short!) */
+typedef int (*param_get_fn)(char *buffer, struct kernel_param *kp);
+
+struct kernel_param {
+	const char *name;
+	unsigned int perm;
+	param_set_fn set;
+	param_get_fn get;
+	void *arg;
+};
+
+/* Special one for strings we want to copy into */
+struct kparam_string {
+	unsigned int maxlen;
+	char *string;
+};
+
+/* This is the fundamental function for registering boot/module
+   parameters.  perm sets the visibility in driverfs: 000 means it's
+   not there, read bits mean it's readable, write bits mean it's
+   writable. */
+#define __module_param_call(prefix, name, set, get, arg, perm)		\
+	static char __param_str_##name[] __initdata = prefix #name;	\
+	static struct kernel_param __param_##name			\
+		 __attribute__ ((unused,__section__ ("__param")))	\
+	= { __param_str_##name, perm, set, get, arg }
+
+#define module_param_call(name, set, get, arg, perm)			      \
+	__module_param_call(MODULE_PARAM_PREFIX, name, set, get, arg, perm)
+
+/* Helper functions: type is byte, short, ushort, int, uint, long,
+   ulong, charp, bool or invbool, or XXX if you define param_get_XXX,
+   param_set_XXX and param_check_XXX. */
+#define module_param_named(name, value, type, perm)			   \
+	param_check_##type(name, &(value));				   \
+	module_param_call(name, param_set_##type, param_get_##type, &value, perm)
+
+#define module_param(name, type, perm)				\
+	module_param_named(name, name, type, perm)
+
+/* Actually copy string: maxlen param is usually sizeof(string). */
+#define module_param_string(name, string, len, perm)			\
+	static struct kparam_string __param_string_##name __initdata	\
+		= { len, string };					\
+	module_param_call(name, param_set_copystring, param_get_charp,	\
+		   &__param_string_##name, perm)
+
+/* Called on module insert or kernel boot */
+extern int parse_args(const char *name,
+		      char *args,
+		      struct kernel_param *params,
+		      unsigned num,
+		      int (*unknown)(char *param, char *val));
+
+/* All the helper functions */
+/* The macros to do compile-time type checking stolen from Jakub
+   Jelinek, who IIRC came up with this idea for the 2.4 module init code. */
+#define __param_check(name, p, type) \
+	static inline type *__check_##name(void) { return(p); }
+
+extern int param_set_short(const char *val, struct kernel_param *kp);
+extern int param_get_short(char *buffer, struct kernel_param *kp);
+#define param_check_short(name, p) __param_check(name, p, short)
+
+extern int param_set_ushort(const char *val, struct kernel_param *kp);
+extern int param_get_ushort(char *buffer, struct kernel_param *kp);
+#define param_check_ushort(name, p) __param_check(name, p, unsigned short)
+
+extern int param_set_int(const char *val, struct kernel_param *kp);
+extern int param_get_int(char *buffer, struct kernel_param *kp);
+#define param_check_int(name, p) __param_check(name, p, int)
+
+extern int param_set_uint(const char *val, struct kernel_param *kp);
+extern int param_get_uint(char *buffer, struct kernel_param *kp);
+#define param_check_uint(name, p) __param_check(name, p, unsigned int)
+
+extern int param_set_long(const char *val, struct kernel_param *kp);
+extern int param_get_long(char *buffer, struct kernel_param *kp);
+#define param_check_long(name, p) __param_check(name, p, long)
+
+extern int param_set_ulong(const char *val, struct kernel_param *kp);
+extern int param_get_ulong(char *buffer, struct kernel_param *kp);
+#define param_check_ulong(name, p) __param_check(name, p, unsigned long)
+
+extern int param_set_charp(const char *val, struct kernel_param *kp);
+extern int param_get_charp(char *buffer, struct kernel_param *kp);
+#define param_check_charp(name, p) __param_check(name, p, char *)
+
+extern int param_set_bool(const char *val, struct kernel_param *kp);
+extern int param_get_bool(char *buffer, struct kernel_param *kp);
+#define param_check_bool(name, p) __param_check(name, p, int)
+
+extern int param_set_invbool(const char *val, struct kernel_param *kp);
+extern int param_get_invbool(char *buffer, struct kernel_param *kp);
+#define param_check_invbool(name, p) __param_check(name, p, int)
+
+/* First two elements are the max and min array length (which don't change) */
+extern int param_set_intarray(const char *val, struct kernel_param *kp);
+extern int param_get_intarray(char *buffer, struct kernel_param *kp);
+#define param_check_intarray(name, p) __param_check(name, p, int *)
+
+extern int param_set_copystring(const char *val, struct kernel_param *kp);
+
+int param_array(const char *name,
+		const char *val,
+		unsigned int min, unsigned int max,
+		void *elem, int elemsize,
+		int (*set)(const char *, struct kernel_param *kp));
+#endif /* _LINUX_MODULE_PARAM_TYPES_H */
diff -Nru a/include/linux/nfs4.h b/include/linux/nfs4.h
--- a/include/linux/nfs4.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/nfs4.h	Sun Dec 15 18:08:29 2002
@@ -196,6 +196,16 @@
 #define NFS4_MINOR_VERSION 0
 #define NFS4_DEBUG 1
 
+#ifdef __KERNEL__
+
+/* Index of predefined Linux client operations */
+
+enum {
+	NFSPROC4_CLNT_NULL = 0,		/* Unused */
+	NFSPROC4_CLNT_COMPOUND,		/* Soon to be unused */
+};
+
+#endif
 #endif
 
 /*
diff -Nru a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
--- a/include/linux/nfs_fs.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/nfs_fs.h	Sun Dec 15 18:08:29 2002
@@ -291,7 +291,7 @@
 /*
  * linux/fs/nfs/write.c
  */
-extern int  nfs_writepage(struct page *);
+extern int  nfs_writepage(struct page *page, struct writeback_control *wbc);
 extern int  nfs_writepages(struct address_space *, struct writeback_control *);
 extern int  nfs_flush_incompatible(struct file *file, struct page *page);
 extern int  nfs_updatepage(struct file *, struct page *, unsigned int, unsigned int);
diff -Nru a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
--- a/include/linux/nfs_xdr.h	Sun Dec 15 18:08:31 2002
+++ b/include/linux/nfs_xdr.h	Sun Dec 15 18:08:31 2002
@@ -488,7 +488,6 @@
 
 struct nfs4_op {
 	u32				opnum;
-	u32				nfserr;
 	union {
 		struct nfs4_access	access;
 		struct nfs4_close	close;
diff -Nru a/include/linux/page-flags.h b/include/linux/page-flags.h
--- a/include/linux/page-flags.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/page-flags.h	Sun Dec 15 18:08:29 2002
@@ -79,35 +79,36 @@
  * allowed.
  */
 struct page_state {
-	unsigned long nr_dirty;
-	unsigned long nr_writeback;
-	unsigned long nr_pagecache;
-	unsigned long nr_page_table_pages;
-	unsigned long nr_reverse_maps;
-	unsigned long nr_mapped;
-	unsigned long nr_slab;
+	unsigned long nr_dirty;		/* Dirty writeable pages */
+	unsigned long nr_writeback;	/* Pages under writeback */
+	unsigned long nr_pagecache;	/* Pages in pagecache */
+	unsigned long nr_page_table_pages;/* Pages used for pagetables */
+	unsigned long nr_reverse_maps;	/* includes PageDirect */
+	unsigned long nr_mapped;	/* mapped into pagetables */
+	unsigned long nr_slab;		/* In slab */
 #define GET_PAGE_STATE_LAST nr_slab
 
 	/*
 	 * The below are zeroed by get_page_state().  Use get_full_page_state()
 	 * to add up all these.
 	 */
-	unsigned long pgpgin;
-	unsigned long pgpgout;
-	unsigned long pswpin;
-	unsigned long pswpout;
-	unsigned long pgalloc;
-	unsigned long pgfree;
-	unsigned long pgactivate;
-	unsigned long pgdeactivate;
-	unsigned long pgfault;
-	unsigned long pgmajfault;
-	unsigned long pgscan;
-	unsigned long pgrefill;
-	unsigned long pgsteal;
-	unsigned long kswapd_steal;
-	unsigned long pageoutrun;
-	unsigned long allocstall;
+	unsigned long pgpgin;		/* Disk reads */
+	unsigned long pgpgout;		/* Disk writes */
+	unsigned long pswpin;		/* swap reads */
+	unsigned long pswpout;		/* swap writes */
+	unsigned long pgalloc;		/* page allocations */
+	unsigned long pgfree;		/* page freeings */
+	unsigned long pgactivate;	/* pages moved inactive->active */
+	unsigned long pgdeactivate;	/* pages moved active->inactive */
+	unsigned long pgfault;		/* faults (major+minor) */
+	unsigned long pgmajfault;	/* faults (major only) */
+	unsigned long pgscan;		/* pages scanned by page reclaim */
+	unsigned long pgrefill;		/* inspected in refill_inactive_zone */
+	unsigned long pgsteal;		/* total pages reclaimed */
+	unsigned long kswapd_steal;	/* pages reclaimed by kswapd */
+	unsigned long pageoutrun;	/* kswapd's calls to page reclaim */
+	unsigned long allocstall;	/* direct reclaim calls */
+	unsigned long pgrotated;	/* pages rotated to tail of the LRU */
 } ____cacheline_aligned;
 
 DECLARE_PER_CPU(struct page_state, page_states);
diff -Nru a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
--- a/include/linux/reiserfs_fs.h	Sun Dec 15 18:08:32 2002
+++ b/include/linux/reiserfs_fs.h	Sun Dec 15 18:08:32 2002
@@ -2073,13 +2073,14 @@
 }
 
 extern inline int reiserfs_new_unf_blocknrs (struct reiserfs_transaction_handle *th,
+					     struct inode *inode,
 					     b_blocknr_t *new_blocknrs,
 					     struct path * path, long block)
 {
     reiserfs_blocknr_hint_t hint = {
 	.th = th,
 	.path = path,
-	.inode = NULL,
+	.inode = inode,
 	.block = block,
 	.formatted_node = 0,
 	.preallocate = 0
diff -Nru a/include/linux/sched.h b/include/linux/sched.h
--- a/include/linux/sched.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/sched.h	Sun Dec 15 18:08:28 2002
@@ -424,9 +424,8 @@
 #define PF_FREEZE	0x00008000	/* this task should be frozen for suspend */
 #define PF_IOTHREAD	0x00010000	/* this thread is needed for doing I/O to swap */
 #define PF_FROZEN	0x00020000	/* frozen for system suspend */
-#define PF_SYNC		0x00040000	/* performing fsync(), etc */
-#define PF_FSTRANS	0x00080000	/* inside a filesystem transaction */
-#define PF_KSWAPD	0x00100000	/* I am kswapd */
+#define PF_FSTRANS	0x00040000	/* inside a filesystem transaction */
+#define PF_KSWAPD	0x00080000	/* I am kswapd */
 
 /*
  * Ptrace flags
diff -Nru a/include/linux/sem.h b/include/linux/sem.h
--- a/include/linux/sem.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/sem.h	Sun Dec 15 18:08:29 2002
@@ -140,6 +140,8 @@
 asmlinkage long sys_semget (key_t key, int nsems, int semflg);
 asmlinkage long sys_semop (int semid, struct sembuf *sops, unsigned nsops);
 asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg);
+asmlinkage long sys_semtimedop(int semid, struct sembuf *sops,
+			unsigned nsops, const struct timespec *timeout);
 
 #endif /* __KERNEL__ */
 
diff -Nru a/include/linux/sonypi.h b/include/linux/sonypi.h
--- a/include/linux/sonypi.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/sonypi.h	Sun Dec 15 18:08:29 2002
@@ -43,9 +43,9 @@
 #define SONYPI_EVENT_JOGDIAL_DOWN_PRESSED	 3
 #define SONYPI_EVENT_JOGDIAL_UP_PRESSED		 4
 #define SONYPI_EVENT_JOGDIAL_PRESSED		 5
-#define SONYPI_EVENT_JOGDIAL_RELEASED		 6
+#define SONYPI_EVENT_JOGDIAL_RELEASED		 6	/* obsolete */
 #define SONYPI_EVENT_CAPTURE_PRESSED		 7
-#define SONYPI_EVENT_CAPTURE_RELEASED		 8
+#define SONYPI_EVENT_CAPTURE_RELEASED		 8	/* obsolete */
 #define SONYPI_EVENT_CAPTURE_PARTIALPRESSED	 9
 #define SONYPI_EVENT_CAPTURE_PARTIALRELEASED	10
 #define SONYPI_EVENT_FNKEY_ESC			11
@@ -93,7 +93,7 @@
 #define SONYPI_EVENT_MEYE_OPPOSITE		53
 #define SONYPI_EVENT_MEMORYSTICK_INSERT		54
 #define SONYPI_EVENT_MEMORYSTICK_EJECT		55
-
+#define SONYPI_EVENT_ANYBUTTON_RELEASED		56
 
 /* get/set brightness */
 #define SONYPI_IOCGBRT		_IOR('v', 0, __u8)
diff -Nru a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
--- a/include/linux/sunrpc/xdr.h	Sun Dec 15 18:08:33 2002
+++ b/include/linux/sunrpc/xdr.h	Sun Dec 15 18:08:33 2002
@@ -211,6 +211,10 @@
 	return p;
 }
 
+extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,
+		unsigned int base, unsigned int len);
+extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
+
 /*
  * Initialize an xdr_stream for decoding data.
  */
diff -Nru a/include/linux/swap.h b/include/linux/swap.h
--- a/include/linux/swap.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/swap.h	Sun Dec 15 18:08:28 2002
@@ -65,6 +65,7 @@
 struct sysinfo;
 struct address_space;
 struct zone;
+struct writeback_control;
 
 /*
  * A swap extent maps a range of a swapfile's PAGE_SIZE pages onto a range of
@@ -180,7 +181,7 @@
 #ifdef CONFIG_SWAP
 /* linux/mm/page_io.c */
 extern int swap_readpage(struct file *, struct page *);
-extern int swap_writepage(struct page *);
+extern int swap_writepage(struct page *page, struct writeback_control *wbc);
 extern int rw_swap_page_sync(int, swp_entry_t, struct page *);
 
 /* linux/mm/swap_state.c */
diff -Nru a/include/linux/sysctl.h b/include/linux/sysctl.h
--- a/include/linux/sysctl.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/sysctl.h	Sun Dec 15 18:08:29 2002
@@ -154,6 +154,7 @@
 	VM_PAGEBUF=17,		/* struct: Control pagebuf parameters */
 	VM_HUGETLB_PAGES=18,	/* int: Number of available Huge Pages */
 	VM_SWAPPINESS=19,	/* Tendency to steal mapped memory */
+	VM_LOWER_ZONE_PROTECTION=20,/* Amount of protection of lower zones */
 };
 
 
diff -Nru a/include/linux/usb.h b/include/linux/usb.h
--- a/include/linux/usb.h	Sun Dec 15 18:08:29 2002
+++ b/include/linux/usb.h	Sun Dec 15 18:08:29 2002
@@ -117,6 +117,7 @@
 	unsigned max_altsetting;	/* total memory allocated */
 
 	struct usb_driver *driver;	/* driver */
+	kdev_t kdev;			/* node this interface is bound to */
 	struct device dev;		/* interface specific device info */
 	void *private_data;
 };
@@ -270,6 +271,8 @@
 			struct usb_interface *iface);
 const struct usb_device_id *usb_match_id(struct usb_interface *interface,
 					 const struct usb_device_id *id);
+
+struct usb_interface *usb_find_interface(struct usb_driver *drv, kdev_t kdev);
 
 /**
  * usb_make_path - returns stable device path in the usb tree
diff -Nru a/include/linux/writeback.h b/include/linux/writeback.h
--- a/include/linux/writeback.h	Sun Dec 15 18:08:28 2002
+++ b/include/linux/writeback.h	Sun Dec 15 18:08:28 2002
@@ -1,9 +1,5 @@
 /*
  * include/linux/writeback.h.
- *
- * These declarations are private to fs/ and mm/.
- * Declarations which are exported to filesystems do not
- * get placed here.
  */
 #ifndef WRITEBACK_H
 #define WRITEBACK_H
@@ -45,8 +41,19 @@
 					   this for each page written */
 	int nonblocking;		/* Don't get stuck on request queues */
 	int encountered_congestion;	/* An output: a queue is full */
+	int for_kupdate;		/* A kupdate writeback */
+	int for_reclaim;		/* Invoked from the page allocator */
 };
-	
+
+/*
+ * ->writepage() return values (make these much larger than a pagesize, in
+ * case some fs is returning number-of-bytes-written from writepage)
+ */
+#define WRITEPAGE_ACTIVATE	0x80000	/* IO was not started: activate page */
+
+/*
+ * fs/fs-writeback.c
+ */	
 void writeback_inodes(struct writeback_control *wbc);
 void wake_up_inode(struct inode *inode);
 void __wait_on_inode(struct inode * inode);
@@ -81,14 +88,5 @@
 extern int nr_pdflush_threads;	/* Global so it can be exported to sysctl
 				   read-only. */
 
-
-/*
- * Tell the writeback paths that they are being called for a "data integrity"
- * operation such as fsync().
- */
-static inline int called_for_sync(void)
-{
-	return current->flags & PF_SYNC;
-}
 
 #endif		/* WRITEBACK_H */
diff -Nru a/init/Kconfig b/init/Kconfig
--- a/init/Kconfig	Sun Dec 15 18:08:31 2002
+++ b/init/Kconfig	Sun Dec 15 18:08:31 2002
@@ -135,6 +135,15 @@
 	  rmmod).  This is mainly for kernel developers and desparate users.
 	  If unsure, say N.
 
+config OBSOLETE_MODPARM
+	bool
+	default y
+	depends on MODULES
+	help
+	  You need this option to use module parameters on modules which
+	  have not been converted to the new module parameter system yet.
+	  If unsure, say Y.
+
 config KMOD
 	bool "Kernel module loader"
 	depends on MODULES
diff -Nru a/init/Makefile b/init/Makefile
--- a/init/Makefile	Sun Dec 15 18:08:29 2002
+++ b/init/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,8 +7,6 @@
 # files to be removed upon make clean
 clean-files := ../include/linux/compile.h
 
-include $(TOPDIR)/Rules.make
-
 # dependencies on generated files need to be listed explicitly
 
 $(obj)/version.o: include/linux/compile.h
diff -Nru a/init/main.c b/init/main.c
--- a/init/main.c	Sun Dec 15 18:08:28 2002
+++ b/init/main.c	Sun Dec 15 18:08:28 2002
@@ -14,6 +14,7 @@
 #include <linux/config.h>
 #include <linux/proc_fs.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/kernel.h>
 #include <linux/unistd.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
@@ -33,6 +34,7 @@
 #include <linux/workqueue.h>
 #include <linux/profile.h>
 #include <linux/rcupdate.h>
+#include <linux/moduleparam.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -132,9 +134,10 @@
 
 __setup("profile=", profile_setup);
 
-static int __init checksetup(char *line)
+static int __init obsolete_checksetup(char *line)
 {
-	struct kernel_param *p;
+	struct obs_kernel_param *p;
+	extern struct obs_kernel_param __setup_start, __setup_end;
 
 	p = &__setup_start;
 	do {
@@ -217,74 +220,45 @@
 __setup("debug", debug_kernel);
 __setup("quiet", quiet_kernel);
 
-/*
- * This is a simple kernel command line parsing function: it parses
- * the command line, and fills in the arguments/environment to init
- * as appropriate. Any cmd-line option is taken to be an environment
- * variable if it contains the character '='.
- *
- * This routine also checks for options meant for the kernel.
- * These options are not given to init - they are for internal kernel use only.
- */
-static void __init parse_options(char *line)
-{
-	char *next,*quote;
-	int args, envs;
+/* Unknown boot options get handed to init, unless they look like
+   failed parameters */
+static int __init unknown_bootoption(char *param, char *val)
+{
+	/* Change NUL term back to "=", to make "param" the whole string. */
+	if (val)
+		val[-1] = '=';
 
-	if (!*line)
-		return;
-	args = 0;
-	envs = 1;	/* TERM is set to 'linux' by default */
-	next = line;
-	while ((line = next) != NULL) {
-                quote = strchr(line,'"');
-                next = strchr(line, ' ');
-                while (next != NULL && quote != NULL && quote < next) {
-                        /* we found a left quote before the next blank
-                         * now we have to find the matching right quote
-                         */
-                        next = strchr(quote+1, '"');
-                        if (next != NULL) {
-                                quote = strchr(next+1, '"');
-                                next = strchr(next+1, ' ');
-                        }
-                }
-                if (next != NULL)
-                        *next++ = 0;
-		if (!strncmp(line,"init=",5)) {
-			line += 5;
-			execute_command = line;
-			/* In case LILO is going to boot us with default command line,
-			 * it prepends "auto" before the whole cmdline which makes
-			 * the shell think it should execute a script with such name.
-			 * So we ignore all arguments entered _before_ init=... [MJ]
-			 */
-			args = 0;
-			continue;
+	/* Handle obsolete-style parameters */
+	if (obsolete_checksetup(param))
+		return 0;
+
+	/* Preemptive maintenance for "why didn't my mispelled command
+           line work?" */
+	if (strchr(param, '.') && (!val || strchr(param, '.') < val)) {
+		printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param);
+		return 0;
+	}
+
+	if (val) {
+		/* Environment option */
+		unsigned int i;
+		for (i = 0; envp_init[i]; i++) {
+			if (i == MAX_INIT_ENVS)
+				panic("Too many boot env vars at `%s'", param);
 		}
-		if (checksetup(line))
-			continue;
-		
-		/*
-		 * Then check if it's an environment variable or
-		 * an option.
-		 */
-		if (strchr(line,'=')) {
-			if (envs >= MAX_INIT_ENVS)
-				break;
-			envp_init[++envs] = line;
-		} else {
-			if (args >= MAX_INIT_ARGS)
-				break;
-			if (*line)
-				argv_init[++args] = line;
+		envp_init[i] = param;
+	} else {
+		/* Command line option */
+		unsigned int i;
+		for (i = 0; argv_init[i]; i++) {
+			if (i == MAX_INIT_ARGS)
+				panic("Too many boot init vars at `%s'",param);
 		}
+		argv_init[i] = param;
 	}
-	argv_init[args+1] = NULL;
-	envp_init[envs+1] = NULL;
+	return 0;
 }
 
-
 extern void setup_arch(char **);
 extern void cpu_idle(void);
 
@@ -378,6 +352,7 @@
 {
 	char * command_line;
 	extern char saved_command_line[];
+	extern struct kernel_param __start___param, __stop___param;
 /*
  * Interrupts are still disabled. Do necessary setups, then
  * enable them
@@ -389,7 +364,9 @@
 	build_all_zonelists();
 	page_alloc_init();
 	printk("Kernel command line: %s\n", saved_command_line);
-	parse_options(command_line);
+	parse_args("Booting kernel", command_line, &__start___param,
+		   &__stop___param - &__start___param,
+		   &unknown_bootoption);
 	trap_init();
 	extable_init();
 	rcu_init();
diff -Nru a/ipc/Makefile b/ipc/Makefile
--- a/ipc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/ipc/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-y   := util.o
 
 obj-$(CONFIG_SYSVIPC) += msg.o sem.o shm.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/ipc/sem.c b/ipc/sem.c
--- a/ipc/sem.c	Sun Dec 15 18:08:29 2002
+++ b/ipc/sem.c	Sun Dec 15 18:08:29 2002
@@ -62,6 +62,7 @@
 #include <linux/spinlock.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
+#include <linux/time.h>
 #include <linux/smp_lock.h>
 #include <linux/security.h>
 #include <asm/uaccess.h>
@@ -969,6 +970,12 @@
 
 asmlinkage long sys_semop (int semid, struct sembuf *tsops, unsigned nsops)
 {
+	return sys_semtimedop(semid, tsops, nsops, NULL);
+}
+
+asmlinkage long sys_semtimedop(int semid, struct sembuf *tsops,
+			unsigned nsops, const struct timespec *timeout)
+{
 	int error = -EINVAL;
 	struct sem_array *sma;
 	struct sembuf fast_sops[SEMOPM_FAST];
@@ -976,7 +983,7 @@
 	struct sem_undo *un;
 	int undos = 0, decrease = 0, alter = 0;
 	struct sem_queue queue;
-
+	unsigned long jiffies_left = 0;
 
 	if (nsops < 1 || semid < 0)
 		return -EINVAL;
@@ -991,6 +998,19 @@
 		error=-EFAULT;
 		goto out_free;
 	}
+	if (timeout) {
+		struct timespec _timeout;
+		if (copy_from_user(&_timeout, timeout, sizeof(*timeout))) {
+			error = -EFAULT;
+			goto out_free;
+		}
+		if (_timeout.tv_sec < 0 || _timeout.tv_nsec < 0 ||
+			_timeout.tv_nsec >= 1000000000L) {
+			error = -EINVAL;
+			goto out_free;
+		}
+		jiffies_left = timespec_to_jiffies(&_timeout);
+	}
 	lock_semundo();
 	sma = sem_lock(semid);
 	error=-EINVAL;
@@ -1058,7 +1078,10 @@
 		sem_unlock(sma);
 		unlock_semundo();
 
-		schedule();
+		if (timeout)
+			jiffies_left = schedule_timeout(jiffies_left);
+		else
+			schedule();
 
 		lock_semundo();
 		sma = sem_lock(semid);
@@ -1084,6 +1107,8 @@
 				break;
 		} else {
 			error = queue.status;
+			if (error == -EINTR && timeout && jiffies_left == 0)
+				error = -EAGAIN;
 			if (queue.prev) /* got Interrupt */
 				break;
 			/* Everything done by update_queue */
diff -Nru a/ipc/util.c b/ipc/util.c
--- a/ipc/util.c	Sun Dec 15 18:08:29 2002
+++ b/ipc/util.c	Sun Dec 15 18:08:29 2002
@@ -562,6 +562,13 @@
 	return -ENOSYS;
 }
 
+asmlinkage long sys_semtimedop(int semid, struct sembuf *sops, unsigned nsops,
+				const struct timespec *timeout)
+{
+	return -ENOSYS;
+}
+
+
 asmlinkage long sys_semctl (int semid, int semnum, int cmd, union semun arg)
 {
 	return -ENOSYS;
diff -Nru a/kernel/Makefile b/kernel/Makefile
--- a/kernel/Makefile	Sun Dec 15 18:08:28 2002
+++ b/kernel/Makefile	Sun Dec 15 18:08:28 2002
@@ -4,13 +4,13 @@
 
 export-objs = signal.o sys.o kmod.o workqueue.o ksyms.o pm.o exec_domain.o \
 		printk.o platform.o suspend.o dma.o module.o cpufreq.o \
-		profile.o rcupdate.o intermodule.o
+		profile.o rcupdate.o intermodule.o params.o
 
 obj-y     = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
 	    exit.o itimer.o time.o softirq.o resource.o \
 	    sysctl.o capability.o ptrace.o timer.o user.o \
 	    signal.o sys.o kmod.o workqueue.o futex.o platform.o pid.o \
-	    rcupdate.o intermodule.o extable.o
+	    rcupdate.o intermodule.o extable.o params.o
 
 obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
 obj-$(CONFIG_SMP) += cpu.o
@@ -31,5 +31,3 @@
 # to get a correct value for the wait-channel (WCHAN in ps). --davidm
 CFLAGS_sched.o := $(PROFILING) -fno-omit-frame-pointer
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/kernel/compat.c b/kernel/compat.c
--- a/kernel/compat.c	Sun Dec 15 18:08:29 2002
+++ b/kernel/compat.c	Sun Dec 15 18:08:29 2002
@@ -21,8 +21,7 @@
 static long compat_nanosleep_restart(struct restart_block *restart)
 {
 	unsigned long expire = restart->arg0, now = jiffies;
-	struct timespec *rmtp = (struct timespec *) restart->arg1;
-	long ret;
+	struct compat_timespec *rmtp;
 
 	/* Did it expire while we handled signals? */
 	if (!time_after(expire, now))
@@ -30,22 +29,22 @@
 
 	current->state = TASK_INTERRUPTIBLE;
 	expire = schedule_timeout(expire - now);
+	if (expire == 0)
+		return 0;
 
-	ret = 0;
-	if (expire) {
+	rmtp = (struct compat_timespec *)restart->arg1;
+	if (rmtp) {
 		struct compat_timespec ct;
 		struct timespec t;
 
 		jiffies_to_timespec(expire, &t);
 		ct.tv_sec = t.tv_sec;
 		ct.tv_nsec = t.tv_nsec;
-
-		ret = -ERESTART_RESTARTBLOCK;
 		if (copy_to_user(rmtp, &ct, sizeof(ct)))
-			ret = -EFAULT;
-		/* The 'restart' block is already filled in */
+			return -EFAULT;
 	}
-	return ret;
+	/* The 'restart' block is already filled in */
+	return -ERESTART_RESTARTBLOCK;
 }
 
 asmlinkage long compat_sys_nanosleep(struct compat_timespec *rqtp,
@@ -53,8 +52,8 @@
 {
 	struct compat_timespec ct;
 	struct timespec t;
+	struct restart_block *restart;
 	unsigned long expire;
-	s32 ret;
 
 	if (copy_from_user(&ct, rqtp, sizeof(ct)))
 		return -EFAULT;
@@ -67,46 +66,23 @@
 	expire = timespec_to_jiffies(&t) + (t.tv_sec || t.tv_nsec);
 	current->state = TASK_INTERRUPTIBLE;
 	expire = schedule_timeout(expire);
+	if (expire == 0)
+		return 0;
 
-	ret = 0;
-	if (expire) {
-		struct restart_block *restart;
-
+	if (rmtp) {
 		jiffies_to_timespec(expire, &t);
 		ct.tv_sec = t.tv_sec;
 		ct.tv_nsec = t.tv_nsec;
-
 		if (copy_to_user(rmtp, &ct, sizeof(ct)))
 			return -EFAULT;
-
-		restart = &current_thread_info()->restart_block;
-		restart->fn = compat_nanosleep_restart;
-		restart->arg0 = jiffies + expire;
-		restart->arg1 = (unsigned long) rmtp;
-		ret = -ERESTART_RESTARTBLOCK;
 	}
-	return ret;
+	restart = &current_thread_info()->restart_block;
+	restart->fn = compat_nanosleep_restart;
+	restart->arg0 = jiffies + expire;
+	restart->arg1 = (unsigned long) rmtp;
+	return -ERESTART_RESTARTBLOCK;
 }
 
-/*
- * Not all architectures have sys_utime, so implement this in terms
- * of sys_utimes.
- */
-asmlinkage long compat_sys_utime(char *filename, struct compat_utimbuf *t)
-{
-	struct timeval tv[2];
-
-	if (t) {
-		if (get_user(tv[0].tv_sec, &t->actime) ||
-		    get_user(tv[1].tv_sec, &t->modtime))
-			return -EFAULT;
-		tv[0].tv_usec = 0;
-		tv[1].tv_usec = 0;
-	}
-	return do_utimes(filename, t ? tv : NULL);
-}
-
-
 static inline long get_compat_itimerval(struct itimerval *o,
 		struct compat_itimerval *i)
 {
@@ -160,4 +136,24 @@
 	if (put_compat_itimerval(out, &kout))
 		return -EFAULT;
 	return 0;
+}
+
+asmlinkage long compat_sys_times(struct compat_tms *tbuf)
+{
+	/*
+	 *	In the SMP world we might just be unlucky and have one of
+	 *	the times increment as we use it. Since the value is an
+	 *	atomically safe type this is just fine. Conceptually its
+	 *	as if the syscall took an instant longer to occur.
+	 */
+	if (tbuf) {
+		struct compat_tms tmp;
+		tmp.tms_utime = compat_jiffies_to_clock_t(current->utime);
+		tmp.tms_stime = compat_jiffies_to_clock_t(current->stime);
+		tmp.tms_cutime = compat_jiffies_to_clock_t(current->cutime);
+		tmp.tms_cstime = compat_jiffies_to_clock_t(current->cstime);
+		if (copy_to_user(tbuf, &tmp, sizeof(tmp)))
+			return -EFAULT;
+	}
+	return compat_jiffies_to_clock_t(jiffies);
 }
diff -Nru a/kernel/cpufreq.c b/kernel/cpufreq.c
--- a/kernel/cpufreq.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/cpufreq.c	Sun Dec 15 18:08:28 2002
@@ -119,8 +119,8 @@
 	if (sscanf(input_string, "%d%%%d%%%d%%%s", &cpu, &min, &max, policy_string) == 4)
 	{
 		if (!cpufreq_get_policy(&current_policy, cpu)) {
-			policy->min = (min * current_policy.max_cpu_freq) / 100;
-			policy->max = (max * current_policy.max_cpu_freq) / 100;
+			policy->min = (min * current_policy.cpuinfo.max_freq) / 100;
+			policy->max = (max * current_policy.cpuinfo.max_freq) / 100;
 			policy->cpu = cpu;
 			result = 0;
 			goto scan_policy;
@@ -138,8 +138,8 @@
 	if (sscanf(input_string, "%d%%%d%%%s", &min, &max, policy_string) == 3)
 	{
 		if (!cpufreq_get_policy(&current_policy, cpu)) {
-			policy->min = (min * current_policy.max_cpu_freq) / 100;
-			policy->max = (max * current_policy.max_cpu_freq) / 100;
+			policy->min = (min * current_policy.cpuinfo.max_freq) / 100;
+			policy->max = (max * current_policy.cpuinfo.max_freq) / 100;
 			result = 0;
 			goto scan_policy;
 		}
@@ -229,11 +229,11 @@
 
 		cpufreq_get_policy(&policy, i);
 
-		if (!policy.max_cpu_freq)
+		if (!policy.cpuinfo.max_freq)
 			continue;
 
-		min_pctg = (policy.min * 100) / policy.max_cpu_freq;
-		max_pctg = (policy.max * 100) / policy.max_cpu_freq;
+		min_pctg = (policy.min * 100) / policy.cpuinfo.max_freq;
+		max_pctg = (policy.max * 100) / policy.cpuinfo.max_freq;
 
 		p += sprintf(p, "CPU%3d    %9d kHz (%3d %%)  -  %9d kHz (%3d %%)  -  ",
 			     i , policy.min, min_pctg, policy.max, max_pctg);
@@ -279,6 +279,7 @@
 	int                     result = 0;
 	char			proc_string[42] = {'\0'};
 	struct cpufreq_policy   policy;
+	unsigned int            i = 0;
 
 
 	if ((count > sizeof(proc_string) - 1))
@@ -293,7 +294,17 @@
 	if (result)
 		return -EFAULT;
 
-	cpufreq_set_policy(&policy);
+	if (policy.cpu == CPUFREQ_ALL_CPUS)
+	{
+		for (i=0; i<NR_CPUS; i++) 
+		{
+			policy.cpu = i;
+			if (cpu_online(i))
+				cpufreq_set_policy(&policy);
+		}
+	} 
+	else
+		cpufreq_set_policy(&policy);
 
 	return count;
 }
@@ -811,7 +822,9 @@
 	policy->min    = cpufreq_driver->policy[cpu].min;
 	policy->max    = cpufreq_driver->policy[cpu].max;
 	policy->policy = cpufreq_driver->policy[cpu].policy;
-	policy->max_cpu_freq = cpufreq_driver->policy[cpu].max_cpu_freq;
+	policy->cpuinfo.max_freq       = cpufreq_driver->policy[cpu].cpuinfo.max_freq;
+	policy->cpuinfo.min_freq       = cpufreq_driver->policy[cpu].cpuinfo.min_freq;
+	policy->cpuinfo.transition_latency = cpufreq_driver->policy[cpu].cpuinfo.transition_latency;
 	policy->cpu    = cpu;
 
 	up(&cpufreq_driver_sem);
@@ -835,16 +848,14 @@
 	down(&cpufreq_driver_sem);
 	if (!cpufreq_driver || !cpufreq_driver->verify || 
 	    !cpufreq_driver->setpolicy || !policy ||
-	    (policy->cpu > NR_CPUS)) {
+	    (policy->cpu >= NR_CPUS) || (!cpu_online(policy->cpu))) {
 		up(&cpufreq_driver_sem);
 		return -EINVAL;
 	}
 
-	if (policy->cpu == CPUFREQ_ALL_CPUS)
-		policy->max_cpu_freq = cpufreq_driver->policy[0].max_cpu_freq;
-	else
-		policy->max_cpu_freq = cpufreq_driver->policy[policy->cpu].max_cpu_freq;
-
+	policy->cpuinfo.max_freq       = cpufreq_driver->policy[policy->cpu].cpuinfo.max_freq;
+	policy->cpuinfo.min_freq       = cpufreq_driver->policy[policy->cpu].cpuinfo.min_freq;
+	policy->cpuinfo.transition_latency = cpufreq_driver->policy[policy->cpu].cpuinfo.transition_latency;
 
 	/* verify the cpu speed can be set within this limit */
 	ret = cpufreq_driver->verify(policy);
@@ -1039,8 +1050,8 @@
  	down(&cpufreq_driver_sem);
 	for (i=0; i<NR_CPUS; i++) 
 	{
-		cpu_min_freq[i] = driver_data->cpu_min_freq[i];
-		cpu_max_freq[i] = driver_data->policy[i].max_cpu_freq;
+		cpu_min_freq[i] = driver_data->policy[i].cpuinfo.min_freq;
+		cpu_max_freq[i] = driver_data->policy[i].cpuinfo.max_freq;
 		cpu_cur_freq[i] = driver_data->cpu_cur_freq[i];
 	}
 	up(&cpufreq_driver_sem);
diff -Nru a/kernel/fork.c b/kernel/fork.c
--- a/kernel/fork.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/fork.c	Sun Dec 15 18:08:28 2002
@@ -334,8 +334,10 @@
 	mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
 	mm->free_area_cache = TASK_UNMAPPED_BASE;
 
-	if (likely(!mm_alloc_pgd(mm)))
+	if (likely(!mm_alloc_pgd(mm))) {
+		mm->def_flags = 0;
 		return mm;
+	}
 	free_mm(mm);
 	return NULL;
 }
diff -Nru a/kernel/ksyms.c b/kernel/ksyms.c
--- a/kernel/ksyms.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/ksyms.c	Sun Dec 15 18:08:28 2002
@@ -203,6 +203,8 @@
 EXPORT_SYMBOL(bdput);
 EXPORT_SYMBOL(bd_claim);
 EXPORT_SYMBOL(bd_release);
+EXPORT_SYMBOL(open_bdev_excl);
+EXPORT_SYMBOL(close_bdev_excl);
 EXPORT_SYMBOL(__brelse);
 EXPORT_SYMBOL(__bforget);
 EXPORT_SYMBOL(ll_rw_block);
diff -Nru a/kernel/module.c b/kernel/module.c
--- a/kernel/module.c	Sun Dec 15 18:08:30 2002
+++ b/kernel/module.c	Sun Dec 15 18:08:30 2002
@@ -26,6 +26,7 @@
 #include <linux/fcntl.h>
 #include <linux/rcupdate.h>
 #include <linux/cpu.h>
+#include <linux/moduleparam.h>
 #include <asm/uaccess.h>
 #include <asm/semaphore.h>
 #include <asm/pgalloc.h>
@@ -44,6 +45,14 @@
 static DECLARE_MUTEX(module_mutex);
 LIST_HEAD(modules); /* FIXME: Accessed w/o lock on oops by some archs */
 
+/* We require a truly strong try_module_get() */
+static inline int strong_try_module_get(struct module *mod)
+{
+	if (mod && mod->state == MODULE_STATE_COMING)
+		return 0;
+	return try_module_get(mod);
+}
+
 /* Convenient structure for holding init and core sizes */
 struct sizes
 {
@@ -378,7 +387,7 @@
 	}
 
 	/* Already dying? */
-	if (!mod->live) {
+	if (mod->state == MODULE_STATE_GOING) {
 		/* FIXME: if (force), slam module count and wake up
                    waiter --RR */
 		DEBUGP("%s already dying\n", mod->name);
@@ -386,6 +395,16 @@
 		goto out;
 	}
 
+	/* Coming up?  Allow force on stuck modules. */
+	if (mod->state == MODULE_STATE_COMING) {
+		forced = try_force(flags);
+		if (!forced) {
+			/* This module can't be removed */
+			ret = -EBUSY;
+			goto out;
+		}
+	}
+
 	if (!mod->exit || mod->unsafe) {
 		forced = try_force(flags);
 		if (!forced) {
@@ -407,7 +426,7 @@
 			ret = -EWOULDBLOCK;
 	} else {
 		mod->waiter = current;
-		mod->live = 0;
+		mod->state = MODULE_STATE_GOING;
 	}
 	restart_refcounts();
 
@@ -507,7 +526,7 @@
 
 static inline int use_module(struct module *a, struct module *b)
 {
-	return try_module_get(b);
+	return strong_try_module_get(b);
 }
 
 static inline void module_unload_init(struct module *mod)
@@ -522,6 +541,134 @@
 
 #endif /* CONFIG_MODULE_UNLOAD */
 
+#ifdef CONFIG_OBSOLETE_MODPARM
+static int param_set_byte(const char *val, struct kernel_param *kp)  
+{
+	char *endp;
+	long l;
+
+	if (!val) return -EINVAL;
+	l = simple_strtol(val, &endp, 0);
+	if (endp == val || *endp || ((char)l != l))
+		return -EINVAL;
+	*((char *)kp->arg) = l;
+	return 0;
+}
+
+static int param_string(const char *name, const char *val,
+			unsigned int min, unsigned int max,
+			char *dest)
+{
+	if (strlen(val) < min || strlen(val) > max) {
+		printk(KERN_ERR
+		       "Parameter %s length must be %u-%u characters\n",
+		       name, min, max);
+		return -EINVAL;
+	}
+	strcpy(dest, val);
+	return 0;
+}
+
+extern int set_obsolete(const char *val, struct kernel_param *kp)
+{
+	unsigned int min, max;
+	char *p, *endp;
+	struct obsolete_modparm *obsparm = kp->arg;
+
+	if (!val) {
+		printk(KERN_ERR "Parameter %s needs an argument\n", kp->name);
+		return -EINVAL;
+	}
+
+	/* type is: [min[-max]]{b,h,i,l,s} */
+	p = obsparm->type;
+	min = simple_strtol(p, &endp, 10);
+	if (endp == obsparm->type)
+		min = max = 1;
+	else if (*endp == '-') {
+		p = endp+1;
+		max = simple_strtol(p, &endp, 10);
+	} else
+		max = min;
+	switch (*endp) {
+	case 'b':
+		return param_array(kp->name, val, min, max, obsparm->addr,
+				   1, param_set_byte);
+	case 'h':
+		return param_array(kp->name, val, min, max, obsparm->addr,
+				   sizeof(short), param_set_short);
+	case 'i':
+		return param_array(kp->name, val, min, max, obsparm->addr,
+				   sizeof(int), param_set_int);
+	case 'l':
+		return param_array(kp->name, val, min, max, obsparm->addr,
+				   sizeof(long), param_set_long);
+	case 's':
+		return param_string(kp->name, val, min, max, obsparm->addr);
+	}
+	printk(KERN_ERR "Unknown obsolete parameter type %s\n", obsparm->type);
+	return -EINVAL;
+}
+
+static int obsolete_params(const char *name,
+			   char *args,
+			   struct obsolete_modparm obsparm[],
+			   unsigned int num,
+			   Elf_Shdr *sechdrs,
+			   unsigned int symindex,
+			   const char *strtab)
+{
+	struct kernel_param *kp;
+	unsigned int i;
+	int ret;
+
+	kp = kmalloc(sizeof(kp[0]) * num, GFP_KERNEL);
+	if (!kp)
+		return -ENOMEM;
+
+	DEBUGP("Module %s has %u obsolete params\n", name, num);
+	for (i = 0; i < num; i++)
+		DEBUGP("Param %i: %s type %s\n",
+		       num, obsparm[i].name, obsparm[i].type);
+
+	for (i = 0; i < num; i++) {
+		kp[i].name = obsparm[i].name;
+		kp[i].perm = 000;
+		kp[i].set = set_obsolete;
+		kp[i].get = NULL;
+		obsparm[i].addr
+			= (void *)find_local_symbol(sechdrs, symindex, strtab,
+						    obsparm[i].name);
+		if (!obsparm[i].addr) {
+			printk("%s: falsely claims to have parameter %s\n",
+			       name, obsparm[i].name);
+			ret = -EINVAL;
+			goto out;
+		}
+		kp[i].arg = &obsparm[i];
+	}
+
+	ret = parse_args(name, args, kp, num, NULL);
+ out:
+	kfree(kp);
+	return ret;
+}
+#else
+static int obsolete_params(const char *name,
+			   char *args,
+			   struct obsolete_modparm obsparm[],
+			   unsigned int num,
+			   Elf_Shdr *sechdrs,
+			   unsigned int symindex,
+			   const char *strtab)
+{
+	if (num != 0)
+		printk(KERN_WARNING "%s: Ignoring obsolete parameters\n",
+		       name);
+	return 0;
+}
+#endif /* CONFIG_OBSOLETE_MODPARM */
+
 /* Find an symbol for this module (ie. resolve internals first).
    It we find one, record usage.  Must be holding module_mutex. */
 unsigned long find_symbol_internal(Elf_Shdr *sechdrs,
@@ -578,7 +725,7 @@
 
 	spin_lock_irqsave(&modlist_lock, flags);
 	value = __find_symbol(symbol, &ksg);
-	if (value && !try_module_get(ksg->owner))
+	if (value && !strong_try_module_get(ksg->owner))
 		value = 0;
 	spin_unlock_irqrestore(&modlist_lock, flags);
 
@@ -818,7 +965,7 @@
 	Elf_Shdr *sechdrs;
 	char *secstrings;
 	unsigned int i, symindex, exportindex, strindex, setupindex, exindex,
-		modnameindex;
+		modnameindex, obsparmindex;
 	long arglen;
 	unsigned long common_length;
 	struct sizes sizes, used;
@@ -856,7 +1003,7 @@
 
 	/* May not export symbols, or have setup params, so these may
            not exist */
-	exportindex = setupindex = 0;
+	exportindex = setupindex = obsparmindex = 0;
 
 	/* And these should exist, but gcc whinges if we don't init them */
 	symindex = strindex = exindex = modnameindex = 0;
@@ -882,7 +1029,7 @@
 			/* Strings */
 			DEBUGP("String table found in section %u\n", i);
 			strindex = i;
-		} else if (strcmp(secstrings+sechdrs[i].sh_name, ".setup.init")
+		} else if (strcmp(secstrings+sechdrs[i].sh_name, "__param")
 			   == 0) {
 			/* Setup parameter info */
 			DEBUGP("Setup table found in section %u\n", i);
@@ -892,6 +1039,11 @@
 			/* Exception table */
 			DEBUGP("Exception table found in section %u\n", i);
 			exindex = i;
+		} else if (strcmp(secstrings+sechdrs[i].sh_name, "__obsparm")
+			   == 0) {
+			/* Obsolete MODULE_PARM() table */
+			DEBUGP("Obsolete param found in section %u\n", i);
+			obsparmindex = i;
 		}
 #ifdef CONFIG_KALLSYMS
 		/* symbol and string tables for decoding later. */
@@ -935,12 +1087,8 @@
 		goto free_mod;
 	}
 
-	/* Initialize the lists, since they will be list_del'd if init fails */
-	INIT_LIST_HEAD(&mod->extable.list);
-	INIT_LIST_HEAD(&mod->list);
-	INIT_LIST_HEAD(&mod->symbols.list);
 	mod->symbols.owner = mod;
-	mod->live = 0;
+	mod->state = MODULE_STATE_COMING;
 	module_unload_init(mod);
 
 	/* How much space will we need?  (Common area in first) */
@@ -1034,17 +1182,25 @@
 	if (err < 0)
 		goto cleanup;
 
-#if 0 /* Needs param support */
-	/* Size of section 0 is 0, so this works well */
-	err = parse_args(mod->args,
-			 (struct kernel_param *)
-			 sechdrs[setupindex].sh_offset,
-			 sechdrs[setupindex].sh_size
-			 / sizeof(struct kernel_param),
-			 NULL);
+	if (obsparmindex) {
+		err = obsolete_params(mod->name, mod->args,
+				      (struct obsolete_modparm *)
+				      sechdrs[obsparmindex].sh_offset,
+				      sechdrs[obsparmindex].sh_size
+				      / sizeof(struct obsolete_modparm),
+				      sechdrs, symindex,
+				      (char *)sechdrs[strindex].sh_offset);
+	} else {
+		/* Size of section 0 is 0, so this works well if no params */
+		err = parse_args(mod->name, mod->args,
+				 (struct kernel_param *)
+				 sechdrs[setupindex].sh_offset,
+				 sechdrs[setupindex].sh_size
+				 / sizeof(struct kernel_param),
+				 NULL);
+	}
 	if (err < 0)
 		goto cleanup;
-#endif
 
 	/* Get rid of temporary copy */
 	vfree(hdr);
@@ -1097,51 +1253,40 @@
 	flush_icache_range((unsigned long)mod->module_core,
 			   (unsigned long)mod->module_core + mod->core_size);
 
-	/* Now sew it into exception list (just in case...). */
+	/* Now sew it into the lists.  They won't access us, since
+           strong_try_module_get() will fail. */
 	spin_lock_irq(&modlist_lock);
 	list_add(&mod->extable.list, &extables);
+	list_add_tail(&mod->symbols.list, &symbols);
 	spin_unlock_irq(&modlist_lock);
+	list_add(&mod->list, &modules);
+
+	/* Drop lock so they can recurse */
+	up(&module_mutex);
 
-	/* Note, setting the mod->live to 1 here is safe because we haven't
-	 * linked the module into the system's kernel symbol table yet,
-	 * which means that the only way any other kernel code can call
-	 * into this module right now is if this module hands out entry
-	 * pointers to the other code.  We assume that no module hands out
-	 * entry pointers to the rest of the kernel unless it is ready to
-	 * have them used.
-	 */
-	mod->live = 1;
 	/* Start the module */
 	ret = mod->init ? mod->init() : 0;
 	if (ret < 0) {
 		/* Init routine failed: abort.  Try to protect us from
                    buggy refcounters. */
+		mod->state = MODULE_STATE_GOING;
 		synchronize_kernel();
-		if (mod->unsafe) {
+		if (mod->unsafe)
 			printk(KERN_ERR "%s: module is now stuck!\n",
 			       mod->name);
-			/* Mark it "live" so that they can force
-			   deletion later, and we don't keep getting
-			   woken on every decrement. */
-		} else {
-			mod->live = 0;
+		else {
+			down(&module_mutex);
 			free_module(mod);
+			up(&module_mutex);
 		}
-		up(&module_mutex);
 		return ret;
 	}
 
 	/* Now it's a first class citizen! */
-	spin_lock_irq(&modlist_lock);
-	list_add_tail(&mod->symbols.list, &symbols);
-	spin_unlock_irq(&modlist_lock);
-	list_add(&mod->list, &modules);
-
+	mod->state = MODULE_STATE_LIVE;
 	module_free(mod, mod->module_init);
 	mod->module_init = NULL;
 
-	/* All ok! */
-	up(&module_mutex);
 	return 0;
 }
 
diff -Nru a/kernel/params.c b/kernel/params.c
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ b/kernel/params.c	Sun Dec 15 18:08:33 2002
@@ -0,0 +1,338 @@
+/* Helpers for initial module or kernel cmdline parsing
+   Copyright (C) 2001 Rusty Russell.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+*/
+#include <linux/moduleparam.h>
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/module.h>
+
+#if 0
+#define DEBUGP printk
+#else
+#define DEBUGP(fmt , ...)
+#endif
+
+static int parse_one(char *param,
+		     char *val,
+		     struct kernel_param *params, 
+		     unsigned num_params,
+		     int (*handle_unknown)(char *param, char *val))
+{
+	unsigned int i;
+
+	/* Find parameter */
+	for (i = 0; i < num_params; i++) {
+		if (strcmp(param, params[i].name) == 0) {
+			DEBUGP("They are equal!  Calling %p\n",
+			       params[i].set);
+			return params[i].set(val, &params[i]);
+		}
+	}
+
+	if (handle_unknown) {
+		DEBUGP("Unknown argument: calling %p\n", handle_unknown);
+		return handle_unknown(param, val);
+	}
+
+	DEBUGP("Unknown argument `%s'\n", param);
+	return -ENOENT;
+}
+
+/* You can use " around spaces, but can't escape ". */
+/* Hyphens and underscores equivalent in parameter names. */
+static char *next_arg(char *args, char **param, char **val)
+{
+	unsigned int i, equals = 0;
+	int in_quote = 0;
+
+	/* Chew any extra spaces */
+	while (*args == ' ') args++;
+
+	for (i = 0; args[i]; i++) {
+		if (args[i] == ' ' && !in_quote)
+			break;
+		if (equals == 0) {
+			if (args[i] == '=')
+				equals = i;
+			else if (args[i] == '-')
+				args[i] = '_';
+		}
+		if (args[i] == '"')
+			in_quote = !in_quote;
+	}
+
+	*param = args;
+	if (!equals)
+		*val = NULL;
+	else {
+		args[equals] = '\0';
+		*val = args + equals + 1;
+	}
+
+	if (args[i]) {
+		args[i] = '\0';
+		return args + i + 1;
+	} else
+		return args + i;
+}
+
+/* Args looks like "foo=bar,bar2 baz=fuz wiz". */
+int parse_args(const char *name,
+	       char *args,
+	       struct kernel_param *params,
+	       unsigned num,
+	       int (*unknown)(char *param, char *val))
+{
+	char *param, *val;
+
+	DEBUGP("Parsing ARGS: %s\n", args);
+
+	while (*args) {
+		int ret;
+
+		args = next_arg(args, &param, &val);
+		ret = parse_one(param, val, params, num, unknown);
+		switch (ret) {
+		case -ENOENT:
+			printk(KERN_ERR "%s: Unknown parameter `%s'\n",
+			       name, param);
+			return ret;
+		case -ENOSPC:
+			printk(KERN_ERR
+			       "%s: `%s' too large for parameter `%s'\n",
+			       name, val ?: "", param);
+			return ret;
+		case 0:
+			break;
+		default:
+			printk(KERN_ERR
+			       "%s: `%s' invalid for parameter `%s'\n",
+			       name, val ?: "", param);
+			return ret;
+		}
+	}
+
+	/* All parsed OK. */
+	return 0;
+}
+
+/* Lazy bastard, eh? */
+#define STANDARD_PARAM_DEF(name, type, format, tmptype, strtolfn)      	\
+	int param_set_##name(const char *val, struct kernel_param *kp)	\
+	{								\
+		char *endp;						\
+		tmptype l;						\
+									\
+		if (!val) return -EINVAL;				\
+		l = strtolfn(val, &endp, 0);				\
+		if (endp == val || *endp || ((type)l != l))		\
+			return -EINVAL;					\
+		*((type *)kp->arg) = l;					\
+		return 0;						\
+	}								\
+	int param_get_##name(char *buffer, struct kernel_param *kp)	\
+	{								\
+		return sprintf(buffer, format, *((type *)kp->arg));	\
+	}
+
+STANDARD_PARAM_DEF(short, short, "%hi", long, simple_strtol);
+STANDARD_PARAM_DEF(ushort, unsigned short, "%hu", long, simple_strtol);
+STANDARD_PARAM_DEF(int, int, "%i", long, simple_strtol);
+STANDARD_PARAM_DEF(uint, unsigned int, "%u", long, simple_strtol);
+STANDARD_PARAM_DEF(long, long, "%li", long, simple_strtol);
+STANDARD_PARAM_DEF(ulong, unsigned long, "%lu", unsigned long, simple_strtoul);
+
+int param_set_charp(const char *val, struct kernel_param *kp)
+{
+	if (!val) {
+		printk(KERN_ERR "%s: string parameter expected\n",
+		       kp->name);
+		return -EINVAL;
+	}
+
+	if (strlen(val) > 1024) {
+		printk(KERN_ERR "%s: string parameter too long\n",
+		       kp->name);
+		return -ENOSPC;
+	}
+
+	*(char **)kp->arg = (char *)val;
+	return 0;
+}
+
+int param_get_charp(char *buffer, struct kernel_param *kp)
+{
+	return sprintf(buffer, "%s", *((char **)kp->arg));
+}
+
+int param_set_bool(const char *val, struct kernel_param *kp)
+{
+	/* No equals means "set"... */
+	if (!val) val = "1";
+
+	/* One of =[yYnN01] */
+	switch (val[0]) {
+	case 'y': case 'Y': case '1':
+		*(int *)kp->arg = 1;
+		return 0;
+	case 'n': case 'N': case '0':
+		*(int *)kp->arg = 0;
+		return 0;
+	}
+	return -EINVAL;
+}
+
+int param_get_bool(char *buffer, struct kernel_param *kp)
+{
+	/* Y and N chosen as being relatively non-coder friendly */
+	return sprintf(buffer, "%c", (*(int *)kp->arg) ? 'Y' : 'N');
+}
+
+int param_set_invbool(const char *val, struct kernel_param *kp)
+{
+	int boolval, ret;
+	struct kernel_param dummy = { .arg = &boolval };
+
+	ret = param_set_bool(val, &dummy);
+	if (ret == 0)
+		*(int *)kp->arg = !boolval;
+	return ret;
+}
+
+int param_get_invbool(char *buffer, struct kernel_param *kp)
+{
+	int val;
+	struct kernel_param dummy = { .arg = &val };
+
+	val = !*(int *)kp->arg;
+	return param_get_bool(buffer, &dummy);
+}
+
+/* We cheat here and temporarily mangle the string. */
+int param_array(const char *name,
+		const char *val,
+		unsigned int min, unsigned int max,
+		void *elem, int elemsize,
+		int (*set)(const char *, struct kernel_param *kp))
+{
+	int ret;
+	unsigned int count = 0;
+	struct kernel_param kp;
+
+	/* Get the name right for errors. */
+	kp.name = name;
+	kp.arg = elem;
+
+	/* No equals sign? */
+	if (!val) {
+		printk(KERN_ERR "%s: expects arguments\n", name);
+		return -EINVAL;
+	}
+
+	/* We expect a comma-separated list of values. */
+	do {
+		int len;
+		char save;
+
+		if (count > max) {
+			printk(KERN_ERR "%s: can only take %i arguments\n",
+			       name, max);
+			return -EINVAL;
+		}
+		len = strcspn(val, ",");
+
+		/* Temporarily nul-terminate and parse */
+		save = val[len];
+		((char *)val)[len] = '\0';
+		ret = set(val, &kp);
+		((char *)val)[len] = save;
+
+		if (ret != 0)
+			return ret;
+		kp.arg += elemsize;
+		val += len+1;
+		count++;
+	} while (val[-1] == ',');
+
+	if (count < min) {
+		printk(KERN_ERR "%s: needs at least %i arguments\n",
+		       name, min);
+		return -EINVAL;
+	}
+	return 0;
+}
+
+/* First two elements are the max and min array length (which don't change) */
+int param_set_intarray(const char *val, struct kernel_param *kp)
+{
+	int *array;
+
+	/* Grab min and max as first two elements */
+	array = kp->arg;
+	return param_array(kp->name, val, array[0], array[1], &array[2],
+			   sizeof(int), param_set_int);
+}
+
+int param_get_intarray(char *buffer, struct kernel_param *kp)
+{
+	int max;
+	int *array;
+	unsigned int i;
+
+	array = kp->arg;
+	max = array[1];
+
+	for (i = 2; i < max + 2; i++)
+		sprintf(buffer, "%s%i", i > 2 ? "," : "", array[i]);
+	return strlen(buffer);
+}
+
+int param_set_copystring(const char *val, struct kernel_param *kp)
+{
+	struct kparam_string *kps = kp->arg;
+
+	if (strlen(val)+1 > kps->maxlen) {
+		printk(KERN_ERR "%s: string doesn't fit in %u chars.\n",
+		       kp->name, kps->maxlen-1);
+		return -ENOSPC;
+	}
+	strcpy(kps->string, val);
+	return 0;
+}
+
+EXPORT_SYMBOL(param_set_short);
+EXPORT_SYMBOL(param_get_short);
+EXPORT_SYMBOL(param_set_ushort);
+EXPORT_SYMBOL(param_get_ushort);
+EXPORT_SYMBOL(param_set_int);
+EXPORT_SYMBOL(param_get_int);
+EXPORT_SYMBOL(param_set_uint);
+EXPORT_SYMBOL(param_get_uint);
+EXPORT_SYMBOL(param_set_long);
+EXPORT_SYMBOL(param_get_long);
+EXPORT_SYMBOL(param_set_ulong);
+EXPORT_SYMBOL(param_get_ulong);
+EXPORT_SYMBOL(param_set_charp);
+EXPORT_SYMBOL(param_get_charp);
+EXPORT_SYMBOL(param_set_bool);
+EXPORT_SYMBOL(param_get_bool);
+EXPORT_SYMBOL(param_set_invbool);
+EXPORT_SYMBOL(param_get_invbool);
+EXPORT_SYMBOL(param_set_intarray);
+EXPORT_SYMBOL(param_get_intarray);
+EXPORT_SYMBOL(param_set_copystring);
diff -Nru a/kernel/printk.c b/kernel/printk.c
--- a/kernel/printk.c	Sun Dec 15 18:08:33 2002
+++ b/kernel/printk.c	Sun Dec 15 18:08:33 2002
@@ -16,6 +16,7 @@
  *	01Mar01 Andrew Morton <andrewm@uow.edu.au>
  */
 
+#include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/tty.h>
 #include <linux/tty_driver.h>
@@ -25,7 +26,6 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>			/* For in_interrupt() */
 #include <linux/config.h>
-#include <linux/slab.h>
 #include <linux/delay.h>
 
 #include <asm/uaccess.h>
@@ -55,11 +55,12 @@
 
 DECLARE_WAIT_QUEUE_HEAD(log_wait);
 
-/* Keep together for sysctl support */
-int console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
-int default_message_loglevel = DEFAULT_MESSAGE_LOGLEVEL;
-int minimum_console_loglevel = MINIMUM_CONSOLE_LOGLEVEL;
-int default_console_loglevel = DEFAULT_CONSOLE_LOGLEVEL;
+int console_printk[4] = {
+	DEFAULT_CONSOLE_LOGLEVEL,	/* console_loglevel */
+	DEFAULT_MESSAGE_LOGLEVEL,	/* default_message_loglevel */
+	MINIMUM_CONSOLE_LOGLEVEL,	/* minimum_console_loglevel */
+	DEFAULT_CONSOLE_LOGLEVEL,	/* default_console_loglevel */
+};
 
 int oops_in_progress;
 
@@ -164,15 +165,12 @@
  * 	7 -- Enable printk's to console
  *	8 -- Set level of messages printed to console
  *	9 -- Return number of unread characters in the log buffer
- *     10 -- Printk from userspace.  Includes loglevel.  Returns number of
- *           chars printed.
  */
 int do_syslog(int type, char * buf, int len)
 {
 	unsigned long i, j, limit, count;
 	int do_clear = 0;
 	char c;
-	char *lbuf = NULL;
 	int error = 0;
 
 	switch (type) {
@@ -287,23 +285,11 @@
 		error = log_end - log_start;
 		spin_unlock_irq(&logbuf_lock);
 		break;
-	case 10:
-		lbuf = kmalloc(len + 1, GFP_KERNEL);
-		error = -ENOMEM;
-		if (lbuf == NULL)
-			break;
-		error = -EFAULT;
-		if (copy_from_user(lbuf, buf, len))
-			break;
-		lbuf[len] = '\0';
-		error = printk("%s", lbuf);
-		break;
 	default:
 		error = -EINVAL;
 		break;
 	}
 out:
-	kfree(lbuf);
 	return error;
 }
 
diff -Nru a/kernel/signal.c b/kernel/signal.c
--- a/kernel/signal.c	Sun Dec 15 18:08:29 2002
+++ b/kernel/signal.c	Sun Dec 15 18:08:29 2002
@@ -939,7 +939,8 @@
 	if (sig_ignored(p, sig))
 		goto out_unlock;
 
-	if (sig_kernel_specific(sig))
+	if (sig_kernel_specific(sig) ||
+		       ((p->ptrace & PT_PTRACED) && !sig_kernel_only(sig)))
 		goto out_send;
 
 	/* Does any of the threads unblock the signal? */
@@ -1313,7 +1314,7 @@
 			case SIGQUIT: case SIGILL: case SIGTRAP:
 			case SIGABRT: case SIGFPE: case SIGSEGV:
 			case SIGBUS: case SIGSYS: case SIGXCPU: case SIGXFSZ:
-				if (do_coredump(signr, regs))
+				if (do_coredump(signr, exit_code, regs))
 					exit_code |= 0x80;
 				/* FALLTHRU */
 
diff -Nru a/kernel/suspend.c b/kernel/suspend.c
--- a/kernel/suspend.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/suspend.c	Sun Dec 15 18:08:28 2002
@@ -88,7 +88,6 @@
 extern char _text, _etext, _edata, __bss_start, _end;
 extern char __nosave_begin, __nosave_end;
 
-extern int console_loglevel;
 extern int is_head_of_free_region(struct page *);
 
 /* Locks */
diff -Nru a/kernel/sysctl.c b/kernel/sysctl.c
--- a/kernel/sysctl.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/sysctl.c	Sun Dec 15 18:08:28 2002
@@ -28,6 +28,7 @@
 #include <linux/capability.h>
 #include <linux/smp_lock.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/sysrq.h>
 #include <linux/highuid.h>
 #include <linux/writeback.h>
@@ -53,6 +54,7 @@
 extern char core_pattern[];
 extern int cad_pid;
 extern int pid_max;
+extern int sysctl_lower_zone_protection;
 
 /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */
 static int maxolduid = 65535;
@@ -310,8 +312,13 @@
 	 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, &zero,
 	 &one_hundred },
 #ifdef CONFIG_HUGETLB_PAGE
-	 {VM_HUGETLB_PAGES, "nr_hugepages", &htlbpage_max, sizeof(int), 0644, NULL, &hugetlb_sysctl_handler},
+	 {VM_HUGETLB_PAGES, "nr_hugepages", &htlbpage_max, sizeof(int), 0644,
+	  NULL, &hugetlb_sysctl_handler},
 #endif
+	{VM_LOWER_ZONE_PROTECTION, "lower_zone_protection",
+	 &sysctl_lower_zone_protection, sizeof(sysctl_lower_zone_protection),
+	 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, &zero,
+	 NULL, },
 	{0}
 };
 
diff -Nru a/kernel/timer.c b/kernel/timer.c
--- a/kernel/timer.c	Sun Dec 15 18:08:28 2002
+++ b/kernel/timer.c	Sun Dec 15 18:08:28 2002
@@ -1040,7 +1040,7 @@
 		jiffies_to_timespec(expire, &t);
 
 		ret = -ERESTART_RESTARTBLOCK;
-		if (copy_to_user(rmtp, &t, sizeof(t)))
+		if (rmtp && copy_to_user(rmtp, &t, sizeof(t)))
 			ret = -EFAULT;
 		/* The 'restart' block is already filled in */
 	}
@@ -1067,7 +1067,7 @@
 	if (expire) {
 		struct restart_block *restart;
 		jiffies_to_timespec(expire, &t);
-		if (copy_to_user(rmtp, &t, sizeof(t)))
+		if (rmtp && copy_to_user(rmtp, &t, sizeof(t)))
 			return -EFAULT;
 
 		restart = &current_thread_info()->restart_block;
diff -Nru a/lib/Makefile b/lib/Makefile
--- a/lib/Makefile	Sun Dec 15 18:08:28 2002
+++ b/lib/Makefile	Sun Dec 15 18:08:28 2002
@@ -31,5 +31,3 @@
 include $(TOPDIR)/drivers/usb/class/Makefile.lib
 include $(TOPDIR)/fs/Makefile.lib
 include $(TOPDIR)/net/bluetooth/bnep/Makefile.lib
-
-include $(TOPDIR)/Rules.make
diff -Nru a/lib/cmdline.c b/lib/cmdline.c
--- a/lib/cmdline.c	Sun Dec 15 18:08:32 2002
+++ b/lib/cmdline.c	Sun Dec 15 18:08:32 2002
@@ -64,12 +64,12 @@
  *	completely parseable).
  */
  
-char *get_options (char *str, int nints, int *ints)
+char *get_options(const char *str, int nints, int *ints)
 {
 	int res, i = 1;
 
 	while (i < nints) {
-		res = get_option (&str, ints + i);
+		res = get_option ((char **)&str, ints + i);
 		if (res == 0)
 			break;
 		i++;
@@ -77,7 +77,7 @@
 			break;
 	}
 	ints[0] = i - 1;
-	return (str);
+	return (char *)str;
 }
 
 /**
diff -Nru a/lib/radix-tree.c b/lib/radix-tree.c
--- a/lib/radix-tree.c	Sun Dec 15 18:08:28 2002
+++ b/lib/radix-tree.c	Sun Dec 15 18:08:28 2002
@@ -196,8 +196,7 @@
 
 static /* inline */ unsigned int
 __lookup(struct radix_tree_root *root, void **results, unsigned long index,
-	unsigned int max_items, unsigned long *next_index,
-	unsigned long max_index)
+	unsigned int max_items, unsigned long *next_index)
 {
 	unsigned int nr_found = 0;
 	unsigned int shift;
@@ -209,23 +208,21 @@
 
 	while (height > 0) {
 		unsigned long i = (index >> shift) & RADIX_TREE_MAP_MASK;
+
 		for ( ; i < RADIX_TREE_MAP_SIZE; i++) {
 			if (slot->slots[i] != NULL)
 				break;
 			index &= ~((1 << shift) - 1);
 			index += 1 << shift;
+			if (index == 0)
+				goto out;	/* 32-bit wraparound */
 		}
 		if (i == RADIX_TREE_MAP_SIZE)
 			goto out;
 		height--;
-		shift -= RADIX_TREE_MAP_SHIFT;
-		if (height == 0) {
-			/* Bottom level: grab some items */
-			unsigned long j;
-
-			BUG_ON((shift + RADIX_TREE_MAP_SHIFT) != 0);
-			
-			j = index & RADIX_TREE_MAP_MASK;
+		if (height == 0) {	/* Bottom level: grab some items */
+			unsigned long j = index & RADIX_TREE_MAP_MASK;
+
 			for ( ; j < RADIX_TREE_MAP_SIZE; j++) {
 				index++;
 				if (slot->slots[j]) {
@@ -235,6 +232,7 @@
 				}
 			}
 		}
+		shift -= RADIX_TREE_MAP_SHIFT;
 		slot = slot->slots[i];
 	}
 out:
@@ -281,9 +279,9 @@
 		if (cur_index > max_index)
 			break;
 		nr_found = __lookup(root, results + ret, cur_index,
-				max_items - ret, &next_index, max_index);
+					max_items - ret, &next_index);
 		ret += nr_found;
-		if (next_index == max_index)
+		if (next_index == 0)
 			break;
 		cur_index = next_index;
 	}
diff -Nru a/lib/zlib_deflate/Makefile b/lib/zlib_deflate/Makefile
--- a/lib/zlib_deflate/Makefile	Sun Dec 15 18:08:29 2002
+++ b/lib/zlib_deflate/Makefile	Sun Dec 15 18:08:29 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_ZLIB_DEFLATE) += zlib_deflate.o
 
 zlib_deflate-objs := deflate.o deftree.o deflate_syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/lib/zlib_inflate/Makefile b/lib/zlib_inflate/Makefile
--- a/lib/zlib_inflate/Makefile	Sun Dec 15 18:08:31 2002
+++ b/lib/zlib_inflate/Makefile	Sun Dec 15 18:08:31 2002
@@ -19,5 +19,3 @@
 
 zlib_inflate-objs := infblock.o infcodes.o inffast.o inflate.o \
 		     inftrees.o infutil.o inflate_syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/mm/bootmem.c b/mm/bootmem.c
--- a/mm/bootmem.c	Sun Dec 15 18:08:29 2002
+++ b/mm/bootmem.c	Sun Dec 15 18:08:29 2002
@@ -205,7 +205,7 @@
 	 * of this allocation's buffer? If yes then we can 'merge'
 	 * the previous partial page with this allocation.
 	 */
-	if (align <= PAGE_SIZE
+	if (align < PAGE_SIZE
 	    && bdata->last_offset && bdata->last_pos+1 == start) {
 		offset = (bdata->last_offset+align-1) & ~(align-1);
 		if (offset > PAGE_SIZE)
diff -Nru a/mm/filemap.c b/mm/filemap.c
--- a/mm/filemap.c	Sun Dec 15 18:08:29 2002
+++ b/mm/filemap.c	Sun Dec 15 18:08:29 2002
@@ -62,6 +62,7 @@
  *          ->mapping->page_lock
  *  ->inode_lock
  *    ->sb_lock			(fs/fs-writeback.c)
+ *    ->mapping->page_lock	(__sync_single_inode)
  *  ->page_table_lock
  *    ->swap_device_lock	(try_to_unmap_one)
  *    ->private_lock		(try_to_unmap_one)
@@ -108,37 +109,6 @@
 	return 0;
 }
 
-/*
- * In-memory filesystems have to fail their
- * writepage function - and this has to be
- * worked around in the VM layer..
- *
- * We
- *  - mark the page dirty again (but do NOT
- *    add it back to the inode dirty list, as
- *    that would livelock in fdatasync)
- *  - activate the page so that the page stealer
- *    doesn't try to write it out over and over
- *    again.
- *
- * NOTE!  The livelock in fdatasync went away, due to io_pages.
- * So this function can now call set_page_dirty().
- */
-int fail_writepage(struct page *page)
-{
-	/* Only activate on memory-pressure, not fsync.. */
-	if (current->flags & PF_MEMALLOC) {
-		if (!PageActive(page))
-			activate_page(page);
-		if (!PageReferenced(page))
-			SetPageReferenced(page);
-	}
-
-	unlock_page(page);
-	return -EAGAIN;		/* It will be set dirty again */
-}
-EXPORT_SYMBOL(fail_writepage);
-
 /**
  * filemap_fdatawrite - start writeback against all of a mapping's dirty pages
  * @mapping: address space structure to write
@@ -147,10 +117,6 @@
  * cleansing writeback.  The difference between these two operations is that
  * if a dirty page/buffer is encountered, it must be waited upon, and not just
  * skipped over.
- *
- * The PF_SYNC flag is set across this operation and the various functions
- * which care about this distinction must use called_for_sync() to find out
- * which behaviour they should implement.
  */
 int filemap_fdatawrite(struct address_space *mapping)
 {
@@ -160,9 +126,13 @@
 		.nr_to_write = mapping->nrpages * 2,
 	};
 
-	current->flags |= PF_SYNC;
+	if (mapping->backing_dev_info->memory_backed)
+		return 0;
+
+	write_lock(&mapping->page_lock);
+	list_splice_init(&mapping->dirty_pages, &mapping->io_pages);
+	write_unlock(&mapping->page_lock);
 	ret = do_writepages(mapping, &wbc);
-	current->flags &= ~PF_SYNC;
 	return ret;
 }
 
@@ -927,20 +897,10 @@
 do_readahead(struct address_space *mapping, struct file *filp,
 	     unsigned long index, unsigned long nr)
 {
-	unsigned long max;
-	unsigned long active;
-	unsigned long inactive;
-
 	if (!mapping || !mapping->a_ops || !mapping->a_ops->readpage)
 		return -EINVAL;
 
-	/* Limit it to a sane percentage of the inactive list.. */
-	get_zone_counts(&active, &inactive);
-	max = inactive / 2;
-	if (nr > max)
-		nr = max;
-
-	do_page_cache_readahead(mapping, filp, index, nr);
+	do_page_cache_readahead(mapping, filp, index, max_sane_readahead(nr));
 	return 0;
 }
 
@@ -1327,10 +1287,6 @@
 	struct address_space *mapping = file->f_dentry->d_inode->i_mapping;
 	struct inode *inode = mapping->host;
 
-	if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_MAYWRITE)) {
-		if (!mapping->a_ops->writepage)
-			return -EINVAL;
-	}
 	if (!mapping->a_ops->readpage)
 		return -ENOEXEC;
 	UPDATE_ATIME(inode);
@@ -1564,6 +1520,7 @@
 	size_t count;		/* after file limit checks */
 	struct inode 	*inode = mapping->host;
 	unsigned long	limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
+	const int	isblk = S_ISBLK(inode->i_mode);
 	long		status = 0;
 	loff_t		pos;
 	struct page	*page;
@@ -1615,22 +1572,21 @@
 
 	written = 0;
 
-	/* FIXME: this is for backwards compatibility with 2.4 */
-	if (!S_ISBLK(inode->i_mode) && file->f_flags & O_APPEND)
-		pos = inode->i_size;
+	if (!isblk) {
+		/* FIXME: this is for backwards compatibility with 2.4 */
+		if (file->f_flags & O_APPEND)
+			pos = inode->i_size;
 
-	/*
-	 * Check whether we've reached the file size limit.
-	 */
-	if (unlikely(limit != RLIM_INFINITY)) {
-		if (pos >= limit) {
-			send_sig(SIGXFSZ, current, 0);
-			err = -EFBIG;
-			goto out;
-		}
-		if (pos > 0xFFFFFFFFULL || count > limit - (u32)pos) {
-			/* send_sig(SIGXFSZ, current, 0); */
-			count = limit - (u32)pos;
+		if (limit != RLIM_INFINITY) {
+			if (pos >= limit) {
+				send_sig(SIGXFSZ, current, 0);
+				err = -EFBIG;
+				goto out;
+			}
+			if (pos > 0xFFFFFFFFULL || count > limit - (u32)pos) {
+				/* send_sig(SIGXFSZ, current, 0); */
+				count = limit - (u32)pos;
+			}
 		}
 	}
 
@@ -1657,7 +1613,7 @@
 	 * exceeded without writing data we send a signal and return EFBIG.
 	 * Linus frestrict idea will clean these up nicely..
 	 */
-	if (likely(!S_ISBLK(inode->i_mode))) {
+	if (likely(!isblk)) {
 		if (unlikely(pos >= inode->i_sb->s_maxbytes)) {
 			if (count || pos > inode->i_sb->s_maxbytes) {
 				send_sig(SIGXFSZ, current, 0);
@@ -1701,7 +1657,7 @@
 					iov, pos, nr_segs);
 		if (written > 0) {
 			loff_t end = pos + written;
-			if (end > inode->i_size && !S_ISBLK(inode->i_mode)) {
+			if (end > inode->i_size && !isblk) {
 				inode->i_size = end;
 				mark_inode_dirty(inode);
 			}
diff -Nru a/mm/madvise.c b/mm/madvise.c
--- a/mm/madvise.c	Sun Dec 15 18:08:28 2002
+++ b/mm/madvise.c	Sun Dec 15 18:08:28 2002
@@ -32,7 +32,6 @@
 	}
 
 	spin_lock(&mm->page_table_lock);
-	vma->vm_raend = 0;
 	VM_ClearReadHint(vma);
 
 	switch (behavior) {
@@ -51,36 +50,23 @@
 }
 
 /*
- * Schedule all required I/O operations, then run the disk queue
- * to make sure they are started.  Do not wait for completion.
+ * Schedule all required I/O operations.  Do not wait for completion.
  */
 static long madvise_willneed(struct vm_area_struct * vma,
 			     unsigned long start, unsigned long end)
 {
-	long error = -EBADF;
-	struct file * file;
-	unsigned long size, rlim_rss;
+	struct file *file = vma->vm_file;
 
-	/* Doesn't work if there's no mapped file. */
 	if (!vma->vm_file)
-		return error;
-	file = vma->vm_file;
-	size = (file->f_dentry->d_inode->i_size + PAGE_CACHE_SIZE - 1) >>
-							PAGE_CACHE_SHIFT;
+		return -EBADF;
 
 	start = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
 	if (end > vma->vm_end)
 		end = vma->vm_end;
 	end = ((end - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
 
-	/* Make sure this doesn't exceed the process's max rss. */
-	error = -EIO;
-	rlim_rss = current->rlim ?  current->rlim[RLIMIT_RSS].rlim_cur :
-				LONG_MAX; /* default: see resource.h */
-	if ((vma->vm_mm->rss + (end - start)) > rlim_rss)
-		return error;
-
-	do_page_cache_readahead(file->f_dentry->d_inode->i_mapping, file, start, end - start);
+	do_page_cache_readahead(file->f_dentry->d_inode->i_mapping,
+			file, start, max_sane_readahead(end - start));
 	return 0;
 }
 
diff -Nru a/mm/mempool.c b/mm/mempool.c
--- a/mm/mempool.c	Sun Dec 15 18:08:29 2002
+++ b/mm/mempool.c	Sun Dec 15 18:08:29 2002
@@ -221,7 +221,7 @@
 	spin_unlock_irqrestore(&pool->lock, flags);
 
 	/* We must not sleep in the GFP_ATOMIC case */
-	if (gfp_mask == gfp_nowait)
+	if (!(gfp_mask & __GFP_WAIT))
 		return NULL;
 
 	blk_run_queues();
diff -Nru a/mm/mmap.c b/mm/mmap.c
--- a/mm/mmap.c	Sun Dec 15 18:08:29 2002
+++ b/mm/mmap.c	Sun Dec 15 18:08:29 2002
@@ -559,7 +559,6 @@
 	vma->vm_pgoff = pgoff;
 	vma->vm_file = NULL;
 	vma->vm_private_data = NULL;
-	vma->vm_raend = 0;
 	INIT_LIST_HEAD(&vma->shared);
 
 	if (file) {
@@ -1088,8 +1087,6 @@
 		new->vm_start = addr;
 		new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT);
 	}
-
-	new->vm_raend = 0;
 
 	if (new->vm_file)
 		get_file(new->vm_file);
diff -Nru a/mm/mremap.c b/mm/mremap.c
--- a/mm/mremap.c	Sun Dec 15 18:08:29 2002
+++ b/mm/mremap.c	Sun Dec 15 18:08:29 2002
@@ -233,7 +233,6 @@
 			new_vma->vm_start = new_addr;
 			new_vma->vm_end = new_addr+new_len;
 			new_vma->vm_pgoff += (addr - vma->vm_start) >> PAGE_SHIFT;
-			new_vma->vm_raend = 0;
 			if (new_vma->vm_file)
 				get_file(new_vma->vm_file);
 			if (new_vma->vm_ops && new_vma->vm_ops->open)
diff -Nru a/mm/oom_kill.c b/mm/oom_kill.c
--- a/mm/oom_kill.c	Sun Dec 15 18:08:29 2002
+++ b/mm/oom_kill.c	Sun Dec 15 18:08:29 2002
@@ -172,8 +172,10 @@
 	p = select_bad_process();
 
 	/* Found nothing?!?! Either we hang forever, or we panic. */
-	if (p == NULL)
+	if (!p) {
+		show_free_areas();
 		panic("Out of memory and no killable processes...\n");
+	}
 
 	oom_kill_task(p);
 	/*
diff -Nru a/mm/page-writeback.c b/mm/page-writeback.c
--- a/mm/page-writeback.c	Sun Dec 15 18:08:29 2002
+++ b/mm/page-writeback.c	Sun Dec 15 18:08:29 2002
@@ -286,6 +286,7 @@
 		.older_than_this = &oldest_jif,
 		.nr_to_write	= 0,
 		.nonblocking	= 1,
+		.for_kupdate	= 1,
 	};
 
 	sync_supers();
@@ -299,7 +300,7 @@
 		wbc.encountered_congestion = 0;
 		wbc.nr_to_write = MAX_WRITEBACK_PAGES;
 		writeback_inodes(&wbc);
-		if (wbc.nr_to_write == MAX_WRITEBACK_PAGES) {
+		if (wbc.nr_to_write > 0) {
 			if (wbc.encountered_congestion)
 				blk_congestion_wait(WRITE, HZ);
 			else
@@ -411,6 +412,9 @@
 {
 	struct address_space *mapping = page->mapping;
 	int ret = 0;
+	struct writeback_control wbc = {
+		.sync_mode = WB_SYNC_ALL,
+	};
 
 	BUG_ON(!PageLocked(page));
 
@@ -423,11 +427,7 @@
 		list_add(&page->list, &mapping->locked_pages);
 		page_cache_get(page);
 		write_unlock(&mapping->page_lock);
-		ret = mapping->a_ops->writepage(page);
-		if (ret == -EAGAIN) {
-			__set_page_dirty_nobuffers(page);
-			ret = 0;
-		}
+		ret = mapping->a_ops->writepage(page, &wbc);
 		if (ret == 0 && wait) {
 			wait_on_page_writeback(page);
 			if (PageError(page))
diff -Nru a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c	Sun Dec 15 18:08:28 2002
+++ b/mm/page_alloc.c	Sun Dec 15 18:08:28 2002
@@ -38,7 +38,7 @@
 unsigned long totalhigh_pages;
 int nr_swap_pages;
 int numnodes = 1;
-
+int sysctl_lower_zone_protection = 0;
 
 /*
  * Used by page_zone() to look up the address of the struct zone whose
@@ -464,12 +464,13 @@
 		struct zone *z = zones[i];
 
 		min += z->pages_low;
-		if (z->free_pages > min ||
+		if (z->free_pages >= min ||
 				(!wait && z->free_pages >= z->pages_high)) {
 			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
+		min += z->pages_low * sysctl_lower_zone_protection;
 	}
 
 	/* we're somewhat low on memory, failed to find what we needed */
@@ -486,12 +487,13 @@
 		if (gfp_mask & __GFP_HIGH)
 			local_min >>= 2;
 		min += local_min;
-		if (z->free_pages > min ||
+		if (z->free_pages >= min ||
 				(!wait && z->free_pages >= z->pages_high)) {
 			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
+		min += local_min * sysctl_lower_zone_protection;
 	}
 
 	/* here we're in the low on memory slow path */
@@ -506,13 +508,13 @@
 			if (page)
 				return page;
 		}
+		goto nopage;
 	}
 
 	/* Atomic allocations - we can't balance anything */
 	if (!wait)
 		goto nopage;
 
-	inc_page_state(allocstall);
 	current->flags |= PF_MEMALLOC;
 	try_to_free_pages(classzone, gfp_mask, order);
 	current->flags &= ~PF_MEMALLOC;
@@ -523,12 +525,13 @@
 		struct zone *z = zones[i];
 
 		min += z->pages_min;
-		if (z->free_pages > min ||
+		if (z->free_pages >= min ||
 				(!wait && z->free_pages >= z->pages_high)) {
 			page = buffered_rmqueue(z, order, cold);
 			if (page)
 				return page;
 		}
+		min += z->pages_low * sysctl_lower_zone_protection;
 	}
 
 	/*
@@ -693,6 +696,15 @@
 }
 #endif
 
+#ifdef CONFIG_NUMA
+static void show_node(struct zone *zone)
+{
+	printk("Node %d ", zone->zone_pgdat->node_id);
+}
+#else
+#define show_node(zone)	do { } while (0)
+#endif
+
 /*
  * Accumulate the page_state information across all CPUs.
  * The result is unavoidably approximate - it can change
@@ -703,16 +715,21 @@
 
 void __get_page_state(struct page_state *ret, int nr)
 {
-	int cpu;
+	int cpu = 0;
 
 	memset(ret, 0, sizeof(*ret));
-	for (cpu = 0; cpu < NR_CPUS; cpu++) {
+	while (cpu < NR_CPUS) {
 		unsigned long *in, *out, off;
 
-		if (!cpu_online(cpu))
+		if (!cpu_online(cpu)) {
+			cpu++;
 			continue;
+		}
 
 		in = (unsigned long *)&per_cpu(page_states, cpu);
+		cpu++;
+		if (cpu < NR_CPUS && cpu_online(cpu))
+			prefetch(&per_cpu(page_states, cpu));
 		out = (unsigned long *)ret;
 		for (off = 0; off < nr; off++)
 			*out++ += *in++;
@@ -792,68 +809,91 @@
  */
 void show_free_areas(void)
 {
-	pg_data_t *pgdat;
 	struct page_state ps;
-	int type;
+	int cpu, temperature;
 	unsigned long active;
 	unsigned long inactive;
+	struct zone *zone;
+
+	for_each_zone(zone) {
+		show_node(zone);
+		printk("%s per-cpu:", zone->name);
+
+		if (!zone->present_pages) {
+			printk(" empty\n");
+			continue;
+		} else
+			printk("\n");
+
+		for (cpu = 0; cpu < NR_CPUS; ++cpu) {
+			struct per_cpu_pageset *pageset = zone->pageset + cpu;
+			for (temperature = 0; temperature < 2; temperature++)
+				printk("cpu %d %s: low %d, high %d, batch %d\n",
+					cpu,
+					temperature ? "cold" : "hot",
+					pageset->pcp[temperature].low,
+					pageset->pcp[temperature].high,
+					pageset->pcp[temperature].batch);
+		}
+	}
 
 	get_page_state(&ps);
 	get_zone_counts(&active, &inactive);
 
-	printk("Free pages:      %6dkB (%6dkB HighMem)\n",
+	printk("\nFree pages: %11ukB (%ukB HighMem)\n",
 		K(nr_free_pages()),
 		K(nr_free_highpages()));
 
-	for (pgdat = pgdat_list; pgdat; pgdat = pgdat->pgdat_next)
-		for (type = 0; type < MAX_NR_ZONES; ++type) {
-			struct zone *zone = &pgdat->node_zones[type];
-			printk("Zone:%s"
-				" freepages:%6lukB"
-				" min:%6lukB"
-				" low:%6lukB"
-				" high:%6lukB"
-				" active:%6lukB"
-				" inactive:%6lukB"
-				"\n",
-				zone->name,
-				K(zone->free_pages),
-				K(zone->pages_min),
-				K(zone->pages_low),
-				K(zone->pages_high),
-				K(zone->nr_active),
-				K(zone->nr_inactive)
-				);
-		}
-
-	printk("( Active:%lu inactive:%lu dirty:%lu writeback:%lu free:%u )\n",
+	printk("Active:%lu inactive:%lu dirty:%lu writeback:%lu free:%u\n",
 		active,
 		inactive,
 		ps.nr_dirty,
 		ps.nr_writeback,
 		nr_free_pages());
 
-	for (pgdat = pgdat_list; pgdat; pgdat = pgdat->pgdat_next)
-		for (type = 0; type < MAX_NR_ZONES; type++) {
-			struct list_head *elem;
-			struct zone *zone = &pgdat->node_zones[type];
- 			unsigned long nr, flags, order, total = 0;
+	for_each_zone(zone) {
+		show_node(zone);
+		printk("%s"
+			" free:%lukB"
+			" min:%lukB"
+			" low:%lukB"
+			" high:%lukB"
+			" active:%lukB"
+			" inactive:%lukB"
+			"\n",
+			zone->name,
+			K(zone->free_pages),
+			K(zone->pages_min),
+			K(zone->pages_low),
+			K(zone->pages_high),
+			K(zone->nr_active),
+			K(zone->nr_inactive)
+			);
+	}
 
-			if (!zone->present_pages)
-				continue;
+	for_each_zone(zone) {
+		struct list_head *elem;
+ 		unsigned long nr, flags, order, total = 0;
 
-			spin_lock_irqsave(&zone->lock, flags);
-			for (order = 0; order < MAX_ORDER; order++) {
-				nr = 0;
-				list_for_each(elem, &zone->free_area[order].free_list)
-					++nr;
-				total += nr << order;
-				printk("%lu*%lukB ", nr, K(1UL) << order);
-			}
-			spin_unlock_irqrestore(&zone->lock, flags);
-			printk("= %lukB)\n", K(total));
+		show_node(zone);
+		printk("%s: ", zone->name);
+		if (!zone->present_pages) {
+			printk("empty\n");
+			continue;
 		}
 
+		spin_lock_irqsave(&zone->lock, flags);
+		for (order = 0; order < MAX_ORDER; order++) {
+			nr = 0;
+			list_for_each(elem, &zone->free_area[order].free_list)
+				++nr;
+			total += nr << order;
+			printk("%lu*%lukB ", nr, K(1UL) << order);
+		}
+		spin_unlock_irqrestore(&zone->lock, flags);
+		printk("= %lukB\n", K(total));
+	}
+
 	show_swap_cache_info();
 }
 
@@ -961,7 +1001,7 @@
 	 */
 	size = min(size, 4096UL);
 
-	return size;
+	return max(size, 4UL);
 }
 
 /*
@@ -1321,6 +1361,7 @@
 	"kswapd_steal",
 	"pageoutrun",
 	"allocstall",
+	"pgrotated",
 };
 
 static void *vmstat_start(struct seq_file *m, loff_t *pos)
diff -Nru a/mm/page_io.c b/mm/page_io.c
--- a/mm/page_io.c	Sun Dec 15 18:08:28 2002
+++ b/mm/page_io.c	Sun Dec 15 18:08:28 2002
@@ -18,6 +18,7 @@
 #include <linux/swapops.h>
 #include <linux/buffer_head.h>	/* for block_sync_page() */
 #include <linux/mpage.h>
+#include <linux/writeback.h>
 #include <asm/pgtable.h>
 
 static struct bio *
@@ -86,7 +87,7 @@
  * We may have stale swap cache pages in memory: notice
  * them here and get rid of the unnecessary final write.
  */
-int swap_writepage(struct page *page)
+int swap_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct bio *bio;
 	int ret = 0;
@@ -143,6 +144,9 @@
 int rw_swap_page_sync(int rw, swp_entry_t entry, struct page *page)
 {
 	int ret;
+	struct writeback_control swap_wbc = {
+		.sync_mode = WB_SYNC_ALL,
+	};
 
 	lock_page(page);
 
@@ -154,7 +158,7 @@
 		ret = swap_readpage(NULL, page);
 		wait_on_page_locked(page);
 	} else {
-		ret = swap_writepage(page);
+		ret = swap_writepage(page, &swap_wbc);
 		wait_on_page_writeback(page);
 	}
 	page->mapping = NULL;
diff -Nru a/mm/readahead.c b/mm/readahead.c
--- a/mm/readahead.c	Sun Dec 15 18:08:28 2002
+++ b/mm/readahead.c	Sun Dec 15 18:08:28 2002
@@ -53,11 +53,8 @@
  *
  * Hides the details of the LRU cache etc from the filesystems.
  */
-int
-read_cache_pages(struct address_space *mapping,
-		 struct list_head *pages,
-		 int (*filler)(void *, struct page *),
-		 void *data)
+int read_cache_pages(struct address_space *mapping, struct list_head *pages,
+		 int (*filler)(void *, struct page *), void *data)
 {
 	struct page *page;
 	struct pagevec lru_pvec;
@@ -82,8 +79,7 @@
 	return ret;
 }
 
-static int
-read_pages(struct address_space *mapping, struct file *filp,
+static int read_pages(struct address_space *mapping, struct file *filp,
 		struct list_head *pages, unsigned nr_pages)
 {
 	unsigned page_idx;
@@ -184,10 +180,9 @@
  *
  * Returns the number of pages which actually had IO started against them.
  */
-int do_page_cache_readahead(struct address_space *mapping,
-			    struct file *filp,
-			    unsigned long offset,
-			    unsigned long nr_to_read)
+static inline int
+__do_page_cache_readahead(struct address_space *mapping, struct file *filp,
+			unsigned long offset, unsigned long nr_to_read)
 {
 	struct inode *inode = mapping->host;
 	struct page *page;
@@ -241,6 +236,30 @@
 }
 
 /*
+ * Chunk the readahead into 2 megabyte units, so that we don't pin too much
+ * memory at once.
+ */
+int do_page_cache_readahead(struct address_space *mapping, struct file *filp,
+			unsigned long offset, unsigned long nr_to_read)
+{
+	int ret = 0;
+
+	while (nr_to_read) {
+		unsigned long this_chunk = (2 * 1024 * 1024) / PAGE_CACHE_SIZE;
+
+		if (this_chunk > nr_to_read)
+			this_chunk = nr_to_read;
+		ret = __do_page_cache_readahead(mapping, filp,
+						offset, this_chunk);
+		if (ret < 0)
+			break;
+		offset += this_chunk;
+		nr_to_read -= this_chunk;
+	}
+	return ret;
+}
+
+/*
  * Check how effective readahead is being.  If the amount of started IO is
  * less than expected then the file is partly or fully in pagecache and
  * readahead isn't helping.  Shrink the window.
@@ -267,8 +286,9 @@
  * page_cache_readahead is the main function.  If performs the adaptive
  * readahead window size management and submits the readahead I/O.
  */
-void page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
-			  struct file *filp, unsigned long offset)
+void
+page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
+			struct file *filp, unsigned long offset)
 {
 	unsigned max;
 	unsigned min;
@@ -394,8 +414,9 @@
  * but somewhat ascending.  So readaround favours pages beyond the target one.
  * We also boost the window size, as it can easily shrink due to misses.
  */
-void page_cache_readaround(struct address_space *mapping, struct file_ra_state *ra,
-			   struct file *filp, unsigned long offset)
+void
+page_cache_readaround(struct address_space *mapping, struct file_ra_state *ra,
+			struct file *filp, unsigned long offset)
 {
 	if (ra->next_size != -1UL) {
 		const unsigned long min = get_min_readahead(ra) * 2;
@@ -445,4 +466,17 @@
 		if (ra->next_size < min)
 			ra->next_size = min;
 	}
+}
+
+/*
+ * Given a desired number of PAGE_CACHE_SIZE readahead pages, return a
+ * sensible upper limit.
+ */
+unsigned long max_sane_readahead(unsigned long nr)
+{
+	unsigned long active;
+	unsigned long inactive;
+
+	get_zone_counts(&active, &inactive);
+	return min(nr, inactive / 2);
 }
diff -Nru a/mm/rmap.c b/mm/rmap.c
--- a/mm/rmap.c	Sun Dec 15 18:08:32 2002
+++ b/mm/rmap.c	Sun Dec 15 18:08:32 2002
@@ -26,6 +26,7 @@
 #include <linux/slab.h>
 #include <linux/init.h>
 #include <linux/rmap-locking.h>
+#include <linux/cache.h>
 
 #include <asm/pgalloc.h>
 #include <asm/rmap.h>
@@ -48,7 +49,7 @@
 struct pte_chain {
 	struct pte_chain *next;
 	pte_addr_t ptes[NRPTE];
-};
+} ____cacheline_aligned;
 
 static kmem_cache_t	*pte_chain_cache;
 
diff -Nru a/mm/shmem.c b/mm/shmem.c
--- a/mm/shmem.c	Sun Dec 15 18:08:29 2002
+++ b/mm/shmem.c	Sun Dec 15 18:08:29 2002
@@ -31,6 +31,7 @@
 #include <linux/backing-dev.h>
 #include <linux/shmem_fs.h>
 #include <linux/mount.h>
+#include <linux/writeback.h>
 
 #include <asm/uaccess.h>
 
@@ -670,7 +671,7 @@
 /*
  * Move the page from the page cache to the swap cache.
  */
-static int shmem_writepage(struct page *page)
+static int shmem_writepage(struct page *page, struct writeback_control *wbc)
 {
 	struct shmem_inode_info *info;
 	swp_entry_t *entry, swap;
@@ -686,10 +687,10 @@
 	inode = mapping->host;
 	info = SHMEM_I(inode);
 	if (info->flags & VM_LOCKED)
-		return fail_writepage(page);
+		goto redirty;
 	swap = get_swap_page();
 	if (!swap.val)
-		return fail_writepage(page);
+		goto redirty;
 
 	spin_lock(&info->lock);
 	shmem_recalc_inode(inode);
@@ -709,12 +710,9 @@
 	shmem_swp_unmap(entry);
 	spin_unlock(&info->lock);
 	swap_free(swap);
-	return fail_writepage(page);
-}
-
-static int shmem_writepages(struct address_space *mapping, struct writeback_control *wbc)
-{
-	return 0;
+redirty:
+	set_page_dirty(page);
+	return WRITEPAGE_ACTIVATE;	/* Return with the page locked */
 }
 
 /*
@@ -1802,7 +1800,6 @@
 
 static struct address_space_operations shmem_aops = {
 	.writepage	= shmem_writepage,
-	.writepages	= shmem_writepages,
 	.set_page_dirty	= __set_page_dirty_nobuffers,
 #ifdef CONFIG_TMPFS
 	.readpage	= shmem_readpage,
diff -Nru a/mm/swap.c b/mm/swap.c
--- a/mm/swap.c	Sun Dec 15 18:08:29 2002
+++ b/mm/swap.c	Sun Dec 15 18:08:29 2002
@@ -61,6 +61,7 @@
 	if (PageLRU(page) && !PageActive(page)) {
 		list_del(&page->lru);
 		list_add_tail(&page->lru, &zone->inactive_list);
+		inc_page_state(pgrotated);
 	}
 	if (!TestClearPageWriteback(page))
 		BUG();
diff -Nru a/mm/swapfile.c b/mm/swapfile.c
--- a/mm/swapfile.c	Sun Dec 15 18:08:28 2002
+++ b/mm/swapfile.c	Sun Dec 15 18:08:28 2002
@@ -16,6 +16,7 @@
 #include <linux/shm.h>
 #include <linux/blkdev.h>
 #include <linux/buffer_head.h>
+#include <linux/writeback.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
@@ -696,7 +697,11 @@
 		 * and now we must reincrement count to try again later.
 		 */
 		if ((*swap_map > 1) && PageDirty(page) && PageSwapCache(page)) {
-			swap_writepage(page);
+			struct writeback_control wbc = {
+				.sync_mode = WB_SYNC_NONE,
+			};
+
+			swap_writepage(page, &wbc);
 			lock_page(page);
 			wait_on_page_writeback(page);
 		}
diff -Nru a/mm/vmscan.c b/mm/vmscan.c
--- a/mm/vmscan.c	Sun Dec 15 18:08:28 2002
+++ b/mm/vmscan.c	Sun Dec 15 18:08:28 2002
@@ -282,8 +282,8 @@
 				; /* try to free the page below */
 			}
 		}
-		pte_chain_unlock(page);
 #endif /* CONFIG_SWAP */
+		pte_chain_unlock(page);
 
 		/*
 		 * If the page is dirty, only perform writeback if that write
@@ -309,7 +309,7 @@
 				goto keep_locked;
 			if (!mapping)
 				goto keep_locked;
-			if (mapping->a_ops->writepage == fail_writepage)
+			if (mapping->a_ops->writepage == NULL)
 				goto activate_locked;
 			if (!may_enter_fs)
 				goto keep_locked;
@@ -319,22 +319,26 @@
 				goto keep_locked;
 			if (test_clear_page_dirty(page)) {
 				int res;
+				struct writeback_control wbc = {
+					.sync_mode = WB_SYNC_NONE,
+					.nr_to_write = SWAP_CLUSTER_MAX,
+					.nonblocking = 1,
+					.for_reclaim = 1,
+				};
 
 				write_lock(&mapping->page_lock);
 				list_move(&page->list, &mapping->locked_pages);
 				write_unlock(&mapping->page_lock);
 
 				SetPageReclaim(page);
-				res = mapping->a_ops->writepage(page);
+				res = mapping->a_ops->writepage(page, &wbc);
 
-				if (res == -EAGAIN) {
+				if (res == WRITEPAGE_ACTIVATE) {
 					ClearPageReclaim(page);
-					__set_page_dirty_nobuffers(page);
-				} else if (!PageWriteback(page)) {
-					/*
-					 * synchronous writeout or broken
-					 * a_ops?
-					 */
+					goto activate_locked;
+				}
+				if (!PageWriteback(page)) {
+					/* synchronous write or broken a_ops? */
 					ClearPageReclaim(page);
 				}
 				goto keep;
@@ -799,7 +803,7 @@
 	const int nr_pages = SWAP_CLUSTER_MAX;
 	int nr_reclaimed = 0;
 
-	inc_page_state(pageoutrun);
+	inc_page_state(allocstall);
 
 	for (priority = DEF_PRIORITY; priority >= 0; priority--) {
 		int total_scanned = 0;
@@ -811,8 +815,6 @@
 					nr_pages, &ps);
 		if (nr_reclaimed >= nr_pages)
 			return 1;
-		if (total_scanned == 0)
-			printk("%s: I am buggy\n", __FUNCTION__);
 		if (!(gfp_mask & __GFP_FS))
 			break;		/* Let the caller handle it */
 		/*
@@ -854,6 +856,8 @@
 	int to_free = nr_pages;
 	int priority;
 	int i;
+
+	inc_page_state(pageoutrun);
 
 	for (priority = DEF_PRIORITY; priority; priority--) {
 		int all_zones_ok = 1;
diff -Nru a/net/802/Makefile b/net/802/Makefile
--- a/net/802/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/802/Makefile	Sun Dec 15 18:08:29 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_HIPPI)	+=                 hippi.o
 obj-$(CONFIG_IPX)	+= p8022.o psnap.o
 obj-$(CONFIG_ATALK)	+= p8022.o psnap.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/802/tr.c b/net/802/tr.c
--- a/net/802/tr.c	Sun Dec 15 18:08:28 2002
+++ b/net/802/tr.c	Sun Dec 15 18:08:28 2002
@@ -91,10 +91,10 @@
 	int hdr_len;
 
 	/* 
-	 * Add the 802.2 SNAP header if IP as the IPv4 code calls  
+	 * Add the 802.2 SNAP header if IP as the IPv4/IPv6 code calls  
 	 * dev->hard_header directly.
 	 */
-	if (type == ETH_P_IP || type == ETH_P_ARP)
+	if (type == ETH_P_IP || type == ETH_P_IPV6 || type == ETH_P_ARP)
 	{
 		struct trllc *trllc=(struct trllc *)(trh+1);
 
@@ -216,6 +216,7 @@
 
 	if (trllc->dsap == EXTENDED_SAP &&
 	    (trllc->ethertype == ntohs(ETH_P_IP) ||
+	     trllc->ethertype == ntohs(ETH_P_IPV6) ||
 	     trllc->ethertype == ntohs(ETH_P_ARP)))
 	{
 		skb_pull(skb, sizeof(struct trllc));
diff -Nru a/net/8021q/Makefile b/net/8021q/Makefile
--- a/net/8021q/Makefile	Sun Dec 15 18:08:32 2002
+++ b/net/8021q/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_VLAN_8021Q) += 8021q.o
 
 8021q-objs := vlan.o vlanproc.o vlan_dev.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/Makefile b/net/Makefile
--- a/net/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/Makefile	Sun Dec 15 18:08:29 2002
@@ -41,5 +41,3 @@
 obj-$(CONFIG_MODULES)		+= netsyms.o
 obj-$(CONFIG_SYSCTL)		+= sysctl_net.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/appletalk/Makefile b/net/appletalk/Makefile
--- a/net/appletalk/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/appletalk/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,6 +8,3 @@
 
 appletalk-y			:= aarp.o ddp.o atalk_proc.o
 appletalk-$(CONFIG_SYSCTL)	+= sysctl_net_atalk.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/atm/Makefile b/net/atm/Makefile
--- a/net/atm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/atm/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_ATM_LANE) += lec.o
 obj-$(CONFIG_ATM_MPOA) += mpoa.o
 obj-$(CONFIG_PPPOATM) += pppoatm.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ax25/Makefile b/net/ax25/Makefile
--- a/net/ax25/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/ax25/Makefile	Sun Dec 15 18:08:28 2002
@@ -11,6 +11,3 @@
 	    ax25_subr.o ax25_timer.o ax25_uid.o af_ax25.o
 ax25-$(CONFIG_AX25_DAMA_SLAVE) += ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o
 ax25-$(CONFIG_SYSCTL) += sysctl_net_ax25.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/bluetooth/Makefile b/net/bluetooth/Makefile
--- a/net/bluetooth/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/bluetooth/Makefile	Sun Dec 15 18:08:28 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_BT_BNEP)	+= bnep/
 
 bluetooth-objs := af_bluetooth.o hci_core.o hci_conn.o hci_event.o hci_sock.o hci_proc.o lib.o syms.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/bluetooth/bnep/Makefile b/net/bluetooth/bnep/Makefile
--- a/net/bluetooth/bnep/Makefile	Sun Dec 15 18:08:32 2002
+++ b/net/bluetooth/bnep/Makefile	Sun Dec 15 18:08:32 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_BT_BNEP) += bnep.o
 
 bnep-objs := core.o sock.o netdev.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/bluetooth/rfcomm/Makefile b/net/bluetooth/rfcomm/Makefile
--- a/net/bluetooth/rfcomm/Makefile	Sun Dec 15 18:08:30 2002
+++ b/net/bluetooth/rfcomm/Makefile	Sun Dec 15 18:08:30 2002
@@ -6,5 +6,3 @@
 
 rfcomm-y			:= core.o sock.o crc.o
 rfcomm-$(CONFIG_BT_RFCOMM_TTY)	+= tty.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/bridge/Makefile b/net/bridge/Makefile
--- a/net/bridge/Makefile	Sun Dec 15 18:08:32 2002
+++ b/net/bridge/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 endif
 
 obj-$(CONFIG_BRIDGE_NF_EBTABLES) += netfilter/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/bridge/netfilter/Makefile b/net/bridge/netfilter/Makefile
--- a/net/bridge/netfilter/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/bridge/netfilter/Makefile	Sun Dec 15 18:08:29 2002
@@ -17,4 +17,3 @@
 obj-$(CONFIG_BRIDGE_EBT_DNAT) += ebt_dnat.o
 obj-$(CONFIG_BRIDGE_EBT_REDIRECT) += ebt_redirect.o
 obj-$(CONFIG_BRIDGE_EBT_MARK_T) += ebt_mark.o
-include $(TOPDIR)/Rules.make
diff -Nru a/net/core/Makefile b/net/core/Makefile
--- a/net/core/Makefile	Sun Dec 15 18:08:32 2002
+++ b/net/core/Makefile	Sun Dec 15 18:08:32 2002
@@ -21,5 +21,3 @@
 obj-$(CONFIG_NET_RADIO) += wireless.o
 # Ugly. I wish all wireless drivers were moved in drivers/net/wireless
 obj-$(CONFIG_NET_PCMCIA_RADIO) += wireless.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/decnet/Makefile b/net/decnet/Makefile
--- a/net/decnet/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/decnet/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,6 +5,3 @@
 decnet-$(CONFIG_DECNET_ROUTER) += dn_fib.o dn_rules.o dn_table.o
 decnet-$(CONFIG_DECNET_FW) += dn_fw.o
 decnet-y += sysctl_net_decnet.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/econet/Makefile b/net/econet/Makefile
--- a/net/econet/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/econet/Makefile	Sun Dec 15 18:08:29 2002
@@ -5,6 +5,3 @@
 obj-$(CONFIG_ECONET) += econet.o
 
 econet-objs := af_econet.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/ethernet/Makefile b/net/ethernet/Makefile
--- a/net/ethernet/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/ethernet/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,5 +6,3 @@
 obj-$(CONFIG_SYSCTL)			+= sysctl_net_ether.o
 obj-$(subst m,y,$(CONFIG_IPX))		+= pe2.o
 obj-$(subst m,y,$(CONFIG_ATALK))	+= pe2.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ipv4/Makefile b/net/ipv4/Makefile
--- a/net/ipv4/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/ipv4/Makefile	Sun Dec 15 18:08:28 2002
@@ -23,5 +23,3 @@
 obj-$(CONFIG_XFRM_USER) += xfrm_user.o
 
 obj-y += xfrm_policy.o xfrm_state.o xfrm_input.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
--- a/net/ipv4/netfilter/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/ipv4/netfilter/Makefile	Sun Dec 15 18:08:28 2002
@@ -93,5 +93,3 @@
 obj-$(CONFIG_IP_NF_COMPAT_IPFWADM) += ipfwadm.o
 
 obj-$(CONFIG_IP_NF_QUEUE) += ip_queue.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ipv6/Makefile b/net/ipv6/Makefile
--- a/net/ipv6/Makefile	Sun Dec 15 18:08:30 2002
+++ b/net/ipv6/Makefile	Sun Dec 15 18:08:30 2002
@@ -13,5 +13,3 @@
 		ip6_flowlabel.o ipv6_syms.o
 
 obj-$(CONFIG_NETFILTER)	+= netfilter/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile
--- a/net/ipv6/netfilter/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/ipv6/netfilter/Makefile	Sun Dec 15 18:08:29 2002
@@ -18,5 +18,3 @@
 obj-$(CONFIG_IP6_NF_TARGET_MARK) += ip6t_MARK.o
 obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
 obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/ipx/Makefile b/net/ipx/Makefile
--- a/net/ipx/Makefile	Sun Dec 15 18:08:30 2002
+++ b/net/ipx/Makefile	Sun Dec 15 18:08:30 2002
@@ -6,5 +6,3 @@
 
 ipx-y			:= af_ipx.o ipx_proc.o
 ipx-$(CONFIG_SYSCTL)	+= sysctl_net_ipx.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/Makefile b/net/irda/Makefile
--- a/net/irda/Makefile	Sun Dec 15 18:08:32 2002
+++ b/net/irda/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 	  discovery.o parameters.o irsyms.o
 irda-$(CONFIG_PROC_FS) += irproc.o
 irda-$(CONFIG_SYSCTL) += irsysctl.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/ircomm/Makefile b/net/irda/ircomm/Makefile
--- a/net/irda/ircomm/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/irda/ircomm/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,6 +8,3 @@
 
 ircomm-objs := ircomm_core.o ircomm_event.o ircomm_lmp.o ircomm_ttp.o
 ircomm-tty-objs := ircomm_tty.o ircomm_tty_attach.o ircomm_tty_ioctl.o ircomm_param.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/irda/irlan/Makefile b/net/irda/irlan/Makefile
--- a/net/irda/irlan/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/irda/irlan/Makefile	Sun Dec 15 18:08:28 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_IRLAN) += irlan.o
 
 irlan-objs := irlan_common.o irlan_eth.o irlan_event.o irlan_client.o irlan_provider.o irlan_filter.o irlan_provider_event.o irlan_client_event.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/irnet/Makefile b/net/irda/irnet/Makefile
--- a/net/irda/irnet/Makefile	Sun Dec 15 18:08:31 2002
+++ b/net/irda/irnet/Makefile	Sun Dec 15 18:08:31 2002
@@ -5,5 +5,3 @@
 obj-$(CONFIG_IRNET) += irnet.o
 
 irnet-objs := irnet_ppp.o irnet_irda.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/irda/irnet/irnet_ppp.h b/net/irda/irnet/irnet_ppp.h
--- a/net/irda/irnet/irnet_ppp.h	Sun Dec 15 18:08:30 2002
+++ b/net/irda/irnet/irnet_ppp.h	Sun Dec 15 18:08:30 2002
@@ -98,12 +98,12 @@
 /* Filesystem callbacks (to call us) */
 static struct file_operations irnet_device_fops =
 {
-  read:		dev_irnet_read,
-  write:	dev_irnet_write,
-  poll:		dev_irnet_poll,
-  ioctl:	dev_irnet_ioctl,
-  open:		dev_irnet_open,
-  release:	dev_irnet_close
+	.read		= dev_irnet_read,
+	.write		= dev_irnet_write,
+	.poll		= dev_irnet_poll,
+	.ioctl		= dev_irnet_ioctl,
+	.open		= dev_irnet_open,
+	.release	= dev_irnet_close
   /* Also : llseek, readdir, mmap, flush, fsync, fasync, lock, readv, writev */
 };
 
diff -Nru a/net/key/Makefile b/net/key/Makefile
--- a/net/key/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/key/Makefile	Sun Dec 15 18:08:29 2002
@@ -3,5 +3,3 @@
 #
 
 obj-$(CONFIG_NET_KEY) += af_key.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/lapb/Makefile b/net/lapb/Makefile
--- a/net/lapb/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/lapb/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,6 +7,3 @@
 obj-$(CONFIG_LAPB) += lapb.o
 
 lapb-objs := lapb_in.o lapb_out.o lapb_subr.o lapb_timer.o lapb_iface.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/llc/Makefile b/net/llc/Makefile
--- a/net/llc/Makefile	Sun Dec 15 18:08:31 2002
+++ b/net/llc/Makefile	Sun Dec 15 18:08:31 2002
@@ -21,5 +21,3 @@
 
 # Objects that export symbols.
 export-objs := llc_if.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/netlink/Makefile b/net/netlink/Makefile
--- a/net/netlink/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/netlink/Makefile	Sun Dec 15 18:08:29 2002
@@ -4,5 +4,3 @@
 
 obj-y  				:= af_netlink.o
 obj-$(CONFIG_NETLINK_DEV)	+= netlink_dev.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/netrom/Makefile b/net/netrom/Makefile
--- a/net/netrom/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/netrom/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,6 +7,3 @@
 netrom-y		:= af_netrom.o nr_dev.o nr_in.o nr_loopback.o \
 			   nr_out.o nr_route.o nr_subr.o nr_timer.o
 netrom-$(CONFIG_SYSCTL)	+= sysctl_net_netrom.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/packet/Makefile b/net/packet/Makefile
--- a/net/packet/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/packet/Makefile	Sun Dec 15 18:08:28 2002
@@ -3,5 +3,3 @@
 #
 
 obj-$(CONFIG_PACKET) += af_packet.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/rose/Makefile b/net/rose/Makefile
--- a/net/rose/Makefile	Sun Dec 15 18:08:31 2002
+++ b/net/rose/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,6 +7,3 @@
 rose-y	  := af_rose.o rose_dev.o rose_in.o rose_link.o rose_loopback.o \
 	     rose_out.o rose_route.o rose_subr.o rose_timer.o
 rose-$(CONFIG_SYSCTL) += sysctl_net_rose.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/rxrpc/Makefile b/net/rxrpc/Makefile
--- a/net/rxrpc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/rxrpc/Makefile	Sun Dec 15 18:08:29 2002
@@ -23,5 +23,3 @@
 endif
 
 obj-$(CONFIG_RXRPC) := rxrpc.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/sched/Makefile b/net/sched/Makefile
--- a/net/sched/Makefile	Sun Dec 15 18:08:29 2002
+++ b/net/sched/Makefile	Sun Dec 15 18:08:29 2002
@@ -28,5 +28,3 @@
 obj-$(CONFIG_NET_CLS_RSVP6)	+= cls_rsvp6.o
 obj-$(CONFIG_NET_CLS_ROUTE4)	+= cls_route.o
 obj-$(CONFIG_NET_CLS_FW)	+= cls_fw.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/sctp/Makefile b/net/sctp/Makefile
--- a/net/sctp/Makefile	Sun Dec 15 18:08:33 2002
+++ b/net/sctp/Makefile	Sun Dec 15 18:08:33 2002
@@ -22,5 +22,3 @@
 sctp-$(CONFIG_SYSCTL) += sysctl.o
 
 sctp-$(subst m,y,$(CONFIG_IPV6))	+= ipv6.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/sunrpc/Makefile b/net/sunrpc/Makefile
--- a/net/sunrpc/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/sunrpc/Makefile	Sun Dec 15 18:08:28 2002
@@ -13,5 +13,3 @@
 	    sunrpc_syms.o cache.o
 sunrpc-$(CONFIG_PROC_FS) += stats.o
 sunrpc-$(CONFIG_SYSCTL) += sysctl.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
--- a/net/sunrpc/sunrpc_syms.c	Sun Dec 15 18:08:31 2002
+++ b/net/sunrpc/sunrpc_syms.c	Sun Dec 15 18:08:31 2002
@@ -120,6 +120,8 @@
 EXPORT_SYMBOL(xdr_encode_pages);
 EXPORT_SYMBOL(xdr_inline_pages);
 EXPORT_SYMBOL(xdr_shift_buf);
+EXPORT_SYMBOL(xdr_write_pages);
+EXPORT_SYMBOL(xdr_read_pages);
 
 /* Debugging symbols */
 #ifdef RPC_DEBUG
diff -Nru a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
--- a/net/sunrpc/xdr.c	Sun Dec 15 18:08:29 2002
+++ b/net/sunrpc/xdr.c	Sun Dec 15 18:08:29 2002
@@ -141,7 +141,6 @@
 	xdr->len += len;
 }
 
-
 /*
  * Realign the iovec if the server missed out some reply elements
  * (such as post-op attributes,...)
@@ -318,13 +317,308 @@
 		copy_actor(desc, (char *)xdr->tail[0].iov_base + base, len);
 }
 
+
+/*
+ * Helper routines for doing 'memmove' like operations on a struct xdr_buf
+ *
+ * _shift_data_right_pages
+ * @pages: vector of pages containing both the source and dest memory area.
+ * @pgto_base: page vector address of destination
+ * @pgfrom_base: page vector address of source
+ * @len: number of bytes to copy
+ *
+ * Note: the addresses pgto_base and pgfrom_base are both calculated in
+ *       the same way:
+ *            if a memory area starts at byte 'base' in page 'pages[i]',
+ *            then its address is given as (i << PAGE_CACHE_SHIFT) + base
+ * Also note: pgfrom_base must be < pgto_base, but the memory areas
+ * 	they point to may overlap.
+ */
+static void
+_shift_data_right_pages(struct page **pages, size_t pgto_base,
+		size_t pgfrom_base, size_t len)
+{
+	struct page **pgfrom, **pgto;
+	char *vfrom, *vto;
+	size_t copy;
+
+	BUG_ON(pgto_base <= pgfrom_base);
+
+	pgto_base += len;
+	pgfrom_base += len;
+
+	pgto = pages + (pgto_base >> PAGE_CACHE_SHIFT);
+	pgfrom = pages + (pgfrom_base >> PAGE_CACHE_SHIFT);
+
+	pgto_base &= ~PAGE_CACHE_MASK;
+	pgfrom_base &= ~PAGE_CACHE_MASK;
+
+	do {
+		/* Are any pointers crossing a page boundary? */
+		if (pgto_base == 0) {
+			pgto_base = PAGE_CACHE_SIZE;
+			pgto--;
+		}
+		if (pgfrom_base == 0) {
+			pgfrom_base = PAGE_CACHE_SIZE;
+			pgfrom--;
+		}
+
+		copy = len;
+		if (copy > pgto_base)
+			copy = pgto_base;
+		if (copy > pgfrom_base)
+			copy = pgfrom_base;
+		pgto_base -= copy;
+		pgfrom_base -= copy;
+
+		vto = kmap_atomic(*pgto, KM_USER0);
+		vfrom = kmap_atomic(*pgfrom, KM_USER1);
+		memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
+		kunmap_atomic(vfrom, KM_USER1);
+		kunmap_atomic(vto, KM_USER0);
+
+	} while ((len -= copy) != 0);
+}
+
+/*
+ * _copy_to_pages
+ * @pages: array of pages
+ * @pgbase: page vector address of destination
+ * @p: pointer to source data
+ * @len: length
+ *
+ * Copies data from an arbitrary memory location into an array of pages
+ * The copy is assumed to be non-overlapping.
+ */
+static void
+_copy_to_pages(struct page **pages, size_t pgbase, const char *p, size_t len)
+{
+	struct page **pgto;
+	char *vto;
+	size_t copy;
+
+	pgto = pages + (pgbase >> PAGE_CACHE_SHIFT);
+	pgbase &= ~PAGE_CACHE_MASK;
+
+	do {
+		copy = PAGE_CACHE_SIZE - pgbase;
+		if (copy > len)
+			copy = len;
+
+		vto = kmap_atomic(*pgto, KM_USER0);
+		memcpy(vto + pgbase, p, copy);
+		kunmap_atomic(vto, KM_USER0);
+
+		pgbase += copy;
+		if (pgbase == PAGE_CACHE_SIZE) {
+			pgbase = 0;
+			pgto++;
+		}
+		p += copy;
+
+	} while ((len -= copy) != 0);
+}
+
+/*
+ * _copy_from_pages
+ * @p: pointer to destination
+ * @pages: array of pages
+ * @pgbase: offset of source data
+ * @len: length
+ *
+ * Copies data into an arbitrary memory location from an array of pages
+ * The copy is assumed to be non-overlapping.
+ */
+static void
+_copy_from_pages(char *p, struct page **pages, size_t pgbase, size_t len)
+{
+	struct page **pgfrom;
+	char *vfrom;
+	size_t copy;
+
+	pgfrom = pages + (pgbase >> PAGE_CACHE_SHIFT);
+	pgbase &= ~PAGE_CACHE_MASK;
+
+	do {
+		copy = PAGE_CACHE_SIZE - pgbase;
+		if (copy > len)
+			copy = len;
+
+		vfrom = kmap_atomic(*pgfrom, KM_USER0);
+		memcpy(p, vfrom + pgbase, copy);
+		kunmap_atomic(vfrom, KM_USER0);
+
+		pgbase += copy;
+		if (pgbase == PAGE_CACHE_SIZE) {
+			pgbase = 0;
+			pgfrom++;
+		}
+		p += copy;
+
+	} while ((len -= copy) != 0);
+}
+
+/*
+ * xdr_shrink_bufhead
+ * @buf: xdr_buf
+ * @len: bytes to remove from buf->head[0]
+ *
+ * Shrinks XDR buffer's header iovec buf->head[0] by 
+ * 'len' bytes. The extra data is not lost, but is instead
+ * moved into the inlined pages and/or the tail.
+ */
 void
-xdr_shift_buf(struct xdr_buf *xdr, size_t len)
+xdr_shrink_bufhead(struct xdr_buf *buf, size_t len)
 {
-	struct iovec iov[MAX_IOVEC];
-	unsigned int nr;
+	struct iovec *head, *tail;
+	size_t copy, offs;
+	unsigned int pglen = buf->page_len;
+
+	tail = buf->tail;
+	head = buf->head;
+	BUG_ON (len > head->iov_len);
+
+	/* Shift the tail first */
+	if (tail->iov_len != 0) {
+		if (tail->iov_len > len) {
+			copy = tail->iov_len - len;
+			memmove((char *)tail->iov_base + len,
+					tail->iov_base, copy);
+		}
+		/* Copy from the inlined pages into the tail */
+		copy = len;
+		if (copy > pglen)
+			copy = pglen;
+		offs = len - copy;
+		if (offs >= tail->iov_len)
+			copy = 0;
+		else if (copy > tail->iov_len - offs)
+			copy = tail->iov_len - offs;
+		if (copy != 0)
+			_copy_from_pages((char *)tail->iov_base + offs,
+					buf->pages,
+					buf->page_base + pglen + offs - len,
+					copy);
+		/* Do we also need to copy data from the head into the tail ? */
+		if (len > pglen) {
+			offs = copy = len - pglen;
+			if (copy > tail->iov_len)
+				copy = tail->iov_len;
+			memcpy(tail->iov_base,
+					(char *)head->iov_base +
+					head->iov_len - offs,
+					copy);
+		}
+	}
+	/* Now handle pages */
+	if (pglen != 0) {
+		if (pglen > len)
+			_shift_data_right_pages(buf->pages,
+					buf->page_base + len,
+					buf->page_base,
+					pglen - len);
+		copy = len;
+		if (len > pglen)
+			copy = pglen;
+		_copy_to_pages(buf->pages, buf->page_base,
+				(char *)head->iov_base + head->iov_len - len,
+				copy);
+	}
+	head->iov_len -= len;
+	buf->len -= len;
+}
 
-	nr = xdr_kmap(iov, xdr, 0);
-	xdr_shift_iovec(iov, nr, len);
-	xdr_kunmap(xdr, 0);
+/*
+ * xdr_shrink_pagelen
+ * @buf: xdr_buf
+ * @len: bytes to remove from buf->pages
+ *
+ * Shrinks XDR buffer's page array buf->pages by 
+ * 'len' bytes. The extra data is not lost, but is instead
+ * moved into the tail.
+ */
+void
+xdr_shrink_pagelen(struct xdr_buf *buf, size_t len)
+{
+	struct iovec *tail;
+	size_t copy;
+	char *p;
+	unsigned int pglen = buf->page_len;
+
+	tail = buf->tail;
+	BUG_ON (len > pglen);
+
+	/* Shift the tail first */
+	if (tail->iov_len != 0) {
+		p = (char *)tail->iov_base + len;
+		if (tail->iov_len > len) {
+			copy = tail->iov_len - len;
+			memmove(p, tail->iov_base, copy);
+		} else
+			buf->len -= len;
+		/* Copy from the inlined pages into the tail */
+		copy = len;
+		if (copy > tail->iov_len)
+			copy = tail->iov_len;
+		_copy_from_pages((char *)tail->iov_base,
+				buf->pages, buf->page_base + pglen - len,
+				copy);
+	}
+	buf->page_len -= len;
+	buf->len -= len;
+}
+
+void
+xdr_shift_buf(struct xdr_buf *buf, size_t len)
+{
+	xdr_shrink_bufhead(buf, len);
+}
+
+void
+xdr_write_pages(struct xdr_stream *xdr, struct page **pages, unsigned int base,
+		 unsigned int len)
+{
+	struct xdr_buf *buf = xdr->buf;
+	struct iovec *iov = buf->tail;
+	buf->pages = pages;
+	buf->page_base = base;
+	buf->page_len = len;
+
+	iov->iov_base = (char *)xdr->p;
+	iov->iov_len  = 0;
+	xdr->iov = iov;
+
+	if (len & 3) {
+		unsigned int pad = 4 - (len & 3);
+
+		BUG_ON(xdr->p >= xdr->end);
+		iov->iov_base = (char *)xdr->p + (len & 3);
+		iov->iov_len  += pad;
+		len += pad;
+		*xdr->p++ = 0;
+	}
+	buf->len += len;
+}
+
+void
+xdr_read_pages(struct xdr_stream *xdr, unsigned int len)
+{
+	struct xdr_buf *buf = xdr->buf;
+	struct iovec *iov;
+	ssize_t shift;
+
+	/* Realign pages to current pointer position */
+	iov  = buf->head;
+	shift = iov->iov_len + (char *)iov->iov_base - (char *)xdr->p;
+	if (shift > 0)
+		xdr_shrink_bufhead(buf, shift);
+
+	/* Truncate page data and move it into the tail */
+	len = XDR_QUADLEN(len) << 2;
+	if (buf->page_len > len)
+		xdr_shrink_pagelen(buf, buf->page_len - len);
+	xdr->iov = iov = buf->tail;
+	xdr->p = (uint32_t *)iov->iov_base;
+	xdr->end = (uint32_t *)((char *)iov->iov_base + iov->iov_len);
 }
diff -Nru a/net/unix/Makefile b/net/unix/Makefile
--- a/net/unix/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/unix/Makefile	Sun Dec 15 18:08:28 2002
@@ -6,6 +6,3 @@
 
 unix-y			:= af_unix.o garbage.o
 unix-$(CONFIG_SYSCTL)	+= sysctl_net_unix.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/net/wanrouter/Makefile b/net/wanrouter/Makefile
--- a/net/wanrouter/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/wanrouter/Makefile	Sun Dec 15 18:08:28 2002
@@ -7,5 +7,3 @@
 obj-$(CONFIG_WAN_ROUTER) += wanrouter.o
 
 wanrouter-objs :=  wanproc.o wanmain.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/net/x25/Makefile b/net/x25/Makefile
--- a/net/x25/Makefile	Sun Dec 15 18:08:28 2002
+++ b/net/x25/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,6 +8,3 @@
 			   x25_link.o x25_out.o x25_route.o x25_subr.o \
 			   x25_timer.o x25_proc.o
 x25-$(CONFIG_SYSCTL)	+= sysctl_net_x25.o
-
-include $(TOPDIR)/Rules.make
-
diff -Nru a/scripts/Makefile.modinst b/scripts/Makefile.modinst
--- a/scripts/Makefile.modinst	Sun Dec 15 18:08:29 2002
+++ b/scripts/Makefile.modinst	Sun Dec 15 18:08:29 2002
@@ -16,8 +16,8 @@
 # ==========================================================================
 
 quiet_cmd_modules_install = INSTALL $(obj-m:.o=.ko)
-      cmd_modules_install = mkdir -p $(MODLIB)/kernel && \
-		      cp $(obj-m:.o=.ko) $(MODLIB)/kernel/
+      cmd_modules_install = mkdir -p $(MODLIB)/kernel/$(obj); \
+			    cp $(obj-m:.o=.ko) $(MODLIB)/kernel/$(obj)
 
 modules_install: $(subdir-ym)
 ifneq ($(obj-m:.o=.ko),)
diff -Nru a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
--- a/scripts/kconfig/Makefile	Sun Dec 15 18:08:32 2002
+++ b/scripts/kconfig/Makefile	Sun Dec 15 18:08:32 2002
@@ -21,8 +21,6 @@
 clean-files	:= libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
 		   zconf.tab.c zconf.tab.h lex.zconf.c
 
-include $(TOPDIR)/Rules.make
-
 # generated files seem to need this to find local include files
 HOSTCFLAGS_lex.zconf.o	:= -I$(src)
 HOSTCFLAGS_zconf.tab.o	:= -I$(src)
@@ -35,12 +33,13 @@
 $(obj)/qconf.o: $(obj)/.tmp_qtcheck
 
 ifeq ($(MAKECMDGOALS),$(obj)/qconf)
+MOC = $(QTDIR)/bin/moc
 -include $(obj)/.tmp_qtcheck
 
 # QT needs some extra effort...
 $(obj)/.tmp_qtcheck:
 	@set -e; for d in $$QTDIR /usr/share/qt /usr/lib/qt3; do \
-	  if [ -x $$d/bin/moc ]; then DIR=$$d; break; fi; \
+	  if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \
 	done; \
 	if [ -z "$$DIR" ]; then \
 	  echo "*"; \
@@ -52,7 +51,13 @@
 	fi; \
 	LIB=qt; \
 	if [ -f $$DIR/lib/libqt-mt.so ]; then LIB=qt-mt; fi; \
-	echo "QTDIR=$$DIR" > $@; echo "QTLIB=$$LIB" >> $@
+	echo "QTDIR=$$DIR" > $@; echo "QTLIB=$$LIB" >> $@; \
+	if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \
+	  echo "*"; \
+	  echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \
+	  echo "*"; \
+	  echo "MOC=/usr/bin/moc" >> $@; \
+	fi
 endif
 
 $(obj)/zconf.tab.o: $(obj)/lex.zconf.c
@@ -62,7 +67,7 @@
 $(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
 
 $(obj)/%.moc: $(src)/%.h
-	$(QTDIR)/bin/moc -i $< -o $@
+	$(MOC) -i $< -o $@
 
 $(obj)/lkc_defs.h: $(src)/lkc_proto.h
 	sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
diff -Nru a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
--- a/scripts/kconfig/conf.c	Sun Dec 15 18:08:32 2002
+++ b/scripts/kconfig/conf.c	Sun Dec 15 18:08:32 2002
@@ -360,7 +360,7 @@
 			continue;
 		}
 		if (line[0]) {
-			len = strlen(line) - 1;
+			len = strlen(line);
 			line[len] = 0;
 
 			def_menu = NULL;
diff -Nru a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
--- a/scripts/kconfig/confdata.c	Sun Dec 15 18:08:32 2002
+++ b/scripts/kconfig/confdata.c	Sun Dec 15 18:08:32 2002
@@ -3,6 +3,7 @@
  * Released under the terms of the GNU GPL v2.0.
  */
 
+#include <sys/stat.h>
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -53,7 +54,18 @@
 
 char *conf_get_default_confname(void)
 {
-	return conf_expand_value(conf_defname);
+	struct stat buf;
+	static char fullname[PATH_MAX+1];
+	char *env, *name;
+
+	name = conf_expand_value(conf_defname);
+	env = getenv(SRCTREE);
+	if (env) {
+		sprintf(fullname, "%s/%s", env, name);
+		if (!stat(fullname, &buf))
+			return fullname;
+	}
+	return name;
 }
 
 int conf_read(const char *name)
@@ -68,12 +80,12 @@
 	int i;
 
 	if (name) {
-		in = fopen(name, "r");
+		in = zconf_fopen(name);
 	} else {
 		const char **names = conf_confnames;
 		while ((name = *names++)) {
 			name = conf_expand_value(name);
-			in = fopen(name, "r");
+			in = zconf_fopen(name);
 			if (in) {
 				printf("#\n"
 				       "# using defaults found in %s\n"
diff -Nru a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
--- a/scripts/kconfig/expr.h	Sun Dec 15 18:08:29 2002
+++ b/scripts/kconfig/expr.h	Sun Dec 15 18:08:29 2002
@@ -166,11 +166,14 @@
 	struct symbol *sym;
 	struct property *prompt;
 	struct expr *dep;
+	unsigned int flags;
 	//char *help;
 	struct file *file;
 	int lineno;
 	void *data;
 };
+
+#define MENU_CHANGED		0x0001
 
 #ifndef SWIG
 
diff -Nru a/scripts/kconfig/lex.zconf.c_shipped b/scripts/kconfig/lex.zconf.c_shipped
--- a/scripts/kconfig/lex.zconf.c_shipped	Sun Dec 15 18:08:32 2002
+++ b/scripts/kconfig/lex.zconf.c_shipped	Sun Dec 15 18:08:32 2002
@@ -358,17 +358,17 @@
 
     {
        11,   38,   38,   39,   40,   41,   38,   42,   41,   43,
-       44,   45,   46,   46,   47,   38,   46,   46,   46,   46,
-       46,   46,   46,   46,   48,   46,   46,   46,   49,   46,
-       46,   46,   46,   46,   46,   46,   50
+       44,   45,   46,   46,   47,   48,   46,   46,   46,   46,
+       46,   46,   46,   46,   49,   46,   46,   46,   50,   46,
+       46,   46,   46,   46,   46,   46,   51
 
     },
 
     {
        11,   38,   38,   39,   40,   41,   38,   42,   41,   43,
-       44,   45,   46,   46,   47,   38,   46,   46,   46,   46,
-       46,   46,   46,   46,   48,   46,   46,   46,   49,   46,
-       46,   46,   46,   46,   46,   46,   50
+       44,   45,   46,   46,   47,   48,   46,   46,   46,   46,
+       46,   46,   46,   46,   49,   46,   46,   46,   50,   46,
+       46,   46,   46,   46,   46,   46,   51
     },
 
     {
@@ -387,7 +387,7 @@
     },
 
     {
-       11,  -13,   51,   52,  -13,  -13,   53,  -13,  -13,  -13,
+       11,  -13,   52,   53,  -13,  -13,   54,  -13,  -13,  -13,
       -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
       -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,  -13,
       -13,  -13,  -13,  -13,  -13,  -13,  -13
@@ -402,10 +402,10 @@
     },
 
     {
-       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54
+       11,   55,   55,   56,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55
     },
 
     {
@@ -425,109 +425,109 @@
 
     {
        11,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,  -18,
-      -18,  -18,  -18,   56,  -18,  -18,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -18
+      -18,  -18,  -18,   57,  -18,  -18,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -18
     },
 
     {
        11,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,  -19,
-      -19,  -19,  -19,   56,  -19,  -19,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   57,   56,
-       56,   56,   56,   56,   56,   56,  -19
+      -19,  -19,  -19,   57,  -19,  -19,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   58,   57,
+       57,   57,   57,   57,   57,   57,  -19
 
     },
 
     {
        11,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,  -20,
-      -20,  -20,  -20,   56,  -20,  -20,   56,   56,   56,   56,
-       56,   56,   56,   58,   56,   56,   56,   56,   59,   56,
-       56,   56,   56,   56,   56,   56,  -20
+      -20,  -20,  -20,   57,  -20,  -20,   57,   57,   57,   57,
+       57,   57,   57,   59,   57,   57,   57,   57,   60,   57,
+       57,   57,   57,   57,   57,   57,  -20
     },
 
     {
        11,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,  -21,
-      -21,  -21,  -21,   56,  -21,  -21,   56,   56,   56,   56,
-       60,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -21
+      -21,  -21,  -21,   57,  -21,  -21,   57,   57,   57,   57,
+       61,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -21
     },
 
     {
        11,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,  -22,
-      -22,  -22,  -22,   56,  -22,  -22,   56,   56,   56,   56,
+      -22,  -22,  -22,   57,  -22,  -22,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   61,   56,   56,
-       56,   56,   56,   56,   56,   56,  -22
+       57,   57,   57,   57,   57,   57,   57,   62,   57,   57,
+       57,   57,   57,   57,   57,   57,  -22
     },
 
     {
        11,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,  -23,
-      -23,  -23,  -23,   56,  -23,  -23,   56,   56,   56,   56,
-       62,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -23
+      -23,  -23,  -23,   57,  -23,  -23,   57,   57,   57,   57,
+       63,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -23
     },
 
     {
        11,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,  -24,
-      -24,  -24,  -24,   56,  -24,  -24,   56,   56,   56,   56,
-       56,   63,   56,   56,   56,   56,   56,   64,   56,   56,
-       56,   56,   56,   56,   56,   56,  -24
+      -24,  -24,  -24,   57,  -24,  -24,   57,   57,   57,   57,
+       57,   64,   57,   57,   57,   57,   57,   65,   57,   57,
+       57,   57,   57,   57,   57,   57,  -24
 
     },
 
     {
        11,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,  -25,
-      -25,  -25,  -25,   56,  -25,  -25,   65,   56,   56,   56,
-       66,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -25
+      -25,  -25,  -25,   57,  -25,  -25,   66,   57,   57,   57,
+       67,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -25
     },
 
     {
        11,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,  -26,
-      -26,  -26,  -26,   56,  -26,  -26,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   67,
-       56,   56,   56,   56,   56,   56,  -26
+      -26,  -26,  -26,   57,  -26,  -26,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   68,
+       57,   57,   57,   57,   57,   57,  -26
     },
 
     {
        11,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,  -27,
-      -27,  -27,  -27,   56,  -27,  -27,   56,   56,   56,   56,
+      -27,  -27,  -27,   57,  -27,  -27,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   68,   56,   56,   56,   56,  -27
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   69,   57,   57,   57,   57,  -27
     },
 
     {
        11,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,  -28,
-      -28,  -28,  -28,   56,  -28,  -28,   56,   56,   56,   56,
-       69,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -28
+      -28,  -28,  -28,   57,  -28,  -28,   57,   57,   57,   57,
+       70,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -28
     },
 
     {
        11,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,  -29,
-      -29,  -29,  -29,   56,  -29,  -29,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   70,   56,
-       56,   56,   56,   71,   56,   56,  -29
+      -29,  -29,  -29,   57,  -29,  -29,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   71,   57,
+       57,   57,   57,   72,   57,   57,  -29
 
     },
 
     {
        11,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,  -30,
-      -30,  -30,  -30,   56,  -30,  -30,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   72,   56,   56,   56,   56,  -30
+      -30,  -30,  -30,   57,  -30,  -30,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   73,   57,   57,   57,   57,  -30
     },
 
     {
-       11,   73,   73,  -31,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73
+       11,   74,   74,  -31,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74
     },
 
     {
-       11,  -32,   74,   75,  -32,  -32,  -32,  -32,  -32,  -32,
+       11,  -32,   75,   76,  -32,  -32,  -32,  -32,  -32,  -32,
       -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
 
       -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,  -32,
@@ -535,17 +535,17 @@
     },
 
     {
-       11,   76,  -33,  -33,   76,   76,   76,   76,   76,   76,
-       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
-       76,   76,   76,   76,   76,   76,   76,   76,   76,   76,
-       76,   76,   76,   76,   76,   76,   76
+       11,   77,  -33,  -33,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
+       77,   77,   77,   77,   77,   77,   77
     },
 
     {
-       11,   77,   77,   78,   77,  -34,   77,   77,  -34,   77,
-       77,   77,   77,   77,   77,  -34,   77,   77,   77,   77,
-       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
-       77,   77,   77,   77,   77,   77,   77
+       11,   78,   78,   79,   78,  -34,   78,   78,  -34,   78,
+       78,   78,   78,   78,   78,  -34,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78
 
     },
 
@@ -564,11 +564,11 @@
     },
 
     {
-       11,   79,   79,   80,   79,   79,   79,   79,   79,   79,
-       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
+       11,   80,   80,   81,   80,   80,   80,   80,   80,   80,
+       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
 
-       79,   79,   79,   79,   79,   79,   79,   79,   79,   79,
-       79,   79,   79,   79,   79,   79,   79
+       80,   80,   80,   80,   80,   80,   80,   80,   80,   80,
+       80,   80,   80,   80,   80,   80,   80
     },
 
     {
@@ -588,7 +588,7 @@
 
     {
        11,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
-      -40,  -40,  -40,  -40,   81,  -40,  -40,  -40,  -40,  -40,
+      -40,  -40,  -40,  -40,   82,  -40,  -40,  -40,  -40,  -40,
       -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,  -40,
       -40,  -40,  -40,  -40,  -40,  -40,  -40
     },
@@ -601,7 +601,7 @@
     },
 
     {
-       11,  -42,  -42,  -42,  -42,  -42,  -42,   82,  -42,  -42,
+       11,  -42,  -42,  -42,  -42,  -42,  -42,   83,  -42,  -42,
       -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,
 
       -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,  -42,
@@ -625,16 +625,16 @@
 
     {
        11,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,  -45,
-      -45,   83,   84,   84,  -45,  -45,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -45
+      -45,   84,   85,   85,  -45,  -45,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -45
     },
 
     {
        11,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,  -46,
-      -46,   84,   84,   84,  -46,  -46,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -46
+      -46,   85,   85,   85,  -46,  -46,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -46
     },
 
     {
@@ -646,36 +646,36 @@
     },
 
     {
-       11,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
-      -48,   84,   84,   84,  -48,  -48,   84,   84,   84,   84,
-       84,   85,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -48
+       11,  -48,  -48,   86,  -48,  -48,  -48,  -48,  -48,  -48,
+      -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
+      -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,  -48,
+      -48,  -48,  -48,  -48,  -48,  -48,  -48
     },
 
     {
        11,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  -49,  -49,
-      -49,   84,   84,   84,  -49,  -49,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   86,   84,   84,
-       84,   84,   84,   84,   84,   84,  -49
+      -49,   85,   85,   85,  -49,  -49,   85,   85,   85,   85,
+       85,   87,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -49
 
     },
 
     {
        11,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
-      -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
-      -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,  -50,
-      -50,  -50,  -50,  -50,  -50,  -50,   87
+      -50,   85,   85,   85,  -50,  -50,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   88,   85,   85,
+       85,   85,   85,   85,   85,   85,  -50
     },
 
     {
-       11,  -51,   51,   52,  -51,  -51,   53,  -51,  -51,  -51,
+       11,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
       -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
       -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,  -51,
-      -51,  -51,  -51,  -51,  -51,  -51,  -51
+      -51,  -51,  -51,  -51,  -51,  -51,   89
     },
 
     {
-       11,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
+       11,  -52,   52,   53,  -52,  -52,   54,  -52,  -52,  -52,
       -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
 
       -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,  -52,
@@ -683,170 +683,170 @@
     },
 
     {
-       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54
+       11,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
+      -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
+      -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,  -53,
+      -53,  -53,  -53,  -53,  -53,  -53,  -53
     },
 
     {
-       11,   54,   54,   55,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54,   54,   54,   54,
-       54,   54,   54,   54,   54,   54,   54
+       11,   55,   55,   56,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55
 
     },
 
     {
-       11,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
-      -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
-      -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,  -55,
-      -55,  -55,  -55,  -55,  -55,  -55,  -55
+       11,   55,   55,   56,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55,   55,   55,   55,
+       55,   55,   55,   55,   55,   55,   55
     },
 
     {
        11,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,
-      -56,  -56,  -56,   56,  -56,  -56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -56
+      -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,
+      -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,  -56,
+      -56,  -56,  -56,  -56,  -56,  -56,  -56
     },
 
     {
        11,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,  -57,
-      -57,  -57,  -57,   56,  -57,  -57,   56,   56,   56,   56,
+      -57,  -57,  -57,   57,  -57,  -57,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   88,   56,
-       56,   56,   56,   56,   56,   56,  -57
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -57
     },
 
     {
        11,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,  -58,
-      -58,  -58,  -58,   56,  -58,  -58,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   89,   56,
-       56,   56,   56,   56,   56,   56,  -58
+      -58,  -58,  -58,   57,  -58,  -58,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   90,   57,
+       57,   57,   57,   57,   57,   57,  -58
     },
 
     {
        11,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,  -59,
-      -59,  -59,  -59,   56,  -59,  -59,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   90,   91,   56,   56,
-       56,   56,   56,   56,   56,   56,  -59
+      -59,  -59,  -59,   57,  -59,  -59,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   91,   57,
+       57,   57,   57,   57,   57,   57,  -59
 
     },
 
     {
        11,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,  -60,
-      -60,  -60,  -60,   56,  -60,  -60,   56,   56,   56,   56,
-       56,   92,   56,   56,   56,   56,   56,   56,   56,   93,
-       56,   56,   56,   56,   56,   56,  -60
+      -60,  -60,  -60,   57,  -60,  -60,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   92,   93,   57,   57,
+       57,   57,   57,   57,   57,   57,  -60
     },
 
     {
        11,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,  -61,
-      -61,  -61,  -61,   56,  -61,  -61,   56,   56,   56,   94,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -61
+      -61,  -61,  -61,   57,  -61,  -61,   57,   57,   57,   57,
+       57,   94,   57,   57,   57,   57,   57,   57,   57,   95,
+       57,   57,   57,   57,   57,   57,  -61
     },
 
     {
        11,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62,  -62,
-      -62,  -62,  -62,   56,  -62,  -62,   56,   56,   56,   56,
+      -62,  -62,  -62,   57,  -62,  -62,   57,   57,   57,   96,
 
-       56,   56,   56,   56,   56,   95,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   96,  -62
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -62
     },
 
     {
        11,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,  -63,
-      -63,  -63,  -63,   56,  -63,  -63,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -63
+      -63,  -63,  -63,   57,  -63,  -63,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   97,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   98,  -63
     },
 
     {
        11,  -64,  -64,  -64,  -64,  -64,  -64,  -64,  -64,  -64,
-      -64,  -64,  -64,   56,  -64,  -64,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   97,   56,   56,  -64
+      -64,  -64,  -64,   57,  -64,  -64,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -64
 
     },
 
     {
        11,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,  -65,
-      -65,  -65,  -65,   56,  -65,  -65,   56,   56,   56,   56,
-       56,   56,   56,   56,   98,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -65
+      -65,  -65,  -65,   57,  -65,  -65,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   99,   57,   57,  -65
     },
 
     {
        11,  -66,  -66,  -66,  -66,  -66,  -66,  -66,  -66,  -66,
-      -66,  -66,  -66,   56,  -66,  -66,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   99,   56,   56,
-       56,   56,   56,   56,   56,   56,  -66
+      -66,  -66,  -66,   57,  -66,  -66,   57,   57,   57,   57,
+       57,   57,   57,   57,  100,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -66
     },
 
     {
        11,  -67,  -67,  -67,  -67,  -67,  -67,  -67,  -67,  -67,
-      -67,  -67,  -67,   56,  -67,  -67,   56,   56,   56,   56,
+      -67,  -67,  -67,   57,  -67,  -67,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  100,   56,   56,  -67
+       57,   57,   57,   57,   57,   57,   57,  101,   57,   57,
+       57,   57,   57,   57,   57,   57,  -67
     },
 
     {
        11,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,  -68,
-      -68,  -68,  -68,   56,  -68,  -68,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,  101,   56,
-       56,   56,   56,   56,   56,   56,  -68
+      -68,  -68,  -68,   57,  -68,  -68,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  102,   57,   57,  -68
     },
 
     {
        11,  -69,  -69,  -69,  -69,  -69,  -69,  -69,  -69,  -69,
-      -69,  -69,  -69,   56,  -69,  -69,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-      102,   56,   56,   56,   56,   56,  -69
+      -69,  -69,  -69,   57,  -69,  -69,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,  103,   57,
+       57,   57,   57,   57,   57,   57,  -69
 
     },
 
     {
        11,  -70,  -70,  -70,  -70,  -70,  -70,  -70,  -70,  -70,
-      -70,  -70,  -70,   56,  -70,  -70,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  103,   56,  -70
+      -70,  -70,  -70,   57,  -70,  -70,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+      104,   57,   57,   57,   57,   57,  -70
     },
 
     {
        11,  -71,  -71,  -71,  -71,  -71,  -71,  -71,  -71,  -71,
-      -71,  -71,  -71,   56,  -71,  -71,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,  104,   56,   56,   56,   56,  -71
+      -71,  -71,  -71,   57,  -71,  -71,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  105,   57,  -71
     },
 
     {
        11,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,  -72,
-      -72,  -72,  -72,   56,  -72,  -72,   56,   56,   56,   56,
+      -72,  -72,  -72,   57,  -72,  -72,   57,   57,   57,   57,
 
-       56,   56,   56,   56,  105,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -72
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,  106,   57,   57,   57,   57,  -72
     },
 
     {
-       11,   73,   73,  -73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73,   73,   73,   73,
-       73,   73,   73,   73,   73,   73,   73
+       11,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,  -73,
+      -73,  -73,  -73,   57,  -73,  -73,   57,   57,   57,   57,
+       57,   57,   57,   57,  107,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -73
     },
 
     {
-       11,  -74,   74,   75,  -74,  -74,  -74,  -74,  -74,  -74,
-      -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
-      -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,  -74,
-      -74,  -74,  -74,  -74,  -74,  -74,  -74
+       11,   74,   74,  -74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74,   74,   74,   74,
+       74,   74,   74,   74,   74,   74,   74
 
     },
 
     {
-       11,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
+       11,  -75,   75,   76,  -75,  -75,  -75,  -75,  -75,  -75,
       -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
       -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,  -75,
       -75,  -75,  -75,  -75,  -75,  -75,  -75
@@ -860,22 +860,22 @@
     },
 
     {
-       11,   77,   77,   78,   77,  -77,   77,   77,  -77,   77,
-       77,   77,   77,   77,   77,  -77,   77,   77,   77,   77,
+       11,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
+      -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
 
-       77,   77,   77,   77,   77,   77,   77,   77,   77,   77,
-       77,   77,   77,   77,   77,   77,   77
+      -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,  -77,
+      -77,  -77,  -77,  -77,  -77,  -77,  -77
     },
 
     {
-       11,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
-      -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
-      -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,  -78,
-      -78,  -78,  -78,  -78,  -78,  -78,  -78
+       11,   78,   78,   79,   78,  -78,   78,   78,  -78,   78,
+       78,   78,   78,   78,   78,  -78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78,   78,   78,   78,
+       78,   78,   78,   78,   78,   78,   78
     },
 
     {
-       11,  -79,  -79,   80,  -79,  -79,  -79,  -79,  -79,  -79,
+       11,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
       -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
       -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,  -79,
       -79,  -79,  -79,  -79,  -79,  -79,  -79
@@ -883,7 +883,7 @@
     },
 
     {
-       11,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
+       11,  -80,  -80,   81,  -80,  -80,  -80,  -80,  -80,  -80,
       -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
       -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,  -80,
       -80,  -80,  -80,  -80,  -80,  -80,  -80
@@ -906,660 +906,675 @@
 
     {
        11,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
-      -83,  106,   84,   84,  -83,  -83,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -83
+      -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
+      -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,  -83,
+      -83,  -83,  -83,  -83,  -83,  -83,  -83
     },
 
     {
        11,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,  -84,
-      -84,   84,   84,   84,  -84,  -84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -84
+      -84,  108,   85,   85,  -84,  -84,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -84
 
     },
 
     {
        11,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,  -85,
-      -85,   84,   84,   84,  -85,  -85,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -85
+      -85,   85,   85,   85,  -85,  -85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -85
     },
 
     {
        11,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,
-      -86,   84,   84,   84,  -86,  -86,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,  -86
+      -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,
+      -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,  -86,
+      -86,  -86,  -86,  -86,  -86,  -86,  -86
     },
 
     {
        11,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
-      -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
+      -87,   85,   85,   85,  -87,  -87,   85,   85,   85,   85,
 
-      -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,  -87,
-      -87,  -87,  -87,  -87,  -87,  -87,  -87
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -87
     },
 
     {
        11,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,  -88,
-      -88,  -88,  -88,   56,  -88,  -88,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,  107,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -88
+      -88,   85,   85,   85,  -88,  -88,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,  -88
     },
 
     {
        11,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
-      -89,  -89,  -89,   56,  -89,  -89,   56,   56,   56,   56,
-       56,   56,   56,   56,  108,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -89
+      -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
+      -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,  -89,
+      -89,  -89,  -89,  -89,  -89,  -89,  -89
 
     },
 
     {
        11,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,  -90,
-      -90,  -90,  -90,   56,  -90,  -90,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  109,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -90
+      -90,  -90,  -90,   57,  -90,  -90,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,  109,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -90
     },
 
     {
        11,  -91,  -91,  -91,  -91,  -91,  -91,  -91,  -91,  -91,
-      -91,  -91,  -91,   56,  -91,  -91,   56,   56,   56,   56,
-       56,  110,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -91
+      -91,  -91,  -91,   57,  -91,  -91,   57,   57,   57,   57,
+       57,   57,   57,   57,  110,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -91
     },
 
     {
        11,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,  -92,
-      -92,  -92,  -92,   56,  -92,  -92,  111,   56,   56,   56,
+      -92,  -92,  -92,   57,  -92,  -92,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -92
+       57,   57,   57,   57,   57,   57,  111,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -92
     },
 
     {
        11,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,  -93,
-      -93,  -93,  -93,   56,  -93,  -93,   56,   56,   56,   56,
-      112,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -93
+      -93,  -93,  -93,   57,  -93,  -93,   57,   57,   57,   57,
+       57,  112,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -93
     },
 
     {
        11,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,  -94,
-      -94,  -94,  -94,   56,  -94,  -94,   56,   56,  113,   56,
-       56,   56,   56,   56,  114,   56,  115,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -94
+      -94,  -94,  -94,   57,  -94,  -94,  113,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -94
 
     },
 
     {
        11,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,  -95,
-      -95,  -95,  -95,   56,  -95,  -95,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,  116,
-       56,   56,   56,   56,   56,   56,  -95
+      -95,  -95,  -95,   57,  -95,  -95,   57,   57,   57,   57,
+      114,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -95
     },
 
     {
        11,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,  -96,
-      -96,  -96,  -96,   56,  -96,  -96,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -96
+      -96,  -96,  -96,   57,  -96,  -96,   57,   57,  115,   57,
+       57,   57,   57,   57,  116,   57,  117,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -96
     },
 
     {
        11,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,  -97,
-      -97,  -97,  -97,   56,  -97,  -97,   56,   56,   56,   56,
+      -97,  -97,  -97,   57,  -97,  -97,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  -97
+       57,   57,   57,   57,   57,   57,   57,   57,   57,  118,
+       57,   57,   57,   57,   57,   57,  -97
     },
 
     {
        11,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,  -98,
-      -98,  -98,  -98,   56,  -98,  -98,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  117,   56,   56,
-       56,   56,   56,   56,   56,   56,  -98
+      -98,  -98,  -98,   57,  -98,  -98,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -98
     },
 
     {
        11,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,  -99,
-      -99,  -99,  -99,   56,  -99,  -99,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  118,   56,  -99
+      -99,  -99,  -99,   57,  -99,  -99,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  -99
 
     },
 
     {
        11, -100, -100, -100, -100, -100, -100, -100, -100, -100,
-     -100, -100, -100,   56, -100, -100,   56,   56,   56,   56,
-       56,   56,   56,   56,  119,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -100
+     -100, -100, -100,   57, -100, -100,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  119,   57,   57,
+       57,   57,   57,   57,   57,   57, -100
     },
 
     {
        11, -101, -101, -101, -101, -101, -101, -101, -101, -101,
-     -101, -101, -101,   56, -101, -101,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,  120,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -101
+     -101, -101, -101,   57, -101, -101,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  120,   57, -101
     },
 
     {
        11, -102, -102, -102, -102, -102, -102, -102, -102, -102,
-     -102, -102, -102,   56, -102, -102,   56,   56,   56,   56,
+     -102, -102, -102,   57, -102, -102,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  121,   56, -102
+       57,   57,   57,   57,  121,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -102
     },
 
     {
        11, -103, -103, -103, -103, -103, -103, -103, -103, -103,
-     -103, -103, -103,   56, -103, -103,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,  122,   56,   56,   56,   56, -103
+     -103, -103, -103,   57, -103, -103,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  122,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -103
     },
 
     {
        11, -104, -104, -104, -104, -104, -104, -104, -104, -104,
-     -104, -104, -104,   56, -104, -104,   56,   56,   56,   56,
-       56,   56,   56,   56,  123,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -104
+     -104, -104, -104,   57, -104, -104,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  123,   57, -104
 
     },
 
     {
        11, -105, -105, -105, -105, -105, -105, -105, -105, -105,
-     -105, -105, -105,   56, -105, -105,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,  124,   56,   56,   56, -105
+     -105, -105, -105,   57, -105, -105,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,  124,   57,   57,   57,   57, -105
     },
 
     {
        11, -106, -106, -106, -106, -106, -106, -106, -106, -106,
-     -106,   84,   84,   84, -106, -106,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84,   84,   84,   84,   84,
-       84,   84,   84,   84,   84,   84, -106
+     -106, -106, -106,   57, -106, -106,   57,   57,   57,   57,
+       57,   57,   57,   57,  125,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -106
     },
 
     {
        11, -107, -107, -107, -107, -107, -107, -107, -107, -107,
-     -107, -107, -107,   56, -107, -107,   56,   56,   56,   56,
+     -107, -107, -107,   57, -107, -107,   57,   57,   57,   57,
 
-      125,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -107
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,  126,   57,   57,   57, -107
     },
 
     {
        11, -108, -108, -108, -108, -108, -108, -108, -108, -108,
-     -108, -108, -108,   56, -108, -108,   56,   56,  126,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -108
+     -108,   85,   85,   85, -108, -108,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85,   85,   85,   85,   85,
+       85,   85,   85,   85,   85,   85, -108
     },
 
     {
        11, -109, -109, -109, -109, -109, -109, -109, -109, -109,
-     -109, -109, -109,   56, -109, -109,   56,   56,   56,   56,
-      127,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -109
+     -109, -109, -109,   57, -109, -109,   57,   57,   57,   57,
+      127,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -109
 
     },
 
     {
        11, -110, -110, -110, -110, -110, -110, -110, -110, -110,
-     -110, -110, -110,   56, -110, -110,   56,   56,   56,   56,
-       56,   56,   56,   56,  128,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -110
+     -110, -110, -110,   57, -110, -110,   57,   57,  128,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -110
     },
 
     {
        11, -111, -111, -111, -111, -111, -111, -111, -111, -111,
-     -111, -111, -111,   56, -111, -111,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  129,   56, -111
+     -111, -111, -111,   57, -111, -111,   57,   57,   57,   57,
+      129,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -111
     },
 
     {
        11, -112, -112, -112, -112, -112, -112, -112, -112, -112,
-     -112, -112, -112,   56, -112, -112,   56,   56,   56,   56,
+     -112, -112, -112,   57, -112, -112,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,  130,   56,   56,
-       56,   56,   56,   56,   56,   56, -112
+       57,   57,   57,   57,  130,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -112
     },
 
     {
        11, -113, -113, -113, -113, -113, -113, -113, -113, -113,
-     -113, -113, -113,   56, -113, -113,   56,   56,   56,   56,
-       56,   56,   56,  131,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -113
+     -113, -113, -113,   57, -113, -113,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  131,   57, -113
     },
 
     {
        11, -114, -114, -114, -114, -114, -114, -114, -114, -114,
-     -114, -114, -114,   56, -114, -114,   56,   56,   56,   56,
-       56,  132,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -114
+     -114, -114, -114,   57, -114, -114,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  132,   57,   57,
+       57,   57,   57,   57,   57,   57, -114
 
     },
 
     {
        11, -115, -115, -115, -115, -115, -115, -115, -115, -115,
-     -115, -115, -115,   56, -115, -115,   56,   56,   56,   56,
-      133,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -115
+     -115, -115, -115,   57, -115, -115,   57,   57,   57,   57,
+       57,   57,   57,  133,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -115
     },
 
     {
        11, -116, -116, -116, -116, -116, -116, -116, -116, -116,
-     -116, -116, -116,   56, -116, -116,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -116
+     -116, -116, -116,   57, -116, -116,   57,   57,   57,   57,
+       57,  134,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -116
     },
 
     {
        11, -117, -117, -117, -117, -117, -117, -117, -117, -117,
-     -117, -117, -117,   56, -117, -117,   56,   56,   56,   56,
+     -117, -117, -117,   57, -117, -117,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,  134,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -117
+      135,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -117
     },
 
     {
        11, -118, -118, -118, -118, -118, -118, -118, -118, -118,
-     -118, -118, -118,   56, -118, -118,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -118
+     -118, -118, -118,   57, -118, -118,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -118
     },
 
     {
        11, -119, -119, -119, -119, -119, -119, -119, -119, -119,
-     -119, -119, -119,   56, -119, -119,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,  135,   56,
-       56,   56,   56,   56,   56,   56, -119
+     -119, -119, -119,   57, -119, -119,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,  136,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -119
 
     },
 
     {
        11, -120, -120, -120, -120, -120, -120, -120, -120, -120,
-     -120, -120, -120,   56, -120, -120,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,  136,
-       56,   56,   56,   56,   56,   56, -120
+     -120, -120, -120,   57, -120, -120,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -120
     },
 
     {
        11, -121, -121, -121, -121, -121, -121, -121, -121, -121,
-     -121, -121, -121,   56, -121, -121,   56,   56,   56,   56,
-       56,   56,   56,   56,  137,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -121
+     -121, -121, -121,   57, -121, -121,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,  137,   57,
+       57,   57,   57,   57,   57,   57, -121
     },
 
     {
        11, -122, -122, -122, -122, -122, -122, -122, -122, -122,
-     -122, -122, -122,   56, -122, -122,   56,   56,  138,   56,
+     -122, -122, -122,   57, -122, -122,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -122
+       57,   57,   57,   57,   57,   57,   57,   57,   57,  138,
+       57,   57,   57,   57,   57,   57, -122
     },
 
     {
        11, -123, -123, -123, -123, -123, -123, -123, -123, -123,
-     -123, -123, -123,   56, -123, -123,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  139,   56,   56,
-       56,   56,   56,   56,   56,   56, -123
+     -123, -123, -123,   57, -123, -123,   57,   57,   57,   57,
+       57,   57,   57,   57,  139,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -123
     },
 
     {
        11, -124, -124, -124, -124, -124, -124, -124, -124, -124,
-     -124, -124, -124,   56, -124, -124,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  140,   56,   56, -124
+     -124, -124, -124,   57, -124, -124,   57,   57,  140,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -124
 
     },
 
     {
        11, -125, -125, -125, -125, -125, -125, -125, -125, -125,
-     -125, -125, -125,   56, -125, -125,  141,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -125
+     -125, -125, -125,   57, -125, -125,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  141,   57,   57,
+       57,   57,   57,   57,   57,   57, -125
     },
 
     {
        11, -126, -126, -126, -126, -126, -126, -126, -126, -126,
-     -126, -126, -126,   56, -126, -126,   56,   56,   56,   56,
-      142,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -126
+     -126, -126, -126,   57, -126, -126,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  142,   57,   57, -126
     },
 
     {
        11, -127, -127, -127, -127, -127, -127, -127, -127, -127,
-     -127, -127, -127,   56, -127, -127,   56,   56,   56,   56,
+     -127, -127, -127,   57, -127, -127,  143,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,  143,   56,   56,
-       56,   56,   56,   56,   56,   56, -127
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -127
     },
 
     {
        11, -128, -128, -128, -128, -128, -128, -128, -128, -128,
-     -128, -128, -128,   56, -128, -128,   56,   56,   56,   56,
-       56,   56,  144,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -128
+     -128, -128, -128,   57, -128, -128,   57,   57,   57,   57,
+      144,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -128
     },
 
     {
        11, -129, -129, -129, -129, -129, -129, -129, -129, -129,
-     -129, -129, -129,   56, -129, -129,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,  145,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -129
+     -129, -129, -129,   57, -129, -129,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  145,   57,   57,
+       57,   57,   57,   57,   57,   57, -129
 
     },
 
     {
        11, -130, -130, -130, -130, -130, -130, -130, -130, -130,
-     -130, -130, -130,   56, -130, -130,   56,   56,   56,  146,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -130
+     -130, -130, -130,   57, -130, -130,   57,   57,   57,   57,
+       57,   57,  146,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -130
     },
 
     {
        11, -131, -131, -131, -131, -131, -131, -131, -131, -131,
-     -131, -131, -131,   56, -131, -131,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,  147,   56,
-       56,   56,   56,   56,   56,   56, -131
+     -131, -131, -131,   57, -131, -131,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,  147,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -131
     },
 
     {
        11, -132, -132, -132, -132, -132, -132, -132, -132, -132,
-     -132, -132, -132,   56, -132, -132,   56,   56,   56,   56,
+     -132, -132, -132,   57, -132, -132,   57,   57,   57,  148,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -132
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -132
     },
 
     {
        11, -133, -133, -133, -133, -133, -133, -133, -133, -133,
-     -133, -133, -133,   56, -133, -133,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  148,   56,   56,
-       56,   56,   56,   56,   56,   56, -133
+     -133, -133, -133,   57, -133, -133,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,  149,   57,
+       57,   57,   57,   57,   57,   57, -133
     },
 
     {
        11, -134, -134, -134, -134, -134, -134, -134, -134, -134,
-     -134, -134, -134,   56, -134, -134,   56,   56,   56,   56,
-      149,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -134
+     -134, -134, -134,   57, -134, -134,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -134
 
     },
 
     {
        11, -135, -135, -135, -135, -135, -135, -135, -135, -135,
-     -135, -135, -135,   56, -135, -135,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  150,   56,   56,
-       56,   56,   56,   56,   56,   56, -135
+     -135, -135, -135,   57, -135, -135,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  150,   57,   57,
+       57,   57,   57,   57,   57,   57, -135
     },
 
     {
        11, -136, -136, -136, -136, -136, -136, -136, -136, -136,
-     -136, -136, -136,   56, -136, -136,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  151,   56,   56, -136
+     -136, -136, -136,   57, -136, -136,   57,   57,   57,   57,
+      151,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -136
     },
 
     {
        11, -137, -137, -137, -137, -137, -137, -137, -137, -137,
-     -137, -137, -137,   56, -137, -137,   56,   56,   56,   56,
+     -137, -137, -137,   57, -137, -137,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,  152,   56,   56,   56,   56, -137
+       57,   57,   57,   57,   57,   57,   57,  152,   57,   57,
+       57,   57,   57,   57,   57,   57, -137
     },
 
     {
        11, -138, -138, -138, -138, -138, -138, -138, -138, -138,
-     -138, -138, -138,   56, -138, -138,   56,   56,   56,   56,
-      153,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -138
+     -138, -138, -138,   57, -138, -138,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  153,   57,   57, -138
     },
 
     {
        11, -139, -139, -139, -139, -139, -139, -139, -139, -139,
-     -139, -139, -139,   56, -139, -139,   56,   56,   56,   56,
-       56,   56,  154,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -139
+     -139, -139, -139,   57, -139, -139,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,  154,   57,   57,   57,   57, -139
 
     },
 
     {
        11, -140, -140, -140, -140, -140, -140, -140, -140, -140,
-     -140, -140, -140,   56, -140, -140,  155,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -140
+     -140, -140, -140,   57, -140, -140,   57,   57,   57,   57,
+      155,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -140
     },
 
     {
        11, -141, -141, -141, -141, -141, -141, -141, -141, -141,
-     -141, -141, -141,   56, -141, -141,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  156,   56,   56,
-       56,   56,   56,   56,   56,   56, -141
+     -141, -141, -141,   57, -141, -141,   57,   57,   57,   57,
+       57,   57,  156,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -141
     },
 
     {
        11, -142, -142, -142, -142, -142, -142, -142, -142, -142,
-     -142, -142, -142,   56, -142, -142,   56,   56,   56,   56,
+     -142, -142, -142,   57, -142, -142,  157,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -142
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -142
     },
 
     {
        11, -143, -143, -143, -143, -143, -143, -143, -143, -143,
-     -143, -143, -143,   56, -143, -143,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  157,   56,   56, -143
+     -143, -143, -143,   57, -143, -143,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  158,   57,   57,
+       57,   57,   57,   57,   57,   57, -143
     },
 
     {
        11, -144, -144, -144, -144, -144, -144, -144, -144, -144,
-     -144, -144, -144,   56, -144, -144,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -144
+     -144, -144, -144,   57, -144, -144,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -144
 
     },
 
     {
        11, -145, -145, -145, -145, -145, -145, -145, -145, -145,
-     -145, -145, -145,   56, -145, -145,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  158,   56,   56, -145
+     -145, -145, -145,   57, -145, -145,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  159,   57,   57, -145
     },
 
     {
        11, -146, -146, -146, -146, -146, -146, -146, -146, -146,
-     -146, -146, -146,   56, -146, -146,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,  159,   56,   56,   56, -146
+     -146, -146, -146,   57, -146, -146,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -146
     },
 
     {
        11, -147, -147, -147, -147, -147, -147, -147, -147, -147,
-     -147, -147, -147,   56, -147, -147,   56,   56,   56,   56,
+     -147, -147, -147,   57, -147, -147,   57,   57,   57,   57,
 
-       56,   56,   56,   56,  160,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -147
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  160,   57,   57, -147
     },
 
     {
        11, -148, -148, -148, -148, -148, -148, -148, -148, -148,
-     -148, -148, -148,   56, -148, -148,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  161,   56, -148
+     -148, -148, -148,   57, -148, -148,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,  161,   57,   57,   57, -148
     },
 
     {
        11, -149, -149, -149, -149, -149, -149, -149, -149, -149,
-     -149, -149, -149,   56, -149, -149,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,  162,   56,   56,
-       56,   56,   56,   56,   56,   56, -149
+     -149, -149, -149,   57, -149, -149,   57,   57,   57,   57,
+       57,   57,   57,   57,  162,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -149
 
     },
 
     {
        11, -150, -150, -150, -150, -150, -150, -150, -150, -150,
-     -150, -150, -150,   56, -150, -150,  163,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -150
+     -150, -150, -150,   57, -150, -150,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  163,   57, -150
     },
 
     {
        11, -151, -151, -151, -151, -151, -151, -151, -151, -151,
-     -151, -151, -151,   56, -151, -151,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -151
+     -151, -151, -151,   57, -151, -151,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,  164,   57,   57,
+       57,   57,   57,   57,   57,   57, -151
     },
 
     {
        11, -152, -152, -152, -152, -152, -152, -152, -152, -152,
-     -152, -152, -152,   56, -152, -152,   56,   56,   56,   56,
+     -152, -152, -152,   57, -152, -152,  165,   57,   57,   57,
 
-      164,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -152
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -152
     },
 
     {
        11, -153, -153, -153, -153, -153, -153, -153, -153, -153,
-     -153, -153, -153,   56, -153, -153,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -153
+     -153, -153, -153,   57, -153, -153,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -153
     },
 
     {
        11, -154, -154, -154, -154, -154, -154, -154, -154, -154,
-     -154, -154, -154,   56, -154, -154,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -154
+     -154, -154, -154,   57, -154, -154,   57,   57,   57,   57,
+      166,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -154
 
     },
 
     {
        11, -155, -155, -155, -155, -155, -155, -155, -155, -155,
-     -155, -155, -155,   56, -155, -155,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,  165,   56,   56, -155
+     -155, -155, -155,   57, -155, -155,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -155
     },
 
     {
        11, -156, -156, -156, -156, -156, -156, -156, -156, -156,
-     -156, -156, -156,   56, -156, -156,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -156
+     -156, -156, -156,   57, -156, -156,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -156
     },
 
     {
        11, -157, -157, -157, -157, -157, -157, -157, -157, -157,
-     -157, -157, -157,   56, -157, -157,   56,   56,   56,   56,
+     -157, -157, -157,   57, -157, -157,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -157
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,  167,   57,   57, -157
     },
 
     {
        11, -158, -158, -158, -158, -158, -158, -158, -158, -158,
-     -158, -158, -158,   56, -158, -158,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -158
+     -158, -158, -158,   57, -158, -158,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -158
     },
 
     {
        11, -159, -159, -159, -159, -159, -159, -159, -159, -159,
-     -159, -159, -159,   56, -159, -159,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -159
+     -159, -159, -159,   57, -159, -159,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -159
 
     },
 
     {
        11, -160, -160, -160, -160, -160, -160, -160, -160, -160,
-     -160, -160, -160,   56, -160, -160,   56,   56,  166,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -160
+     -160, -160, -160,   57, -160, -160,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -160
     },
 
     {
        11, -161, -161, -161, -161, -161, -161, -161, -161, -161,
-     -161, -161, -161,   56, -161, -161,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -161
+     -161, -161, -161,   57, -161, -161,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -161
     },
 
     {
        11, -162, -162, -162, -162, -162, -162, -162, -162, -162,
-     -162, -162, -162,   56, -162, -162,   56,   56,   56,   56,
+     -162, -162, -162,   57, -162, -162,   57,   57,  168,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,  167,   56, -162
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -162
     },
 
     {
        11, -163, -163, -163, -163, -163, -163, -163, -163, -163,
-     -163, -163, -163,   56, -163, -163,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,  168,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -163
+     -163, -163, -163,   57, -163, -163,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -163
     },
 
     {
        11, -164, -164, -164, -164, -164, -164, -164, -164, -164,
-     -164, -164, -164,   56, -164, -164,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,  169,   56,   56,   56, -164
+     -164, -164, -164,   57, -164, -164,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,  169,   57, -164
 
     },
 
     {
        11, -165, -165, -165, -165, -165, -165, -165, -165, -165,
-     -165, -165, -165,   56, -165, -165,   56,   56,   56,   56,
-      170,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -165
+     -165, -165, -165,   57, -165, -165,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,  170,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -165
     },
 
     {
        11, -166, -166, -166, -166, -166, -166, -166, -166, -166,
-     -166, -166, -166,   56, -166, -166,   56,   56,   56,   56,
-      171,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -166
+     -166, -166, -166,   57, -166, -166,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,  171,   57,   57,   57, -166
     },
 
     {
        11, -167, -167, -167, -167, -167, -167, -167, -167, -167,
-     -167, -167, -167,   56, -167, -167,   56,   56,   56,   56,
+     -167, -167, -167,   57, -167, -167,   57,   57,   57,   57,
 
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -167
+      172,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -167
     },
 
     {
        11, -168, -168, -168, -168, -168, -168, -168, -168, -168,
-     -168, -168, -168,   56, -168, -168,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -168
+     -168, -168, -168,   57, -168, -168,   57,   57,   57,   57,
+      173,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -168
     },
 
     {
        11, -169, -169, -169, -169, -169, -169, -169, -169, -169,
-     -169, -169, -169,   56, -169, -169,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -169
+     -169, -169, -169,   57, -169, -169,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -169
 
     },
 
     {
        11, -170, -170, -170, -170, -170, -170, -170, -170, -170,
-     -170, -170, -170,   56, -170, -170,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -170
+     -170, -170, -170,   57, -170, -170,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -170
     },
 
     {
        11, -171, -171, -171, -171, -171, -171, -171, -171, -171,
-     -171, -171, -171,   56, -171, -171,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56,   56,   56,   56,   56,
-       56,   56,   56,   56,   56,   56, -171
+     -171, -171, -171,   57, -171, -171,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -171
+    },
+
+    {
+       11, -172, -172, -172, -172, -172, -172, -172, -172, -172,
+     -172, -172, -172,   57, -172, -172,   57,   57,   57,   57,
+
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -172
+    },
+
+    {
+       11, -173, -173, -173, -173, -173, -173, -173, -173, -173,
+     -173, -173, -173,   57, -173, -173,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57,   57,   57,   57,   57,
+       57,   57,   57,   57,   57,   57, -173
     },
 
     } ;
@@ -1580,29 +1595,29 @@
 	*yy_cp = '\0'; \
 	yy_c_buf_p = yy_cp;
 
-#define YY_NUM_RULES 55
-#define YY_END_OF_BUFFER 56
-static yyconst short int yy_accept[172] =
+#define YY_NUM_RULES 56
+#define YY_END_OF_BUFFER 57
+static yyconst short int yy_accept[174] =
     {   0,
         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
-       56,    5,    4,    3,    2,   29,   30,   28,   28,   28,
+       57,    5,    4,    3,    2,   29,   30,   28,   28,   28,
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
-       54,   51,   53,   46,   50,   49,   48,   44,   41,   35,
-       40,   44,   33,   34,   43,   43,   36,   43,   43,   44,
-        4,    3,    2,    2,    1,   28,   28,   28,   28,   28,
-       28,   28,   15,   28,   28,   28,   28,   28,   28,   28,
-       28,   28,   54,   51,   53,   52,   46,   45,   48,   47,
-       37,   31,   43,   43,   38,   39,   32,   28,   28,   28,
-       28,   28,   28,   28,   28,   26,   25,   28,   28,   28,
+       55,   52,   54,   47,   51,   50,   49,   45,   41,   35,
+       40,   45,   33,   34,   43,   43,   36,   45,   43,   43,
+       45,    4,    3,    2,    2,    1,   28,   28,   28,   28,
+       28,   28,   28,   15,   28,   28,   28,   28,   28,   28,
+       28,   28,   28,   55,   52,   54,   53,   47,   46,   49,
+       48,   37,   31,   43,   43,   44,   38,   39,   32,   28,
+       28,   28,   28,   28,   28,   28,   28,   26,   25,   28,
 
-       28,   28,   28,   28,   28,   42,   23,   28,   28,   28,
-       28,   28,   28,   28,   28,   14,   28,    7,   28,   28,
+       28,   28,   28,   28,   28,   28,   28,   42,   23,   28,
+       28,   28,   28,   28,   28,   28,   28,   14,   28,    7,
        28,   28,   28,   28,   28,   28,   28,   28,   28,   28,
-       28,   16,   28,   28,   28,   28,   28,   28,   28,   28,
-       28,   10,   28,   13,   28,   28,   28,   28,   28,   28,
-       21,   28,    9,   27,   28,   24,   12,   20,   17,   28,
-        8,   28,   28,   28,   28,   28,    6,   19,   18,   22,
-       11
+       28,   28,   28,   16,   28,   28,   28,   28,   28,   28,
+       28,   28,   28,   10,   28,   13,   28,   28,   28,   28,
+       28,   28,   21,   28,    9,   27,   28,   24,   12,   20,
+       17,   28,    8,   28,   28,   28,   28,   28,    6,   19,
+       18,   22,   11
     } ;
 
 static yyconst int yy_ec[256] =
@@ -1645,7 +1660,6 @@
 #define YY_MORE_ADJ 0
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "zconf.l"
 #define INITIAL 0
 #define YY_NEVER_INTERACTIVE 1
 #define COMMAND 1
@@ -1653,12 +1667,12 @@
 #define STRING 3
 #define PARAM 4
 
-#line 5 "zconf.l"
 /*
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
  * Released under the terms of the GNU GPL v2.0.
  */
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -1666,7 +1680,6 @@
 
 #define LKC_DIRECT_LINK
 #include "lkc.h"
-#include "zconf.tab.h"
 
 #define START_STRSIZE	16
 
@@ -1715,7 +1728,6 @@
 	memcpy(text, str, size);
 	text[size] = 0;
 }
-#line 1719 "lex.zconf.c"
 
 /* Macros after this point can all be overridden by user definitions in
  * section 1.
@@ -1862,12 +1874,10 @@
 	register char *yy_cp, *yy_bp;
 	register int yy_act;
 
-#line 71 "zconf.l"
 
 	int str = 0;
 	int ts, i;
 
-#line 1871 "lex.zconf.c"
 
 	if ( yy_init )
 		{
@@ -1925,29 +1935,24 @@
 	{ /* beginning of action switch */
 case 1:
 YY_RULE_SETUP
-#line 75 "zconf.l"
 current_file->lineno++;
 	YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 76 "zconf.l"
 
 	YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 78 "zconf.l"
 current_file->lineno++; return T_EOL;
 	YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 80 "zconf.l"
 {
 	BEGIN(COMMAND);
 }
 	YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 84 "zconf.l"
 {
 	unput(yytext[0]);
 	BEGIN(COMMAND);
@@ -1956,117 +1961,94 @@
 
 case 6:
 YY_RULE_SETUP
-#line 91 "zconf.l"
 BEGIN(PARAM); return T_MAINMENU;
 	YY_BREAK
 case 7:
 YY_RULE_SETUP
-#line 92 "zconf.l"
 BEGIN(PARAM); return T_MENU;
 	YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 93 "zconf.l"
 BEGIN(PARAM); return T_ENDMENU;
 	YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 94 "zconf.l"
 BEGIN(PARAM); return T_SOURCE;
 	YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 95 "zconf.l"
 BEGIN(PARAM); return T_CHOICE;
 	YY_BREAK
 case 11:
 YY_RULE_SETUP
-#line 96 "zconf.l"
 BEGIN(PARAM); return T_ENDCHOICE;
 	YY_BREAK
 case 12:
 YY_RULE_SETUP
-#line 97 "zconf.l"
 BEGIN(PARAM); return T_COMMENT;
 	YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 98 "zconf.l"
 BEGIN(PARAM); return T_CONFIG;
 	YY_BREAK
 case 14:
 YY_RULE_SETUP
-#line 99 "zconf.l"
 BEGIN(PARAM); return T_HELP;
 	YY_BREAK
 case 15:
 YY_RULE_SETUP
-#line 100 "zconf.l"
 BEGIN(PARAM); return T_IF;
 	YY_BREAK
 case 16:
 YY_RULE_SETUP
-#line 101 "zconf.l"
 BEGIN(PARAM); return T_ENDIF;
 	YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 102 "zconf.l"
 BEGIN(PARAM); return T_DEPENDS;
 	YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 103 "zconf.l"
 BEGIN(PARAM); return T_REQUIRES;
 	YY_BREAK
 case 19:
 YY_RULE_SETUP
-#line 104 "zconf.l"
 BEGIN(PARAM); return T_OPTIONAL;
 	YY_BREAK
 case 20:
 YY_RULE_SETUP
-#line 105 "zconf.l"
 BEGIN(PARAM); return T_DEFAULT;
 	YY_BREAK
 case 21:
 YY_RULE_SETUP
-#line 106 "zconf.l"
 BEGIN(PARAM); return T_PROMPT;
 	YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 107 "zconf.l"
 BEGIN(PARAM); return T_TRISTATE;
 	YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 108 "zconf.l"
 BEGIN(PARAM); return T_BOOLEAN;
 	YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 109 "zconf.l"
 BEGIN(PARAM); return T_BOOLEAN;
 	YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 110 "zconf.l"
 BEGIN(PARAM); return T_INT;
 	YY_BREAK
 case 26:
 YY_RULE_SETUP
-#line 111 "zconf.l"
 BEGIN(PARAM); return T_HEX;
 	YY_BREAK
 case 27:
 YY_RULE_SETUP
-#line 112 "zconf.l"
 BEGIN(PARAM); return T_STRING;
 	YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 113 "zconf.l"
 {
 		alloc_string(yytext, yyleng);
 		zconflval.string = text;
@@ -2075,64 +2057,52 @@
 	YY_BREAK
 case 29:
 YY_RULE_SETUP
-#line 118 "zconf.l"
 
 	YY_BREAK
 case 30:
 YY_RULE_SETUP
-#line 119 "zconf.l"
 current_file->lineno++; BEGIN(INITIAL);
 	YY_BREAK
 
 
 case 31:
 YY_RULE_SETUP
-#line 123 "zconf.l"
 return T_AND;
 	YY_BREAK
 case 32:
 YY_RULE_SETUP
-#line 124 "zconf.l"
 return T_OR;
 	YY_BREAK
 case 33:
 YY_RULE_SETUP
-#line 125 "zconf.l"
 return T_OPEN_PAREN;
 	YY_BREAK
 case 34:
 YY_RULE_SETUP
-#line 126 "zconf.l"
 return T_CLOSE_PAREN;
 	YY_BREAK
 case 35:
 YY_RULE_SETUP
-#line 127 "zconf.l"
 return T_NOT;
 	YY_BREAK
 case 36:
 YY_RULE_SETUP
-#line 128 "zconf.l"
 return T_EQUAL;
 	YY_BREAK
 case 37:
 YY_RULE_SETUP
-#line 129 "zconf.l"
 return T_UNEQUAL;
 	YY_BREAK
 case 38:
 YY_RULE_SETUP
-#line 130 "zconf.l"
 return T_IF;
 	YY_BREAK
 case 39:
 YY_RULE_SETUP
-#line 131 "zconf.l"
 return T_ON;
 	YY_BREAK
 case 40:
 YY_RULE_SETUP
-#line 132 "zconf.l"
 {
 		str = yytext[0];
 		new_string();
@@ -2141,17 +2111,14 @@
 	YY_BREAK
 case 41:
 YY_RULE_SETUP
-#line 137 "zconf.l"
 BEGIN(INITIAL); current_file->lineno++; return T_EOL;
 	YY_BREAK
 case 42:
 YY_RULE_SETUP
-#line 138 "zconf.l"
 /* ignore */
 	YY_BREAK
 case 43:
 YY_RULE_SETUP
-#line 139 "zconf.l"
 {
 		alloc_string(yytext, yyleng);
 		zconflval.string = text;
@@ -2160,87 +2127,82 @@
 	YY_BREAK
 case 44:
 YY_RULE_SETUP
-#line 144 "zconf.l"
+current_file->lineno++;
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
 
 	YY_BREAK
 case YY_STATE_EOF(PARAM):
-#line 145 "zconf.l"
 {
 		BEGIN(INITIAL);
 	}
 	YY_BREAK
 
 
-case 45:
+case 46:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 151 "zconf.l"
 {
 		append_string(yytext, yyleng);
 		zconflval.string = text;
-		return T_STRING;
+		return T_WORD_QUOTE;
 	}
 	YY_BREAK
-case 46:
+case 47:
 YY_RULE_SETUP
-#line 156 "zconf.l"
 {
 		append_string(yytext, yyleng);
 	}
 	YY_BREAK
-case 47:
+case 48:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp -= 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 159 "zconf.l"
 {
-		append_string(yytext+1, yyleng);
+		append_string(yytext + 1, yyleng - 1);
 		zconflval.string = text;
-		return T_STRING;
+		return T_WORD_QUOTE;
 	}
 	YY_BREAK
-case 48:
+case 49:
 YY_RULE_SETUP
-#line 164 "zconf.l"
 {
-		append_string(yytext+1, yyleng - 1);
+		append_string(yytext + 1, yyleng - 1);
 	}
 	YY_BREAK
-case 49:
+case 50:
 YY_RULE_SETUP
-#line 167 "zconf.l"
 {
 		if (str == yytext[0]) {
 			BEGIN(PARAM);
 			zconflval.string = text;
-			return T_STRING;
+			return T_WORD_QUOTE;
 		} else
 			append_string(yytext, 1);
 	}
 	YY_BREAK
-case 50:
+case 51:
 YY_RULE_SETUP
-#line 175 "zconf.l"
 {
 		printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
+		current_file->lineno++;
 		BEGIN(INITIAL);
 		return T_EOL;
 	}
 	YY_BREAK
 case YY_STATE_EOF(STRING):
-#line 180 "zconf.l"
 {
 		BEGIN(INITIAL);
 	}
 	YY_BREAK
 
 
-case 51:
+case 52:
 YY_RULE_SETUP
-#line 186 "zconf.l"
 {
 		ts = 0;
 		for (i = 0; i < yyleng; i++) {
@@ -2265,29 +2227,26 @@
 		
 	}
 	YY_BREAK
-case 52:
+case 53:
 *yy_cp = yy_hold_char; /* undo effects of setting up yytext */
 yy_c_buf_p = yy_cp = yy_bp + 1;
 YY_DO_BEFORE_ACTION; /* set up yytext again */
 YY_RULE_SETUP
-#line 209 "zconf.l"
 {
 		current_file->lineno++;
 		zconf_endhelp();
 		return T_HELPTEXT;
 	}
 	YY_BREAK
-case 53:
+case 54:
 YY_RULE_SETUP
-#line 214 "zconf.l"
 {
 		current_file->lineno++;
 		append_string("\n", 1);
 	}
 	YY_BREAK
-case 54:
+case 55:
 YY_RULE_SETUP
-#line 218 "zconf.l"
 {
 		append_string(yytext, yyleng);
 		if (!first_ts)
@@ -2295,7 +2254,6 @@
 	}
 	YY_BREAK
 case YY_STATE_EOF(HELP):
-#line 223 "zconf.l"
 {
 		zconf_endhelp();
 		return T_HELPTEXT;
@@ -2304,7 +2262,6 @@
 
 case YY_STATE_EOF(INITIAL):
 case YY_STATE_EOF(COMMAND):
-#line 229 "zconf.l"
 {
 	if (current_buf) {
 		zconf_endfile();
@@ -2314,12 +2271,10 @@
 	yyterminate();
 }
 	YY_BREAK
-case 55:
+case 56:
 YY_RULE_SETUP
-#line 238 "zconf.l"
 YY_FATAL_ERROR( "flex scanner jammed" );
 	YY_BREAK
-#line 2323 "lex.zconf.c"
 
 	case YY_END_OF_BUFFER:
 		{
@@ -3182,7 +3137,6 @@
 	return 0;
 	}
 #endif
-#line 238 "zconf.l"
 
 void zconf_starthelp(void)
 {
@@ -3197,9 +3151,34 @@
 	BEGIN(INITIAL); 
 }
 
+
+/* 
+ * Try to open specified file with following names:
+ * ./name
+ * $(srctree)/name
+ * The latter is used when srctree is separate from objtree
+ * when compiling the kernel.
+ * Return NULL if file is not found.
+ */
+FILE *zconf_fopen(const char *name)
+{
+	char *env, fullname[PATH_MAX+1];
+	FILE *f;
+
+	f = fopen(name, "r");
+	if (!f && name[0] != '/') {
+		env = getenv(SRCTREE);
+		if (env) {
+			sprintf(fullname, "%s/%s", env, name);
+			f = fopen(fullname, "r");
+		}
+	}
+	return f;
+}
+
 void zconf_initscan(const char *name)
 {
-	yyin = fopen(name, "r");
+	yyin = zconf_fopen(name);
 	if (!yyin) {
 		printf("can't find file %s\n", name);
 		exit(1);
@@ -3220,7 +3199,7 @@
 	memset(buf, 0, sizeof(*buf));
 
 	current_buf->state = YY_CURRENT_BUFFER;
-	yyin = fopen(name, "r");
+	yyin = zconf_fopen(name);
 	if (!yyin) {
 		printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
 		exit(1);
diff -Nru a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
--- a/scripts/kconfig/lkc.h	Sun Dec 15 18:08:28 2002
+++ b/scripts/kconfig/lkc.h	Sun Dec 15 18:08:28 2002
@@ -21,12 +21,14 @@
 #include "lkc_proto.h"
 #undef P
 
-void symbol_end(char *help);
+#define SRCTREE "srctree"
+
 int zconfparse(void);
 void zconfdump(FILE *out);
 
 extern int zconfdebug;
 void zconf_starthelp(void);
+FILE *zconf_fopen(const char *name);
 void zconf_initscan(const char *name);
 void zconf_nextfile(const char *name);
 int zconf_lineno(void);
@@ -61,6 +63,7 @@
 /* symbol.c */
 void sym_init(void);
 void sym_clear_all_valid(void);
+void sym_set_changed(struct symbol *sym);
 
 static inline tristate sym_get_tristate_value(struct symbol *sym)
 {
diff -Nru a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
--- a/scripts/kconfig/mconf.c	Sun Dec 15 18:08:28 2002
+++ b/scripts/kconfig/mconf.c	Sun Dec 15 18:08:28 2002
@@ -111,6 +111,7 @@
 static void init_wsize(void)
 {
 	struct winsize ws;
+	char *env;
 
 	if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
 		rows = 24;
@@ -118,6 +119,20 @@
 	} else {
 		rows = ws.ws_row;
 		cols = ws.ws_col;
+		if (!rows) {
+			env = getenv("LINES");
+			if (env)
+				rows = atoi(env);
+			if (!rows)
+				rows = 24;
+		}
+		if (!cols) {
+			env = getenv("COLUMNS");
+			if (env)
+				cols = atoi(env);
+			if (!cols)
+				cols = 80;
+		}
 	}
 
 	if (rows < 19 || cols < 80) {
diff -Nru a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
--- a/scripts/kconfig/qconf.cc	Sun Dec 15 18:08:28 2002
+++ b/scripts/kconfig/qconf.cc	Sun Dec 15 18:08:28 2002
@@ -80,9 +80,17 @@
 		visible = menu_is_visible(child);
 		if (showAll || visible) {
 			if (!item || item->menu != child)
-				item = new ConfigItem(parent, last, child);
-			item->visible = visible;
-			item->updateMenu();
+				item = new ConfigItem(parent, last, child, visible);
+			else {
+				item->visible = visible;
+				if (item->updateNeeded()) {
+					ConfigItem* i = (ConfigItem*)child->data;
+					for (; i; i = i->nextItem) {
+						i->updateMenu();
+					}
+				} else if (list->updateAll)
+					item->updateMenu();
+			}
 
 			if (mode == fullMode || mode == menuMode ||
 			    (type != P_MENU && type != P_ROOTMENU))
@@ -127,36 +135,22 @@
 	int type;
 	enum prop_type ptype;
 	tristate expr;
-	bool update;
 
 	list = listView();
-	update = doInit;
-	if (update)
-		doInit = false;
-	else
-		update = list->updateAll;
 
 	sym = menu->sym;
 	if (!sym) {
-		if (update) {
-			setText(promptColIdx, menu_get_prompt(menu));
-			ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
-			if ((ptype == P_ROOTMENU || ptype == P_MENU) &&
-			    (list->mode == singleMode || list->mode == symbolMode))
-				setPixmap(promptColIdx, list->menuPix);
-			else
-				setPixmap(promptColIdx, 0);
-		}
+		setText(promptColIdx, menu_get_prompt(menu));
+		ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
+		if ((ptype == P_ROOTMENU || ptype == P_MENU) &&
+		    (list->mode == singleMode || list->mode == symbolMode))
+			setPixmap(promptColIdx, list->menuPix);
+		else
+			setPixmap(promptColIdx, 0);
 		return;
 	}
 
-	sym_calc_value(sym);
-	if (!(sym->flags & SYMBOL_CHANGED) && !update)
-		return;
-
-	sym->flags &= ~SYMBOL_CHANGED;
-
-	setText(nameColIdx, menu->sym->name);
+	setText(nameColIdx, sym->name);
 
 	type = sym_get_type(sym);
 	switch (type) {
@@ -211,7 +205,9 @@
 
 		data = sym_get_string_value(sym);
 #if QT_VERSION >= 300
-		setRenameEnabled(list->mapIdx(dataColIdx), TRUE);
+		int i = list->mapIdx(dataColIdx);
+		if (i >= 0)
+			setRenameEnabled(i, TRUE);
 #endif
 		setText(dataColIdx, data);
 		if (type == S_STRING)
@@ -225,6 +221,18 @@
 	setText(promptColIdx, prompt);
 }
 
+bool ConfigItem::updateNeeded(void)
+{
+	struct symbol* sym = menu->sym;
+	if (sym)
+		sym_calc_value(sym);
+	if (menu->flags & MENU_CHANGED) {
+		menu->flags &= ~MENU_CHANGED;
+		return true;
+	}
+	return false;
+}
+
 void ConfigItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
 {
 	ConfigList* list = listView();
@@ -244,13 +252,14 @@
 void ConfigItem::init(void)
 {
 	ConfigList* list = listView();
-#if QT_VERSION < 300
-	visible = TRUE;
-#endif
-	//menu->data = this;
+	nextItem = (ConfigItem*)menu->data;
+	menu->data = this;
+
 	if (list->mode != fullMode)
 		setOpen(TRUE);
-	doInit= true;
+	if (menu->sym)
+		sym_calc_value(menu->sym);
+	updateMenu();
 }
 
 /*
@@ -258,7 +267,13 @@
  */
 ConfigItem::~ConfigItem(void)
 {
-	//menu->data = 0;
+	ConfigItem** ip = &(ConfigItem*)menu->data;
+	for (; *ip; ip = &(*ip)->nextItem) {
+		if (*ip == this) {
+			*ip = nextItem;
+			break;
+		}
+	}
 }
 
 void ConfigLineEdit::show(ConfigItem* i)
@@ -280,17 +295,18 @@
 	case Key_Return:
 	case Key_Enter:
 		sym_set_string_value(item->menu->sym, text().latin1());
-		emit lineChanged(item);
+		parent()->updateList(item);
 		break;
 	default:
 		Parent::keyPressEvent(e);
 		return;
 	}
 	e->accept();
+	parent()->list->setFocus();
 	hide();
 }
 
-ConfigList::ConfigList(QWidget* p, ConfigView* cv)
+ConfigList::ConfigList(ConfigView* p, ConfigMainWindow* cv)
 	: Parent(p), cview(cv),
 	  updateAll(false),
 	  symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no),
@@ -359,6 +375,7 @@
 {
 	(void)item;	// unused so far
 	updateMenuList(this, rootEntry);
+	triggerUpdate();
 }
 
 void ConfigList::setAllOpen(bool open)
@@ -389,7 +406,7 @@
 			return;
 		if (oldval == no && item->menu->list)
 			item->setOpen(TRUE);
-		emit symbolChanged(item);
+		parent()->updateList(item);
 		break;
 	}
 }
@@ -421,7 +438,7 @@
 				item->setOpen(TRUE);
 		}
 		if (oldexpr != newexpr)
-			emit symbolChanged(item);
+			parent()->updateList(item);
 		break;
 	case S_INT:
 	case S_HEX:
@@ -431,7 +448,7 @@
 			item->startRename(colMap[dataColIdx]);
 		else
 #endif
-			lineEdit->show(item);
+			parent()->lineEdit->show(item);
 		break;
 	}
 }
@@ -523,7 +540,7 @@
 {
 	//QPoint p(contentsToViewport(e->pos()));
 	//printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y());
-	QListView::contentsMousePressEvent(e);
+	Parent::contentsMousePressEvent(e);
 }
 
 void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e)
@@ -570,14 +587,14 @@
 
 skip:
 	//printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y());
-	QListView::contentsMouseReleaseEvent(e);
+	Parent::contentsMouseReleaseEvent(e);
 }
 
 void ConfigList::contentsMouseMoveEvent(QMouseEvent* e)
 {
 	//QPoint p(contentsToViewport(e->pos()));
 	//printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y());
-	QListView::contentsMouseMoveEvent(e);
+	Parent::contentsMouseMoveEvent(e);
 }
 
 void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e)
@@ -594,10 +611,12 @@
 	if ((ptype == P_ROOTMENU || ptype == P_MENU) &&
 	    (mode == singleMode || mode == symbolMode))
 		emit menuSelected(menu);
+	else if (menu->sym)
+		changeValue(item);
 
 skip:
 	//printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y());
-	QListView::contentsMouseDoubleClickEvent(e);
+	Parent::contentsMouseDoubleClickEvent(e);
 }
 
 void ConfigList::focusInEvent(QFocusEvent *e)
@@ -612,11 +631,53 @@
 	emit gotFocus();
 }
 
+ConfigView* ConfigView::viewList;
+
+ConfigView::ConfigView(QWidget* parent, ConfigMainWindow* cview)
+	: Parent(parent)
+{
+	list = new ConfigList(this, cview);
+	lineEdit = new ConfigLineEdit(this);
+	lineEdit->hide();
+
+	this->nextView = viewList;
+	viewList = this;
+}
+
+ConfigView::~ConfigView(void)
+{
+	ConfigView** vp;
+
+	for (vp = &viewList; *vp; vp = &(*vp)->nextView) {
+		if (*vp == this) {
+			*vp = nextView;
+			break;
+		}
+	}
+}
+
+void ConfigView::updateList(ConfigItem* item)
+{
+	ConfigView* v;
+
+	for (v = viewList; v; v = v->nextView)
+		v->list->updateList(item);
+}
+
+void ConfigView::updateListAll(void)
+{
+	ConfigView* v;
+
+	for (v = viewList; v; v = v->nextView)
+		v->list->updateListAll();
+}
+
 /*
  * Construct the complete config widget
  */
-ConfigView::ConfigView(void)
+ConfigMainWindow::ConfigMainWindow(void)
 {
+	ConfigView* view;
 	QMenuBar* menu;
 	QSplitter* split1;
 	QSplitter* split2;
@@ -646,22 +707,15 @@
 	split1->setOrientation(QSplitter::Horizontal);
 	setCentralWidget(split1);
 
-	menuList = new ConfigList(split1, this);
+	view = new ConfigView(split1, this);
+	menuList = view->list;
 
 	split2 = new QSplitter(split1);
 	split2->setOrientation(QSplitter::Vertical);
 
 	// create config tree
-	QVBox* box = new QVBox(split2);
-	configList = new ConfigList(box, this);
-	configList->lineEdit = new ConfigLineEdit(box);
-	configList->lineEdit->hide();
-	configList->connect(configList, SIGNAL(symbolChanged(ConfigItem*)),
-			    configList, SLOT(updateList(ConfigItem*)));
-	configList->connect(configList, SIGNAL(symbolChanged(ConfigItem*)),
-			    menuList, SLOT(updateList(ConfigItem*)));
-	configList->connect(configList->lineEdit, SIGNAL(lineChanged(ConfigItem*)),
-			    SLOT(updateList(ConfigItem*)));
+	view = new ConfigView(split2, this);
+	configList = view->list;
 
 	helpText = new QTextView(split2);
 	helpText->setTextFormat(Qt::RichText);
@@ -711,6 +765,11 @@
 	  showDebugAction->setOn(showDebug);
 	  connect(showDebugAction, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool)));
 
+	QAction *showIntroAction = new QAction(NULL, "Introduction", 0, this);
+	  connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro()));
+	QAction *showAboutAction = new QAction(NULL, "About", 0, this);
+	  connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout()));
+
 	// init tool bar
 	backAction->addTo(toolBar);
 	toolBar->addSeparator();
@@ -740,6 +799,13 @@
 	showAllAction->addTo(optionMenu);
 	showDebugAction->addTo(optionMenu);
 
+	// create help menu
+	QPopupMenu* helpMenu = new QPopupMenu(this);
+	menu->insertSeparator();
+	menu->insertItem("&Help", helpMenu);
+	showIntroAction->addTo(helpMenu);
+	showAboutAction->addTo(helpMenu);
+
 	connect(configList, SIGNAL(menuSelected(struct menu *)),
 		SLOT(changeMenu(struct menu *)));
 	connect(configList, SIGNAL(parentSelected()),
@@ -795,12 +861,12 @@
 /*
  * display a new help entry as soon as a new menu entry is selected
  */
-void ConfigView::setHelp(QListViewItem* item)
+void ConfigMainWindow::setHelp(QListViewItem* item)
 {
 	struct symbol* sym;
 	struct menu* menu;
 
-	configList->lineEdit->hide();
+	configList->parent()->lineEdit->hide();
 	if (item) {
 		QString head, debug, help;
 		menu = ((ConfigItem*)item)->menu;
@@ -883,24 +949,23 @@
 	helpText->setText(NULL);
 }
 
-void ConfigView::loadConfig(void)
+void ConfigMainWindow::loadConfig(void)
 {
 	QString s = QFileDialog::getOpenFileName(".config", NULL, this);
 	if (s.isNull())
 		return;
 	if (conf_read(s.latin1()))
 		QMessageBox::information(this, "qconf", "Unable to load configuration!");
-	configList->updateListAll();
-	menuList->updateListAll();
+	ConfigView::updateListAll();
 }
 
-void ConfigView::saveConfig(void)
+void ConfigMainWindow::saveConfig(void)
 {
 	if (conf_write(NULL))
 		QMessageBox::information(this, "qconf", "Unable to save configuration!");
 }
 
-void ConfigView::saveConfigAs(void)
+void ConfigMainWindow::saveConfigAs(void)
 {
 	QString s = QFileDialog::getSaveFileName(".config", NULL, this);
 	if (s.isNull())
@@ -909,13 +974,13 @@
 		QMessageBox::information(this, "qconf", "Unable to save configuration!");
 }
 
-void ConfigView::changeMenu(struct menu *menu)
+void ConfigMainWindow::changeMenu(struct menu *menu)
 {
 	configList->setRootMenu(menu);
 	backAction->setEnabled(TRUE);
 }
 
-void ConfigView::listFocusChanged(void)
+void ConfigMainWindow::listFocusChanged(void)
 {
 	if (menuList->hasFocus()) {
 		if (menuList->mode == menuMode)
@@ -926,7 +991,7 @@
 	}
 }
 
-void ConfigView::goBack(void)
+void ConfigMainWindow::goBack(void)
 {
 	ConfigItem* item;
 
@@ -943,7 +1008,7 @@
 	}
 }
 
-void ConfigView::showSingleView(void)
+void ConfigMainWindow::showSingleView(void)
 {
 	menuList->hide();
 	menuList->setRootMenu(0);
@@ -956,7 +1021,7 @@
 	configList->setFocus();
 }
 
-void ConfigView::showSplitView(void)
+void ConfigMainWindow::showSplitView(void)
 {
 	configList->mode = symbolMode;
 	if (configList->rootEntry == &rootmenu)
@@ -972,7 +1037,7 @@
 	menuList->setFocus();
 }
 
-void ConfigView::showFullView(void)
+void ConfigMainWindow::showFullView(void)
 {
 	menuList->hide();
 	menuList->setRootMenu(0);
@@ -985,7 +1050,7 @@
 	configList->setFocus();
 }
 
-void ConfigView::setShowAll(bool b)
+void ConfigMainWindow::setShowAll(bool b)
 {
 	if (configList->showAll == b)
 		return;
@@ -995,14 +1060,14 @@
 	menuList->updateListAll();
 }
 
-void ConfigView::setShowDebug(bool b)
+void ConfigMainWindow::setShowDebug(bool b)
 {
 	if (showDebug == b)
 		return;
 	showDebug = b;
 }
 
-void ConfigView::setShowName(bool b)
+void ConfigMainWindow::setShowName(bool b)
 {
 	if (configList->showName == b)
 		return;
@@ -1010,7 +1075,7 @@
 	configList->reinit();
 }
 
-void ConfigView::setShowRange(bool b)
+void ConfigMainWindow::setShowRange(bool b)
 {
 	if (configList->showRange == b)
 		return;
@@ -1018,7 +1083,7 @@
 	configList->reinit();
 }
 
-void ConfigView::setShowData(bool b)
+void ConfigMainWindow::setShowData(bool b)
 {
 	if (configList->showData == b)
 		return;
@@ -1030,7 +1095,7 @@
  * ask for saving configuration before quitting
  * TODO ask only when something changed
  */
-void ConfigView::closeEvent(QCloseEvent* e)
+void ConfigMainWindow::closeEvent(QCloseEvent* e)
 {
 	if (!sym_change_count) {
 		e->accept();
@@ -1053,6 +1118,31 @@
 	}
 }
 
+void ConfigMainWindow::showIntro(void)
+{
+	static char str[] = "Welcome to the qconf graphical kernel configuration tool for Linux.\n\n"
+		"For each option, a blank box indicates the feature is disabled, a check\n"
+		"indicates it is enabled, and a dot indicates that it is to be compiled\n"
+		"as a module.  Clicking on the box will cycle through the three states.\n\n"
+		"If you do not see an option (e.g., a device driver) that you believe\n"
+		"should be present, try turning on Show All Options under the Options menu.\n"
+		"Although there is no cross reference yet to help you figure out what other\n"
+		"options must be enabled to support the option you are interested in, you can\n"
+		"still view the help of a grayed-out option.\n\n"
+		"Toggling Show Debug Info under the Options menu will show the dependencies,\n"
+		"which you can then match by examining other options.\n\n";
+
+	QMessageBox::information(this, "qconf", str);
+}
+
+void ConfigMainWindow::showAbout(void)
+{
+	static char str[] = "qconf is Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>.\n\n"
+		"Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n";
+
+	QMessageBox::information(this, "qconf", str);
+}
+
 void fixup_rootmenu(struct menu *menu)
 {
 	struct menu *child;
@@ -1066,7 +1156,7 @@
 
 int main(int ac, char** av)
 {
-	ConfigView* v;
+	ConfigMainWindow* v;
 	const char *name;
 
 #ifndef LKC_DIRECT_LINK
@@ -1095,7 +1185,7 @@
 	conf_read(NULL);
 	//zconfdump(stdout);
 
-	v = new ConfigView();
+	v = new ConfigMainWindow();
 
 	//zconfdump(stdout);
 	v->show();
diff -Nru a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
--- a/scripts/kconfig/qconf.h	Sun Dec 15 18:08:29 2002
+++ b/scripts/kconfig/qconf.h	Sun Dec 15 18:08:29 2002
@@ -5,9 +5,27 @@
 
 #include <qlistview.h>
 
-class ConfigLineEdit;
+class ConfigList;
 class ConfigItem;
-class ConfigView;
+class ConfigLineEdit;
+class ConfigMainWindow;
+
+class ConfigView : public QVBox {
+	Q_OBJECT
+	typedef class QVBox Parent;
+public:
+	ConfigView(QWidget* parent, ConfigMainWindow* cview);
+	~ConfigView(void);
+	static void updateList(ConfigItem* item);
+	static void updateListAll(void);
+
+public:
+	ConfigList* list;
+	ConfigLineEdit* lineEdit;
+
+	static ConfigView* viewList;
+	ConfigView* nextView;
+};
 
 enum colIdx {
 	promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
@@ -20,12 +38,15 @@
 	Q_OBJECT
 	typedef class QListView Parent;
 public:
-	ConfigList(QWidget* p, ConfigView* cview);
+	ConfigList(ConfigView* p, ConfigMainWindow* cview);
 	void reinit(void);
+	ConfigView* parent(void) const
+	{
+		return (ConfigView*)Parent::parent();
+	}
 
-	ConfigLineEdit* lineEdit;
 protected:
-	ConfigView* cview;
+	ConfigMainWindow* cview;
 
 	void keyPressEvent(QKeyEvent *e);
 	void contentsMousePressEvent(QMouseEvent *e);
@@ -43,7 +64,6 @@
 signals:
 	void menuSelected(struct menu *menu);
 	void parentSelected(void);
-	void symbolChanged(ConfigItem* item);
 	void gotFocus(void);
 
 public:
@@ -100,13 +120,13 @@
 class ConfigItem : public QListViewItem {
 	typedef class QListViewItem Parent;
 public:
-	ConfigItem(QListView *parent, ConfigItem *after, struct menu *m)
-	: Parent(parent, after), menu(m)
+	ConfigItem(QListView *parent, ConfigItem *after, struct menu *m, bool v)
+	: Parent(parent, after), menu(m), visible(v)
 	{
 		init();
 	}
-	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m)
-	: Parent(parent, after), menu(m)
+	ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
+	: Parent(parent, after), menu(m), visible(v)
 	{
 		init();
 	}
@@ -116,6 +136,7 @@
 	void okRename(int col);
 #endif
 	void updateMenu(void);
+	bool updateNeeded(void);
 	ConfigList* listView() const
 	{
 		return (ConfigList*)Parent::listView();
@@ -146,31 +167,33 @@
 	}
 	void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
 
+	ConfigItem* nextItem;
 	struct menu *menu;
 	bool visible;
-	bool doInit;
 };
 
 class ConfigLineEdit : public QLineEdit {
 	Q_OBJECT
 	typedef class QLineEdit Parent;
 public:
-	ConfigLineEdit(QWidget * parent)
-	: QLineEdit(parent)
+	ConfigLineEdit(ConfigView* parent)
+	: Parent(parent)
 	{ }
+	ConfigView* parent(void) const
+	{
+		return (ConfigView*)Parent::parent();
+	}
 	void show(ConfigItem *i);
 	void keyPressEvent(QKeyEvent *e);
-signals:
-	void lineChanged(ConfigItem *item);
 
 public:
 	ConfigItem *item;
 };
 
-class ConfigView : public QMainWindow {
+class ConfigMainWindow : public QMainWindow {
 	Q_OBJECT
 public:
-	ConfigView(void);
+	ConfigMainWindow(void);
 public slots:
 	void setHelp(QListViewItem* item);
 	void changeMenu(struct menu *);
@@ -187,6 +210,8 @@
 	void setShowRange(bool);
 	void setShowName(bool);
 	void setShowData(bool);
+	void showIntro(void);
+	void showAbout(void);
 
 protected:
 	void closeEvent(QCloseEvent *e);
diff -Nru a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
--- a/scripts/kconfig/symbol.c	Sun Dec 15 18:08:28 2002
+++ b/scripts/kconfig/symbol.c	Sun Dec 15 18:08:28 2002
@@ -149,7 +149,7 @@
 		visible = E_OR(visible, E_CALC(prop->visible));
 	if (oldvisible != visible) {
 		sym->visible = visible;
-		sym->flags |= SYMBOL_CHANGED;
+		sym_set_changed(sym);
 	}
 }
 
@@ -277,14 +277,17 @@
 	}
 
 	if (memcmp(&oldval, &newval, sizeof(newval)))
-		sym->flags |= SYMBOL_CHANGED;
+		sym_set_changed(sym);
 	sym->curr = newval;
 
 	if (sym_is_choice(sym)) {
 		int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
 		prop = sym_get_choice_prop(sym);
-		for (e = prop->dep; e; e = e->left.expr)
+		for (e = prop->dep; e; e = e->left.expr) {
 			e->right.sym->flags |= flags;
+			if (flags & SYMBOL_CHANGED)
+				sym_set_changed(e->right.sym);
+		}
 	}
 }
 
@@ -298,13 +301,24 @@
 	sym_change_count++;
 }
 
+void sym_set_changed(struct symbol *sym)
+{
+	struct property *prop;
+
+	sym->flags |= SYMBOL_CHANGED;
+	for (prop = sym->prop; prop; prop = prop->next) {
+		if (prop->menu)
+			prop->menu->flags |= MENU_CHANGED;
+	}
+}
+
 void sym_set_all_changed(void)
 {
 	struct symbol *sym;
 	int i;
 
 	for_all_symbols(i, sym)
-		sym->flags |= SYMBOL_CHANGED;
+		sym_set_changed(sym);
 }
 
 bool sym_tristate_within_range(struct symbol *sym, tristate val)
@@ -341,7 +355,7 @@
 
 	if (sym->flags & SYMBOL_NEW) {
 		sym->flags &= ~SYMBOL_NEW;
-		sym->flags |= SYMBOL_CHANGED;
+		sym_set_changed(sym);
 	}
 	if (sym_is_choice_value(sym) && val == yes) {
 		struct property *prop = sym_get_choice_prop(sym);
@@ -461,7 +475,7 @@
 
 	if (sym->flags & SYMBOL_NEW) {
 		sym->flags &= ~SYMBOL_NEW;
-		sym->flags |= SYMBOL_CHANGED;
+		sym_set_changed(sym);
 	}
 
 	oldval = S_VAL(sym->def);
@@ -526,7 +540,6 @@
 	char *new_name;
 	int hash = 0;
 
-	//printf("lookup: %s -> ", name);
 	if (name) {
 		if (name[0] && !name[1]) {
 			switch (name[0]) {
@@ -542,10 +555,8 @@
 		for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) {
 			if (!strcmp(symbol->name, name)) {
 				if ((isconst && symbol->flags & SYMBOL_CONST) ||
-				    (!isconst && !(symbol->flags & SYMBOL_CONST))) {
-					//printf("h:%p\n", symbol);
+				    (!isconst && !(symbol->flags & SYMBOL_CONST)))
 					return symbol;
-				}
 			}
 		}
 		new_name = strdup(name);
@@ -565,7 +576,6 @@
 	symbol->next = symbol_hash[hash];
 	symbol_hash[hash] = symbol;
 
-	//printf("n:%p\n", symbol);
 	return symbol;
 }
 
diff -Nru a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l
--- a/scripts/kconfig/zconf.l	Sun Dec 15 18:08:30 2002
+++ b/scripts/kconfig/zconf.l	Sun Dec 15 18:08:30 2002
@@ -7,6 +7,7 @@
  * Released under the terms of the GNU GPL v2.0.
  */
 
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -14,7 +15,6 @@
 
 #define LKC_DIRECT_LINK
 #include "lkc.h"
-#include "zconf.tab.h"
 
 #define START_STRSIZE	16
 
@@ -141,6 +141,7 @@
 		zconflval.string = text;
 		return T_WORD;
 	}
+	\\\n	current_file->lineno++;
 	.
 	<<EOF>> {
 		BEGIN(INITIAL);
@@ -151,29 +152,30 @@
 	[^'"\\\n]+/\n	{
 		append_string(yytext, yyleng);
 		zconflval.string = text;
-		return T_STRING;
+		return T_WORD_QUOTE;
 	}
 	[^'"\\\n]+	{
 		append_string(yytext, yyleng);
 	}
 	\\.?/\n	{
-		append_string(yytext+1, yyleng);
+		append_string(yytext + 1, yyleng - 1);
 		zconflval.string = text;
-		return T_STRING;
+		return T_WORD_QUOTE;
 	}
 	\\.?	{
-		append_string(yytext+1, yyleng - 1);
+		append_string(yytext + 1, yyleng - 1);
 	}
 	\'|\"	{
 		if (str == yytext[0]) {
 			BEGIN(PARAM);
 			zconflval.string = text;
-			return T_STRING;
+			return T_WORD_QUOTE;
 		} else
 			append_string(yytext, 1);
 	}
 	\n	{
 		printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno());
+		current_file->lineno++;
 		BEGIN(INITIAL);
 		return T_EOL;
 	}
@@ -249,9 +251,34 @@
 	BEGIN(INITIAL); 
 }
 
+
+/* 
+ * Try to open specified file with following names:
+ * ./name
+ * $(srctree)/name
+ * The latter is used when srctree is separate from objtree
+ * when compiling the kernel.
+ * Return NULL if file is not found.
+ */
+FILE *zconf_fopen(const char *name)
+{
+	char *env, fullname[PATH_MAX+1];
+	FILE *f;
+
+	f = fopen(name, "r");
+	if (!f && name[0] != '/') {
+		env = getenv(SRCTREE);
+		if (env) {
+			sprintf(fullname, "%s/%s", env, name);
+			f = fopen(fullname, "r");
+		}
+	}
+	return f;
+}
+
 void zconf_initscan(const char *name)
 {
-	yyin = fopen(name, "r");
+	yyin = zconf_fopen(name);
 	if (!yyin) {
 		printf("can't find file %s\n", name);
 		exit(1);
@@ -272,7 +299,7 @@
 	memset(buf, 0, sizeof(*buf));
 
 	current_buf->state = YY_CURRENT_BUFFER;
-	yyin = fopen(name, "r");
+	yyin = zconf_fopen(name);
 	if (!yyin) {
 		printf("%s:%d: can't open file \"%s\"\n", zconf_curname(), zconf_lineno(), name);
 		exit(1);
diff -Nru a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
--- a/scripts/kconfig/zconf.tab.c_shipped	Sun Dec 15 18:08:28 2002
+++ b/scripts/kconfig/zconf.tab.c_shipped	Sun Dec 15 18:08:28 2002
@@ -78,20 +78,21 @@
      T_DEFAULT = 274,
      T_TRISTATE = 275,
      T_BOOLEAN = 276,
-     T_INT = 277,
-     T_HEX = 278,
-     T_WORD = 279,
-     T_STRING = 280,
-     T_UNEQUAL = 281,
-     T_EOF = 282,
-     T_EOL = 283,
-     T_CLOSE_PAREN = 284,
-     T_OPEN_PAREN = 285,
-     T_ON = 286,
-     T_OR = 287,
-     T_AND = 288,
-     T_EQUAL = 289,
-     T_NOT = 290
+     T_STRING = 277,
+     T_INT = 278,
+     T_HEX = 279,
+     T_WORD = 280,
+     T_WORD_QUOTE = 281,
+     T_UNEQUAL = 282,
+     T_EOF = 283,
+     T_EOL = 284,
+     T_CLOSE_PAREN = 285,
+     T_OPEN_PAREN = 286,
+     T_ON = 287,
+     T_OR = 288,
+     T_AND = 289,
+     T_EQUAL = 290,
+     T_NOT = 291
    };
 #endif
 #define T_MAINMENU 258
@@ -113,26 +114,26 @@
 #define T_DEFAULT 274
 #define T_TRISTATE 275
 #define T_BOOLEAN 276
-#define T_INT 277
-#define T_HEX 278
-#define T_WORD 279
-#define T_STRING 280
-#define T_UNEQUAL 281
-#define T_EOF 282
-#define T_EOL 283
-#define T_CLOSE_PAREN 284
-#define T_OPEN_PAREN 285
-#define T_ON 286
-#define T_OR 287
-#define T_AND 288
-#define T_EQUAL 289
-#define T_NOT 290
+#define T_STRING 277
+#define T_INT 278
+#define T_HEX 279
+#define T_WORD 280
+#define T_WORD_QUOTE 281
+#define T_UNEQUAL 282
+#define T_EOF 283
+#define T_EOL 284
+#define T_CLOSE_PAREN 285
+#define T_OPEN_PAREN 286
+#define T_ON 287
+#define T_OR 288
+#define T_AND 289
+#define T_EQUAL 290
+#define T_NOT 291
 
 
 
 
 /* Copy the first part of user declarations.  */
-#line 1 "zconf.y"
 
 /*
  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
@@ -165,7 +166,7 @@
 
 /* Enabling traces.  */
 #ifndef YYDEBUG
-# define YYDEBUG 1
+# define YYDEBUG 0
 #endif
 
 /* Enabling verbose error messages.  */
@@ -186,7 +187,7 @@
 	struct menu *menu;
 } yystype;
 /* Line 193 of /usr/share/bison/yacc.c.  */
-#line 190 "zconf.tab.c"
+#line 191 "zconf.tab.c"
 # define YYSTYPE yystype
 # define YYSTYPE_IS_TRIVIAL 1
 #endif
@@ -204,7 +205,6 @@
 #endif
 
 /* Copy the second part of user declarations.  */
-#line 83 "zconf.y"
 
 #define LKC_DIRECT_LINK
 #include "lkc.h"
@@ -309,20 +309,20 @@
 
 /* YYFINAL -- State number of the termination state. */
 #define YYFINAL  2
-#define YYLAST   151
+#define YYLAST   154
 
 /* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS  36
+#define YYNTOKENS  37
 /* YYNNTS -- Number of nonterminals. */
 #define YYNNTS  39
 /* YYNRULES -- Number of rules. */
 #define YYNRULES  96
 /* YYNRULES -- Number of states. */
-#define YYNSTATES  145
+#define YYNSTATES  146
 
 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
 #define YYUNDEFTOK  2
-#define YYMAXUTOK   290
+#define YYMAXUTOK   291
 
 #define YYTRANSLATE(X) \
   ((unsigned)(X) <= YYMAXUTOK ? yytranslate[X] : YYUNDEFTOK)
@@ -359,7 +359,7 @@
        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
-      35
+      35,    36
 };
 
 #if YYDEBUG
@@ -371,60 +371,60 @@
       21,    23,    26,    28,    30,    32,    34,    36,    39,    43,
       44,    48,    52,    55,    58,    61,    64,    67,    70,    73,
       77,    81,    83,    87,    89,    94,    97,    98,   102,   106,
-     109,   112,   116,   118,   121,   122,   125,   128,   130,   136,
-     140,   141,   144,   147,   150,   153,   157,   159,   164,   167,
-     168,   171,   174,   177,   181,   184,   187,   190,   194,   197,
-     200,   201,   205,   208,   212,   215,   218,   219,   221,   225,
-     227,   229,   231,   233,   235,   237,   239,   240,   243,   245,
-     249,   253,   257,   260,   264,   268,   270
+     109,   112,   116,   118,   122,   123,   126,   129,   131,   137,
+     141,   142,   145,   148,   151,   154,   158,   160,   165,   168,
+     169,   172,   175,   178,   182,   185,   188,   191,   195,   198,
+     201,   202,   206,   209,   213,   216,   219,   220,   222,   226,
+     228,   230,   232,   234,   236,   238,   240,   241,   244,   246,
+     250,   254,   258,   261,   265,   269,   271
 };
 
 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
 static const yysigned_char yyrhs[] =
 {
-      37,     0,    -1,    -1,    37,    38,    -1,    39,    -1,    47,
-      -1,    58,    -1,     3,    69,    71,    -1,     5,    -1,    14,
-      -1,     8,    -1,     1,    71,    -1,    53,    -1,    63,    -1,
-      41,    -1,    61,    -1,    71,    -1,    10,    24,    -1,    40,
-      28,    42,    -1,    -1,    42,    43,    28,    -1,    42,    67,
-      28,    -1,    42,    65,    -1,    42,    28,    -1,    20,    68,
-      -1,    21,    68,    -1,    22,    68,    -1,    23,    68,    -1,
-      25,    68,    -1,    18,    69,    72,    -1,    19,    74,    72,
-      -1,     7,    -1,    44,    28,    48,    -1,    70,    -1,    45,
-      50,    46,    28,    -1,    45,    50,    -1,    -1,    48,    49,
-      28,    -1,    48,    67,    28,    -1,    48,    65,    -1,    48,
-      28,    -1,    18,    69,    72,    -1,    17,    -1,    19,    74,
-      -1,    -1,    50,    39,    -1,    13,    73,    -1,    70,    -1,
-      51,    28,    54,    52,    28,    -1,    51,    28,    54,    -1,
-      -1,    54,    39,    -1,    54,    58,    -1,    54,    47,    -1,
-       4,    69,    -1,    55,    28,    66,    -1,    70,    -1,    56,
-      59,    57,    28,    -1,    56,    59,    -1,    -1,    59,    39,
-      -1,    59,    58,    -1,    59,    47,    -1,    59,     1,    28,
-      -1,     6,    69,    -1,    60,    28,    -1,     9,    69,    -1,
-      62,    28,    66,    -1,    11,    28,    -1,    64,    12,    -1,
-      -1,    66,    67,    28,    -1,    66,    28,    -1,    15,    31,
-      73,    -1,    15,    73,    -1,    16,    73,    -1,    -1,    69,
-      -1,    69,    13,    73,    -1,    24,    -1,    25,    -1,     5,
-      -1,     8,    -1,    14,    -1,    28,    -1,    27,    -1,    -1,
-      13,    73,    -1,    74,    -1,    74,    34,    74,    -1,    74,
-      26,    74,    -1,    30,    73,    29,    -1,    35,    73,    -1,
-      73,    32,    73,    -1,    73,    33,    73,    -1,    24,    -1,
-      25,    -1
+      38,     0,    -1,    -1,    38,    39,    -1,    40,    -1,    48,
+      -1,    59,    -1,     3,    70,    72,    -1,     5,    -1,    14,
+      -1,     8,    -1,     1,    72,    -1,    54,    -1,    64,    -1,
+      42,    -1,    62,    -1,    72,    -1,    10,    25,    -1,    41,
+      29,    43,    -1,    -1,    43,    44,    29,    -1,    43,    68,
+      29,    -1,    43,    66,    -1,    43,    29,    -1,    20,    69,
+      -1,    21,    69,    -1,    23,    69,    -1,    24,    69,    -1,
+      22,    69,    -1,    18,    70,    73,    -1,    19,    75,    73,
+      -1,     7,    -1,    45,    29,    49,    -1,    71,    -1,    46,
+      51,    47,    29,    -1,    46,    51,    -1,    -1,    49,    50,
+      29,    -1,    49,    68,    29,    -1,    49,    66,    -1,    49,
+      29,    -1,    18,    70,    73,    -1,    17,    -1,    19,    75,
+      73,    -1,    -1,    51,    40,    -1,    13,    74,    -1,    71,
+      -1,    52,    29,    55,    53,    29,    -1,    52,    29,    55,
+      -1,    -1,    55,    40,    -1,    55,    59,    -1,    55,    48,
+      -1,     4,    70,    -1,    56,    29,    67,    -1,    71,    -1,
+      57,    60,    58,    29,    -1,    57,    60,    -1,    -1,    60,
+      40,    -1,    60,    59,    -1,    60,    48,    -1,    60,     1,
+      29,    -1,     6,    70,    -1,    61,    29,    -1,     9,    70,
+      -1,    63,    29,    67,    -1,    11,    29,    -1,    65,    12,
+      -1,    -1,    67,    68,    29,    -1,    67,    29,    -1,    15,
+      32,    74,    -1,    15,    74,    -1,    16,    74,    -1,    -1,
+      70,    -1,    70,    13,    74,    -1,    25,    -1,    26,    -1,
+       5,    -1,     8,    -1,    14,    -1,    29,    -1,    28,    -1,
+      -1,    13,    74,    -1,    75,    -1,    75,    35,    75,    -1,
+      75,    27,    75,    -1,    31,    74,    30,    -1,    36,    74,
+      -1,    74,    33,    74,    -1,    74,    34,    74,    -1,    25,
+      -1,    26,    -1
 };
 
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned short yyrline[] =
 {
-       0,    88,    88,    89,    92,    93,    94,    95,    96,    97,
-      98,    99,   102,   104,   105,   106,   107,   113,   121,   127,
-     129,   130,   131,   132,   135,   141,   147,   153,   159,   165,
-     171,   179,   188,   194,   202,   204,   210,   212,   213,   214,
-     215,   218,   224,   230,   237,   239,   244,   254,   262,   264,
-     270,   272,   273,   274,   279,   286,   292,   300,   302,   308,
-     310,   311,   312,   313,   316,   322,   329,   336,   343,   349,
-     356,   357,   358,   361,   366,   371,   379,   381,   385,   390,
-     391,   394,   395,   396,   399,   400,   402,   403,   406,   407,
-     408,   409,   410,   411,   412,   415,   416
+       0,    89,    89,    90,    93,    94,    95,    96,    97,    98,
+      99,   100,   103,   105,   106,   107,   108,   114,   122,   128,
+     130,   131,   132,   133,   136,   142,   148,   154,   160,   166,
+     172,   180,   189,   195,   203,   205,   211,   213,   214,   215,
+     216,   219,   225,   231,   237,   239,   244,   253,   261,   263,
+     269,   271,   272,   273,   278,   285,   291,   299,   301,   307,
+     309,   310,   311,   312,   315,   321,   328,   335,   342,   348,
+     355,   356,   357,   360,   365,   370,   378,   380,   384,   389,
+     390,   393,   394,   395,   398,   399,   401,   402,   405,   406,
+     407,   408,   409,   410,   411,   414,   415
 };
 #endif
 
@@ -437,16 +437,17 @@
   "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 
   "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", "T_REQUIRES", 
   "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", "T_BOOLEAN", 
-  "T_INT", "T_HEX", "T_WORD", "T_STRING", "T_UNEQUAL", "T_EOF", "T_EOL", 
-  "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR", "T_AND", "T_EQUAL", 
-  "T_NOT", "$accept", "input", "block", "common_block", 
-  "config_entry_start", "config_stmt", "config_option_list", 
-  "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", 
-  "choice_option_list", "choice_option", "choice_block", "if", "if_end", 
-  "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", 
-  "menu_block", "source", "source_stmt", "comment", "comment_stmt", 
-  "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", 
-  "prompt", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0
+  "T_STRING", "T_INT", "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", 
+  "T_EOF", "T_EOL", "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_OR", 
+  "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", 
+  "common_block", "config_entry_start", "config_stmt", 
+  "config_option_list", "config_option", "choice", "choice_entry", 
+  "choice_end", "choice_stmt", "choice_option_list", "choice_option", 
+  "choice_block", "if", "if_end", "if_stmt", "if_block", "menu", 
+  "menu_entry", "menu_end", "menu_stmt", "menu_block", "source", 
+  "source_stmt", "comment", "comment_stmt", "help_start", "help", 
+  "depends_list", "depends", "prompt_stmt_opt", "prompt", "end", 
+  "nl_or_eof", "if_expr", "expr", "symbol", 0
 };
 #endif
 
@@ -458,23 +459,23 @@
        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
-     285,   286,   287,   288,   289,   290
+     285,   286,   287,   288,   289,   290,   291
 };
 # endif
 
 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
 static const unsigned char yyr1[] =
 {
-       0,    36,    37,    37,    38,    38,    38,    38,    38,    38,
-      38,    38,    39,    39,    39,    39,    39,    40,    41,    42,
-      42,    42,    42,    42,    43,    43,    43,    43,    43,    43,
-      43,    44,    45,    46,    47,    47,    48,    48,    48,    48,
-      48,    49,    49,    49,    50,    50,    51,    52,    53,    53,
-      54,    54,    54,    54,    55,    56,    57,    58,    58,    59,
-      59,    59,    59,    59,    60,    61,    62,    63,    64,    65,
-      66,    66,    66,    67,    67,    67,    68,    68,    68,    69,
-      69,    70,    70,    70,    71,    71,    72,    72,    73,    73,
-      73,    73,    73,    73,    73,    74,    74
+       0,    37,    38,    38,    39,    39,    39,    39,    39,    39,
+      39,    39,    40,    40,    40,    40,    40,    41,    42,    43,
+      43,    43,    43,    43,    44,    44,    44,    44,    44,    44,
+      44,    45,    46,    47,    48,    48,    49,    49,    49,    49,
+      49,    50,    50,    50,    51,    51,    52,    53,    54,    54,
+      55,    55,    55,    55,    56,    57,    58,    59,    59,    60,
+      60,    60,    60,    60,    61,    62,    63,    64,    65,    66,
+      67,    67,    67,    68,    68,    68,    69,    69,    69,    70,
+      70,    71,    71,    71,    72,    72,    73,    73,    74,    74,
+      74,    74,    74,    74,    74,    75,    75
 };
 
 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
@@ -484,7 +485,7 @@
        1,     2,     1,     1,     1,     1,     1,     2,     3,     0,
        3,     3,     2,     2,     2,     2,     2,     2,     2,     3,
        3,     1,     3,     1,     4,     2,     0,     3,     3,     2,
-       2,     3,     1,     2,     0,     2,     2,     1,     5,     3,
+       2,     3,     1,     3,     0,     2,     2,     1,     5,     3,
        0,     2,     2,     2,     2,     3,     1,     4,     2,     0,
        2,     2,     2,     3,     2,     2,     2,     3,     2,     2,
        0,     3,     2,     3,     2,     2,     0,     1,     3,     1,
@@ -509,9 +510,9 @@
       76,    76,    76,    76,    23,     0,     0,    22,     0,    42,
        0,     0,    40,     0,    39,     0,    34,    51,    53,     0,
       52,    47,    72,     0,    63,    57,    68,     0,    74,    75,
-      86,    86,    24,    77,    25,    26,    27,    28,    20,    69,
-      21,    86,    43,    37,    38,    48,    71,    73,     0,    29,
-      30,     0,    41,    87,    78
+      86,    86,    24,    77,    25,    28,    26,    27,    20,    69,
+      21,    86,    86,    37,    38,    48,    71,    73,     0,    29,
+      30,     0,    41,    43,    87,    78
 };
 
 /* YYDEFGOTO[NTERM-NUM]. */
@@ -528,21 +529,21 @@
 #define YYPACT_NINF -120
 static const short yypact[] =
 {
-    -120,    17,  -120,    41,    48,    48,  -120,    48,  -120,  -120,
-      48,   -11,    40,  -120,  -120,  -120,  -120,  -120,    13,  -120,
-      23,  -120,  -120,    66,  -120,    72,  -120,  -120,    77,  -120,
-      81,  -120,  -120,  -120,  -120,  -120,    41,  -120,  -120,  -120,
-    -120,  -120,  -120,    40,    40,    57,    59,  -120,  -120,    98,
-    -120,  -120,    49,  -120,  -120,  -120,     7,  -120,    40,    40,
-      67,    67,    99,   117,  -120,  -120,  -120,  -120,    85,  -120,
-      74,    18,    88,  -120,  -120,    95,  -120,  -120,    18,  -120,
-      96,  -120,  -120,  -120,   102,    36,    40,    48,    67,    48,
-      48,    48,    48,    48,  -120,   103,   129,  -120,   114,  -120,
-      48,    67,  -120,   115,  -120,   116,  -120,  -120,  -120,   118,
-    -120,  -120,  -120,   119,  -120,  -120,  -120,    40,    57,    57,
-     135,   135,  -120,   136,  -120,  -120,  -120,  -120,  -120,  -120,
-    -120,   135,  -120,  -120,  -120,  -120,  -120,    57,    40,  -120,
-    -120,    40,  -120,    57,    57
+    -120,    17,  -120,    32,    71,    71,  -120,    71,  -120,  -120,
+      71,    11,    99,  -120,  -120,  -120,  -120,  -120,    12,  -120,
+      22,  -120,  -120,    35,  -120,    52,  -120,  -120,    56,  -120,
+      60,  -120,  -120,  -120,  -120,  -120,    32,  -120,  -120,  -120,
+    -120,  -120,  -120,    99,    99,    83,    38,  -120,  -120,    74,
+    -120,  -120,    49,  -120,  -120,  -120,    98,  -120,    99,    99,
+     101,   101,    89,   104,  -120,  -120,  -120,  -120,    65,  -120,
+      62,    77,    72,  -120,  -120,    85,  -120,  -120,    77,  -120,
+      95,  -120,  -120,  -120,   105,     8,    99,    71,   101,    71,
+      71,    71,    71,    71,  -120,   113,   131,  -120,   115,  -120,
+      71,   101,  -120,   116,  -120,   117,  -120,  -120,  -120,   118,
+    -120,  -120,  -120,   119,  -120,  -120,  -120,    99,    83,    83,
+     136,   136,  -120,   137,  -120,  -120,  -120,  -120,  -120,  -120,
+    -120,   136,   136,  -120,  -120,  -120,  -120,    83,    99,  -120,
+    -120,    99,  -120,  -120,    83,    83
 };
 
 /* YYPGOTO[NTERM-NUM].  */
@@ -550,8 +551,8 @@
 {
     -120,  -120,  -120,   -38,  -120,  -120,  -120,  -120,  -120,  -120,
     -120,   -42,  -120,  -120,  -120,  -120,  -120,  -120,  -120,  -120,
-    -120,  -120,   -33,  -120,  -120,  -120,  -120,  -120,  -120,    87,
-      97,    34,    47,    -1,   -23,     2,  -119,   -43,   -53
+    -120,  -120,   -33,  -120,  -120,  -120,  -120,  -120,  -120,    88,
+     100,    78,    46,    -1,   -23,     2,  -119,   -43,   -53
 };
 
 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
@@ -562,62 +563,62 @@
 static const short yytable[] =
 {
       56,    57,   140,    36,    37,    33,    38,    82,    83,    39,
-      74,    67,   142,    40,    73,    80,    81,     2,     3,    76,
+      74,    67,   142,   143,    73,    80,    81,     2,     3,    76,
        4,     5,     6,     7,     8,     9,    10,    11,   108,    77,
-      12,    13,   107,    85,    86,   121,    79,   110,    55,    58,
-      59,    47,   118,   119,    14,    15,   112,   111,   132,   -58,
+      12,    13,   107,    41,    42,   121,    40,   110,    55,    43,
+     117,    47,   118,   119,    44,    14,    15,   111,   132,   -58,
       72,    48,   -58,     5,    64,     7,     8,    65,    10,    11,
-      41,    42,    12,    66,    41,    42,    43,   117,    14,    15,
-      43,    44,    34,    35,   137,    44,    14,    15,     5,    64,
-       7,     8,    65,    10,    11,    60,   120,    12,    66,    58,
-      59,    41,    42,    61,    50,   143,    98,   105,   144,   131,
-      51,    14,    15,    64,     7,    53,    65,    10,    11,    54,
-      84,    12,    66,   106,    85,    86,   114,    87,    88,    89,
-      90,    91,    92,   115,    93,    14,    15,    94,    84,    59,
-     116,   128,    85,    86,    99,   100,   101,   124,   125,   126,
-     127,   129,   130,   133,   134,   102,   135,   136,   138,   141,
-     104,    78
+      14,    15,    12,    66,    50,    60,     5,    64,     7,     8,
+      65,    10,    11,    61,   137,    12,    66,    14,    15,    64,
+       7,    51,    65,    10,    11,    53,   120,    12,    66,    54,
+      14,    15,    85,    86,   106,   144,    34,    35,   145,   131,
+      84,   114,    14,    15,    85,    86,   112,    87,    88,    89,
+      90,    91,    92,    93,   115,    84,    58,    59,    94,    85,
+      86,    99,   100,   101,    41,    42,    41,    42,    79,    59,
+      43,    58,    59,   102,   116,    44,   124,   125,   126,   127,
+      98,   105,   128,   129,   130,   133,   134,   135,   136,   138,
+     141,   104,     0,     0,    78
 };
 
-static const unsigned char yycheck[] =
+static const short yycheck[] =
 {
       43,    44,   121,     4,     5,     3,     7,    60,    61,    10,
-      52,    49,   131,    24,    52,    58,    59,     0,     1,    52,
+      52,    49,   131,   132,    52,    58,    59,     0,     1,    52,
        3,     4,     5,     6,     7,     8,     9,    10,    70,    52,
-      13,    14,    70,    15,    16,    88,    29,    70,    36,    32,
-      33,    28,    85,    86,    27,    28,    28,    70,   101,     0,
-       1,    28,     3,     4,     5,     6,     7,     8,     9,    10,
-      24,    25,    13,    14,    24,    25,    30,    31,    27,    28,
-      30,    35,    24,    25,   117,    35,    27,    28,     4,     5,
-       6,     7,     8,     9,    10,    26,    87,    13,    14,    32,
-      33,    24,    25,    34,    28,   138,    62,    63,   141,   100,
-      28,    27,    28,     5,     6,    28,     8,     9,    10,    28,
-      11,    13,    14,    28,    15,    16,    28,    18,    19,    20,
-      21,    22,    23,    28,    25,    27,    28,    28,    11,    33,
-      28,    28,    15,    16,    17,    18,    19,    90,    91,    92,
-      93,    12,    28,    28,    28,    28,    28,    28,    13,    13,
-      63,    54
+      13,    14,    70,    25,    26,    88,    25,    70,    36,    31,
+      32,    29,    85,    86,    36,    28,    29,    70,   101,     0,
+       1,    29,     3,     4,     5,     6,     7,     8,     9,    10,
+      28,    29,    13,    14,    29,    27,     4,     5,     6,     7,
+       8,     9,    10,    35,   117,    13,    14,    28,    29,     5,
+       6,    29,     8,     9,    10,    29,    87,    13,    14,    29,
+      28,    29,    15,    16,    29,   138,    25,    26,   141,   100,
+      11,    29,    28,    29,    15,    16,    29,    18,    19,    20,
+      21,    22,    23,    24,    29,    11,    33,    34,    29,    15,
+      16,    17,    18,    19,    25,    26,    25,    26,    30,    34,
+      31,    33,    34,    29,    29,    36,    90,    91,    92,    93,
+      62,    63,    29,    12,    29,    29,    29,    29,    29,    13,
+      13,    63,    -1,    -1,    54
 };
 
 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
    symbol of state STATE-NUM.  */
 static const unsigned char yystos[] =
 {
-       0,    37,     0,     1,     3,     4,     5,     6,     7,     8,
-       9,    10,    13,    14,    27,    28,    38,    39,    40,    41,
-      44,    45,    47,    51,    53,    55,    56,    58,    60,    61,
-      62,    63,    71,    71,    24,    25,    69,    69,    69,    69,
-      24,    24,    25,    30,    35,    73,    74,    28,    28,    50,
-      28,    28,    59,    28,    28,    71,    73,    73,    32,    33,
-      26,    34,    42,    48,     5,     8,    14,    39,    46,    70,
-      54,    66,     1,    39,    47,    57,    58,    70,    66,    29,
-      73,    73,    74,    74,    11,    15,    16,    18,    19,    20,
-      21,    22,    23,    25,    28,    43,    64,    65,    67,    17,
-      18,    19,    28,    49,    65,    67,    28,    39,    47,    52,
-      58,    70,    28,    67,    28,    28,    28,    31,    73,    73,
-      69,    74,    68,    69,    68,    68,    68,    68,    28,    12,
-      28,    69,    74,    28,    28,    28,    28,    73,    13,    72,
-      72,    13,    72,    73,    73
+       0,    38,     0,     1,     3,     4,     5,     6,     7,     8,
+       9,    10,    13,    14,    28,    29,    39,    40,    41,    42,
+      45,    46,    48,    52,    54,    56,    57,    59,    61,    62,
+      63,    64,    72,    72,    25,    26,    70,    70,    70,    70,
+      25,    25,    26,    31,    36,    74,    75,    29,    29,    51,
+      29,    29,    60,    29,    29,    72,    74,    74,    33,    34,
+      27,    35,    43,    49,     5,     8,    14,    40,    47,    71,
+      55,    67,     1,    40,    48,    58,    59,    71,    67,    30,
+      74,    74,    75,    75,    11,    15,    16,    18,    19,    20,
+      21,    22,    23,    24,    29,    44,    65,    66,    68,    17,
+      18,    19,    29,    50,    66,    68,    29,    40,    48,    53,
+      59,    71,    29,    68,    29,    29,    29,    32,    74,    74,
+      70,    75,    69,    70,    69,    69,    69,    69,    29,    12,
+      29,    70,    75,    29,    29,    29,    29,    74,    13,    73,
+      73,    13,    73,    73,    74,    74
 };
 
 #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
@@ -1168,27 +1169,22 @@
   switch (yyn)
     {
         case 8:
-#line 96 "zconf.y"
     { zconfprint("unexpected 'endmenu' statement"); }
     break;
 
   case 9:
-#line 97 "zconf.y"
     { zconfprint("unexpected 'endif' statement"); }
     break;
 
   case 10:
-#line 98 "zconf.y"
     { zconfprint("unexpected 'endchoice' statement"); }
     break;
 
   case 11:
-#line 99 "zconf.y"
     { zconfprint("syntax error"); yyerrok; }
     break;
 
   case 17:
-#line 114 "zconf.y"
     {
 	struct symbol *sym = sym_lookup(yyvsp[0].string, 0);
 	sym->flags |= SYMBOL_OPTIONAL;
@@ -1198,7 +1194,6 @@
     break;
 
   case 18:
-#line 122 "zconf.y"
     {
 	menu_end_entry();
 	printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
@@ -1206,12 +1201,10 @@
     break;
 
   case 23:
-#line 133 "zconf.y"
     { }
     break;
 
   case 24:
-#line 136 "zconf.y"
     {
 	menu_set_type(S_TRISTATE);
 	printd(DEBUG_PARSE, "%s:%d:tristate\n", zconf_curname(), zconf_lineno());
@@ -1219,7 +1212,6 @@
     break;
 
   case 25:
-#line 142 "zconf.y"
     {
 	menu_set_type(S_BOOLEAN);
 	printd(DEBUG_PARSE, "%s:%d:boolean\n", zconf_curname(), zconf_lineno());
@@ -1227,7 +1219,6 @@
     break;
 
   case 26:
-#line 148 "zconf.y"
     {
 	menu_set_type(S_INT);
 	printd(DEBUG_PARSE, "%s:%d:int\n", zconf_curname(), zconf_lineno());
@@ -1235,7 +1226,6 @@
     break;
 
   case 27:
-#line 154 "zconf.y"
     {
 	menu_set_type(S_HEX);
 	printd(DEBUG_PARSE, "%s:%d:hex\n", zconf_curname(), zconf_lineno());
@@ -1243,7 +1233,6 @@
     break;
 
   case 28:
-#line 160 "zconf.y"
     {
 	menu_set_type(S_STRING);
 	printd(DEBUG_PARSE, "%s:%d:string\n", zconf_curname(), zconf_lineno());
@@ -1251,7 +1240,6 @@
     break;
 
   case 29:
-#line 166 "zconf.y"
     {
 	menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@@ -1259,7 +1247,6 @@
     break;
 
   case 30:
-#line 172 "zconf.y"
     {
 	menu_add_prop(P_DEFAULT, NULL, yyvsp[-1].symbol, yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
@@ -1267,7 +1254,6 @@
     break;
 
   case 31:
-#line 180 "zconf.y"
     {
 	struct symbol *sym = sym_lookup(NULL, 0);
 	sym->flags |= SYMBOL_CHOICE;
@@ -1278,7 +1264,6 @@
     break;
 
   case 32:
-#line 189 "zconf.y"
     {
 	menu_end_entry();
 	menu_add_menu();
@@ -1286,7 +1271,6 @@
     break;
 
   case 33:
-#line 195 "zconf.y"
     {
 	if (zconf_endtoken(yyvsp[0].token, T_CHOICE, T_ENDCHOICE)) {
 		menu_end_menu();
@@ -1296,7 +1280,6 @@
     break;
 
   case 35:
-#line 205 "zconf.y"
     {
 	printf("%s:%d: missing 'endchoice' for this 'choice' statement\n", current_menu->file->name, current_menu->lineno);
 	zconfnerrs++;
@@ -1304,7 +1287,6 @@
     break;
 
   case 41:
-#line 219 "zconf.y"
     {
 	menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno());
@@ -1312,7 +1294,6 @@
     break;
 
   case 42:
-#line 225 "zconf.y"
     {
 	current_entry->sym->flags |= SYMBOL_OPTIONAL;
 	printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
@@ -1320,20 +1301,16 @@
     break;
 
   case 43:
-#line 231 "zconf.y"
     {
-	menu_add_prop(P_DEFAULT, NULL, yyvsp[0].symbol, NULL);
-	//current_choice->prop->def = ;
+	menu_add_prop(P_DEFAULT, NULL, yyvsp[-1].symbol, yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
 }
     break;
 
   case 46:
-#line 245 "zconf.y"
     {
 	printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
 	menu_add_entry(NULL);
-	//current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, );
 	menu_add_dep(yyvsp[0].expr);
 	menu_end_entry();
 	menu_add_menu();
@@ -1341,7 +1318,6 @@
     break;
 
   case 47:
-#line 255 "zconf.y"
     {
 	if (zconf_endtoken(yyvsp[0].token, T_IF, T_ENDIF)) {
 		menu_end_menu();
@@ -1351,7 +1327,6 @@
     break;
 
   case 49:
-#line 265 "zconf.y"
     {
 	printf("%s:%d: missing 'endif' for this 'if' statement\n", current_menu->file->name, current_menu->lineno);
 	zconfnerrs++;
@@ -1359,7 +1334,6 @@
     break;
 
   case 54:
-#line 280 "zconf.y"
     {
 	menu_add_entry(NULL);
 	menu_add_prop(P_MENU, yyvsp[0].string, NULL, NULL);
@@ -1368,7 +1342,6 @@
     break;
 
   case 55:
-#line 287 "zconf.y"
     {
 	menu_end_entry();
 	menu_add_menu();
@@ -1376,7 +1349,6 @@
     break;
 
   case 56:
-#line 293 "zconf.y"
     {
 	if (zconf_endtoken(yyvsp[0].token, T_MENU, T_ENDMENU)) {
 		menu_end_menu();
@@ -1386,7 +1358,6 @@
     break;
 
   case 58:
-#line 303 "zconf.y"
     {
 	printf("%s:%d: missing 'endmenu' for this 'menu' statement\n", current_menu->file->name, current_menu->lineno);
 	zconfnerrs++;
@@ -1394,12 +1365,10 @@
     break;
 
   case 63:
-#line 313 "zconf.y"
     { zconfprint("invalid menu option"); yyerrok; }
     break;
 
   case 64:
-#line 317 "zconf.y"
     {
 	yyval.string = yyvsp[0].string;
 	printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), yyvsp[0].string);
@@ -1407,14 +1376,12 @@
     break;
 
   case 65:
-#line 323 "zconf.y"
     {
 	zconf_nextfile(yyvsp[-1].string);
 }
     break;
 
   case 66:
-#line 330 "zconf.y"
     {
 	menu_add_entry(NULL);
 	menu_add_prop(P_COMMENT, yyvsp[0].string, NULL, NULL);
@@ -1423,14 +1390,12 @@
     break;
 
   case 67:
-#line 337 "zconf.y"
     {
 	menu_end_entry();
 }
     break;
 
   case 68:
-#line 344 "zconf.y"
     {
 	printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno());
 	zconf_starthelp();
@@ -1438,19 +1403,16 @@
     break;
 
   case 69:
-#line 350 "zconf.y"
     {
 	current_entry->sym->help = yyvsp[0].string;
 }
     break;
 
   case 72:
-#line 359 "zconf.y"
     { }
     break;
 
   case 73:
-#line 362 "zconf.y"
     {
 	menu_add_dep(yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno());
@@ -1458,7 +1420,6 @@
     break;
 
   case 74:
-#line 367 "zconf.y"
     {
 	menu_add_dep(yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:depends\n", zconf_curname(), zconf_lineno());
@@ -1466,7 +1427,6 @@
     break;
 
   case 75:
-#line 372 "zconf.y"
     {
 	menu_add_dep(yyvsp[0].expr);
 	printd(DEBUG_PARSE, "%s:%d:requires\n", zconf_curname(), zconf_lineno());
@@ -1474,86 +1434,70 @@
     break;
 
   case 77:
-#line 382 "zconf.y"
     {
 	menu_add_prop(P_PROMPT, yyvsp[0].string, NULL, NULL);
 }
     break;
 
   case 78:
-#line 386 "zconf.y"
     {
 	menu_add_prop(P_PROMPT, yyvsp[-2].string, NULL, yyvsp[0].expr);
 }
     break;
 
   case 81:
-#line 394 "zconf.y"
     { yyval.token = T_ENDMENU; }
     break;
 
   case 82:
-#line 395 "zconf.y"
     { yyval.token = T_ENDCHOICE; }
     break;
 
   case 83:
-#line 396 "zconf.y"
     { yyval.token = T_ENDIF; }
     break;
 
   case 86:
-#line 402 "zconf.y"
     { yyval.expr = NULL; }
     break;
 
   case 87:
-#line 403 "zconf.y"
     { yyval.expr = yyvsp[0].expr; }
     break;
 
   case 88:
-#line 406 "zconf.y"
     { yyval.expr = expr_alloc_symbol(yyvsp[0].symbol); }
     break;
 
   case 89:
-#line 407 "zconf.y"
     { yyval.expr = expr_alloc_comp(E_EQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); }
     break;
 
   case 90:
-#line 408 "zconf.y"
     { yyval.expr = expr_alloc_comp(E_UNEQUAL, yyvsp[-2].symbol, yyvsp[0].symbol); }
     break;
 
   case 91:
-#line 409 "zconf.y"
     { yyval.expr = yyvsp[-1].expr; }
     break;
 
   case 92:
-#line 410 "zconf.y"
     { yyval.expr = expr_alloc_one(E_NOT, yyvsp[0].expr); }
     break;
 
   case 93:
-#line 411 "zconf.y"
     { yyval.expr = expr_alloc_two(E_OR, yyvsp[-2].expr, yyvsp[0].expr); }
     break;
 
   case 94:
-#line 412 "zconf.y"
     { yyval.expr = expr_alloc_two(E_AND, yyvsp[-2].expr, yyvsp[0].expr); }
     break;
 
   case 95:
-#line 415 "zconf.y"
     { yyval.symbol = sym_lookup(yyvsp[0].string, 0); free(yyvsp[0].string); }
     break;
 
   case 96:
-#line 416 "zconf.y"
     { yyval.symbol = sym_lookup(yyvsp[0].string, 1); free(yyvsp[0].string); }
     break;
 
@@ -1561,7 +1505,7 @@
     }
 
 /* Line 1016 of /usr/share/bison/yacc.c.  */
-#line 1565 "zconf.tab.c"
+#line 1509 "zconf.tab.c"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -1780,7 +1724,6 @@
 }
 
 
-#line 419 "zconf.y"
 
 
 void conf_parse(const char *name)
@@ -2014,4 +1957,5 @@
 #include "expr.c"
 #include "symbol.c"
 #include "menu.c"
+
 
diff -Nru a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
--- a/scripts/kconfig/zconf.y	Sun Dec 15 18:08:32 2002
+++ b/scripts/kconfig/zconf.y	Sun Dec 15 18:08:32 2002
@@ -57,10 +57,11 @@
 %token T_DEFAULT
 %token T_TRISTATE
 %token T_BOOLEAN
+%token T_STRING
 %token T_INT
 %token T_HEX
 %token <string> T_WORD
-%token <string> T_STRING
+%token <string> T_WORD_QUOTE
 %token T_UNEQUAL
 %token T_EOF
 %token T_EOL
@@ -227,10 +228,9 @@
 	printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno());
 };
 
-choice_option: T_DEFAULT symbol
+choice_option: T_DEFAULT symbol if_expr
 {
-	menu_add_prop(P_DEFAULT, NULL, $2, NULL);
-	//current_choice->prop->def = $2;
+	menu_add_prop(P_DEFAULT, NULL, $2, $3);
 	printd(DEBUG_PARSE, "%s:%d:default\n", zconf_curname(), zconf_lineno());
 };
 
@@ -245,7 +245,6 @@
 {
 	printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
 	menu_add_entry(NULL);
-	//current_entry->prompt = menu_add_prop(T_IF, NULL, NULL, $2);
 	menu_add_dep($2);
 	menu_end_entry();
 	menu_add_menu();
@@ -388,7 +387,7 @@
 };
 
 prompt:	  T_WORD
-	| T_STRING
+	| T_WORD_QUOTE
 ;
 
 end:	  T_ENDMENU		{ $$ = T_ENDMENU; }
@@ -413,7 +412,7 @@
 ;
 
 symbol:	  T_WORD	{ $$ = sym_lookup($1, 0); free($1); }
-	| T_STRING	{ $$ = sym_lookup($1, 1); free($1); }
+	| T_WORD_QUOTE	{ $$ = sym_lookup($1, 1); free($1); }
 ;
 
 %%
diff -Nru a/security/Makefile b/security/Makefile
--- a/security/Makefile	Sun Dec 15 18:08:30 2002
+++ b/security/Makefile	Sun Dec 15 18:08:30 2002
@@ -14,5 +14,3 @@
 obj-$(CONFIG_SECURITY)			+= security.o dummy.o
 obj-$(CONFIG_SECURITY_CAPABILITIES)	+= capability.o
 obj-$(CONFIG_SECURITY_ROOTPLUG)		+= root_plug.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/Makefile b/sound/Makefile
--- a/sound/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 endif
 
 soundcore-objs  := sound_core.o sound_firmware.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/arm/Makefile b/sound/arm/Makefile
--- a/sound/arm/Makefile	Sun Dec 15 18:08:32 2002
+++ b/sound/arm/Makefile	Sun Dec 15 18:08:32 2002
@@ -6,5 +6,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_SA11XX_UDA1341) += snd-sa11xx-uda1341.o 
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/Makefile b/sound/core/Makefile
--- a/sound/core/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/core/Makefile	Sun Dec 15 18:08:29 2002
@@ -103,5 +103,3 @@
 obj-$(CONFIG_SND_USB_AUDIO) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/ioctl32/Makefile b/sound/core/ioctl32/Makefile
--- a/sound/core/ioctl32/Makefile	Sun Dec 15 18:08:30 2002
+++ b/sound/core/ioctl32/Makefile	Sun Dec 15 18:08:30 2002
@@ -9,5 +9,3 @@
 endif
 
 obj-$(CONFIG_SND_BIT32_EMUL) += snd-ioctl32.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/oss/Makefile b/sound/core/oss/Makefile
--- a/sound/core/oss/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/core/oss/Makefile	Sun Dec 15 18:08:28 2002
@@ -12,5 +12,3 @@
 
 obj-$(CONFIG_SND_MIXER_OSS) += snd-mixer-oss.o
 obj-$(CONFIG_SND_PCM_OSS) += snd-pcm-oss.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/seq/Makefile b/sound/core/seq/Makefile
--- a/sound/core/seq/Makefile	Sun Dec 15 18:08:32 2002
+++ b/sound/core/seq/Makefile	Sun Dec 15 18:08:32 2002
@@ -76,5 +76,3 @@
 obj-$(CONFIG_SND_USB_AUDIO) += snd-seq.o snd-seq-device.o snd-seq-midi-event.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/seq/instr/Makefile b/sound/core/seq/instr/Makefile
--- a/sound/core/seq/instr/Makefile	Sun Dec 15 18:08:31 2002
+++ b/sound/core/seq/instr/Makefile	Sun Dec 15 18:08:31 2002
@@ -42,5 +42,3 @@
 obj-$(CONFIG_SND_YMFPCI) += snd-ainstr-fm.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/core/seq/oss/Makefile b/sound/core/seq/oss/Makefile
--- a/sound/core/seq/oss/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/core/seq/oss/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 ifeq ($(CONFIG_SND_SEQUENCER_OSS),y)
   obj-$(CONFIG_SND_SEQUENCER) += snd-seq-oss.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/drivers/Makefile b/sound/drivers/Makefile
--- a/sound/drivers/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/drivers/Makefile	Sun Dec 15 18:08:29 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_SND_MTPAV) += snd-mtpav.o
 
 obj-$(CONFIG_SND) += opl3/ mpu401/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/drivers/mpu401/Makefile b/sound/drivers/mpu401/Makefile
--- a/sound/drivers/mpu401/Makefile	Sun Dec 15 18:08:33 2002
+++ b/sound/drivers/mpu401/Makefile	Sun Dec 15 18:08:33 2002
@@ -41,5 +41,3 @@
 obj-$(CONFIG_SND_YMFPCI) += snd-mpu401-uart.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/drivers/opl3/Makefile b/sound/drivers/opl3/Makefile
--- a/sound/drivers/opl3/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/drivers/opl3/Makefile	Sun Dec 15 18:08:28 2002
@@ -66,5 +66,3 @@
 endif
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/i2c/Makefile b/sound/i2c/Makefile
--- a/sound/i2c/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/i2c/Makefile	Sun Dec 15 18:08:29 2002
@@ -16,5 +16,3 @@
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_INTERWAVE_STB) += snd-tea6330t.o snd-i2c.o
 obj-$(CONFIG_SND_ICE1712) += snd-cs8427.o snd-i2c.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/i2c/l3/Makefile b/sound/i2c/l3/Makefile
--- a/sound/i2c/l3/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/i2c/l3/Makefile	Sun Dec 15 18:08:29 2002
@@ -8,5 +8,3 @@
 
 # Module Dependency
 obj-$(CONFIG_SND_SA11XX_UDA1341) += snd-uda1341.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/Makefile b/sound/isa/Makefile
--- a/sound/isa/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/isa/Makefile	Sun Dec 15 18:08:28 2002
@@ -22,5 +22,3 @@
 
 obj-$(CONFIG_SND) += ad1816a/ ad1848/ cs423x/ es1688/ gus/ opti9xx/ \
 		     sb/ wavefront/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/ad1816a/Makefile b/sound/isa/ad1816a/Makefile
--- a/sound/isa/ad1816a/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/isa/ad1816a/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_AD1816A) += snd-ad1816a.o snd-ad1816a-lib.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/ad1848/Makefile b/sound/isa/ad1848/Makefile
--- a/sound/isa/ad1848/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/isa/ad1848/Makefile	Sun Dec 15 18:08:29 2002
@@ -15,5 +15,3 @@
 obj-$(CONFIG_SND_OPTI92X_AD1848) += snd-ad1848-lib.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/cs423x/Makefile b/sound/isa/cs423x/Makefile
--- a/sound/isa/cs423x/Makefile	Sun Dec 15 18:08:31 2002
+++ b/sound/isa/cs423x/Makefile	Sun Dec 15 18:08:31 2002
@@ -24,5 +24,3 @@
 obj-$(CONFIG_SND_WAVEFRONT) += snd-cs4231-lib.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/es1688/Makefile b/sound/isa/es1688/Makefile
--- a/sound/isa/es1688/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/isa/es1688/Makefile	Sun Dec 15 18:08:29 2002
@@ -11,5 +11,3 @@
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_ES1688) += snd-es1688.o snd-es1688-lib.o
 obj-$(CONFIG_SND_GUSEXTREME) += snd-es1688-lib.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/gus/Makefile b/sound/isa/gus/Makefile
--- a/sound/isa/gus/Makefile	Sun Dec 15 18:08:32 2002
+++ b/sound/isa/gus/Makefile	Sun Dec 15 18:08:32 2002
@@ -34,5 +34,3 @@
 endif
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/opti9xx/Makefile b/sound/isa/opti9xx/Makefile
--- a/sound/isa/opti9xx/Makefile	Sun Dec 15 18:08:31 2002
+++ b/sound/isa/opti9xx/Makefile	Sun Dec 15 18:08:31 2002
@@ -11,5 +11,3 @@
 obj-$(CONFIG_SND_OPTI92X_AD1848) += snd-opti92x-ad1848.o
 obj-$(CONFIG_SND_OPTI92X_CS4231) += snd-opti92x-cs4231.o
 obj-$(CONFIG_SND_OPTI93X) += snd-opti93x.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/sb/Makefile b/sound/isa/sb/Makefile
--- a/sound/isa/sb/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/isa/sb/Makefile	Sun Dec 15 18:08:29 2002
@@ -33,5 +33,3 @@
 endif
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/isa/wavefront/Makefile b/sound/isa/wavefront/Makefile
--- a/sound/isa/wavefront/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/isa/wavefront/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_WAVEFRONT) += snd-wavefront.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/oss/Makefile b/sound/oss/Makefile
--- a/sound/oss/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/oss/Makefile	Sun Dec 15 18:08:28 2002
@@ -24,8 +24,8 @@
 obj-$(CONFIG_SOUND_SSCAPE)	+= sscape.o ad1848.o mpu401.o
 obj-$(CONFIG_SOUND_MAD16)	+= mad16.o ad1848.o sb_lib.o uart401.o
 obj-$(CONFIG_SOUND_CS4232)	+= cs4232.o uart401.o
-obj-$(CONFIG_SOUND_OPL3SA2)	+= opl3sa2.o ad1848.o mpu401.o
 obj-$(CONFIG_SOUND_MSS)		+= ad1848.o
+obj-$(CONFIG_SOUND_OPL3SA2)	+= opl3sa2.o ad1848.o mpu401.o
 obj-$(CONFIG_SOUND_PAS)		+= pas2.o sb.o sb_lib.o uart401.o
 obj-$(CONFIG_SOUND_SB)		+= sb.o sb_lib.o uart401.o
 obj-$(CONFIG_SOUND_WAVEFRONT)	+= wavefront.o
@@ -99,8 +99,6 @@
 # Files generated that shall be removed upon make clean
 clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
                pss_boot.h trix_boot.h
-
-include $(TOPDIR)/Rules.make
 
 # Firmware files that need translation
 #
diff -Nru a/sound/oss/cs4281/Makefile b/sound/oss/cs4281/Makefile
--- a/sound/oss/cs4281/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/oss/cs4281/Makefile	Sun Dec 15 18:08:28 2002
@@ -4,5 +4,3 @@
 obj-$(CONFIG_SOUND_CS4281) += cs4281.o
 
 cs4281-objs += cs4281m.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/oss/dmasound/Makefile b/sound/oss/dmasound/Makefile
--- a/sound/oss/dmasound/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/oss/dmasound/Makefile	Sun Dec 15 18:08:28 2002
@@ -8,5 +8,3 @@
 obj-$(CONFIG_DMASOUND_AWACS)  += dmasound_core.o dmasound_awacs.o
 obj-$(CONFIG_DMASOUND_PAULA)  += dmasound_core.o dmasound_paula.o
 obj-$(CONFIG_DMASOUND_Q40)    += dmasound_core.o dmasound_q40.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/oss/emu10k1/Makefile b/sound/oss/emu10k1/Makefile
--- a/sound/oss/emu10k1/Makefile	Sun Dec 15 18:08:32 2002
+++ b/sound/oss/emu10k1/Makefile	Sun Dec 15 18:08:32 2002
@@ -15,5 +15,3 @@
 ifdef CONFIG_MIDI_EMU10K1
     EXTRA_CFLAGS += -DEMU10K1_SEQUENCER
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/Makefile b/sound/pci/Makefile
--- a/sound/pci/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/pci/Makefile	Sun Dec 15 18:08:28 2002
@@ -35,5 +35,3 @@
 obj-$(CONFIG_SND_VIA82XX) += snd-via82xx.o
 
 obj-$(CONFIG_SND) += ac97/ ali5451/ cs46xx/ emu10k1/ korg1212/ nm256/ rme9652/ trident/ ymfpci/ ice1712/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/ac97/Makefile b/sound/pci/ac97/Makefile
--- a/sound/pci/ac97/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/ac97/Makefile	Sun Dec 15 18:08:29 2002
@@ -26,5 +26,3 @@
 obj-$(CONFIG_SND_YMFPCI) += snd-ac97-codec.o
 
 obj-m := $(sort $(obj-m))
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/ali5451/Makefile b/sound/pci/ali5451/Makefile
--- a/sound/pci/ali5451/Makefile	Sun Dec 15 18:08:32 2002
+++ b/sound/pci/ali5451/Makefile	Sun Dec 15 18:08:32 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_ALI5451) += snd-ali5451.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/cs46xx/Makefile b/sound/pci/cs46xx/Makefile
--- a/sound/pci/cs46xx/Makefile	Sun Dec 15 18:08:30 2002
+++ b/sound/pci/cs46xx/Makefile	Sun Dec 15 18:08:30 2002
@@ -10,5 +10,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_CS46XX) += snd-cs46xx.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/emu10k1/Makefile b/sound/pci/emu10k1/Makefile
--- a/sound/pci/emu10k1/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/emu10k1/Makefile	Sun Dec 15 18:08:29 2002
@@ -15,5 +15,3 @@
 ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
   obj-$(CONFIG_SND_EMU10K1) += snd-emu10k1-synth.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/ice1712/Makefile b/sound/pci/ice1712/Makefile
--- a/sound/pci/ice1712/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/ice1712/Makefile	Sun Dec 15 18:08:29 2002
@@ -9,5 +9,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_ICE1712) += snd-ice1712.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/korg1212/Makefile b/sound/pci/korg1212/Makefile
--- a/sound/pci/korg1212/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/korg1212/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_KORG1212) += snd-korg1212.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/nm256/Makefile b/sound/pci/nm256/Makefile
--- a/sound/pci/nm256/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/nm256/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_NM256) += snd-nm256.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/rme9652/Makefile b/sound/pci/rme9652/Makefile
--- a/sound/pci/rme9652/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/rme9652/Makefile	Sun Dec 15 18:08:29 2002
@@ -12,5 +12,3 @@
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_RME9652) += snd-rme9652.o snd-hammerfall-mem.o
 obj-$(CONFIG_SND_HDSP) += snd-hdsp.o snd-hammerfall-mem.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/trident/Makefile b/sound/pci/trident/Makefile
--- a/sound/pci/trident/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/trident/Makefile	Sun Dec 15 18:08:29 2002
@@ -13,5 +13,3 @@
 ifeq ($(subst m,y,$(CONFIG_SND_SEQUENCER)),y)
   obj-$(CONFIG_SND_TRIDENT) += snd-trident-synth.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/pci/ymfpci/Makefile b/sound/pci/ymfpci/Makefile
--- a/sound/pci/ymfpci/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/pci/ymfpci/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_YMFPCI) += snd-ymfpci.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/ppc/Makefile b/sound/ppc/Makefile
--- a/sound/ppc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/ppc/Makefile	Sun Dec 15 18:08:29 2002
@@ -7,5 +7,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_POWERMAC) += snd-powermac.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/sparc/Makefile b/sound/sparc/Makefile
--- a/sound/sparc/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/sparc/Makefile	Sun Dec 15 18:08:29 2002
@@ -10,5 +10,3 @@
 obj-$(CONFIG_SND_SUN_AMD7930) += snd-sun-amd7930.o
 #obj-$(CONFIG_SND_SUN_DBRI) += snd-sun-dbri.o
 obj-$(CONFIG_SND_SUN_CS4231) += snd-sun-cs4231.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/synth/Makefile b/sound/synth/Makefile
--- a/sound/synth/Makefile	Sun Dec 15 18:08:28 2002
+++ b/sound/synth/Makefile	Sun Dec 15 18:08:28 2002
@@ -15,5 +15,3 @@
 endif
 
 obj-$(CONFIG_SND) += emux/
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/synth/emux/Makefile b/sound/synth/emux/Makefile
--- a/sound/synth/emux/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/synth/emux/Makefile	Sun Dec 15 18:08:29 2002
@@ -16,5 +16,3 @@
   obj-$(CONFIG_SND_SBAWE) += snd-emux-synth.o
   obj-$(CONFIG_SND_EMU10K1) += snd-emux-synth.o
 endif
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/usb/Makefile b/sound/usb/Makefile
--- a/sound/usb/Makefile	Sun Dec 15 18:08:29 2002
+++ b/sound/usb/Makefile	Sun Dec 15 18:08:29 2002
@@ -6,5 +6,3 @@
 
 # Toplevel Module Dependency
 obj-$(CONFIG_SND_USB_AUDIO) += snd-usb-audio.o
-
-include $(TOPDIR)/Rules.make
diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
--- a/sound/usb/usbaudio.c	Sun Dec 15 18:08:30 2002
+++ b/sound/usb/usbaudio.c	Sun Dec 15 18:08:30 2002
@@ -526,7 +526,7 @@
 /*
  * complete callback from data urb
  */
-static void snd_complete_urb(struct urb *urb)
+static void snd_complete_urb(struct urb *urb, struct pt_regs *regs)
 {
 	snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
 	snd_usb_substream_t *subs = ctx->subs;
@@ -551,7 +551,7 @@
 /*
  * complete callback from sync urb
  */
-static void snd_complete_sync_urb(struct urb *urb)
+static void snd_complete_sync_urb(struct urb *urb, struct pt_regs *regs)
 {
 	snd_urb_ctx_t *ctx = (snd_urb_ctx_t *)urb->context;
 	snd_usb_substream_t *subs = ctx->subs;
